Use adjustment amounts in pending principal amnt
diff --git a/erpnext/loan_management/doctype/loan_repayment/loan_repayment.py b/erpnext/loan_management/doctype/loan_repayment/loan_repayment.py
index 3c2e500..7b0028d 100644
--- a/erpnext/loan_management/doctype/loan_repayment/loan_repayment.py
+++ b/erpnext/loan_management/doctype/loan_repayment/loan_repayment.py
@@ -627,7 +627,8 @@
if loan.status in ("Disbursed", "Closed") or loan.disbursed_amount >= loan.loan_amount:
pending_principal_amount = (
flt(loan.total_payment)
- + flt(loan.adjustment_amount)
+ + flt(loan.debit_adjustment_amount)
+ - flt(loan.credit_adjustment_amount)
- flt(loan.total_principal_paid)
- flt(loan.total_interest_payable)
- flt(loan.written_off_amount)
@@ -635,7 +636,8 @@
else:
pending_principal_amount = (
flt(loan.disbursed_amount)
- + flt(loan.adjustment_amount)
+ + flt(loan.debit_adjustment_amount)
+ - flt(loan.credit_adjustment_amount)
- flt(loan.total_principal_paid)
- flt(loan.total_interest_payable)
- flt(loan.written_off_amount)