@mj-biz-apps/accounting-actions 0.2.0 → 0.3.0

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.
@@ -0,0 +1,14 @@
1
+ import { ActionResultSimple, RunActionParams } from '@memberjunction/actions-base';
2
+ import { BaseAction } from '@memberjunction/actions';
3
+ /**
4
+ * Action: Accounting.BuildJournalEntryBatches
5
+ *
6
+ * Builds single-company GL posting batches from pending candidate journal entries.
7
+ * Netted per (Company, GLAccount, Dimensions) and transactionally locked.
8
+ * Can be scheduled daily with ExcludeEntryTypeCodes=['RevenueRecognition'] to batch
9
+ * orders and payments while deferring subscription revenue recognition to month-end.
10
+ */
11
+ export declare class BuildJournalEntryBatchesAction extends BaseAction {
12
+ protected InternalRunAction(params: RunActionParams): Promise<ActionResultSimple>;
13
+ }
14
+ //# sourceMappingURL=BuildJournalEntryBatchesAction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BuildJournalEntryBatchesAction.d.ts","sourceRoot":"","sources":["../src/BuildJournalEntryBatchesAction.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AACnF,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAWrD;;;;;;;GAOG;AACH,qBACa,8BAA+B,SAAQ,UAAU;cAC5C,iBAAiB,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,kBAAkB,CAAC;CA2DxF"}
@@ -0,0 +1,78 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { Metadata } from '@memberjunction/core';
8
+ import { BaseAction } from '@memberjunction/actions';
9
+ import { RegisterClass } from '@memberjunction/global';
10
+ import { buildJournalEntryBatch, pendingCompanies, EmptyJournalEntryBatchError, TasksAppApprovalGate, } from '@mj-biz-apps/accounting-core-entities-server';
11
+ /**
12
+ * Action: Accounting.BuildJournalEntryBatches
13
+ *
14
+ * Builds single-company GL posting batches from pending candidate journal entries.
15
+ * Netted per (Company, GLAccount, Dimensions) and transactionally locked.
16
+ * Can be scheduled daily with ExcludeEntryTypeCodes=['RevenueRecognition'] to batch
17
+ * orders and payments while deferring subscription revenue recognition to month-end.
18
+ */
19
+ let BuildJournalEntryBatchesAction = class BuildJournalEntryBatchesAction extends BaseAction {
20
+ async InternalRunAction(params) {
21
+ const targetSystem = (params.Params.find(p => p.Name === 'TargetSystem')?.Value || 'BusinessCentral');
22
+ const cutoffRaw = params.Params.find(p => p.Name === 'Cutoff')?.Value;
23
+ const startDateRaw = params.Params.find(p => p.Name === 'StartDate')?.Value;
24
+ const excludeEntryTypeCodes = params.Params.find(p => p.Name === 'ExcludeEntryTypeCodes')?.Value;
25
+ const entryTypeCodes = params.Params.find(p => p.Name === 'EntryTypeCodes')?.Value;
26
+ const companyIds = params.Params.find(p => p.Name === 'CompanyIDs')?.Value;
27
+ const options = {
28
+ cutoff: cutoffRaw ? new Date(cutoffRaw) : null,
29
+ startDate: startDateRaw ? new Date(startDateRaw) : null,
30
+ companyIds: companyIds && companyIds.length > 0 ? companyIds : null,
31
+ entryTypeCodes: entryTypeCodes && entryTypeCodes.length > 0 ? entryTypeCodes : null,
32
+ excludeEntryTypeCodes: excludeEntryTypeCodes && excludeEntryTypeCodes.length > 0 ? excludeEntryTypeCodes : null,
33
+ };
34
+ const provider = Metadata.Provider;
35
+ if (!provider) {
36
+ throw new Error('Accounting.BuildJournalEntryBatches: Metadata.Provider is not initialized');
37
+ }
38
+ const user = params.ContextUser;
39
+ const gate = new TasksAppApprovalGate(provider);
40
+ const companies = await pendingCompanies(user, provider, options);
41
+ const builtBatches = [];
42
+ for (const companyId of companies) {
43
+ try {
44
+ const batchRes = await buildJournalEntryBatch(companyId, targetSystem, user.ID, user, provider, gate, options);
45
+ builtBatches.push(batchRes);
46
+ }
47
+ catch (e) {
48
+ if (e instanceof EmptyJournalEntryBatchError)
49
+ continue;
50
+ throw e;
51
+ }
52
+ }
53
+ const totalDebits = builtBatches.reduce((sum, b) => sum + b.totalDebits, 0);
54
+ const totalCredits = builtBatches.reduce((sum, b) => sum + b.totalCredits, 0);
55
+ const totalEntries = builtBatches.reduce((sum, b) => sum + b.jeCount, 0);
56
+ const resultParam = params.Params.find(p => p.Name === 'Batches');
57
+ if (resultParam) {
58
+ resultParam.Value = JSON.stringify(builtBatches);
59
+ }
60
+ const countParam = params.Params.find(p => p.Name === 'BatchCount');
61
+ if (countParam) {
62
+ countParam.Value = builtBatches.length;
63
+ }
64
+ const message = builtBatches.length > 0
65
+ ? `Successfully built ${builtBatches.length} batch(es) containing ${totalEntries} journal entries (Dr ${totalDebits.toFixed(2)}, Cr ${totalCredits.toFixed(2)}) across ${companies.length} candidate company(ies).`
66
+ : 'No candidate journal entries found to batch.';
67
+ return {
68
+ Success: true,
69
+ Message: message,
70
+ ResultCode: builtBatches.length > 0 ? 'SUCCESS' : 'NO_BATCHES',
71
+ };
72
+ }
73
+ };
74
+ BuildJournalEntryBatchesAction = __decorate([
75
+ RegisterClass(BaseAction, 'Accounting.BuildJournalEntryBatches')
76
+ ], BuildJournalEntryBatchesAction);
77
+ export { BuildJournalEntryBatchesAction };
78
+ //# sourceMappingURL=BuildJournalEntryBatchesAction.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BuildJournalEntryBatchesAction.js","sourceRoot":"","sources":["../src/BuildJournalEntryBatchesAction.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC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CAA8C,CAAC;QAEnD,OAAO;YACL,OAAO,EAAE,IAAI;YACb,OAAO,EAAE,OAAO;YAChB,UAAU,EAAE,YAAY,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,YAAY;SAC/D,CAAC;IACJ,CAAC;CACF,CAAA;AA5DY,8BAA8B;IAD1C,aAAa,CAAC,UAAU,EAAE,qCAAqC,CAAC;GACpD,8BAA8B,CA4D1C"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=BuildJournalEntryBatchesAction.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BuildJournalEntryBatchesAction.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/BuildJournalEntryBatchesAction.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,74 @@
1
+ import { describe, it, expect, vi, beforeEach } from 'vitest';
2
+ import { MJGlobal } from '@memberjunction/global';
3
+ import { BaseAction } from '@memberjunction/actions';
4
+ import { RunActionParams } from '@memberjunction/actions-base';
5
+ import { Metadata } from '@memberjunction/core';
6
+ import { BuildJournalEntryBatchesAction } from '../BuildJournalEntryBatchesAction.js';
7
+ import * as serverEngine from '@mj-biz-apps/accounting-core-entities-server';
8
+ describe('BuildJournalEntryBatchesAction', () => {
9
+ beforeEach(() => {
10
+ vi.restoreAllMocks();
11
+ Metadata.Provider = {
12
+ Config: { ActiveStatusAssertions: false },
13
+ };
14
+ });
15
+ it('is registered in MJGlobal ClassFactory as Accounting.BuildJournalEntryBatches', () => {
16
+ const instance = MJGlobal.Instance.ClassFactory.CreateInstance(BaseAction, 'Accounting.BuildJournalEntryBatches');
17
+ expect(instance).toBeDefined();
18
+ expect(instance).toBeInstanceOf(BuildJournalEntryBatchesAction);
19
+ });
20
+ it('processes inputs, passes exclude options, and populates output parameters', async () => {
21
+ const action = new BuildJournalEntryBatchesAction();
22
+ const pendingCompaniesSpy = vi.spyOn(serverEngine, 'pendingCompanies').mockResolvedValue(['CO-1', 'CO-2']);
23
+ const buildBatchSpy = vi.spyOn(serverEngine, 'buildJournalEntryBatch').mockImplementation(async (companyId) => {
24
+ return {
25
+ batchId: `BATCH-${companyId}`,
26
+ summaryJournalEntryId: `SUMM-${companyId}`,
27
+ summaryLineCount: 4,
28
+ totalDebits: 1500,
29
+ totalCredits: 1500,
30
+ jeCount: 10,
31
+ approvalTaskId: 'TASK-1',
32
+ };
33
+ });
34
+ const params = new RunActionParams();
35
+ params.ContextUser = { ID: 'USER-123' };
36
+ params.Params = [
37
+ { Name: 'TargetSystem', Type: 'Input', Value: 'BusinessCentral' },
38
+ { Name: 'Cutoff', Type: 'Input', Value: '2026-08-25' },
39
+ { Name: 'ExcludeEntryTypeCodes', Type: 'Input', Value: ['RevenueRecognition'] },
40
+ { Name: 'BatchCount', Type: 'Output', Value: 0 },
41
+ { Name: 'Batches', Type: 'Output', Value: '' },
42
+ ];
43
+ const result = await action.Run(params);
44
+ expect(result.Success).toBe(true);
45
+ expect(result.ResultCode).toBe('SUCCESS');
46
+ expect(result.Message).toContain('Successfully built 2 batch(es)');
47
+ expect(pendingCompaniesSpy).toHaveBeenCalledWith(expect.anything(), expect.anything(), expect.objectContaining({
48
+ excludeEntryTypeCodes: ['RevenueRecognition'],
49
+ }));
50
+ expect(buildBatchSpy).toHaveBeenCalledTimes(2);
51
+ const batchCountParam = params.Params.find(p => p.Name === 'BatchCount');
52
+ expect(batchCountParam?.Value).toBe(2);
53
+ const batchesParam = params.Params.find(p => p.Name === 'Batches');
54
+ expect(batchesParam?.Value).toContain('BATCH-CO-1');
55
+ expect(batchesParam?.Value).toContain('BATCH-CO-2');
56
+ });
57
+ it('returns NO_BATCHES when no candidate companies have pending entries', async () => {
58
+ const action = new BuildJournalEntryBatchesAction();
59
+ vi.spyOn(serverEngine, 'pendingCompanies').mockResolvedValue([]);
60
+ const buildBatchSpy = vi.spyOn(serverEngine, 'buildJournalEntryBatch');
61
+ const params = new RunActionParams();
62
+ params.ContextUser = { ID: 'USER-123' };
63
+ params.Params = [
64
+ { Name: 'TargetSystem', Type: 'Input', Value: 'BusinessCentral' },
65
+ { Name: 'BatchCount', Type: 'Output', Value: 0 },
66
+ ];
67
+ const result = await action.Run(params);
68
+ expect(result.Success).toBe(true);
69
+ expect(result.ResultCode).toBe('NO_BATCHES');
70
+ expect(result.Message).toContain('No candidate journal entries found to batch.');
71
+ expect(buildBatchSpy).not.toHaveBeenCalled();
72
+ });
73
+ });
74
+ //# sourceMappingURL=BuildJournalEntryBatchesAction.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BuildJournalEntryBatchesAction.test.js","sourceRoot":"","sources":["../../src/__tests__/BuildJournalEntryBatchesAction.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,8BAA8B,EAAE,MAAM,mCAAmC,CAAC;AACnF,OAAO,KAAK,YAAY,MAAM,8CAA8C,CAAC;AAE7E,QAAQ,CAAC,gCAAgC,EAAE,GAAG,EAAE;IAC5C,UAAU,CAAC,GAAG,EAAE;QACZ,EAAE,CAAC,eAAe,EAAE,CAAC;QACrB,QAAQ,CAAC,QAAQ,GAAG;YAChB,MAAM,EAAE,EAAE,sBAAsB,EAAE,KAAK,EAAE;SACrC,CAAC;IACb,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,+EAA+E,EAAE,GAAG,EAAE;QACrF,MAAM,QAAQ,GAAG,QAAQ,CAAC,QAAQ,CAAC,YAAY,CAAC,cAAc,CAAa,UAAU,EAAE,qCAAqC,CAA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ACxD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,qEAAqE,EAAE,KAAK,IAAI,EAAE;QACjF,MAAM,MAAM,GAAG,IAAI,8BAA8B,EAAE,CAAC;QAEpD,EAAE,CAAC,KAAK,CAAC,YAAY,EAAE,kBAAkB,CAAC,CAAC,iBAAiB,CAAC,EAAE,CAAC,CAAC;QACjE,MAAM,aAAa,GAAG,EAAE,CAAC,KAAK,CAAC,YAAY,EAAE,wBAAwB,CAAC,CAAC;QAEvE,MAAM,MAAM,GAAG,IAAI,eAAe,EAAE,CAAC;QACrC,MAAM,CAAC,WAAW,GAAG,EAAE,EAAE,EAAE,UAAU,EAAS,CAAC;QAC/C,MAAM,CAAC,MAAM,GAAG;YACZ,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,iBAAiB,EAAE;YACjE,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,EAAE;SACnD,CAAC;QAEF,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QAExC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAClC,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAC7C,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,8CAA8C,CAAC,CAAC;QACjF,MAAM,CAAC,aAAa,CAAC,CAAC,GAAG,CAAC,gBAAgB,EAAE,CAAC;IACjD,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  export * from './generated/action_subclasses.js';
2
+ export * from './BuildJournalEntryBatchesAction.js';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,+BAA+B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,kCAAkC,CAAC"}
package/dist/index.js CHANGED
@@ -1,2 +1,3 @@
1
1
  export * from './generated/action_subclasses.js';
2
+ export * from './BuildJournalEntryBatchesAction.js';
2
3
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,+BAA+B,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,kCAAkC,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mj-biz-apps/accounting-actions",
3
3
  "type": "module",
4
- "version": "0.2.0",
4
+ "version": "0.3.0",
5
5
  "description": "Generated action subclasses maintained by the CodeGen utility.",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -15,20 +15,22 @@
15
15
  "license": "BUSL-1.1",
16
16
  "devDependencies": {
17
17
  "ts-node-dev": "^2.0.0",
18
- "typescript": "^5.9.3"
18
+ "typescript": "^5.9.3",
19
+ "vitest": "^4.0.18"
19
20
  },
20
21
  "dependencies": {
22
+ "@mj-biz-apps/accounting-core-entities-server": "0.3.0",
21
23
  "zod": "^3.25.28"
22
24
  },
23
25
  "peerDependencies": {
24
- "@memberjunction/actions-base": "^6.1.0-edge.3",
25
- "@memberjunction/actions": "^6.1.0-edge.3",
26
- "@memberjunction/global": "^6.1.0-edge.3",
27
- "@memberjunction/core": "^6.1.0-edge.3",
28
- "@memberjunction/core-entities": "^6.1.0-edge.3",
29
- "@memberjunction/core-entities-server": "^6.1.0-edge.3",
30
- "@memberjunction/ai": "^6.1.0-edge.3",
31
- "@memberjunction/aiengine": "^6.1.0-edge.3"
26
+ "@memberjunction/actions-base": "^6.1.0-edge.4",
27
+ "@memberjunction/actions": "^6.1.0-edge.4",
28
+ "@memberjunction/global": "^6.1.0-edge.4",
29
+ "@memberjunction/core": "^6.1.0-edge.4",
30
+ "@memberjunction/core-entities": "^6.1.0-edge.4",
31
+ "@memberjunction/core-entities-server": "^6.1.0-edge.4",
32
+ "@memberjunction/ai": "^6.1.0-edge.4",
33
+ "@memberjunction/aiengine": "^6.1.0-edge.4"
32
34
  },
33
35
  "repository": {
34
36
  "type": "git",
@@ -37,6 +39,6 @@
37
39
  "scripts": {
38
40
  "start": "ts-node-dev src/index.ts",
39
41
  "build": "tsc && tsc-alias -f",
40
- "test": "echo \"No tests configured yet\""
42
+ "test": "vitest run"
41
43
  }
42
44
  }