Open dolibarr95 opened 5 years ago
Yes it's clear. You want to save details about the shipment such as the packing when you have several boxes you send for example. And for each you need to have weight, size, tracking number and I would add the products that are in it.
Hi Tks for label and answer.
Hi! @eldy About the database. Is ok if I create a new table ? In my case an expedition got only one tracking number. (a same shipping can contain several parcels). So tracking number stay in llx_expedition.
And the other user? please share your experiences here.
--List of parcels details related to an expedition
create table llx_expeditionparcel
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
fk_expedition integer NOT NULL,
description varchar(255), --Description of goods in the parcel (required by the custom)
value double(24,8) DEFAULT 0,--Value (Price of the content, for insurance & custom)
fk_parcel_type integer, -- Type or parcel, linked to llx_c_shipment_parcel_type (eg: 1=enveloppe, 2=parcel, 3=palette, 4=other)
height float, -- height
width float, -- width
size float, -- depth
size_units integer, -- unit of all sizes (height, width, depth)
weight float, -- weight
weight_units integer, -- unit of weight
dangerous_goods smallint DEFAULT 0, -- 0 = no dangerous goods or 1 = Explosives, 2 = Flammable Gases, 3 = Flammable Liquids, 4 = Flammable solids, 5 = Oxidizing, 6 = Toxic & Infectious, 7 = Radioactive, 8 = Corrosives, 9 = Miscellaneous (see https://en.wikipedia.org/wiki/Dangerous_goods). I'm not sure if just register 0 (no) or 1 (yes) is enough.
tail_lift smallint DEFAULT 0, -- 0 = no tail lift required to load/unload parcel(s), 1 = a tail lift is required to load/unload parcel(s). Sometime tail lift load can be different than tail lift delivery so maybe adding a new table line.
rang integer DEFAULT 0
)ENGINE=innodb;
--Dictionary of parcel type
create table llx_c_shipment_parcel_type
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
label varchar(50) NOT NULL, -- Short name
description varchar(255), -- Description
active integer DEFAULT 1 NOT NULL, -- Active or not
entity integer DEFAULT 1 NOT NULL -- Multi company id
)ENGINE=innodb;
Hey ! In our case too we have one trancking number per shipment BUT if your module tracks more than one way of shipping, imagine : your client orders 1 pallet (full) of one product (so you send it with a truck company) and 1 box of something (that could not fit on the pallet unfortunately so you send it with Chronopost for example) on the same order, and by mistake or by need you validate it on the same Shipment it would be useful to explode shipment in 2 parcels with 2 tracking numbers... it is a scenario that needs to be "forecasted" even if we don't need it yet ;)
In this case in my company we do several shipment for the same order
You can maybe add in llx_expeditionparcel net_weight (sum of the weights of each product) raw_weight (sum of the weights of each product+weight of the arton/pallet+tape+documentations...)
( rowid integer AUTO_INCREMENT PRIMARY KEY, fk_expedition integer NOT NULL, description varchar(255), --Description of goods in the parcel (required by the custom) value double(24,8) DEFAULT 0,--Value (Price of the content, for insurance & custom) fk_parcel_type integer, -- Type or parcel, linked to llx_c_shipment_parcel_type (eg: 1=enveloppe, 2=parcel, 3=palette, 4=other) height float, -- height width float, -- width size float, -- depth size_units integer, -- unit of all sizes (height, width, depth) weight float, -- weight weight_units integer, -- unit of weight
Let's go step by step. First, it's ok for a new table. However, i would use the translation llx_expedition_package instead of llx_expeditionparcel "parcel" is more british and "package" more american. But reference language is enUS so we should set priority to american forms. The is for better reabability. You can submit the first PR with the data model...
Hi @eldy tks for this feed back!
Hi todo add in admin/dic.php
// Name of SQL tables of dictionaries
$tabname[38]= MAIN_DB_PREFIX . "c_shipment_package_type";
// Dictionary labels
$tablib[38]= "DictionaryPackageType";
// Requests to extract data
$tabsql[38]= "SELECT r.rowid, r.label, r.description, r.active FROM " . MAIN_DB_PREFIX . "c_shipment_package_type AS r WHERE c.entity = " . getEntity($tabname[38]);
// Criteria to sort dictionaries
$tabsqlsort[38]="r.label ASC, r.description ASC";
// Nom des champs en resultat de select pour affichage du dictionnaire
$tabfield[38]= "label,description";
// Nom des champs d'edition pour modification d'un enregistrement
$tabfieldvalue[38]= "label,description";
// Nom des champs dans la table pour insertion d'un enregistrement
$tabfieldinsert[38]= "label,description,entity";
// Rowid name if the field is not autoincrement type
$tabrowid[38] = "";
// Condition to show dictionary in setup page
$tabcond[38]= ! empty($conf->expedition->enabled) || ! empty($conf->reception->enabled);
// List of help for fields
$tabhelp[38]= array();
// List of check for fields (NOT USED YET)
$tabfieldcheck[38]= array();
Hi now database is ok https://github.com/Dolibarr/dolibarr/pull/12193 @eldy can you tell me what is the next step I should work on? tks
Hi ! Please don't close this Feature Request :)
Hi bot Please keep this issue open
https://github.com/fappels/dolibarr-shipmentpackage submitted to dolistore with option to include in dolibarr core.
Hi @fappels :-) Tk you so much for this module !!!!!!!
Hello Please keep this Feature Request open.
Hello still relevant
This issue is stale because it has been open 1 year with no activity. If this is a bug, please comment to confirm it is still present on latest stable version. if this is a feature request, please comment to notify the request is still relevant and not yet covered by latest stable version. This issue may be closed automatically by stale bot in 10 days (you should still be able to re-open it if required).
Hello all! When I send a parcel, often one expedition is made by several parcels.
Example EXP25478 :
Actually to do the trick I add several extrafields, 10 in all.
I think it could be nice if we could have:
Where user can add/edit/delete a line
Hope it's clear....
Tks for reading