fix: items entries total calculation.

This commit is contained in:
a.bouhuolia
2021-08-03 16:04:31 +02:00
parent 0783fb26f2
commit b2c892b649
15 changed files with 222 additions and 175 deletions

View File

@@ -21,7 +21,7 @@ function BillFormHeader({
const { values } = useFormikContext();
// Calculate the total due amount of bill entries.
const totalDueAmount = useMemo(() => sumBy(values.entries, 'total'), [
const totalDueAmount = useMemo(() => sumBy(values.entries, 'amount'), [
values.entries,
]);

View File

@@ -17,6 +17,7 @@ export const defaultBillEntry = {
discount: '',
quantity: '',
description: '',
amount: '',
landed_cost: false,
};