This commit is contained in:
parent
908908a643
commit
84eb87e02a
|
@ -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() {
|
||||
|
|
|
@ -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 = ?
|
|
@ -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 = ?;
|
Loading…
Reference in New Issue