Billing Records Table Structure: -------------------------------------------------------------------------------- Field Type Null Key -------------------------------------------------------------------------------- id int(11) NO PRI stripe_invoice_id varchar(255) YES MUL payment_intent varchar(255) YES stripe_customer_id varchar(255) YES MUL client_id int(11) NO MUL total_amount decimal(10,2) NO amount_paid decimal(10,2) YES billed_amount decimal(10,2) YES status enum('draft','sent','paid','void','payment_failed') NO MUL billing_date date NO MUL due_date date YES notes text YES created_at timestamp NO updated_at timestamp NO is_retainer_request tinyint(1) YES deleted tinyint(1) NO archived tinyint(1) NO rolled_over_to int(11) YES MUL Sample Record: -------------------------------------------------------------------------------- id : 366 stripe_invoice_id : in_1RC88O2KWJiU5kwA7nak7I9u payment_intent : stripe_customer_id : cus_S6KQPWscjVlO2Q client_id : 104 total_amount : 11100.00 amount_paid : billed_amount : 11100.00 status : void billing_date : 2025-04-09 due_date : notes : Legal services rendered created_at : 2025-04-09 16:34:19 updated_at : 2025-07-09 00:36:03 is_retainer_request : 0 deleted : 1 archived : 0 rolled_over_to :