feat(web): formulario de documentos de ventas y compras (cargar, crear, actualizar con If-Match, navegar)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
51982fd3ab
commit
d900a96740
9 files changed
+621
-11
No files matched your search
@@ -93,6 +93,16 @@ export const DOCUMENT_LINE_COLUMNS: readonly GridColumn[] = [
|
||||
{ key: 'LineTotal', title: 'Total', type: 'number', decimals: 2, width: '110px', readonly: true },
|
||||
];
|
||||
|
||||
/** Columnas de línea con el maestro de impuestos que corresponde (ventas: `SalesTaxCodes`; compras: `PurchaseTaxCodes`). */
|
||||
export function lineColumnsFor(taxResource: string): readonly GridColumn[] {
|
||||
if (taxResource === 'SalesTaxCodes') return DOCUMENT_LINE_COLUMNS;
|
||||
return DOCUMENT_LINE_COLUMNS.map((c) =>
|
||||
c.key === 'TaxCode' && c.lookup
|
||||
? { ...c, lookup: { ...c.lookup, config: { ...c.lookup.config, resource: taxResource } } }
|
||||
: c,
|
||||
);
|
||||
}
|
||||
|
||||
/** "Catálogo completo": agrega de una vez varios artículos como líneas nuevas. */
|
||||
export const ITEMS_MULTI_ADD: GridMultiAdd = {
|
||||
label: 'Elegir artículos…',
|
||||
|
||||
Reference in new issue
Block a user