View Full Version : For creation of frieght bill depending on the route


surekaabhishek
01-08-2010, 09:01 PM
We are into transportation business.

I write to you for i was wondering do you have any access file which creates BILL (as in the attachment) according to the route by just pinning in the data in some master file.

For example the master file would have the following entries:

Route:A-B, B-C, F-H

Tanker No.
Challan No.
Quantity:
Rate:

So if i fill in the data in the master file and put it under route A-B, it automatically gets diverted into some acess/excel file (as in the attachment), so on and so forth.

The_Doc_Man
01-09-2010, 11:56 AM
In general, the only way to do this "right" is to list routes explicitly with charges for each. Then for a given shipment, you would have a child table that linked a shipment to each "leg" of the total route. Probably this child would technically be what is called a junction table.

Table: Shipment
ShipID - Prime Key (PK), whatever numbering system you use incl. autonumber if that is the way you want it.
ShipDate, other shipment info.

Table: RouteLegs
LegID - PK, probably just autonumber
LegCost: The cost (or rate) of taking something on that particular leg

Table:ShipCost
LegNum: A number that tells you how many steps came before this one in the route.
ShipID: The ID of the shipment that took this leg.
LegID: The ID of the leg that this shipment took as #LegNum in sequence.

Then you can do JOIN queries to get all this data together.

Now the trick is to figure out how to choose the optimum route, which is a different question. Do a web search on the "Traveling Salesman" problem for route optimization techniques.

For reports, if you enumerate the leg ID in LegNum order, you show an exact route from point A to B to C to D .... to your final destination and can use it for itemization. Not to mention if you use your own trucks, the truck ID can be charged with those legs as well, leading to a way to decide when maintenance is necessary.