Merge pull request 'refs #4497 servicios añadidos' (!1117) from 4497-services-intrastat into dev
gitea/salix/pipeline/head This commit looks good Details

Reviewed-on: #1117
Reviewed-by: Joan Sanchez <joan@verdnatura.es>
This commit is contained in:
Alexandre Riera 2022-11-03 07:27:13 +00:00
commit 868218096b
5 changed files with 18 additions and 6 deletions

View File

@ -264,7 +264,7 @@
<tbody>
<tr v-for="row in intrastat">
<td>{{row.code}}</td>
<td width="50%">{{row.description}}</td>
<td width="50%">{{row.description || $t('services') }}</td>
<td class="number">{{row.stems | number($i18n.locale)}}</td>
<td class="number">{{row.netKg | number($i18n.locale)}}</td>
<td class="number">{{row.subtotal | currency('EUR', $i18n.locale)}}</td>

View File

@ -81,7 +81,7 @@ module.exports = {
return this.rawSqlFromDef(`taxes`, [reference]);
},
fetchIntrastat(reference) {
return this.rawSqlFromDef(`intrastat`, [reference, reference, reference]);
return this.rawSqlFromDef(`intrastat`, [reference, reference, reference, reference]);
},
fetchRectified(reference) {
return this.rawSqlFromDef(`rectified`, [reference]);

View File

@ -34,3 +34,4 @@ plantPassport: Plant passport
observations: Observations
wireTransfer: "Pay method: Transferencia"
accountNumber: "Account number: {0}"
services: Services

View File

@ -34,3 +34,4 @@ plantPassport: Pasaporte fitosanitario
observations: Observaciones
wireTransfer: "Forma de pago: Transferencia"
accountNumber: "Número de cuenta: {0}"
services: Servicios

View File

@ -1,4 +1,4 @@
SELECT
(SELECT
ir.id code,
ir.description description,
CAST(SUM(IFNULL(i.stems, 1) * s.quantity) AS DECIMAL(10,2)) stems,
@ -19,4 +19,14 @@ SELECT
WHERE t.refFk = ?
AND i.intrastatFk
GROUP BY i.intrastatFk
ORDER BY i.intrastatFk;
ORDER BY i.intrastatFk)
UNION ALL
(SELECT
NULL AS code,
NULL AS description,
0 AS stems,
0 AS netKg,
CAST(SUM((ts.quantity * ts.price)) AS DECIMAL(10,2)) AS subtotal
FROM vn.ticketService ts
JOIN vn.ticket t ON ts.ticketFk = t.id
WHERE t.refFk = ?);