refs #6922 change order
gitea/salix/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Carlos Satorres 2024-02-22 10:39:34 +01:00
parent 4d2637764e
commit b6086e74c1
1 changed files with 7 additions and 4 deletions

View File

@ -7,7 +7,8 @@ SELECT
s.discount,
s.itemFk,
s.concept,
tc.code vatType
tc.code vatType,
it.isPackaging
FROM vn.invoiceOut io
JOIN vn.ticket t ON t.refFk = io.ref
JOIN vn.supplier su ON su.id = io.companyFk
@ -34,9 +35,10 @@ SELECT
ts.quantity,
ts.price,
0 discount,
'',
ts.description concept,
tc.code vatType
NULL,
ts.description,
tc.code,
NULL
FROM vn.invoiceOut io
JOIN vn.ticket t ON t.refFk = io.ref
JOIN vn.ticketService ts ON ts.ticketFk = t.id
@ -46,3 +48,4 @@ SELECT
JOIN vn.supplierAccount sa ON sa.id = co.supplierAccountFk
JOIN vn.taxClass tc ON tc.id = ts.taxClassFk
WHERE t.refFk = ?
ORDER BY (isPackaging), concept, itemFk