ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

Refactoring: Codeunit 226 CustEntry-Apply Posted Entries

Open hemisphera opened this issue 7 years ago • 2 comments

Codeunit 226 CustEntry-Apply Posted Entries has a series of issues that prevent us from using it in the following case:

We need to post and immediately & automatically apply a partial payment with special VAT setups during posting of an invoice. This is because of local fiscal regulations.

The problem is that this codeunit explicitly and implicitly issues COMMITs that might leave us with partially posted stuff.

  1. Method Apply calls PaymentToleranceMgt.PmtTolCust which is full of COMMITs. Are those really required? Please remove them. A SetBlockCommit might help in some cases, but not in ours, as this codeunit is not directly invoked by us.

  2. Inside the codeunit itself in CustPostApplyCustLedgEntry there is an explicit COMMIT. I don't see why it would be required.

hemisphera avatar May 15 '19 14:05 hemisphera

Need this !

AndreaDiCeglie avatar Jul 01 '19 13:07 AndreaDiCeglie

Since time of this request we implemented SetSuppressCommit() procedure here, so you can skip commits if needed.

AlexanderYakunin avatar Jul 08 '20 08:07 AlexanderYakunin