@tomei/finance 0.3.80 → 0.3.82
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/finance-company/finance-company.js +16 -4
- package/dist/finance-company/finance-company.js.map +1 -1
- package/dist/ledger-transaction/ledger-transaction.js +0 -11
- package/dist/ledger-transaction/ledger-transaction.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/finance-company/finance-company.ts +22 -10
- package/src/ledger-transaction/ledger-transaction.ts +12 -12
package/package.json
CHANGED
|
@@ -360,12 +360,20 @@ export default class FinanceCompany extends ObjectBase {
|
|
|
360
360
|
|
|
361
361
|
const newJournalEntry = await journalEntry.save('test', dbTransaction);
|
|
362
362
|
|
|
363
|
-
const
|
|
364
|
-
await
|
|
363
|
+
for (const ledgerTransaction of debitTransactions) {
|
|
364
|
+
const dt = await ledgerTransaction.newLedgerTransaction(
|
|
365
|
+
TransactionTypeOptions.DEBIT,
|
|
366
|
+
newJournalEntry.JournalEntryId,
|
|
367
|
+
);
|
|
368
|
+
await dt.save();
|
|
369
|
+
}
|
|
365
370
|
|
|
366
|
-
for (const ledgerTransaction of
|
|
367
|
-
|
|
368
|
-
|
|
371
|
+
for (const ledgerTransaction of creditTransactions) {
|
|
372
|
+
const ct = await ledgerTransaction.newLedgerTransaction(
|
|
373
|
+
TransactionTypeOptions.CREDIT,
|
|
374
|
+
newJournalEntry.JournalEntryId,
|
|
375
|
+
);
|
|
376
|
+
await ct.save();
|
|
369
377
|
}
|
|
370
378
|
|
|
371
379
|
await this.AccountingSystem.postJournalEntry(newJournalEntry);
|
|
@@ -1142,12 +1150,16 @@ export default class FinanceCompany extends ObjectBase {
|
|
|
1142
1150
|
Amount: paymentPaidWithItem.Amount,
|
|
1143
1151
|
Status: paymentPaidWithItem.Status,
|
|
1144
1152
|
TransactionId: paymentPaidWithItem.TransactionId,
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1153
|
+
RefBank: paymentPaidWithItem.RefBank,
|
|
1154
|
+
RefName: paymentPaidWithItem.RefName,
|
|
1155
|
+
RefNo: paymentPaidWithItem.RefNo,
|
|
1156
|
+
RefOther1: paymentPaidWithItem.RefOther1,
|
|
1157
|
+
RefOther2: paymentPaidWithItem.RefOther2,
|
|
1158
|
+
RefOther3: paymentPaidWithItem.RefOther3,
|
|
1159
|
+
RefOther4: paymentPaidWithItem.RefOther4,
|
|
1160
|
+
RefOther5: paymentPaidWithItem.RefOther5,
|
|
1150
1161
|
Remarks: paymentPaidWithItem.Remarks,
|
|
1162
|
+
PaymentMediaId: paymentPaidWithItem.PaymentMediaId,
|
|
1151
1163
|
},
|
|
1152
1164
|
{ transaction: dbTransaction },
|
|
1153
1165
|
);
|
|
@@ -2,6 +2,7 @@ import * as cuid from 'cuid';
|
|
|
2
2
|
import { ILedgerTransactionAttr } from './interfaces/ledger-transaction-attr.interface';
|
|
3
3
|
import { TransactionTypeOptions } from '../enum/transaction-type.enum';
|
|
4
4
|
import { LedgerTransactionRepository } from './ledger-transaction.repository';
|
|
5
|
+
import JournalEntryModel from '../models/journal-entry.entity';
|
|
5
6
|
|
|
6
7
|
export default class LedgerTransaction {
|
|
7
8
|
TransactionId = 'New';
|
|
@@ -104,18 +105,17 @@ export default class LedgerTransaction {
|
|
|
104
105
|
TransactionId: cuid(),
|
|
105
106
|
TransactionType: transactionType,
|
|
106
107
|
JournalEntryId: journalEntryId,
|
|
107
|
-
//
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
RelatedPaymentId: '',
|
|
108
|
+
// Name: journalEntry.Name,
|
|
109
|
+
// AccountNo: '',
|
|
110
|
+
// Date: new Date(),
|
|
111
|
+
// Description: journalEntry.Description,
|
|
112
|
+
// Currency: 'MYR',
|
|
113
|
+
// DebitAmount: 0,
|
|
114
|
+
// CreditAmount: 0,
|
|
115
|
+
// RelatedObjectId: '',
|
|
116
|
+
// RelatedObjectType: '',
|
|
117
|
+
// RelatedDocNo: '',
|
|
118
|
+
// RelatedPaymentId: '',
|
|
119
119
|
});
|
|
120
120
|
|
|
121
121
|
if (transactionType === TransactionTypeOptions.DEBIT) {
|