fix: delete throw error

This commit is contained in:
Vicent Llopis 2022-10-17 11:43:01 +02:00
parent 33092acee7
commit e5fd6adfe5
1 changed files with 5 additions and 3 deletions

View File

@ -4,6 +4,7 @@ describe('InvoiceOut globalInvoicing()', () => {
const userId = 1; const userId = 1;
const companyFk = 442; const companyFk = 442;
const clientId = 1101; const clientId = 1101;
const addressId = 1;
const invoicedTicketId = 8; const invoicedTicketId = 8;
const invoiceSerial = 'A'; const invoiceSerial = 'A';
const activeCtx = { const activeCtx = {
@ -22,11 +23,12 @@ describe('InvoiceOut globalInvoicing()', () => {
try { try {
ctx.args = { ctx.args = {
clientId: clientId,
addressId: addressId,
invoiceDate: new Date(), invoiceDate: new Date(),
maxShipped: new Date(), maxShipped: new Date(),
fromClientId: clientId, companyFk: companyFk,
toClientId: 1106, minShipped: new Date()
companyFk: companyFk
}; };
const result = await models.InvoiceOut.globalInvoicing(ctx, options); const result = await models.InvoiceOut.globalInvoicing(ctx, options);
const ticket = await models.Ticket.findById(invoicedTicketId, null, options); const ticket = await models.Ticket.findById(invoicedTicketId, null, options);