Refactoring: Codeunit 226 CustEntry-Apply Posted Entries
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.
-
Method
ApplycallsPaymentToleranceMgt.PmtTolCustwhich is full ofCOMMITs. Are those really required? Please remove them. ASetBlockCommitmight help in some cases, but not in ours, as this codeunit is not directly invoked by us. -
Inside the codeunit itself in
CustPostApplyCustLedgEntrythere is an explicitCOMMIT. I don't see why it would be required.
Need this !
Since time of this request we implemented SetSuppressCommit() procedure here, so you can skip commits if needed.