@tomei/finance 0.3.22 → 0.3.23
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 +1 -0
- package/dist/finance-company/finance-company.js.map +1 -1
- package/dist/journal-entry/interfaces/journal-entry-attr.interface.d.ts +4 -4
- package/dist/journal-entry/journal-entry.js +17 -8
- package/dist/journal-entry/journal-entry.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/finance-company/finance-company.ts +1 -0
- package/src/journal-entry/interfaces/journal-entry-attr.interface.ts +4 -4
- package/src/journal-entry/journal-entry.ts +9 -8
package/package.json
CHANGED
|
@@ -1034,6 +1034,7 @@ export default class FinanceCompany extends ObjectBase {
|
|
|
1034
1034
|
});
|
|
1035
1035
|
|
|
1036
1036
|
const journalEntry = new JournalEntry(dbTransaction);
|
|
1037
|
+
journalEntry.init({ CompanyId: this.CompanyId });
|
|
1037
1038
|
const transactionDate = new Date();
|
|
1038
1039
|
|
|
1039
1040
|
const debitLT = await journalEntry.newLedgerTransaction(
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export interface IJournalEntryAttr {
|
|
2
|
-
CompanyId
|
|
3
|
-
JournalEntryId
|
|
2
|
+
CompanyId?: string;
|
|
3
|
+
JournalEntryId?: string;
|
|
4
4
|
Date?: Date;
|
|
5
|
-
Name
|
|
5
|
+
Name?: string;
|
|
6
6
|
Description?: string;
|
|
7
7
|
AccSystemRefId?: string;
|
|
8
|
-
PostedToAccSystemYN
|
|
8
|
+
PostedToAccSystemYN?: string;
|
|
9
9
|
PostedById?: string;
|
|
10
10
|
PostedDateTime?: Date;
|
|
11
11
|
}
|
|
@@ -80,7 +80,7 @@ export default class JournalEntry extends AccountSystemEntity {
|
|
|
80
80
|
} else {
|
|
81
81
|
this.init({
|
|
82
82
|
JournalEntryId: cuid(),
|
|
83
|
-
CompanyId:
|
|
83
|
+
CompanyId: '',
|
|
84
84
|
Date: new Date(),
|
|
85
85
|
Name: '',
|
|
86
86
|
Description: '',
|
|
@@ -214,13 +214,14 @@ export default class JournalEntry extends AccountSystemEntity {
|
|
|
214
214
|
// }
|
|
215
215
|
|
|
216
216
|
init(params: IJournalEntryAttr) {
|
|
217
|
-
this.JournalEntryId = params.JournalEntryId;
|
|
218
|
-
this.
|
|
219
|
-
this.
|
|
220
|
-
this.
|
|
221
|
-
this.
|
|
222
|
-
this.
|
|
223
|
-
this.
|
|
217
|
+
if(params.JournalEntryId) this.JournalEntryId = params.JournalEntryId;
|
|
218
|
+
if(params.CompanyId) this.CompanyId = params.CompanyId;
|
|
219
|
+
if(params.Date) this.Date = params.Date;
|
|
220
|
+
if(params.Name) this.Name = params.Name;
|
|
221
|
+
if(params.Description) this.Description = params.Description;
|
|
222
|
+
if(params.PostedById) this.PostedById = params.PostedById;
|
|
223
|
+
if(params.PostedToAccSystemYN) this.PostedToAccSystemYN = params.PostedToAccSystemYN;
|
|
224
|
+
if(params.PostedDateTime) this.PostedDateTime = params.PostedDateTime;
|
|
224
225
|
}
|
|
225
226
|
|
|
226
227
|
getData() {
|