@autobusal/routes-order 1.33.4 → 1.33.6

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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.33.6
4
+
5
+ ### Fixed
6
+
7
+ - **The return date strip asks the API for return-leg pricing** (new leg parameter) - it used to quote one-way fares over days the buyer pays the round-trip difference for. (Audit BOOK-02-b; needs obtapi >= 2.4.63.)
8
+
9
+ ## 1.33.5
10
+
11
+ ### Fixed
12
+
13
+ - **The summary's TICKET line shows the gross fare.** With a coupon it used to show the discounted figure AND a discount line - "TICKET 40 / DISCOUNT -5 / TOTAL 40", arithmetic that doesn't add up on screen. (Audit BOOK-09-b.)
14
+
3
15
  ## 1.33.4
4
16
 
5
17
  ### Added
@@ -434,7 +434,12 @@ const Checkout = ({ values, step1, step2, step3, isPartner, t, onStore, onBack }
434
434
  step1={ step1 }
435
435
  step2={ step2 }
436
436
  step3={ step3 }
437
- fare={ total.display }
437
+ /* Claude - 2026-08-22 (audit finding BOOK-09-b): the GROSS
438
+ fare, not the coupon-adjusted `total` - with a coupon the
439
+ summary used to read "TICKET 40 / DISCOUNT -5 / TOTAL 40",
440
+ arithmetic that does not add up on screen. Gross minus the
441
+ discount line now equals the total the buyer pays. */
442
+ fare={ getTotal(step2, step3).display }
438
443
  addons={ addonItems.map(item => ({ label: item.label, value: `${ item.price } ${ currency }` })) }
439
444
  coupon={ coupon }
440
445
  total={ grandTotal }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autobusal/routes-order",
3
- "version": "1.33.4",
3
+ "version": "1.33.6",
4
4
  "author": "Ferjolt Ozuni",
5
5
  "type": "module",
6
6
  "main": "index.ts"
package/services.ts CHANGED
@@ -104,7 +104,11 @@ export const useGetDates = (step1: RoutesSearchForm, type: ('departure' | '_retu
104
104
  .get('/api/routes/search/dates', {
105
105
  params: {
106
106
  ...step,
107
- number
107
+ number,
108
+ // which half of a round trip this strip prices (BOOK-02-b):
109
+ // the from/to swap above handles the direction, this handles
110
+ // the FARE - a return leg sells at adult_return
111
+ leg: type === '_return' ? 'return' : 'departure'
108
112
  }
109
113
  })
110
114
  .then(response => (