refs #5525 mod yml y sql #1491

Merged
carlossa merged 41 commits from 5525-ibanSEPA-CORE into dev 2024-01-16 13:14:39 +00:00
2 changed files with 14 additions and 6 deletions
Showing only changes of commit 2f9979046d - Show all commits

View File

@ -28,7 +28,7 @@
<td>{{$t('supplier.identifier')}}</td>
<th>
<div>{{$t('supplier.iban')}}</div>
<div>{{$t('supplier.cif')}}</div>
<div>{{supplier.nif}}</div>
</th>
</tr>
<tr>

View File

@ -1,10 +1,6 @@
const vnReport = require('../../../core/mixins/vn-report.js');
const db = require('../../../core/database');
// class Controller {
// constructor(country, supplier, iban, cif) {
// this.country = countryFk;
// }
// }
module.exports = {
name: 'sepa-core',
mixins: [vnReport],
@ -12,6 +8,7 @@ module.exports = {
this.client = await this.findOneFromDef('client', [this.companyId, this.companyId, this.id]);
this.checkMainEntity(this.client);
this.supplier = await this.findOneFromDef('supplier', [this.companyId, this.companyId, this.id]);
console.log(this.supplier);
},
props: {
id: {
@ -23,5 +20,16 @@ module.exports = {
type: Number,
required: true
}
},
methods: {
getSupplierCif() {
return db.findOne(`
SELECT sa.iban, s.nif
FROM supplierAccount sa
INNER JOIN supplier s ON sa.supplierFk = s.id
WHERE s.countryFk = ?
carlossa marked this conversation as resolved Outdated

en ese pais puede haber mas de un supplier no?

en ese pais puede haber mas de un supplier no?
LIMIT 1`), [this.countryFk];
}
}
};