Merge branch 'dev' into 4865-sintaxis-mensajes-de-rocket
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:
commit
16d096d8ef
|
@ -138,7 +138,7 @@ module.exports = Self => {
|
|||
recipient: invoiceOut.client().email
|
||||
};
|
||||
try {
|
||||
await models.InvoiceOut.invoiceEmail(ctx);
|
||||
await models.InvoiceOut.invoiceEmail(ctx, invoiceOut.ref);
|
||||
} catch (err) {}
|
||||
|
||||
return invoiceId;
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
type="number"
|
||||
label="Minimum M3"
|
||||
ng-model="$ctrl.supplierAgencyTerm.minimumM3"
|
||||
step="0.01"
|
||||
rule>
|
||||
</vn-input-number>
|
||||
</vn-horizontal>
|
||||
|
@ -46,6 +47,7 @@
|
|||
type="number"
|
||||
label="M3 Price"
|
||||
ng-model="$ctrl.supplierAgencyTerm.m3Price"
|
||||
step="0.01"
|
||||
rule>
|
||||
</vn-input-number>
|
||||
</vn-horizontal>
|
||||
|
|
|
@ -137,7 +137,7 @@ module.exports = Self => {
|
|||
const params = [args.id, args.shipped, args.warehouseFk];
|
||||
const [salesMovable] = await Self.rawSql(query, params, myOptions);
|
||||
|
||||
const sales = await models.Sale.find({ticketFk: args.id}, myOptions);
|
||||
const sales = await models.Sale.find({where: {ticketFk: args.id}}, myOptions);
|
||||
const salesNewTicket = salesMovable.filter(sale => (sale.movable ? sale.movable : 0) >= sale.quantity);
|
||||
|
||||
const salesNewTicketLength = salesNewTicket.length;
|
||||
|
|
|
@ -82,7 +82,7 @@ module.exports = {
|
|||
return this.rawSqlFromDef(`taxes`, [reference]);
|
||||
},
|
||||
fetchIntrastat(reference) {
|
||||
return this.rawSqlFromDef(`intrastat`, [reference, reference, reference, reference]);
|
||||
return this.rawSqlFromDef(`intrastat`, [reference, reference, reference, reference, reference]);
|
||||
},
|
||||
fetchRectified(reference) {
|
||||
return this.rawSqlFromDef(`rectified`, [reference]);
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
SELECT *
|
||||
FROM invoiceOut io
|
||||
JOIN invoiceOutSerial ios ON io.serial = ios.code
|
||||
JOIN
|
||||
(SELECT
|
||||
t.refFk,
|
||||
ir.id code,
|
||||
ir.description description,
|
||||
CAST(SUM(IFNULL(i.stems, 1) * s.quantity) AS DECIMAL(10,2)) stems,
|
||||
|
@ -19,14 +24,16 @@
|
|||
WHERE t.refFk = ?
|
||||
AND i.intrastatFk
|
||||
GROUP BY i.intrastatFk
|
||||
ORDER BY i.intrastatFk)
|
||||
UNION ALL
|
||||
(SELECT
|
||||
SELECT
|
||||
NULL AS refFk,
|
||||
NULL AS code,
|
||||
NULL AS description,
|
||||
0 AS stems,
|
||||
0 AS netKg,
|
||||
CAST(SUM((ts.quantity * ts.price)) AS DECIMAL(10,2)) AS subtotal
|
||||
IF(CAST(SUM((ts.quantity * ts.price)) AS DECIMAL(10,2)), CAST(SUM((ts.quantity * ts.price)) AS DECIMAL(10,2)), 0) AS subtotal
|
||||
FROM vn.ticketService ts
|
||||
JOIN vn.ticket t ON ts.ticketFk = t.id
|
||||
WHERE t.refFk = ?);
|
||||
WHERE t.refFk = ?) sub
|
||||
WHERE io.`ref` = ? AND ios.isCEE
|
||||
ORDER BY sub.code;
|
||||
|
|
|
@ -3,8 +3,8 @@ SELECT
|
|||
io.ref,
|
||||
io.issued,
|
||||
ict.description
|
||||
FROM vn.invoiceCorrection ic
|
||||
JOIN vn.invoiceOut io ON io.id = ic.correctedFk
|
||||
JOIN vn.invoiceCorrectionType ict ON ict.id = ic.invoiceCorrectionTypeFk
|
||||
FROM invoiceOut io
|
||||
JOIN invoiceCorrection ic ON ic.correctingFk = io.id
|
||||
JOIN invoiceCorrectionType ict ON ict.id = ic.invoiceCorrectionTypeFk
|
||||
LEFT JOIN ticket t ON t.refFk = io.ref
|
||||
WHERE t.refFk = ?
|
||||
WHERE io.ref = ?
|
Loading…
Reference in New Issue