Debug logs
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
4172229051
commit
d7b563c5ec
|
@ -20,6 +20,8 @@ module.exports = async function(request, response, next) {
|
|||
if (toDate >= todayMinDate && toDate <= todayMaxDate)
|
||||
throw new Error('You cannot close tickets for today');
|
||||
|
||||
console.log(`Making closure up to ${toDate}...`);
|
||||
|
||||
const tickets = await db.rawSql(`
|
||||
SELECT
|
||||
t.id,
|
||||
|
|
|
@ -7,11 +7,13 @@ const storage = require('vn-print/core/storage');
|
|||
|
||||
module.exports = {
|
||||
async start(tickets, reqArgs) {
|
||||
console.log(tickets);
|
||||
if (tickets.length == 0) return;
|
||||
|
||||
const failedtickets = [];
|
||||
for (const ticket of tickets) {
|
||||
try {
|
||||
console.log(`Closing ticket id ${ticket.id}...`);
|
||||
await db.rawSql(`CALL vn.ticket_closeByTicket(?)`, [ticket.id]);
|
||||
|
||||
const invoiceOut = await db.findOne(`
|
||||
|
|
Loading…
Reference in New Issue