Skip to main content

Changelog: Dwi - 2026-06-01

Daily Changelog - Waste Vantage Legacy

Overview

Today's changes by Dwi focus on adding a migration to track Xero line item IDs in order invoice details, refactoring Xero item mapping to support direct/manual invoices (without associated orders) and rental invoice updates with line item IDs, and patching the default category logic for bin weight calculations.


Added

  • Xero Line Item ID Tracking Migration (database/migrations/2026_06_01_195809_add_xero_line_item_id_on_order_invoice_details_table.php)
    • Created a database migration to add the nullable string column xero_line_item_id to the order_invoice_details table to allow tracking individual line item mappings in Xero.

Changed

  • Xero Invoice Line Item Mapping (app/Repositories/InvoiceManagement.php)
    • Updated xeroItemRental to include LineItemID from details or extras if updating an invoice ($isUpdate = true).
    • Updated xeroItemMaps to propagate the $isUpdate parameter to xeroItemRental and xeroItemNonRental.
    • Enhanced mapLineItemIdFromXero to support manual invoices (where $invoice->order_id is null) by mapping LineItemIDs from Xero back to $invoice->details and $invoice->extras.
    • Patched updateInvoiceXero to support updates to invoices that do not have an associated order (is_null($invoice->order)), resolving customer and order details via the first invoice line item's order detail relation.
  • Bin Weight Category Logic (app/Console/Commands/BinWeightCommand.php)
    • Updated BinWeightCommand to automatically update the category to 'skip bin' for any BinWeight records that currently have a null category.

Fixed

  • None.

Removed

  • None.