invoice-system-common 1.0.30-beta.4 → 1.0.30-beta.5

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.
@@ -19,7 +19,7 @@ export declare class BillingLineItemCreateModel implements IBillingLineItemCreat
19
19
  /**
20
20
  * Calculates tenureValue based on billing type
21
21
  */
22
- calculateTenureValue(billingTenureInDays: number, billingTenureType: "DAILY" | "MONTHLY"): number;
22
+ calculateTenureValue(billingTenureInDays: number, billingTenureType: "MONTHLY"): number;
23
23
  /**
24
24
  * Returns a clean DTO for API submission
25
25
  */
@@ -35,12 +35,8 @@ class BillingLineItemCreateModel {
35
35
  * Calculates tenureValue based on billing type
36
36
  */
37
37
  calculateTenureValue(billingTenureInDays, billingTenureType) {
38
- if (billingTenureType === "DAILY") {
39
- this.tenureValue = billingTenureInDays;
40
- }
41
- else {
42
- this.tenureValue = billingTenureInDays / this.normalizedTenureInDays;
43
- }
38
+ const noOfDaysForLineItem = new date_utils_1.DateUtils().getDaysBetween(this.startDate, this.endDate);
39
+ this.tenureValue = this.normalizedTenureInDays = noOfDaysForLineItem;
44
40
  return this.tenureValue;
45
41
  }
46
42
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "invoice-system-common",
3
- "version": "1.0.30-beta.4",
3
+ "version": "1.0.30-beta.5",
4
4
  "description": "",
5
5
  "homepage": "https://github.com/Kashyap2210/invoice-system-common#readme",
6
6
  "bugs": {