@tomei/finance 0.6.39 → 0.6.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/account/account.d.ts +2 -0
- package/dist/account/account.js +4 -0
- package/dist/account/account.js.map +1 -1
- package/dist/account-system-entity/account-system-entity.d.ts +1 -0
- package/dist/account-system-entity/account-system-entity.js.map +1 -1
- package/dist/customer/customer.d.ts +1 -0
- package/dist/customer/customer.js.map +1 -1
- package/dist/document/document-item.d.ts +2 -0
- package/dist/document/document-item.js +4 -0
- package/dist/document/document-item.js.map +1 -1
- package/dist/document/document.d.ts +2 -0
- package/dist/document/document.js +4 -0
- package/dist/document/document.js.map +1 -1
- package/dist/finance-company/finance-company.js +6 -10
- package/dist/finance-company/finance-company.js.map +1 -1
- package/dist/helpers/typeof.js +3 -0
- package/dist/helpers/typeof.js.map +1 -1
- package/dist/journal-entry/journal-entry.d.ts +2 -0
- package/dist/journal-entry/journal-entry.js +5 -2
- package/dist/journal-entry/journal-entry.js.map +1 -1
- package/dist/ledger-transaction/interfaces/ledger-transaction-attr.interface.d.ts +1 -1
- package/dist/ledger-transaction/ledger-transaction.d.ts +5 -3
- package/dist/ledger-transaction/ledger-transaction.js +14 -10
- package/dist/ledger-transaction/ledger-transaction.js.map +1 -1
- package/dist/ledger-transaction/ledger-transaction.repository.d.ts +1 -0
- package/dist/ledger-transaction/ledger-transaction.repository.js +16 -0
- package/dist/ledger-transaction/ledger-transaction.repository.js.map +1 -1
- package/dist/models/ledger-transaction.entity.d.ts +1 -1
- package/dist/models/ledger-transaction.entity.js +2 -2
- package/dist/models/ledger-transaction.entity.js.map +1 -1
- package/dist/models/payment-paid-with.entity.d.ts +1 -1
- package/dist/models/payment-paid-with.entity.js +1 -1
- package/dist/models/payment-paid-with.entity.js.map +1 -1
- package/dist/payment/payment.d.ts +3 -1
- package/dist/payment/payment.js +4 -1
- package/dist/payment/payment.js.map +1 -1
- package/dist/payment-item/payment-item.d.ts +2 -0
- package/dist/payment-item/payment-item.js +4 -0
- package/dist/payment-item/payment-item.js.map +1 -1
- package/dist/payment-method/payment-method.d.ts +2 -0
- package/dist/payment-method/payment-method.js +4 -0
- package/dist/payment-method/payment-method.js.map +1 -1
- package/dist/payment-method-type/payment-method-type.d.ts +2 -0
- package/dist/payment-method-type/payment-method-type.js +4 -0
- package/dist/payment-method-type/payment-method-type.js.map +1 -1
- package/dist/payment-paid-with/interfaces/payment-paid-with.interface.d.ts +1 -1
- package/dist/payment-paid-with/payment-paid-with.d.ts +1 -1
- package/dist/payment-paid-with/payment-paid-with.js +1 -1
- package/dist/payment-paid-with/payment-paid-with.js.map +1 -1
- package/dist/tax/tax.d.ts +2 -0
- package/dist/tax/tax.js +4 -0
- package/dist/tax/tax.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/migrations/finance-ledger-transaction-migration.js +5 -1
- package/package.json +2 -2
- package/src/account/account.ts +5 -0
- package/src/account-system-entity/account-system-entity.ts +1 -0
- package/src/customer/customer.ts +1 -0
- package/src/document/document-item.ts +4 -0
- package/src/document/document.ts +5 -1
- package/src/finance-company/finance-company.ts +6 -13
- package/src/helpers/typeof.ts +6 -0
- package/src/journal-entry/journal-entry.ts +7 -2
- package/src/ledger-transaction/interfaces/ledger-transaction-attr.interface.ts +1 -1
- package/src/ledger-transaction/ledger-transaction.repository.ts +6 -0
- package/src/ledger-transaction/ledger-transaction.ts +17 -9
- package/src/models/ledger-transaction.entity.ts +2 -2
- package/src/models/payment-paid-with.entity.ts +1 -1
- package/src/payment/payment.ts +7 -2
- package/src/payment-item/payment-item.ts +5 -0
- package/src/payment-method/payment-method.ts +5 -0
- package/src/payment-method-type/payment-method-type.ts +5 -0
- package/src/payment-paid-with/interfaces/payment-paid-with.interface.ts +1 -1
- package/src/payment-paid-with/payment-paid-with.ts +1 -1
- package/src/tax/tax.ts +61 -57
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
module.exports = {
|
|
4
4
|
async up(queryInterface, Sequelize) {
|
|
5
5
|
await queryInterface.createTable('finance_LedgerTransaction', {
|
|
6
|
-
|
|
6
|
+
LedgerNo: {
|
|
7
7
|
type: Sequelize.STRING(30),
|
|
8
8
|
primaryKey: true,
|
|
9
9
|
allowNull: false,
|
|
@@ -12,6 +12,10 @@ module.exports = {
|
|
|
12
12
|
type: Sequelize.STRING(20),
|
|
13
13
|
allowNull: false,
|
|
14
14
|
},
|
|
15
|
+
JournalBatchNo: {
|
|
16
|
+
type: Sequelize.STRING(30),
|
|
17
|
+
allowNull: true,
|
|
18
|
+
},
|
|
15
19
|
JournalEntryId: {
|
|
16
20
|
type: Sequelize.STRING(30),
|
|
17
21
|
allowNull: false,
|
package/package.json
CHANGED
package/src/account/account.ts
CHANGED
|
@@ -21,6 +21,7 @@ export default class Account extends AccountSystemEntity {
|
|
|
21
21
|
CreatedAt: Date;
|
|
22
22
|
UpdatedById = '';
|
|
23
23
|
UpdatedAt: Date;
|
|
24
|
+
protected _ObjectType = 'Account';
|
|
24
25
|
|
|
25
26
|
private static _RepositoryBase = new AccountRepository();
|
|
26
27
|
|
|
@@ -35,6 +36,10 @@ export default class Account extends AccountSystemEntity {
|
|
|
35
36
|
this._IsNewRecord = record;
|
|
36
37
|
}
|
|
37
38
|
|
|
39
|
+
get ObjectType() {
|
|
40
|
+
return this._ObjectType;
|
|
41
|
+
}
|
|
42
|
+
|
|
38
43
|
/* AccountSystemEntity Implementation */
|
|
39
44
|
get RepositoryBase() {
|
|
40
45
|
return Account._RepositoryBase;
|
|
@@ -11,6 +11,7 @@ export abstract class AccountSystemEntity extends ObjectBase {
|
|
|
11
11
|
AccSystemRefId = '';
|
|
12
12
|
PostedById = '';
|
|
13
13
|
PostedDateTime: Date;
|
|
14
|
+
protected abstract _ObjectType: string;
|
|
14
15
|
protected abstract RepositoryBase: IRepositoryBase<any>;
|
|
15
16
|
private static PostHistoryRepository = new PostHistoryRepository();
|
|
16
17
|
|
package/src/customer/customer.ts
CHANGED
|
@@ -28,6 +28,7 @@ export default abstract class FinanceCustomerBase
|
|
|
28
28
|
protected abstract ParentAPAccountNo: string;
|
|
29
29
|
protected abstract ARAccountNo: string;
|
|
30
30
|
protected abstract APAccountNo: string;
|
|
31
|
+
protected abstract _ObjectType: string;
|
|
31
32
|
|
|
32
33
|
abstract FullName: string;
|
|
33
34
|
abstract IDNo: string;
|
|
@@ -25,6 +25,10 @@ export default class DocumentItem extends ObjectBase {
|
|
|
25
25
|
TaxInclusiveYN = 'N';
|
|
26
26
|
DtAccountNo = '';
|
|
27
27
|
CtAccountNo = '';
|
|
28
|
+
private _ObjectType = 'DocumentItem';
|
|
29
|
+
get ObjectType() {
|
|
30
|
+
return this._ObjectType;
|
|
31
|
+
}
|
|
28
32
|
|
|
29
33
|
private static _RepositoryBase = new DocumentItemRepository();
|
|
30
34
|
|
package/src/document/document.ts
CHANGED
|
@@ -2,7 +2,6 @@ import * as util from 'util';
|
|
|
2
2
|
import * as path from 'path';
|
|
3
3
|
import * as fs from 'fs';
|
|
4
4
|
import * as puppeteer from 'puppeteer';
|
|
5
|
-
import { RecordNotFoundError } from '@tomei/general/dist/class/exceptions/record-not-found.error';
|
|
6
5
|
import {
|
|
7
6
|
Medias,
|
|
8
7
|
InternalMediaDto,
|
|
@@ -44,6 +43,11 @@ export default class Document extends AccountSystemEntity {
|
|
|
44
43
|
UpdatedById = '';
|
|
45
44
|
UpdatedAt: Date;
|
|
46
45
|
UseAccSystemDocYN = 'N';
|
|
46
|
+
protected _ObjectType = 'Document';
|
|
47
|
+
|
|
48
|
+
get ObjectType() {
|
|
49
|
+
return this._ObjectType;
|
|
50
|
+
}
|
|
47
51
|
|
|
48
52
|
private _DocHTMLFileMediaId = '';
|
|
49
53
|
private _DocPDFFileMediaId = '';
|
|
@@ -40,11 +40,6 @@ import { ApplicationConfig } from '@tomei/config';
|
|
|
40
40
|
import { TaxRepository } from '../tax/tax.repository';
|
|
41
41
|
import { Tax } from '../tax/tax';
|
|
42
42
|
|
|
43
|
-
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
44
|
-
const getConfig = require('../config');
|
|
45
|
-
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
46
|
-
const config = getConfig();
|
|
47
|
-
|
|
48
43
|
export default class FinanceCompany extends ObjectBase {
|
|
49
44
|
private _CompanyId = 'New';
|
|
50
45
|
private _CompSystemCode = '';
|
|
@@ -374,7 +369,6 @@ export default class FinanceCompany extends ObjectBase {
|
|
|
374
369
|
);
|
|
375
370
|
|
|
376
371
|
for (const ledgerTransaction of debitTransactions) {
|
|
377
|
-
ledgerTransaction.TransactionId = cuid();
|
|
378
372
|
ledgerTransaction.JournalEntryId = newJournalEntry.JournalEntryId;
|
|
379
373
|
|
|
380
374
|
await ledgerTransaction.save(dbTransaction);
|
|
@@ -386,7 +380,6 @@ export default class FinanceCompany extends ObjectBase {
|
|
|
386
380
|
}
|
|
387
381
|
|
|
388
382
|
for (const ledgerTransaction of creditTransactions) {
|
|
389
|
-
ledgerTransaction.TransactionId = cuid();
|
|
390
383
|
ledgerTransaction.JournalEntryId = newJournalEntry.JournalEntryId;
|
|
391
384
|
|
|
392
385
|
await ledgerTransaction.save(dbTransaction);
|
|
@@ -1113,13 +1106,13 @@ export default class FinanceCompany extends ObjectBase {
|
|
|
1113
1106
|
const payload = {
|
|
1114
1107
|
Action: 'Create',
|
|
1115
1108
|
Activity: 'Issuing a Credit Note Transaction',
|
|
1116
|
-
Description: `Credit Transaction (ID: ${creditTransaction.
|
|
1109
|
+
Description: `Credit Transaction (ID: ${creditTransaction.LedgerNo}) has been created`,
|
|
1117
1110
|
EntityType: 'CreditTransaction',
|
|
1118
1111
|
EntityValueBefore: JSON.stringify({}),
|
|
1119
1112
|
EntityValueAfter: JSON.stringify(creditTransaction),
|
|
1120
1113
|
PerformedById: loginUser.ObjectId,
|
|
1121
1114
|
PerformedAt: transactionDate,
|
|
1122
|
-
EntityId: creditTransaction.
|
|
1115
|
+
EntityId: creditTransaction.LedgerNo,
|
|
1123
1116
|
};
|
|
1124
1117
|
|
|
1125
1118
|
await axios.post(
|
|
@@ -1348,7 +1341,7 @@ export default class FinanceCompany extends ObjectBase {
|
|
|
1348
1341
|
Currency: paymentPaidWithItem.Currency,
|
|
1349
1342
|
Amount: paymentPaidWithItem.Amount,
|
|
1350
1343
|
Status: paymentPaidWithItem.Status,
|
|
1351
|
-
|
|
1344
|
+
LedgerNo: paymentPaidWithItem.LedgerNo,
|
|
1352
1345
|
RefBank: paymentPaidWithItem.RefBank,
|
|
1353
1346
|
RefName: paymentPaidWithItem.RefName,
|
|
1354
1347
|
RefNo: paymentPaidWithItem.RefNo,
|
|
@@ -1523,7 +1516,7 @@ export default class FinanceCompany extends ObjectBase {
|
|
|
1523
1516
|
Currency: paymentPaidWithItem.Currency,
|
|
1524
1517
|
Amount: paymentPaidWithItem.Amount,
|
|
1525
1518
|
Status: paymentPaidWithItem.Status,
|
|
1526
|
-
|
|
1519
|
+
LedgerNo: paymentPaidWithItem.LedgerNo,
|
|
1527
1520
|
RefBank: paymentPaidWithItem.RefBank,
|
|
1528
1521
|
RefName: paymentPaidWithItem.RefName,
|
|
1529
1522
|
RefNo: paymentPaidWithItem.RefNo,
|
|
@@ -1664,7 +1657,7 @@ export default class FinanceCompany extends ObjectBase {
|
|
|
1664
1657
|
transaction: this._DbTransaction,
|
|
1665
1658
|
})
|
|
1666
1659
|
.then((taxes) => {
|
|
1667
|
-
|
|
1660
|
+
const taxList = [];
|
|
1668
1661
|
taxes.forEach((tax) => {
|
|
1669
1662
|
taxList.push(
|
|
1670
1663
|
new Tax({
|
|
@@ -1993,7 +1986,7 @@ export default class FinanceCompany extends ObjectBase {
|
|
|
1993
1986
|
Currency: paymentPaidWithItem.Currency,
|
|
1994
1987
|
Amount: paymentPaidWithItem.Amount,
|
|
1995
1988
|
Status: paymentPaidWithItem.Status,
|
|
1996
|
-
|
|
1989
|
+
LedgerNo: paymentPaidWithItem.LedgerNo,
|
|
1997
1990
|
RefBank: paymentPaidWithItem.RefBank,
|
|
1998
1991
|
RefName: paymentPaidWithItem.RefName,
|
|
1999
1992
|
RefNo: paymentPaidWithItem.RefNo,
|
package/src/helpers/typeof.ts
CHANGED
|
@@ -2,12 +2,18 @@ export function type(value: any): string {
|
|
|
2
2
|
if (value === null) {
|
|
3
3
|
return 'null';
|
|
4
4
|
}
|
|
5
|
+
|
|
5
6
|
const baseType = typeof value;
|
|
6
7
|
|
|
7
8
|
if (!['object', 'function'].includes(baseType)) {
|
|
8
9
|
return baseType;
|
|
9
10
|
}
|
|
10
11
|
|
|
12
|
+
// if value is object and have propery ObjectType: string return ObjectType instead.
|
|
13
|
+
if (baseType === 'object' && value.ObjectType) {
|
|
14
|
+
return value.ObjectType;
|
|
15
|
+
}
|
|
16
|
+
|
|
11
17
|
const tag = value[Symbol.toStringTag];
|
|
12
18
|
if (typeof tag === 'string') {
|
|
13
19
|
return tag;
|
|
@@ -13,6 +13,7 @@ export default class JournalEntry extends AccountSystemEntity {
|
|
|
13
13
|
Date = new Date();
|
|
14
14
|
Name = '';
|
|
15
15
|
Description = '';
|
|
16
|
+
protected _ObjectType: 'JournalEntry';
|
|
16
17
|
|
|
17
18
|
private static _RepositoryBase = new JournalEntryRepository();
|
|
18
19
|
private static _LedgerTransactionRepository =
|
|
@@ -30,6 +31,10 @@ export default class JournalEntry extends AccountSystemEntity {
|
|
|
30
31
|
this._JournalEntryId = id;
|
|
31
32
|
}
|
|
32
33
|
|
|
34
|
+
get ObjectType() {
|
|
35
|
+
return this._ObjectType;
|
|
36
|
+
}
|
|
37
|
+
|
|
33
38
|
get RepositoryBase() {
|
|
34
39
|
return JournalEntry._RepositoryBase;
|
|
35
40
|
}
|
|
@@ -109,7 +114,7 @@ export default class JournalEntry extends AccountSystemEntity {
|
|
|
109
114
|
(debitTransactionData) =>
|
|
110
115
|
new LedgerTransaction(
|
|
111
116
|
this._DbTransaction,
|
|
112
|
-
debitTransactionData.
|
|
117
|
+
debitTransactionData.LedgerNo,
|
|
113
118
|
),
|
|
114
119
|
);
|
|
115
120
|
return Promise.all(debitTransactionObjects);
|
|
@@ -142,7 +147,7 @@ export default class JournalEntry extends AccountSystemEntity {
|
|
|
142
147
|
(creditTransactionData) =>
|
|
143
148
|
new LedgerTransaction(
|
|
144
149
|
this._DbTransaction,
|
|
145
|
-
creditTransactionData.
|
|
150
|
+
creditTransactionData.LedgerNo,
|
|
146
151
|
),
|
|
147
152
|
);
|
|
148
153
|
return Promise.all(creditTransactionObjects);
|
|
@@ -5,7 +5,7 @@ import { LedgerTransactionRepository } from './ledger-transaction.repository';
|
|
|
5
5
|
import LedgerTransactionModel from '../models/ledger-transaction.entity';
|
|
6
6
|
|
|
7
7
|
export default class LedgerTransaction {
|
|
8
|
-
|
|
8
|
+
LedgerNo = 'New';
|
|
9
9
|
TransactionType = TransactionTypeOptions.DEBIT;
|
|
10
10
|
JournalEntryId = '';
|
|
11
11
|
AccountNo = '';
|
|
@@ -19,28 +19,33 @@ export default class LedgerTransaction {
|
|
|
19
19
|
RelatedObjectType = '';
|
|
20
20
|
RelatedDocNo = '';
|
|
21
21
|
RelatedPaymentId = '';
|
|
22
|
+
private _ObjectType: 'LedgerTransaction';
|
|
22
23
|
|
|
23
24
|
private _DbTransaction: any;
|
|
24
25
|
|
|
25
26
|
private static _LedgerTransactionRepository =
|
|
26
27
|
new LedgerTransactionRepository();
|
|
27
28
|
|
|
29
|
+
get ObjectType() {
|
|
30
|
+
return this._ObjectType;
|
|
31
|
+
}
|
|
32
|
+
|
|
28
33
|
constructor(
|
|
29
34
|
transactionType: TransactionTypeOptions,
|
|
30
35
|
dbTransaction?: any,
|
|
31
|
-
|
|
36
|
+
LedgerNo?: string,
|
|
32
37
|
) {
|
|
33
38
|
this.TransactionType = transactionType;
|
|
34
39
|
if (dbTransaction) {
|
|
35
40
|
this._DbTransaction = dbTransaction;
|
|
36
41
|
}
|
|
37
|
-
if (
|
|
38
|
-
this.
|
|
42
|
+
if (LedgerNo) {
|
|
43
|
+
this.LedgerNo = LedgerNo;
|
|
39
44
|
}
|
|
40
45
|
}
|
|
41
46
|
|
|
42
47
|
init(params?: ILedgerTransactionAttr) {
|
|
43
|
-
if (params.
|
|
48
|
+
if (params.LedgerNo) this.LedgerNo = params.LedgerNo;
|
|
44
49
|
if (params.TransactionType) this.TransactionType = params.TransactionType;
|
|
45
50
|
if (params.JournalEntryId) this.JournalEntryId = params.JournalEntryId;
|
|
46
51
|
if (params.AccountNo) this.AccountNo = params.AccountNo;
|
|
@@ -57,7 +62,7 @@ export default class LedgerTransaction {
|
|
|
57
62
|
|
|
58
63
|
getData() {
|
|
59
64
|
return {
|
|
60
|
-
|
|
65
|
+
LedgerNo: this.LedgerNo,
|
|
61
66
|
TransactionType: this.TransactionType,
|
|
62
67
|
JournalEntryId: this.JournalEntryId,
|
|
63
68
|
AccountNo: this.AccountNo,
|
|
@@ -76,11 +81,14 @@ export default class LedgerTransaction {
|
|
|
76
81
|
|
|
77
82
|
async save(dbTransaction?: any): Promise<LedgerTransactionModel> {
|
|
78
83
|
try {
|
|
79
|
-
|
|
84
|
+
const count = await LedgerTransaction._LedgerTransactionRepository.count(
|
|
85
|
+
dbTransaction,
|
|
86
|
+
);
|
|
87
|
+
this.LedgerNo = `${count + 1}`;
|
|
80
88
|
|
|
81
89
|
return await LedgerTransaction._LedgerTransactionRepository.create(
|
|
82
90
|
{
|
|
83
|
-
|
|
91
|
+
LedgerNo: this.LedgerNo,
|
|
84
92
|
TransactionType: this.TransactionType,
|
|
85
93
|
JournalEntryId: this.JournalEntryId,
|
|
86
94
|
AccountNo: this.AccountNo,
|
|
@@ -135,7 +143,7 @@ export default class LedgerTransaction {
|
|
|
135
143
|
journalEntryId?: string,
|
|
136
144
|
): Promise<any> {
|
|
137
145
|
this.init({
|
|
138
|
-
|
|
146
|
+
LedgerNo: cuid(),
|
|
139
147
|
TransactionType: transactionType,
|
|
140
148
|
JournalEntryId: journalEntryId,
|
|
141
149
|
// Name: journalEntry.Name,
|
|
@@ -17,13 +17,13 @@ import PaymentModel from './payment.entity';
|
|
|
17
17
|
timestamps: false,
|
|
18
18
|
})
|
|
19
19
|
export default class LedgerTransactionModel extends Model {
|
|
20
|
-
@ApiProperty({ type: String, description: '
|
|
20
|
+
@ApiProperty({ type: String, description: 'LedgerNo' })
|
|
21
21
|
@Column({
|
|
22
22
|
primaryKey: true,
|
|
23
23
|
allowNull: false,
|
|
24
24
|
type: DataType.STRING(30),
|
|
25
25
|
})
|
|
26
|
-
|
|
26
|
+
LedgerNo: string;
|
|
27
27
|
|
|
28
28
|
@ApiProperty({
|
|
29
29
|
type: String,
|
package/src/payment/payment.ts
CHANGED
|
@@ -20,7 +20,7 @@ export default class Payment extends AccountSystemEntity {
|
|
|
20
20
|
Currency = 'MYR';
|
|
21
21
|
Amount = 0;
|
|
22
22
|
Status: PaymentStatus;
|
|
23
|
-
|
|
23
|
+
LedgerNo: string;
|
|
24
24
|
TransactionApprovalCode: string;
|
|
25
25
|
TransactionAccountName: string;
|
|
26
26
|
TransactionAccountNo: string;
|
|
@@ -32,6 +32,7 @@ export default class Payment extends AccountSystemEntity {
|
|
|
32
32
|
RelatedObjectId = '';
|
|
33
33
|
RelatedObjectType = '';
|
|
34
34
|
ReceiptDocNo = '';
|
|
35
|
+
_ObjectType: 'Payment';
|
|
35
36
|
|
|
36
37
|
private static _RepositoryBase = new PaymentRepository();
|
|
37
38
|
private static _PaymentItemRepository = new PaymentItemRepository();
|
|
@@ -47,6 +48,10 @@ export default class Payment extends AccountSystemEntity {
|
|
|
47
48
|
return this._PaymentId;
|
|
48
49
|
}
|
|
49
50
|
|
|
51
|
+
get ObjectType() {
|
|
52
|
+
return this._ObjectType;
|
|
53
|
+
}
|
|
54
|
+
|
|
50
55
|
public set PaymentId(id: string) {
|
|
51
56
|
this._PaymentId = id;
|
|
52
57
|
}
|
|
@@ -181,7 +186,7 @@ export default class Payment extends AccountSystemEntity {
|
|
|
181
186
|
ppw.Currency = paymentPaidWithItem.Currency;
|
|
182
187
|
ppw.Amount = paymentPaidWithItem.Amount;
|
|
183
188
|
ppw.Status = paymentPaidWithItem.Status;
|
|
184
|
-
ppw.
|
|
189
|
+
ppw.LedgerNo = paymentPaidWithItem.LedgerNo;
|
|
185
190
|
ppw.RefBank = paymentPaidWithItem.RefBank;
|
|
186
191
|
ppw.RefName = paymentPaidWithItem.RefName;
|
|
187
192
|
ppw.RefNo = paymentPaidWithItem.RefNo;
|
|
@@ -14,6 +14,7 @@ export default class PaymentItem extends ObjectBase {
|
|
|
14
14
|
Name = '';
|
|
15
15
|
Description = '';
|
|
16
16
|
Remarks = '';
|
|
17
|
+
private _ObjectType = 'PaymentItem';
|
|
17
18
|
|
|
18
19
|
get PaymentId() {
|
|
19
20
|
return this._PaymentId;
|
|
@@ -23,6 +24,10 @@ export default class PaymentItem extends ObjectBase {
|
|
|
23
24
|
this._PaymentId = id;
|
|
24
25
|
}
|
|
25
26
|
|
|
27
|
+
get ObjectType() {
|
|
28
|
+
return this._ObjectType;
|
|
29
|
+
}
|
|
30
|
+
|
|
26
31
|
get PayForObjectId() {
|
|
27
32
|
return this._PayForObjectId;
|
|
28
33
|
}
|
|
@@ -9,6 +9,11 @@ export default class PaymentMethod extends ObjectBase {
|
|
|
9
9
|
MethodId = 'New';
|
|
10
10
|
Name = '';
|
|
11
11
|
CompanyId = '';
|
|
12
|
+
private _ObjectType = 'PaymentMethod';
|
|
13
|
+
|
|
14
|
+
get ObjectType() {
|
|
15
|
+
return this._ObjectType;
|
|
16
|
+
}
|
|
12
17
|
|
|
13
18
|
private static _RepositoryBase = new PaymentMethodRepository();
|
|
14
19
|
private static _PaymentMethodTypeRepository =
|
|
@@ -9,6 +9,11 @@ export default class PaymentMethodType extends ObjectBase {
|
|
|
9
9
|
AccountNo = '';
|
|
10
10
|
ProcessingFeeRate = 0.0;
|
|
11
11
|
ProcessingFeeAccountNo = '';
|
|
12
|
+
private _ObjectType = 'PaymentMethodType';
|
|
13
|
+
|
|
14
|
+
get ObjectType() {
|
|
15
|
+
return this._ObjectType;
|
|
16
|
+
}
|
|
12
17
|
|
|
13
18
|
private _DbTransaction: any;
|
|
14
19
|
|
package/src/tax/tax.ts
CHANGED
|
@@ -1,57 +1,61 @@
|
|
|
1
|
-
import { ITaxAttr } from './interfaces/tax-attr.interface';
|
|
2
|
-
|
|
3
|
-
export class Tax {
|
|
4
|
-
private _TaxCode = 'New';
|
|
5
|
-
private _Description: string;
|
|
6
|
-
private _CompanyId: string;
|
|
7
|
-
private _TaxRate = 0;
|
|
8
|
-
private _CreatedById: string;
|
|
9
|
-
private _CreatedAt: Date;
|
|
10
|
-
private _UpdatedById: string;
|
|
11
|
-
private _UpdatedAt: Date;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
this.
|
|
20
|
-
this.
|
|
21
|
-
this.
|
|
22
|
-
this.
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
get
|
|
31
|
-
return this.
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
get
|
|
35
|
-
return this.
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
get
|
|
39
|
-
return this.
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
get
|
|
43
|
-
return this.
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
get
|
|
47
|
-
return this.
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
get
|
|
51
|
-
return this.
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
get
|
|
55
|
-
return this.
|
|
56
|
-
}
|
|
57
|
-
|
|
1
|
+
import { ITaxAttr } from './interfaces/tax-attr.interface';
|
|
2
|
+
|
|
3
|
+
export class Tax {
|
|
4
|
+
private _TaxCode = 'New';
|
|
5
|
+
private _Description: string;
|
|
6
|
+
private _CompanyId: string;
|
|
7
|
+
private _TaxRate = 0;
|
|
8
|
+
private _CreatedById: string;
|
|
9
|
+
private _CreatedAt: Date;
|
|
10
|
+
private _UpdatedById: string;
|
|
11
|
+
private _UpdatedAt: Date;
|
|
12
|
+
private _ObjectType = 'Tax';
|
|
13
|
+
get ObjectType() {
|
|
14
|
+
return this._ObjectType;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
constructor(taxAttr?: ITaxAttr) {
|
|
18
|
+
if (taxAttr) {
|
|
19
|
+
this._TaxCode = taxAttr.TaxCode;
|
|
20
|
+
this._Description = taxAttr.Description;
|
|
21
|
+
this._CompanyId = taxAttr.CompanyId;
|
|
22
|
+
this._TaxRate = taxAttr.TaxRate;
|
|
23
|
+
this._CreatedById = taxAttr.CreatedById;
|
|
24
|
+
this._CreatedAt = taxAttr.CreatedAt;
|
|
25
|
+
this._UpdatedById = taxAttr.UpdatedById;
|
|
26
|
+
this._UpdatedAt = taxAttr.UpdatedAt;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
get TaxCode(): string {
|
|
31
|
+
return this._TaxCode;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
get Description(): string {
|
|
35
|
+
return this._Description;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
get CompanyId(): string {
|
|
39
|
+
return this._CompanyId;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
get TaxRate(): number {
|
|
43
|
+
return this._TaxRate;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
get CreatedById(): string {
|
|
47
|
+
return this._CreatedById;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
get CreatedAt(): Date {
|
|
51
|
+
return this._CreatedAt;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
get UpdatedById(): string {
|
|
55
|
+
return this._UpdatedById;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
get UpdatedAt(): Date {
|
|
59
|
+
return this._UpdatedAt;
|
|
60
|
+
}
|
|
61
|
+
}
|