This commit is contained in:
parent
b2702d8567
commit
2f9979046d
|
@ -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>
|
||||
|
|
|
@ -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];
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue