turf-common 1.4.2-beta.15 → 1.4.2-beta.17
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.
|
@@ -226,7 +226,6 @@ var BookingCode = /** @class */ (function () {
|
|
|
226
226
|
if (bookingDelayInMinutes === void 0) { bookingDelayInMinutes = _utils_1.DEFAULT_BOOKING_DELAY_IN_MINUTES; }
|
|
227
227
|
if (date === void 0) { date = date_util_1.dateUtilService.getIndianDate(); }
|
|
228
228
|
var now = date;
|
|
229
|
-
console.log("previousTimeChecker now", now);
|
|
230
229
|
var bookingDate = date_util_1.dateUtilService.convertStringToDate(fromDate.toString() + fromTime, "yyMMddHHmm");
|
|
231
230
|
var difference = bookingDate.getTime() - now.getTime() + bookingDelayInMinutes * 60 * 1000;
|
|
232
231
|
if (difference < 0) {
|
|
@@ -9,15 +9,15 @@ var ChargesModel = /** @class */ (function () {
|
|
|
9
9
|
this.initialBookingGrossAmount = initialGrossAmount;
|
|
10
10
|
this.amountPaid = paidAmount;
|
|
11
11
|
this.couponCode = couponCode;
|
|
12
|
+
this.totalBookingHours = totalBookingHours;
|
|
13
|
+
this.discountPolicy = discountPolicy;
|
|
12
14
|
this.additionalBookingGrossAmount = 0;
|
|
13
15
|
this.cancelledBookingGrossAmount = 0;
|
|
14
16
|
this.totalCancellationCharges = 0;
|
|
15
17
|
this.refundPayable = 0;
|
|
16
18
|
this.totalRefundedAmount = 0;
|
|
17
|
-
this.totalBookingHours = totalBookingHours;
|
|
18
19
|
this.netTotal = this.getNetAmount();
|
|
19
20
|
this.amountPayable = this.getPayableRefundAmount();
|
|
20
|
-
this.discountPolicy = discountPolicy;
|
|
21
21
|
}
|
|
22
22
|
ChargesModel.prototype.getGrossAmount = function () {
|
|
23
23
|
return (this.initialBookingGrossAmount +
|
|
@@ -25,7 +25,6 @@ var ChargesModel = /** @class */ (function () {
|
|
|
25
25
|
this.cancelledBookingGrossAmount);
|
|
26
26
|
};
|
|
27
27
|
ChargesModel.prototype.getNetAmount = function () {
|
|
28
|
-
// console.log("getNetAmount", this.getGrossAmount(), this.getDiscountAmount());
|
|
29
28
|
return this.getGrossAmount() - this.getDiscountAmount();
|
|
30
29
|
};
|
|
31
30
|
ChargesModel.prototype.getDiscountAmount = function () {
|
|
@@ -104,10 +103,6 @@ var ChargesModel = /** @class */ (function () {
|
|
|
104
103
|
};
|
|
105
104
|
ChargesModel.prototype.modify = function (bookingModification) {
|
|
106
105
|
var oldBookingCode = bookingModification.oldBookingCode, newBookingCode = bookingModification.newBookingCode, cancellationUnit = bookingModification.cancellationUnit;
|
|
107
|
-
// this.totalBookingHours =
|
|
108
|
-
// this.totalBookingHours -
|
|
109
|
-
// oldBookingCode.getTotalTime("hr") +
|
|
110
|
-
// (newBookingCode ? newBookingCode.getTotalTime("hr") : 0);
|
|
111
106
|
if (!newBookingCode) {
|
|
112
107
|
return this.modifyDelete(oldBookingCode, cancellationUnit !== null && cancellationUnit !== void 0 ? cancellationUnit : "");
|
|
113
108
|
}
|
|
@@ -153,7 +148,6 @@ var ChargesModel = /** @class */ (function () {
|
|
|
153
148
|
var newChargeModel = this.clone();
|
|
154
149
|
newChargeModel.totalBookingHours = newTotalBookingHours;
|
|
155
150
|
var costDifference = oldBookingCode.getCost() - newBookingCode.getCost();
|
|
156
|
-
// console.log(`costDifference ${costDifference}`);
|
|
157
151
|
newChargeModel.cancelledBookingGrossAmount += costDifference;
|
|
158
152
|
var cancellationCharges = ChargesModel.getDiscountAmount(cancellationUnit, costDifference);
|
|
159
153
|
// console.log(`cancellationCharges ${cancellationCharges}`);
|
|
@@ -225,8 +219,7 @@ var ChargesModel = /** @class */ (function () {
|
|
|
225
219
|
return newChargeModel;
|
|
226
220
|
};
|
|
227
221
|
ChargesModel.prototype.extension = function (extensionBookingCode) {
|
|
228
|
-
var newTotalBookingHours = this.totalBookingHours +
|
|
229
|
-
(extensionBookingCode ? extensionBookingCode.getTotalTime("hr") : 0);
|
|
222
|
+
var newTotalBookingHours = this.totalBookingHours + (extensionBookingCode ? extensionBookingCode.getTotalTime("hr") : 0);
|
|
230
223
|
var newChargeModel = this.clone();
|
|
231
224
|
newChargeModel.totalBookingHours = newTotalBookingHours;
|
|
232
225
|
newChargeModel.additionalBookingGrossAmount += extensionBookingCode.getCost();
|