This commit is contained in:
parent
b2702d8567
commit
2f9979046d
|
@ -28,7 +28,7 @@
|
||||||
<td>{{$t('supplier.identifier')}}</td>
|
<td>{{$t('supplier.identifier')}}</td>
|
||||||
<th>
|
<th>
|
||||||
<div>{{$t('supplier.iban')}}</div>
|
<div>{{$t('supplier.iban')}}</div>
|
||||||
<div>{{$t('supplier.cif')}}</div>
|
<div>{{supplier.nif}}</div>
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
|
@ -1,10 +1,6 @@
|
||||||
const vnReport = require('../../../core/mixins/vn-report.js');
|
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 = {
|
module.exports = {
|
||||||
name: 'sepa-core',
|
name: 'sepa-core',
|
||||||
mixins: [vnReport],
|
mixins: [vnReport],
|
||||||
|
@ -12,6 +8,7 @@ module.exports = {
|
||||||
this.client = await this.findOneFromDef('client', [this.companyId, this.companyId, this.id]);
|
this.client = await this.findOneFromDef('client', [this.companyId, this.companyId, this.id]);
|
||||||
this.checkMainEntity(this.client);
|
this.checkMainEntity(this.client);
|
||||||
this.supplier = await this.findOneFromDef('supplier', [this.companyId, this.companyId, this.id]);
|
this.supplier = await this.findOneFromDef('supplier', [this.companyId, this.companyId, this.id]);
|
||||||
|
console.log(this.supplier);
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
id: {
|
id: {
|
||||||
|
@ -23,5 +20,16 @@ module.exports = {
|
||||||
type: Number,
|
type: Number,
|
||||||
required: true
|
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