@tomei/finance 0.6.47 → 0.6.49

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 (99) hide show
  1. package/.commitlintrc.json +22 -22
  2. package/.eslintrc.js +72 -72
  3. package/.husky/commit-msg +4 -4
  4. package/.husky/pre-commit +4 -4
  5. package/.prettierrc +4 -4
  6. package/CONTRIBUTING.md +30 -30
  7. package/LICENSE +21 -21
  8. package/README.md +13 -13
  9. package/configs/config.js +348 -348
  10. package/dist/document/document.js +10 -9
  11. package/dist/document/document.js.map +1 -1
  12. package/dist/payment-item/payment-item.js +4 -4
  13. package/dist/tsconfig.tsbuildinfo +1 -1
  14. package/invoice-template/assets/css/style.css.map +12 -12
  15. package/invoice-template/assets/css/style.min.css +1 -1
  16. package/invoice-template/assets/img/arrow_bg.svg +11 -11
  17. package/invoice-template/assets/img/coffy_shop_img.svg +18 -18
  18. package/invoice-template/assets/img/logo_accent.svg +3 -3
  19. package/invoice-template/assets/img/logo_white.svg +4 -4
  20. package/invoice-template/assets/img/sign.svg +12 -12
  21. package/invoice-template/assets/img/tomei-logo.svg +9 -9
  22. package/invoice-template/assets/js/html2canvas.min.js +10379 -10379
  23. package/invoice-template/assets/js/jquery.min.js +1 -1
  24. package/invoice-template/assets/sass/common/_color_variable.scss +12 -12
  25. package/invoice-template/assets/sass/common/_typography.scss +178 -178
  26. package/invoice-template/assets/sass/style.scss +12 -12
  27. package/migrations/finance-account-migration.js +97 -97
  28. package/migrations/finance-company-migration.js +29 -29
  29. package/migrations/finance-customer-migration.js +51 -51
  30. package/migrations/finance-document-item-migration.js +111 -111
  31. package/migrations/finance-document-migration.js +122 -122
  32. package/migrations/finance-journal-entry-migration.js +59 -59
  33. package/migrations/finance-ledger-transaction-migration.js +89 -89
  34. package/migrations/finance-payment-item-migration.js +52 -52
  35. package/migrations/finance-payment-method-migration.js +31 -31
  36. package/migrations/finance-payment-method-type-migration.js +55 -55
  37. package/migrations/finance-payment-migration.js +96 -96
  38. package/migrations/finance-post-history-migration.js +45 -45
  39. package/migrations/finance-tax-migration.js +52 -52
  40. package/nest-cli.json +19 -19
  41. package/package.json +82 -82
  42. package/src/account/account.repository.ts +11 -11
  43. package/src/account/account.ts +276 -276
  44. package/src/account/interfaces/account-attr.interface.ts +31 -31
  45. package/src/account-system-entity/account-system-entity.ts +66 -66
  46. package/src/account-system-entity/post-history.repository.ts +11 -11
  47. package/src/config.ts +382 -382
  48. package/src/customer/customer.ts +300 -300
  49. package/src/customer/finance-customer.repository.ts +13 -13
  50. package/src/customer/interfaces/customer.repository.interface.ts +3 -3
  51. package/src/customer/interfaces/finance-customer-attr.interface.ts +10 -10
  52. package/src/customer/interfaces/finance-customer.repository.interface.ts +4 -4
  53. package/src/database.ts +48 -48
  54. package/src/document/document-item.repository.ts +11 -11
  55. package/src/document/document.repository.ts +11 -11
  56. package/src/document/document.ts +10 -9
  57. package/src/document/interfaces/document-attr.interface.ts +28 -28
  58. package/src/document/interfaces/document-item-attr.interface.ts +22 -22
  59. package/src/document/interfaces/document-item.repository.interface.ts +4 -4
  60. package/src/enum/doc-type.enum.ts +8 -8
  61. package/src/enum/index.ts +17 -17
  62. package/src/enum/payment-method.enum.ts +3 -3
  63. package/src/enum/payment-type.enum.ts +4 -4
  64. package/src/finance-company/finance-company.repository.ts +11 -11
  65. package/src/finance-company/finance-company.ts +2066 -2066
  66. package/src/helpers/login-user.ts +38 -38
  67. package/src/helpers/typeof.ts +35 -35
  68. package/src/index.ts +32 -32
  69. package/src/interfaces/account-system.interface.ts +20 -20
  70. package/src/interfaces/index.ts +3 -3
  71. package/src/models/account.entity.ts +206 -206
  72. package/src/models/customer.entity.ts +93 -93
  73. package/src/models/document-item.entity.ts +143 -143
  74. package/src/models/document.entity.ts +211 -211
  75. package/src/models/finance-company.entity.ts +29 -29
  76. package/src/models/journal-entry.entity.ts +110 -110
  77. package/src/models/ledger-transaction.entity.ts +148 -148
  78. package/src/models/payment-item.entity.ts +60 -60
  79. package/src/models/payment-method-type.entity.ts +70 -70
  80. package/src/models/payment-method.entity.ts +51 -51
  81. package/src/models/payment.entity.ts +165 -165
  82. package/src/models/post-history.entity.ts +41 -41
  83. package/src/models/tax.entity.ts +75 -75
  84. package/src/payment/interfaces/payment-attr.interface.ts +23 -23
  85. package/src/payment/interfaces/payment-params.interface.ts +8 -8
  86. package/src/payment/payment.repository.ts +11 -11
  87. package/src/payment/payment.ts +236 -236
  88. package/src/payment-item/interfaces/payment-item-attr.interface.ts +10 -10
  89. package/src/payment-item/payment-item.repository.ts +11 -11
  90. package/src/payment-item/payment-item.ts +133 -133
  91. package/src/payment-method/payment-method.repository.ts +11 -11
  92. package/src/payment-method-type/payment-method-type.repository.ts +11 -11
  93. package/src/tax/interfaces/tax-attr.interface.ts +10 -10
  94. package/src/tax/tax.repository.ts +11 -11
  95. package/src/tax/tax.ts +61 -61
  96. package/src/test-document.ts +25 -25
  97. package/tsconfig.build.json +4 -4
  98. package/tsconfig.json +22 -22
  99. package/tslint.json +18 -18
@@ -1,236 +1,236 @@
1
- import { ObjectBase } from '@tomei/general';
2
- import { RecordNotFoundError } from '@tomei/general/dist/class/exceptions/record-not-found.error';
3
- import { PaymentType } from '../enum';
4
- import { IPaymentParams } from './interfaces/payment-params.interface';
5
- import { AccountSystemEntity } from '../account-system-entity/account-system-entity';
6
- import { PaymentStatus } from '../enum/payment-status.enum';
7
- import { PaymentRepository } from './payment.repository';
8
- import { PaymentItemRepository } from '../payment-item/payment-item.repository';
9
- // import PaymentItemModel from '../models/payment-item.entity';
10
- import PaymentItem from '../payment-item/payment-item';
11
- import PaymentPaidWith from '../payment-paid-with/payment-paid-with';
12
- import { PaymentPaidWithRepository } from '../payment-paid-with/payment-paid-with.repository';
13
-
14
- export default class Payment extends AccountSystemEntity {
15
- private _PaymentId = 'New';
16
- PaymentType: PaymentType;
17
- PaymentDate: Date;
18
- MethodTypeId: string;
19
- Description = '';
20
- Currency = 'MYR';
21
- Amount = 0;
22
- Status: PaymentStatus;
23
- TransactionId: string;
24
- TransactionApprovalCode: string;
25
- TransactionAccountName: string;
26
- TransactionAccountNo: string;
27
- ReceivedBy = '';
28
- IssuedBy = '';
29
- UpdatedBy = '';
30
- UpdatedAt: Date;
31
- Remarks = '';
32
- RelatedObjectId = '';
33
- RelatedObjectType = '';
34
- ReceiptDocNo = '';
35
- protected _ObjectType: 'Payment';
36
-
37
- private static _RepositoryBase = new PaymentRepository();
38
- private static _PaymentItemRepository = new PaymentItemRepository();
39
- private static _PaymentPaidWithRepository = new PaymentPaidWithRepository();
40
-
41
- private _DbTransaction: any;
42
- private _PaymentItems = [];
43
- private _PaymentPaidWith = [];
44
-
45
- paymentItemRepository: PaymentItemRepository;
46
-
47
- public get PaymentId() {
48
- return this._PaymentId;
49
- }
50
-
51
- get ObjectType() {
52
- return this._ObjectType;
53
- }
54
-
55
- public set PaymentId(id: string) {
56
- this._PaymentId = id;
57
- }
58
-
59
- /* AccountSystemEntity Implementation */
60
- get RepositoryBase() {
61
- return Payment._RepositoryBase;
62
- }
63
-
64
- /* ObjectBase Implementation */
65
- get ObjectId() {
66
- return this.PaymentId;
67
- }
68
-
69
- get ObjectName() {
70
- return this.PaymentId;
71
- }
72
-
73
- get TableName() {
74
- return 'finance_Payment';
75
- }
76
-
77
- constructor(dbTransaction?: any, paymentId?: string) {
78
- super();
79
- if (dbTransaction) {
80
- this._DbTransaction = dbTransaction;
81
- }
82
- if (paymentId) {
83
- this.PaymentId = paymentId;
84
- }
85
- }
86
-
87
- static async initPayment(
88
- dbTransaction: any,
89
- paymentId: string,
90
- ): Promise<Payment> {
91
- try {
92
- const paymentData = await this._RepositoryBase.findOne({
93
- where: {
94
- PaymentId: paymentId,
95
- },
96
- transaction: dbTransaction,
97
- });
98
- if (paymentData) {
99
- const payment = new Payment(dbTransaction, paymentId);
100
- payment.PaymentType = paymentData.PaymentType;
101
- payment.PaymentDate = paymentData.PaymentDate;
102
- payment.Description = paymentData.Description;
103
- payment.Currency = paymentData.Currency;
104
- payment.Amount = paymentData.Amount;
105
- payment.Status = paymentData.Status;
106
- payment.ReceivedBy = paymentData.ReceivedBy;
107
- payment.IssuedBy = paymentData.IssuedBy;
108
- payment.UpdatedAt = paymentData.UpdatedAt;
109
- payment.UpdatedBy = paymentData.UpdatedBy;
110
- payment.Remarks = paymentData.Remarks;
111
- payment.RelatedObjectId = paymentData.RelatedObjectId;
112
- payment.RelatedObjectType = paymentData.RelatedObjectType;
113
- payment.ReceiptDocNo = paymentData.ReceiptDocNo;
114
- payment.AccSystemRefId = paymentData.AccSystemRefId;
115
- payment.PostedToAccSystemYN = paymentData.PostedToAccSystemYN;
116
- payment.PostedById = paymentData.PostedById;
117
- payment.PostedDateTime = paymentData.PostedDateTime;
118
- return payment;
119
- } else {
120
- const notFoundError = new RecordNotFoundError(
121
- 'PaymentErrMsg',
122
- 'No Record Found.',
123
- );
124
- throw notFoundError;
125
- }
126
- } catch (error) {
127
- console.log('Payment Class constructor err: ', error);
128
- }
129
- }
130
-
131
- async getPaymentItems(): Promise<PaymentItem[]> {
132
- try {
133
- if (this.PaymentId !== 'New') {
134
- const paymentItems = await Payment._PaymentItemRepository.findAll({
135
- where: {
136
- PaymentId: this.PaymentId,
137
- },
138
- transaction: this._DbTransaction,
139
- });
140
- const paymentItemObjects = paymentItems.map((paymentItem) => {
141
- const pi = new PaymentItem(
142
- new Payment(this._DbTransaction, paymentItem.PaymentId),
143
- {
144
- ObjectId: this.ObjectId,
145
- ObjectName: this.ObjectName,
146
- TableName: this.TableName,
147
- ObjectType: this.ObjectType,
148
- },
149
- );
150
- pi.PayForObjectType = paymentItem.PayForObjectType;
151
- pi.PayForObjectId = paymentItem.PayForObjectId;
152
- pi.Currency = paymentItem.Currency;
153
- pi.Amount = paymentItem.Amount;
154
- pi.Name = paymentItem.Name;
155
- pi.Description = paymentItem.Description;
156
-
157
- return pi;
158
- });
159
-
160
- this._PaymentItems = paymentItemObjects;
161
- return this._PaymentItems;
162
- } else {
163
- return this._PaymentItems;
164
- }
165
- } catch (error) {
166
- throw error;
167
- }
168
- }
169
-
170
- async getPaymentPaidWith(): Promise<PaymentPaidWith[]> {
171
- try {
172
- if (this.PaymentId !== 'New') {
173
- const paymentPaidWithItems =
174
- await Payment._PaymentPaidWithRepository.findAll({
175
- where: {
176
- PaymentId: this.PaymentId,
177
- },
178
- transaction: this._DbTransaction,
179
- });
180
- const paymentPaidWithObjects = paymentPaidWithItems.map(
181
- (paymentPaidWithItem) => {
182
- const ppw = new PaymentPaidWith(
183
- new Payment(this._DbTransaction, paymentPaidWithItem.PaymentId),
184
- paymentPaidWithItem.MethodTypeId,
185
- );
186
-
187
- ppw.Currency = paymentPaidWithItem.Currency;
188
- ppw.Amount = paymentPaidWithItem.Amount;
189
- ppw.Status = paymentPaidWithItem.Status;
190
- ppw.TransactionId = paymentPaidWithItem.TransactionId;
191
- ppw.RefBank = paymentPaidWithItem.RefBank;
192
- ppw.RefName = paymentPaidWithItem.RefName;
193
- ppw.RefNo = paymentPaidWithItem.RefNo;
194
- ppw.RefOther1 = paymentPaidWithItem.RefOther1;
195
- ppw.RefOther2 = paymentPaidWithItem.RefOther2;
196
- ppw.RefOther3 = paymentPaidWithItem.RefOther3;
197
- ppw.RefOther4 = paymentPaidWithItem.RefOther4;
198
- ppw.RefOther5 = paymentPaidWithItem.RefOther5;
199
- ppw.Remarks = paymentPaidWithItem.Remarks;
200
- ppw.PaymentMediaId = paymentPaidWithItem.PaymentMediaId;
201
-
202
- return ppw;
203
- },
204
- );
205
-
206
- this._PaymentPaidWith = paymentPaidWithObjects;
207
- return this._PaymentPaidWith;
208
- } else {
209
- return this._PaymentPaidWith;
210
- }
211
- } catch (error) {
212
- throw error;
213
- }
214
- }
215
-
216
- newPaymentItem(objectBeingPaidFor: ObjectBase): PaymentItem {
217
- const paymentItem = new PaymentItem(this, objectBeingPaidFor);
218
- this._PaymentItems.push(paymentItem);
219
- return paymentItem;
220
- }
221
-
222
- newPaymentPaidWith(paymentMethodTypeId: string) {
223
- const paymentPaidWith = new PaymentPaidWith(
224
- this,
225
- paymentMethodTypeId,
226
- this._DbTransaction,
227
- );
228
- this._PaymentPaidWith.push(paymentPaidWith);
229
- return paymentPaidWith;
230
- }
231
-
232
- init(Params: IPaymentParams): void {
233
- if (Params.Currency) this.Currency = Params.Currency;
234
- if (Params.PaymentType) this.PaymentType = Params.PaymentType;
235
- }
236
- }
1
+ import { ObjectBase } from '@tomei/general';
2
+ import { RecordNotFoundError } from '@tomei/general/dist/class/exceptions/record-not-found.error';
3
+ import { PaymentType } from '../enum';
4
+ import { IPaymentParams } from './interfaces/payment-params.interface';
5
+ import { AccountSystemEntity } from '../account-system-entity/account-system-entity';
6
+ import { PaymentStatus } from '../enum/payment-status.enum';
7
+ import { PaymentRepository } from './payment.repository';
8
+ import { PaymentItemRepository } from '../payment-item/payment-item.repository';
9
+ // import PaymentItemModel from '../models/payment-item.entity';
10
+ import PaymentItem from '../payment-item/payment-item';
11
+ import PaymentPaidWith from '../payment-paid-with/payment-paid-with';
12
+ import { PaymentPaidWithRepository } from '../payment-paid-with/payment-paid-with.repository';
13
+
14
+ export default class Payment extends AccountSystemEntity {
15
+ private _PaymentId = 'New';
16
+ PaymentType: PaymentType;
17
+ PaymentDate: Date;
18
+ MethodTypeId: string;
19
+ Description = '';
20
+ Currency = 'MYR';
21
+ Amount = 0;
22
+ Status: PaymentStatus;
23
+ TransactionId: string;
24
+ TransactionApprovalCode: string;
25
+ TransactionAccountName: string;
26
+ TransactionAccountNo: string;
27
+ ReceivedBy = '';
28
+ IssuedBy = '';
29
+ UpdatedBy = '';
30
+ UpdatedAt: Date;
31
+ Remarks = '';
32
+ RelatedObjectId = '';
33
+ RelatedObjectType = '';
34
+ ReceiptDocNo = '';
35
+ protected _ObjectType: 'Payment';
36
+
37
+ private static _RepositoryBase = new PaymentRepository();
38
+ private static _PaymentItemRepository = new PaymentItemRepository();
39
+ private static _PaymentPaidWithRepository = new PaymentPaidWithRepository();
40
+
41
+ private _DbTransaction: any;
42
+ private _PaymentItems = [];
43
+ private _PaymentPaidWith = [];
44
+
45
+ paymentItemRepository: PaymentItemRepository;
46
+
47
+ public get PaymentId() {
48
+ return this._PaymentId;
49
+ }
50
+
51
+ get ObjectType() {
52
+ return this._ObjectType;
53
+ }
54
+
55
+ public set PaymentId(id: string) {
56
+ this._PaymentId = id;
57
+ }
58
+
59
+ /* AccountSystemEntity Implementation */
60
+ get RepositoryBase() {
61
+ return Payment._RepositoryBase;
62
+ }
63
+
64
+ /* ObjectBase Implementation */
65
+ get ObjectId() {
66
+ return this.PaymentId;
67
+ }
68
+
69
+ get ObjectName() {
70
+ return this.PaymentId;
71
+ }
72
+
73
+ get TableName() {
74
+ return 'finance_Payment';
75
+ }
76
+
77
+ constructor(dbTransaction?: any, paymentId?: string) {
78
+ super();
79
+ if (dbTransaction) {
80
+ this._DbTransaction = dbTransaction;
81
+ }
82
+ if (paymentId) {
83
+ this.PaymentId = paymentId;
84
+ }
85
+ }
86
+
87
+ static async initPayment(
88
+ dbTransaction: any,
89
+ paymentId: string,
90
+ ): Promise<Payment> {
91
+ try {
92
+ const paymentData = await this._RepositoryBase.findOne({
93
+ where: {
94
+ PaymentId: paymentId,
95
+ },
96
+ transaction: dbTransaction,
97
+ });
98
+ if (paymentData) {
99
+ const payment = new Payment(dbTransaction, paymentId);
100
+ payment.PaymentType = paymentData.PaymentType;
101
+ payment.PaymentDate = paymentData.PaymentDate;
102
+ payment.Description = paymentData.Description;
103
+ payment.Currency = paymentData.Currency;
104
+ payment.Amount = paymentData.Amount;
105
+ payment.Status = paymentData.Status;
106
+ payment.ReceivedBy = paymentData.ReceivedBy;
107
+ payment.IssuedBy = paymentData.IssuedBy;
108
+ payment.UpdatedAt = paymentData.UpdatedAt;
109
+ payment.UpdatedBy = paymentData.UpdatedBy;
110
+ payment.Remarks = paymentData.Remarks;
111
+ payment.RelatedObjectId = paymentData.RelatedObjectId;
112
+ payment.RelatedObjectType = paymentData.RelatedObjectType;
113
+ payment.ReceiptDocNo = paymentData.ReceiptDocNo;
114
+ payment.AccSystemRefId = paymentData.AccSystemRefId;
115
+ payment.PostedToAccSystemYN = paymentData.PostedToAccSystemYN;
116
+ payment.PostedById = paymentData.PostedById;
117
+ payment.PostedDateTime = paymentData.PostedDateTime;
118
+ return payment;
119
+ } else {
120
+ const notFoundError = new RecordNotFoundError(
121
+ 'PaymentErrMsg',
122
+ 'No Record Found.',
123
+ );
124
+ throw notFoundError;
125
+ }
126
+ } catch (error) {
127
+ console.log('Payment Class constructor err: ', error);
128
+ }
129
+ }
130
+
131
+ async getPaymentItems(): Promise<PaymentItem[]> {
132
+ try {
133
+ if (this.PaymentId !== 'New') {
134
+ const paymentItems = await Payment._PaymentItemRepository.findAll({
135
+ where: {
136
+ PaymentId: this.PaymentId,
137
+ },
138
+ transaction: this._DbTransaction,
139
+ });
140
+ const paymentItemObjects = paymentItems.map((paymentItem) => {
141
+ const pi = new PaymentItem(
142
+ new Payment(this._DbTransaction, paymentItem.PaymentId),
143
+ {
144
+ ObjectId: this.ObjectId,
145
+ ObjectName: this.ObjectName,
146
+ TableName: this.TableName,
147
+ ObjectType: this.ObjectType,
148
+ },
149
+ );
150
+ pi.PayForObjectType = paymentItem.PayForObjectType;
151
+ pi.PayForObjectId = paymentItem.PayForObjectId;
152
+ pi.Currency = paymentItem.Currency;
153
+ pi.Amount = paymentItem.Amount;
154
+ pi.Name = paymentItem.Name;
155
+ pi.Description = paymentItem.Description;
156
+
157
+ return pi;
158
+ });
159
+
160
+ this._PaymentItems = paymentItemObjects;
161
+ return this._PaymentItems;
162
+ } else {
163
+ return this._PaymentItems;
164
+ }
165
+ } catch (error) {
166
+ throw error;
167
+ }
168
+ }
169
+
170
+ async getPaymentPaidWith(): Promise<PaymentPaidWith[]> {
171
+ try {
172
+ if (this.PaymentId !== 'New') {
173
+ const paymentPaidWithItems =
174
+ await Payment._PaymentPaidWithRepository.findAll({
175
+ where: {
176
+ PaymentId: this.PaymentId,
177
+ },
178
+ transaction: this._DbTransaction,
179
+ });
180
+ const paymentPaidWithObjects = paymentPaidWithItems.map(
181
+ (paymentPaidWithItem) => {
182
+ const ppw = new PaymentPaidWith(
183
+ new Payment(this._DbTransaction, paymentPaidWithItem.PaymentId),
184
+ paymentPaidWithItem.MethodTypeId,
185
+ );
186
+
187
+ ppw.Currency = paymentPaidWithItem.Currency;
188
+ ppw.Amount = paymentPaidWithItem.Amount;
189
+ ppw.Status = paymentPaidWithItem.Status;
190
+ ppw.TransactionId = paymentPaidWithItem.TransactionId;
191
+ ppw.RefBank = paymentPaidWithItem.RefBank;
192
+ ppw.RefName = paymentPaidWithItem.RefName;
193
+ ppw.RefNo = paymentPaidWithItem.RefNo;
194
+ ppw.RefOther1 = paymentPaidWithItem.RefOther1;
195
+ ppw.RefOther2 = paymentPaidWithItem.RefOther2;
196
+ ppw.RefOther3 = paymentPaidWithItem.RefOther3;
197
+ ppw.RefOther4 = paymentPaidWithItem.RefOther4;
198
+ ppw.RefOther5 = paymentPaidWithItem.RefOther5;
199
+ ppw.Remarks = paymentPaidWithItem.Remarks;
200
+ ppw.PaymentMediaId = paymentPaidWithItem.PaymentMediaId;
201
+
202
+ return ppw;
203
+ },
204
+ );
205
+
206
+ this._PaymentPaidWith = paymentPaidWithObjects;
207
+ return this._PaymentPaidWith;
208
+ } else {
209
+ return this._PaymentPaidWith;
210
+ }
211
+ } catch (error) {
212
+ throw error;
213
+ }
214
+ }
215
+
216
+ newPaymentItem(objectBeingPaidFor: ObjectBase): PaymentItem {
217
+ const paymentItem = new PaymentItem(this, objectBeingPaidFor);
218
+ this._PaymentItems.push(paymentItem);
219
+ return paymentItem;
220
+ }
221
+
222
+ newPaymentPaidWith(paymentMethodTypeId: string) {
223
+ const paymentPaidWith = new PaymentPaidWith(
224
+ this,
225
+ paymentMethodTypeId,
226
+ this._DbTransaction,
227
+ );
228
+ this._PaymentPaidWith.push(paymentPaidWith);
229
+ return paymentPaidWith;
230
+ }
231
+
232
+ init(Params: IPaymentParams): void {
233
+ if (Params.Currency) this.Currency = Params.Currency;
234
+ if (Params.PaymentType) this.PaymentType = Params.PaymentType;
235
+ }
236
+ }
@@ -1,10 +1,10 @@
1
- export class IPaymentItemAttr {
2
- PaymentId: string;
3
- PayForObjectId: string;
4
- PayForObjectType: string;
5
- Currency: string;
6
- Amount: number;
7
- Name?: string;
8
- Description: string;
9
- Remarks?: string;
10
- }
1
+ export class IPaymentItemAttr {
2
+ PaymentId: string;
3
+ PayForObjectId: string;
4
+ PayForObjectType: string;
5
+ Currency: string;
6
+ Amount: number;
7
+ Name?: string;
8
+ Description: string;
9
+ Remarks?: string;
10
+ }
@@ -1,11 +1,11 @@
1
- import { RepositoryBase, IRepositoryBase } from '@tomei/general';
2
- import PaymentItemModel from '../models/payment-item.entity';
3
-
4
- export class PaymentItemRepository
5
- extends RepositoryBase<PaymentItemModel>
6
- implements IRepositoryBase<PaymentItemModel>
7
- {
8
- constructor() {
9
- super(PaymentItemModel);
10
- }
11
- }
1
+ import { RepositoryBase, IRepositoryBase } from '@tomei/general';
2
+ import PaymentItemModel from '../models/payment-item.entity';
3
+
4
+ export class PaymentItemRepository
5
+ extends RepositoryBase<PaymentItemModel>
6
+ implements IRepositoryBase<PaymentItemModel>
7
+ {
8
+ constructor() {
9
+ super(PaymentItemModel);
10
+ }
11
+ }