This commit is contained in:
parent
f1cbb6aab3
commit
0afc9ab109
|
@ -17,6 +17,7 @@ describe('InvoiceOut transferInvoice()', () => {
|
|||
spyOn(LoopBackContext, 'getCurrentContext').and.returnValue({
|
||||
active: activeCtx
|
||||
});
|
||||
spyOn(models.InvoiceOut, 'makePdfAndNotify');
|
||||
});
|
||||
|
||||
it('should return the id of the created issued invoice', async() => {
|
||||
|
|
|
@ -28,11 +28,7 @@ module.exports = function(Self) {
|
|||
});
|
||||
|
||||
Self.invoiceTicketsAndPdf = async(ctx, ticketsIds, invoiceCorrection, options) => {
|
||||
let invoiceIds = null;
|
||||
|
||||
invoiceIds = await Self.invoiceTickets(ctx, ticketsIds, invoiceCorrection, options);
|
||||
if (!invoiceIds) return [];
|
||||
if (!options.transaction)
|
||||
const invoiceIds = await Self.invoiceTickets(ctx, ticketsIds, invoiceCorrection, options);
|
||||
await Self.app.models.InvoiceOut.makePdfList(ctx, invoiceIds, null, options);
|
||||
return invoiceIds;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue