law-common 11.3.2 → 11.3.3-beta.0
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.
|
@@ -248,7 +248,8 @@ class BillingEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
|
248
248
|
var _a, _b;
|
|
249
249
|
return ((0, utils_1.getDecimalNumberFromString)(this.totalAmount) -
|
|
250
250
|
(this.getTotalAmountRecieved() +
|
|
251
|
-
(0, utils_1.sumNormalised)((_b = (_a = this.billingTransactions) === null || _a === void 0 ? void 0 : _a.filter((transaction) => [billing_transaction_enum_1.BillingTransactionType.CREDIT_NOTE, billing_transaction_enum_1.BillingTransactionType.WRITE_OFF].includes(transaction.type)
|
|
251
|
+
(0, utils_1.sumNormalised)((_b = (_a = this.billingTransactions) === null || _a === void 0 ? void 0 : _a.filter((transaction) => [billing_transaction_enum_1.BillingTransactionType.CREDIT_NOTE, billing_transaction_enum_1.BillingTransactionType.WRITE_OFF].includes(transaction.type) &&
|
|
252
|
+
transaction.status !== billing_transaction_status_enum_1.BillingTransactionStatusEnum.REJECTED)) !== null && _b !== void 0 ? _b : [], "amount")));
|
|
252
253
|
}
|
|
253
254
|
validateAdvanceBillingId(adjustedBillingTransactions) {
|
|
254
255
|
const index = adjustedBillingTransactions.findIndex((item) => item.advanceBillingId === null);
|
|
@@ -261,7 +262,7 @@ class BillingEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
|
261
262
|
}
|
|
262
263
|
getApprovedBillingTransactionsTotalAmount() {
|
|
263
264
|
var _a, _b;
|
|
264
|
-
return (0, utils_1.sumNormalised)((_b = (_a = this.billingTransactions) === null || _a === void 0 ? void 0 : _a.filter((entity) => ![billing_transaction_status_enum_1.BillingTransactionStatusEnum.CREDITNOTE_APPROVAL_PENDING, billing_transaction_status_enum_1.BillingTransactionStatusEnum.WRITEOFF_APPROVAL_PENDING].includes(entity.status))) !== null && _b !== void 0 ? _b : [], "amount");
|
|
265
|
+
return (0, utils_1.sumNormalised)((_b = (_a = this.billingTransactions) === null || _a === void 0 ? void 0 : _a.filter((entity) => ![billing_transaction_status_enum_1.BillingTransactionStatusEnum.CREDITNOTE_APPROVAL_PENDING, billing_transaction_status_enum_1.BillingTransactionStatusEnum.WRITEOFF_APPROVAL_PENDING, billing_transaction_status_enum_1.BillingTransactionStatusEnum.REJECTED].includes(entity.status))) !== null && _b !== void 0 ? _b : [], "amount");
|
|
265
266
|
}
|
|
266
267
|
getCurrentBillingBillingProfile(billingProfiles) {
|
|
267
268
|
const billingParticularsOfCurrentBilling = this.billingProfileParticulars;
|
package/package.json
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "law-common",
|
|
3
|
-
"version": "11.3.
|
|
4
|
-
"description": "",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"files": [
|
|
7
|
-
"dist/**/*"
|
|
8
|
-
],
|
|
9
|
-
"scripts": {
|
|
10
|
-
"clean": "rm -rf dist",
|
|
11
|
-
"build": "npm run clean && tsc",
|
|
12
|
-
"publish:beta": "npm run build && npm version prerelease --preid beta && git push && npm publish --tag beta",
|
|
13
|
-
"publish:beta:link": "npm run build && npm version prerelease --preid beta && git push && npm publish --tag beta && npm run link",
|
|
14
|
-
"publish:patch": "npm version patch && git push && npm run build && npm publish",
|
|
15
|
-
"publish:minor": "npm version minor && git push && npm run build && npm publish",
|
|
16
|
-
"publish:major": "npm verYsion major && git push && npm run build && npm publish",
|
|
17
|
-
"link": "npm run build && npm link",
|
|
18
|
-
"test": "jest",
|
|
19
|
-
"format": "prettier --write .",
|
|
20
|
-
"check-format": "prettier --check .",
|
|
21
|
-
"pull:link": "git pull && npm run link",
|
|
22
|
-
"check-version": "npm view law-common versions --json | jq -r '.[-1]'",
|
|
23
|
-
"script:publish": "node scripts/publish.js",
|
|
24
|
-
"script:publish:latest:beta": "npm run build && node scripts/publish.js prerelease beta && git push",
|
|
25
|
-
"script:publish:latest:patch": "npm run build && node scripts/publish.js patch && git push"
|
|
26
|
-
},
|
|
27
|
-
"keywords": [],
|
|
28
|
-
"author": "",
|
|
29
|
-
"license": "ISC",
|
|
30
|
-
"devDependencies": {
|
|
31
|
-
"@types/jest": "^29.5.13",
|
|
32
|
-
"@types/lodash": "^4.17.21",
|
|
33
|
-
"@types/node": "^22.6.1",
|
|
34
|
-
"jest": "^29.7.0",
|
|
35
|
-
"prettier": "3.8.1",
|
|
36
|
-
"semver": "^7.8.1",
|
|
37
|
-
"ts-jest": "^29.2.5",
|
|
38
|
-
"ts-node": "^10.9.2",
|
|
39
|
-
"typescript": "^5.6.2"
|
|
40
|
-
},
|
|
41
|
-
"dependencies": {
|
|
42
|
-
"@types/express": "^5.0.0",
|
|
43
|
-
"@types/multer": "^1.4.12",
|
|
44
|
-
"date-fns": "^4.1.0",
|
|
45
|
-
"lodash": "4.17.21"
|
|
46
|
-
}
|
|
47
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "law-common",
|
|
3
|
+
"version": "11.3.3-beta.0",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"files": [
|
|
7
|
+
"dist/**/*"
|
|
8
|
+
],
|
|
9
|
+
"scripts": {
|
|
10
|
+
"clean": "rm -rf dist",
|
|
11
|
+
"build": "npm run clean && tsc",
|
|
12
|
+
"publish:beta": "npm run build && npm version prerelease --preid beta && git push && npm publish --tag beta",
|
|
13
|
+
"publish:beta:link": "npm run build && npm version prerelease --preid beta && git push && npm publish --tag beta && npm run link",
|
|
14
|
+
"publish:patch": "npm version patch && git push && npm run build && npm publish",
|
|
15
|
+
"publish:minor": "npm version minor && git push && npm run build && npm publish",
|
|
16
|
+
"publish:major": "npm verYsion major && git push && npm run build && npm publish",
|
|
17
|
+
"link": "npm run build && npm link",
|
|
18
|
+
"test": "jest",
|
|
19
|
+
"format": "prettier --write .",
|
|
20
|
+
"check-format": "prettier --check .",
|
|
21
|
+
"pull:link": "git pull && npm run link",
|
|
22
|
+
"check-version": "npm view law-common versions --json | jq -r '.[-1]'",
|
|
23
|
+
"script:publish": "node scripts/publish.js",
|
|
24
|
+
"script:publish:latest:beta": "npm run build && node scripts/publish.js prerelease beta && git push",
|
|
25
|
+
"script:publish:latest:patch": "npm run build && node scripts/publish.js patch && git push"
|
|
26
|
+
},
|
|
27
|
+
"keywords": [],
|
|
28
|
+
"author": "",
|
|
29
|
+
"license": "ISC",
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"@types/jest": "^29.5.13",
|
|
32
|
+
"@types/lodash": "^4.17.21",
|
|
33
|
+
"@types/node": "^22.6.1",
|
|
34
|
+
"jest": "^29.7.0",
|
|
35
|
+
"prettier": "3.8.1",
|
|
36
|
+
"semver": "^7.8.1",
|
|
37
|
+
"ts-jest": "^29.2.5",
|
|
38
|
+
"ts-node": "^10.9.2",
|
|
39
|
+
"typescript": "^5.6.2"
|
|
40
|
+
},
|
|
41
|
+
"dependencies": {
|
|
42
|
+
"@types/express": "^5.0.0",
|
|
43
|
+
"@types/multer": "^1.4.12",
|
|
44
|
+
"date-fns": "^4.1.0",
|
|
45
|
+
"lodash": "4.17.21"
|
|
46
|
+
}
|
|
47
|
+
}
|