code change · fixSales & Receivablesofficial - Microsoftreviewed - checked by Opus

#9222 [Main]- When issuing a prepayment invoice with an invoice discount applied, the prepayment amount does not take into account the total amount including tax.

Fixed an issue where prepayment invoices with invoice discounts applied were not correctly including tax when the prepayment include tax setting was enabled. The reconciliation logic now uses the tax-inclusive amount as the target when calculating the prepayment difference.

Pull request · merged into main (BC30) on 2026-07-14 by DhavalMore88 (community contribution) · 3 files (+166 -3), 1 AL · fix · tier official · reviewed (checked by Opus)

What changed

  • Prepayment amount calculation now properly accounts for tax when invoice discount is applied
  • The UpdateDifferenceAmount procedure uses tax-inclusive amount for reconciliation when Prepmt. Include Tax is true
  • Issue only affected the invoice-discount code path; non-discount and non-include-tax scenarios unaffected
  • Added test cases for Canada and US locales to verify correct tax handling
  • Behaviour changes for users or extensions.

AL objects touched

Context

  • Work items: AB#641621
  • Labels: ADO: Sync, From Fork, Team: Finance
  • Systems: sales

Source: metadata of a merged pull request in microsoft/BCApps (bcapps): title, labels, changed paths and counts, with a summary in our words. No source text and no description beyond one short quote (D10, D61).