tripstorekrabi-shared 1.13.6 → 1.13.7

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/price.js +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tripstorekrabi-shared",
3
- "version": "1.13.6",
3
+ "version": "1.13.7",
4
4
  "description": "Shared library for Trip Store Krabi",
5
5
  "author": "Stefan Sommer <tonprince@gmail.com>",
6
6
  "repository": {
package/price.js CHANGED
@@ -112,11 +112,11 @@ export function countMaxPeople(pricing) {
112
112
  }
113
113
 
114
114
  export function getTotalAmountToBeReceived(booking) {
115
- return booking.partnerNetPrice + calculateExtraPayments(booking, true);
115
+ return booking.customerPaymentStatus === "Refunded" ? 0 : booking.partnerNetPrice + calculateExtraPayments(booking, true);
116
116
  }
117
117
 
118
118
  export function getTotalOperatorNetPrice(booking) {
119
- return booking.operatorNetPrice + calculateExtraPayments(booking, false);
119
+ return booking.operatorPaymentStatus === "No Charge" ? 0 : booking.operatorNetPrice + calculateExtraPayments(booking, false);
120
120
  }
121
121
 
122
122
  export function calculateTotalPrice(booking, product, mode = "retail") {