mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-26 18:42:49 +00:00
The chief's typed advance was mandatory, so the rule-based estimate shown in the approve dialog had to be retyped and could silently diverge from it. advanceAmount is now optional: the advance defaults to the live last-mile rate estimate (km x rate) and the typed value is only an override. When no rate covers the job the request is rejected with a message telling the chief to enter the amount manually, rather than approving a zero advance. The advance invoice now bills in the rate's currency from the snapshotted contract summary, falling back to the booking payment currency only when the amount came from a manual override. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>