Feature #3111
openOTD by truck/route
100%
Description
**Task Description**
Develop the feature for **OTD by Truck/Route** report in the Indoguna system. This feature will calculate and display On-Time Delivery performance based on each truck and delivery route.
The report should help users monitor delivery punctuality, compare truck/route performance, and identify routes with frequent late deliveries.
**Requirement**
* Create report/API for OTD by truck and route
* Get delivery order data based on truck and route
* Compare actual delivery date/time with requested delivery date/time
* Calculate on-time delivery percentage
* Group result by truck and route
* Support filter by date range, truck, route, warehouse, and delivery status if available
* Return total deliveries, on-time deliveries, late deliveries, and OTD percentage
* Ensure the response is easy for front-end report/dashboard integration
**Expected Output**
The system should display accurate OTD performance by truck and route, allowing users to track delivery efficiency and improve routes that have delayed delivery issues.