collectionPriorityOrder function conditional overview
========================================================

1. The function checks the latest "mfn_product_priority_config" configuration for transaction handling.
2. If the configuration is set, it executes the next step; otherwise, it generates an exception.
3. The function then finds member information by searching the account ID in the SOAP request.
4. It collects all account information for that particular member to proceed to the next step.
5. The function sets the transaction software date using the "getSoftwareDateBranchWise" function based on the member's branch.
6. It identifies the specific payment ledger configuration for "bkash," considering the bank payment ledger, using the "getAccountPaymentLedgerConfig($memberInfo->branchId, 'bkash')" function.
7. The function now sets up the totalpayAmountBalance for the SOAP request pay amount.
8. The main calculation and conditions start here.
9. The function initiates calculation and continues until the balance exists.
10. It calls a foreach loop based on the "collectionPriorityData."
11. In the first loop call, it checks the first priority product. For instance, if the loan product is the first priority, the amount is set to that member's loan account.
12. If the receivable amount is less than the pay amount, the receivable amount is set on that particular loan account. The receivable amount cannot be 0.
13. Otherwise, if the receivable amount is greater than the pay amount, the pay amount is set to the particular account.
14. This process checks all priority loops, setting the pay amount balance accordingly.
15. Once the priority-wise collection check loop is completed, the function starts another check if the balance still exists after finishing the priority-wise collection loop.
16. If the balance amount is still present, for example, 600 after completing the priority collection loop, the function checks for any savings accounts belonging to the member. If such accounts exist, the function checks for the existence of a regular savings account. If a regular savings account exists, the remaining balance is set to the regular savings account. If there is no regular savings account, the function looks for any savings account. If one exists, the rest of the amount is set to that savings account.
17. If there are no savings accounts, the function then searches for the loan account. It sets the remaining balance to the loan account based on the condition that the balance pay amount is not greater than that loan account's outstanding balance.
18. Once the balance amount equals 0, the function terminates.