diff options
author | MikunoNaka <bokuwakanojogahoshii@yahoo.com> | 2021-06-27 13:27:33 +0530 |
---|---|---|
committer | MikunoNaka <bokuwakanojogahoshii@yahoo.com> | 2021-06-27 13:27:33 +0530 |
commit | 240d7d56459c656c86330755c7a0b9000a090f77 (patch) | |
tree | c6d1215a1237985e940eaffd2718d603aa0c74a5 /src/components/Form/Items | |
parent | 33a344feca3de8b25988932fd0039d14c363b5cd (diff) |
Bug Fix: Discount not being calculated for every item but only one
Diffstat (limited to 'src/components/Form/Items')
-rw-r--r-- | src/components/Form/Items/AddNewItemForm.tsx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/components/Form/Items/AddNewItemForm.tsx b/src/components/Form/Items/AddNewItemForm.tsx index 2c4669d..3d4e65f 100644 --- a/src/components/Form/Items/AddNewItemForm.tsx +++ b/src/components/Form/Items/AddNewItemForm.tsx @@ -70,7 +70,7 @@ const AddNewItemForm: React.FC<props> = (props) => { const totalValue: number = itemPriceValue * itemQTYValue; // the values below are being rounded to two decimal places - const discountValue: number = parseFloat(((itemDiscountPercentage / 100) * itemPriceValue).toFixed(2)) + const discountValue: number = parseFloat(((itemDiscountPercentage / 100) * totalValue).toFixed(2)) const totalGSTValue: number = parseFloat(((itemGSTPercentage / 100) * totalValue).toFixed(2)) const newInvoiceItem: Item = { |