From d96b6e6a7c46e57854aad3c9ec254471d2d18084 Mon Sep 17 00:00:00 2001 From: elforjani3 Date: Sat, 8 May 2021 18:04:33 +0200 Subject: [PATCH] fix: add rransaction number in Custoemrs & vendors transactions. --- .../CustomersTransactions/components.js | 33 ++++++++++++------- .../GeneralLedger/components.js | 1 + .../VendorsTransactions/components.js | 33 ++++++++++++------- client/src/lang/en/index.js | 1 + 4 files changed, 44 insertions(+), 24 deletions(-) diff --git a/client/src/containers/FinancialStatements/CustomersTransactions/components.js b/client/src/containers/FinancialStatements/CustomersTransactions/components.js index f34200bcd..d0cb35fe8 100644 --- a/client/src/containers/FinancialStatements/CustomersTransactions/components.js +++ b/client/src/containers/FinancialStatements/CustomersTransactions/components.js @@ -37,47 +37,56 @@ export const useCustomersTransactionsColumns = () => { accessor: 'cells[1].value', className: 'name', textOverview: true, - width: 180, + width: 170, }, { Header: formatMessage({ id: 'reference_type' }), accessor: 'cells[2].value', - width: 180, + width: 120, textOverview: true, }, { Header: formatMessage({ id: 'transaction_type' }), accessor: 'cells[3].value', - width: 180, + width: 120, + textOverview: true, + }, + { + Header: formatMessage({ id: 'transaction_number' }), + accessor: 'cells[4].value', + width: getColumnWidth(tableRows, 'cells[4].value', { + minWidth: 140, + magicSpacing: 10, + }), textOverview: true, }, { Header: formatMessage({ id: 'credit' }), - accessor: 'cells[4].value', + accessor: 'cells[5].value', className: 'credit', textOverview: true, - width: getColumnWidth(tableRows, 'credit', { - minWidth: 140, + width: getColumnWidth(tableRows, 'cells[5].value', { + minWidth: 100, magicSpacing: 10, }), }, { Header: formatMessage({ id: 'debit' }), - accessor: 'cells[5].value', + accessor: 'cells[6].value', className: 'debit', textOverview: true, - width: getColumnWidth(tableRows, 'debit', { - minWidth: 140, + width: getColumnWidth(tableRows, 'cells[6].value', { + minWidth: 100, magicSpacing: 10, }), }, { Header: formatMessage({ id: 'running_balance' }), - accessor: 'cells[6].value', + accessor: 'cells[7].value', className: 'running_balance', textOverview: true, - width: getColumnWidth(tableRows, 'running_balance', { - minWidth: 140, + width: getColumnWidth(tableRows, 'cells[7].value', { + minWidth: 120, magicSpacing: 10, }), }, diff --git a/client/src/containers/FinancialStatements/GeneralLedger/components.js b/client/src/containers/FinancialStatements/GeneralLedger/components.js index 4c92c1571..270d0f1e2 100644 --- a/client/src/containers/FinancialStatements/GeneralLedger/components.js +++ b/client/src/containers/FinancialStatements/GeneralLedger/components.js @@ -68,6 +68,7 @@ export function useGeneralLedgerTableColumns() { accessor: 'formatted_credit', className: 'credit', width: getColumnWidth(tableRows, 'formatted_credit', { + minWidth: 100, magicSpacing: 10, }), diff --git a/client/src/containers/FinancialStatements/VendorsTransactions/components.js b/client/src/containers/FinancialStatements/VendorsTransactions/components.js index 29b5438f6..d6c4ea071 100644 --- a/client/src/containers/FinancialStatements/VendorsTransactions/components.js +++ b/client/src/containers/FinancialStatements/VendorsTransactions/components.js @@ -37,47 +37,56 @@ export const useVendorsTransactionsColumns = () => { accessor: 'cells[1].value', className: 'name', textOverview: true, - width: 180, + width: 170, }, { Header: formatMessage({ id: 'reference_type' }), accessor: 'cells[2].value', textOverview: true, - width: 180, + width: 120, }, { Header: formatMessage({ id: 'transaction_type' }), accessor: 'cells[3].value', textOverview: true, - width: 180, + width: 120, + }, + { + Header: formatMessage({ id: 'transaction_number' }), + accessor: 'cells[4].value', + width: getColumnWidth(tableRows, 'cells[4].value', { + minWidth: 140, + magicSpacing: 10, + }), + textOverview: true, }, { Header: formatMessage({ id: 'credit' }), - accessor: 'cells[4].value', + accessor: 'cells[5].value', className: 'credit', textOverview: true, - width: getColumnWidth(tableRows, 'credit', { - minWidth: 140, + width: getColumnWidth(tableRows, 'cells[5].value', { + minWidth: 100, magicSpacing: 10, }), }, { Header: formatMessage({ id: 'debit' }), - accessor: 'cells[5].value', + accessor: 'cells[6].value', className: 'debit', textOverview: true, - width: getColumnWidth(tableRows, 'debit', { - minWidth: 140, + width: getColumnWidth(tableRows, 'cells[6].value', { + minWidth: 100, magicSpacing: 10, }), }, { Header: formatMessage({ id: 'running_balance' }), - accessor: 'cells[6].value', + accessor: 'cells[7].value', className: 'running_balance', textOverview: true, - width: getColumnWidth(tableRows, 'running_balance', { - minWidth: 140, + width: getColumnWidth(tableRows, 'cells[7].value', { + minWidth: 120, magicSpacing: 10, }), }, diff --git a/client/src/lang/en/index.js b/client/src/lang/en/index.js index 111799880..987743345 100644 --- a/client/src/lang/en/index.js +++ b/client/src/lang/en/index.js @@ -1063,4 +1063,5 @@ export default { customers_transactions: 'Customers Transactions', vendors_transactions: 'Vendors Transactions', reference_type: 'Reference type', + transaction_number: 'Transaction number', };