Skip to content

Add a flag for avoiding commission recalculation #2

Description

@marcalwestf

As of now, when executing the Complete action, the commission is recalculated all over anew.

Often, the person in charge of the commission runs a calculation and then wants to manipulate the calculation results due to different reasons. It can add or delete lines, modify amounts, etc. depending on managerial decisions.

With the current solution this is no possible, because if for example, the person in charge runs the commission calculation with a Prepare action, change the commission results, and runs Complete, the changes would be lost as in the method MCommissionRun.perpareIt() the commission is calculated anew without condition.

The solution would be to add a flag (for example isRecalculate) which decides in MCommissionRun.perpareIt() whether the calculation has to be executed or not. Other conditions would be if the DocAtion is Complete, and if there are calculated lines.
Default value would be Y and displayed only when field DocStatus==IP (==Prepared).

In our case, the user would call the Prepare action several times. Then it would modify the calculations as desired and set isRecalculate to N. Then it would call Complete, which would do all the steps corresponding to the Complete action, but the commission calculation.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions