@tomei/finance 0.3.97 → 0.3.99

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tomei/finance",
3
- "version": "0.3.97",
3
+ "version": "0.3.99",
4
4
  "description": "NestJS package for finance module",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -676,8 +676,8 @@ export default class FinanceCompany extends ObjectBase {
676
676
  ct.Currency = currency ? currency : 'MYR';
677
677
  ct.CreditAmount = creditAmount ? creditAmount : 0.0;
678
678
  ct.Date = transactionDate;
679
- ct.Description = `${purpose}`;
680
- ct.Name = account.Name;
679
+ ct.Description = customer.FullName;
680
+ ct.Name = customer.FullName;
681
681
  ct.RelatedDocNo = invoice.DocNo;
682
682
 
683
683
  await this.postJournal(dbTransaction, journalEntry);
@@ -219,8 +219,10 @@ export default class JournalEntry extends AccountSystemEntity {
219
219
  async newLedgerTransaction(
220
220
  transactionType: TransactionTypeOptions,
221
221
  ): Promise<LedgerTransaction> {
222
- const ledgerTransaction = new LedgerTransaction(this._DbTransaction);
223
- ledgerTransaction.TransactionType = transactionType;
222
+ const ledgerTransaction = new LedgerTransaction(
223
+ transactionType,
224
+ this._DbTransaction,
225
+ );
224
226
  ledgerTransaction.JournalEntryId = this.JournalEntryId;
225
227
 
226
228
  if (transactionType === TransactionTypeOptions.DEBIT) {
@@ -25,7 +25,12 @@ export default class LedgerTransaction {
25
25
  private static _LedgerTransactionRepository =
26
26
  new LedgerTransactionRepository();
27
27
 
28
- constructor(dbTransaction?: any, transactionId?: string) {
28
+ constructor(
29
+ transactionType: TransactionTypeOptions,
30
+ dbTransaction?: any,
31
+ transactionId?: string,
32
+ ) {
33
+ this.TransactionType = transactionType;
29
34
  if (dbTransaction) {
30
35
  this._DbTransaction = dbTransaction;
31
36
  }