Rev 37390 |
Last modification |
Compare with Previous |
View Log
| RSS feed
Last modification
- Rev 37400 2026-08-25 20:30:22
- Author: amit
- Log message:
- Merge the three sale-invoice download endpoints into /invoice/download
generateInvoice, generateInvoices and downloadInvoices differed only in how they
resolved the order ids and who was allowed to ask; everything after that was the
same. That drift meant only the single-order download stapled the policy
certificates, so the same invoice pulled from sale history came out without
them. One handler now selects by orderId, partner date range (admin only) or the
caller's own sale-history search, over reusable resolvers plus a shared
render-and-respond step. The old URLs stay as deprecated shims.
The admin range download is now fault tolerant - one unbillable order used to
fail the whole batch.
Remove the commented-out thermal variant of generateInvoice and the unused
paymentOptionIdPaymentOptionMapUsingPaymentOptions. Bump the asset version for
the sale.js change.