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
@@ -134,7 +134,7 @@ describe('DocumentFormPage de inventario', () => {
|
||||
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/InventoryTransferRequests');
|
||||
expect(req.request.body).toEqual({
|
||||
DocDate: page().header().DocDate,
|
||||
@@ -153,7 +153,7 @@ describe('DocumentFormPage de inventario', () => {
|
||||
await tick();
|
||||
(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('almacén origen');
|
||||
});
|
||||
|
||||
@@ -206,9 +206,16 @@ describe('columnas de línea por documento', () => {
|
||||
it('sin elegir, el documento lleva todas las columnas y envía los mismos campos de siempre', () => {
|
||||
const l = marketingLayout(base);
|
||||
expect(l.columns.map((c) => c.key)).toEqual([
|
||||
'ItemCode', 'ItemDescription', 'Quantity', 'WarehouseCode', 'Price', 'DiscountPercent', 'TaxCode', 'LineTotal',
|
||||
'ItemCode', 'ItemDescription', 'Quantity', 'WarehouseCode', 'Price', 'PriceAfterVAT', 'DiscountPercent', 'TaxCode',
|
||||
'CostingCode', 'CostingCode2', 'CostingCode3', 'CostingCode4', 'CostingCode5', 'ProjectCode', 'AccountCode',
|
||||
'BaseType', 'BaseEntry', 'BaseLine', 'LineTotal',
|
||||
]);
|
||||
expect(l.lines.fields).toEqual([...MARKETING_LINES.fields, 'UoMEntry']);
|
||||
// lo que se envía por línea: las columnas editables (sin el total ni las de solo lectura) y la unidad de medida
|
||||
expect(l.lines.fields).toEqual([
|
||||
'ItemCode', 'ItemDescription', 'Quantity', 'WarehouseCode', 'Price', 'PriceAfterVAT', 'DiscountPercent', 'TaxCode',
|
||||
'CostingCode', 'CostingCode2', 'CostingCode3', 'CostingCode4', 'CostingCode5', 'ProjectCode', 'AccountCode', 'UoMEntry',
|
||||
]);
|
||||
expect(l.lines.fields).toEqual(expect.arrayContaining([...MARKETING_LINES.fields]));
|
||||
});
|
||||
|
||||
it('un documento elige sus columnas y el orden; los campos enviados salen de ellas', () => {
|
||||
@@ -233,7 +240,7 @@ describe('columnas de línea por documento', () => {
|
||||
const custom = marketingLayout({ ...base, lineColumns: [LINE_COLUMNS.item] });
|
||||
const other = marketingLayout(base);
|
||||
expect(custom.columns).toHaveLength(1);
|
||||
expect(other.columns).toHaveLength(8);
|
||||
expect(other.columns).toHaveLength(19);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user