code change · fixService Managementofficial - Microsoftreviewed - checked by Opus

#10345 [Main][ALL-E]Issues with Service Contract Invoicing and Retrospective Billing--when the second unposted Service Invoice is deleted the values on the Service Contract are no longer reset--The "Invoiced to Date" field does not resetInitial commit

Fixed an issue where the Invoiced to Date field on service contracts failed to reset when a second unposted service invoice was deleted, by improving the logic to count only non-reversed ledger entries.

Pull request · merged into main (BC30) on 2026-09-03 by sanjmaurya · 3 files (+135 -11), 2 AL · fix · tier official · reviewed (checked by Opus)

What changed

  • Deleting a second unposted service invoice now resets Invoiced to Date on the contract lines
  • Reversed ledger entry pairs left by earlier deleted invoices are now ignored
  • Invoiced to Date resets to a blank date (0D) on each invoice deletion
  • Only original Sale entries that have no reversing entry count as invoiced
  • A correct new service invoice can be created again after the deletions
  • Behaviour changes for users or extensions.

AL objects touched

Context

  • Work items: AB#647165
  • Labels: Team: SCM
  • Systems: service
  • From the description: “Change CalcContractLineInvoicedToDate to count only real, non-reversed invoicing.”

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