#7019 fix(createManualInvoice): add throw error #2175
|
@ -40,7 +40,7 @@ describe('InvoiceOut manual invoice path', () => {
|
||||||
await page.waitToClick(selectors.invoiceOutIndex.createInvoice);
|
await page.waitToClick(selectors.invoiceOutIndex.createInvoice);
|
||||||
await page.waitForSelector(selectors.invoiceOutIndex.manualInvoiceForm);
|
await page.waitForSelector(selectors.invoiceOutIndex.manualInvoiceForm);
|
||||||
|
|
||||||
await page.autocompleteSearch(selectors.invoiceOutIndex.manualInvoiceClient, 'Max Eisenhardt');
|
await page.autocompleteSearch(selectors.invoiceOutIndex.manualInvoiceClient, 'Bruce Wayne');
|
||||||
|
|||||||
await page.autocompleteSearch(selectors.invoiceOutIndex.manualInvoiceSerial, 'Global nacional');
|
await page.autocompleteSearch(selectors.invoiceOutIndex.manualInvoiceSerial, 'Global nacional');
|
||||||
await page.autocompleteSearch(selectors.invoiceOutIndex.manualInvoiceTaxArea, 'national');
|
await page.autocompleteSearch(selectors.invoiceOutIndex.manualInvoiceTaxArea, 'national');
|
||||||
await page.waitToClick(selectors.invoiceOutIndex.saveInvoice);
|
await page.waitToClick(selectors.invoiceOutIndex.saveInvoice);
|
||||||
|
|
|
@ -142,7 +142,7 @@ module.exports = Self => {
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!newInvoice.id) throw new UserError('It was not able to create the invoice:');
|
if (!newInvoice.id) throw new UserError('It was not able to create the invoice');
|
||||||
|
|
||||||
await Self.createPdf(ctx, newInvoice.id);
|
await Self.createPdf(ctx, newInvoice.id);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Se estaba intentando facturar el mismo ticket. El ticket 15 es de este cliente, por tanto falla. Antes devolvía id: null y no estaba controlado para que lance un error.