code change · fixFinanceofficial - Microsoftreviewed - checked by Opus

#9789 [Main]-Payment discount tolerance is doubled when posting a vendor payment

Fixed a bug where payment discount tolerance was calculated twice for vendor payments with Applies-to ID in foreign currency, causing inflated bank amounts and sign errors in GL entries.

Pull request · merged into main (BC30) on 2026-07-31 by DhavalMore88 (community contribution) · 7 files (+506 -10), 5 AL · fix · tier official · reviewed (checked by Opus)

What changed

  • Removed the GenJnlLineApplID = ‘’ guard so the netted payment amount is saved to the journal line in the Applies-to ID case
  • Added a re-entrancy guard in PmtTolGenJnl to stop recursion when Amount is validated
  • Vendor payments applied to several invoices in foreign currency no longer double the discount tolerance
  • Fix made in the W1, CH, FR, IT and NL layers; customer path unchanged
  • Regression tests added in W1 and IT vendor payment tolerance test codeunits
  • Behaviour changes for users or extensions.

AL objects touched

Context

  • Work items: AB#644282
  • Labels: ADO: Sync, From Fork, Team: Finance
  • Systems: finance

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).