=== Testing Actual Reducing Balance Formula === Test Case 1: URL013572 (CHIBITA Import) ------------------------------------------------------------ Principal: 6,397,076.00 Annual Rate: 12% Tenure: 36 months Installments Paid: 5 Calculated Monthly Payment: 212,474.46 Remaining Balance (Payoff): 5,639,557.86 Expected from logs: 3,774,876.79 Actual Monthly Payment from Import: 177,697.00 Payoff with Actual Payment: 4,716,484.48 Test Case 2: URL002224 (From Error Log) ------------------------------------------------------------ Principal: 18,980,000.00 Annual Rate: 12% Tenure: 49 months Installments Paid: 15 Calculated Monthly Payment: 491,861.75 Remaining Balance (Payoff): 14,117,743.53 Test Case 3: Simple Verification ------------------------------------------------------------ Principal: 1,000,000.00 Annual Rate: 12% Tenure: 12 months Installments Paid: 3 Calculated Monthly Payment: 88,848.79 Remaining Balance (Payoff): 761,080.29 Remaining Payments: 9 Monthly Payment × Remaining: 799,639.10 (if no interest) === Formula Summary === The actual reducing balance formula calculates: 1. Monthly Payment = P × [r(1+r)^n] / [(1+r)^n - 1] 2. Remaining Balance = Monthly Payment × [1 - (1+r)^(-remaining)] / r Where: P = Principal, r = Monthly Rate, n = Total Tenure