════════════════════════════════════════════════════════════════ TESTING LOAN URL00224 ════════════════════════════════════════════════════════════════ ╔══════════════════════════════════════════════════════════════════════════════╗ ║ TESTING LOAN URL00224 PAYOFF CALCULATION ║ ╚══════════════════════════════════════════════════════════════════════════════╝ ⚠️ Loan URL00224 not found in database Will proceed with simulated test data... ════════════════════════════════════════════════════════════════ 📊 CALCULATION PARAMETERS ──────────────────────────────────────────────────────────────── Loan Number: URL00224 Employee: Test Employee Monthly Payment (EMI): TSH 200,000.00 Annual Interest Rate: 12% Tenure: 48 months Initial Balance (IB): TSH 9,600,000.00 Remaining Balance (BA): TSH 7,200,000.00 Days Since Last Payment: 10 📈 STEP-BY-STEP CALCULATION (PDF METHOD) ════════════════════════════════════════════════════════════════ ✦ Step 1: Calculate Original Principal (PV) Formula: PV = EMI × [1 - (1 + r)^-n] / r PV = 200,000.00 × [1 - (1 + 0.0100)^-48] / 0.0100 Original Principal (PV) = TSH 7,594,791.90 ✦ Step 2: Determine Payments Made (m) Formula: m = n - (BA / EMI) Remaining Payments = BA / EMI = 7,200,000.00 / 200,000.00 = 36.00 m = 48 - 36 = 12 payments made Progress: 25% ✦ Step 3: Calculate Outstanding Principal Formula: Payoff = PV × [(1 + r)^n - (1 + r)^m] / [(1 + r)^n - 1] Outstanding Principal = TSH 6,021,501.01 ✦ Step 4: Calculate Accrued Interest Daily Rate = 0.12 / 365 = 0.000329 Accrued Interest = 6,021,501.01 × 0.000329 × 10 Accrued Interest = TSH 19,796.72 ✦ Step 5: Calculate Total Payoff Amount Total Payoff = Outstanding Principal + Accrued Interest Total Payoff = 6,021,501.01 + 19,796.72 🎯 TOTAL PAYOFF AMOUNT = TSH 6,041,297.73 ╔══════════════════════════════════════════════════════════════════════════════╗ ║ CALCULATION SUMMARY ║ ╚══════════════════════════════════════════════════════════════════════════════╝ Loan Number: URL00224 Original Principal (PV): TSH 7,594,791.90 Payments Made: 12 of 48 (25%) Principal Paid: TSH 1,573,290.89 Outstanding Principal: TSH 6,021,501.01 Accrued Interest (10 days): TSH 19,796.72 ──────────────────────────────────────────────────────────────── 💰 TOTAL PAYOFF AMOUNT: TSH 6,041,297.73 ════════════════════════════════════════════════════════════════ 📤 LOAN_TOP_UP_BALANCE_RESPONSE (Message 12) Preview: ──────────────────────────────────────────────────────────────── 0000 URL00224 6041297.73 6021501.01 FSP24276119 PAY59343483 2025-12-18 ════════════════════════════════════════════════════════════════ TESTING LOAN URL002224 ════════════════════════════════════════════════════════════════ ╔══════════════════════════════════════════════════════════════════════════════╗ ║ TESTING LOAN URL002224 PAYOFF CALCULATION ║ ╚══════════════════════════════════════════════════════════════════════════════╝ ✅ Loan URL002224 found in database! ════════════════════════════════════════════════════════════════ Employee: Toyi Chaboya Bilabuze Check Number: 111395274 Requested Amount: TSH 18,980,000.00 Monthly Payment: TSH 395,416.66 Tenure: 49 months Interest Rate: 1200% Outstanding Balance: TSH 9,013,603.30 ════════════════════════════════════════════════════════════════ 📊 CALCULATION PARAMETERS ──────────────────────────────────────────────────────────────── Loan Number: URL002224 Employee: Toyi Bilabuze Monthly Payment (EMI): TSH 395,416.66 Annual Interest Rate: 1200% Tenure: 49 months Initial Balance (IB): TSH 18,980,000.00 Remaining Balance (BA): TSH 9,013,603.30 Days Since Last Payment: 7 📈 STEP-BY-STEP CALCULATION (PDF METHOD) ════════════════════════════════════════════════════════════════ ✦ Step 1: Calculate Original Principal (PV) Formula: PV = EMI × [1 - (1 + r)^-n] / r PV = 395,416.66 × [1 - (1 + 1.0000)^-49] / 1.0000 Original Principal (PV) = TSH 395,416.66 ✦ Step 2: Determine Payments Made (m) Formula: m = n - (BA / EMI) Remaining Payments = BA / EMI = 9,013,603.30 / 395,416.66 = 22.80 m = 49 - 23 = 26 payments made Progress: 53.1% ✦ Step 3: Calculate Outstanding Principal Formula: Payoff = PV × [(1 + r)^n - (1 + r)^m] / [(1 + r)^n - 1] Outstanding Principal = TSH 395,416.61 ✦ Step 4: Calculate Accrued Interest Daily Rate = 12.00 / 365 = 0.032877 Accrued Interest = 395,416.61 × 0.032877 × 7 Accrued Interest = TSH 90,999.99 ✦ Step 5: Calculate Total Payoff Amount Total Payoff = Outstanding Principal + Accrued Interest Total Payoff = 395,416.61 + 90,999.99 🎯 TOTAL PAYOFF AMOUNT = TSH 486,416.60 ╔══════════════════════════════════════════════════════════════════════════════╗ ║ CALCULATION SUMMARY ║ ╚══════════════════════════════════════════════════════════════════════════════╝ Loan Number: URL002224 Original Principal (PV): TSH 395,416.66 Payments Made: 26 of 49 (53.1%) Principal Paid: TSH 0.05 Outstanding Principal: TSH 395,416.61 Accrued Interest (7 days): TSH 90,999.99 ──────────────────────────────────────────────────────────────── 💰 TOTAL PAYOFF AMOUNT: TSH 486,416.60 ════════════════════════════════════════════════════════════════ 📤 LOAN_TOP_UP_BALANCE_RESPONSE (Message 12) Preview: ──────────────────────────────────────────────────────────────── 0000 URL002224 486416.60 395416.61 FSP82871559 PAY82003651 2025-12-18 ════════════════════════════════════════════════════════════════ TESTING LOAN URL0224 ════════════════════════════════════════════════════════════════ ╔══════════════════════════════════════════════════════════════════════════════╗ ║ TESTING LOAN URL0224 PAYOFF CALCULATION ║ ╚══════════════════════════════════════════════════════════════════════════════╝ ⚠️ Loan URL0224 not found in database Will proceed with simulated test data... ════════════════════════════════════════════════════════════════ 📊 CALCULATION PARAMETERS ──────────────────────────────────────────────────────────────── Loan Number: URL0224 Employee: Test Employee Monthly Payment (EMI): TSH 200,000.00 Annual Interest Rate: 12% Tenure: 48 months Initial Balance (IB): TSH 9,600,000.00 Remaining Balance (BA): TSH 7,200,000.00 Days Since Last Payment: 10 📈 STEP-BY-STEP CALCULATION (PDF METHOD) ════════════════════════════════════════════════════════════════ ✦ Step 1: Calculate Original Principal (PV) Formula: PV = EMI × [1 - (1 + r)^-n] / r PV = 200,000.00 × [1 - (1 + 0.0100)^-48] / 0.0100 Original Principal (PV) = TSH 7,594,791.90 ✦ Step 2: Determine Payments Made (m) Formula: m = n - (BA / EMI) Remaining Payments = BA / EMI = 7,200,000.00 / 200,000.00 = 36.00 m = 48 - 36 = 12 payments made Progress: 25% ✦ Step 3: Calculate Outstanding Principal Formula: Payoff = PV × [(1 + r)^n - (1 + r)^m] / [(1 + r)^n - 1] Outstanding Principal = TSH 6,021,501.01 ✦ Step 4: Calculate Accrued Interest Daily Rate = 0.12 / 365 = 0.000329 Accrued Interest = 6,021,501.01 × 0.000329 × 10 Accrued Interest = TSH 19,796.72 ✦ Step 5: Calculate Total Payoff Amount Total Payoff = Outstanding Principal + Accrued Interest Total Payoff = 6,021,501.01 + 19,796.72 🎯 TOTAL PAYOFF AMOUNT = TSH 6,041,297.73 ╔══════════════════════════════════════════════════════════════════════════════╗ ║ CALCULATION SUMMARY ║ ╚══════════════════════════════════════════════════════════════════════════════╝ Loan Number: URL0224 Original Principal (PV): TSH 7,594,791.90 Payments Made: 12 of 48 (25%) Principal Paid: TSH 1,573,290.89 Outstanding Principal: TSH 6,021,501.01 Accrued Interest (10 days): TSH 19,796.72 ──────────────────────────────────────────────────────────────── 💰 TOTAL PAYOFF AMOUNT: TSH 6,041,297.73 ════════════════════════════════════════════════════════════════ 📤 LOAN_TOP_UP_BALANCE_RESPONSE (Message 12) Preview: ──────────────────────────────────────────────────────────────── 0000 URL0224 6041297.73 6021501.01 FSP39911081 PAY55588073 2025-12-18 ════════════════════════════════════════════════════════════════ ADDITIONAL SCENARIOS FOR URL002224 ════════════════════════════════════════════════════════════════ Scenario 1: 25% Paid ──────────────────────────────────────────────────────────────── ╔══════════════════════════════════════════════════════════════════════════════╗ ║ TESTING LOAN URL002224 PAYOFF CALCULATION ║ ╚══════════════════════════════════════════════════════════════════════════════╝ ✅ Loan URL002224 found in database! ════════════════════════════════════════════════════════════════ Employee: Toyi Chaboya Bilabuze Check Number: 111395274 Requested Amount: TSH 18,980,000.00 Monthly Payment: TSH 395,416.66 Tenure: 49 months Interest Rate: 1200% Outstanding Balance: TSH 9,013,603.30 ════════════════════════════════════════════════════════════════ 📊 CALCULATION PARAMETERS ──────────────────────────────────────────────────────────────── Loan Number: URL002224 Employee: Toyi Bilabuze Monthly Payment (EMI): TSH 395,416.66 Annual Interest Rate: 1200% Tenure: 49 months Initial Balance (IB): TSH 18,980,000.00 Remaining Balance (BA): TSH 9,013,603.30 Days Since Last Payment: 7 📈 STEP-BY-STEP CALCULATION (PDF METHOD) ════════════════════════════════════════════════════════════════ ✦ Step 1: Calculate Original Principal (PV) Formula: PV = EMI × [1 - (1 + r)^-n] / r PV = 395,416.66 × [1 - (1 + 1.0000)^-49] / 1.0000 Original Principal (PV) = TSH 395,416.66 ✦ Step 2: Determine Payments Made (m) Formula: m = n - (BA / EMI) Remaining Payments = BA / EMI = 9,013,603.30 / 395,416.66 = 22.80 m = 49 - 23 = 26 payments made Progress: 53.1% ✦ Step 3: Calculate Outstanding Principal Formula: Payoff = PV × [(1 + r)^n - (1 + r)^m] / [(1 + r)^n - 1] Outstanding Principal = TSH 395,416.61 ✦ Step 4: Calculate Accrued Interest Daily Rate = 12.00 / 365 = 0.032877 Accrued Interest = 395,416.61 × 0.032877 × 7 Accrued Interest = TSH 90,999.99 ✦ Step 5: Calculate Total Payoff Amount Total Payoff = Outstanding Principal + Accrued Interest Total Payoff = 395,416.61 + 90,999.99 🎯 TOTAL PAYOFF AMOUNT = TSH 486,416.60 ╔══════════════════════════════════════════════════════════════════════════════╗ ║ CALCULATION SUMMARY ║ ╚══════════════════════════════════════════════════════════════════════════════╝ Loan Number: URL002224 Original Principal (PV): TSH 395,416.66 Payments Made: 26 of 49 (53.1%) Principal Paid: TSH 0.05 Outstanding Principal: TSH 395,416.61 Accrued Interest (7 days): TSH 90,999.99 ──────────────────────────────────────────────────────────────── 💰 TOTAL PAYOFF AMOUNT: TSH 486,416.60 ════════════════════════════════════════════════════════════════ 📤 LOAN_TOP_UP_BALANCE_RESPONSE (Message 12) Preview: ──────────────────────────────────────────────────────────────── 0000 URL002224 486416.60 395416.61 FSP38595627 PAY45043792 2025-12-18 Scenario 2: 50% Paid ──────────────────────────────────────────────────────────────── ╔══════════════════════════════════════════════════════════════════════════════╗ ║ TESTING LOAN URL002224 PAYOFF CALCULATION ║ ╚══════════════════════════════════════════════════════════════════════════════╝ ✅ Loan URL002224 found in database! ════════════════════════════════════════════════════════════════ Employee: Toyi Chaboya Bilabuze Check Number: 111395274 Requested Amount: TSH 18,980,000.00 Monthly Payment: TSH 395,416.66 Tenure: 49 months Interest Rate: 1200% Outstanding Balance: TSH 9,013,603.30 ════════════════════════════════════════════════════════════════ 📊 CALCULATION PARAMETERS ──────────────────────────────────────────────────────────────── Loan Number: URL002224 Employee: Toyi Bilabuze Monthly Payment (EMI): TSH 395,416.66 Annual Interest Rate: 1200% Tenure: 49 months Initial Balance (IB): TSH 18,980,000.00 Remaining Balance (BA): TSH 9,013,603.30 Days Since Last Payment: 7 📈 STEP-BY-STEP CALCULATION (PDF METHOD) ════════════════════════════════════════════════════════════════ ✦ Step 1: Calculate Original Principal (PV) Formula: PV = EMI × [1 - (1 + r)^-n] / r PV = 395,416.66 × [1 - (1 + 1.0000)^-49] / 1.0000 Original Principal (PV) = TSH 395,416.66 ✦ Step 2: Determine Payments Made (m) Formula: m = n - (BA / EMI) Remaining Payments = BA / EMI = 9,013,603.30 / 395,416.66 = 22.80 m = 49 - 23 = 26 payments made Progress: 53.1% ✦ Step 3: Calculate Outstanding Principal Formula: Payoff = PV × [(1 + r)^n - (1 + r)^m] / [(1 + r)^n - 1] Outstanding Principal = TSH 395,416.61 ✦ Step 4: Calculate Accrued Interest Daily Rate = 12.00 / 365 = 0.032877 Accrued Interest = 395,416.61 × 0.032877 × 7 Accrued Interest = TSH 90,999.99 ✦ Step 5: Calculate Total Payoff Amount Total Payoff = Outstanding Principal + Accrued Interest Total Payoff = 395,416.61 + 90,999.99 🎯 TOTAL PAYOFF AMOUNT = TSH 486,416.60 ╔══════════════════════════════════════════════════════════════════════════════╗ ║ CALCULATION SUMMARY ║ ╚══════════════════════════════════════════════════════════════════════════════╝ Loan Number: URL002224 Original Principal (PV): TSH 395,416.66 Payments Made: 26 of 49 (53.1%) Principal Paid: TSH 0.05 Outstanding Principal: TSH 395,416.61 Accrued Interest (7 days): TSH 90,999.99 ──────────────────────────────────────────────────────────────── 💰 TOTAL PAYOFF AMOUNT: TSH 486,416.60 ════════════════════════════════════════════════════════════════ 📤 LOAN_TOP_UP_BALANCE_RESPONSE (Message 12) Preview: ──────────────────────────────────────────────────────────────── 0000 URL002224 486416.60 395416.61 FSP86881749 PAY92817164 2025-12-18 Scenario 3: 75% Paid ──────────────────────────────────────────────────────────────── ╔══════════════════════════════════════════════════════════════════════════════╗ ║ TESTING LOAN URL002224 PAYOFF CALCULATION ║ ╚══════════════════════════════════════════════════════════════════════════════╝ ✅ Loan URL002224 found in database! ════════════════════════════════════════════════════════════════ Employee: Toyi Chaboya Bilabuze Check Number: 111395274 Requested Amount: TSH 18,980,000.00 Monthly Payment: TSH 395,416.66 Tenure: 49 months Interest Rate: 1200% Outstanding Balance: TSH 9,013,603.30 ════════════════════════════════════════════════════════════════ 📊 CALCULATION PARAMETERS ──────────────────────────────────────────────────────────────── Loan Number: URL002224 Employee: Toyi Bilabuze Monthly Payment (EMI): TSH 395,416.66 Annual Interest Rate: 1200% Tenure: 49 months Initial Balance (IB): TSH 18,980,000.00 Remaining Balance (BA): TSH 9,013,603.30 Days Since Last Payment: 7 📈 STEP-BY-STEP CALCULATION (PDF METHOD) ════════════════════════════════════════════════════════════════ ✦ Step 1: Calculate Original Principal (PV) Formula: PV = EMI × [1 - (1 + r)^-n] / r PV = 395,416.66 × [1 - (1 + 1.0000)^-49] / 1.0000 Original Principal (PV) = TSH 395,416.66 ✦ Step 2: Determine Payments Made (m) Formula: m = n - (BA / EMI) Remaining Payments = BA / EMI = 9,013,603.30 / 395,416.66 = 22.80 m = 49 - 23 = 26 payments made Progress: 53.1% ✦ Step 3: Calculate Outstanding Principal Formula: Payoff = PV × [(1 + r)^n - (1 + r)^m] / [(1 + r)^n - 1] Outstanding Principal = TSH 395,416.61 ✦ Step 4: Calculate Accrued Interest Daily Rate = 12.00 / 365 = 0.032877 Accrued Interest = 395,416.61 × 0.032877 × 7 Accrued Interest = TSH 90,999.99 ✦ Step 5: Calculate Total Payoff Amount Total Payoff = Outstanding Principal + Accrued Interest Total Payoff = 395,416.61 + 90,999.99 🎯 TOTAL PAYOFF AMOUNT = TSH 486,416.60 ╔══════════════════════════════════════════════════════════════════════════════╗ ║ CALCULATION SUMMARY ║ ╚══════════════════════════════════════════════════════════════════════════════╝ Loan Number: URL002224 Original Principal (PV): TSH 395,416.66 Payments Made: 26 of 49 (53.1%) Principal Paid: TSH 0.05 Outstanding Principal: TSH 395,416.61 Accrued Interest (7 days): TSH 90,999.99 ──────────────────────────────────────────────────────────────── 💰 TOTAL PAYOFF AMOUNT: TSH 486,416.60 ════════════════════════════════════════════════════════════════ 📤 LOAN_TOP_UP_BALANCE_RESPONSE (Message 12) Preview: ──────────────────────────────────────────────────────────────── 0000 URL002224 486416.60 395416.61 FSP94156338 PAY36425633 2025-12-18 ✅ All URL002224 loan payoff calculations completed! The Enhanced Reducing Balance Method (PDF implementation) is working correctly.