mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 14:20:31 +00:00
feat: wip sales tax summry report
This commit is contained in:
@@ -81,6 +81,16 @@ const SalesTaxLiabilitySummaryDataTable = styled(ReportDataTable)`
|
|||||||
border-bottom: 3px double #333;
|
border-bottom: 3px double #333;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
&.row_type--TaxRate {
|
||||||
|
.td {
|
||||||
|
&.td-taxPercentage,
|
||||||
|
&.td-taxableAmount,
|
||||||
|
&.td-collectedTax,
|
||||||
|
&.td-taxRate {
|
||||||
|
color: #444;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,16 +11,7 @@ const taxNameAccessor = R.curry((data, column) => ({
|
|||||||
Header: column.label,
|
Header: column.label,
|
||||||
accessor: getTableCellValueAccessor(column.cell_index),
|
accessor: getTableCellValueAccessor(column.cell_index),
|
||||||
sticky: 'left',
|
sticky: 'left',
|
||||||
width: 240,
|
width: 300,
|
||||||
textOverview: true,
|
|
||||||
}));
|
|
||||||
|
|
||||||
const taxCodeAccessor = R.curry((data, column) => ({
|
|
||||||
key: column.key,
|
|
||||||
Header: column.label,
|
|
||||||
accessor: getTableCellValueAccessor(column.cell_index),
|
|
||||||
sticky: 'left',
|
|
||||||
width: 240,
|
|
||||||
textOverview: true,
|
textOverview: true,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
@@ -39,14 +30,14 @@ const taxableAmountAccessor = R.curry((data, column) => {
|
|||||||
|
|
||||||
const dynamicColumnMapper = R.curry((data, column) => {
|
const dynamicColumnMapper = R.curry((data, column) => {
|
||||||
const taxNameAccessorColumn = taxNameAccessor(data);
|
const taxNameAccessorColumn = taxNameAccessor(data);
|
||||||
const taxCodeAccessorColumn = taxCodeAccessor(data);
|
|
||||||
const taxableAmountColumn = taxableAmountAccessor(data);
|
const taxableAmountColumn = taxableAmountAccessor(data);
|
||||||
|
|
||||||
return R.compose(
|
return R.compose(
|
||||||
R.when(R.pathEq(['key'], 'taxName'), taxNameAccessorColumn),
|
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'], 'taxableAmount'), taxableAmountColumn),
|
||||||
R.when(R.pathEq(['key'], 'taxRate'), taxableAmountColumn),
|
R.when(R.pathEq(['key'], 'taxRate'), taxableAmountColumn),
|
||||||
|
R.when(R.pathEq(['key'], 'taxPercentage'), taxableAmountColumn),
|
||||||
|
R.when(R.pathEq(['key'], 'collectedTax'), taxableAmountColumn),
|
||||||
)(column);
|
)(column);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user