feat(web): Indicador, prefijo y número del folio juntos en una fila (documentos de facturación y asiento) y las tres fechas de la cabecera en orden

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
GeorgeandClaude Sonnet 5.5 committed 2026-10-19 14:35:54 -05:00
1 parent 1bb8efa77e
commit a74c19a139
11 files changed
+170 -19

No files matched your search

@@ -202,6 +202,7 @@ describe('DocumentFormPage', () => {
CardCode: 'C1',
DocDate: page().header().DocDate,
DocDueDate: page().header().DocDueDate,
TaxDate: page().header().TaxDate,
DiscountPercent: 0,
DocumentLines: [{ ItemCode: 'A1', Quantity: 1, Price: 50, DiscountPercent: 0 }],
});
@@ -210,6 +211,14 @@ describe('DocumentFormPage', () => {
expect(navigate).toHaveBeenCalledWith(['..', 99], expect.objectContaining({ state: { created: '1099' } }));
});
it('las tres fechas de un documento nuevo van juntas, una debajo de la otra: contabilización, vencimiento y del documento', () => {
const labels = page().layout.header.right.filter((f: { type: string }) => f.type === 'date').map((f: { label: string }) => f.label);
expect(labels).toEqual(['Fecha de contabilización', 'Fecha de vencimiento', 'Fecha del documento']);
const h = page().header();
expect(h.TaxDate).toBe(h.DocDate); // las tres arrancan con la fecha de hoy
expect(h.DocDueDate).toBe(h.DocDate);
});
it('al elegir el socio de un documento nuevo sin líneas se agrega una línea, y no se repite', async () => {
expect(page().lines()).toEqual([]);
page().onPartner({ CardCode: 'C1', CardName: 'ACME' });