Fulfillment – Daily Changelog – September 17, 2025

2025-09-17 – Invoice Creation Flow Redesign

Problem Solved

  • Fixed unreliable automatic QuickBooks sending during invoice creation that was causing failures and frustration
  • Eliminated need to navigate to separate invoices page to send invoices to QuickBooks after creation

New Invoice Creation Workflow

  • Removed problematic automatic QuickBooks integration from invoice creation API that was failing due to timing issues
  • Created new success dialog that appears immediately after invoice creation
  • Added immediate QuickBooks sending options without leaving the creation flow

User Experience Improvements

  • Success dialog shows all created invoices with details (invoice number, customer, amount)
  • Individual “Send to QuickBooks” buttons for each invoice
  • “Send All to QuickBooks” button to send all invoices at once
  • Real-time status updates showing success/failure for each QuickBooks send attempt
  • Clear visual feedback with badges showing sent/not sent/failed status

Technical Changes

  • Modified /api/invoices route to remove automatic QuickBooks sending after transaction commit
  • Created new InvoiceCreationSuccess component for post-creation QuickBooks integration
  • Updated InvoiceDialog component to use new success flow instead of automatic sending
  • Maintained proven QuickBooks sending logic from existing manual process

Benefits

  • Reliable invoice creation – no more failures due to QuickBooks timing issues
  • Streamlined workflow – create invoices and send to QuickBooks in one flow
  • Better error handling – clear feedback on what succeeded/failed
  • Flexible sending – send individual invoices or all at once
  • No navigation required – everything happens in one dialog

Impact

  • Eliminates the frustrating “failed” messages during invoice creation
  • Reduces workflow from 3 steps (create → navigate → send) to 2 steps (create → send)
  • Uses the same proven QuickBooks integration that works reliably in manual mode
  • Provides immediate feedback and control over QuickBooks synchronization

Testing Status

  • Ready for testing during next invoice creation cycle
  • Falls back to existing manual QuickBooks sending process if needed

Shipping Address Update System – Final Fixes

Webhook Validation Improvements

  • Fixed webhook payload validation to prevent database errors from malformed Shopify webhooks
  • Added order ID validation before processing to avoid NaN conversion errors
  • Improved error handling for incomplete webhook payloads

Badge Display Issues Resolved

  • Fixed false positive badges showing on all orders due to sync process setting shipping_updated_at incorrectly
  • Cleared test order flags while preserving legitimate address change indicators
  • Restored proper badge for order #5303 – the original real address change that caused shipping issues

System Status

  • Webhook system working – successfully processes address changes from Shopify
  • Badge system accurate – only shows for legitimate address changes after order creation
  • Ready for production – system will properly flag future customer address changes