added logic to only send charges for 1 month loan

This commit is contained in:
Chinenye Nmoh
2026-01-23 20:38:53 +01:00
parent da05ba0f3d
commit 39ea231fa0
+5 -5
View File
@@ -94,7 +94,7 @@ class SimbrellaClient:
insurance_fee = loan_charges.get("INSURANCE")['amount'] insurance_fee = loan_charges.get("INSURANCE")['amount']
debtId = str(loan_data.get('debtId', "")).strip().zfill(6) debtId = str(loan_data.get('debtId', "")).strip().zfill(6)
product_id = str(loan_data.get('productId', ''))
disbursement_data = { disbursement_data = {
"transactionId": loan_data.get('transactionId'), "transactionId": loan_data.get('transactionId'),
"fbnTransactionId": loan_data.get('transactionId'), "fbnTransactionId": loan_data.get('transactionId'),
@@ -103,10 +103,10 @@ class SimbrellaClient:
"accountId": loan_data.get('accountId'), "accountId": loan_data.get('accountId'),
"productId": str(loan_data.get('productId', "")), "productId": str(loan_data.get('productId', "")),
"provideAmount": loan_data.get('currentLoanAmount'), "provideAmount": loan_data.get('currentLoanAmount'),
"collectAmountInterest": interest_fee, "collectAmountInterest": interest_fee if product_id != '3MPC' else 0,
"collectAmountMgtFee": mgt_fee, "collectAmountMgtFee": mgt_fee if product_id != '3MPC' else 0,
"collectAmountInsurance": insurance_fee, "collectAmountInsurance": insurance_fee if product_id != '3MPC' else 0,
"collectAmountVAT": vat_fee, "collectAmountVAT": vat_fee if product_id != '3MPC' else 0,
"countryId": "01", "countryId": "01",
"comment": "Loan Disbursement", "comment": "Loan Disbursement",
} }