@zeniai/client-epic-state 4.12.38 → 4.12.39
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.
- package/lib/commonStateTypes/fiscalYearHelpers/formatZeniDateFY.d.ts +1 -0
- package/lib/commonStateTypes/fiscalYearHelpers/formatZeniDateFY.js +2 -1
- package/lib/view/scheduleView/scheduleAccruedDetailView/epics/fetchRecommendedTransactionRowIndexEpic.js +2 -2
- package/lib/view/scheduleView/scheduleAccruedDetailView/scheduleAccruedDetailLocalDataHelper.js +3 -4
- package/package.json +1 -1
|
@@ -2,6 +2,7 @@ import { ZeniDate } from '../../zeniDayJS';
|
|
|
2
2
|
import { Month } from '../timePeriod';
|
|
3
3
|
export declare const FULL_MONTH_FULL_YEAR_FORMAT = "MMMM YYYY";
|
|
4
4
|
export declare const MONTH_YEAR_FORMAT = "MMM YYYY";
|
|
5
|
+
export declare const YEAR_MONTH_FORMAT = "YYYY/MM";
|
|
5
6
|
export declare const DEFAULT_DATE_FORMAT = "YYYY-MM-DD";
|
|
6
7
|
export declare const DAY_MONTH_YEAR_FORMAT = "DDMMYYYY";
|
|
7
8
|
export declare const MONTH_FORMAT = "MMMM";
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.formatZeniDateFY = exports.MONTH_FORMAT = exports.DAY_MONTH_YEAR_FORMAT = exports.DEFAULT_DATE_FORMAT = exports.MONTH_YEAR_FORMAT = exports.FULL_MONTH_FULL_YEAR_FORMAT = void 0;
|
|
3
|
+
exports.formatZeniDateFY = exports.MONTH_FORMAT = exports.DAY_MONTH_YEAR_FORMAT = exports.DEFAULT_DATE_FORMAT = exports.YEAR_MONTH_FORMAT = exports.MONTH_YEAR_FORMAT = exports.FULL_MONTH_FULL_YEAR_FORMAT = void 0;
|
|
4
4
|
const stringToUnion_1 = require("../stringToUnion");
|
|
5
5
|
const getFYQuarterAndYear_1 = require("./getFYQuarterAndYear");
|
|
6
6
|
exports.FULL_MONTH_FULL_YEAR_FORMAT = 'MMMM YYYY';
|
|
7
7
|
exports.MONTH_YEAR_FORMAT = 'MMM YYYY';
|
|
8
|
+
exports.YEAR_MONTH_FORMAT = 'YYYY/MM';
|
|
8
9
|
exports.DEFAULT_DATE_FORMAT = 'YYYY-MM-DD';
|
|
9
10
|
exports.DAY_MONTH_YEAR_FORMAT = 'DDMMYYYY';
|
|
10
11
|
exports.MONTH_FORMAT = 'MMMM';
|
|
@@ -28,13 +28,13 @@ const fetchRecommendedTransactionRowIndexEpic = (actions$, state$, zeniAPI) => a
|
|
|
28
28
|
const selectedJournalEntry = jeScheduleState.scheduledJournalEntry[selectedJELinkRowIndex];
|
|
29
29
|
const { jeDebit } = jeScheduleState;
|
|
30
30
|
const { account, accountingClass } = jeDebit;
|
|
31
|
-
const { amount, runningBalance: accruedBalance } = selectedJournalEntry;
|
|
31
|
+
const { amount, runningBalance: accruedBalance, expectedPostDate, } = selectedJournalEntry;
|
|
32
32
|
const endDate = (0, zeniDayJS_1.dateNow)().endOf('month').format(formatZeniDateFY_1.DEFAULT_DATE_FORMAT);
|
|
33
33
|
const { vendor } = jeScheduleState;
|
|
34
34
|
const vendorId = vendor.id;
|
|
35
35
|
const vendorEntity = (0, vendorSelector_1.getVendorByVendorId)(vendorState, vendorId);
|
|
36
36
|
const queryParam = {
|
|
37
|
-
start_date:
|
|
37
|
+
start_date: expectedPostDate.format(formatZeniDateFY_1.DEFAULT_DATE_FORMAT),
|
|
38
38
|
end_date: endDate,
|
|
39
39
|
amount: (_a = amount === null || amount === void 0 ? void 0 : amount.amount) !== null && _a !== void 0 ? _a : 0,
|
|
40
40
|
accrued_balance: (_b = accruedBalance === null || accruedBalance === void 0 ? void 0 : accruedBalance.amount) !== null && _b !== void 0 ? _b : 0,
|
package/lib/view/scheduleView/scheduleAccruedDetailView/scheduleAccruedDetailLocalDataHelper.js
CHANGED
|
@@ -18,9 +18,8 @@ const getPostingDateAndStatusForIndex = function (schedulePostingMonth, schedule
|
|
|
18
18
|
};
|
|
19
19
|
};
|
|
20
20
|
exports.getPostingDateAndStatusForIndex = getPostingDateAndStatusForIndex;
|
|
21
|
-
const getAccruedcheduleMemo = (vendorName, schedulePostingDate
|
|
22
|
-
|
|
23
|
-
return `${vendorName} - ${schedulePostingDate.format(formatZeniDateFY_1.MONTH_YEAR_FORMAT)} (${currentPeriod} of ${totalPeriod})`;
|
|
21
|
+
const getAccruedcheduleMemo = (vendorName, schedulePostingDate) => {
|
|
22
|
+
return `${vendorName} - ${schedulePostingDate.format(formatZeniDateFY_1.MONTH_FORMAT)} - Acc_${schedulePostingDate.format(formatZeniDateFY_1.YEAR_MONTH_FORMAT)}`;
|
|
24
23
|
};
|
|
25
24
|
const createNewAccruedSchedulesHelper = (localData, totalAmount, startingBalance, vendorName) => {
|
|
26
25
|
var _a;
|
|
@@ -41,7 +40,7 @@ const createNewAccruedSchedulesHelper = (localData, totalAmount, startingBalance
|
|
|
41
40
|
amount: (0, amount_1.toAmount)(totalAmount.amount, totalAmount.currencyCode, totalAmount.currencySymbol),
|
|
42
41
|
runningBalance: (0, amount_1.toAmount)(index === 0 ? (_a = startingBalance.amount) !== null && _a !== void 0 ? _a : 0 : 0, totalAmount.currencyCode, totalAmount.currencySymbol),
|
|
43
42
|
postingStatus,
|
|
44
|
-
memo: getAccruedcheduleMemo(vendorName, schedulePostingDate
|
|
43
|
+
memo: getAccruedcheduleMemo(vendorName, schedulePostingDate),
|
|
45
44
|
jeLink: {
|
|
46
45
|
type: 'unknown',
|
|
47
46
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "4.12.
|
|
3
|
+
"version": "4.12.39",
|
|
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",
|