Fulfillment – Daily Changelog – October 3, 2025

Changelog – October 3, 2025

Critical Bug Fixes

Fixed “Address Updated” Badge False Positives

  • Problem: Badge appeared on EVERY order modification (status changes, fulfillment updates, etc.)
  • Root Cause: Comparison logic included the shipping_address JSON blob which had serialization inconsistencies
  • Solution: Removed JSON blob from comparison, only compare actual address fields:
  • shipping_name
  • shipping_address1
  • shipping_city
  • shipping_state
  • shipping_zip
  • shipping_country
  • Database Cleanup: Cleared all 138 false positive shipping_updated_at timestamps
  • Result: Badge now ONLY appears when actual shipping address fields change

Fixed Invoice Creation Dialog Crash

  • Problem: Creating invoices crashed with can't access property "toFixed", e.total_amount is undefined
  • Root Cause: API was only returning partial invoice data (id, invoice_number, order_id)
  • Solution:
  • Added optional chaining as immediate fix: total_amount?.toFixed(2) ?? '0.00'
  • Fixed root cause: API now returns complete invoice data including total_amount, customer_name, customer_email, etc.
  • Files Updated:
  • src/components/invoices/send-to-quickbooks-dialog.tsx
  • src/components/orders/invoice-creation-success.tsx
  • src/app/api/invoices/route.ts
  • Result: Invoice creation works properly, displays all information without crashes

Performance Optimizations

QuickBooks Invoice Send – Parallel Processing

  • Problem: Both invoice creation dialog and invoices page were sending to QuickBooks sequentially (one at a time)
  • Impact: 12 invoices × 0.5 seconds each = 6+ seconds total wait time
  • Solution: Changed both implementations to use Promise.all / Promise.allSettled for parallel processing
  • Files Updated:
  • src/components/orders/invoice-creation-success.tsx
  • src/components/invoices/send-selected-to-quickbooks-button.tsx
  • Result: All invoices now send simultaneously – ~0.5-1 second total for any batch size

Documentation Updates

Order Combining Guide

  • Updated ORDER_COMBINING_GUIDE.md to include external orders
  • Refined order filtering logic documentation
  • Added clarity around which order types can be combined