@tomei/finance 0.6.44 → 0.6.45

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.
@@ -18,6 +18,10 @@ module.exports = {
18
18
  primaryKey: true,
19
19
  allowNull: false,
20
20
  },
21
+ JournalBatchNo: {
22
+ type: Sequelize.STRING(30),
23
+ allowNull: true,
24
+ },
21
25
  Date: {
22
26
  type: Sequelize.DATE,
23
27
  allowNull: true,
@@ -12,10 +12,6 @@ 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
- },
19
15
  JournalEntryId: {
20
16
  type: Sequelize.STRING(30),
21
17
  allowNull: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tomei/finance",
3
- "version": "0.6.44",
3
+ "version": "0.6.45",
4
4
  "description": "NestJS package for finance module",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -1396,8 +1396,8 @@ export default class FinanceCompany extends ObjectBase {
1396
1396
  debitLT.Date = transactionDate;
1397
1397
  debitLT.Description = 'Payment Received'; //customer.FullName;
1398
1398
  debitLT.Name = customer.FullName;
1399
- debitLT.RelatedObjectId = receipt.RelatedObjectId;
1400
- debitLT.RelatedObjectType = payment.RelatedObjectType;
1399
+ debitLT.RelatedObjectId = payment.PaymentId;
1400
+ debitLT.RelatedObjectType = type(payment);
1401
1401
  debitLT.RelatedPaymentId = payment.PaymentId;
1402
1402
 
1403
1403
  const creditLT = await journalEntry.newLedgerTransaction(
@@ -1415,8 +1415,8 @@ export default class FinanceCompany extends ObjectBase {
1415
1415
  creditLT.Date = transactionDate;
1416
1416
  creditLT.Description = 'Payment Received'; //paymentMethodType.Name;
1417
1417
  creditLT.Name = paymentMethodType.Name;
1418
- creditLT.RelatedObjectId = receipt.RelatedObjectId;
1419
- creditLT.RelatedObjectType = payment.RelatedObjectType;
1418
+ creditLT.RelatedObjectId = payment.PaymentId;
1419
+ creditLT.RelatedObjectType = type(payment);
1420
1420
  creditLT.RelatedPaymentId = payment.PaymentId;
1421
1421
 
1422
1422
  await this.postJournal(dbTransaction, journalEntry, loginUser);