refs #5525 iban
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Carlos Satorres 2023-07-26 13:10:18 +02:00
parent b2702d8567
commit 2f9979046d
2 changed files with 14 additions and 6 deletions

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 = ?
LIMIT 1`), [this.countryFk];
}
}
};