From 1b3702b241f02ab16c3b5366acb47cefbf089521 Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Sun, 16 Oct 2022 18:36:17 +0530 Subject: minor bug fixes in ItemPicker input --- src/classes/item.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/classes') 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) -- cgit v1.2.3