BACKEND ISSUES RESOLVED IN INVOICES:
1. Populate Created By in Invoice API:
Fixed an operator precedence bug in the get invoice by ID controller (individualinvoice/:id) where raw ObjectIds were returned instead of user documents. Populated user details (first name, last name, username, email, role) on invoice.createdBy, quotation.createdBy, and actionHistory.performedBy.
2. Invoice Tax and Balance Calculations:
Fixed subtotal, tax amount, discount, transport cost, and total amount calculations to respect excludeTax and isWithoutTax flags on invoice creation and fetching.
3. Line Items Persistence on Invoices:
Ensured line items from direct manual invoices and without-request quote conversions are correctly saved and returned in the invoice data payload.
FRONTEND ISSUES RESOLVED IN INVOICES:
1. Line Items Support for Direct & Without-Request Invoices:
Added line items normalization (getNormalizedLineItems) to render line items from direct invoices and template quotes (lineItems / lineitems) with image thumbnails, category tags, unit prices, totals, and taxable status.
2. Quotation Link and Direct Invoice Badges:
Added an interactive Quote link badge (Quote: Q_...) to navigate directly to the linked quotation details page, and added a Direct Invoice badge for standalone invoices.
3. Payment Status Pill:
Added a live payment status pill with colored indicator dots for Paid, Partial, Awaiting Payment, and Overdue statuses.
4. Header Simplification:
Cleaned up the top header by removing redundant action buttons (Send Invoice, View PDF, History modals) for a cleaner POS layout.
5. Interactive Payment Schedule and Transactions History:
Integrated the interactive PaymentSchedule component alongside a dedicated Transactions History table showing transaction type, amount, payment mode, date, and reference/check numbers.
6. Responsive Redesign Across All Devices:
Redesigned the customer metadata card (Property, Contact, Invoice Info, Financials), Line Items table, Service Breakdown accordions, and Pricing Summary to be responsive across mobile, tablet, laptop, and desktop screens.