Dolibarr / dolibarr

Dolibarr ERP CRM is a modern software package to manage your company or foundation's activity (contacts, suppliers, invoices, orders, stocks, agenda, accounting, ...). it's an open source Web application (written in PHP) designed for businesses of any sizes, foundations and freelancers.
https://www.dolibarr.org
GNU General Public License v3.0
5.23k stars 2.72k forks source link

Feature Request: New page parcels in shipping #11636

Open dolibarr95 opened 5 years ago

dolibarr95 commented 5 years ago

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:

# Width Height Depth Weight
1 10 30 10 0.5
2 150 7 7 3

Where user can add/edit/delete a line

Hope it's clear....

Tks for reading

atm-maxime commented 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.

dolibarr95 commented 5 years ago

Hi Tks for label and answer.

dolibarr95 commented 5 years ago

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;
BebZ commented 5 years ago

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 ;)

dolibarr95 commented 5 years ago

In this case in my company we do several shipment for the same order

BebZ commented 5 years ago

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

eldy commented 4 years ago

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...

dolibarr95 commented 4 years ago

Hi @eldy tks for this feed back!

dolibarr95 commented 4 years ago

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();
dolibarr95 commented 4 years ago

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

dolibarr95 commented 3 years ago

Hi ! Please don't close this Feature Request :)

dolibarr95 commented 2 years ago

Hi bot Please keep this issue open

fappels commented 2 years ago

https://github.com/fappels/dolibarr-shipmentpackage submitted to dolistore with option to include in dolibarr core.

dolibarr95 commented 2 years ago

Hi @fappels :-) Tk you so much for this module !!!!!!!

dolibarr95 commented 1 year ago

Hello Please keep this Feature Request open.

dolibarr95 commented 10 months ago

Hello still relevant