forked from Wavyzz/dolibarr
Fix: uniformize code
Fix: if the contact's address is empty, it uses one of the company
This commit is contained in:
@@ -169,7 +169,7 @@ if ($_GET["socid"])
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
print "<tr><td valign=\"top\">".$langs->trans('Address')."</td><td colspan=\"3\">".nl2br($soc->adresse)."</td></tr>";
|
||||
print "<tr><td valign=\"top\">".$langs->trans('Address')."</td><td colspan=\"3\">".nl2br($soc->address)."</td></tr>";
|
||||
|
||||
print '<tr><td>'.$langs->trans('Zip').'</td><td>'.$soc->cp."</td>";
|
||||
print '<td>'.$langs->trans('Town').'</td><td>'.$soc->ville."</td></tr>";
|
||||
|
||||
@@ -176,7 +176,7 @@ if ($_GET["action"] == 'create')
|
||||
{
|
||||
print '<tr><td>'.$langs->trans('DeliveryAddress').'</td>';
|
||||
print '<td colspan="3">';
|
||||
$numaddress = $html->select_adresse_livraison($soc->adresse_livraison_id, $_GET['socid'],'adresse_livraison_id',1);
|
||||
$numaddress = $html->select_adresse_livraison($soc->fk_delivery_address, $_GET['socid'],'adresse_livraison_id',1);
|
||||
if ($numaddress==0)
|
||||
{
|
||||
print ' <a href=../comm/adresse_livraison.php?socid='.$soc->id.'&action=create>'.$langs->trans("AddAddress").'</a>';
|
||||
|
||||
@@ -39,7 +39,8 @@ class AdresseLivraison
|
||||
var $label;
|
||||
var $socid;
|
||||
var $nom;
|
||||
var $adresse;
|
||||
var $adresse; // TODO obsolete
|
||||
var $address;
|
||||
var $cp;
|
||||
var $ville;
|
||||
var $pays_id;
|
||||
@@ -171,7 +172,8 @@ class AdresseLivraison
|
||||
$this->fk_societe = $socid;
|
||||
$this->label = trim($this->label);
|
||||
$this->nom = trim($this->nom);
|
||||
$this->adresse = trim($this->adresse);
|
||||
$this->adresse = trim($this->adresse); // TODO obsolete
|
||||
$this->address = trim($this->address);
|
||||
$this->cp = trim($this->cp);
|
||||
$this->ville = trim($this->ville);
|
||||
$this->pays_id = trim($this->pays_id);
|
||||
@@ -192,7 +194,7 @@ class AdresseLivraison
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."societe_adresse_livraison";
|
||||
$sql.= " SET label = '" . addslashes($this->label) ."'"; // Champ obligatoire
|
||||
$sql.= ",nom = '" . addslashes($this->nom) ."'"; // Champ obligatoire
|
||||
$sql.= ",address = '" . addslashes($this->adresse) ."'";
|
||||
$sql.= ",address = '" . addslashes($this->address) ."'";
|
||||
|
||||
if ($this->cp)
|
||||
{ $sql .= ",cp = '" . $this->cp ."'"; }
|
||||
@@ -298,10 +300,12 @@ class AdresseLivraison
|
||||
$ligne->date_update = $objp->date_update;
|
||||
$ligne->label = stripslashes($objp->label);
|
||||
$ligne->nom = stripslashes($objp->nom);
|
||||
$ligne->adresse = stripslashes($objp->address);
|
||||
$ligne->address = stripslashes($objp->address);
|
||||
$ligne->adresse = stripslashes($objp->address); // TODO obsolete
|
||||
$ligne->cp = $objp->cp;
|
||||
$ligne->ville = stripslashes($objp->ville);
|
||||
$ligne->adresse_full = stripslashes($objp->address) . "\n". $objp->cp . ' '. stripslashes($objp->ville);
|
||||
$ligne->full_address = stripslashes($objp->address) . "\n". $objp->cp . ' '. stripslashes($objp->ville); // TODO obsolete
|
||||
$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?strtoupper($langs->trans('Country'.$objp->pays_code)):$objp->pays):'';
|
||||
@@ -367,10 +371,12 @@ class AdresseLivraison
|
||||
|
||||
$this->label = stripslashes($obj->label);
|
||||
$this->nom = stripslashes($obj->nom);
|
||||
$this->adresse = stripslashes($obj->address);
|
||||
$this->adresse = stripslashes($obj->address); // TODO obsolete
|
||||
$this->address = stripslashes($obj->address);
|
||||
$this->cp = $obj->cp;
|
||||
$this->ville = stripslashes($obj->ville);
|
||||
$this->adresse_full = stripslashes($obj->address) . "\n". $obj->cp . ' '. stripslashes($obj->ville);
|
||||
$this->full_address = stripslashes($obj->address) . "\n". $obj->cp . ' '. stripslashes($obj->ville); //TODO obsolete
|
||||
|
||||
$this->pays_id = $obj->fk_pays;
|
||||
$this->pays_code = $obj->fk_pays?$obj->pays_code:'';
|
||||
|
||||
@@ -55,6 +55,7 @@ if ($_POST["action"] == 'add' || $_POST["action"] == 'update')
|
||||
$livraison->label = ($_POST["label"]!=$langs->trans('RequiredField')?$_POST["label"]:'');
|
||||
$livraison->nom = ($_POST["nom"]!=$langs->trans('RequiredField')?$_POST["nom"]:'');
|
||||
$livraison->adresse = $_POST["adresse"];
|
||||
$livraison->address = $_POST["adresse"]; // TODO obsolete
|
||||
$livraison->cp = $_POST["cp"];
|
||||
$livraison->ville = $_POST["ville"];
|
||||
$livraison->pays_id = $_POST["pays_id"];
|
||||
@@ -184,7 +185,8 @@ if ($_GET["action"] == 'create' || $_POST["action"] == 'create')
|
||||
$livraison->socid=$_POST["socid"];
|
||||
$livraison->label=$_POST["label"];
|
||||
$livraison->nom=$_POST["nom"];
|
||||
$livraison->adresse=$_POST["adresse"];
|
||||
$livraison->adresse=$_POST["adresse"]; // TODO obsolete
|
||||
$livraison->address=$_POST["adresse"];
|
||||
$livraison->cp=$_POST["cp"];
|
||||
$livraison->ville=$_POST["ville"];
|
||||
$livraison->tel=$_POST["tel"];
|
||||
@@ -233,7 +235,7 @@ if ($_GET["action"] == 'create' || $_POST["action"] == 'create')
|
||||
print '<tr><td>'.$langs->trans('Name').'</td><td><input type="text" size="30" name="nom" id="nom" value="'.($livraison->nom?$livraison->nom:$langs->trans('RequiredField')).'" '.addHelpMessage("nom",$langs->trans('RequiredField')).'></td></tr>';
|
||||
|
||||
print '<tr><td valign="top">'.$langs->trans('Address').'</td><td colspan="3"><textarea name="adresse" cols="40" rows="3" wrap="soft">';
|
||||
print $livraison->adresse;
|
||||
print $livraison->address;
|
||||
print '</textarea></td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans('Zip').'</td><td><input size="6" type="text" name="cp" value="'.$livraison->cp.'">';
|
||||
@@ -290,7 +292,8 @@ elseif ($_GET["action"] == 'edit' || $_POST["action"] == 'edit')
|
||||
$livraison->socid=$_POST["socid"];
|
||||
$livraison->label=$_POST["label"];
|
||||
$livraison->nom=$_POST["nom"];
|
||||
$livraison->adresse=$_POST["adresse"];
|
||||
$livraison->adresse=$_POST["adresse"]; // TODO obsolete
|
||||
$livraison->address=$_POST["adresse"];
|
||||
$livraison->zip=$_POST["zip"];
|
||||
$livraison->ville=$_POST["ville"];
|
||||
$livraison->pays_id=$_POST["pays_id"]?$_POST["pays_id"]:$conf->global->MAIN_INFO_SOCIETE_PAYS;
|
||||
@@ -337,7 +340,7 @@ elseif ($_GET["action"] == 'edit' || $_POST["action"] == 'edit')
|
||||
print '<tr><td>'.$langs->trans('Name').'</td><td colspan="3"><input type="text" size="40" name="nom" value="'.$livraison->nom.'"></td></tr>';
|
||||
|
||||
print '<tr><td valign="top">'.$langs->trans('Address').'</td><td colspan="3"><textarea name="adresse" cols="40" rows="3" wrap="soft">';
|
||||
print $livraison->adresse;
|
||||
print $livraison->address;
|
||||
print '</textarea></td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans('Zip').'</td><td><input size="6" type="text" name="cp" value="'.$livraison->cp.'">';
|
||||
@@ -411,7 +414,7 @@ else
|
||||
print '<td valign="top" colspan="2" width="50%" rowspan="6">'.$langs->trans('Note').' :<br>'.nl2br($livraison->lignes[$i]->note).'</td></tr>';
|
||||
print '<tr><td width="20%">'.$langs->trans('Name').'</td><td colspan="3">'.$livraison->lignes[$i]->nom.'</td></tr>';
|
||||
|
||||
print "<tr><td valign=\"top\">".$langs->trans('Address')."</td><td colspan=\"3\">".nl2br($livraison->lignes[$i]->adresse)."</td></tr>";
|
||||
print "<tr><td valign=\"top\">".$langs->trans('Address')."</td><td colspan=\"3\">".nl2br($livraison->lignes[$i]->address)."</td></tr>";
|
||||
|
||||
print '<tr><td width="25%">'.$langs->trans('Zip').'</td><td width="25%">'.$livraison->lignes[$i]->cp."</td></tr>";
|
||||
print '<tr><td width="25%">'.$langs->trans('Town').'</td><td width="25%">'.$livraison->lignes[$i]->ville."</td></tr>";
|
||||
|
||||
@@ -177,7 +177,7 @@ if ($socid > 0)
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
print "<tr><td valign=\"top\">".$langs->trans('Address')."</td><td colspan=\"3\">".nl2br($objsoc->adresse)."</td></tr>";
|
||||
print "<tr><td valign=\"top\">".$langs->trans('Address')."</td><td colspan=\"3\">".nl2br($objsoc->address)."</td></tr>";
|
||||
|
||||
// Zip / Town
|
||||
print '<tr><td>'.$langs->trans('Zip').'</td><td>'.$objsoc->cp."</td>";
|
||||
|
||||
@@ -232,7 +232,8 @@ if ($_POST['action'] == 'add' && $user->rights->propale->creer)
|
||||
$propal->ref = $_POST['ref'];
|
||||
$propal->datep = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']);
|
||||
$propal->date_livraison = dol_mktime(12, 0, 0, $_POST['liv_month'], $_POST['liv_day'], $_POST['liv_year']);
|
||||
$propal->adresse_livraison_id = $_POST['adresse_livraison_id'];
|
||||
$propal->fk_delivery_address = $_POST['adresse_livraison_id'];
|
||||
$propal->adresse_livraison_id = $_POST['adresse_livraison_id']; // TODO obsolete
|
||||
$propal->duree_validite = $_POST['duree_validite'];
|
||||
$propal->cond_reglement_id = $_POST['cond_reglement_id'];
|
||||
$propal->mode_reglement_id = $_POST['mode_reglement_id'];
|
||||
@@ -259,7 +260,8 @@ if ($_POST['action'] == 'add' && $user->rights->propale->creer)
|
||||
$propal->ref_client = $_POST['ref_client'];
|
||||
$propal->datep = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']);
|
||||
$propal->date_livraison = dol_mktime(12, 0, 0, $_POST['liv_month'], $_POST['liv_day'], $_POST['liv_year']);
|
||||
$propal->adresse_livraison_id = $_POST['adresse_livraison_id'];
|
||||
$propal->fk_delivery_address = $_POST['fk_delivery_address'];
|
||||
$propal->adresse_livraison_id = $_POST['fk_delivery_address']; // TODO obsolete
|
||||
$propal->duree_validite = $_POST['duree_validite'];
|
||||
$propal->cond_reglement_id = $_POST['cond_reglement_id'];
|
||||
$propal->mode_reglement_id = $_POST['mode_reglement_id'];
|
||||
@@ -1153,11 +1155,11 @@ if ($id > 0 || ! empty($ref))
|
||||
|
||||
if ($_GET['action'] == 'editdelivery_adress')
|
||||
{
|
||||
$html->form_adresse_livraison($_SERVER['PHP_SELF'].'?propalid='.$propal->id,$propal->adresse_livraison_id,$_GET['socid'],'adresse_livraison_id','propal',$propal->id);
|
||||
$html->form_adresse_livraison($_SERVER['PHP_SELF'].'?propalid='.$propal->id,$propal->fk_delivery_address,$_GET['socid'],'fk_delivery_address','propal',$propal->id);
|
||||
}
|
||||
else
|
||||
{
|
||||
$html->form_adresse_livraison($_SERVER['PHP_SELF'].'?propalid='.$propal->id,$propal->adresse_livraison_id,$_GET['socid'],'none','propal',$propal->id);
|
||||
$html->form_adresse_livraison($_SERVER['PHP_SELF'].'?propalid='.$propal->id,$propal->fk_delivery_address,$_GET['socid'],'none','propal',$propal->id);
|
||||
}
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ if ($socid > 0)
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
print '<tr><td width="25%">'.$langs->trans("Name").'</td><td width="80%" colspan="3">'.$societe->nom.'</td></tr>';
|
||||
print '<tr><td valign="top">'.$langs->trans("Address").'</td><td colspan="3">'.nl2br($societe->adresse)."</td></tr>";
|
||||
print '<tr><td valign="top">'.$langs->trans("Address").'</td><td colspan="3">'.nl2br($societe->address)."</td></tr>";
|
||||
|
||||
// Zip / Town
|
||||
print '<tr><td>'.$langs->trans('Zip').'</td><td>'.$societe->cp.'</td>';
|
||||
|
||||
@@ -139,7 +139,8 @@ class Commande extends CommonObject
|
||||
$this->cond_reglement_id = $propal->cond_reglement_id;
|
||||
$this->mode_reglement_id = $propal->mode_reglement_id;
|
||||
$this->date_livraison = $propal->date_livraison;
|
||||
$this->adresse_livraison_id = $propal->adresse_livraison_id;
|
||||
$this->fk_delivery_address = $propal->fk_delivery_address;
|
||||
$this->adresse_livraison_id = $propal->adresse_livraison_id; // TODO obsolete
|
||||
$this->contact_id = $propal->contactid;
|
||||
$this->ref_client = $propal->ref_client;
|
||||
$this->note = $propal->note;
|
||||
@@ -554,7 +555,7 @@ class Commande extends CommonObject
|
||||
$sql.= ", ".($this->cond_reglement_id>0?"'".$this->cond_reglement_id."'":"null");
|
||||
$sql.= ", ".($this->mode_reglement_id>0?"'".$this->mode_reglement_id."'":"null");
|
||||
$sql.= ", ".($this->date_livraison?"'".$this->db->idate($this->date_livraison)."'":"null");
|
||||
$sql.= ", ".($this->adresse_livraison_id>0?$this->adresse_livraison_id:'NULL');
|
||||
$sql.= ", ".($this->fk_delivery_address>0?$this->fk_delivery_address:'NULL');
|
||||
$sql.= ", ".($this->remise_absolue>0?$this->remise_absolue:'NULL');
|
||||
$sql.= ", '".$this->remise_percent."'";
|
||||
$sql.= ", ".$conf->entity;
|
||||
@@ -1549,16 +1550,17 @@ class Commande extends CommonObject
|
||||
* \param adresse_livraison Adresse de livraison
|
||||
* \return int <0 si ko, >0 si ok
|
||||
*/
|
||||
function set_adresse_livraison($user, $adresse_livraison)
|
||||
function set_adresse_livraison($user, $fk_delivery_address)
|
||||
{
|
||||
if ($user->rights->commande->creer)
|
||||
{
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."commande SET fk_adresse_livraison = '".$adresse_livraison."'";
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."commande SET fk_adresse_livraison = '".$fk_delivery_address."'";
|
||||
$sql.= " WHERE rowid = ".$this->id." AND fk_statut = 0";
|
||||
|
||||
if ($this->db->query($sql) )
|
||||
{
|
||||
$this->adresse_livraison_id = $adresse_livraison;
|
||||
$this->adresse_livraison_id = $fk_delivery_address; // TODO obsolete
|
||||
$this->fk_delivery_address = $fk_delivery_address;
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -167,7 +167,8 @@ if ($_POST['action'] == 'add' && $user->rights->commande->creer)
|
||||
$commande->cond_reglement_id = $_POST['cond_reglement_id'];
|
||||
$commande->mode_reglement_id = $_POST['mode_reglement_id'];
|
||||
$commande->date_livraison = $datelivraison;
|
||||
$commande->adresse_livraison_id = $_POST['adresse_livraison_id'];
|
||||
$commande->fk_delivery_address = $_POST['fk_delivery_address'];
|
||||
$commande->adresse_livraison_id = $_POST['fk_delivery_address']; // TODO obsolete
|
||||
$commande->contactid = $_POST['contactidp'];
|
||||
|
||||
$NBLINES=8;
|
||||
@@ -1005,7 +1006,7 @@ if ($_GET['action'] == 'create' && $user->rights->commande->creer)
|
||||
{
|
||||
// Link to edit: $html->form_adresse_livraison($_SERVER['PHP_SELF'].'?action=create','',$soc->id,'adresse_livraison_id','commande','');
|
||||
print '<tr><td nowrap="nowrap">'.$langs->trans('DeliveryAddress').'</td><td>';
|
||||
$numaddress = $html->select_adresse_livraison($soc->adresse_livraison_id, $_GET['socid'],'adresse_livraison_id',1);
|
||||
$numaddress = $html->select_adresse_livraison($soc->fk_delivery_address, $_GET['socid'],'fk_delivery_address',1);
|
||||
print ' <a href="../comm/adresse_livraison.php?socid='.$soc->id.'&action=create">'.$langs->trans("AddAddress").'</a>';
|
||||
print '</td></tr>';
|
||||
}
|
||||
@@ -1442,11 +1443,11 @@ else
|
||||
|
||||
if ($_GET['action'] == 'editdelivery_adress')
|
||||
{
|
||||
$html->form_adresse_livraison($_SERVER['PHP_SELF'].'?id='.$commande->id,$commande->adresse_livraison_id,$_GET['socid'],'adresse_livraison_id','commande',$commande->id);
|
||||
$html->form_adresse_livraison($_SERVER['PHP_SELF'].'?id='.$commande->id,$commande->fk_delivery_address,$_GET['socid'],'fk_delivery_address','commande',$commande->id);
|
||||
}
|
||||
else
|
||||
{
|
||||
$html->form_adresse_livraison($_SERVER['PHP_SELF'].'?id='.$commande->id,$commande->adresse_livraison_id,$_GET['socid'],'none','commande',$commande->id);
|
||||
$html->form_adresse_livraison($_SERVER['PHP_SELF'].'?id='.$commande->id,$commande->fk_delivery_address,$_GET['socid'],'none','commande',$commande->id);
|
||||
}
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
@@ -389,7 +389,7 @@ class CommonObject
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Charge l'adresse de livraison d'id $this->adresse_livraison_id dans this->deliveryaddress
|
||||
* \brief Charge l'adresse de livraison d'id $this->fk_delivery_address dans this->deliveryaddress
|
||||
* \param userid Id du contact
|
||||
* \return int <0 if KO, >0 if OK
|
||||
*/
|
||||
@@ -398,7 +398,8 @@ class CommonObject
|
||||
$address = new Societe($this->db);
|
||||
$result=$address->fetch_adresse_livraison($deliveryaddressid);
|
||||
$this->deliveryaddress = $address;
|
||||
$this->adresse = $adresse;
|
||||
$this->adresse = $address; // TODO obsolete
|
||||
$this->address = $address;
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@@ -392,7 +392,7 @@ class Contact extends CommonObject
|
||||
$sql.= " c.poste, c.phone, c.phone_perso, c.phone_mobile, c.fax, c.email, c.jabberid,";
|
||||
$sql.= " c.priv, c.note,";
|
||||
$sql.= " u.rowid as user_id, u.login as user_login,";
|
||||
$sql.= " s.nom as socname";
|
||||
$sql.= " s.nom as socname, s.address as socaddress, s.cp as soccp, s.ville as soccity";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."socpeople as c";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_pays as p ON c.fk_pays = p.rowid";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."user as u ON c.rowid = u.fk_socpeople";
|
||||
@@ -415,10 +415,10 @@ class Contact extends CommonObject
|
||||
$this->nom = $obj->name;
|
||||
$this->prenom = $obj->firstname;
|
||||
|
||||
$this->address = $obj->address;
|
||||
$this->adresse = $obj->address; // Todo: uniformiser le nom des variables
|
||||
$this->cp = $obj->cp;
|
||||
$this->ville = $obj->ville;
|
||||
$this->address = $obj->address?$obj->address:$obj->socaddress;
|
||||
$this->adresse = $obj->address; // TODO obsolete
|
||||
$this->cp = $obj->cp?$obj->cp:$obj->soccp;
|
||||
$this->ville = $obj->ville?$obj->ville:$obj->soccity;
|
||||
$this->fk_pays = $obj->fk_pays;
|
||||
$this->pays_code = $obj->fk_pays?$obj->pays_code:'';
|
||||
$this->pays = ($obj->fk_pays > 0)?$langs->transnoentities("Country".$obj->pays_code):$langs->transnoentities("SelectCountry");
|
||||
|
||||
@@ -297,7 +297,7 @@ if ($user->rights->societe->contact->creer)
|
||||
print '<tr><td>'.$langs->trans("PostOrFunction").'</td><td colspan="3"><input name="poste" type="text" size="50" maxlength="80" value="'.$contact->poste.'"></td>';
|
||||
|
||||
// Address
|
||||
if (($objsoc->typent_code == 'TE_PRIVATE') && strlen(trim($contact->address)) == 0) $contact->address = $objsoc->adresse; // Predefined with third party
|
||||
if (($objsoc->typent_code == 'TE_PRIVATE') && strlen(trim($contact->address)) == 0) $contact->address = $objsoc->address; // Predefined with third party
|
||||
print '<tr><td>'.$langs->trans("Address").'</td><td colspan="3"><textarea class="flat" name="address" cols="70">'.$contact->address.'</textarea></td>';
|
||||
|
||||
if (($objsoc->typent_code == 'TE_PRIVATE') && strlen(trim($contact->cp)) == 0) $contact->cp = $objsoc->cp; // Predefined with third party
|
||||
|
||||
@@ -67,9 +67,9 @@ if ($company->id)
|
||||
$v->setURL($company->url, "WORK");
|
||||
if (! $contact->phone_pro) $v->setPhoneNumber($company->tel, "WORK;VOICE");
|
||||
if (! $contact->fax) $v->setPhoneNumber($company->fax, "WORK;FAX");
|
||||
if (! $contact->cp) $v->setAddress("", "", $company->adresse, $company->ville, "", $company->cp, $company->pays_code, "WORK;POSTAL");
|
||||
if (! $contact->cp) $v->setAddress("", "", $company->address, $company->ville, "", $company->cp, $company->pays_code, "WORK;POSTAL");
|
||||
if ($company->email != $contact->email) $v->setEmail($company->email,'internet');
|
||||
// Si contact li<EFBFBD> <20> un tiers non de type "particulier"
|
||||
// Si contact lie a un tiers non de type "particulier"
|
||||
if ($contact->typent_code != 'TE_PRIVATE') $v->setOrg($company->nom);
|
||||
}
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@ class pdf_courrier_droit_editeur
|
||||
{
|
||||
$pdfrights = array('print'); // Ne permet que l'impression du document
|
||||
$pdfuserpass = ''; // Mot de passe pour l'utilisateur final
|
||||
$pdfownerpass = NULL; // Mot de passe du propri<EFBFBD>taire, cr<EFBFBD><EFBFBD> al<EFBFBD>atoirement si pas d<EFBFBD>fini
|
||||
$pdfownerpass = NULL; // Mot de passe du proprietaire, cree aleatoirement si pas defini
|
||||
$pdf_all->SetProtection($pdfrights,$pdfuserpass,$pdfownerpass);
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@ class pdf_courrier_droit_editeur
|
||||
{
|
||||
$pdfrights = array('print'); // Ne permet que l'impression du document
|
||||
$pdfuserpass = ''; // Mot de passe pour l'utilisateur final
|
||||
$pdfownerpass = NULL; // Mot de passe du propri<EFBFBD>taire, cr<EFBFBD><EFBFBD> al<EFBFBD>atoirement si pas d<EFBFBD>fini
|
||||
$pdfownerpass = NULL; // Mot de passe du proprietaire, cree aleatoirement si pas defini
|
||||
$pdf->SetProtection($pdfrights,$pdfuserpass,$pdfownerpass);
|
||||
}
|
||||
|
||||
@@ -153,7 +153,7 @@ class pdf_courrier_droit_editeur
|
||||
}
|
||||
|
||||
/**
|
||||
\brief Fonction g<EFBFBD>n<EFBFBD>rant le fichier
|
||||
\brief Fonction generant le fichier
|
||||
\param id id de la societe
|
||||
\return int 1=ok, 0=ko
|
||||
*/
|
||||
@@ -180,7 +180,7 @@ class pdf_courrier_droit_editeur
|
||||
$books = array();
|
||||
$year_data = $year - 1;
|
||||
|
||||
// On r<EFBFBD>cup<EFBFBD>re donn<EFBFBD>es du mail
|
||||
// On recupere donnees du mail
|
||||
$sql = "SELECT p.rowid,p.label, pc.taux, pc.quantite";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."facture as f";
|
||||
$sql .= " , ".MAIN_DB_PREFIX."facturedet as fd";
|
||||
@@ -240,8 +240,8 @@ class pdf_courrier_droit_editeur
|
||||
$pdf->SetFont('Arial','B',11);
|
||||
$pdf->MultiCell(106,4, $soc->nom, 0, 'L');
|
||||
|
||||
// Caract<EFBFBD>ristiques client
|
||||
$carac_client=$soc->adresse;
|
||||
// Caracteristiques client
|
||||
$carac_client=$soc->address;
|
||||
$carac_client.="\n".$soc->cp . " " . $soc->ville."\n";
|
||||
$carac_client.=$soc->pays."\n";
|
||||
|
||||
@@ -257,7 +257,7 @@ class pdf_courrier_droit_editeur
|
||||
|
||||
$pdf->SetXY(10,100);
|
||||
|
||||
$pdf->MultiCell(190,5,"Je vous prie de trouver ci-dessous le r<EFBFBD>capitulatif des ventes du titre cit<EFBFBD> pour la p<EFBFBD>riode du 1er janvier au 31 d<EFBFBD>cembre $year_data.");
|
||||
$pdf->MultiCell(190,5,"Je vous prie de trouver ci-dessous le recapitulatif des ventes du titre cite pour la periode du 1er janvier au 31 decembre $year_data.");
|
||||
|
||||
$pdf->SetXY(10,120);
|
||||
$pdf->MultiCell(25,5,"Nom du titre : ");
|
||||
@@ -267,7 +267,7 @@ class pdf_courrier_droit_editeur
|
||||
|
||||
$pdf->SetFont('Arial','',10);
|
||||
$pdf->SetXY(10,140);
|
||||
$pdf->MultiCell(46,5,"Quantit<EFBFBD> sign<EFBFBD>e au contrat : ");
|
||||
$pdf->MultiCell(46,5,"Quantite signee au contrat : ");
|
||||
|
||||
$pdf->SetFont('Arial','B',10);
|
||||
$pdf->SetXY(56,140);
|
||||
@@ -296,7 +296,7 @@ class pdf_courrier_droit_editeur
|
||||
|
||||
$pdf->SetFont('Arial','',10);
|
||||
$pdf->SetXY(10,140 + ($i * 8) );
|
||||
$pdf->MultiCell(44,5,"Quantit<EFBFBD> vendue en ".$row[2]." : ",0);
|
||||
$pdf->MultiCell(44,5,"Quantite vendue en ".$row[2]." : ",0);
|
||||
$pdf->SetFont('Arial','B',10);
|
||||
$pdf->SetXY(54,140 + ($i * 8) );
|
||||
$pdf->MultiCell(16,5,$row[1],0,'R');
|
||||
@@ -346,7 +346,7 @@ class pdf_courrier_droit_editeur
|
||||
$i++;
|
||||
$pdf->SetFont('Arial','',10);
|
||||
$pdf->SetXY(10,150 + ($i * 10) );
|
||||
$pdf->MultiCell(80,5,"Reste <EFBFBD> devoir sur les droits pour l'ann<EFBFBD>e ".($year-1)." : ",0);
|
||||
$pdf->MultiCell(80,5,"Reste a devoir sur les droits pour l'annee ".($year-1)." : ",0);
|
||||
$pdf->SetFont('Arial','B',10);
|
||||
$pdf->SetXY(90,140 + ($i * 10) );
|
||||
$pdf->MultiCell(16,5, $pu_ttc,0,'R');
|
||||
@@ -354,7 +354,7 @@ class pdf_courrier_droit_editeur
|
||||
$i++;
|
||||
$pdf->SetFont('Arial','',10);
|
||||
$pdf->SetXY(10,150 + ($i * 10) + 20);
|
||||
$pdf->MultiCell(190,5,"Nous restons <EFBFBD> votre enti<EFBFBD>re disposition pour de plus amples renseignements dont vous pouvez avoir besoin et vous remercions de la confiance que vous nous avez accord<EFBFBD>e.");
|
||||
$pdf->MultiCell(190,5,"Nous restons a votre entiere disposition pour de plus amples renseignements dont vous pouvez avoir besoin et vous remercions de la confiance que vous nous avez accordee.");
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -290,11 +290,11 @@ if ($id > 0 || ! empty($ref))
|
||||
|
||||
if ($_GET['action'] == 'editdelivery_adress')
|
||||
{
|
||||
$html->form_adresse_livraison($_SERVER['PHP_SELF'].'?id='.$commande->id,$commande->adresse_livraison_id,$_GET['socid'],'adresse_livraison_id','commande',$commande->id);
|
||||
$html->form_adresse_livraison($_SERVER['PHP_SELF'].'?id='.$commande->id,$commande->fk_delivery_address,$_GET['socid'],'adresse_livraison_id','commande',$commande->id);
|
||||
}
|
||||
else
|
||||
{
|
||||
$html->form_adresse_livraison($_SERVER['PHP_SELF'].'?id='.$commande->id,$commande->adresse_livraison_id,$_GET['socid'],'none','commande',$commande->id);
|
||||
$html->form_adresse_livraison($_SERVER['PHP_SELF'].'?id='.$commande->id,$commande->fk_delivery_address,$_GET['socid'],'none','commande',$commande->id);
|
||||
}
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ if ( $societe->fetch($socid) )
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
print '<tr><td valign="top">'.$langs->trans("Address").'</td><td colspan="3">'.nl2br($societe->adresse).'</td></tr>';
|
||||
print '<tr><td valign="top">'.$langs->trans("Address").'</td><td colspan="3">'.nl2br($societe->address).'</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("Zip").'</td><td>'.$societe->cp.'</td>';
|
||||
print '<td>'.$langs->trans("Town").'</td><td>'.$societe->ville.'</td></tr>';
|
||||
|
||||
@@ -22,11 +22,11 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
\file htdocs/includes/modules/commande/modules_commande.php
|
||||
\ingroup commande
|
||||
\brief Fichier contenant la classe m<EFBFBD>re de generation des commandes en PDF
|
||||
et la classe m<EFBFBD>re de num<EFBFBD>rotation des commandes
|
||||
\version $Id$
|
||||
* \file htdocs/includes/modules/commande/modules_commande.php
|
||||
* \ingroup commande
|
||||
* \brief Fichier contenant la classe mere de generation des commandes en PDF
|
||||
* et la classe mere de numerotation des commandes
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
require_once(DOL_DOCUMENT_ROOT.'/lib/pdf.lib.php');
|
||||
@@ -36,15 +36,15 @@ require_once(DOL_DOCUMENT_ROOT.'/discount.class.php');
|
||||
|
||||
|
||||
/**
|
||||
\class ModelePDFCommandes
|
||||
\brief Classe m<EFBFBD>re des mod<EFBFBD>les de commandes
|
||||
* \class ModelePDFCommandes
|
||||
* \brief Classe mere des modeles de commandes
|
||||
*/
|
||||
class ModelePDFCommandes extends FPDF
|
||||
{
|
||||
var $error='';
|
||||
|
||||
/**
|
||||
* \brief Renvoi le dernier message d'erreur de cr<EFBFBD>ation de PDF de commande
|
||||
* \brief Renvoi le dernier message d'erreur de creation de PDF de commande
|
||||
*/
|
||||
function pdferror()
|
||||
{
|
||||
@@ -52,7 +52,7 @@ class ModelePDFCommandes extends FPDF
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Renvoi la liste des mod<EFBFBD>les actifs
|
||||
* \brief Renvoi la liste des modeles actifs
|
||||
* \return array Tableau des modeles (cle=id, valeur=libelle)
|
||||
*/
|
||||
function liste_modeles($db)
|
||||
@@ -91,8 +91,8 @@ class ModelePDFCommandes extends FPDF
|
||||
|
||||
|
||||
/**
|
||||
\class ModeleNumRefCommandes
|
||||
\brief Classe m<EFBFBD>re des mod<EFBFBD>les de num<EFBFBD>rotation des r<EFBFBD>f<EFBFBD>rences de commandes
|
||||
* \class ModeleNumRefCommandes
|
||||
* \brief Classe mere des modeles de numerotation des references de commandes
|
||||
*/
|
||||
|
||||
class ModeleNumRefCommandes
|
||||
@@ -107,7 +107,7 @@ class ModeleNumRefCommandes
|
||||
return true;
|
||||
}
|
||||
|
||||
/** \brief Renvoi la description par defaut du modele de num<EFBFBD>rotation
|
||||
/** \brief Renvoi la description par defaut du modele de numerotation
|
||||
* \return string Texte descripif
|
||||
*/
|
||||
function info()
|
||||
@@ -117,7 +117,7 @@ class ModeleNumRefCommandes
|
||||
return $langs->trans("NoDescription");
|
||||
}
|
||||
|
||||
/** \brief Renvoi un exemple de num<EFBFBD>rotation
|
||||
/** \brief Renvoi un exemple de numerotation
|
||||
* \return string Example
|
||||
*/
|
||||
function getExample()
|
||||
@@ -127,8 +127,8 @@ class ModeleNumRefCommandes
|
||||
return $langs->trans("NoExample");
|
||||
}
|
||||
|
||||
/** \brief Test si les num<EFBFBD>ros d<EFBFBD>j<EFBFBD> en vigueur dans la base ne provoquent pas de
|
||||
* de conflits qui empechera cette num<EFBFBD>rotation de fonctionner.
|
||||
/** \brief Test si les numeros deja en vigueur dans la base ne provoquent pas de
|
||||
* de conflits qui empechera cette numerotation de fonctionner.
|
||||
* \return boolean false si conflit, true si ok
|
||||
*/
|
||||
function canBeActivated()
|
||||
@@ -136,7 +136,7 @@ class ModeleNumRefCommandes
|
||||
return true;
|
||||
}
|
||||
|
||||
/** \brief Renvoi prochaine valeur attribu<EFBFBD>e
|
||||
/** \brief Renvoi prochaine valeur attribuee
|
||||
* \return string Valeur
|
||||
*/
|
||||
function getNextValue()
|
||||
@@ -161,12 +161,12 @@ class ModeleNumRefCommandes
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
\brief Cr<EFBFBD>e un bon de commande sur disque en fonction d'un mod<EFBFBD>le
|
||||
\param db objet base de donn<EFBFBD>e
|
||||
\param id id de la propale <EFBFBD> cr<EFBFBD>er
|
||||
\param modele force le modele <EFBFBD> utiliser ('' to not force)
|
||||
\param outputlangs objet lang a utiliser pour traduction
|
||||
/**
|
||||
* \brief Cree un bon de commande sur disque en fonction d'un modele
|
||||
* \param db objet base de donnee
|
||||
* \param id id de la propale a creer
|
||||
* \param modele force le modele a utiliser ('' to not force)
|
||||
* \param outputlangs objet lang a utiliser pour traduction
|
||||
*/
|
||||
function commande_pdf_create($db, $id, $modele, $outputlangs)
|
||||
{
|
||||
@@ -177,7 +177,7 @@ function commande_pdf_create($db, $id, $modele, $outputlangs)
|
||||
$modelisok=0;
|
||||
$liste=array();
|
||||
|
||||
// Positionne modele sur le nom du modele de commande <EFBFBD> utiliser
|
||||
// Positionne modele sur le nom du modele de commande a utiliser
|
||||
$file = "pdf_".$modele.".modules.php";
|
||||
if ($modele && file_exists($dir.$file)) $modelisok=1;
|
||||
|
||||
@@ -194,7 +194,7 @@ function commande_pdf_create($db, $id, $modele, $outputlangs)
|
||||
{
|
||||
$model=new ModelePDFCommandes();
|
||||
$liste=$model->liste_modeles($db);
|
||||
$modele=key($liste); // Renvoie premiere valeur de cl<EFBFBD> trouv<EFBFBD> dans le tableau
|
||||
$modele=key($liste); // Renvoie premiere valeur de cle trouve dans le tableau
|
||||
$file = "pdf_".$modele.".modules.php";
|
||||
if (file_exists($dir.$file)) $modelisok=1;
|
||||
}
|
||||
@@ -240,10 +240,10 @@ function commande_pdf_create($db, $id, $modele, $outputlangs)
|
||||
}
|
||||
|
||||
/**
|
||||
\brief Supprime l'image de pr<EFBFBD>visualitation, pour le cas de r<EFBFBD>g<EFBFBD>n<EFBFBD>ration de commande
|
||||
\param db objet base de donn<EFBFBD>e
|
||||
\param commandeid id de la commande <EFBFBD> effacer
|
||||
\param commanderef r<EFBFBD>f<EFBFBD>rence de la commande si besoin
|
||||
* \brief Supprime l'image de previsualitation, pour le cas de regeneration de commande
|
||||
* \param db objet base de donnee
|
||||
* \param commandeid id de la commande a effacer
|
||||
* \param commanderef reference de la commande si besoin
|
||||
*/
|
||||
function commande_delete_preview($db, $commandeid, $commanderef='')
|
||||
{
|
||||
|
||||
@@ -84,8 +84,8 @@ class pdf_edison extends ModelePDFCommandes
|
||||
}
|
||||
|
||||
|
||||
/** \brief Renvoi derni<EFBFBD>re erreur
|
||||
\return string Derni<EFBFBD>re erreur
|
||||
/** \brief Renvoi derniere erreur
|
||||
\return string Derniere erreur
|
||||
*/
|
||||
function pdferror()
|
||||
{
|
||||
@@ -406,7 +406,7 @@ class pdf_edison extends ModelePDFCommandes
|
||||
|
||||
// Sender properties
|
||||
$carac_emetteur = '';
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->adresse);
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->address);
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->cp).' '.$outputlangs->convToOutputCharset($this->emetteur->ville);
|
||||
$carac_emetteur .= "\n";
|
||||
// Tel
|
||||
@@ -457,7 +457,7 @@ class pdf_edison extends ModelePDFCommandes
|
||||
// Customer name
|
||||
$carac_client_name=$outputlangs->convToOutputCharset($object->client->nom);
|
||||
|
||||
// Nom du contact suivi commande si c'est une soci<EFBFBD>t<EFBFBD>
|
||||
// Nom du contact suivi commande si c'est une societe
|
||||
$arrayidcontact = $object->getIdContact('external','CUSTOMER');
|
||||
if (sizeof($arrayidcontact) > 0)
|
||||
{
|
||||
@@ -470,7 +470,7 @@ class pdf_edison extends ModelePDFCommandes
|
||||
}
|
||||
|
||||
// Caracteristiques client
|
||||
$carac_client.="\n".$outputlangs->convToOutputCharset($object->client->adresse);
|
||||
$carac_client.="\n".$outputlangs->convToOutputCharset($object->client->address);
|
||||
$carac_client.="\n".$outputlangs->convToOutputCharset($object->client->cp) . " " . $outputlangs->convToOutputCharset($object->client->ville)."\n";
|
||||
if ($object->client->pays_code && $object->client->pays_code != $this->emetteur->pays_code) $carac_client.=$outputlangs->convToOutputCharset($outputlangs->transnoentitiesnoconv("Country".$object->client->pays_code))."\n";
|
||||
}
|
||||
|
||||
@@ -800,7 +800,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
|
||||
// Sender properties
|
||||
$carac_emetteur = '';
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->adresse);
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->address);
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->cp).' '.$outputlangs->convToOutputCharset($this->emetteur->ville);
|
||||
$carac_emetteur .= "\n";
|
||||
// Tel
|
||||
@@ -870,7 +870,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
}
|
||||
|
||||
// Caracteristiques client
|
||||
$carac_client.="\n".$outputlangs->convToOutputCharset($object->client->adresse);
|
||||
$carac_client.="\n".$outputlangs->convToOutputCharset($object->client->address);
|
||||
$carac_client.="\n".$outputlangs->convToOutputCharset($object->client->cp) . " " . $outputlangs->convToOutputCharset($object->client->ville)."\n";
|
||||
if ($object->client->pays_code && $object->client->pays_code != $this->emetteur->pays_code) $carac_client.=$outputlangs->convToOutputCharset($outputlangs->transnoentitiesnoconv("Country".$object->client->pays_code))."\n";
|
||||
}
|
||||
|
||||
@@ -133,7 +133,7 @@ class html_cerfafr extends ModeleDon
|
||||
$html = str_replace('__CURRENCY__',$outputlangs->transnoentitiesnoconv("Currency".$conf->monnaie),$html);
|
||||
$html = str_replace('__CURRENCYCODE__',$conf->monnaie,$html);
|
||||
$html = str_replace('__MAIN_INFO_SOCIETE_NOM__',$mysoc->nom,$html);
|
||||
$html = str_replace('__MAIN_INFO_SOCIETE_ADRESSE__',$mysoc->adresse,$html);
|
||||
$html = str_replace('__MAIN_INFO_SOCIETE_ADRESSE__',$mysoc->address,$html);
|
||||
$html = str_replace('__MAIN_INFO_SOCIETE_CP__',$mysoc->cp,$html);
|
||||
$html = str_replace('__MAIN_INFO_SOCIETE_VILLE__',$mysoc->ville,$html);
|
||||
$html = str_replace('__DONATOR_NAME__',$don->nom,$html);
|
||||
|
||||
@@ -432,7 +432,7 @@ Class pdf_expedition_merou extends ModelePdfExpedition
|
||||
|
||||
// Sender properties
|
||||
$carac_emetteur = '';
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->adresse);
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->address);
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->cp).' '.$outputlangs->convToOutputCharset($this->emetteur->ville);
|
||||
$carac_emetteur .= "\n";
|
||||
// Tel
|
||||
@@ -483,7 +483,7 @@ Class pdf_expedition_merou extends ModelePdfExpedition
|
||||
$blSocY+=3;
|
||||
//Adresse Client
|
||||
//Gestion des Retours chariots
|
||||
$Out=explode("\n",$outputlangs->convToOutputCharset($this->expediteur->adresse));
|
||||
$Out=explode("\n",$outputlangs->convToOutputCharset($this->expediteur->address));
|
||||
for ($i=0;$i<count($Out);$i++) {
|
||||
$pdf->SetXY($blExpX,$Yoff+$blSocY);
|
||||
$pdf->MultiCell($blW,5,$Out[$i], 0, 'L');
|
||||
@@ -555,7 +555,7 @@ Class pdf_expedition_merou extends ModelePdfExpedition
|
||||
}
|
||||
|
||||
// Caracteristiques client
|
||||
$carac_client.="\n".$outputlangs->convToOutputCharset($object->client->adresse);
|
||||
$carac_client.="\n".$outputlangs->convToOutputCharset($object->client->address);
|
||||
$carac_client.="\n".$outputlangs->convToOutputCharset($object->client->cp) . " " . $outputlangs->convToOutputCharset($object->client->ville)."\n";
|
||||
if ($object->client->pays_code && $object->client->pays_code != $this->emetteur->pays_code) $carac_client.=$outputlangs->convToOutputCharset($outputlangs->transnoentitiesnoconv("Country".$object->client->pays_code))."\n";
|
||||
}
|
||||
|
||||
@@ -258,7 +258,7 @@ function facture_meta_create($db, $facid, $message="")
|
||||
if (is_dir($dir))
|
||||
{
|
||||
$nblignes = sizeof($fac->lignes);
|
||||
$client = $fac->client->nom . " " . $fac->client->adresse . " " . $fac->client->cp . " " . $fac->client->ville;
|
||||
$client = $fac->client->nom . " " . $fac->client->address . " " . $fac->client->cp . " " . $fac->client->ville;
|
||||
$meta = "REFERENCE=\"" . $fac->ref . "\"
|
||||
DATE=\"" . dol_print_date($fac->date,'') . "\"
|
||||
NB_ITEMS=\"" . $nblignes . "\"
|
||||
|
||||
@@ -1055,7 +1055,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
{
|
||||
// Sender properties
|
||||
$carac_emetteur = '';
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->adresse);
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->address);
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->cp).' '.$outputlangs->convToOutputCharset($this->emetteur->ville);
|
||||
$carac_emetteur .= "\n";
|
||||
// Tel
|
||||
@@ -1137,7 +1137,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
}
|
||||
|
||||
// Recipient
|
||||
$carac_client.="\n".$outputlangs->convToOutputCharset($object->client->adresse);
|
||||
$carac_client.="\n".$outputlangs->convToOutputCharset($object->client->address);
|
||||
$carac_client.="\n".$outputlangs->convToOutputCharset($object->client->cp) . " " . $outputlangs->convToOutputCharset($object->client->ville)."\n";
|
||||
if ($object->client->pays_code && $object->client->pays_code != $this->emetteur->pays_code) $carac_client.=$outputlangs->convToOutputCharset($outputlangs->transnoentitiesnoconv("Country".$object->client->pays_code))."\n";
|
||||
}
|
||||
|
||||
@@ -858,7 +858,7 @@ class pdf_oursin extends ModelePDFFactures
|
||||
|
||||
// Sender properties
|
||||
$carac_emetteur = '';
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->adresse);
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->address);
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->cp).' '.$outputlangs->convToOutputCharset($this->emetteur->ville);
|
||||
$carac_emetteur .= "\n";
|
||||
// Tel
|
||||
@@ -924,7 +924,7 @@ class pdf_oursin extends ModelePDFFactures
|
||||
}
|
||||
|
||||
// Caracteristiques client
|
||||
$carac_client.="\n".$outputlangs->convToOutputCharset($object->client->adresse);
|
||||
$carac_client.="\n".$outputlangs->convToOutputCharset($object->client->address);
|
||||
$carac_client.="\n".$outputlangs->convToOutputCharset($object->client->cp) . " " . $outputlangs->convToOutputCharset($object->client->ville)."\n";
|
||||
if ($object->client->pays_code && $object->client->pays_code != $this->emetteur->pays_code) $carac_client.=$outputlangs->trans("Country".$object->client->pays_code)."\n";
|
||||
}
|
||||
|
||||
@@ -215,7 +215,7 @@ class pdf_soleil extends ModelePDFFicheinter
|
||||
|
||||
// Sender properties
|
||||
$carac_emetteur = '';
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->adresse);
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->address);
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->cp).' '.$outputlangs->convToOutputCharset($this->emetteur->ville);
|
||||
$carac_emetteur .= "\n";
|
||||
// Tel
|
||||
@@ -240,7 +240,7 @@ class pdf_soleil extends ModelePDFFicheinter
|
||||
$pdf->MultiCell(86,5, $outputlangs->convToOutputCharset($fichinter->client->nom));
|
||||
$pdf->SetFont('Arial','B',11);
|
||||
$pdf->SetXY(102,$pdf->GetY());
|
||||
$pdf->MultiCell(66,5, $outputlangs->convToOutputCharset($fichinter->client->adresse) . "\n" . $outputlangs->convToOutputCharset($fichinter->client->cp) . " " . $outputlangs->convToOutputCharset($fichinter->client->ville));
|
||||
$pdf->MultiCell(66,5, $outputlangs->convToOutputCharset($fichinter->client->address) . "\n" . $outputlangs->convToOutputCharset($fichinter->client->cp) . " " . $outputlangs->convToOutputCharset($fichinter->client->ville));
|
||||
$pdf->rect(100, 40, 100, 40);
|
||||
|
||||
|
||||
|
||||
@@ -379,7 +379,7 @@ class pdf_sirocco extends ModelePDFDeliveryOrder
|
||||
|
||||
// Sender properties
|
||||
$carac_emetteur = '';
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->adresse);
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->address);
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->cp).' '.$outputlangs->convToOutputCharset($this->emetteur->ville);
|
||||
$carac_emetteur .= "\n";
|
||||
// Tel
|
||||
@@ -442,7 +442,7 @@ class pdf_sirocco extends ModelePDFDeliveryOrder
|
||||
}
|
||||
|
||||
// Caracteristiques client
|
||||
$carac_client.="\n".$outputlangs->convToOutputCharset($object->client->adresse);
|
||||
$carac_client.="\n".$outputlangs->convToOutputCharset($object->client->address);
|
||||
$carac_client.="\n".$outputlangs->convToOutputCharset($object->client->cp) . " " . $outputlangs->convToOutputCharset($object->client->ville)."\n";
|
||||
if ($object->client->pays_code && $object->client->pays_code != $this->emetteur->pays_code) $carac_client.=$outputlangs->convToOutputCharset($outputlangs->transnoentitiesnoconv("Country".$object->client->pays_code))."\n";
|
||||
}
|
||||
|
||||
@@ -544,7 +544,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
||||
|
||||
// Sender properties
|
||||
$carac_emetteur = '';
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->adresse);
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->address);
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->cp).' '.$outputlangs->convToOutputCharset($this->emetteur->ville);
|
||||
$carac_emetteur .= "\n";
|
||||
// Tel
|
||||
@@ -612,7 +612,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
||||
}
|
||||
|
||||
// Caracteristiques client
|
||||
$carac_client.="\n".$outputlangs->convToOutputCharset($object->client->adresse);
|
||||
$carac_client.="\n".$outputlangs->convToOutputCharset($object->client->address);
|
||||
$carac_client.="\n".$outputlangs->convToOutputCharset($object->client->cp) . " " . $outputlangs->convToOutputCharset($object->client->ville)."\n";
|
||||
if ($object->client->pays_code && $object->client->pays_code != $this->emetteur->pays_code) $carac_client.=$outputlangs->convToOutputCharset($outputlangs->transnoentitiesnoconv("Country".$object->client->pays_code))."\n";
|
||||
}
|
||||
|
||||
@@ -850,7 +850,7 @@ class pdf_propale_azur extends ModelePDFPropales
|
||||
{
|
||||
// Sender properties
|
||||
$carac_emetteur = '';
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->adresse);
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->address);
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->cp).' '.$outputlangs->convToOutputCharset($this->emetteur->ville);
|
||||
$carac_emetteur .= "\n";
|
||||
// Add internal contact of proposal if defined
|
||||
@@ -940,7 +940,7 @@ class pdf_propale_azur extends ModelePDFPropales
|
||||
}
|
||||
|
||||
// Caracteristiques client
|
||||
$carac_client.="\n".$outputlangs->convToOutputCharset($object->client->adresse);
|
||||
$carac_client.="\n".$outputlangs->convToOutputCharset($object->client->address);
|
||||
$carac_client.="\n".$outputlangs->convToOutputCharset($object->client->cp) . " " . $outputlangs->convToOutputCharset($object->client->ville)."\n";
|
||||
if ($object->client->pays_code && $object->client->pays_code != $this->emetteur->pays_code) $carac_client.=$outputlangs->convToOutputCharset($outputlangs->transnoentitiesnoconv("Country".$object->client->pays_code))."\n";
|
||||
}
|
||||
|
||||
@@ -377,7 +377,7 @@ class pdf_propale_jaune extends ModelePDFPropales
|
||||
|
||||
// Sender properties
|
||||
$carac_emetteur = '';
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->adresse);
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->address);
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->cp).' '.$outputlangs->convToOutputCharset($this->emetteur->ville);
|
||||
$carac_emetteur .= "\n";
|
||||
// Add internal contact of proposal if defined
|
||||
@@ -501,7 +501,7 @@ class pdf_propale_jaune extends ModelePDFPropales
|
||||
}
|
||||
|
||||
// Caracteristiques client
|
||||
$carac_client.="\n".$outputlangs->convToOutputCharset($object->client->adresse);
|
||||
$carac_client.="\n".$outputlangs->convToOutputCharset($object->client->address);
|
||||
$carac_client.="\n".$outputlangs->convToOutputCharset($object->client->cp) . " " . $outputlangs->convToOutputCharset($object->client->ville)."\n";
|
||||
if ($object->client->pays_code && $object->client->pays_code != $this->emetteur->pays_code) $carac_client.=$outputlangs->convToOutputCharset($outputlangs->transnoentitiesnoconv("Country".$object->client->pays_code))."\n";
|
||||
}
|
||||
|
||||
@@ -660,7 +660,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
|
||||
// Sender properties
|
||||
$carac_emetteur = '';
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($mysoc->adresse);
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($mysoc->address);
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($mysoc->cp).' '.$outputlangs->convToOutputCharset($mysoc->ville);
|
||||
$carac_emetteur .= "\n";
|
||||
// Tel
|
||||
@@ -693,7 +693,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
|
||||
$carac_client_name = $outputlangs->convToOutputCharset($object->client->nom);
|
||||
|
||||
$carac_client=$outputlangs->convToOutputCharset($object->client->adresse);
|
||||
$carac_client=$outputlangs->convToOutputCharset($object->client->address);
|
||||
$carac_client.="\n".$outputlangs->convToOutputCharset($object->client->cp) . " " . $outputlangs->convToOutputCharset($object->client->ville)."\n";
|
||||
if ($object->client->pays_code && $object->client->pays_code != $this->emetteur->pays_code) $carac_client.=$outputlangs->convToOutputCharset($outputlangs->transnoentitiesnoconv("Country".$object->client->pays_code))."\n";
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ class Livraison extends CommonObject
|
||||
$sql.= ", '".$this->ref_client."'";
|
||||
$sql.= ", ".$this->db->idate(mktime());
|
||||
$sql.= ", ".$user->id;
|
||||
$sql.= ", ".($this->adresse_livraison_id > 0 ? $this->adresse_livraison_id : "null");
|
||||
$sql.= ", ".($this->fk_delivery_address > 0 ? $this->fk_delivery_address : "null");
|
||||
$sql.= ", ".($this->expedition_id ? $this->expedition_id : "null");
|
||||
$sql.= ")";
|
||||
|
||||
@@ -276,7 +276,8 @@ class Livraison extends CommonObject
|
||||
$this->expedition_id = $obj->fk_expedition;
|
||||
$this->user_author_id = $obj->fk_user_author;
|
||||
$this->user_valid_id = $obj->fk_user_valid;
|
||||
$this->adresse_livraison_id = $obj->fk_adresse_livraison;
|
||||
$this->adresse_livraison_id = $obj->fk_adresse_livraison; // TODO obsolete
|
||||
$this->fk_delivery_address = $obj->fk_adresse_livraison;
|
||||
$this->note = $obj->note;
|
||||
$this->note_public = $obj->note_public;
|
||||
$this->modelpdf = $obj->model_pdf;
|
||||
@@ -510,7 +511,8 @@ class Livraison extends CommonObject
|
||||
$this->note = $expedition->note;
|
||||
$this->projetid = $expedition->projetidp;
|
||||
$this->date_livraison = $expedition->date_livraison;
|
||||
$this->adresse_livraison_id = $expedition->adresse_livraison_id;
|
||||
$this->adresse_livraison_id = $expedition->adresse_livraison_id; // TODO obsolete
|
||||
$this->fk_delivery_address = $expedition->adresse_livraison_id;
|
||||
$this->socid = $expedition->socid;
|
||||
$this->ref_client = $expedition->ref_client;
|
||||
|
||||
|
||||
@@ -329,7 +329,8 @@ if (! defined('NOREQUIREDB') && ! defined('NOREQUIRESOC'))
|
||||
|
||||
$mysoc->id=0;
|
||||
$mysoc->nom=$conf->global->MAIN_INFO_SOCIETE_NOM;
|
||||
$mysoc->adresse=$conf->global->MAIN_INFO_SOCIETE_ADRESSE;
|
||||
$mysoc->adresse=$conf->global->MAIN_INFO_SOCIETE_ADRESSE; // TODO obsolete
|
||||
$mysoc->address=$conf->global->MAIN_INFO_SOCIETE_ADRESSE;
|
||||
$mysoc->cp=$conf->global->MAIN_INFO_SOCIETE_CP;
|
||||
$mysoc->ville=$conf->global->MAIN_INFO_SOCIETE_VILLE;
|
||||
// Si dans MAIN_INFO_SOCIETE_PAYS on a un id de pays, on recupere code
|
||||
@@ -370,7 +371,8 @@ if (! defined('NOREQUIREDB') && ! defined('NOREQUIRESOC'))
|
||||
$mysoc->capital=$conf->global->MAIN_INFO_CAPITAL;
|
||||
$mysoc->forme_juridique_code=$conf->global->MAIN_INFO_SOCIETE_FORME_JURIDIQUE;
|
||||
$mysoc->email=$conf->global->MAIN_INFO_SOCIETE_MAIL;
|
||||
$mysoc->adresse_full=$mysoc->adresse."\n".$mysoc->cp." ".$mysoc->ville;
|
||||
$mysoc->adresse_full=$mysoc->adresse."\n".$mysoc->cp." ".$mysoc->ville; // TODO obsolete
|
||||
$mysoc->full_address=$mysoc->adresse."\n".$mysoc->cp." ".$mysoc->ville;
|
||||
$mysoc->logo=$conf->global->MAIN_INFO_SOCIETE_LOGO;
|
||||
$mysoc->logo_small=$conf->global->MAIN_INFO_SOCIETE_LOGO_SMALL;
|
||||
$mysoc->logo_mini=$conf->global->MAIN_INFO_SOCIETE_LOGO_MINI;
|
||||
@@ -415,18 +417,4 @@ if (! defined('MAGPIE_CACHE_DIR')) { define('MAGPIE_CACHE_DIR', $conf->exte
|
||||
|
||||
if (! defined('MAIN_LABEL_MENTION_NPR') ) define('MAIN_LABEL_MENTION_NPR','NPR');
|
||||
|
||||
|
||||
/**
|
||||
* Convert a string into a regex
|
||||
*
|
||||
* @param unknown_type $s string to convert
|
||||
*/
|
||||
function dol_regify($s)
|
||||
{
|
||||
$news=str_replace('/','\/',$s);
|
||||
$news=str_replace('.','\.',$news);
|
||||
$news=str_replace('*','\*',$news);
|
||||
return $news;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -100,7 +100,7 @@ if (($_GET["action"] == 'import' ) && ( $_GET["custid"] != '' ) && ($user->right
|
||||
|
||||
/* initialisation */
|
||||
$societe->nom = $osc_cust->osc_custsoc.' '.$osc_cust->osc_custlastname;
|
||||
$societe->adresse = $osc_cust->osc_cutstreet;
|
||||
$societe->address = $osc_cust->osc_cutstreet;
|
||||
$societe->cp = $osc_cust->osc_custpostcode;
|
||||
$societe->ville = $osc_cust->osc_custcity;
|
||||
$societe->departement_id = 0;
|
||||
|
||||
@@ -45,7 +45,7 @@ if ($action == '' && !$cancel) {
|
||||
print '<tr></tr><td width="20%">Nom client</td><td width="80%">'.$osc_order->osc_custname.'</td></tr>';
|
||||
print '<tr></tr><td width="20%">Montant</td><td width="80%">'.convert_price($osc_order->osc_ordertotal).'</td></tr>';
|
||||
print '<tr></tr><td width="20%">Date commande</td><td width="80%">'.$osc_order->osc_orderdate.'</td></tr>';
|
||||
print '<tr></tr><td width="20%">M<>thode de paiement</td><td width="80%">'.$osc_order->osc_orderpaymet.'</td></tr>';
|
||||
print '<tr></tr><td width="20%">M<>thode de paiement</td><td width="80%">'.$osc_order->osc_orderpaymet.'</td></tr>';
|
||||
print "</table>";
|
||||
print '<table border="1" width="100%" cellspacing="0" cellpadding="4">';
|
||||
// les articles
|
||||
@@ -87,7 +87,7 @@ if ($action == '' && !$cancel) {
|
||||
print "\n</div><br>\n";
|
||||
}
|
||||
}
|
||||
/* action Import cr<63>ation de l'objet commande de dolibarr
|
||||
/* action Import cr<63>ation de l'objet commande de dolibarr
|
||||
*
|
||||
*/
|
||||
if (($_GET["action"] == 'import' ) && ( $_GET["orderid"] != '' ) && $user->rights->commande->creer)
|
||||
@@ -102,10 +102,10 @@ if ($action == '' && !$cancel) {
|
||||
/* utilisation de la table de transco*/
|
||||
if ($osc_order->get_orderid($osc_order->osc_orderid)>0)
|
||||
{
|
||||
print '<p>Cette commande existe d<>j<EFBFBD></p>';
|
||||
print '<p>Cette commande existe d<>j<EFBFBD></p>';
|
||||
}
|
||||
else {
|
||||
// v<>rifier que la soci<63>t<EFBFBD> est renseign<67>e, sinon importer le client d'abord
|
||||
// v<>rifier que la soci<63>t<EFBFBD> est renseign<67>e, sinon importer le client d'abord
|
||||
if ( ! $commande->socid)
|
||||
{
|
||||
$osc_cust = new Osc_customer($db, $osc_order->osc_custid);
|
||||
@@ -122,7 +122,7 @@ if ($action == '' && !$cancel) {
|
||||
}
|
||||
/* initialisation */
|
||||
$societe->nom = $osc_cust->osc_custsoc.' '.$osc_cust->osc_custlastname;
|
||||
$societe->adresse = $osc_cust->osc_cutstreet;
|
||||
$societe->address = $osc_cust->osc_cutstreet;
|
||||
$societe->cp = $osc_cust->osc_custpostcode;
|
||||
$societe->ville = $osc_cust->osc_custcity;
|
||||
$societe->departement_id = 0;
|
||||
@@ -141,18 +141,18 @@ if ($action == '' && !$cancel) {
|
||||
if ($cl == 0)
|
||||
{
|
||||
$commande->socid = $societe->id;
|
||||
print '<p>cr<63>ation r<>ussie nouveau client/prospect : '.$societe->nom;
|
||||
print '<p>cr<63>ation r<>ussie nouveau client/prospect : '.$societe->nom;
|
||||
$res = $osc_cust->transcode($osc_cust->osc_custid,$societe->id);
|
||||
print ' : Id Dolibarr '.$societe->id.' , Id osc : '.$osc_cust->osc_custid.'</p>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<p>cr<63>ation impossible client : '. $osc_cust->osc_custid .'</p>';
|
||||
print '<p>cr<63>ation impossible client : '. $osc_cust->osc_custid .'</p>';
|
||||
exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
// v<>rifier l'existence des produits command<6E>s
|
||||
// v<>rifier l'existence des produits command<6E>s
|
||||
$osc_product = new Osc_Product($db);
|
||||
$err = 0;
|
||||
|
||||
@@ -161,7 +161,7 @@ if ($action == '' && !$cancel) {
|
||||
// print "<p>traitement de ".$commande->lines[$lig]->fk_product."</p>";
|
||||
if (! $commande->lines[$lig]->fk_product)
|
||||
{
|
||||
print "<p>Article non trouv<75> ".$commande->lines[$lig]->libelle." : ".$commande->lines[$lig]->desc."</p>";
|
||||
print "<p>Article non trouv<75> ".$commande->lines[$lig]->libelle." : ".$commande->lines[$lig]->desc."</p>";
|
||||
$err ++;
|
||||
}
|
||||
}
|
||||
@@ -174,7 +174,7 @@ if ($action == '' && !$cancel) {
|
||||
if ($id > 0)
|
||||
{
|
||||
print "\n<div class=\"tabsAction\">\n";
|
||||
print '<br>cr<63>ation r<>ussie nouvelle commande '.$id;
|
||||
print '<br>cr<63>ation r<>ussie nouvelle commande '.$id;
|
||||
$res = $osc_order->transcode($osc_order->osc_orderid,$id);
|
||||
print 'pour la commande osc : '.$osc_order->osc_orderid.'</p>';
|
||||
print '<p><a class="butAction" href="index.php">'.$langs->trans("Retour").'</a></p>';
|
||||
@@ -193,7 +193,7 @@ if ($action == '' && !$cancel) {
|
||||
}
|
||||
if ($id == -2)
|
||||
{
|
||||
/* la r<>f<EFBFBD>rence existe on fait un update */
|
||||
/* la r<>f<EFBFBD>rence existe on fait un update */
|
||||
$societe_control = new Societe($db);
|
||||
if ($_error == 1)
|
||||
{
|
||||
|
||||
@@ -85,6 +85,7 @@ class Propal extends CommonObject
|
||||
var $note;
|
||||
var $note_public;
|
||||
var $adresse_livraison_id;
|
||||
var $fk_delivery_address;
|
||||
var $adresse;
|
||||
|
||||
var $products=array();
|
||||
@@ -642,10 +643,10 @@ class Propal extends CommonObject
|
||||
}
|
||||
|
||||
// Affectation de l'adresse de livraison
|
||||
if ($resql && $this->adresse_livraison_id)
|
||||
if ($resql && $this->fk_delivery_address)
|
||||
{
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."propal";
|
||||
$sql.= " SET fk_adresse_livraison = ".$this->adresse_livraison_id;
|
||||
$sql.= " SET fk_adresse_livraison = ".$this->fk_delivery_address;
|
||||
$sql.= " WHERE ref = '".$this->ref."'";
|
||||
$sql.= " AND entity = ".$conf->entity;
|
||||
|
||||
@@ -844,7 +845,8 @@ class Propal extends CommonObject
|
||||
$this->datep = $this->db->jdate($obj->dp);
|
||||
$this->fin_validite = $this->db->jdate($obj->dfv);
|
||||
$this->date_livraison = $this->db->jdate($obj->date_livraison);
|
||||
$this->adresse_livraison_id = $obj->fk_adresse_livraison;
|
||||
$this->fk_delivery_address = $obj->fk_adresse_livraison;
|
||||
$this->adresse_livraison_id = $obj->fk_adresse_livraison; // TODO obsolete
|
||||
|
||||
$this->mode_reglement_id = $obj->fk_mode_reglement;
|
||||
$this->mode_reglement_code = $obj->mode_reglement_code;
|
||||
@@ -1074,7 +1076,7 @@ class Propal extends CommonObject
|
||||
|
||||
if ($this->db->query($sql) )
|
||||
{
|
||||
$this->adresse_livraison_id = $adresse_livraison;
|
||||
$this->fk_delivery_address = $adresse_livraison;
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -84,7 +84,8 @@ if ((! $_POST["getcustomercode"] && ! $_POST["getsuppliercode"])
|
||||
{
|
||||
$soc->nom = $_POST["nom"];
|
||||
}
|
||||
$soc->adresse = $_POST["adresse"];
|
||||
$soc->address = $_POST["adresse"];
|
||||
$soc->adresse = $_POST["adresse"]; // TODO obsolete
|
||||
$soc->cp = $_POST["cp"];
|
||||
$soc->ville = $_POST["ville"];
|
||||
$soc->pays_id = $_POST["pays_id"];
|
||||
@@ -165,7 +166,7 @@ if ((! $_POST["getcustomercode"] && ! $_POST["getsuppliercode"])
|
||||
$contact->civilite_id = $soc->civilite_id;
|
||||
$contact->name=$soc->nom_particulier;
|
||||
$contact->firstname=$soc->prenom;
|
||||
$contact->address=$soc->adresse;
|
||||
$contact->address=$soc->address;
|
||||
$contact->cp=$soc->cp;
|
||||
$contact->ville=$soc->ville;
|
||||
$contact->fk_pays=$soc->fk_pays;
|
||||
@@ -323,6 +324,7 @@ $_GET["action"] == 'create' || $_POST["action"] == 'create')
|
||||
$soc->fournisseur=$_POST["fournisseur"]?$_POST["fournisseur"]:$soc->fournisseur;
|
||||
$soc->code_fournisseur=$_POST["code_fournisseur"];
|
||||
$soc->adresse=$_POST["adresse"];
|
||||
$soc->address=$_POST["adresse"]; // TODO obsolete
|
||||
$soc->cp=$_POST["cp"];
|
||||
$soc->ville=$_POST["ville"];
|
||||
$soc->departement_id=$_POST["departement_id"];
|
||||
@@ -468,7 +470,7 @@ $_GET["action"] == 'create' || $_POST["action"] == 'create')
|
||||
}
|
||||
|
||||
print '<tr><td valign="top">'.$langs->trans('Address').'</td><td colspan="3"><textarea name="adresse" cols="40" rows="3" wrap="soft">';
|
||||
print $soc->adresse;
|
||||
print $soc->address;
|
||||
print '</textarea></td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans('Zip').'</td><td><input size="6" type="text" name="cp" value="'.$soc->cp.'">';
|
||||
@@ -671,7 +673,8 @@ elseif ($_GET["action"] == 'edit' || $_POST["action"] == 'edit')
|
||||
$soc->code_client=$_POST["code_client"];
|
||||
$soc->fournisseur=$_POST["fournisseur"];
|
||||
$soc->code_fournisseur=$_POST["code_fournisseur"];
|
||||
$soc->adresse=$_POST["adresse"];
|
||||
$soc->adresse=$_POST["adresse"]; // TODO obsolete
|
||||
$soc->address=$_POST["adresse"];
|
||||
$soc->cp=$_POST["cp"];
|
||||
$soc->ville=$_POST["ville"];
|
||||
$soc->pays_id=$_POST["pays_id"]?$_POST["pays_id"]:$conf->global->MAIN_INFO_SOCIETE_PAYS;
|
||||
@@ -822,7 +825,7 @@ elseif ($_GET["action"] == 'edit' || $_POST["action"] == 'edit')
|
||||
}
|
||||
|
||||
print '<tr><td valign="top">'.$langs->trans('Address').'</td><td colspan="3"><textarea name="adresse" cols="40" rows="3" wrap="soft">';
|
||||
print $soc->adresse;
|
||||
print $soc->address;
|
||||
print '</textarea></td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans('Zip').'</td><td><input size="6" type="text" name="cp" value="'.$soc->cp.'">';
|
||||
@@ -1012,7 +1015,7 @@ else
|
||||
print '<tr><td>'.$langs->trans('Gencod').'</td><td colspan="3">'.$soc->gencod.'</td></tr>';
|
||||
}
|
||||
|
||||
print "<tr><td valign=\"top\">".$langs->trans('Address')."</td><td colspan=\"3\">".nl2br($soc->adresse)."</td></tr>";
|
||||
print "<tr><td valign=\"top\">".$langs->trans('Address')."</td><td colspan=\"3\">".nl2br($soc->address)."</td></tr>";
|
||||
|
||||
print '<tr><td width="25%">'.$langs->trans('Zip').'</td><td width="25%">'.$soc->cp."</td>";
|
||||
print '<td width="25%">'.$langs->trans('Town').'</td><td width="25%">'.$soc->ville."</td></tr>";
|
||||
|
||||
@@ -49,7 +49,8 @@ class Societe extends CommonObject
|
||||
var $nom_particulier;
|
||||
var $prenom;
|
||||
var $particulier;
|
||||
var $adresse;
|
||||
var $address;
|
||||
var $adresse; // TODO obsolete
|
||||
var $cp;
|
||||
var $ville;
|
||||
var $departement_id;
|
||||
@@ -328,7 +329,8 @@ class Societe extends CommonObject
|
||||
$this->id=$id;
|
||||
$this->capital=trim($this->capital);
|
||||
$this->nom=trim($this->nom);
|
||||
$this->adresse=trim($this->adresse);
|
||||
$this->adresse=trim($this->adresse); // TODO obsolete
|
||||
$this->address=trim($this->address);
|
||||
$this->cp=trim($this->cp);
|
||||
$this->ville=trim($this->ville);
|
||||
$this->departement_id=trim($this->departement_id);
|
||||
@@ -374,7 +376,7 @@ class Societe extends CommonObject
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."societe";
|
||||
$sql.= " SET nom = '" . addslashes($this->nom) ."'"; // Champ obligatoire
|
||||
$sql.= ",datea = ".$this->db->idate(mktime());
|
||||
$sql.= ",address = '" . addslashes($this->adresse) ."'";
|
||||
$sql.= ",address = '" . addslashes($this->address) ."'";
|
||||
|
||||
$sql.= ",cp = ".($this->cp?"'".$this->cp."'":"null");
|
||||
$sql.= ",ville = ".($this->ville?"'".addslashes($this->ville)."'":"null");
|
||||
@@ -560,10 +562,12 @@ class Societe extends CommonObject
|
||||
$this->date_update = $obj->date_update;
|
||||
|
||||
$this->nom = $obj->nom;
|
||||
$this->adresse = $obj->address;
|
||||
$this->address = $obj->address;
|
||||
$this->adresse = $obj->address; // TODO obsolete
|
||||
$this->cp = $obj->cp;
|
||||
$this->ville = $obj->ville;
|
||||
$this->adresse_full = $obj->address . "\n". $obj->cp . ' '. $obj->ville;
|
||||
$this->adresse_full = $obj->address . "\n". $obj->cp . ' '. $obj->ville; // TODO obsolete
|
||||
$this->full_address = $obj->address . "\n". $obj->cp . ' '. $obj->ville;
|
||||
|
||||
$this->pays_id = $obj->fk_pays;
|
||||
$this->pays_code = $obj->fk_pays?$obj->pays_code:'';
|
||||
@@ -683,7 +687,7 @@ class Societe extends CommonObject
|
||||
$this->societe = $obj->socname;
|
||||
$this->nom = $obj->nom;
|
||||
$this->address = $obj->address;
|
||||
$this->adresse = $obj->address; //Todo: uniformiser le nom des champs
|
||||
$this->adresse = $obj->address; // TODO obsolete
|
||||
$this->cp = $obj->cp;
|
||||
$this->ville = $obj->ville;
|
||||
$this->pays_id = $obj->fk_pays;
|
||||
@@ -2001,7 +2005,8 @@ class Societe extends CommonObject
|
||||
$this->client = 1; // A member is a customer by default
|
||||
$this->code_client = -1;
|
||||
$this->code_fournisseur = -1;
|
||||
$this->adresse=$member->adresse;
|
||||
$this->adresse=$member->adresse; // TODO obsolete
|
||||
$this->address=$member->adresse;
|
||||
$this->cp=$member->cp;
|
||||
$this->ville=$member->ville;
|
||||
$this->pays_code=$member->pays_code;
|
||||
|
||||
@@ -109,7 +109,7 @@ if ($_GET["socid"])
|
||||
if ($soc->check_codeclient() <> 0) print ' '.$langs->trans("WrongCustomerCode");
|
||||
print '</td><td>'.$langs->trans('Prefix').'</td><td>'.$soc->prefix_comm.'</td></tr>';
|
||||
|
||||
print "<tr><td valign=\"top\">".$langs->trans('Address')."</td><td colspan=\"3\">".nl2br($soc->adresse)."</td></tr>";
|
||||
print "<tr><td valign=\"top\">".$langs->trans('Address')."</td><td colspan=\"3\">".nl2br($soc->address)."</td></tr>";
|
||||
|
||||
print '<tr><td>'.$langs->trans('Zip').'</td><td>'.$soc->cp."</td>";
|
||||
print '<td>'.$langs->trans('Town').'</td><td>'.$soc->ville."</td></tr>";
|
||||
|
||||
@@ -111,7 +111,7 @@ if($_GET["socid"])
|
||||
if ($soc->check_codeclient() <> 0) print ' '.$langs->trans("WrongCustomerCode");
|
||||
print '</td><td>'.$langs->trans('Prefix').'</td><td>'.$soc->prefix_comm.'</td></tr>';
|
||||
|
||||
print "<tr><td valign=\"top\">".$langs->trans('Address')."</td><td colspan=\"3\">".nl2br($soc->adresse)."</td></tr>";
|
||||
print "<tr><td valign=\"top\">".$langs->trans('Address')."</td><td colspan=\"3\">".nl2br($soc->address)."</td></tr>";
|
||||
|
||||
print "<tr><td>".$langs->trans('Zip')."</td><td>".$soc->cp."</td>";
|
||||
print "<td>".$langs->trans('Town')."</td><td>".$soc->ville."</td></tr>";
|
||||
|
||||
@@ -180,7 +180,7 @@ class pdf_courrier_editeur
|
||||
$pdf->MultiCell(106,4, $soc->nom, 0, 'L');
|
||||
|
||||
// Caracteristiques client
|
||||
$carac_client=$soc->adresse;
|
||||
$carac_client=$soc->address;
|
||||
$carac_client.="\n".$soc->cp . " " . $soc->ville."\n";
|
||||
$carac_client.=$soc->pays."\n";
|
||||
|
||||
|
||||
@@ -188,7 +188,8 @@ if ($result >= 0)
|
||||
$member->pass=$ldapuser[$conf->global->LDAP_FIELD_PASSWORD];
|
||||
|
||||
//$member->societe;
|
||||
$member->adresse=$ldapuser[$conf->global->LDAP_FIELD_ADDRESS];
|
||||
$member->address=$ldapuser[$conf->global->LDAP_FIELD_ADDRESS];
|
||||
$member->adresse=$ldapuser[$conf->global->LDAP_FIELD_ADDRESS]; // TODO obsolete
|
||||
$member->cp=$ldapuser[$conf->global->LDAP_FIELD_ZIP];
|
||||
$member->ville=$ldapuser[$conf->global->LDAP_FIELD_TOWN];
|
||||
$member->pays=$ldapuser[$conf->global->LDAP_FIELD_COUNTRY]; // Pays en libelle
|
||||
|
||||
Reference in New Issue
Block a user