Back

Ferdia news 20/08/25

🔧 Improvements


Customer Dropdown Performance Optimization 


Issue: The customer dropdown previously loaded all customers at once, causing severe performance issues in modules with large customer bases.

  • Fix: The dropdown now uses optimized loading logic to improve system responsiveness.
  • Impacted areas include: Dashboard, Map, Coordinator Map, Sales, Trip Management (Edit/Create), Templates, Invoice, Worklist, History, Export, Accounting, Factoring, Quality, Customer Rating, Sales Information, Deviations.


View and Edit Item Codes on Fixed Trip Orders 


  • Before: Item codes could only be set during order creation. Once created, users could not view or edit the item code.
  • Now:
    ✅ Users can see the assigned item code in the order detail view.
    ✅ Users can add or update the item code on existing orders.
  • Benefit: Enables correction of mistakes and improved accounting/product tracking.


Fixed Pickup Address on Customer Card (TEQ Quotations Only) 


  • New Feature: A new optional Fixed Pickup Address field is now available on the customer card.
  • How it works:
    ✅ If defined, this address is automatically pre-filled into the “From” field when creating quotations in TEQ.
    ✅ Users can override the pre-filled address manually.
    ✅ External systems (BusBusiness, forms, etc.) continue to use user-inputted addresses, not this field.
  • Benefit: Reduces manual entry and ensures consistency when creating quotations directly in TEQ.


⚡ Performance & Technical Optimizations


Lazy Loading for Trip Dropdowns 

  • Change: Trip choice dropdowns now use lazy loading, reducing load times and improving responsiveness.


Orders – Active Orders & All Orders Optimization 


  • Issue: Excessive database queries were executed (e.g., ~74 queries just to retrieve 10 records).
  • Fixes implemented:
    select_related and prefetch_related used to reduce queries.
    ✅ Query slicing ([:limit]) applied earlier.
    ✅ Incompatible order checks moved out of loops and processed in bulk.
  • Result: Faster load times and reduced server load.


Trip List Optimization 


  • Issue: The Trip List contained multiple queries inside loops, causing slow performance and timeouts for large datasets.
  • Fixes implemented:
    ✅ Product details, assigned drivers, and vehicles are prefetched outside loops.
    .all().first() calls inside loops have been optimized.
    ✅ Sorting and pagination now handled directly in the database.
    ✅ New PlanningListService and planning_list_v2 implemented.
  • Result:
    • The trip list can now handle at least two months of data without 502 errors.
    • Load times are significantly reduced.




🐞 Bug Fixes


Updated Emails Not Sent after Order Acceptance 


  • Fixed a bug where customers were not receiving updated confirmation emails after accepting an order.
  • Emails now send as expected, ensuring correct communication with customers.


Unable to Change Customer on Order 


  • Fixed an error that prevented users from updating the customer on an existing order.
  • Users can now successfully change the assigned customer.


Arrival Time Not Updating with Pause Adjustments 


  • Fixed a bug where changing the pause time did not update the trip’s arrival time.
  • The system now recalculates arrival time correctly whenever pause duration is adjusted