@zeniai/client-epic-state 4.8.41 → 4.8.43

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.
@@ -67,7 +67,7 @@ const mapJEScheduleLocalDataToScheduleDetailPayload = (jeScheduleDetails, jeSche
67
67
  exports.mapJEScheduleLocalDataToScheduleDetailPayload = mapJEScheduleLocalDataToScheduleDetailPayload;
68
68
  const mapJEScheduleTransactionToPayload = (jeScheduleTransactionState, vendorState, scheduleDetailsLocalData, jeScheduleType) => {
69
69
  var _a, _b;
70
- const { vendor, currencyCode, currencySymbol, baseTransaction, status, startDate, endDate, } = jeScheduleTransactionState;
70
+ const { vendor, currencyCode, currencySymbol, baseTransaction, status, startDate, endDate, balanceAsOfToday, } = jeScheduleTransactionState;
71
71
  const { selectedMonths, selectedAccount, selectedClass, selectedDayOfMonth, lastDayOfMonth, } = scheduleDetailsLocalData;
72
72
  const postingDate = selectedDayOfMonth !== null && selectedDayOfMonth !== void 0 ? selectedDayOfMonth : (lastDayOfMonth != null ? timePeriod_1.LAST_SCHEDULE_DAY_OF_MONTH : null);
73
73
  const scheduleLength = scheduleDetailsLocalData.jeScheduleDetails.length;
@@ -87,7 +87,9 @@ const mapJEScheduleTransactionToPayload = (jeScheduleTransactionState, vendorSta
87
87
  period: selectedMonths !== null && selectedMonths !== void 0 ? selectedMonths : null,
88
88
  je_schedule_type: jeScheduleType,
89
89
  posting_date: postingDate,
90
- balance: baseTransaction.amount.amount,
90
+ balance: balanceAsOfToday != null
91
+ ? balanceAsOfToday.amount
92
+ : baseTransaction.amount.amount,
91
93
  start_date: (_a = startDate === null || startDate === void 0 ? void 0 : startDate.format(formatZeniDateFY_1.DEFAULT_DATE_FORMAT)) !== null && _a !== void 0 ? _a : firstJEScheduleDate,
92
94
  end_date: (_b = endDate === null || endDate === void 0 ? void 0 : endDate.format(formatZeniDateFY_1.DEFAULT_DATE_FORMAT)) !== null && _b !== void 0 ? _b : lastJEScheduleDate,
93
95
  je_credit_accounting_class_id: baseTransaction.classBase
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "4.8.41",
3
+ "version": "4.8.43",
4
4
  "description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",