C1-PRLBCVLD
This algorithm will validate the calculated charge with received pre calculated charge. It will compare the benefit records of the membership with Billable charges created for the membership and validate charge mount with received amount(Here threshold is used for calculation)
If any mismatch found then TO DO is created using provided To Do Type and To Do Role. In invoke() method of this algorithm we will perform following logic:
-
Fetch the benefit records of the Membership using benefit sub type which is having Price = Y and Validate = Y.
-
Fetch billable charges created for the membership.
-
Then compare record by executing below logic:
-
If mismatch is there for the amount and start date and end date then create a To Do using provided To Do Type and To Do Role with message 'Received Pre Calculated charges for Membership Id % not matches with calculated charges for Price Item % and benefit id % then add the To Do Id on Membership Log.
-
If start date and end date are matched then:
-
Calculated charge range is receivedMinAmount = Received charge - Threshold amount
-
receivedMaxAmount = Received charge + Threshold Amount
Check the billable charge Amount outside of receivedMinAmount and receivedMaxAmount then create a To Do using provided To Do Type and To Do Role with message 'Received Pre Calculated charges for Membership Id % not matches with calculated charges for Price Item % and benefit id % then add the To Do Id on Membership Log.
-
-