#7019 fix(createManualInvoice): add throw error #2175

Merged
jorgep merged 7 commits from 7019_fix_createManualInvoice into dev 2024-04-25 15:30:19 +00:00
2 changed files with 2 additions and 2 deletions
Showing only changes of commit 32da39899a - Show all commits

View File

@ -40,7 +40,7 @@ describe('InvoiceOut manual invoice path', () => {
await page.waitToClick(selectors.invoiceOutIndex.createInvoice);
await page.waitForSelector(selectors.invoiceOutIndex.manualInvoiceForm);
await page.autocompleteSearch(selectors.invoiceOutIndex.manualInvoiceClient, 'Max Eisenhardt');
await page.autocompleteSearch(selectors.invoiceOutIndex.manualInvoiceClient, 'Bruce Wayne');
Review

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.

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.
await page.autocompleteSearch(selectors.invoiceOutIndex.manualInvoiceSerial, 'Global nacional');
await page.autocompleteSearch(selectors.invoiceOutIndex.manualInvoiceTaxArea, 'national');
await page.waitToClick(selectors.invoiceOutIndex.saveInvoice);

View File

@ -142,7 +142,7 @@ module.exports = Self => {
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);