Correcciones solicitadas

This commit is contained in:
carlosfonseca 2024-01-04 13:12:58 -05:00
parent 083094b25d
commit bd8acbe084
5 changed files with 432 additions and 442 deletions

View File

@ -102,76 +102,74 @@ const tableColumnComponents = {
}, },
}; };
const columns = computed(() => { const columns = computed(() => [
return [ {
{ align: 'left',
align: 'left', field: 'clientName',
field: 'clientName', label: t('Client'),
label: t('Client'), name: 'client',
name: 'client', },
}, {
{ align: 'left',
align: 'left', field: 'isWorker',
field: 'isWorker', label: t('Is worker'),
label: t('Is worker'), name: 'isWorker',
name: 'isWorker', },
}, {
{ align: 'left',
align: 'left', field: 'salesPersonName',
field: 'salesPersonName', label: t('Salesperson'),
label: t('Salesperson'), name: 'salesperson',
name: 'salesperson', },
}, {
{ align: 'left',
align: 'left', field: 'country',
field: 'country', label: t('Country'),
label: t('Country'), name: 'country',
name: 'country', },
}, {
{ align: 'left',
align: 'left', field: 'payMethod',
field: 'payMethod', label: t('P. Method'),
label: t('P. Method'), name: 'paymentMethod',
name: 'paymentMethod', },
}, {
{ align: 'left',
align: 'left', field: ({ amount }) => toCurrency(amount),
field: ({ amount }) => toCurrency(amount), label: t('Balance D.'),
label: t('Balance D.'), name: 'balance',
name: 'balance', },
}, {
{ align: 'left',
align: 'left', field: 'workerName',
field: 'workerName', label: t('Author'),
label: t('Author'), name: 'author',
name: 'author', },
}, {
{ align: 'left',
align: 'left', field: 'observation',
field: 'observation', label: t('Last observation'),
label: t('Last observation'), name: 'lastObservation',
name: 'lastObservation', },
}, {
{ align: 'left',
align: 'left', field: ({ created }) => toDate(created),
field: ({ created }) => toDate(created), label: t('L. O. Date'),
label: t('L. O. Date'), name: 'date',
name: 'date', },
}, {
{ align: 'left',
align: 'left', field: ({ creditInsurance }) => toCurrency(creditInsurance),
field: ({ creditInsurance }) => toCurrency(creditInsurance), label: t('Credit I.'),
label: t('Credit I.'), name: 'credit',
name: 'credit', },
}, {
{ align: 'left',
align: 'left', field: ({ defaulterSinced }) => toDate(defaulterSinced),
field: ({ defaulterSinced }) => toDate(defaulterSinced), label: t('From'),
label: t('From'), name: 'from',
name: 'from', },
}, ]);
];
});
const selectCustomerId = (id) => { const selectCustomerId = (id) => {
workerId.value = 0; workerId.value = 0;

View File

@ -262,215 +262,213 @@ const tableColumnComponents = {
}, },
}; };
const columns = computed(() => { const columns = computed(() => [
return [ {
{ align: 'left',
align: 'left', field: '',
field: '', label: '',
label: '', name: 'customerStatus',
name: 'customerStatus', format: () => ' ',
format: () => ' ', },
}, {
{ align: 'left',
align: 'left', field: 'id',
field: 'id', label: t('customer.extendedList.tableVisibleColumns.id'),
label: t('customer.extendedList.tableVisibleColumns.id'), name: 'id',
name: 'id', },
}, {
{ align: 'left',
align: 'left', field: 'name',
field: 'name', label: t('customer.extendedList.tableVisibleColumns.name'),
label: t('customer.extendedList.tableVisibleColumns.name'), name: 'name',
name: 'name', },
}, {
{ align: 'left',
align: 'left', field: 'fi',
field: 'fi', label: t('customer.extendedList.tableVisibleColumns.fi'),
label: t('customer.extendedList.tableVisibleColumns.fi'), name: 'fi',
name: 'fi', },
}, {
{ align: 'left',
align: 'left', field: 'salesPerson',
field: 'salesPerson', label: t('customer.extendedList.tableVisibleColumns.salesPersonFk'),
label: t('customer.extendedList.tableVisibleColumns.salesPersonFk'), name: 'salesPersonFk',
name: 'salesPersonFk', },
}, {
{ align: 'left',
align: 'left', field: 'credit',
field: 'credit', label: t('customer.extendedList.tableVisibleColumns.credit'),
label: t('customer.extendedList.tableVisibleColumns.credit'), name: 'credit',
name: 'credit', },
}, {
{ align: 'left',
align: 'left', field: 'creditInsurance',
field: 'creditInsurance', label: t('customer.extendedList.tableVisibleColumns.creditInsurance'),
label: t('customer.extendedList.tableVisibleColumns.creditInsurance'), name: 'creditInsurance',
name: 'creditInsurance', },
}, {
{ align: 'left',
align: 'left', field: 'phone',
field: 'phone', label: t('customer.extendedList.tableVisibleColumns.phone'),
label: t('customer.extendedList.tableVisibleColumns.phone'), name: 'phone',
name: 'phone', },
}, {
{ align: 'left',
align: 'left', field: 'mobile',
field: 'mobile', label: t('customer.extendedList.tableVisibleColumns.mobile'),
label: t('customer.extendedList.tableVisibleColumns.mobile'), name: 'mobile',
name: 'mobile', },
}, {
{ align: 'left',
align: 'left', field: 'street',
field: 'street', label: t('customer.extendedList.tableVisibleColumns.street'),
label: t('customer.extendedList.tableVisibleColumns.street'), name: 'street',
name: 'street', },
}, {
{ align: 'left',
align: 'left', field: 'country',
field: 'country', label: t('customer.extendedList.tableVisibleColumns.countryFk'),
label: t('customer.extendedList.tableVisibleColumns.countryFk'), name: 'countryFk',
name: 'countryFk', },
}, {
{ align: 'left',
align: 'left', field: 'province',
field: 'province', label: t('customer.extendedList.tableVisibleColumns.provinceFk'),
label: t('customer.extendedList.tableVisibleColumns.provinceFk'), name: 'provinceFk',
name: 'provinceFk', },
}, {
{ align: 'left',
align: 'left', field: 'city',
field: 'city', label: t('customer.extendedList.tableVisibleColumns.city'),
label: t('customer.extendedList.tableVisibleColumns.city'), name: 'city',
name: 'city', },
}, {
{ align: 'left',
align: 'left', field: 'postcode',
field: 'postcode', label: t('customer.extendedList.tableVisibleColumns.postcode'),
label: t('customer.extendedList.tableVisibleColumns.postcode'), name: 'postcode',
name: 'postcode', },
}, {
{ align: 'left',
align: 'left', field: 'email',
field: 'email', label: t('customer.extendedList.tableVisibleColumns.email'),
label: t('customer.extendedList.tableVisibleColumns.email'), name: 'email',
name: 'email', },
}, {
{ align: 'left',
align: 'left', field: 'created',
field: 'created', label: t('customer.extendedList.tableVisibleColumns.created'),
label: t('customer.extendedList.tableVisibleColumns.created'), name: 'created',
name: 'created', format: (value) => toDate(value),
format: (value) => toDate(value), },
}, {
{ align: 'left',
align: 'left', field: 'businessType',
field: 'businessType', label: t('customer.extendedList.tableVisibleColumns.businessTypeFk'),
label: t('customer.extendedList.tableVisibleColumns.businessTypeFk'), name: 'businessTypeFk',
name: 'businessTypeFk', },
}, {
{ align: 'left',
align: 'left', field: 'payMethod',
field: 'payMethod', label: t('customer.extendedList.tableVisibleColumns.payMethodFk'),
label: t('customer.extendedList.tableVisibleColumns.payMethodFk'), name: 'payMethodFk',
name: 'payMethodFk', },
}, {
{ align: 'left',
align: 'left', field: 'sageTaxType',
field: 'sageTaxType', label: t('customer.extendedList.tableVisibleColumns.sageTaxTypeFk'),
label: t('customer.extendedList.tableVisibleColumns.sageTaxTypeFk'), name: 'sageTaxTypeFk',
name: 'sageTaxTypeFk', },
}, {
{ align: 'left',
align: 'left', field: 'sageTransactionType',
field: 'sageTransactionType', label: t('customer.extendedList.tableVisibleColumns.sageTransactionTypeFk'),
label: t('customer.extendedList.tableVisibleColumns.sageTransactionTypeFk'), name: 'sageTransactionTypeFk',
name: 'sageTransactionTypeFk', },
}, {
{ align: 'left',
align: 'left', field: 'isActive',
field: 'isActive', label: t('customer.extendedList.tableVisibleColumns.isActive'),
label: t('customer.extendedList.tableVisibleColumns.isActive'), name: 'isActive',
name: 'isActive', format: () => ' ',
format: () => ' ', },
}, {
{ align: 'left',
align: 'left', field: 'isVies',
field: 'isVies', label: t('customer.extendedList.tableVisibleColumns.isVies'),
label: t('customer.extendedList.tableVisibleColumns.isVies'), name: 'isVies',
name: 'isVies', format: () => ' ',
format: () => ' ', },
}, {
{ align: 'left',
align: 'left', field: 'isTaxDataChecked',
field: 'isTaxDataChecked', label: t('customer.extendedList.tableVisibleColumns.isTaxDataChecked'),
label: t('customer.extendedList.tableVisibleColumns.isTaxDataChecked'), name: 'isTaxDataChecked',
name: 'isTaxDataChecked', format: () => ' ',
format: () => ' ', },
}, {
{ align: 'left',
align: 'left', field: 'isEqualizated',
field: 'isEqualizated', label: t('customer.extendedList.tableVisibleColumns.isEqualizated'),
label: t('customer.extendedList.tableVisibleColumns.isEqualizated'), name: 'isEqualizated',
name: 'isEqualizated', format: () => ' ',
format: () => ' ', },
}, {
{ align: 'left',
align: 'left', field: 'isFreezed',
field: 'isFreezed', label: t('customer.extendedList.tableVisibleColumns.isFreezed'),
label: t('customer.extendedList.tableVisibleColumns.isFreezed'), name: 'isFreezed',
name: 'isFreezed', format: () => ' ',
format: () => ' ', },
}, {
{ align: 'left',
align: 'left', field: 'hasToInvoice',
field: 'hasToInvoice', label: t('customer.extendedList.tableVisibleColumns.hasToInvoice'),
label: t('customer.extendedList.tableVisibleColumns.hasToInvoice'), name: 'hasToInvoice',
name: 'hasToInvoice', format: () => ' ',
format: () => ' ', },
}, {
{ align: 'left',
align: 'left', field: 'hasToInvoiceByAddress',
field: 'hasToInvoiceByAddress', label: t('customer.extendedList.tableVisibleColumns.hasToInvoiceByAddress'),
label: t('customer.extendedList.tableVisibleColumns.hasToInvoiceByAddress'), name: 'hasToInvoiceByAddress',
name: 'hasToInvoiceByAddress', format: () => ' ',
format: () => ' ', },
}, {
{ align: 'left',
align: 'left', field: 'isToBeMailed',
field: 'isToBeMailed', label: t('customer.extendedList.tableVisibleColumns.isToBeMailed'),
label: t('customer.extendedList.tableVisibleColumns.isToBeMailed'), name: 'isToBeMailed',
name: 'isToBeMailed', format: () => ' ',
format: () => ' ', },
}, {
{ align: 'left',
align: 'left', field: 'hasLcr',
field: 'hasLcr', label: t('customer.extendedList.tableVisibleColumns.hasLcr'),
label: t('customer.extendedList.tableVisibleColumns.hasLcr'), name: 'hasLcr',
name: 'hasLcr', format: () => ' ',
format: () => ' ', },
}, {
{ align: 'left',
align: 'left', field: 'hasCoreVnl',
field: 'hasCoreVnl', label: t('customer.extendedList.tableVisibleColumns.hasCoreVnl'),
label: t('customer.extendedList.tableVisibleColumns.hasCoreVnl'), name: 'hasCoreVnl',
name: 'hasCoreVnl', format: () => ' ',
format: () => ' ', },
}, {
{ align: 'left',
align: 'left', field: 'hasSepaVnl',
field: 'hasSepaVnl', label: t('customer.extendedList.tableVisibleColumns.hasSepaVnl'),
label: t('customer.extendedList.tableVisibleColumns.hasSepaVnl'), name: 'hasSepaVnl',
name: 'hasSepaVnl', format: () => ' ',
format: () => ' ', },
}, {
{ align: 'right',
align: 'right', field: 'actions',
field: 'actions', label: '',
label: '', name: 'actions',
name: 'actions', },
}, ]);
];
});
const stopEventPropagation = (event, col) => { const stopEventPropagation = (event, col) => {
if (!['id', 'salesPersonFk'].includes(col.name)) return; if (!['id', 'salesPersonFk'].includes(col.name)) return;

View File

@ -57,40 +57,38 @@ const tableColumnComponents = {
}, },
}; };
const columns = computed(() => { const columns = computed(() => [
return [ {
{ align: 'left',
align: 'left', field: 'id',
field: 'id', label: t('Identifier'),
label: t('Identifier'), name: 'id',
name: 'id', },
}, {
{ align: 'left',
align: 'left', field: 'socialName',
field: 'socialName', label: t('Social name'),
label: t('Social name'), name: 'socialName',
name: 'socialName', },
}, {
{ align: 'left',
align: 'left', field: 'city',
field: 'city', label: t('City'),
label: t('City'), name: 'city',
name: 'city', },
}, {
{ align: 'left',
align: 'left', field: 'phone',
field: 'phone', label: t('Phone'),
label: t('Phone'), name: 'phone',
name: 'phone', },
}, {
{ align: 'left',
align: 'left', field: 'email',
field: 'email', label: t('Email'),
label: t('Email'), name: 'email',
name: 'email', },
}, ]);
];
});
const selectCustomerId = (id) => { const selectCustomerId = (id) => {
selectedCustomerId.value = id; selectedCustomerId.value = id;

View File

@ -49,30 +49,28 @@ const tableColumnComponents = {
}, },
}; };
const columns = computed(() => { const columns = computed(() => [
return [ { label: 'Id', field: 'clientId', name: 'clientId', align: 'left' },
{ label: 'Id', field: 'clientId', name: 'clientId', align: 'left' }, {
{ label: t('invoiceOut.globalInvoices.table.client'),
label: t('invoiceOut.globalInvoices.table.client'), field: 'clientName',
field: 'clientName', name: 'clientName',
name: 'clientName', align: 'left',
align: 'left', },
}, {
{ label: t('invoiceOut.globalInvoices.table.addressId'),
label: t('invoiceOut.globalInvoices.table.addressId'), field: 'id',
field: 'id', name: 'id',
name: 'id', align: 'left',
align: 'left', },
}, {
{ label: t('invoiceOut.globalInvoices.table.streetAddress'),
label: t('invoiceOut.globalInvoices.table.streetAddress'), field: 'nickname',
field: 'nickname', name: 'nickname',
name: 'nickname', align: 'left',
align: 'left', },
}, { label: 'Error', field: 'message', name: 'message', align: 'left' },
{ label: 'Error', field: 'message', name: 'message', align: 'left' }, ]);
];
});
const rows = computed(() => { const rows = computed(() => {
if (!errors && !errors.length > 0) return []; if (!errors && !errors.length > 0) return [];

View File

@ -103,111 +103,109 @@ const tableColumnComponents = {
}, },
}; };
const columns = computed(() => { const columns = computed(() => [
return [ {
{ label: 'id',
label: 'id', field: 'id',
field: 'id', name: 'id',
name: 'id', align: 'left',
align: 'left', showValue: true,
showValue: true, },
}, {
{ label: t('supplier.pageTitles.supplier'),
label: t('supplier.pageTitles.supplier'), field: 'cargoSupplierNickname',
field: 'cargoSupplierNickname', name: 'cargoSupplierNickname',
name: 'cargoSupplierNickname', align: 'left',
align: 'left', showValue: true,
showValue: true, },
}, {
{ label: t('globals.agency'),
label: t('globals.agency'), field: 'agencyModeName',
field: 'agencyModeName', name: 'agencyModeName',
name: 'agencyModeName', align: 'left',
align: 'left', showValue: true,
showValue: true, },
}, {
{ label: t('globals.amount'),
label: t('globals.amount'), name: 'invoiceAmount',
name: 'invoiceAmount', field: 'entries',
field: 'entries', align: 'left',
align: 'left', showValue: true,
showValue: true, format: (value) =>
format: (value) => toCurrency(
toCurrency( value
value ? value.reduce((sum, entry) => {
? value.reduce((sum, entry) => { return sum + (entry.invoiceAmount || 0);
return sum + (entry.invoiceAmount || 0); }, 0)
}, 0) : 0
: 0 ),
), },
}, {
{ label: t('globals.reference'),
label: t('globals.reference'), field: 'ref',
field: 'ref', name: 'ref',
name: 'ref', align: 'left',
align: 'left', showValue: false,
showValue: false, },
}, {
{ label: t('globals.packages'),
label: t('globals.packages'), field: 'stickers',
field: 'stickers', name: 'stickers',
name: 'stickers', align: 'left',
align: 'left', showValue: true,
showValue: true, },
}, {
{ label: t('kg'),
label: t('kg'), field: 'kg',
field: 'kg', name: 'kg',
name: 'kg', align: 'left',
align: 'left', showValue: true,
showValue: true, },
}, {
{ label: t('physicKg'),
label: t('physicKg'), field: 'loadedKg',
field: 'loadedKg', name: 'loadedKg',
name: 'loadedKg', align: 'left',
align: 'left', showValue: true,
showValue: true, },
}, {
{ label: 'KG Vol.',
label: 'KG Vol.', field: 'volumeKg',
field: 'volumeKg', name: 'volumeKg',
name: 'volumeKg', align: 'left',
align: 'left', showValue: true,
showValue: true, },
}, {
{ label: t('globals.wareHouseOut'),
label: t('globals.wareHouseOut'), field: 'warehouseOutName',
field: 'warehouseOutName', name: 'warehouseOutName',
name: 'warehouseOutName', align: 'left',
align: 'left', showValue: true,
showValue: true, },
}, {
{ label: t('shipped'),
label: t('shipped'), field: 'shipped',
field: 'shipped', name: 'shipped',
name: 'shipped', align: 'left',
align: 'left', format: (value) => toDate(value.substring(0, 10)),
format: (value) => toDate(value.substring(0, 10)), showValue: true,
showValue: true, },
}, {
{ label: t('globals.wareHouseIn'),
label: t('globals.wareHouseIn'), field: 'warehouseInName',
field: 'warehouseInName', name: 'warehouseInName',
name: 'warehouseInName', align: 'left',
align: 'left', showValue: true,
showValue: true, },
}, {
{ label: t('landed'),
label: t('landed'), field: 'landed',
field: 'landed', name: 'landed',
name: 'landed', align: 'left',
align: 'left', format: (value) => toDate(value.substring(0, 10)),
format: (value) => toDate(value.substring(0, 10)), showValue: true,
showValue: true, },
}, ]);
];
});
async function getData() { async function getData() {
await arrayData.fetch({ append: false }); await arrayData.fetch({ append: false });