diff options
author | Vidhu Kant Sharma <vidhukant@vidhukant.xyz> | 2022-10-16 18:36:17 +0530 |
---|---|---|
committer | Vidhu Kant Sharma <vidhukant@vidhukant.xyz> | 2022-10-16 18:36:17 +0530 |
commit | 1b3702b241f02ab16c3b5366acb47cefbf089521 (patch) | |
tree | a1f107cbf7b8c4f5800d94fc8add8f34d997ca24 /src/classes | |
parent | 5f8407ae4c60922057e2f88f65178773786bddb4 (diff) |
minor bug fixes in ItemPicker input
Diffstat (limited to 'src/classes')
-rw-r--r-- | src/classes/item.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/classes/item.js b/src/classes/item.js index e9e692b..65e8fed 100644 --- a/src/classes/item.js +++ b/src/classes/item.js @@ -24,7 +24,7 @@ export const currency = value => c(value, { decimal: '.', seperator: ',', precision: 2, - symbol: '₹', + symbol: '₹ ', }); export class Item { @@ -74,8 +74,8 @@ export const editItem = (item, ok, fail) => { .catch(err => fail()); } -export const getDiscountValue = (item) => item.DiscountPercentage > 0 - ? currency(item.UnitPrice).multiply(item.Quantity).divide(100) : currency(0.00) +export const getDiscountValue = (item) => + currency(item.UnitPrice).multiply(item.Quantity).divide(100).multiply(item.DiscountPercentage) export const getGSTValue = (item) => item.GSTPercentage > 0 ? currency(item.UnitPrice).multiply(item.Quantity).subtract(getDiscountValue).divide(100).multiply(item.GSTPercentage) : currency(0.00) |