fix: opening quantity & cost & date

This commit is contained in:
elforjani3
2020-12-26 23:09:48 +02:00
parent af96d4bde4
commit 085545c039
7 changed files with 112 additions and 45 deletions

View File

@@ -124,6 +124,14 @@ function ItemsDataTable({
],
);
const quantityonHandCell = ({ value: quantity }) => {
return quantity <= 0 ? (
<span className={'quantity_on_hand'}>{quantity}</span>
) : (
<span>{quantity}</span>
);
};
const handleRowContextMenu = useCallback(
(cell) => {
return actionMenuList(cell.row.original);
@@ -189,13 +197,7 @@ function ItemsDataTable({
{
Header: formatMessage({ id: 'quantity_on_hand' }),
accessor: 'quantity_on_hand',
className: 'quantity_on_hand',
width: 140,
},
{
Header: formatMessage({ id: 'average_rate' }),
accessor: 'average_cost_rate',
className: 'average_cost_rate',
Cell: quantityonHandCell,
width: 140,
},
{