Describe the legs
A leg is a stretch of road between two consecutive steps of the transfer: Cotonou to Parakou, then Parakou to Natitingou. Orou adds one with Add a route leg, optionally with costs already attached. He can re-point one with Change a route leg or remove it with Delete a route leg, which also deletes its costs. List route legs and View a route leg show the route.Assign the vehicles
Orou assigns the truck with Add a vehicle to a transfer, with Gildas’s name as driver. If another truck replaces it, Change a transfer vehicle swaps the vehicle or edits the driver name, and Remove a transfer vehicle takes it off. The vehicle must first exist in Locations, vehicles and site sharing. Read them with List transfer vehicles and View a transfer vehicle.Record the transport costs
Each person who pays something records it on the leg with Add a route leg cost: a label such as “Fuel” or “Toll” and an amount. Nothing is spread yet. When the truck reaches the destination of the leg, the costs are spread over the goods carried. A cost can be corrected with Change a route leg cost or removed with Delete a route leg cost as long as it has not been allocated. List route leg costs and View a route leg cost read them back. A company that takes part in the transfer, such as the Parakou company, records its own handler’s fee on a leg it can reach. It sees only its own costs; Orou, as owner, sees all of them.The rules
- Only the company that owns the transfer adds, changes or deletes legs and vehicles, and only while the transfer is a draft or running. Reading is open to any company that can see the transfer: the owner, or a company with a location in a step of a non-draft transfer.
- A leg joins two consecutive steps, each given by identifier or by position (the identifier wins if both are sent). Only one leg can join a given pair of steps. After a change, every segment must still be covered by a continuous chain of legs.
- A leg can be changed or deleted only while both its steps are upcoming. A leg used by a segment cannot be deleted. Costs cannot be sent when changing a leg, and deleting a leg deletes all its costs, whoever recorded them, for good.
- A transfer vehicle must be a vehicle of the organization. The driver name is optional, up to 255 characters, and sending an empty value clears it. Removing the assignment does not touch the vehicle.
- A cost has a label (up to 255 characters) and an amount in major units, not negative, with at most the currency’s decimals. The allocation date and the amount in minor units are set by the server and cannot be sent.
- A cost is recorded for the current company and member. Only the company that recorded it can change, delete or read it. The owner reads every cost of the transfer.
- A company other than the owner needs access to the leg: one of its two steps must be at a group holding one of that company’s locations. This also applies to the owner when it adds a cost on its own; costs sent while adding the leg are not checked this way.
- A cost cannot be added or changed once the destination step of the leg is no longer upcoming. A cost already allocated to the goods cannot be changed or deleted. Finishing the transfer needs every leg cost to be allocated.
- Legs, costs and vehicles of a transfer are deleted for good.
- Costs and cost totals on the legs are shown only to the owner company.
All the actions of this topic
- List route legs: Lists the legs of the physical route between transfer steps.
- Add a route leg: Adds a leg between two steps of the transfer route.
- View a route leg: Shows one route leg with its costs.
- Change a route leg: Changes the start or end step of a route leg.
- Delete a route leg: Deletes a route leg and its costs.
- List route leg costs: Lists transport costs recorded on a route leg.
- Add a route leg cost: Records a transport cost on a route leg so it can be spread over the goods carried.
- View a route leg cost: Shows one transport cost of a route leg.
- Change a route leg cost: Changes a transport cost recorded on a route leg.
- Delete a route leg cost: Deletes a transport cost from a route leg.
- List transfer vehicles: Lists the vehicles assigned to a stock transfer so you can see what carries the goods.
- Add a vehicle to a transfer: Assigns one of your organization’s vehicles, with an optional driver name, to a stock transfer.
- View a transfer vehicle: Shows one vehicle assigned to a stock transfer.
- Change a transfer vehicle: Swaps the vehicle or edits the driver label of a vehicle assigned to a stock transfer.
- Remove a transfer vehicle: Removes a vehicle from a stock transfer.