From b49b45fb4341d2da9332dc5ea299895ec9162cc1 Mon Sep 17 00:00:00 2001 From: Ahmed Bouhuolia Date: Sat, 2 Sep 2023 01:52:07 +0200 Subject: [PATCH] feat: wip sales tax summry report --- .../SalesTaxLiabilitySummaryTable.tsx | 10 ++++++++++ .../SalesTaxLiabilitySummary/dynamicColumns.ts | 15 +++------------ 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/packages/webapp/src/containers/FinancialStatements/SalesTaxLiabilitySummary/SalesTaxLiabilitySummaryTable.tsx b/packages/webapp/src/containers/FinancialStatements/SalesTaxLiabilitySummary/SalesTaxLiabilitySummaryTable.tsx index 60b102354..9f1a0ec1d 100644 --- a/packages/webapp/src/containers/FinancialStatements/SalesTaxLiabilitySummary/SalesTaxLiabilitySummaryTable.tsx +++ b/packages/webapp/src/containers/FinancialStatements/SalesTaxLiabilitySummary/SalesTaxLiabilitySummaryTable.tsx @@ -81,6 +81,16 @@ const SalesTaxLiabilitySummaryDataTable = styled(ReportDataTable)` border-bottom: 3px double #333; } } + &.row_type--TaxRate { + .td { + &.td-taxPercentage, + &.td-taxableAmount, + &.td-collectedTax, + &.td-taxRate { + color: #444; + } + } + } } } } diff --git a/packages/webapp/src/containers/FinancialStatements/SalesTaxLiabilitySummary/dynamicColumns.ts b/packages/webapp/src/containers/FinancialStatements/SalesTaxLiabilitySummary/dynamicColumns.ts index 54caae5fd..e716470d3 100644 --- a/packages/webapp/src/containers/FinancialStatements/SalesTaxLiabilitySummary/dynamicColumns.ts +++ b/packages/webapp/src/containers/FinancialStatements/SalesTaxLiabilitySummary/dynamicColumns.ts @@ -11,16 +11,7 @@ const taxNameAccessor = R.curry((data, column) => ({ Header: column.label, accessor: getTableCellValueAccessor(column.cell_index), sticky: 'left', - width: 240, - textOverview: true, -})); - -const taxCodeAccessor = R.curry((data, column) => ({ - key: column.key, - Header: column.label, - accessor: getTableCellValueAccessor(column.cell_index), - sticky: 'left', - width: 240, + width: 300, textOverview: true, })); @@ -39,14 +30,14 @@ const taxableAmountAccessor = R.curry((data, column) => { const dynamicColumnMapper = R.curry((data, column) => { const taxNameAccessorColumn = taxNameAccessor(data); - const taxCodeAccessorColumn = taxCodeAccessor(data); const taxableAmountColumn = taxableAmountAccessor(data); return R.compose( R.when(R.pathEq(['key'], 'taxName'), taxNameAccessorColumn), - R.when(R.pathEq(['key'], 'taxCode'), taxCodeAccessorColumn), R.when(R.pathEq(['key'], 'taxableAmount'), taxableAmountColumn), R.when(R.pathEq(['key'], 'taxRate'), taxableAmountColumn), + R.when(R.pathEq(['key'], 'taxPercentage'), taxableAmountColumn), + R.when(R.pathEq(['key'], 'collectedTax'), taxableAmountColumn), )(column); });