@tomei/finance 0.6.75 → 0.6.77

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.6.75",
3
+ "version": "0.6.77",
4
4
  "description": "NestJS package for finance module",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -115,7 +115,7 @@ export default class Document extends AccountSystemEntity {
115
115
  return this._Status;
116
116
  }
117
117
 
118
- private set Status(status: DocumentStatus) {
118
+ public set Status(status: DocumentStatus) {
119
119
  this._Status = status;
120
120
  }
121
121
 
@@ -137,10 +137,6 @@ export default class Document extends AccountSystemEntity {
137
137
  return 'finance_Document';
138
138
  }
139
139
 
140
- public setStatus(status: DocumentStatus) {
141
- this.setStatus(status);
142
- }
143
-
144
140
  constructor(dbTransaction?: any, documentData?: any) {
145
141
  super();
146
142
  if (dbTransaction) {
@@ -1015,7 +1015,7 @@ export default class FinanceCompany extends ObjectBase {
1015
1015
 
1016
1016
  /*Set up the document type*/
1017
1017
  creditNote.DocType = DocType.CREDIT_NOTE;
1018
- creditNote.setStatus(DocumentStatus.SETTLED);
1018
+ creditNote.Status = DocumentStatus.SETTLED;
1019
1019
 
1020
1020
  /*Saving the document and document items to the database*/
1021
1021
  await FinanceCompany._DocumentRepository.create(
@@ -2110,7 +2110,7 @@ export default class FinanceCompany extends ObjectBase {
2110
2110
  for (const receiptItem of receiptItems) {
2111
2111
  await FinanceCompany._DocumentItemRepository.create(
2112
2112
  {
2113
- DocumentItemId: super['_createId'](),
2113
+ DocumentItemId: this._createId().toUpperCase(),
2114
2114
  DocNo: receipt.DocNo,
2115
2115
  Name: receiptItem.Name,
2116
2116
  NameBM: receiptItem.NameBM,
@@ -97,12 +97,12 @@ export default class PaymentItem extends ObjectBase {
97
97
  : paymentItem.Amount;
98
98
  amountPreviouslyPaid += amount;
99
99
  });
100
- if (invoice[0].Amount === amountPreviouslyPaid) {
100
+ if (invoice[0].Amount == amountPreviouslyPaid) {
101
101
  paidStatus = DocumentStatus.SETTLED;
102
102
  } else {
103
103
  paidStatus = DocumentStatus.PARTIALSETTLED;
104
104
  }
105
- } else if (invoice[0].Amount === this.Amount) {
105
+ } else if (invoice[0].Amount == this.Amount) {
106
106
  paidStatus = DocumentStatus.SETTLED;
107
107
  } else {
108
108
  throw new Error(