feat: refs #7977 muestra las facturas sin vencimientos tambien
gitea/salix/pipeline/pr-dev This commit looks good
Details
gitea/salix/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
parent
5489a5edbc
commit
d7679fcb50
|
@ -64,14 +64,14 @@ BEGIN
|
||||||
c.code,
|
c.code,
|
||||||
'invoiceIn' statementType
|
'invoiceIn' statementType
|
||||||
FROM invoiceIn ii
|
FROM invoiceIn ii
|
||||||
JOIN invoiceInDueDay iid ON iid.invoiceInFk = ii.id
|
LEFT JOIN invoiceInDueDay iid ON iid.invoiceInFk = ii.id
|
||||||
JOIN currency c ON c.id = ii.currencyFk
|
JOIN currency c ON c.id = ii.currencyFk
|
||||||
WHERE ii.issued >= vBalanceStartingDate
|
WHERE ii.issued >= vBalanceStartingDate
|
||||||
AND ii.supplierFk = vSupplierFk
|
AND ii.supplierFk = vSupplierFk
|
||||||
AND vCurrencyFk IN (ii.currencyFk, 0)
|
AND vCurrencyFk IN (ii.currencyFk, 0)
|
||||||
AND vCompanyFk IN (ii.companyFk, 0)
|
AND vCompanyFk IN (ii.companyFk, 0)
|
||||||
AND (vIsConciliated = ii.isBooked OR NOT vIsConciliated)
|
AND (vIsConciliated = ii.isBooked OR NOT vIsConciliated)
|
||||||
GROUP BY iid.id
|
GROUP BY iid.id, ii.id
|
||||||
UNION ALL
|
UNION ALL
|
||||||
SELECT p.bankFk,
|
SELECT p.bankFk,
|
||||||
p.companyFk,
|
p.companyFk,
|
||||||
|
|
Loading…
Reference in New Issue