fix: add rransaction number in Custoemrs & vendors transactions.

This commit is contained in:
elforjani3
2021-05-08 18:04:33 +02:00
parent b3f9767a2c
commit d96b6e6a7c
4 changed files with 44 additions and 24 deletions

View File

@@ -37,47 +37,56 @@ export const useCustomersTransactionsColumns = () => {
accessor: 'cells[1].value', accessor: 'cells[1].value',
className: 'name', className: 'name',
textOverview: true, textOverview: true,
width: 180, width: 170,
}, },
{ {
Header: formatMessage({ id: 'reference_type' }), Header: formatMessage({ id: 'reference_type' }),
accessor: 'cells[2].value', accessor: 'cells[2].value',
width: 180, width: 120,
textOverview: true, textOverview: true,
}, },
{ {
Header: formatMessage({ id: 'transaction_type' }), Header: formatMessage({ id: 'transaction_type' }),
accessor: 'cells[3].value', 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, textOverview: true,
}, },
{ {
Header: formatMessage({ id: 'credit' }), Header: formatMessage({ id: 'credit' }),
accessor: 'cells[4].value', accessor: 'cells[5].value',
className: 'credit', className: 'credit',
textOverview: true, textOverview: true,
width: getColumnWidth(tableRows, 'credit', { width: getColumnWidth(tableRows, 'cells[5].value', {
minWidth: 140, minWidth: 100,
magicSpacing: 10, magicSpacing: 10,
}), }),
}, },
{ {
Header: formatMessage({ id: 'debit' }), Header: formatMessage({ id: 'debit' }),
accessor: 'cells[5].value', accessor: 'cells[6].value',
className: 'debit', className: 'debit',
textOverview: true, textOverview: true,
width: getColumnWidth(tableRows, 'debit', { width: getColumnWidth(tableRows, 'cells[6].value', {
minWidth: 140, minWidth: 100,
magicSpacing: 10, magicSpacing: 10,
}), }),
}, },
{ {
Header: formatMessage({ id: 'running_balance' }), Header: formatMessage({ id: 'running_balance' }),
accessor: 'cells[6].value', accessor: 'cells[7].value',
className: 'running_balance', className: 'running_balance',
textOverview: true, textOverview: true,
width: getColumnWidth(tableRows, 'running_balance', { width: getColumnWidth(tableRows, 'cells[7].value', {
minWidth: 140, minWidth: 120,
magicSpacing: 10, magicSpacing: 10,
}), }),
}, },

View File

@@ -68,6 +68,7 @@ export function useGeneralLedgerTableColumns() {
accessor: 'formatted_credit', accessor: 'formatted_credit',
className: 'credit', className: 'credit',
width: getColumnWidth(tableRows, 'formatted_credit', { width: getColumnWidth(tableRows, 'formatted_credit', {
minWidth: 100, minWidth: 100,
magicSpacing: 10, magicSpacing: 10,
}), }),

View File

@@ -37,47 +37,56 @@ export const useVendorsTransactionsColumns = () => {
accessor: 'cells[1].value', accessor: 'cells[1].value',
className: 'name', className: 'name',
textOverview: true, textOverview: true,
width: 180, width: 170,
}, },
{ {
Header: formatMessage({ id: 'reference_type' }), Header: formatMessage({ id: 'reference_type' }),
accessor: 'cells[2].value', accessor: 'cells[2].value',
textOverview: true, textOverview: true,
width: 180, width: 120,
}, },
{ {
Header: formatMessage({ id: 'transaction_type' }), Header: formatMessage({ id: 'transaction_type' }),
accessor: 'cells[3].value', accessor: 'cells[3].value',
textOverview: true, 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' }), Header: formatMessage({ id: 'credit' }),
accessor: 'cells[4].value', accessor: 'cells[5].value',
className: 'credit', className: 'credit',
textOverview: true, textOverview: true,
width: getColumnWidth(tableRows, 'credit', { width: getColumnWidth(tableRows, 'cells[5].value', {
minWidth: 140, minWidth: 100,
magicSpacing: 10, magicSpacing: 10,
}), }),
}, },
{ {
Header: formatMessage({ id: 'debit' }), Header: formatMessage({ id: 'debit' }),
accessor: 'cells[5].value', accessor: 'cells[6].value',
className: 'debit', className: 'debit',
textOverview: true, textOverview: true,
width: getColumnWidth(tableRows, 'debit', { width: getColumnWidth(tableRows, 'cells[6].value', {
minWidth: 140, minWidth: 100,
magicSpacing: 10, magicSpacing: 10,
}), }),
}, },
{ {
Header: formatMessage({ id: 'running_balance' }), Header: formatMessage({ id: 'running_balance' }),
accessor: 'cells[6].value', accessor: 'cells[7].value',
className: 'running_balance', className: 'running_balance',
textOverview: true, textOverview: true,
width: getColumnWidth(tableRows, 'running_balance', { width: getColumnWidth(tableRows, 'cells[7].value', {
minWidth: 140, minWidth: 120,
magicSpacing: 10, magicSpacing: 10,
}), }),
}, },

View File

@@ -1063,4 +1063,5 @@ export default {
customers_transactions: 'Customers Transactions', customers_transactions: 'Customers Transactions',
vendors_transactions: 'Vendors Transactions', vendors_transactions: 'Vendors Transactions',
reference_type: 'Reference type', reference_type: 'Reference type',
transaction_number: 'Transaction number',
}; };