**What** Fix system error (500) with DraftOrder create operation when payload includes discount in a tax-inclusive context. **How** * Ensure newly created cart contains all required relation in order to calculate line item tax-inclusive pricing with discounts. * Add resilience to TotalsService.getLineDiscounts() * Ensure newly generate line items have variant relation loaded. * fix TotalsService.getLineItemTotals to use the passed lineItem instead of relying on cartOrOrder.items. **Test** * Unit: * TotalsService.getLineDiscounts - coverage * Integration: * Admin API draft-order - coverage * Admin API draft-order create w/ discount in tax-inclusive Resolves: CORE-771 Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com> Co-authored-by: Adrien de Peretti <25098370+adrien2p@users.noreply.github.com>
Changesets
Hello and welcome! This folder has been automatically generated by @changesets/cli, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it in our repository
We have a quick list of common questions to get you started engaging with this project in our documentation