@tomei/finance 0.3.57 → 0.3.58
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/customer/customer.d.ts +7 -3
- package/dist/customer/customer.js +7 -4
- package/dist/customer/customer.js.map +1 -1
- package/dist/document/document.d.ts +1 -1
- package/dist/document/document.js +8 -2
- package/dist/document/document.js.map +1 -1
- package/dist/finance-company/finance-company.js.map +1 -1
- package/dist/ledger-transaction/ledger-transaction.d.ts +1 -0
- package/dist/ledger-transaction/ledger-transaction.js +1 -0
- package/dist/ledger-transaction/ledger-transaction.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/customer/customer.ts +17 -8
- package/src/document/document.ts +8 -3
- package/src/finance-company/finance-company.ts +1 -0
- package/src/ledger-transaction/ledger-transaction.ts +1 -0
- package/CHANGELOG.md +0 -1
package/package.json
CHANGED
package/src/customer/customer.ts
CHANGED
|
@@ -19,6 +19,15 @@ export default abstract class FinanceCustomerBase
|
|
|
19
19
|
extends AccountSystemEntity
|
|
20
20
|
implements IPerson
|
|
21
21
|
{
|
|
22
|
+
CustomerId = 'New';
|
|
23
|
+
CustSystemCode = '';
|
|
24
|
+
CustSystemRefId = '';
|
|
25
|
+
|
|
26
|
+
protected abstract ParentARAccountNo: string;
|
|
27
|
+
protected abstract ParentAPAccountNo: string;
|
|
28
|
+
protected abstract ARAccountNo: string;
|
|
29
|
+
protected abstract APAccountNo: string;
|
|
30
|
+
|
|
22
31
|
abstract FullName: string;
|
|
23
32
|
abstract IDNo: string;
|
|
24
33
|
abstract IDType: string;
|
|
@@ -49,10 +58,6 @@ export default abstract class FinanceCustomerBase
|
|
|
49
58
|
}
|
|
50
59
|
|
|
51
60
|
protected static _FinanceCustomerRepository = new FinanceCustomerRepository();
|
|
52
|
-
|
|
53
|
-
CustomerId: string;
|
|
54
|
-
CustSystemCode: string;
|
|
55
|
-
CustSystemRefId: string;
|
|
56
61
|
RepositoryBase: IRepositoryBase<any>;
|
|
57
62
|
|
|
58
63
|
constructor(
|
|
@@ -140,8 +145,10 @@ export default abstract class FinanceCustomerBase
|
|
|
140
145
|
this._AccountReceivable.OwnerId = accountData.OwnerId;
|
|
141
146
|
this._AccountReceivable.OwnerType = accountData.OwnerType;
|
|
142
147
|
} else {
|
|
143
|
-
this._AccountReceivable.AccountNo = `${this.CustSystemCode}-AR-123456789`;
|
|
144
|
-
this._AccountReceivable.ParentAccountNo = `${this.CustSystemCode}-AR`;
|
|
148
|
+
// this._AccountReceivable.AccountNo = `${this.CustSystemCode}-AR-123456789`;
|
|
149
|
+
// this._AccountReceivable.ParentAccountNo = `${this.CustSystemCode}-AR`;
|
|
150
|
+
this._AccountReceivable.AccountNo = this.ARAccountNo; //SystemInfo.SYSTEM_CODE + '-AR-' + '8 digit running no'
|
|
151
|
+
this._AccountReceivable.ParentAccountNo = this.ParentARAccountNo; //SystemInfo.SYSTEM_CODE + '-AR'
|
|
145
152
|
this._AccountReceivable.AccountType = 'Account Receivable';
|
|
146
153
|
this._AccountReceivable.OwnerId = this.CustomerId;
|
|
147
154
|
this._AccountReceivable.OwnerType = type(this);
|
|
@@ -183,8 +190,10 @@ export default abstract class FinanceCustomerBase
|
|
|
183
190
|
this._AccountPayable.OwnerId = accountData.OwnerId;
|
|
184
191
|
this._AccountPayable.OwnerType = accountData.OwnerType;
|
|
185
192
|
} else {
|
|
186
|
-
this._AccountPayable.AccountNo = `${this.CustSystemCode}-AP-123456789`;
|
|
187
|
-
this._AccountPayable.ParentAccountNo = `${this.CustSystemCode}-AP`;
|
|
193
|
+
// this._AccountPayable.AccountNo = `${this.CustSystemCode}-AP-123456789`;
|
|
194
|
+
// this._AccountPayable.ParentAccountNo = `${this.CustSystemCode}-AP`;
|
|
195
|
+
this._AccountPayable.AccountNo = this.APAccountNo; //SystemInfo.SYSTEM_CODE + '-AP-' + '8 digit running no'
|
|
196
|
+
this._AccountPayable.ParentAccountNo = this.ParentAPAccountNo; //SystemInfo.SYSTEM_CODE + '-AP'
|
|
188
197
|
this._AccountPayable.AccountType = 'Account Payable';
|
|
189
198
|
this._AccountPayable.OwnerId = this.CustomerId;
|
|
190
199
|
this._AccountPayable.OwnerType = type(this);
|
package/src/document/document.ts
CHANGED
|
@@ -517,10 +517,15 @@ export default class Document extends AccountSystemEntity {
|
|
|
517
517
|
*
|
|
518
518
|
* @returns {DocumentItem}
|
|
519
519
|
*/
|
|
520
|
-
async newDocumentItem(documentItem?:
|
|
521
|
-
|
|
520
|
+
async newDocumentItem(documentItem?: DocumentItem): Promise<DocumentItem> {
|
|
521
|
+
let di: DocumentItem;
|
|
522
|
+
if (documentItem) {
|
|
523
|
+
di = documentItem;
|
|
524
|
+
} else {
|
|
525
|
+
di = new DocumentItem(this._DbTransaction, this);
|
|
526
|
+
}
|
|
522
527
|
di.DocNo = this.DocNo;
|
|
523
|
-
this._DocumentItems.push(
|
|
528
|
+
this._DocumentItems.push(di);
|
|
524
529
|
return documentItem;
|
|
525
530
|
}
|
|
526
531
|
|
|
@@ -567,6 +567,7 @@ export default class FinanceCompany extends ObjectBase {
|
|
|
567
567
|
} else {
|
|
568
568
|
/*todo: check config file to see which invoice template is to be used for specific project*/
|
|
569
569
|
/*Generating invoice based on template*/
|
|
570
|
+
/*note: had to comment this due to unresolved */
|
|
570
571
|
// invoice.generateInvoice(invoice.IssuedById);
|
|
571
572
|
}
|
|
572
573
|
|
package/CHANGELOG.md
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
RELEASE 1.0.0
|