law-common 11.0.1 → 11.0.4

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.
Files changed (29) hide show
  1. package/dist/src/api/index.d.ts +2 -0
  2. package/dist/src/api/index.js +2 -0
  3. package/dist/src/api/interface/state.update.dto.interface.d.ts +6 -3
  4. package/dist/src/api/interface/state.update.dto.interface.js +6 -2
  5. package/dist/src/api/interface/vendor_invoice_payment.create.dto.interface.d.ts +5 -0
  6. package/dist/src/api/interface/vendor_invoice_payment.create.dto.interface.js +2 -0
  7. package/dist/src/api/interface/vendor_invoice_payment.update.dto.interface.d.ts +18 -0
  8. package/dist/src/api/interface/vendor_invoice_payment.update.dto.interface.js +13 -0
  9. package/dist/src/entities/enums/state_status_enum.d.ts +10 -3
  10. package/dist/src/entities/enums/state_status_enum.js +13 -3
  11. package/dist/src/entities/enums/vendor_invoice_payment_mode_enum.d.ts +7 -0
  12. package/dist/src/entities/enums/vendor_invoice_payment_mode_enum.js +11 -0
  13. package/dist/src/entities/enums/vendor_invoice_payment_status_enum.d.ts +12 -0
  14. package/dist/src/entities/enums/vendor_invoice_payment_status_enum.js +16 -0
  15. package/dist/src/entities/flow-configs/state_flow.config.js +263 -58
  16. package/dist/src/entities/flow-configs/vendor_invoice_payment_flow.config.d.ts +6 -0
  17. package/dist/src/entities/flow-configs/vendor_invoice_payment_flow.config.js +256 -0
  18. package/dist/src/entities/index.d.ts +5 -0
  19. package/dist/src/entities/index.js +5 -0
  20. package/dist/src/entities/interface/entity.utils.interface.d.ts +5 -2
  21. package/dist/src/entities/interface/entity.utils.interface.js +1 -0
  22. package/dist/src/entities/interface/vendor_invoice_payment.entity.interface.d.ts +14 -0
  23. package/dist/src/entities/interface/vendor_invoice_payment.entity.interface.js +2 -0
  24. package/dist/src/entities/model/base.entity.model.js +2 -2
  25. package/dist/src/entities/model/entity.model.interface.js +2 -0
  26. package/dist/src/entities/model/state.entity.model.js +1 -1
  27. package/dist/src/entities/model/vendor_invoice_payment.entity.model.d.ts +61 -0
  28. package/dist/src/entities/model/vendor_invoice_payment.entity.model.js +206 -0
  29. package/package.json +1 -1
@@ -0,0 +1,256 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.vendorInvoicePaymentFlowConfig = void 0;
4
+ const base_flow_config_factory_1 = require("./base-flow-config.factory");
5
+ const api_1 = require("../../api");
6
+ const vendor_invoice_payment_status_enum_1 = require("../enums/vendor_invoice_payment_status_enum");
7
+ const VENDOR_INVOICE_PAYMENT_CREATE_PERMISSION = ["VENDOR_INVOICE_PAYMENT_CREATE"];
8
+ const VENDOR_INVOICE_PAYMENT_UPDATE_PERMISSION = ["VENDOR_INVOICE_PAYMENT_UPDATE"];
9
+ const VENDOR_INVOICE_PAYMENT_DELETE_PERMISSION = ["VENDOR_INVOICE_PAYMENT_DELETE"];
10
+ const VENDOR_INVOICE_PAYMENT_APPROVE_PERMISSION = ["VENDOR_INVOICE_PAYMENT_APPROVE"];
11
+ const VENDOR_INVOICE_PAYMENT_REJECT_PERMISSION = ["VENDOR_INVOICE_PAYMENT_REJECT"];
12
+ const VENDOR_INVOICE_PAYMENT_RECALL_PERMISSION = ["VENDOR_INVOICE_PAYMENT_RECALL"];
13
+ const VENDOR_INVOICE_PAYMENT_DEACTIVATE_PERMISSION = ["VENDOR_INVOICE_PAYMENT_DEACTIVATE"];
14
+ const ACTION_MAP = {
15
+ [api_1.VendorInvoicePaymentActionEnum.CREATE]: {
16
+ reachableStatues: [
17
+ vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.CREATE_APPROVAL_PENDING,
18
+ vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.APPROVED,
19
+ vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.CREATED,
20
+ ],
21
+ permissions: VENDOR_INVOICE_PAYMENT_CREATE_PERMISSION,
22
+ },
23
+ [api_1.VendorInvoicePaymentActionEnum.UPDATE]: {
24
+ reachableStatues: [
25
+ vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.UPDATE_APPROVAL_PENDING,
26
+ vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.UPDATED,
27
+ vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.CREATE_APPROVAL_PENDING,
28
+ ],
29
+ permissions: VENDOR_INVOICE_PAYMENT_UPDATE_PERMISSION,
30
+ },
31
+ [api_1.VendorInvoicePaymentActionEnum.DELETE]: {
32
+ reachableStatues: [vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.DELETE_APPROVAL_PENDING, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.DELETED],
33
+ permissions: VENDOR_INVOICE_PAYMENT_DELETE_PERMISSION,
34
+ },
35
+ [api_1.VendorInvoicePaymentActionEnum.APPROVE]: {
36
+ reachableStatues: [
37
+ vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.APPROVED,
38
+ vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.CREATED,
39
+ vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.UPDATED,
40
+ vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.DELETED,
41
+ ],
42
+ permissions: VENDOR_INVOICE_PAYMENT_APPROVE_PERMISSION,
43
+ },
44
+ [api_1.VendorInvoicePaymentActionEnum.REJECT]: {
45
+ reachableStatues: [
46
+ vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.REJECTED,
47
+ vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.CREATED,
48
+ vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.UPDATED,
49
+ vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.APPROVED,
50
+ vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.RESOLVED_REJECTED,
51
+ ],
52
+ permissions: VENDOR_INVOICE_PAYMENT_REJECT_PERMISSION,
53
+ },
54
+ [api_1.VendorInvoicePaymentActionEnum.RECALL]: {
55
+ reachableStatues: [vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.CREATED, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.UPDATED, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.APPROVED],
56
+ permissions: VENDOR_INVOICE_PAYMENT_RECALL_PERMISSION,
57
+ },
58
+ [api_1.VendorInvoicePaymentActionEnum.DEACTIVATE]: {
59
+ reachableStatues: [vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.DEACTIVATED],
60
+ permissions: VENDOR_INVOICE_PAYMENT_DEACTIVATE_PERMISSION,
61
+ },
62
+ };
63
+ const { createActionConfig } = (0, base_flow_config_factory_1.createFlowConfigFactory)()(ACTION_MAP);
64
+ // DEACTIVATED status transitions
65
+ const transitionDeactivatedStatusCreateAction = createActionConfig(api_1.VendorInvoicePaymentActionEnum.CREATE, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.CREATE_APPROVAL_PENDING);
66
+ const transitionDeactivatedStatusUpdateAction = createActionConfig(api_1.VendorInvoicePaymentActionEnum.UPDATE, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.UPDATE_APPROVAL_PENDING);
67
+ const transitionDeactivatedStatusDeleteAction = createActionConfig(api_1.VendorInvoicePaymentActionEnum.DELETE, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.DELETE_APPROVAL_PENDING);
68
+ const transitionDeactivatedStatusApproveAction = createActionConfig(api_1.VendorInvoicePaymentActionEnum.APPROVE, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.APPROVED);
69
+ const transitionDeactivatedStatusRejectAction = createActionConfig(api_1.VendorInvoicePaymentActionEnum.REJECT, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.REJECTED);
70
+ const transitionDeactivatedStatusRecallAction = createActionConfig(api_1.VendorInvoicePaymentActionEnum.RECALL, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.CREATED);
71
+ const transitionDeactivatedStatusDeactivateAction = createActionConfig(api_1.VendorInvoicePaymentActionEnum.DEACTIVATE, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.DEACTIVATED);
72
+ // CREATED status transitions
73
+ const transitionCreatedStatusCreateAction = createActionConfig(api_1.VendorInvoicePaymentActionEnum.CREATE, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.CREATE_APPROVAL_PENDING);
74
+ const transitionCreatedStatusUpdateAction = createActionConfig(api_1.VendorInvoicePaymentActionEnum.UPDATE, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.UPDATED);
75
+ const transitionCreatedStatusDeleteAction = createActionConfig(api_1.VendorInvoicePaymentActionEnum.DELETE, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.DELETE_APPROVAL_PENDING);
76
+ const transitionCreatedStatusApproveAction = createActionConfig(api_1.VendorInvoicePaymentActionEnum.APPROVE, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.APPROVED);
77
+ const transitionCreatedStatusRejectAction = createActionConfig(api_1.VendorInvoicePaymentActionEnum.REJECT, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.REJECTED);
78
+ const transitionCreatedStatusRecallAction = createActionConfig(api_1.VendorInvoicePaymentActionEnum.RECALL, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.CREATED);
79
+ const transitionCreatedStatusDeactivateAction = createActionConfig(api_1.VendorInvoicePaymentActionEnum.DEACTIVATE, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.DEACTIVATED);
80
+ // UPDATED status transitions
81
+ const transitionUpdatedStatusCreateAction = createActionConfig(api_1.VendorInvoicePaymentActionEnum.CREATE, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.CREATE_APPROVAL_PENDING);
82
+ const transitionUpdatedStatusUpdateAction = createActionConfig(api_1.VendorInvoicePaymentActionEnum.UPDATE, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.UPDATE_APPROVAL_PENDING);
83
+ const transitionUpdatedStatusDeleteAction = createActionConfig(api_1.VendorInvoicePaymentActionEnum.DELETE, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.DELETE_APPROVAL_PENDING);
84
+ const transitionUpdatedStatusApproveAction = createActionConfig(api_1.VendorInvoicePaymentActionEnum.APPROVE, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.APPROVED);
85
+ const transitionUpdatedStatusRejectAction = createActionConfig(api_1.VendorInvoicePaymentActionEnum.REJECT, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.REJECTED);
86
+ const transitionUpdatedStatusRecallAction = createActionConfig(api_1.VendorInvoicePaymentActionEnum.RECALL, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.CREATED);
87
+ const transitionUpdatedStatusDeactivateAction = createActionConfig(api_1.VendorInvoicePaymentActionEnum.DEACTIVATE, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.DEACTIVATED);
88
+ // DELETED status transitions
89
+ const transitionDeletedStatusCreateAction = createActionConfig(api_1.VendorInvoicePaymentActionEnum.CREATE, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.CREATE_APPROVAL_PENDING);
90
+ const transitionDeletedStatusUpdateAction = createActionConfig(api_1.VendorInvoicePaymentActionEnum.UPDATE, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.UPDATE_APPROVAL_PENDING);
91
+ const transitionDeletedStatusDeleteAction = createActionConfig(api_1.VendorInvoicePaymentActionEnum.DELETE, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.DELETE_APPROVAL_PENDING);
92
+ const transitionDeletedStatusApproveAction = createActionConfig(api_1.VendorInvoicePaymentActionEnum.APPROVE, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.APPROVED);
93
+ const transitionDeletedStatusRejectAction = createActionConfig(api_1.VendorInvoicePaymentActionEnum.REJECT, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.REJECTED);
94
+ const transitionDeletedStatusRecallAction = createActionConfig(api_1.VendorInvoicePaymentActionEnum.RECALL, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.CREATED);
95
+ const transitionDeletedStatusDeactivateAction = createActionConfig(api_1.VendorInvoicePaymentActionEnum.DEACTIVATE, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.DEACTIVATED);
96
+ // APPROVED status transitions
97
+ const transitionApprovedStatusCreateAction = createActionConfig(api_1.VendorInvoicePaymentActionEnum.CREATE, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.CREATE_APPROVAL_PENDING);
98
+ const transitionApprovedStatusUpdateAction = createActionConfig(api_1.VendorInvoicePaymentActionEnum.UPDATE, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.UPDATE_APPROVAL_PENDING);
99
+ const transitionApprovedStatusDeleteAction = createActionConfig(api_1.VendorInvoicePaymentActionEnum.DELETE, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.DELETE_APPROVAL_PENDING);
100
+ const transitionApprovedStatusApproveAction = createActionConfig(api_1.VendorInvoicePaymentActionEnum.APPROVE, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.APPROVED);
101
+ const transitionApprovedStatusRejectAction = createActionConfig(api_1.VendorInvoicePaymentActionEnum.REJECT, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.REJECTED);
102
+ const transitionApprovedStatusRecallAction = createActionConfig(api_1.VendorInvoicePaymentActionEnum.RECALL, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.CREATED);
103
+ const transitionApprovedStatusDeactivateAction = createActionConfig(api_1.VendorInvoicePaymentActionEnum.DEACTIVATE, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.DEACTIVATED);
104
+ // REJECTED status transitions
105
+ const transitionRejectedStatusCreateAction = createActionConfig(api_1.VendorInvoicePaymentActionEnum.CREATE, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.CREATE_APPROVAL_PENDING);
106
+ const transitionRejectedStatusUpdateAction = createActionConfig(api_1.VendorInvoicePaymentActionEnum.UPDATE, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.UPDATE_APPROVAL_PENDING);
107
+ const transitionRejectedStatusDeleteAction = createActionConfig(api_1.VendorInvoicePaymentActionEnum.DELETE, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.DELETE_APPROVAL_PENDING);
108
+ const transitionRejectedStatusApproveAction = createActionConfig(api_1.VendorInvoicePaymentActionEnum.APPROVE, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.APPROVED);
109
+ const transitionRejectedStatusRejectAction = createActionConfig(api_1.VendorInvoicePaymentActionEnum.REJECT, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.REJECTED);
110
+ const transitionRejectedStatusRecallAction = createActionConfig(api_1.VendorInvoicePaymentActionEnum.RECALL, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.CREATED);
111
+ const transitionRejectedStatusDeactivateAction = createActionConfig(api_1.VendorInvoicePaymentActionEnum.DEACTIVATE, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.DEACTIVATED);
112
+ // CREATE_APPROVAL_PENDING status transitions
113
+ const transitionCreateApprovalPendingStatusCreateAction = createActionConfig(api_1.VendorInvoicePaymentActionEnum.CREATE, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.CREATE_APPROVAL_PENDING);
114
+ const transitionCreateApprovalPendingStatusUpdateAction = createActionConfig(api_1.VendorInvoicePaymentActionEnum.UPDATE, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.UPDATE_APPROVAL_PENDING);
115
+ const transitionCreateApprovalPendingStatusDeleteAction = createActionConfig(api_1.VendorInvoicePaymentActionEnum.DELETE, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.DELETE_APPROVAL_PENDING);
116
+ const transitionCreateApprovalPendingStatusApproveAction = createActionConfig(api_1.VendorInvoicePaymentActionEnum.APPROVE, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.APPROVED);
117
+ const transitionCreateApprovalPendingStatusRejectAction = createActionConfig(api_1.VendorInvoicePaymentActionEnum.REJECT, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.REJECTED);
118
+ const transitionCreateApprovalPendingStatusRecallAction = createActionConfig(api_1.VendorInvoicePaymentActionEnum.RECALL, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.CREATED);
119
+ const transitionCreateApprovalPendingStatusDeactivateAction = createActionConfig(api_1.VendorInvoicePaymentActionEnum.DEACTIVATE, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.DEACTIVATED);
120
+ // UPDATE_APPROVAL_PENDING status transitions
121
+ const transitionUpdateApprovalPendingStatusCreateAction = createActionConfig(api_1.VendorInvoicePaymentActionEnum.CREATE, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.CREATE_APPROVAL_PENDING);
122
+ const transitionUpdateApprovalPendingStatusUpdateAction = createActionConfig(api_1.VendorInvoicePaymentActionEnum.UPDATE, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.UPDATE_APPROVAL_PENDING);
123
+ const transitionUpdateApprovalPendingStatusDeleteAction = createActionConfig(api_1.VendorInvoicePaymentActionEnum.DELETE, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.DELETE_APPROVAL_PENDING);
124
+ const transitionUpdateApprovalPendingStatusApproveAction = createActionConfig(api_1.VendorInvoicePaymentActionEnum.APPROVE, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.APPROVED);
125
+ const transitionUpdateApprovalPendingStatusRejectAction = createActionConfig(api_1.VendorInvoicePaymentActionEnum.REJECT, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.REJECTED);
126
+ const transitionUpdateApprovalPendingStatusRecallAction = createActionConfig(api_1.VendorInvoicePaymentActionEnum.RECALL, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.CREATED);
127
+ const transitionUpdateApprovalPendingStatusDeactivateAction = createActionConfig(api_1.VendorInvoicePaymentActionEnum.DEACTIVATE, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.DEACTIVATED);
128
+ // DELETE_APPROVAL_PENDING status transitions
129
+ const transitionDeleteApprovalPendingStatusCreateAction = createActionConfig(api_1.VendorInvoicePaymentActionEnum.CREATE, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.CREATE_APPROVAL_PENDING);
130
+ const transitionDeleteApprovalPendingStatusUpdateAction = createActionConfig(api_1.VendorInvoicePaymentActionEnum.UPDATE, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.UPDATE_APPROVAL_PENDING);
131
+ const transitionDeleteApprovalPendingStatusDeleteAction = createActionConfig(api_1.VendorInvoicePaymentActionEnum.DELETE, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.DELETE_APPROVAL_PENDING);
132
+ const transitionDeleteApprovalPendingStatusApproveAction = createActionConfig(api_1.VendorInvoicePaymentActionEnum.APPROVE, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.DELETED);
133
+ const transitionDeleteApprovalPendingStatusRejectAction = createActionConfig(api_1.VendorInvoicePaymentActionEnum.REJECT, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.REJECTED);
134
+ const transitionDeleteApprovalPendingStatusRecallAction = createActionConfig(api_1.VendorInvoicePaymentActionEnum.RECALL, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.CREATED);
135
+ const transitionDeleteApprovalPendingStatusDeactivateAction = createActionConfig(api_1.VendorInvoicePaymentActionEnum.DEACTIVATE, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.DEACTIVATED);
136
+ // RESOLVED_REJECTED status transitions
137
+ const transitionResolvedRejectedStatusCreateAction = createActionConfig(api_1.VendorInvoicePaymentActionEnum.CREATE, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.CREATED);
138
+ const transitionResolvedRejectedStatusUpdateAction = createActionConfig(api_1.VendorInvoicePaymentActionEnum.UPDATE, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.UPDATED);
139
+ const transitionResolvedRejectedStatusDeleteAction = createActionConfig(api_1.VendorInvoicePaymentActionEnum.DELETE, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.DELETED);
140
+ const transitionResolvedRejectedStatusApproveAction = createActionConfig(api_1.VendorInvoicePaymentActionEnum.APPROVE, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.APPROVED);
141
+ const transitionResolvedRejectedStatusRejectAction = createActionConfig(api_1.VendorInvoicePaymentActionEnum.REJECT, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.REJECTED);
142
+ const transitionResolvedRejectedStatusRecallAction = createActionConfig(api_1.VendorInvoicePaymentActionEnum.RECALL, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.UPDATED);
143
+ const transitionResolvedRejectedStatusDeactivateAction = createActionConfig(api_1.VendorInvoicePaymentActionEnum.DEACTIVATE, vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.DEACTIVATED);
144
+ exports.vendorInvoicePaymentFlowConfig = {
145
+ [vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.DEACTIVATED]: {
146
+ actions: {
147
+ // [VendorInvoicePaymentActionEnum.CREATE]: transitionDeactivatedStatusCreateAction,
148
+ [api_1.VendorInvoicePaymentActionEnum.UPDATE]: transitionDeactivatedStatusUpdateAction,
149
+ [api_1.VendorInvoicePaymentActionEnum.DELETE]: transitionDeactivatedStatusDeleteAction,
150
+ // [VendorInvoicePaymentActionEnum.APPROVE]: transitionDeactivatedStatusApproveAction,
151
+ // [VendorInvoicePaymentActionEnum.REJECT]: transitionDeactivatedStatusRejectAction,
152
+ // [VendorInvoicePaymentActionEnum.RECALL]: transitionDeactivatedStatusRecallAction,
153
+ // [VendorInvoicePaymentActionEnum.DEACTIVATE]: transitionDeactivatedStatusDeactivateAction,
154
+ },
155
+ },
156
+ [vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.CREATED]: {
157
+ actions: {
158
+ // [VendorInvoicePaymentActionEnum.CREATE]: transitionCreatedStatusCreateAction,
159
+ [api_1.VendorInvoicePaymentActionEnum.UPDATE]: transitionCreatedStatusUpdateAction,
160
+ [api_1.VendorInvoicePaymentActionEnum.DELETE]: transitionCreatedStatusDeleteAction,
161
+ // [VendorInvoicePaymentActionEnum.APPROVE]: transitionCreatedStatusApproveAction,
162
+ // [VendorInvoicePaymentActionEnum.REJECT]: transitionCreatedStatusRejectAction,
163
+ // [VendorInvoicePaymentActionEnum.RECALL]: transitionCreatedStatusRecallAction,
164
+ [api_1.VendorInvoicePaymentActionEnum.DEACTIVATE]: transitionCreatedStatusDeactivateAction,
165
+ },
166
+ },
167
+ [vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.UPDATED]: {
168
+ actions: {
169
+ // [VendorInvoicePaymentActionEnum.CREATE]: transitionUpdatedStatusCreateAction,
170
+ [api_1.VendorInvoicePaymentActionEnum.UPDATE]: transitionUpdatedStatusUpdateAction,
171
+ [api_1.VendorInvoicePaymentActionEnum.DELETE]: transitionUpdatedStatusDeleteAction,
172
+ // [VendorInvoicePaymentActionEnum.APPROVE]: transitionUpdatedStatusApproveAction,
173
+ // [VendorInvoicePaymentActionEnum.REJECT]: transitionUpdatedStatusRejectAction,
174
+ // [VendorInvoicePaymentActionEnum.RECALL]: transitionUpdatedStatusRecallAction,
175
+ [api_1.VendorInvoicePaymentActionEnum.DEACTIVATE]: transitionUpdatedStatusDeactivateAction,
176
+ },
177
+ },
178
+ [vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.DELETED]: {
179
+ actions: {
180
+ // [VendorInvoicePaymentActionEnum.VIEW]: transitionDeletedStatusViewAction,
181
+ // [VendorInvoicePaymentActionEnum.CREATE]: transitionDeletedStatusCreateAction,
182
+ // [VendorInvoicePaymentActionEnum.UPDATE]: transitionDeletedStatusUpdateAction,
183
+ // [VendorInvoicePaymentActionEnum.DELETE]: transitionDeletedStatusDeleteAction,
184
+ // [VendorInvoicePaymentActionEnum.APPROVE]: transitionDeletedStatusApproveAction,
185
+ // [VendorInvoicePaymentActionEnum.REJECT]: transitionDeletedStatusRejectAction,
186
+ // [VendorInvoicePaymentActionEnum.RECALL]: transitionDeletedStatusRecallAction,
187
+ // [VendorInvoicePaymentActionEnum.DEACTIVATE]: transitionDeletedStatusDeactivateAction,
188
+ },
189
+ },
190
+ [vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.APPROVED]: {
191
+ actions: {
192
+ // [VendorInvoicePaymentActionEnum.CREATE]: transitionApprovedStatusCreateAction,
193
+ [api_1.VendorInvoicePaymentActionEnum.UPDATE]: transitionApprovedStatusUpdateAction,
194
+ [api_1.VendorInvoicePaymentActionEnum.DELETE]: transitionApprovedStatusDeleteAction,
195
+ // [VendorInvoicePaymentActionEnum.APPROVE]: transitionApprovedStatusApproveAction,
196
+ // [VendorInvoicePaymentActionEnum.REJECT]: transitionApprovedStatusRejectAction,
197
+ // [VendorInvoicePaymentActionEnum.RECALL]: transitionApprovedStatusRecallAction,
198
+ [api_1.VendorInvoicePaymentActionEnum.DEACTIVATE]: transitionApprovedStatusDeactivateAction,
199
+ },
200
+ },
201
+ [vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.REJECTED]: {
202
+ actions: {
203
+ // [VendorInvoicePaymentActionEnum.CREATE]: transitionRejectedStatusCreateAction,
204
+ [api_1.VendorInvoicePaymentActionEnum.UPDATE]: transitionRejectedStatusUpdateAction,
205
+ [api_1.VendorInvoicePaymentActionEnum.DELETE]: transitionRejectedStatusDeleteAction,
206
+ // [VendorInvoicePaymentActionEnum.APPROVE]: transitionRejectedStatusApproveAction,
207
+ // [VendorInvoicePaymentActionEnum.REJECT]: transitionRejectedStatusRejectAction,
208
+ // [VendorInvoicePaymentActionEnum.RECALL]: transitionRejectedStatusRecallAction,
209
+ [api_1.VendorInvoicePaymentActionEnum.DEACTIVATE]: transitionRejectedStatusDeactivateAction,
210
+ },
211
+ },
212
+ [vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.CREATE_APPROVAL_PENDING]: {
213
+ actions: {
214
+ // [VendorInvoicePaymentActionEnum.CREATE]: transitionCreateApprovalPendingStatusCreateAction,
215
+ [api_1.VendorInvoicePaymentActionEnum.UPDATE]: transitionCreateApprovalPendingStatusUpdateAction,
216
+ [api_1.VendorInvoicePaymentActionEnum.DELETE]: transitionCreateApprovalPendingStatusDeleteAction,
217
+ [api_1.VendorInvoicePaymentActionEnum.APPROVE]: transitionCreateApprovalPendingStatusApproveAction,
218
+ [api_1.VendorInvoicePaymentActionEnum.REJECT]: transitionCreateApprovalPendingStatusRejectAction,
219
+ // [VendorInvoicePaymentActionEnum.RECALL]: transitionCreateApprovalPendingStatusRecallAction,
220
+ // [VendorInvoicePaymentActionEnum.DEACTIVATE]: transitionCreateApprovalPendingStatusDeactivateAction,
221
+ },
222
+ },
223
+ [vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.UPDATE_APPROVAL_PENDING]: {
224
+ actions: {
225
+ // [VendorInvoicePaymentActionEnum.CREATE]: transitionUpdateApprovalPendingStatusCreateAction,
226
+ [api_1.VendorInvoicePaymentActionEnum.UPDATE]: transitionUpdateApprovalPendingStatusUpdateAction,
227
+ // [VendorInvoicePaymentActionEnum.DELETE]: transitionUpdateApprovalPendingStatusDeleteAction,
228
+ [api_1.VendorInvoicePaymentActionEnum.APPROVE]: transitionUpdateApprovalPendingStatusApproveAction,
229
+ [api_1.VendorInvoicePaymentActionEnum.REJECT]: transitionUpdateApprovalPendingStatusRejectAction,
230
+ [api_1.VendorInvoicePaymentActionEnum.RECALL]: transitionUpdateApprovalPendingStatusRecallAction,
231
+ // [VendorInvoicePaymentActionEnum.DEACTIVATE]: transitionUpdateApprovalPendingStatusDeactivateAction,
232
+ },
233
+ },
234
+ [vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.DELETE_APPROVAL_PENDING]: {
235
+ actions: {
236
+ // [VendorInvoicePaymentActionEnum.CREATE]: transitionDeleteApprovalPendingStatusCreateAction,
237
+ // [VendorInvoicePaymentActionEnum.UPDATE]: transitionDeleteApprovalPendingStatusUpdateAction,
238
+ // [VendorInvoicePaymentActionEnum.DELETE]: transitionDeleteApprovalPendingStatusDeleteAction,
239
+ [api_1.VendorInvoicePaymentActionEnum.APPROVE]: transitionDeleteApprovalPendingStatusApproveAction,
240
+ [api_1.VendorInvoicePaymentActionEnum.REJECT]: transitionDeleteApprovalPendingStatusRejectAction,
241
+ [api_1.VendorInvoicePaymentActionEnum.RECALL]: transitionDeleteApprovalPendingStatusRecallAction,
242
+ // [VendorInvoicePaymentActionEnum.DEACTIVATE]: transitionDeleteApprovalPendingStatusDeactivateAction,
243
+ },
244
+ },
245
+ [vendor_invoice_payment_status_enum_1.VendorInvoicePaymentStatusEnum.RESOLVED_REJECTED]: {
246
+ actions: {
247
+ // [VendorInvoicePaymentActionEnum.CREATE]: transitionResolvedRejectedStatusCreateAction,
248
+ [api_1.VendorInvoicePaymentActionEnum.UPDATE]: transitionResolvedRejectedStatusUpdateAction,
249
+ [api_1.VendorInvoicePaymentActionEnum.DELETE]: transitionResolvedRejectedStatusDeleteAction,
250
+ // [VendorInvoicePaymentActionEnum.APPROVE]: transitionResolvedRejectedStatusApproveAction,
251
+ // [VendorInvoicePaymentActionEnum.REJECT]: transitionResolvedRejectedStatusRejectAction,
252
+ // [VendorInvoicePaymentActionEnum.RECALL]: transitionResolvedRejectedStatusRecallAction,
253
+ [api_1.VendorInvoicePaymentActionEnum.DEACTIVATE]: transitionResolvedRejectedStatusDeactivateAction,
254
+ },
255
+ },
256
+ };
@@ -221,6 +221,11 @@ export * from "./enums/entity_history_status_enum";
221
221
  export * from "./flow-configs/entity_history_flow.config";
222
222
  export * from "./interface/entity_history.entity.interface";
223
223
  export * from "./model/entity_history.entity.model";
224
+ export * from "./enums/vendor_invoice_payment_mode_enum";
225
+ export * from "./enums/vendor_invoice_payment_status_enum";
226
+ export * from "./interface/vendor_invoice_payment.entity.interface";
227
+ export * from "./model/vendor_invoice_payment.entity.model";
228
+ export * from "./flow-configs/vendor_invoice_payment_flow.config";
224
229
  export * from "./enums/leave_approval_status_enum";
225
230
  export * from "./flow-configs/leave_approval_flow.config";
226
231
  export * from "./interface/leave_approval.entity.interface";
@@ -237,6 +237,11 @@ __exportStar(require("./enums/entity_history_status_enum"), exports);
237
237
  __exportStar(require("./flow-configs/entity_history_flow.config"), exports);
238
238
  __exportStar(require("./interface/entity_history.entity.interface"), exports);
239
239
  __exportStar(require("./model/entity_history.entity.model"), exports);
240
+ __exportStar(require("./enums/vendor_invoice_payment_mode_enum"), exports);
241
+ __exportStar(require("./enums/vendor_invoice_payment_status_enum"), exports);
242
+ __exportStar(require("./interface/vendor_invoice_payment.entity.interface"), exports);
243
+ __exportStar(require("./model/vendor_invoice_payment.entity.model"), exports);
244
+ __exportStar(require("./flow-configs/vendor_invoice_payment_flow.config"), exports);
240
245
  __exportStar(require("./enums/leave_approval_status_enum"), exports);
241
246
  __exportStar(require("./flow-configs/leave_approval_flow.config"), exports);
242
247
  __exportStar(require("./interface/leave_approval.entity.interface"), exports);
@@ -68,6 +68,7 @@ import { VendorInvoiceEntityModel } from "../model/vendor_invoice.entity.model";
68
68
  import { VendorInvoiceHistoryEntityModel } from "../model/vendor_invoice_history.entity.model";
69
69
  import { VendorInvoiceItemEntityModel } from "../model/vendor_invoice_item.entity.model";
70
70
  import { VendorInvoiceItemHistoryEntityModel } from "../model/vendor_invoice_item_history.entity.model";
71
+ import { VendorInvoicePaymentEntityModel } from "../model/vendor_invoice_payment.entity.model";
71
72
  import { VoucherTypeEntityModel } from "../model/voucher_type.entity.model";
72
73
  import { WebsiteLeadEntityModel } from "../model/website_lead.entity.model";
73
74
  import { WebsiteNewsletterSubscriptionEntityModel } from "../model/website_newsletter_subscription.entity.model";
@@ -134,6 +135,7 @@ import { IVendorInvoiceItemHistoryEntity } from "./vendor-invoice-item-history.e
134
135
  import { IVendorEntity } from "./vendor.entity.interface";
135
136
  import { IVendorInvoiceEntity } from "./vendor_invoice.entity.interface";
136
137
  import { IVendorInvoiceItemEntity } from "./vendor_invoice_item.entity.interface";
138
+ import { IVendorInvoicePaymentEntity } from "./vendor_invoice_payment.entity.interface";
137
139
  import { IVendorInvoiceHistoryEntity } from "./vendot-invoice-history.entity.interface";
138
140
  import { IVoucherTypeEntity } from "./voucher_type.entity.interface";
139
141
  import { IWebsiteLeadEntity } from "./website_lead.entity.interface";
@@ -246,6 +248,7 @@ export declare enum EntityEnum {
246
248
  CLIENT_QUOTE = "client_quote",
247
249
  CLIENT_QUOTE_RATE = "client_quote_rate",
248
250
  ENTITY_HISTORY = "entity_history",
251
+ VENDOR_INVOICE_PAYMENT = "vendor_invoice_payment",
249
252
  LEAVE_APPROVAL = "leave_approval"
250
253
  }
251
254
  export type EntityRelations = {
@@ -271,7 +274,7 @@ export type IBaseEntityApiResponse<T> = {
271
274
  [key in EntityEnum | VirtualEntityEnum]?: AggregationFields<EnumToModel<key>>[];
272
275
  };
273
276
  };
274
- export type EnumEntityType<T extends EntityEnum | VirtualEntityEnum> = (T extends EntityEnum.BILLING ? IBillingEntity : T extends EntityEnum.BILLING_HISTORY ? IBillingHistoryEntity : T extends EntityEnum.MOVING_TIMESHEET ? IMovingTimesheetEntity : T extends EntityEnum.BILLING_TIMESHEET ? IBillingTimesheetEntity : T extends EntityEnum.BILLING_REIMBURSEMENT_EXPENSE ? IBillingReimbursementExpenseEntity : T extends EntityEnum.BILLING_TIMESHEET_HISTORY ? IBillingTimesheetHistoryEntity : T extends EntityEnum.BILLING_REIMBURESMENT_EXPENSE_HISTORY ? IBillingReimbursementExpenseHistoryEntity : T extends EntityEnum.TIMESHEET ? ITimesheetEntity : T extends EntityEnum.USER ? IUserEntity : T extends EntityEnum.PROJECT ? IProjectEntity : T extends EntityEnum.CLIENT ? IClientEntity : T extends EntityEnum.LEAVE ? ILeaveEntity : T extends EntityEnum.BANK ? IBankEntity : T extends EntityEnum.BILLING_TRANSACTION ? IBillingTransactionEntity : T extends EntityEnum.BILLING_TRANSACTION_HISTORY ? IBillingTransactionHistoryEntity : T extends EntityEnum.CLIENT_AFFILIATE ? IClientAffiliateEntity : T extends EntityEnum.CONFIGURATION ? IConfigurationEntity : T extends EntityEnum.HOLIDAY ? IHolidayEntity : T extends EntityEnum.HOLIDAY_LIST ? IHolidayListEntity : T extends EntityEnum.COUNTRY ? ICountryEntity : T extends EntityEnum.EXPENSE_TYPE ? IExpenseTypeEntity : T extends EntityEnum.INDUSTRY ? IIndustryEntity : T extends EntityEnum.INTERMEDIARY_BANK ? IIntermediaryBankEntity : T extends EntityEnum.OFFICE_LOCATION ? IOfficeLocationEntity : T extends EntityEnum.PERMISSION ? IPermissionEntity : T extends EntityEnum.ROLE ? IRoleEntity : T extends EntityEnum.TASK ? ITaskEntity : T extends EntityEnum.DESIGNATION ? IDesignationEntity : T extends EntityEnum.RATE ? IRateEntity : T extends EntityEnum.REIMBURSEMENT ? IReimbursementEntity : T extends EntityEnum.REIMBURSEMENT_EXPENSE ? IReimbursementExpenseEntity : T extends EntityEnum.REIMBURSEMENT_HISTORY ? IReimbursementHistoryEntity : T extends EntityEnum.WORK_FROM_HOME ? IWorkFromHomeEntity : T extends EntityEnum.ORGANIZATION ? IOrganizationEntity : T extends EntityEnum.PROJECT_USER_MAPPING ? IProjectUserMappingEntity : T extends EntityEnum.CLIENT_USER_MAPPING ? IClientUserMappingEntity : T extends EntityEnum.CLIENT_INTRODUCING_MAPPING ? IClientIntroducingMappingEntity : T extends EntityEnum.TO_DO_LIST ? IToDoListEntity : T extends EntityEnum.CRON_JOBS ? ICronJobsEntity : T extends EntityEnum.ROLE_PERMISSION_MAPPING ? IRolePermissionMappingEntity : T extends EntityEnum.BANK_HISTORY ? IBankHistoryEntity : T extends VirtualEntityEnum.LEAVE_COUNT ? ILeaveCountVirtualEntity : T extends EntityEnum.LEAVE_HISTORY ? ILeaveHistoryEntity : T extends EntityEnum.WORK_FROM_HOME_HISTORY ? IWorkFromHomeHistoryEntity : T extends EntityEnum.TIMESHEET_HISTORY ? ITimesheetHistoryEntity : T extends EntityEnum.ADDRESS_BOOK ? IAddressBookEntity : T extends EntityEnum.STATE ? IStateEntity : T extends EntityEnum.GST_RATE ? IGstRateEntity : T extends EntityEnum.ORGANIZATION_TYPE ? IOrganizationTypeEntity : T extends EntityEnum.TDS_RATE ? ITdsRateEntity : T extends EntityEnum.ORGANIZATION_TYPE_TDS_RATE_MAPPING ? IOrganizationTypeTdsRateMappingEntity : T extends EntityEnum.VOUCHER_TYPE ? IVoucherTypeEntity : T extends EntityEnum.TDS_RATE_VOUCHER_TYPE_MAPPING ? ITdsRateVoucherTypeMappingEntity : T extends EntityEnum.EXPENSE_HEAD ? IExpenseHeadEntity : T extends EntityEnum.DOCUMENT_UPLOAD ? IDocumentUploadEntity : T extends EntityEnum.VENDOR ? IVendorEntity : T extends EntityEnum.VENDOR_INVOICE ? IVendorInvoiceEntity : T extends EntityEnum.VENDOR_INVOICE_HISTORY ? IVendorInvoiceHistoryEntity : T extends EntityEnum.VENDOR_INVOICE_HISTORY ? IVendorInvoiceHistoryEntity : T extends EntityEnum.VENDOR_INVOICE_ITEM ? IVendorInvoiceItemEntity : T extends EntityEnum.VENDOR_INVOICE_ITEM_HISTORY ? IVendorInvoiceItemHistoryEntity : T extends EntityEnum.VENDOR_HISTORY ? IVendorHistoryEntity : T extends EntityEnum.WEBSITE_LEAD ? IWebsiteLeadEntity : T extends EntityEnum.WEBSITE_NEWSLETTER_SUBSCRIPTION ? IWebsiteNewsletterSubscriptionEntity : T extends EntityEnum.CLIENT_QUOTE ? IClientQuoteEntity : T extends EntityEnum.CLIENT_QUOTE_RATE ? IClientQuoteRateEntity : T extends EntityEnum.BILLING_PROFILE ? IBillingProfileEntity : T extends EntityEnum.PROJECT_REVENUE_SPLIT_MAPPING ? IProjectRevenueSplitMappingEntity : T extends EntityEnum.VENDOR_INVOICE_ITEM_HISTORY ? IVendorInvoiceItemHistoryEntity : T extends EntityEnum.VENDOR_HISTORY ? IVendorHistoryEntity : T extends EntityEnum.WEBSITE_LEAD ? IWebsiteLeadEntity : T extends EntityEnum.WEBSITE_NEWSLETTER_SUBSCRIPTION ? IWebsiteNewsletterSubscriptionEntity : T extends EntityEnum.CLIENT_QUOTE ? IClientQuoteEntity : T extends EntityEnum.CLIENT_QUOTE_RATE ? IClientQuoteRateEntity : T extends EntityEnum.ENTITY_HISTORY ? IEntityHistoryEntity : T extends EntityEnum.LEAVE_APPROVAL ? ILeaveApprovalEntity : never) & {
277
+ export type EnumEntityType<T extends EntityEnum | VirtualEntityEnum> = (T extends EntityEnum.BILLING ? IBillingEntity : T extends EntityEnum.BILLING_HISTORY ? IBillingHistoryEntity : T extends EntityEnum.MOVING_TIMESHEET ? IMovingTimesheetEntity : T extends EntityEnum.BILLING_TIMESHEET ? IBillingTimesheetEntity : T extends EntityEnum.BILLING_REIMBURSEMENT_EXPENSE ? IBillingReimbursementExpenseEntity : T extends EntityEnum.BILLING_TIMESHEET_HISTORY ? IBillingTimesheetHistoryEntity : T extends EntityEnum.BILLING_REIMBURESMENT_EXPENSE_HISTORY ? IBillingReimbursementExpenseHistoryEntity : T extends EntityEnum.TIMESHEET ? ITimesheetEntity : T extends EntityEnum.USER ? IUserEntity : T extends EntityEnum.PROJECT ? IProjectEntity : T extends EntityEnum.CLIENT ? IClientEntity : T extends EntityEnum.LEAVE ? ILeaveEntity : T extends EntityEnum.BANK ? IBankEntity : T extends EntityEnum.BILLING_TRANSACTION ? IBillingTransactionEntity : T extends EntityEnum.BILLING_TRANSACTION_HISTORY ? IBillingTransactionHistoryEntity : T extends EntityEnum.CLIENT_AFFILIATE ? IClientAffiliateEntity : T extends EntityEnum.CONFIGURATION ? IConfigurationEntity : T extends EntityEnum.HOLIDAY ? IHolidayEntity : T extends EntityEnum.HOLIDAY_LIST ? IHolidayListEntity : T extends EntityEnum.COUNTRY ? ICountryEntity : T extends EntityEnum.EXPENSE_TYPE ? IExpenseTypeEntity : T extends EntityEnum.INDUSTRY ? IIndustryEntity : T extends EntityEnum.INTERMEDIARY_BANK ? IIntermediaryBankEntity : T extends EntityEnum.OFFICE_LOCATION ? IOfficeLocationEntity : T extends EntityEnum.PERMISSION ? IPermissionEntity : T extends EntityEnum.ROLE ? IRoleEntity : T extends EntityEnum.TASK ? ITaskEntity : T extends EntityEnum.DESIGNATION ? IDesignationEntity : T extends EntityEnum.RATE ? IRateEntity : T extends EntityEnum.REIMBURSEMENT ? IReimbursementEntity : T extends EntityEnum.REIMBURSEMENT_EXPENSE ? IReimbursementExpenseEntity : T extends EntityEnum.REIMBURSEMENT_HISTORY ? IReimbursementHistoryEntity : T extends EntityEnum.WORK_FROM_HOME ? IWorkFromHomeEntity : T extends EntityEnum.ORGANIZATION ? IOrganizationEntity : T extends EntityEnum.PROJECT_USER_MAPPING ? IProjectUserMappingEntity : T extends EntityEnum.CLIENT_USER_MAPPING ? IClientUserMappingEntity : T extends EntityEnum.CLIENT_INTRODUCING_MAPPING ? IClientIntroducingMappingEntity : T extends EntityEnum.TO_DO_LIST ? IToDoListEntity : T extends EntityEnum.CRON_JOBS ? ICronJobsEntity : T extends EntityEnum.ROLE_PERMISSION_MAPPING ? IRolePermissionMappingEntity : T extends EntityEnum.BANK_HISTORY ? IBankHistoryEntity : T extends VirtualEntityEnum.LEAVE_COUNT ? ILeaveCountVirtualEntity : T extends EntityEnum.LEAVE_HISTORY ? ILeaveHistoryEntity : T extends EntityEnum.WORK_FROM_HOME_HISTORY ? IWorkFromHomeHistoryEntity : T extends EntityEnum.TIMESHEET_HISTORY ? ITimesheetHistoryEntity : T extends EntityEnum.ADDRESS_BOOK ? IAddressBookEntity : T extends EntityEnum.STATE ? IStateEntity : T extends EntityEnum.GST_RATE ? IGstRateEntity : T extends EntityEnum.ORGANIZATION_TYPE ? IOrganizationTypeEntity : T extends EntityEnum.TDS_RATE ? ITdsRateEntity : T extends EntityEnum.ORGANIZATION_TYPE_TDS_RATE_MAPPING ? IOrganizationTypeTdsRateMappingEntity : T extends EntityEnum.VOUCHER_TYPE ? IVoucherTypeEntity : T extends EntityEnum.TDS_RATE_VOUCHER_TYPE_MAPPING ? ITdsRateVoucherTypeMappingEntity : T extends EntityEnum.EXPENSE_HEAD ? IExpenseHeadEntity : T extends EntityEnum.DOCUMENT_UPLOAD ? IDocumentUploadEntity : T extends EntityEnum.VENDOR ? IVendorEntity : T extends EntityEnum.VENDOR_INVOICE ? IVendorInvoiceEntity : T extends EntityEnum.VENDOR_INVOICE_HISTORY ? IVendorInvoiceHistoryEntity : T extends EntityEnum.VENDOR_INVOICE_HISTORY ? IVendorInvoiceHistoryEntity : T extends EntityEnum.VENDOR_INVOICE_ITEM ? IVendorInvoiceItemEntity : T extends EntityEnum.VENDOR_INVOICE_ITEM_HISTORY ? IVendorInvoiceItemHistoryEntity : T extends EntityEnum.VENDOR_HISTORY ? IVendorHistoryEntity : T extends EntityEnum.WEBSITE_LEAD ? IWebsiteLeadEntity : T extends EntityEnum.WEBSITE_NEWSLETTER_SUBSCRIPTION ? IWebsiteNewsletterSubscriptionEntity : T extends EntityEnum.CLIENT_QUOTE ? IClientQuoteEntity : T extends EntityEnum.CLIENT_QUOTE_RATE ? IClientQuoteRateEntity : T extends EntityEnum.BILLING_PROFILE ? IBillingProfileEntity : T extends EntityEnum.PROJECT_REVENUE_SPLIT_MAPPING ? IProjectRevenueSplitMappingEntity : T extends EntityEnum.VENDOR_INVOICE_ITEM_HISTORY ? IVendorInvoiceItemHistoryEntity : T extends EntityEnum.VENDOR_HISTORY ? IVendorHistoryEntity : T extends EntityEnum.WEBSITE_LEAD ? IWebsiteLeadEntity : T extends EntityEnum.WEBSITE_NEWSLETTER_SUBSCRIPTION ? IWebsiteNewsletterSubscriptionEntity : T extends EntityEnum.CLIENT_QUOTE ? IClientQuoteEntity : T extends EntityEnum.CLIENT_QUOTE_RATE ? IClientQuoteRateEntity : T extends EntityEnum.ENTITY_HISTORY ? IEntityHistoryEntity : T extends EntityEnum.LEAVE_APPROVAL ? ILeaveApprovalEntity : T extends EntityEnum.VENDOR_INVOICE_PAYMENT ? IVendorInvoicePaymentEntity : never) & {
275
278
  id: number;
276
279
  };
277
280
  export type EntityRelationConfig<T extends EntityEnum | VirtualEntityEnum> = {
@@ -397,7 +400,7 @@ export declare enum VirtualEntityEnum {
397
400
  }
398
401
  export type IHistoryConstraintSearchResponse<T> = IBaseResponse<IHistoryEntitySearchByConstraintResponse<T>[]>;
399
402
  export type IHistoryConstraintSearchServiceResponse<T> = IHistoryEntitySearchByConstraintResponse<T>[];
400
- export type EnumToModel<T extends EntityEnum | VirtualEntityEnum> = T extends EntityEnum.BILLING ? BillingEntityModel : T extends EntityEnum.BILLING_HISTORY ? BillingHistoryEntityModel : T extends EntityEnum.CLIENT ? ClientEntityModel : T extends EntityEnum.INTERMEDIARY_BANK ? IntermediaryBankEntityModel : T extends EntityEnum.PROJECT ? ProjectEntityModel : T extends EntityEnum.PROJECT_USER_MAPPING ? ProjectUserMappingEntityModel : T extends EntityEnum.REIMBURSEMENT ? ReimbursementEntityModel : T extends EntityEnum.REIMBURSEMENT_EXPENSE ? ReimbursementExpenseEntityModel : T extends EntityEnum.BILLING_REIMBURSEMENT_EXPENSE ? BillingReimbursementExpneseEntityModel : T extends EntityEnum.BILLING_REIMBURESMENT_EXPENSE_HISTORY ? BillingReimbursementExpenseHistoryEntityModel : T extends EntityEnum.LEAVE ? LeaveEntityModel : T extends EntityEnum.WORK_FROM_HOME ? WorkFromHomeEntityModel : T extends EntityEnum.HOLIDAY ? HolidayEntityModel : T extends VirtualEntityEnum.LEAVE_COUNT ? LeaveCountVirtualEntityModel : T extends EntityEnum.CLIENT_AFFILIATE ? ClientAffiliateEntityModel : T extends EntityEnum.BANK ? BankEntityModel : T extends EntityEnum.CONFIGURATION ? ConfigurationEntityModel : T extends EntityEnum.TASK ? TaskEntityModel : T extends EntityEnum.BILLING_TIMESHEET ? BillingTimesheetEntityModel : T extends EntityEnum.BILLING_TIMESHEET_HISTORY ? BillingTimesheetHistoryEntityModel : T extends EntityEnum.TIMESHEET ? TimesheetEntityModel : T extends EntityEnum.MOVING_TIMESHEET ? MovingTimesheetEntityModel : T extends EntityEnum.TIMESHEET_HISTORY ? TimesheetHistoryEntityModel : T extends EntityEnum.COUNTRY ? CountryEntityModel : T extends EntityEnum.BILLING_TRANSACTION ? BillingTransactionEntityModel : T extends EntityEnum.BILLING_TRANSACTION_HISTORY ? BillingTransactionHistoryEntityModel : T extends EntityEnum.ADDRESS_BOOK ? AddressBookEntityModel : T extends EntityEnum.STATE ? StateEntityModel : T extends EntityEnum.GST_RATE ? GstRateEntityModel : T extends EntityEnum.ORGANIZATION_TYPE ? OrganizationTypeEntityModel : T extends EntityEnum.TDS_RATE ? TdsRateEntityModel : T extends EntityEnum.ORGANIZATION_TYPE_TDS_RATE_MAPPING ? OrganizationTypeTdsRateMappingEntityModel : T extends EntityEnum.VOUCHER_TYPE ? VoucherTypeEntityModel : T extends EntityEnum.TDS_RATE_VOUCHER_TYPE_MAPPING ? TdsRateVoucherTypeMappingEntityModel : T extends EntityEnum.ORGANIZATION ? OrganizationEntityModel : T extends EntityEnum.INDUSTRY ? IndustryEntityModel : T extends EntityEnum.EXPENSE_TYPE ? ExpenseTypeEntityModel : T extends EntityEnum.DESIGNATION ? DesignationEntityModel : T extends EntityEnum.RATE ? RateEntityModel : T extends EntityEnum.ROLE ? RoleEntityModel : T extends EntityEnum.ROLE_PERMISSION_MAPPING ? RolePermissionMappingEntityModel : T extends EntityEnum.PERMISSION ? PermissionEntityModel : T extends EntityEnum.EXPENSE_HEAD ? ExpenseHeadEntityModel : T extends EntityEnum.DOCUMENT_UPLOAD ? DocumentUploadEntityModel : T extends EntityEnum.VENDOR ? VendorEntityModel : T extends EntityEnum.VENDOR_INVOICE ? VendorInvoiceEntityModel : T extends EntityEnum.VENDOR_INVOICE_HISTORY ? VendorInvoiceHistoryEntityModel : T extends EntityEnum.OFFICE_LOCATION ? OfficeLocationEntityModel : T extends EntityEnum.VENDOR_INVOICE_ITEM ? VendorInvoiceItemEntityModel : T extends EntityEnum.VENDOR_INVOICE_ITEM_HISTORY ? VendorInvoiceItemHistoryEntityModel : T extends EntityEnum.VENDOR_HISTORY ? VendorHistoryEntityModel : T extends EntityEnum.WEBSITE_LEAD ? WebsiteLeadEntityModel : T extends EntityEnum.WEBSITE_NEWSLETTER_SUBSCRIPTION ? WebsiteNewsletterSubscriptionEntityModel : T extends EntityEnum.WORK_FROM_HOME_HISTORY ? WorkFromHomeHistoryEntityModel : T extends EntityEnum.LEAVE_HISTORY ? LeaveHistoryEntityModel : T extends EntityEnum.BANK_HISTORY ? BankHistoryEntityModel : T extends EntityEnum.REIMBURSEMENT_HISTORY ? ReimbursementHistoryEntityModel : T extends EntityEnum.CLIENT_USER_MAPPING ? ClientUserMappingEntityModel : T extends EntityEnum.CLIENT_INTRODUCING_MAPPING ? ClientIntroducingMappingEntityModel : T extends EntityEnum.HOLIDAY_LIST ? HolidayListEntityModel : T extends EntityEnum.CRON_JOBS ? CronJobsEntityModel : T extends EntityEnum.TO_DO_LIST ? ToDoListEntityModel : T extends EntityEnum.CLIENT_QUOTE ? ClientQuoteEntityModel : T extends EntityEnum.CLIENT_QUOTE_RATE ? ClientQuoteRateEntityModel : T extends EntityEnum.BILLING_PROFILE ? BillingProfileEntityModel : T extends EntityEnum.PROJECT_REVENUE_SPLIT_MAPPING ? ProjectRevenueSplitMappingEntityModel : T extends EntityEnum.WEBSITE_LEAD ? WebsiteLeadEntityModel : T extends EntityEnum.WEBSITE_NEWSLETTER_SUBSCRIPTION ? WebsiteNewsletterSubscriptionEntityModel : T extends EntityEnum.CLIENT_QUOTE ? ClientQuoteEntityModel : T extends EntityEnum.CLIENT_QUOTE_RATE ? ClientQuoteRateEntityModel : T extends EntityEnum.DESIGNATION ? DesignationEntityModel : T extends EntityEnum.RATE ? RateEntityModel : T extends EntityEnum.ENTITY_HISTORY ? EntityHistoryEntityModel : T extends EntityEnum.LEAVE_APPROVAL ? LeaveApprovalEntityModel : UserEntityModel;
403
+ export type EnumToModel<T extends EntityEnum | VirtualEntityEnum> = T extends EntityEnum.BILLING ? BillingEntityModel : T extends EntityEnum.BILLING_HISTORY ? BillingHistoryEntityModel : T extends EntityEnum.CLIENT ? ClientEntityModel : T extends EntityEnum.INTERMEDIARY_BANK ? IntermediaryBankEntityModel : T extends EntityEnum.PROJECT ? ProjectEntityModel : T extends EntityEnum.PROJECT_USER_MAPPING ? ProjectUserMappingEntityModel : T extends EntityEnum.REIMBURSEMENT ? ReimbursementEntityModel : T extends EntityEnum.REIMBURSEMENT_EXPENSE ? ReimbursementExpenseEntityModel : T extends EntityEnum.BILLING_REIMBURSEMENT_EXPENSE ? BillingReimbursementExpneseEntityModel : T extends EntityEnum.BILLING_REIMBURESMENT_EXPENSE_HISTORY ? BillingReimbursementExpenseHistoryEntityModel : T extends EntityEnum.LEAVE ? LeaveEntityModel : T extends EntityEnum.WORK_FROM_HOME ? WorkFromHomeEntityModel : T extends EntityEnum.HOLIDAY ? HolidayEntityModel : T extends VirtualEntityEnum.LEAVE_COUNT ? LeaveCountVirtualEntityModel : T extends EntityEnum.CLIENT_AFFILIATE ? ClientAffiliateEntityModel : T extends EntityEnum.BANK ? BankEntityModel : T extends EntityEnum.CONFIGURATION ? ConfigurationEntityModel : T extends EntityEnum.TASK ? TaskEntityModel : T extends EntityEnum.BILLING_TIMESHEET ? BillingTimesheetEntityModel : T extends EntityEnum.BILLING_TIMESHEET_HISTORY ? BillingTimesheetHistoryEntityModel : T extends EntityEnum.TIMESHEET ? TimesheetEntityModel : T extends EntityEnum.MOVING_TIMESHEET ? MovingTimesheetEntityModel : T extends EntityEnum.TIMESHEET_HISTORY ? TimesheetHistoryEntityModel : T extends EntityEnum.COUNTRY ? CountryEntityModel : T extends EntityEnum.BILLING_TRANSACTION ? BillingTransactionEntityModel : T extends EntityEnum.BILLING_TRANSACTION_HISTORY ? BillingTransactionHistoryEntityModel : T extends EntityEnum.ADDRESS_BOOK ? AddressBookEntityModel : T extends EntityEnum.STATE ? StateEntityModel : T extends EntityEnum.GST_RATE ? GstRateEntityModel : T extends EntityEnum.ORGANIZATION_TYPE ? OrganizationTypeEntityModel : T extends EntityEnum.TDS_RATE ? TdsRateEntityModel : T extends EntityEnum.ORGANIZATION_TYPE_TDS_RATE_MAPPING ? OrganizationTypeTdsRateMappingEntityModel : T extends EntityEnum.VOUCHER_TYPE ? VoucherTypeEntityModel : T extends EntityEnum.TDS_RATE_VOUCHER_TYPE_MAPPING ? TdsRateVoucherTypeMappingEntityModel : T extends EntityEnum.ORGANIZATION ? OrganizationEntityModel : T extends EntityEnum.INDUSTRY ? IndustryEntityModel : T extends EntityEnum.EXPENSE_TYPE ? ExpenseTypeEntityModel : T extends EntityEnum.DESIGNATION ? DesignationEntityModel : T extends EntityEnum.RATE ? RateEntityModel : T extends EntityEnum.ROLE ? RoleEntityModel : T extends EntityEnum.ROLE_PERMISSION_MAPPING ? RolePermissionMappingEntityModel : T extends EntityEnum.PERMISSION ? PermissionEntityModel : T extends EntityEnum.EXPENSE_HEAD ? ExpenseHeadEntityModel : T extends EntityEnum.DOCUMENT_UPLOAD ? DocumentUploadEntityModel : T extends EntityEnum.VENDOR ? VendorEntityModel : T extends EntityEnum.VENDOR_INVOICE ? VendorInvoiceEntityModel : T extends EntityEnum.VENDOR_INVOICE_HISTORY ? VendorInvoiceHistoryEntityModel : T extends EntityEnum.OFFICE_LOCATION ? OfficeLocationEntityModel : T extends EntityEnum.VENDOR_INVOICE_ITEM ? VendorInvoiceItemEntityModel : T extends EntityEnum.VENDOR_INVOICE_ITEM_HISTORY ? VendorInvoiceItemHistoryEntityModel : T extends EntityEnum.VENDOR_HISTORY ? VendorHistoryEntityModel : T extends EntityEnum.WEBSITE_LEAD ? WebsiteLeadEntityModel : T extends EntityEnum.WEBSITE_NEWSLETTER_SUBSCRIPTION ? WebsiteNewsletterSubscriptionEntityModel : T extends EntityEnum.WORK_FROM_HOME_HISTORY ? WorkFromHomeHistoryEntityModel : T extends EntityEnum.LEAVE_HISTORY ? LeaveHistoryEntityModel : T extends EntityEnum.BANK_HISTORY ? BankHistoryEntityModel : T extends EntityEnum.REIMBURSEMENT_HISTORY ? ReimbursementHistoryEntityModel : T extends EntityEnum.CLIENT_USER_MAPPING ? ClientUserMappingEntityModel : T extends EntityEnum.CLIENT_INTRODUCING_MAPPING ? ClientIntroducingMappingEntityModel : T extends EntityEnum.HOLIDAY_LIST ? HolidayListEntityModel : T extends EntityEnum.CRON_JOBS ? CronJobsEntityModel : T extends EntityEnum.TO_DO_LIST ? ToDoListEntityModel : T extends EntityEnum.CLIENT_QUOTE ? ClientQuoteEntityModel : T extends EntityEnum.CLIENT_QUOTE_RATE ? ClientQuoteRateEntityModel : T extends EntityEnum.BILLING_PROFILE ? BillingProfileEntityModel : T extends EntityEnum.PROJECT_REVENUE_SPLIT_MAPPING ? ProjectRevenueSplitMappingEntityModel : T extends EntityEnum.WEBSITE_LEAD ? WebsiteLeadEntityModel : T extends EntityEnum.WEBSITE_NEWSLETTER_SUBSCRIPTION ? WebsiteNewsletterSubscriptionEntityModel : T extends EntityEnum.CLIENT_QUOTE ? ClientQuoteEntityModel : T extends EntityEnum.CLIENT_QUOTE_RATE ? ClientQuoteRateEntityModel : T extends EntityEnum.DESIGNATION ? DesignationEntityModel : T extends EntityEnum.RATE ? RateEntityModel : T extends EntityEnum.ENTITY_HISTORY ? EntityHistoryEntityModel : T extends EntityEnum.LEAVE_APPROVAL ? LeaveApprovalEntityModel : T extends EntityEnum.VENDOR_INVOICE_PAYMENT ? VendorInvoicePaymentEntityModel : UserEntityModel;
401
404
  export type EntityMap = {
402
405
  [key in EntityEnum | VirtualEntityEnum]: EnumToModel<key>[];
403
406
  } & {
@@ -100,6 +100,7 @@ var EntityEnum;
100
100
  EntityEnum["CLIENT_QUOTE"] = "client_quote";
101
101
  EntityEnum["CLIENT_QUOTE_RATE"] = "client_quote_rate";
102
102
  EntityEnum["ENTITY_HISTORY"] = "entity_history";
103
+ EntityEnum["VENDOR_INVOICE_PAYMENT"] = "vendor_invoice_payment";
103
104
  EntityEnum["LEAVE_APPROVAL"] = "leave_approval";
104
105
  })(EntityEnum || (exports.EntityEnum = EntityEnum = {}));
105
106
  var VirtualEntityEnum;
@@ -0,0 +1,14 @@
1
+ import { IEntityAuditColumn } from "./entity-audit-columns.interface";
2
+ import { Nullable } from "./entity.utils.interface";
3
+ import { VendorInvoicePaymentModeEnum } from "../enums/vendor_invoice_payment_mode_enum";
4
+ import { VendorInvoicePaymentStatusEnum } from "../enums/vendor_invoice_payment_status_enum";
5
+ export interface IVendorInvoicePaymentEntity extends IEntityAuditColumn {
6
+ id: number;
7
+ vendorInvoiceId: number;
8
+ paymentDate: number;
9
+ mode: VendorInvoicePaymentModeEnum;
10
+ referenceNo?: Nullable<string>;
11
+ amount: number;
12
+ remarks?: Nullable<string>;
13
+ status: VendorInvoicePaymentStatusEnum;
14
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -47,10 +47,10 @@ class BaseEntityModel {
47
47
  }
48
48
  }
49
49
  if (foundRelatedEntities.length > 1) {
50
- throw new Error(`Expected one related entity for ${relationConfig.name} but found ${foundRelatedEntities.length}`);
50
+ throw new Error(`[populateRelationsByIndex]. Entity ${this.entityName} - Expected one related entity for ${relationConfig.name} but found ${foundRelatedEntities.length}`);
51
51
  }
52
52
  if (foundRelatedEntities.length === 0) {
53
- console.warn(`No related entity found for ${relationConfig.name} with ${thisMappingKey}=${this[relationConfig.mapKeyConfig.foreignKey]}`);
53
+ console.warn(`[populateRelationsByIndex]. Entity ${this.entityName} - No related entity found for ${relationConfig.name} with ${thisMappingKey}=${this[relationConfig.mapKeyConfig.foreignKey]}`);
54
54
  }
55
55
  this[thisKey] = foundRelatedEntities[0];
56
56
  }
@@ -75,6 +75,7 @@ const vendor_invoice_entity_model_1 = require("./vendor_invoice.entity.model");
75
75
  const vendor_invoice_history_entity_model_1 = require("./vendor_invoice_history.entity.model");
76
76
  const vendor_invoice_item_entity_model_1 = require("./vendor_invoice_item.entity.model");
77
77
  const vendor_invoice_item_history_entity_model_1 = require("./vendor_invoice_item_history.entity.model");
78
+ const vendor_invoice_payment_entity_model_1 = require("./vendor_invoice_payment.entity.model");
78
79
  const voucher_type_entity_model_1 = require("./voucher_type.entity.model");
79
80
  const website_lead_entity_model_1 = require("./website_lead.entity.model");
80
81
  const website_newsletter_subscription_entity_model_1 = require("./website_newsletter_subscription.entity.model");
@@ -177,6 +178,7 @@ exports.entityEnumToEntityModel = {
177
178
  [entity_utils_interface_1.EntityEnum.PROJECT_REVENUE_SPLIT_MAPPING]: project_revenue_split_mapping_model_1.ProjectRevenueSplitMappingEntityModel.fromEntity,
178
179
  [entity_utils_interface_1.EntityEnum.BILLING_PROFILE]: billing_profile_entity_model_1.BillingProfileEntityModel.fromEntity,
179
180
  [entity_utils_interface_1.EntityEnum.ENTITY_HISTORY]: entity_history_entity_model_1.EntityHistoryEntityModel.fromEntity,
181
+ [entity_utils_interface_1.EntityEnum.VENDOR_INVOICE_PAYMENT]: vendor_invoice_payment_entity_model_1.VendorInvoicePaymentEntityModel.fromEntity,
180
182
  [entity_utils_interface_1.EntityEnum.LEAVE_APPROVAL]: leave_approval_entity_model_1.LeaveApprovalEntityModel.fromEntity,
181
183
  };
182
184
  function entityMapToModels(entityMap) {
@@ -15,7 +15,7 @@ class StateEntityModel extends base_entity_model_1.BaseEntityModel {
15
15
  this.id = 0;
16
16
  this.name = "";
17
17
  this.code = "";
18
- this.status = state_status_enum_1.StateStatusEnum.ACTIVE;
18
+ this.status = state_status_enum_1.StateStatusEnum.CREATED;
19
19
  this.createdOn = 0;
20
20
  this.updatedOn = 0;
21
21
  this.createdBy = 0;
@@ -0,0 +1,61 @@
1
+ import { EntityEnum } from "../interface/entity.utils.interface";
2
+ import { BaseEntityModel } from "./base.entity.model";
3
+ import { RelationConfigs } from "../interface/relation-config.interface";
4
+ import { IUserEntity } from "../interface/user.entity.interface";
5
+ import { UserEntityModel } from "./user.entity.model";
6
+ import { IRowActions } from "./interface/row-actions.interface";
7
+ import { IVendorInvoicePaymentEntity } from "../interface/vendor_invoice_payment.entity.interface";
8
+ import { VendorInvoicePaymentModeEnum } from "../enums/vendor_invoice_payment_mode_enum";
9
+ import { VendorInvoicePaymentStatusEnum } from "../enums/vendor_invoice_payment_status_enum";
10
+ import { VendorInvoiceEntityModel } from "./vendor_invoice.entity.model";
11
+ import { VendorEntityModel } from "./vendor.entity.model";
12
+ import { StateEntityModel } from "./state.entity.model";
13
+ import { CountryEntityModel } from "./country.entity.model";
14
+ import { OrganizationTypeEntityModel } from "./organization_type.entity.model";
15
+ import { TdsRateEntityModel } from "./tds_rate.entity.model";
16
+ import { VoucherTypeEntityModel } from "./voucher_type.entity.model";
17
+ import { ExpenseHeadEntityModel } from "./expense_head.entity.model";
18
+ import { VendorInvoiceItemEntityModel } from "./vendor_invoice_item.entity.model";
19
+ import { GstRateEntityModel } from "./gst_rate.entity.model";
20
+ import { OfficeLocationEntityModel } from "./office_location.entity.model";
21
+ import { VendorInvoicePaymentActionEnum } from "../../api";
22
+ import { IVendorInvoicePaymentFlowConfigContextData } from "../flow-configs/vendor_invoice_payment_flow.config";
23
+ export declare class VendorInvoicePaymentEntityModel extends BaseEntityModel<EntityEnum.VENDOR_INVOICE_PAYMENT> implements IVendorInvoicePaymentEntity {
24
+ id: number;
25
+ vendorInvoiceId: number;
26
+ paymentDate: number;
27
+ mode: VendorInvoicePaymentModeEnum;
28
+ referenceNo?: string;
29
+ amount: number;
30
+ remarks?: string;
31
+ status: VendorInvoicePaymentStatusEnum;
32
+ createdOn: number;
33
+ updatedOn: number;
34
+ createdBy: number;
35
+ updatedBy: number;
36
+ vendorInvoice?: VendorInvoiceEntityModel;
37
+ static relationConfigs: RelationConfigs<[EntityEnum.VENDOR_INVOICE], EntityEnum.VENDOR_INVOICE_PAYMENT>;
38
+ static fromEntity(entity: IVendorInvoicePaymentEntity): VendorInvoicePaymentEntityModel;
39
+ getRelationConfigs(): any[];
40
+ get vendor(): VendorEntityModel | undefined;
41
+ get state(): StateEntityModel | undefined;
42
+ get country(): CountryEntityModel | undefined;
43
+ get organizationTypes(): OrganizationTypeEntityModel[] | undefined;
44
+ get vendorInvoiceItems(): VendorInvoiceItemEntityModel[] | undefined;
45
+ get tdsRates(): TdsRateEntityModel[] | undefined;
46
+ get voucherTypes(): VoucherTypeEntityModel[] | undefined;
47
+ get expenseHeads(): ExpenseHeadEntityModel[] | undefined;
48
+ get gstRates(): GstRateEntityModel[] | undefined;
49
+ get officeLocation(): OfficeLocationEntityModel | undefined;
50
+ getNextStatus(currentUser: IUserEntity, action: VendorInvoicePaymentActionEnum, vendorInvoicePaymentFlowConfigContextData: IVendorInvoicePaymentFlowConfigContextData): VendorInvoicePaymentStatusEnum;
51
+ getAvailableActions(currentUser: UserEntityModel, config?: {
52
+ combinedActions?: Record<string, {
53
+ combineActions: VendorInvoicePaymentActionEnum[];
54
+ label: string;
55
+ }>;
56
+ customLabels?: Partial<Record<VendorInvoicePaymentActionEnum, string>>;
57
+ }): IRowActions<EntityEnum.VENDOR_INVOICE_PAYMENT>[];
58
+ getUpdateActionVisibility(currentUser: UserEntityModel): {
59
+ [key: string]: () => boolean;
60
+ };
61
+ }