refs #4547 cambios sql
gitea/salix/pipeline/head There was a failure building this commit Details

This commit is contained in:
Alexandre Riera 2022-11-03 08:08:24 +01:00
parent 908908a643
commit 84eb87e02a
3 changed files with 12 additions and 11 deletions

View File

@ -6,14 +6,14 @@ module.exports = {
name: 'balance-compensation',
async serverPrefetch() {
this.client = await this.fetchClient(this.id);
this.company = await this.fetchCompany();
this.company = await this.fetchCompany(this.id);
},
methods: {
fetchClient(id) {
return this.findOneFromDef('client', [id]);
},
fetchCompany() {
return this.findOneFromDef('company');
fetchCompany(id) {
return this.findOneFromDef('company', [id]);
},
currentDate() {

View File

@ -6,7 +6,7 @@ SELECT
c.city,
r.amountPaid,
r.payed
FROM client c
FROM client c
JOIN receipt r ON r.clientFk = c.id
JOIN supplier s ON c.fi = s.nif
WHERE r.id = ?;
WHERE r.id = ?

View File

@ -3,5 +3,6 @@ SELECT
s.nif,
s.street,
s.city
FROM supplier s
WHERE s.id = 442;
FROM supplier s
JOIN receipt r ON r.companyFk = s.id
WHERE r.id = ?;