Skip to content

Implement repricing flow and service rate fixes#233

Merged
roncodes merged 11 commits intomainfrom
feature/fleetops-repricing-service-rate-fixes
Apr 24, 2026
Merged

Implement repricing flow and service rate fixes#233
roncodes merged 11 commits intomainfrom
feature/fleetops-repricing-service-rate-fixes

Conversation

@roncodes
Copy link
Copy Markdown
Member

Summary

  • implement the repricing flow around order.purchase_rate_uuid as the canonical applied pricing link
  • create and attach a fresh purchase rate + transaction on quote application, then void the superseded transaction
  • fix service rate calculation and editing gaps across per-meter, parcel, per-drop, and algorithm-based pricing
  • prevent the order details route from tearing down when switching between child tabs

What Changed

  • removed the mistaken service_quote_uuid field from the order resource output
  • updated purchase-rate application so existing orders attach the newly created purchase rate correctly
  • added Order::attachPurchaseRate() to move the order to the new purchase rate and transaction while voiding the prior transaction
  • updated order read paths to consistently include purchaseRate.serviceQuote.items
  • added distance-unit normalization for m, km, ft, yd, and mi
  • added backend support for the parcel calculation method
  • expanded algorithm variables to include count-based values such as stops, waypoints, parcels, entities, and base fee
  • aligned algorithm validation with the actual runtime expression surface
  • fixed the order details route cleanup logic so tab switches no longer trigger full teardown

Verification

  • php -l server/src/Http/Controllers/Api/v1/OrderController.php
  • php -l server/src/Models/Order.php
  • php -l server/src/Models/ServiceRate.php
  • php -l server/src/Observers/PurchaseRateObserver.php
  • added route regression coverage in tests/unit/routes/operations/orders/index/details-test.js

Notes

  • full Ember test execution was not completed in the sandbox because the local runner attempted to bind a restricted port
  • style-only lint/prettier cleanup was intentionally left out of scope for this PR

@roncodes roncodes merged commit 35263ce into main Apr 24, 2026
7 checks passed
@roncodes roncodes deleted the feature/fleetops-repricing-service-rate-fixes branch April 24, 2026 03:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant