@tomei/finance 0.6.64 → 0.6.67
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/enum/index.d.ts +2 -1
- package/dist/enum/index.js +3 -1
- package/dist/enum/index.js.map +1 -1
- package/dist/finance-company/finance-company.js +8 -8
- package/dist/finance-company/finance-company.js.map +1 -1
- package/dist/tax/tax.d.ts +1 -0
- package/dist/tax/tax.js +1 -0
- package/dist/tax/tax.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +6 -6
- package/src/enum/index.ts +2 -0
- package/src/finance-company/finance-company.ts +9 -9
- package/src/tax/tax.ts +2 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tomei/finance",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.67",
|
|
4
4
|
"description": "NestJS package for finance module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
"@nestjs/platform-express": ">=9.0.8",
|
|
36
36
|
"@nestjs/sequelize": ">=9.0.0",
|
|
37
37
|
"@nestjs/swagger": ">=6.1.4",
|
|
38
|
-
"@tomei/activity-history": "^0.2.
|
|
39
|
-
"@tomei/config": "^0.3.
|
|
40
|
-
"@tomei/general": "^0.
|
|
41
|
-
"@tomei/media": "^0.
|
|
42
|
-
"@tomei/sso": "^0.
|
|
38
|
+
"@tomei/activity-history": "^0.2.15",
|
|
39
|
+
"@tomei/config": "^0.3.10",
|
|
40
|
+
"@tomei/general": "^0.11.8",
|
|
41
|
+
"@tomei/media": "^0.7.0",
|
|
42
|
+
"@tomei/sso": "^0.21.13",
|
|
43
43
|
"axios": "^1.6.0",
|
|
44
44
|
"class-transformer": "^0.5.1",
|
|
45
45
|
"class-validator": "^0.14.0",
|
package/src/enum/index.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { TransactionTypeOptions } from './transaction-type.enum';
|
|
|
5
5
|
import { DocType } from './doc-type.enum';
|
|
6
6
|
import { DocumentStatus } from './document-status.enum';
|
|
7
7
|
import { PaymentStatus } from './payment-status.enum';
|
|
8
|
+
import { PaymentPaidWithStatus } from './payment-status.enum';
|
|
8
9
|
|
|
9
10
|
export {
|
|
10
11
|
ClientScopes,
|
|
@@ -14,4 +15,5 @@ export {
|
|
|
14
15
|
DocType,
|
|
15
16
|
DocumentStatus,
|
|
16
17
|
PaymentStatus,
|
|
18
|
+
PaymentPaidWithStatus,
|
|
17
19
|
};
|
|
@@ -324,7 +324,7 @@ export default class FinanceCompany extends ObjectBase {
|
|
|
324
324
|
);
|
|
325
325
|
|
|
326
326
|
const activity = new Activity();
|
|
327
|
-
activity.ActivityId = this.
|
|
327
|
+
activity.ActivityId = this._createId().toUpperCase();
|
|
328
328
|
activity.Action = ActionEnum.ADD;
|
|
329
329
|
activity.Description = 'Add Finance Customer';
|
|
330
330
|
activity.EntityType = 'FinanceCustomer';
|
|
@@ -332,7 +332,7 @@ export default class FinanceCompany extends ObjectBase {
|
|
|
332
332
|
activity.EntityValueBefore = JSON.stringify({});
|
|
333
333
|
activity.EntityValueAfter = JSON.stringify(newCustomer);
|
|
334
334
|
|
|
335
|
-
await activity.create(loginUser, dbTransaction);
|
|
335
|
+
await activity.create(loginUser.ObjectId, dbTransaction);
|
|
336
336
|
|
|
337
337
|
return customer;
|
|
338
338
|
} catch (error) {
|
|
@@ -611,7 +611,7 @@ export default class FinanceCompany extends ObjectBase {
|
|
|
611
611
|
for (const documentItem of documentItems) {
|
|
612
612
|
await FinanceCompany._DocumentItemRepository.create(
|
|
613
613
|
{
|
|
614
|
-
DocumentItemId: this.
|
|
614
|
+
DocumentItemId: this._createId().toUpperCase(),
|
|
615
615
|
DocNo: invoice.DocNo,
|
|
616
616
|
Name: documentItem.Name,
|
|
617
617
|
NameBM: documentItem.NameBM,
|
|
@@ -782,7 +782,7 @@ export default class FinanceCompany extends ObjectBase {
|
|
|
782
782
|
|
|
783
783
|
/*Set up the document type*/
|
|
784
784
|
invoice.DocType = DocType.DEBIT_NOTE;
|
|
785
|
-
// invoice.DocNo = this.
|
|
785
|
+
// invoice.DocNo = this._createId().toUpperCase();
|
|
786
786
|
|
|
787
787
|
/*Saving the document and document items to the database*/
|
|
788
788
|
await FinanceCompany._DocumentRepository.create(
|
|
@@ -821,7 +821,7 @@ export default class FinanceCompany extends ObjectBase {
|
|
|
821
821
|
documentItems.forEach(async (documentItem) => {
|
|
822
822
|
await FinanceCompany._DocumentItemRepository.create(
|
|
823
823
|
{
|
|
824
|
-
DocumentItemId: this.
|
|
824
|
+
DocumentItemId: this._createId().toUpperCase(),
|
|
825
825
|
DocNo: documentItem.DocNo,
|
|
826
826
|
Name: documentItem.Name,
|
|
827
827
|
NameBM: documentItem.NameBM,
|
|
@@ -1038,7 +1038,7 @@ export default class FinanceCompany extends ObjectBase {
|
|
|
1038
1038
|
for (const docItem of documentItems) {
|
|
1039
1039
|
await FinanceCompany._DocumentItemRepository.create(
|
|
1040
1040
|
{
|
|
1041
|
-
DocumentItemId: this.
|
|
1041
|
+
DocumentItemId: this._createId().toUpperCase(),
|
|
1042
1042
|
DocNo: docItem.DocNo,
|
|
1043
1043
|
Name: docItem.Name,
|
|
1044
1044
|
NameBM: docItem.NameBM,
|
|
@@ -1203,7 +1203,7 @@ export default class FinanceCompany extends ObjectBase {
|
|
|
1203
1203
|
}
|
|
1204
1204
|
|
|
1205
1205
|
/*Saving payment, payment items, and payment paid with details to the database*/
|
|
1206
|
-
payment.PaymentId = this.
|
|
1206
|
+
payment.PaymentId = this._createId().toUpperCase();
|
|
1207
1207
|
payment.PaymentType = PaymentType.PAYMENT_RECEIVED;
|
|
1208
1208
|
payment.ReceivedBy = loginUser.ObjectId;
|
|
1209
1209
|
payment.IssuedBy = loginUser.ObjectId;
|
|
@@ -1328,7 +1328,7 @@ export default class FinanceCompany extends ObjectBase {
|
|
|
1328
1328
|
);
|
|
1329
1329
|
}
|
|
1330
1330
|
|
|
1331
|
-
payment.PaymentId = this.
|
|
1331
|
+
payment.PaymentId = this._createId().toUpperCase();
|
|
1332
1332
|
payment.PaymentType = PaymentType.PAYOUT;
|
|
1333
1333
|
payment.ReceivedBy = loginUser.ObjectId;
|
|
1334
1334
|
payment.IssuedBy = loginUser.ObjectId;
|
|
@@ -1797,7 +1797,7 @@ export default class FinanceCompany extends ObjectBase {
|
|
|
1797
1797
|
//Part 4: Saving Payment, Payment Items and Payment Paid with Details to the Database
|
|
1798
1798
|
|
|
1799
1799
|
//Set below Payment attributes:
|
|
1800
|
-
payment.PaymentId = this.
|
|
1800
|
+
payment.PaymentId = this._createId().toUpperCase();
|
|
1801
1801
|
payment.PaymentType = PaymentType.PAYMENT_RECEIVED;
|
|
1802
1802
|
payment.ReceivedBy = loginUser.ObjectId;
|
|
1803
1803
|
payment.IssuedBy = loginUser.ObjectId;
|
package/src/tax/tax.ts
CHANGED
|
@@ -5,6 +5,7 @@ export class Tax extends ObjectBase {
|
|
|
5
5
|
ObjectName: string;
|
|
6
6
|
TableName: string;
|
|
7
7
|
ObjectId = 'New';
|
|
8
|
+
private _TaxCode: string;
|
|
8
9
|
private _Description: string;
|
|
9
10
|
private _CompanyId: string;
|
|
10
11
|
private _TaxRate = 0;
|
|
@@ -19,6 +20,7 @@ export class Tax extends ObjectBase {
|
|
|
19
20
|
}
|
|
20
21
|
|
|
21
22
|
set TaxCode(code: string) {
|
|
23
|
+
this._TaxCode = code;
|
|
22
24
|
this.ObjectId = code;
|
|
23
25
|
}
|
|
24
26
|
|