feat(web): cada documento de ventas y compras puede elegir sus columnas de línea y su cabecera
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c5368c7ad0
commit
1f212e2b30
5 files changed
+91
-14
No files matched your search
@@ -2,7 +2,8 @@ import { MENU } from '@basic-erp/sap-types';
|
||||
import { formatNumber } from '../../core/format';
|
||||
import type { ListFilter } from '../../core/sl/list-filters';
|
||||
import type { ListColumn, ListRow, Tone } from '../../shared/list/list.types';
|
||||
import { type DocumentLayout, FIELDS, type HeaderField, marketingLayout } from './document-layouts';
|
||||
import type { GridColumn } from '../../shared/grid/grid.types';
|
||||
import { type DocumentLayout, FIELDS, type FieldColumns, type HeaderField, marketingLayout } from './document-layouts';
|
||||
|
||||
/** Pantalla de un documento: lista de los últimos ingresados + formulario (nuevo / ver-editar). */
|
||||
export interface DocumentScreen {
|
||||
@@ -113,6 +114,10 @@ export interface MarketingExtras {
|
||||
columns?: readonly ListColumn[];
|
||||
headerLeft?: readonly HeaderField[];
|
||||
headerRight?: readonly HeaderField[];
|
||||
/** Cabecera completa (reemplaza a la base). */
|
||||
header?: FieldColumns;
|
||||
/** Columnas de línea de este documento (de `LINE_COLUMNS`); sin ellas, todas. */
|
||||
lineColumns?: readonly GridColumn[];
|
||||
}
|
||||
|
||||
/** Documentos tributarios: la cabecera suma el folio (en el Service Layer `FolioPrefixString` y `FolioNumber`). */
|
||||
@@ -127,7 +132,14 @@ export const marketing = (
|
||||
extras: MarketingExtras = {},
|
||||
): DocumentScreen => ({
|
||||
path,
|
||||
layout: marketingLayout({ partnerLabel: partner, taxResource: 'SalesTaxCodes', left: extras.headerLeft, right: extras.headerRight }),
|
||||
layout: marketingLayout({
|
||||
partnerLabel: partner,
|
||||
taxResource: 'SalesTaxCodes',
|
||||
left: extras.headerLeft,
|
||||
right: extras.headerRight,
|
||||
header: extras.header,
|
||||
lineColumns: extras.lineColumns,
|
||||
}),
|
||||
resource,
|
||||
createLabel,
|
||||
orderby: 'DocEntry desc',
|
||||
|
||||
Reference in new issue
Block a user