My Laravel-based CRM has started showing an invoice total of 0 on the main dashboard even though individual invoices display the correct figures. The glitch appeared right after I introduced a Custom Discounts feature, so the problem is almost certainly sitting in that new logic or in the query that now aggregates the numbers. I need you to trace the data flow, identify where the calculation goes off, and patch it so the dashboard accurately reflects the sum of all invoices—including any discounts—every time the page loads or refreshes. No other parts of the system should be affected. Deliverables: • Clean, well-commented code fix (model, controller, or view) • Brief change log explaining what was wrong and how you resolved it • Confirmation that totals update instantly after creating, editing, or deleting an invoice with or without a discount I have full SSH and repository access ready for you to jump in as soon as we agree on the approach.