feat(web): las listas de documentos de ventas y compras muestran el tipo (Artículo / Servicio) y lo ofrecen como filtro
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
773dd7ff6a
commit
80a65cbc62
1 file changed
+18
-1
@@ -107,6 +107,22 @@ export const statusFilter: ListFilter = {
|
|||||||
{ value: 'bost_Close', label: 'Cerrado' },
|
{ value: 'bost_Close', label: 'Cerrado' },
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
/** Tipo del documento: de artículos o de servicio (`DocType`). */
|
||||||
|
export const docTypeColumn: ListColumn = {
|
||||||
|
key: 'DocType',
|
||||||
|
title: 'Tipo',
|
||||||
|
width: '90px',
|
||||||
|
format: (r) => (r['DocType'] === 'dDocument_Service' ? 'Servicio' : r['DocType'] === 'dDocument_Items' ? 'Artículo' : ''),
|
||||||
|
};
|
||||||
|
export const docTypeFilter: ListFilter = {
|
||||||
|
type: 'select',
|
||||||
|
key: 'DocType',
|
||||||
|
label: 'Tipo',
|
||||||
|
options: [
|
||||||
|
{ value: 'dDocument_Items', label: 'Artículo' },
|
||||||
|
{ value: 'dDocument_Service', label: 'Servicio' },
|
||||||
|
],
|
||||||
|
};
|
||||||
export const dateFilter: ListFilter = { type: 'date', key: 'DocDate', label: 'Fecha contab.' };
|
export const dateFilter: ListFilter = { type: 'date', key: 'DocDate', label: 'Fecha contab.' };
|
||||||
export const currencyFilter: ListFilter = {
|
export const currencyFilter: ListFilter = {
|
||||||
type: 'multi',
|
type: 'multi',
|
||||||
@@ -168,6 +184,7 @@ export const marketing = (
|
|||||||
columns: [
|
columns: [
|
||||||
docNum,
|
docNum,
|
||||||
statusColumn,
|
statusColumn,
|
||||||
|
docTypeColumn,
|
||||||
...(extras.columns ?? []),
|
...(extras.columns ?? []),
|
||||||
{ key: 'CardCode', title: partner, width: '130px', mono: true, searchable: true },
|
{ key: 'CardCode', title: partner, width: '130px', mono: true, searchable: true },
|
||||||
{ key: 'CardName', title: 'Nombre' },
|
{ key: 'CardName', title: 'Nombre' },
|
||||||
@@ -175,7 +192,7 @@ export const marketing = (
|
|||||||
{ key: 'DocDueDate', title: 'Fecha venc.', type: 'date', align: 'center', width: '115px' },
|
{ key: 'DocDueDate', title: 'Fecha venc.', type: 'date', align: 'center', width: '115px' },
|
||||||
{ key: 'DocTotal', title: 'Total', align: 'right', width: '140px', format: documentTotal },
|
{ key: 'DocTotal', title: 'Total', align: 'right', width: '140px', format: documentTotal },
|
||||||
],
|
],
|
||||||
filters: [statusFilter, currencyFilter, dateFilter],
|
filters: [statusFilter, docTypeFilter, currencyFilter, dateFilter],
|
||||||
});
|
});
|
||||||
|
|
||||||
export const inventory = (
|
export const inventory = (
|
||||||
|
|||||||
Reference in new issue
Block a user