feat(web): serie, indicador y proyecto en la cabecera; dimensiones, proyecto, cuenta, referencia base y precio con IVA en el detalle
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
9f003ee4bf
commit
f66ef108cf
22 files changed
+698
-100
No files matched your search
@@ -185,7 +185,7 @@ describe('DocumentFormPage', () => {
|
||||
it('no envía nada si falta el cliente o las líneas', async () => {
|
||||
(el().querySelector('.actions .btn.main') as HTMLElement).click();
|
||||
await tick();
|
||||
ctrl.expectNone((r) => r.method === 'POST');
|
||||
ctrl.expectNone((r) => r.method === 'POST' && !r.url.includes('SeriesService'));
|
||||
expect(el().querySelector('.status')?.textContent).toContain('Indique el cliente');
|
||||
});
|
||||
|
||||
@@ -195,7 +195,7 @@ describe('DocumentFormPage', () => {
|
||||
await tick();
|
||||
(el().querySelector('.actions .btn.main') as HTMLElement).click();
|
||||
await tick();
|
||||
const req = ctrl.expectOne((r) => r.method === 'POST');
|
||||
const req = ctrl.expectOne((r) => r.method === 'POST' && !r.url.includes('SeriesService'));
|
||||
expect(req.request.url).toBe('/api/sl/Orders');
|
||||
expect(req.request.body).toEqual({
|
||||
CardCode: 'C1',
|
||||
@@ -215,7 +215,7 @@ describe('DocumentFormPage', () => {
|
||||
await tick();
|
||||
(el().querySelector('.actions .btn.main') as HTMLElement).click();
|
||||
await tick();
|
||||
ctrl.expectOne((r) => r.method === 'POST').flush({ message: 'Código de cliente inválido' }, { status: 400, statusText: 'Bad Request' });
|
||||
ctrl.expectOne((r) => r.method === 'POST' && !r.url.includes('SeriesService')).flush({ message: 'Código de cliente inválido' }, { status: 400, statusText: 'Bad Request' });
|
||||
await tick();
|
||||
expect(el().querySelector('.status')?.textContent).toContain('Código de cliente inválido');
|
||||
expect(navigate).not.toHaveBeenCalled();
|
||||
@@ -280,7 +280,7 @@ describe('DocumentFormPage', () => {
|
||||
await tick();
|
||||
(el().querySelector('.actions .btn.main') as HTMLElement).click();
|
||||
await tick();
|
||||
const req = ctrl.expectOne((r) => r.method === 'POST');
|
||||
const req = ctrl.expectOne((r) => r.method === 'POST' && !r.url.includes('SeriesService'));
|
||||
expect(req.request.body.DocumentLines).toEqual([
|
||||
{ ItemCode: 'A1', ItemDescription: 'Pieza', Quantity: 3, WarehouseCode: '01', Price: 100, DiscountPercent: 0, TaxCode: 'IVA', BaseType: 17, BaseEntry: 7, BaseLine: 0 },
|
||||
]);
|
||||
|
||||
Reference in new issue
Block a user