Skip to content

Commit

Permalink
Hotfix for unit quantity column in Expando rows #6059
Browse files Browse the repository at this point in the history
  • Loading branch information
CarlosNZ committed Jan 16, 2025
1 parent 9b825cd commit 3953898
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
NumberCell,
CurrencyCell,
ColumnDescription,
NumUtils,
} from '@openmsupply-client/common';
import { StockOutLineFragment } from '../../StockOut';
import { StockOutItem } from '../../types';
Expand Down Expand Up @@ -46,7 +47,11 @@ export const useExpansionColumns = (): Column<StockOutLineFragment>[] =>
[
'unitQuantity',
{
accessor: ({ rowData }) => rowData.numberOfPacks,
accessor: ({ rowData }) =>
NumUtils.round(
(rowData.numberOfPacks ?? 0) * (rowData.packSize ?? 1),
3
),
},
],
]);
Expand Down

0 comments on commit 3953898

Please sign in to comment.