6745-2404_testToMaster #1950
|
@ -8,7 +8,6 @@ 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: {
|
||||||
|
@ -26,9 +25,9 @@ module.exports = {
|
||||||
return db.findOne(`
|
return db.findOne(`
|
||||||
SELECT sa.iban, s.nif
|
SELECT sa.iban, s.nif
|
||||||
FROM supplierAccount sa
|
FROM supplierAccount sa
|
||||||
INNER JOIN supplier s ON sa.supplierFk = s.id
|
JOIN company co ON co.supplierAccountFk = sa.id
|
||||||
WHERE s.countryFk = ?
|
JOIN supplier s ON sa.supplierFk = s.id
|
||||||
LIMIT 1`), [this.countryFk];
|
WHERE co.id = ?`) [this.companyId];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue