Actualizar modules/ticket/back/methods/ticket/closure.js
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
f8a3527680
commit
d497ffc781
|
@ -22,6 +22,8 @@ module.exports = async function(ctx, Self, tickets, options) {
|
|||
const failedtickets = [];
|
||||
for (const ticket of tickets) {
|
||||
try {
|
||||
await Self.rawSql(`CALL util.debugAdd('invoicingTicket', ?)`, [ticket.id], {userId});
|
||||
|
||||
await Self.app.models.InvoiceOut.getSerial(ticket.clientFk, ticket.companyFk, ticket.addressFk, 'quick');
|
||||
await Self.rawSql(
|
||||
`CALL vn.ticket_closeByTicket(?)`,
|
||||
|
@ -149,6 +151,11 @@ module.exports = async function(ctx, Self, tickets, options) {
|
|||
myOptions);
|
||||
}
|
||||
} catch (error) {
|
||||
await Self.rawSql(`
|
||||
INSERT INTO util.debug (variable, value)
|
||||
VALUES ('invoicingTicketError', ?)
|
||||
`, [ticket.id + ' - ' + error]);
|
||||
|
||||
if (error.responseCode == 450) {
|
||||
await invalidEmail(ticket);
|
||||
continue;
|
||||
|
|
Loading…
Reference in New Issue