Fix: Not complete renaming
This commit is contained in:
parent
b52ca834a0
commit
891dbf5c60
@ -84,8 +84,8 @@ class Expedition extends CommonObject
|
||||
var $total_localtax2; // Total Local tax 2
|
||||
|
||||
var $listmeths; // List of carriers
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
@ -186,7 +186,7 @@ class Expedition extends CommonObject
|
||||
$sql.= ", date_delivery";
|
||||
$sql.= ", fk_soc";
|
||||
$sql.= ", fk_address";
|
||||
$sql.= ", fk_expedition_methode";
|
||||
$sql.= ", fk_shipping_method";
|
||||
$sql.= ", tracking_number";
|
||||
$sql.= ", weight";
|
||||
$sql.= ", size";
|
||||
@ -380,7 +380,7 @@ class Expedition extends CommonObject
|
||||
$this->date_delivery = $this->db->jdate($obj->date_delivery); // Date planed
|
||||
$this->fk_delivery_address = $obj->fk_address;
|
||||
$this->modelpdf = $obj->model_pdf;
|
||||
$this->shipping_method_id = $obj->fk_expedition_methode;
|
||||
$this->shipping_method_id = $obj->fk_shipping_method;
|
||||
$this->tracking_number = $obj->tracking_number;
|
||||
$this->origin = ($obj->origin?$obj->origin:'commande'); // For compatibility
|
||||
$this->origin_id = $obj->origin_id;
|
||||
@ -395,7 +395,7 @@ class Expedition extends CommonObject
|
||||
$this->height_units = $obj->size_units;
|
||||
$this->trueDepth = $obj->size;
|
||||
$this->depth_units = $obj->size_units;
|
||||
|
||||
|
||||
$this->note_public = $obj->note_public;
|
||||
$this->note_private = $obj->note_private;
|
||||
|
||||
@ -417,7 +417,7 @@ class Expedition extends CommonObject
|
||||
* Thirparty
|
||||
*/
|
||||
$result=$this->fetch_thirdparty();
|
||||
|
||||
|
||||
/*
|
||||
* Lines
|
||||
*/
|
||||
@ -1106,7 +1106,7 @@ class Expedition extends CommonObject
|
||||
|
||||
$this->origin_id = 1;
|
||||
$this->origin = 'commande';
|
||||
|
||||
|
||||
$this->note_private = 'Private note';
|
||||
$this->note_public = 'Public note';
|
||||
|
||||
@ -1191,14 +1191,14 @@ class Expedition extends CommonObject
|
||||
|
||||
/**
|
||||
* Fetch all deliveries method and return an array. Load array this->listmeths.
|
||||
*
|
||||
*
|
||||
* @param id $id only this carrier, all if none
|
||||
* @return void
|
||||
*/
|
||||
function list_delivery_methods($id='')
|
||||
{
|
||||
global $langs;
|
||||
|
||||
|
||||
$listmeths = array();
|
||||
$i=0;
|
||||
|
||||
@ -1243,9 +1243,9 @@ class Expedition extends CommonObject
|
||||
|
||||
/**
|
||||
* Update/create delivery method.
|
||||
*
|
||||
*
|
||||
* @param string $id id method to activate
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function update_delivery_method($id='')
|
||||
@ -1271,9 +1271,9 @@ class Expedition extends CommonObject
|
||||
|
||||
/**
|
||||
* Activate delivery method.
|
||||
*
|
||||
*
|
||||
* @param id $id id method to activate
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function activ_delivery_method($id)
|
||||
@ -1287,9 +1287,9 @@ class Expedition extends CommonObject
|
||||
|
||||
/**
|
||||
* DesActivate delivery method.
|
||||
*
|
||||
*
|
||||
* @param id $id id method to desactivate
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function disable_delivery_method($id)
|
||||
|
||||
@ -84,9 +84,17 @@ alter table llx_socpeople CHANGE COLUMN cp zip varchar(10);
|
||||
alter table llx_societe_rib CHANGE COLUMN adresse_proprio owner_address text;
|
||||
alter table llx_societe_address CHANGE COLUMN ville town text;
|
||||
alter table llx_societe_address CHANGE COLUMN cp zip varchar(10);
|
||||
alter table llx_expedition CHANGE COLUMN fk_expedition_methode fk_shipping_method integer;
|
||||
alter table llx_facture_fourn CHANGE COLUMN facnumber ref_supplier varchar(30);
|
||||
|
||||
|
||||
-- Rename a field that has a foreign key
|
||||
ALTER TABLE llx_expedition DROP FOREIGN KEY fk_expedition_fk_expedition_methode;
|
||||
ALTER TABLE llx_expedition DROP INDEX idx_expedition_fk_expedition_methode;
|
||||
ALTER TABLE llx_expedition CHANGE COLUMN fk_expedition_methode fk_shipping_method integer;
|
||||
ALTER TABLE llx_expedition ADD INDEX idx_expedition_fk_shipping_method (fk_shipping_method);
|
||||
ALTER TABLE llx_expedition ADD CONSTRAINT fk_expedition_fk_shipping_method FOREIGN KEY (fk_shipping_method) REFERENCES llx_c_shipment_mode (rowid);
|
||||
|
||||
|
||||
ALTER TABLE llx_c_shipment_mode ADD COLUMN tracking VARCHAR(256) NOT NULL DEFAULT '' AFTER description;
|
||||
|
||||
--ALTER TABLE llx_c_shipment_mode DROP COLUMN CASCADE;
|
||||
|
||||
@ -23,9 +23,9 @@ ALTER TABLE llx_expedition ADD UNIQUE INDEX idx_expedition_uk_ref (ref, entity);
|
||||
ALTER TABLE llx_expedition ADD INDEX idx_expedition_fk_soc (fk_soc);
|
||||
ALTER TABLE llx_expedition ADD INDEX idx_expedition_fk_user_author (fk_user_author);
|
||||
ALTER TABLE llx_expedition ADD INDEX idx_expedition_fk_user_valid (fk_user_valid);
|
||||
ALTER TABLE llx_expedition ADD INDEX idx_expedition_fk_expedition_methode (fk_expedition_methode);
|
||||
ALTER TABLE llx_expedition ADD INDEX idx_expedition_fk_shipping_method (fk_shipping_method);
|
||||
|
||||
ALTER TABLE llx_expedition ADD CONSTRAINT fk_expedition_fk_soc FOREIGN KEY (fk_soc) REFERENCES llx_societe (rowid);
|
||||
ALTER TABLE llx_expedition ADD CONSTRAINT fk_expedition_fk_user_author FOREIGN KEY (fk_user_author) REFERENCES llx_user (rowid);
|
||||
ALTER TABLE llx_expedition ADD CONSTRAINT fk_expedition_fk_user_valid FOREIGN KEY (fk_user_valid) REFERENCES llx_user (rowid);
|
||||
ALTER TABLE llx_expedition ADD CONSTRAINT fk_expedition_fk_expedition_methode FOREIGN KEY (fk_expedition_methode) REFERENCES llx_c_shipment_mode (rowid);
|
||||
ALTER TABLE llx_expedition ADD CONSTRAINT fk_expedition_fk_soc FOREIGN KEY (fk_soc) REFERENCES llx_societe (rowid);
|
||||
ALTER TABLE llx_expedition ADD CONSTRAINT fk_expedition_fk_user_author FOREIGN KEY (fk_user_author) REFERENCES llx_user (rowid);
|
||||
ALTER TABLE llx_expedition ADD CONSTRAINT fk_expedition_fk_user_valid FOREIGN KEY (fk_user_valid) REFERENCES llx_user (rowid);
|
||||
ALTER TABLE llx_expedition ADD CONSTRAINT fk_expedition_fk_shipping_method FOREIGN KEY (fk_shipping_method) REFERENCES llx_c_shipment_mode (rowid);
|
||||
|
||||
@ -38,7 +38,7 @@ create table llx_expedition
|
||||
date_expedition datetime, -- shipping date
|
||||
date_delivery datetime DEFAULT NULL, -- delivery date
|
||||
fk_address integer DEFAULT NULL, -- delivery address (deprecated)
|
||||
fk_expedition_methode integer,
|
||||
fk_shipping_method integer,
|
||||
tracking_number varchar(50),
|
||||
fk_statut smallint DEFAULT 0,
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user