@managesome/eposmatic-toolkit 0.2.308 → 0.2.309

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.
@@ -27,7 +27,7 @@ function getWarehouseReceiptEngineFooterDetails(order, settings) {
27
27
  }
28
28
  if (order.gst && !settings.hide_gst_value) {
29
29
  if (order.is_gst_inclusive) {
30
- const right = (0, common_1.localeAmount)(currencySymbol, (order.grand_total ?? 0) - (order.gst_amount ?? 0));
30
+ const right = (0, common_1.localeAmount)(currencySymbol, Math.max(0, (order.grand_total ?? 0) - (order.gst_amount ?? 0)));
31
31
  details.push({
32
32
  left: `Total before ${settings.gstName}`,
33
33
  right,
@@ -125,7 +125,7 @@ function getReceiptEngineFooterDetails(order, settings) {
125
125
  }
126
126
  // 7. GST (Total before GST and GST amount)
127
127
  if (order.gst && !settings.hide_gst_value && order.is_gst_inclusive) {
128
- const right = (0, common_1.localeAmount)(currencySymbol, (order.grand_total ?? 0) - (order.gst_amount ?? 0));
128
+ const right = (0, common_1.localeAmount)(currencySymbol, Math.max(0, (order.grand_total ?? 0) - (order.gst_amount ?? 0)));
129
129
  details.push({
130
130
  left: `Total before ${settings.gstName}`,
131
131
  right,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@managesome/eposmatic-toolkit",
3
- "version": "0.2.308",
3
+ "version": "0.2.309",
4
4
  "description": "A Toolkit Library for Eposmatic",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",