Invoice Retainer Applications Table Structure: id - int(11) - NO - invoice_id - int(11) - NO - retainer_amount_applied - decimal(10,2) - NO - retainer_balance_before - decimal(10,2) - NO - retainer_balance_after - decimal(10,2) - NO - created_at - timestamp - NO - current_timestamp() Retainer Balance Snapshots Table Structure: id - int(11) - NO - client_id - int(11) - NO - balance - decimal(10,2) - NO - as_of_date - date - NO - created_at - timestamp - NO - current_timestamp() Sample Invoice Retainer Applications: Invoice ID: 565 Client: Erica Ehrenberg Amount Applied: 8250.00 Balance Before: 10650.00 Balance After: 2400.00 ------------------- Invoice ID: 568 Client: Ran Liu Amount Applied: 2900.00 Balance Before: 10000.00 Balance After: 7100.00 ------------------- Invoice ID: 567 Client: Ronald Dal Bello Amount Applied: 2700.00 Balance Before: 5000.00 Balance After: 2300.00 ------------------- Invoice ID: 565 Client: Erica Ehrenberg Amount Applied: 8250.00 Balance Before: -5850.00 Balance After: -14100.00 ------------------- Invoice ID: 565 Client: Erica Ehrenberg Amount Applied: 8250.00 Balance Before: 2400.00 Balance After: -5850.00 ------------------- Sample Retainer Balance Snapshots: Client: a a Balance: 4.00 As of Date: 2025-06-28 ------------------- Client: a a Balance: 1.00 As of Date: 2025-06-28 ------------------- Client: a a Balance: 3.00 As of Date: 2025-06-28 ------------------- Client: Jessen Malathu Balance: 5000.00 As of Date: 2025-06-09 ------------------- Client: Patricia Ford Balance: 0.00 As of Date: 2025-07-08 -------------------