shareneus 1.4.14 → 1.4.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -212,7 +212,12 @@ class InvPrintService {
212
212
  }
213
213
  else {
214
214
  Labor.DiscPerc = Labor.Perc;
215
- Labor.DiscPerc = (0, aggregation_1.division)((0, aggregation_1.multiply)(100, Labor.Disc), Labor.UnPr);
215
+ if (!tr_utils_1.TrUtils.IsZero(Number(Labor.UnPr))) {
216
+ Labor.DiscPerc = (0, aggregation_1.division)((0, aggregation_1.multiply)(100, Labor.Disc), Labor.UnPr);
217
+ }
218
+ else {
219
+ Labor.DiscPerc = 0;
220
+ }
216
221
  }
217
222
  Labor.CGSTAmt = tr_utils_1.TrUtils.FixPriceValue(Labor.CGST);
218
223
  Labor.SGSTAmt = tr_utils_1.TrUtils.FixPriceValue(Labor.SGST);
@@ -258,7 +263,12 @@ class InvPrintService {
258
263
  }
259
264
  else {
260
265
  Item.DiscPerc = Item.Perc;
261
- Item.DiscPerc = (0, aggregation_1.division)((0, aggregation_1.multiply)(100, Item.Disc), Item.UnPr);
266
+ if (!tr_utils_1.TrUtils.IsZero(Number(Item.UnPr))) {
267
+ Item.DiscPerc = (0, aggregation_1.division)((0, aggregation_1.multiply)(100, Item.Disc), Item.UnPr);
268
+ }
269
+ else {
270
+ Item.DiscPerc = 0;
271
+ }
262
272
  }
263
273
  Item.CGSTPerc = shared_print_service_1.PrintSharedService.GetCGSTValueBasedOnTaxCode(Item.TCode, TaxCodes);
264
274
  Item.SGSTPerc = shared_print_service_1.PrintSharedService.GetSGSTValueBasedOnTaxCode(Item.TCode, TaxCodes);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shareneus",
3
- "version": "1.4.14",
3
+ "version": "1.4.16",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",