Skip to content

Commit c694f1e

Browse files
committed
Don't round displayed issued quantity
1 parent 53c6b07 commit c694f1e

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

client/packages/invoices/src/Prescriptions/LineEditView/PrescriptionLineEditForm.tsx

+2-4
Original file line numberDiff line numberDiff line change
@@ -222,9 +222,7 @@ export const PrescriptionLineEditForm: React.FC<
222222
setPrescribedQuantity(newPrescribedQuantity);
223223
}
224224

225-
const newIssueQuantity = Math.round(
226-
allocatedUnits / Math.abs(Number(packSizeController.selected?.value || 1))
227-
);
225+
const newIssueQuantity = NumUtils.round(allocatedUnits / Math.abs(Number(packSizeController.selected?.value || 1)), 2);
228226
if (newIssueQuantity !== issueUnitQuantity)
229227
setIssueUnitQuantity(newIssueQuantity);
230228
setAllocationAlerts([]);
@@ -559,7 +557,7 @@ const summarise = (
559557
} else {
560558
counts[packSize] = {
561559
unitName: (stockLine?.item as ItemNode)?.unitName ?? 'unit',
562-
count: NumUtils.round(packSize * numberOfPacks),
560+
count: NumUtils.round(packSize * numberOfPacks, 2),
563561
};
564562
}
565563
});

0 commit comments

Comments
 (0)