Merge branch 'master' of https://gitea.verdnatura.es/verdnatura/salix into test
This commit is contained in:
commit
0c6541372e
|
@ -54,7 +54,7 @@ module.exports = Self => {
|
||||||
JOIN country co ON co.id = p.countryFk
|
JOIN country co ON co.id = p.countryFk
|
||||||
LEFT JOIN account.emailUser eu ON eu.userFk = c.salesPersonFk
|
LEFT JOIN account.emailUser eu ON eu.userFk = c.salesPersonFk
|
||||||
WHERE (al.code = 'PACKED' OR (am.code = 'refund' AND al.code <> 'delivered'))
|
WHERE (al.code = 'PACKED' OR (am.code = 'refund' AND al.code <> 'delivered'))
|
||||||
AND DATE(t.shipped) BETWEEN ? - INTERVAL 2 DAY AND util.dayEnd(?)
|
AND DATE(t.shipped) BETWEEN ? - INTERVAL 7 DAY AND util.dayEnd(?)
|
||||||
AND t.refFk IS NULL
|
AND t.refFk IS NULL
|
||||||
GROUP BY t.id
|
GROUP BY t.id
|
||||||
`, [toDate, toDate]);
|
`, [toDate, toDate]);
|
||||||
|
|
|
@ -12,10 +12,10 @@ module.exports = async function(ctx, Self, tickets, options) {
|
||||||
Object.assign(myOptions, options);
|
Object.assign(myOptions, options);
|
||||||
|
|
||||||
let tx;
|
let tx;
|
||||||
if (!myOptions.transaction) {
|
// if (!myOptions.transaction) {
|
||||||
tx = await Self.beginTransaction({});
|
// tx = await Self.beginTransaction({});
|
||||||
myOptions.transaction = tx;
|
// myOptions.transaction = tx;
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (tickets.length == 0) return;
|
if (tickets.length == 0) return;
|
||||||
|
|
||||||
|
@ -155,7 +155,10 @@ module.exports = async function(ctx, Self, tickets, options) {
|
||||||
INSERT INTO util.debug (variable, value)
|
INSERT INTO util.debug (variable, value)
|
||||||
VALUES ('invoicingTicketError', ?)
|
VALUES ('invoicingTicketError', ?)
|
||||||
`, [ticket.id + ' - ' + error]);
|
`, [ticket.id + ' - ' + error]);
|
||||||
|
<<<<<<< HEAD
|
||||||
|
|
||||||
|
=======
|
||||||
|
>>>>>>> 087818e39d86256ae1e166112b0f648a7a0ff239
|
||||||
if (error.responseCode == 450) {
|
if (error.responseCode == 450) {
|
||||||
await invalidEmail(ticket);
|
await invalidEmail(ticket);
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in New Issue