NOTICE: All information contained herein is, and remains
the property of TechnoCore.
The intellectual and technical concepts contained
herein are proprietary to TechnoCore and dissemination of this information or reproduction of this material
is strictly forbidden unless prior written permission is obtained
from TechnoCore.
ObjTextFHSettlement is a Python module for calculating the settlement amount for a hire purchase (HP) agreement. It retrieves contract details from the database and uses financial calculations to determine the outstanding balance, including interest adjustments.
numpy.ipmt to calculate interest portions of payments.trader database.__init__(self, db_connection: DatabaseConnection = 0, page=0)Initializes the ObjTextFHSettlement object.
DatabaseConnection object for database operations.compute_settle(self, contract)Performs the core settlement calculation for a single contract.
compute(self, param_1="", ...)Orchestrates the settlement calculation, either for a single contract or for all contracts requiring an update.
Process(self, param_1="", ...)The main entry point for calculating the settlement amount.
To calculate the settlement amount for a specific contract:
import ObjTextFHSettlement
# Initialize the object with a database connection
settlement_calculator = ObjTextFHSettlement.ObjProcessText(db_connection=db)
# Calculate the settlement for a contract
contract_id = "202-112563-01"
settlement_amount = settlement_calculator.Process(contract_id)
print(f"The settlement amount for contract {contract_id} is {settlement_amount}")