Suppression du dpartement dans l'adresse de livraison - inutile
This commit is contained in:
parent
ccb15a4986
commit
e2213ff450
@ -45,7 +45,6 @@ class Livraison
|
||||
var $adresse;
|
||||
var $cp;
|
||||
var $ville;
|
||||
var $departement_id;
|
||||
var $pays_id;
|
||||
var $pays_code;
|
||||
var $note;
|
||||
@ -176,7 +175,6 @@ class Livraison
|
||||
$this->adresse=trim($this->adresse);
|
||||
$this->cp=trim($this->cp);
|
||||
$this->ville=trim($this->ville);
|
||||
$this->departement_id=trim($this->departement_id);
|
||||
$this->pays_id=trim($this->pays_id);
|
||||
$this->note=trim($this->note);
|
||||
|
||||
@ -196,8 +194,7 @@ class Livraison
|
||||
|
||||
if ($this->ville)
|
||||
{ $sql .= ",ville = '" . addslashes($this->ville) ."'"; }
|
||||
|
||||
$sql .= ",fk_departement = '" . ($this->departement_id?$this->departement_id:'0') ."'";
|
||||
|
||||
$sql .= ",fk_pays = '" . ($this->pays_id?$this->pays_id:'0') ."'";
|
||||
$sql.= ",note = '" . addslashes($this->note) ."'";
|
||||
|
||||
@ -268,12 +265,10 @@ class Livraison
|
||||
{
|
||||
$sql = 'SELECT a.rowid as idl, a.label, a.nom, a.address,'.$this->db->pdate('a.datec').' as dc';
|
||||
$sql .= ','. $this->db->pdate('a.tms').' as date_update, a.fk_societe';
|
||||
$sql .= ', a.cp, a.ville, a.note, a.fk_departement, a.fk_pays';
|
||||
$sql .= ', a.cp, a.ville, a.note, a.fk_pays';
|
||||
$sql .= ', p.code as pays_code, p.libelle as pays';
|
||||
$sql .= ', d.code_departement as departement_code, d.nom as departement';
|
||||
$sql .= ' FROM '.MAIN_DB_PREFIX.'societe_adresse_livraison as a';
|
||||
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_pays as p ON a.fk_pays = p.rowid';
|
||||
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_departements as d ON a.fk_departement = d.rowid';
|
||||
$sql .= ' WHERE a.fk_societe = '.$this->socid;
|
||||
|
||||
$resql=$this->db->query($sql);
|
||||
@ -299,8 +294,6 @@ class Livraison
|
||||
$ligne->pays_id = $objp->fk_pays;
|
||||
$ligne->pays_code = $objp->fk_pays?$objp->pays_code:'';
|
||||
$ligne->pays = $objp->fk_pays?($langs->trans('Country'.$objp->pays_code)!='Country'.$objp->pays_code?$langs->trans('Country'.$objp->pays_code):$objp->pays):'';
|
||||
$ligne->departement_id = $objp->fk_departement;
|
||||
$ligne->departement = $objp->fk_departement?$objp->departement:'';
|
||||
$ligne->note = $objp->note;
|
||||
|
||||
$this->lignes[$i] = $ligne;
|
||||
@ -341,12 +334,10 @@ class Livraison
|
||||
|
||||
$sql = 'SELECT a.rowid, a.fk_societe, a.label, a.nom, a.address,'.$this->db->pdate('a.datec').' as dc';
|
||||
$sql .= ','. $this->db->pdate('a.tms').' as date_update';
|
||||
$sql .= ', a.cp,a.ville, a.note, a.fk_departement, a.fk_pays';
|
||||
$sql .= ', a.cp,a.ville, a.note, a.fk_pays';
|
||||
$sql .= ', p.code as pays_code, p.libelle as pays';
|
||||
$sql .= ', d.code_departement as departement_code, d.nom as departement';
|
||||
$sql .= ' FROM '.MAIN_DB_PREFIX.'societe_adresse_livraison as a';
|
||||
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_pays as p ON a.fk_pays = p.rowid';
|
||||
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_departements as d ON a.fk_departement = d.rowid';
|
||||
$sql .= ' WHERE a.rowid = '.$idl;
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql)
|
||||
@ -372,9 +363,6 @@ class Livraison
|
||||
$this->pays_code = $obj->fk_pays?$obj->pays_code:'';
|
||||
$this->pays = $obj->fk_pays?($langs->trans('Country'.$obj->pays_code)!='Country'.$obj->pays_code?$langs->trans('Country'.$obj->pays_code):$obj->pays):'';
|
||||
|
||||
$this->departement_id = $obj->fk_departement;
|
||||
$this->departement= $obj->fk_departement?$obj->departement:'';
|
||||
|
||||
$this->note = $obj->note;
|
||||
|
||||
$result = 1;
|
||||
@ -510,8 +498,6 @@ class AdresseLivraisonLigne
|
||||
var $pays_id;
|
||||
var $pays_code;
|
||||
var $pays;
|
||||
var $departement_id;
|
||||
var $departement;
|
||||
var $note;
|
||||
|
||||
function AdresseLivraisonLigne()
|
||||
|
||||
@ -90,7 +90,6 @@ if ($_POST["action"] == 'add' || $_POST["action"] == 'update')
|
||||
$livraison->cp = $_POST["cp"];
|
||||
$livraison->ville = $_POST["ville"];
|
||||
$livraison->pays_id = $_POST["pays_id"];
|
||||
$livraison->departement_id = $_POST["departement_id"];
|
||||
$livraison->note = $_POST["note"];
|
||||
|
||||
if ($_POST["action"] == 'add')
|
||||
@ -204,7 +203,6 @@ if ($_GET["action"] == 'create' || $_POST["action"] == 'create')
|
||||
$livraison->adresse=$_POST["adresse"];
|
||||
$livraison->cp=$_POST["cp"];
|
||||
$livraison->ville=$_POST["ville"];
|
||||
$livraison->departement_id=$_POST["departement_id"];
|
||||
$livraison->note=$_POST["note"];
|
||||
}
|
||||
|
||||
@ -259,18 +257,7 @@ if ($_GET["action"] == 'create' || $_POST["action"] == 'create')
|
||||
print '<tr><td>'.$langs->trans('Town').'</td><td><input type="text" name="ville" value="'.$livraison->ville.'"></td></tr>';
|
||||
|
||||
print '<tr><td width="25%">'.$langs->trans('Country').'</td><td colspan="3">';
|
||||
$form->select_pays($livraison->pays_id,'pays_id',$conf->use_javascript?' onChange="autofilltownfromzip_save_refresh_create()"':'');
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans('State').'</td><td colspan="3">';
|
||||
if ($livraison->pays_id)
|
||||
{
|
||||
$form->select_departement($livraison->departement_id,$livraison->pays_code);
|
||||
}
|
||||
else
|
||||
{
|
||||
print $countrynotdefined;
|
||||
}
|
||||
$form->select_pays($livraison->pays_id,'pays_id');
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans('Note').'</td><td colspan="3"><textarea name="note" cols="40" rows="6" wrap="soft">';
|
||||
@ -311,7 +298,6 @@ elseif ($_GET["action"] == 'edit' || $_POST["action"] == 'edit')
|
||||
$livraison->zip=$_POST["zip"];
|
||||
$livraison->ville=$_POST["ville"];
|
||||
$livraison->pays_id=$_POST["pays_id"]?$_POST["pays_id"]:$conf->global->MAIN_INFO_SOCIETE_PAYS;
|
||||
$livraison->departement_id=$_POST["departement_id"];
|
||||
$livraison->note=$_POST["note"];
|
||||
|
||||
// On positionne pays_id, pays_code et libelle du pays choisi
|
||||
@ -366,10 +352,6 @@ elseif ($_GET["action"] == 'edit' || $_POST["action"] == 'edit')
|
||||
print '<tr><td>'.$langs->trans('Country').'</td><td colspan="3">';
|
||||
$form->select_pays($livraison->pays_id,'pays_id',$conf->use_javascript?' onChange="autofilltownfromzip_save_refresh_edit()"':'');
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans('State').'</td><td colspan="3">';
|
||||
$form->select_departement($livraison->departement_id,$livraison->pays_code);
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans('Note').'</td><td colspan="3"><textarea name="note" cols="40" rows="6" wrap="soft">';
|
||||
print $livraison->note;
|
||||
@ -434,8 +416,6 @@ else
|
||||
print '<tr><td>'.$langs->trans('Country').'</td><td colspan="3">'.$livraison->lignes[$i]->pays.'</td>';
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans('State').'</td><td colspan="3">'.$livraison->lignes[$i]->departement.'</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
|
||||
|
||||
@ -308,4 +308,6 @@ update llx_actioncomm set fk_action = '8' where fk_action = '3' and label = 'En
|
||||
|
||||
insert into llx_const (name, value, type, visible, note) VALUES ('PROPALE_VALIDITY_DURATION', '15', 'chaine', 0, 'Durée de validitée des propales');
|
||||
|
||||
alter table llx_propal add column ref_client varchar(30) after ref;
|
||||
alter table llx_propal add column ref_client varchar(30) after ref;
|
||||
|
||||
alter table llx_societe_adresse_livraison drop column fk_departement;
|
||||
@ -32,7 +32,6 @@ create table llx_societe_adresse_livraison
|
||||
address varchar(255), -- company adresse
|
||||
cp varchar(10), -- zipcode
|
||||
ville varchar(50), -- town
|
||||
fk_departement integer DEFAULT 0, --
|
||||
fk_pays integer DEFAULT 0, --
|
||||
note text, --
|
||||
fk_user_creat integer, -- utilisateur qui a créé l'info
|
||||
|
||||
Loading…
Reference in New Issue
Block a user