@managesome/eposmatic-toolkit 0.2.351 → 0.2.352

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.
@@ -229,11 +229,11 @@ function getReceiptEngineFooterDetails(order, settings) {
229
229
  right,
230
230
  });
231
231
  }
232
- // 16. Card Charges (Non Refundable)
232
+ // 16. Card Charges
233
233
  if (cardCharges > 0) {
234
234
  const right = (0, common_1.localeAmount)(currencySymbol, cardCharges);
235
235
  details.push({
236
- left: 'Card Charges (Non Refundable)',
236
+ left: 'Card Charges',
237
237
  right,
238
238
  });
239
239
  }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const common_order_actions_1 = require("../helpers/store/common-order-actions");
4
+ describe('getOrderWithAllFields', () => {
5
+ it('defaults missing payment total fields to zero', () => {
6
+ const order = (0, common_order_actions_1.getOrderWithAllFields)({});
7
+ expect(order.amount_collected).toBe(0);
8
+ expect(order.amount_earned).toBe(0);
9
+ });
10
+ it('preserves existing payment total fields', () => {
11
+ const order = (0, common_order_actions_1.getOrderWithAllFields)({
12
+ amount_collected: 25,
13
+ amount_earned: 40,
14
+ });
15
+ expect(order.amount_collected).toBe(25);
16
+ expect(order.amount_earned).toBe(40);
17
+ });
18
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@managesome/eposmatic-toolkit",
3
- "version": "0.2.351",
3
+ "version": "0.2.352",
4
4
  "description": "A Toolkit Library for Eposmatic",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",