feat(web): maestros de clientes, proveedores y artículos (lista, formulario con pestañas, extensiones por cliente)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b759c7bce7
commit
9f003ee4bf
30 files changed
+1553
-23
No files matched your search
@@ -0,0 +1,44 @@
|
||||
import type { ListColumn } from '../../shared/list/list.types';
|
||||
import type { VhLookup } from '../../shared/value-help/value-help.types';
|
||||
|
||||
const col = (key: string, title: string, extra: Partial<ListColumn> = {}): ListColumn => ({ key, title, ...extra });
|
||||
|
||||
/** Ventanas de selección de los campos de código de los maestros. */
|
||||
export const MASTER_LOOKUPS = {
|
||||
/** Grupo de clientes o de proveedores. */
|
||||
partnerGroup: (type: 'cCustomer' | 'cSupplier'): VhLookup => ({
|
||||
title: type === 'cSupplier' ? 'Grupos de proveedores' : 'Grupos de clientes',
|
||||
resource: 'BusinessPartnerGroups',
|
||||
orderby: 'Code',
|
||||
baseFilter: `Type eq '${type === 'cSupplier' ? 'bbpgt_VendorGroup' : 'bbpgt_CustomerGroup'}'`,
|
||||
valueType: 'number',
|
||||
columns: [col('Code', 'Código', { width: '90px', mono: true }), col('Name', 'Nombre')],
|
||||
}),
|
||||
currency: {
|
||||
title: 'Monedas',
|
||||
resource: 'Currencies',
|
||||
orderby: 'Code',
|
||||
columns: [col('Code', 'Código', { width: '90px', mono: true }), col('Name', 'Nombre')],
|
||||
} satisfies VhLookup,
|
||||
paymentTerms: {
|
||||
title: 'Condiciones de pago',
|
||||
resource: 'PaymentTermsTypes',
|
||||
orderby: 'GroupNumber',
|
||||
valueType: 'number',
|
||||
columns: [col('GroupNumber', 'Código', { width: '90px', mono: true }), col('PaymentTermsGroupName', 'Nombre')],
|
||||
} satisfies VhLookup,
|
||||
priceList: {
|
||||
title: 'Listas de precios',
|
||||
resource: 'PriceLists',
|
||||
orderby: 'PriceListNo',
|
||||
valueType: 'number',
|
||||
columns: [col('PriceListNo', 'Código', { width: '90px', mono: true }), col('PriceListName', 'Nombre')],
|
||||
} satisfies VhLookup,
|
||||
itemGroup: {
|
||||
title: 'Grupos de artículos',
|
||||
resource: 'ItemGroups',
|
||||
orderby: 'Number',
|
||||
valueType: 'number',
|
||||
columns: [col('Number', 'Código', { width: '90px', mono: true }), col('GroupName', 'Nombre')],
|
||||
} satisfies VhLookup,
|
||||
} as const;
|
||||
Reference in new issue
Block a user