The Pre_posting_code hook runs before a posting is committed to the ledger . The use of the pre_posting_code is to verify that the
posting is allowed to happen. Checks such as “Would this posting exceed the customer’s maximum balance?” and “Are there any f lag s on this customer’s account
indicating we should stop this posting?” would occur during the pre_posting_code