Get all items from Delivery Trip

How can I get all items from a Delivery Trip?

Scenario: ERP is for a distributor that delivers wholesale goods. They have several trucks, each that will deliver to multiple customers each day. If I create a delivery trip, I can pull the customers for the route, but how can I add items from their invoices or delivery Note, etc?

Is there a report I can use to generate this based on customer group (create group for each route/truck)?

Any ideas?

Thanks in advance!

EDIT: Thinking out loud here. I think the flow will need to start with delivery note. When creating the delivery trip, I can pull in customers and associated delivery notes. I will need a way to fetch all items for all delivery notes within the delivery slip. Does anyone know how to accomplish this?

1 Like

Hi @volkswagner , Did you get any solutions for the above scenarios.

I am also looking for the same

I didn’t pursue this because the customer hasn’t agreed to use ERPNext.

The only solution I was able to come up with is a custom report to pull
the items. My situation was simple because the company has regular
routes. I planned on using the route name as part of the customer
group, then I could pull all delivery notes based on the customer group.
Adding the yyyymmdd numbers to the route would also help with sorting.

A simple SQL script like:

select
    item_name as "Item",
    sum(qty) DIV 1 as "QTY",
    uom
from
    `tabDelivery Note Item`
where
    parent like CONCAT('route1-', CURDATE() +0, '-%%')
group by
    item_name;

This was to be used by the driver to load the truck for all items
being delivered.

Thank you @volkswagner