@managesome/eposmatic-toolkit 0.2.414 → 0.2.415

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.
@@ -128,11 +128,10 @@ function getReceiptEngineFooterDetails(order, settings) {
128
128
  // Compute the actual GST base (the amount GST was calculated on)
129
129
  let gstBase = price;
130
130
  if (!order.exclude_discount_from_gst) {
131
- gstBase -= orderDiscount;
132
- }
133
- if (order.exclude_discount_from_gst) {
134
- gstBase += itemDiscount;
131
+ // Discount is included in GST base — subtract all applied discounts
132
+ gstBase -= totalDiscount;
135
133
  }
134
+ // When exclude_discount_from_gst is true, GST base stays at the full price
136
135
  if (order.is_surcharge_taxable) {
137
136
  gstBase += order.surcharge_amount ?? 0;
138
137
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@managesome/eposmatic-toolkit",
3
- "version": "0.2.414",
3
+ "version": "0.2.415",
4
4
  "description": "A Toolkit Library for Eposmatic",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",