turf-common 1.2.1-beta.24 → 1.2.1-beta.25
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.
|
@@ -102,10 +102,10 @@ var ChargesModel = /** @class */ (function () {
|
|
|
102
102
|
};
|
|
103
103
|
ChargesModel.prototype.modify = function (bookingModification) {
|
|
104
104
|
var oldBookingCode = bookingModification.oldBookingCode, newBookingCode = bookingModification.newBookingCode, cancellationUnit = bookingModification.cancellationUnit;
|
|
105
|
-
this.totalBookingHours =
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
105
|
+
// this.totalBookingHours =
|
|
106
|
+
// this.totalBookingHours -
|
|
107
|
+
// oldBookingCode.getTotalTime("hr") +
|
|
108
|
+
// (newBookingCode ? newBookingCode.getTotalTime("hr") : 0);
|
|
109
109
|
if (!newBookingCode) {
|
|
110
110
|
return this.modifyDelete(oldBookingCode, cancellationUnit !== null && cancellationUnit !== void 0 ? cancellationUnit : "");
|
|
111
111
|
}
|
|
@@ -125,7 +125,11 @@ var ChargesModel = /** @class */ (function () {
|
|
|
125
125
|
return null;
|
|
126
126
|
};
|
|
127
127
|
ChargesModel.prototype.modifyExtend = function (oldBookingCode, newBookingCode) {
|
|
128
|
+
var newTotalBookingHours = this.totalBookingHours -
|
|
129
|
+
oldBookingCode.getTotalTime("hr") +
|
|
130
|
+
(newBookingCode ? newBookingCode.getTotalTime("hr") : 0);
|
|
128
131
|
var newChargeModel = this.clone();
|
|
132
|
+
newChargeModel.totalBookingHours = newTotalBookingHours;
|
|
129
133
|
newChargeModel.additionalBookingGrossAmount +=
|
|
130
134
|
newBookingCode.getCost() - oldBookingCode.getCost();
|
|
131
135
|
newChargeModel.netTotal = newChargeModel.getNetAmount();
|