@managesome/eposmatic-toolkit 0.2.628 → 0.2.629

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.
@@ -155,6 +155,7 @@ function renderPostOfflineOrder(body) {
155
155
  grand_total: updatedOrder.grand_total,
156
156
  });
157
157
  updatedOrder.payments = payments;
158
+ updatedOrder.is_unpaid = !mutableData.is_order_fully_paid;
158
159
  updatedOrder.amount_collected = mutableData.amount_collected;
159
160
  // Add card charges to grand total
160
161
  updatedOrder.grand_total += mutableData.new_card_charges;
@@ -244,6 +245,7 @@ function renderUpdateOfflineOrder(body, prev) {
244
245
  // ======>>> Set the updated order <<<=======
245
246
  updatedOrder.iterations = iterations;
246
247
  updatedOrder.payments = payments;
248
+ updatedOrder.is_unpaid = !mutableData.is_order_fully_paid;
247
249
  updatedOrder.amount_collected = mutableData.amount_collected;
248
250
  // Add card charges to grand total
249
251
  updatedOrder.grand_total += mutableData.new_card_charges;
@@ -15434,9 +15434,10 @@ export declare const ORDERS_COLLECTION_INDEXES: {
15434
15434
  is_deleted: number;
15435
15435
  createdAt: number;
15436
15436
  };
15437
- tenant_id__localDate__createdAt__is_unpaid: {
15437
+ tenant_id__localDate__is_deleted__createdAt__is_unpaid: {
15438
15438
  tenant_id: number;
15439
15439
  localDate: number;
15440
+ is_deleted: number;
15440
15441
  createdAt: number;
15441
15442
  is_unpaid: number;
15442
15443
  };
@@ -993,10 +993,11 @@ exports.ORDERS_COLLECTION_INDEXES = {
993
993
  is_deleted: 1,
994
994
  createdAt: -1,
995
995
  }, // partial index (partialFilterExpression: { deferred_settlement: true }) — active open bills per tenant, newest first
996
- tenant_id__localDate__createdAt__is_unpaid: {
996
+ tenant_id__localDate__is_deleted__createdAt__is_unpaid: {
997
997
  tenant_id: 1,
998
998
  localDate: 1,
999
+ is_deleted: 1,
999
1000
  createdAt: -1,
1000
1001
  is_unpaid: 1,
1001
- }, // partial index (partialFilterExpression: { localDate: { $exists: true } }) — per-tenant local-date order lookups, newest first; is_unpaid is non-prefix so queries omitting it can still use the index
1002
+ }, // partial index (partialFilterExpression: { localDate: { $exists: true } }) — per-tenant local-date order lookups filtered by is_deleted, newest first; is_unpaid is non-prefix so queries omitting it can still use the index
1002
1003
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@managesome/eposmatic-toolkit",
3
- "version": "0.2.628",
3
+ "version": "0.2.629",
4
4
  "description": "A Toolkit Library for Eposmatic",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",