law-common 11.3.3-beta.0 → 11.3.3-beta.1

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/README.md CHANGED
@@ -1 +1 @@
1
- # law-common
1
+ # law-common
@@ -1,5 +1,6 @@
1
1
  export declare enum BillingTimesheetStatusEnum {
2
2
  UNCHANGED = "unchanged",
3
3
  UPDATED = "updated",
4
- DELETED = "deleted"
4
+ DELETED = "deleted",
5
+ NEW = "new"
5
6
  }
@@ -6,4 +6,5 @@ var BillingTimesheetStatusEnum;
6
6
  BillingTimesheetStatusEnum["UNCHANGED"] = "unchanged";
7
7
  BillingTimesheetStatusEnum["UPDATED"] = "updated";
8
8
  BillingTimesheetStatusEnum["DELETED"] = "deleted";
9
+ BillingTimesheetStatusEnum["NEW"] = "new";
9
10
  })(BillingTimesheetStatusEnum || (exports.BillingTimesheetStatusEnum = BillingTimesheetStatusEnum = {}));
@@ -248,8 +248,7 @@ 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) &&
252
- transaction.status !== billing_transaction_status_enum_1.BillingTransactionStatusEnum.REJECTED)) !== null && _b !== void 0 ? _b : [], "amount")));
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))) !== null && _b !== void 0 ? _b : [], "amount")));
253
252
  }
254
253
  validateAdvanceBillingId(adjustedBillingTransactions) {
255
254
  const index = adjustedBillingTransactions.findIndex((item) => item.advanceBillingId === null);
@@ -262,7 +261,7 @@ class BillingEntityModel extends base_entity_model_1.BaseEntityModel {
262
261
  }
263
262
  getApprovedBillingTransactionsTotalAmount() {
264
263
  var _a, _b;
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");
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");
266
265
  }
267
266
  getCurrentBillingBillingProfile(billingProfiles) {
268
267
  const billingParticularsOfCurrentBilling = this.billingProfileParticulars;
package/package.json CHANGED
@@ -1,47 +1,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
- }
1
+ {
2
+ "name": "law-common",
3
+ "version": "11.3.3-beta.1",
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
+ }