================================================================================ TEST CASE: URL013572 - Daud Andrew Chibita ================================================================================ INPUT PARAMETERS: Initial Balance (DeductionAmount): 6,397,076.07 Remaining Balance (DeductionBalance): 4,264,712.07 Monthly Payment: 177,696.56 Annual Interest Rate: 12% Days Since Last Payment: 7 --- STEP 1: Calculate Original Loan Details --- Tenure (months) = Initial Balance / Monthly Payment Tenure = 6,397,076.07 / 177,696.56 = 36 months Original Principal (using PV formula): 5,350,000.08 --- STEP 2: Calculate Current Outstanding Principal (P) --- Payments Made = (Initial Balance - Remaining Balance) / Monthly Payment Payments Made = (6,397,076.07 - 4,264,712.07) / 177,696.56 Payments Made = 12 installments Outstanding Principal (P) after 12 payments: 3,774,876.84 --- STEP 3: Apply Dynamic Payoff Formula --- Formula: Total Payoff = P + (P × R/365 × D) Where: P = 3,774,876.84 (Outstanding Principal) R = 0.12 (Annual Rate) D = 7 (Days Since Last Payment) Pro-rated Interest = P × (R/365) × D Pro-rated Interest = 3,774,876.84 × (0.12/365) × 7 Pro-rated Interest = 8,687.39 Total Payoff Amount = P + Pro-rated Interest Total Payoff Amount = 3,774,876.84 + 8,687.39 TOTAL PAYOFF AMOUNT = 3,783,564.23 Expected Payoff: 3,783,573.59 Difference: 9.36 Status: ✗ FAIL ================================================================================ TEST CASE: Simple Test Loan ================================================================================ INPUT PARAMETERS: Initial Balance (DeductionAmount): 1,000,000.00 Remaining Balance (DeductionBalance): 600,000.00 Monthly Payment: 50,000.00 Annual Interest Rate: 10% Days Since Last Payment: 15 --- STEP 1: Calculate Original Loan Details --- Tenure (months) = Initial Balance / Monthly Payment Tenure = 1,000,000.00 / 50,000.00 = 20 months Original Principal (using PV formula): 917,600.90 --- STEP 2: Calculate Current Outstanding Principal (P) --- Payments Made = (Initial Balance - Remaining Balance) / Monthly Payment Payments Made = (1,000,000.00 - 600,000.00) / 50,000.00 Payments Made = 8 installments Outstanding Principal (P) after 8 payments: 568,725.42 --- STEP 3: Apply Dynamic Payoff Formula --- Formula: Total Payoff = P + (P × R/365 × D) Where: P = 568,725.42 (Outstanding Principal) R = 0.1 (Annual Rate) D = 15 (Days Since Last Payment) Pro-rated Interest = P × (R/365) × D Pro-rated Interest = 568,725.42 × (0.1/365) × 15 Pro-rated Interest = 2,337.23 Total Payoff Amount = P + Pro-rated Interest Total Payoff Amount = 568,725.42 + 2,337.23 TOTAL PAYOFF AMOUNT = 571,062.65 ================================================================================ TEST CASE: Nearly Paid Off Loan ================================================================================ INPUT PARAMETERS: Initial Balance (DeductionAmount): 500,000.00 Remaining Balance (DeductionBalance): 50,000.00 Monthly Payment: 25,000.00 Annual Interest Rate: 8% Days Since Last Payment: 30 --- STEP 1: Calculate Original Loan Details --- Tenure (months) = Initial Balance / Monthly Payment Tenure = 500,000.00 / 25,000.00 = 20 months Original Principal (using PV formula): 466,647.56 --- STEP 2: Calculate Current Outstanding Principal (P) --- Payments Made = (Initial Balance - Remaining Balance) / Monthly Payment Payments Made = (500,000.00 - 50,000.00) / 25,000.00 Payments Made = 18 installments Outstanding Principal (P) after 18 payments: 49,504.41 --- STEP 3: Apply Dynamic Payoff Formula --- Formula: Total Payoff = P + (P × R/365 × D) Where: P = 49,504.41 (Outstanding Principal) R = 0.08 (Annual Rate) D = 30 (Days Since Last Payment) Pro-rated Interest = P × (R/365) × D Pro-rated Interest = 49,504.41 × (0.08/365) × 30 Pro-rated Interest = 325.51 Total Payoff Amount = P + Pro-rated Interest Total Payoff Amount = 49,504.41 + 325.51 TOTAL PAYOFF AMOUNT = 49,829.92 ================================================================================ SUMMARY OF ALL TEST RESULTS ================================================================================ URL013572 Loan: Total Payoff: 3,783,564.23 Outstanding Principal: 3,774,876.84 Pro-rated Interest: 8,687.39 Simple Test: Total Payoff: 571,062.65 Outstanding Principal: 568,725.42 Pro-rated Interest: 2,337.23 Nearly Paid: Total Payoff: 49,829.92 Outstanding Principal: 49,504.41 Pro-rated Interest: 325.51 ✓ Dynamic Payoff Formula implementation tested successfully!