fix: actualizada sql intrastat
gitea/salix/pipeline/head There was a failure building this commit
Details
gitea/salix/pipeline/head There was a failure building this commit
Details
This commit is contained in:
parent
5b22096567
commit
e61af5286b
|
@ -2,8 +2,8 @@ SELECT *
|
||||||
FROM (
|
FROM (
|
||||||
SELECT i.intrastatFk code,
|
SELECT i.intrastatFk code,
|
||||||
it.description,
|
it.description,
|
||||||
SUM(CAST((s.quantity * s.price * (100 - s.discount) / 100 ) AS DECIMAL(10, 2))) subtotal,
|
CAST(SUM(ROUND((s.quantity * s.price * (100 - s.discount) / 100 ) , 2))AS DECIMAL(10, 2)) subtotal,
|
||||||
SUM(CAST(IFNULL(i.stems, 1) * s.quantity AS DECIMAL(10, 2))) stems,
|
SUM(IFNULL(i.stems, 1) * s.quantity) stems,
|
||||||
CAST(SUM(IFNULL(i.stems, 1)
|
CAST(SUM(IFNULL(i.stems, 1)
|
||||||
* s.quantity
|
* s.quantity
|
||||||
* IF(ic.grams, ic.grams, IFNULL(i.weightByPiece, 0)) / 1000)
|
* IF(ic.grams, ic.grams, IFNULL(i.weightByPiece, 0)) / 1000)
|
||||||
|
|
Loading…
Reference in New Issue