refs #5525 mod yml y sql #1491
|
@ -8,7 +8,6 @@ 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: {
|
||||
|
@ -26,9 +25,9 @@ module.exports = {
|
|||
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];
|
||||
JOIN company co ON co.supplierAccountFk = sa.id
|
||||
JOIN supplier s ON sa.supplierFk = s.id
|
||||
WHERE co.id = ?`) [this.companyId];
|
||||
carlossa marked this conversation as resolved
Outdated
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
en ese pais puede haber mas de un supplier no?