Fix: the delivery address was not recovered
Fix: utf-8
This commit is contained in:
parent
91bf93a668
commit
7d67fc931f
@ -288,8 +288,8 @@ if ($_GET["action"] == 'create')
|
||||
print '<td colspan="3">';
|
||||
if (!empty($object->fk_delivery_address))
|
||||
{
|
||||
$deliveryAddress = $soc->fetch_adresse_livraison($object->fk_delivery_address);
|
||||
print '<a href='.DOL_URL_ROOT.'/comm/adresse_livraison.php?socid='.$deliveryAddress->socid.'&id='.$deliveryAddress->id.'&action=edit&origin='.$origin.'&originid='.$origin_id.'>'.$deliveryAddress->label.'</a>';
|
||||
$expedition->fetch_adresse_livraison($object->fk_delivery_address);
|
||||
print '<a href='.DOL_URL_ROOT.'/comm/adresse_livraison.php?socid='.$expedition->deliveryaddress->socid.'&id='.$expedition->deliveryaddress->id.'&action=edit&origin='.$origin.'&originid='.$origin_id.'>'.$expedition->deliveryaddress->label.'</a>';
|
||||
}
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
@ -653,8 +653,8 @@ else
|
||||
print '<td colspan="3">';
|
||||
if (!empty($expedition->fk_delivery_address))
|
||||
{
|
||||
$deliveryAddress = $soc->fetch_adresse_livraison($expedition->fk_delivery_address);
|
||||
print '<a href='.DOL_URL_ROOT.'/comm/adresse_livraison.php?socid='.$deliveryAddress->socid.'&id='.$deliveryAddress->id.'&action=edit&origin=shipment&originid='.$expedition->id.'>'.$deliveryAddress->label.'</a>';
|
||||
$expedition->fetch_adresse_livraison($expedition->fk_delivery_address);
|
||||
print '<a href='.DOL_URL_ROOT.'/comm/adresse_livraison.php?socid='.$expedition->deliveryaddress->socid.'&id='.$expedition->deliveryaddress->id.'&action=edit&origin=shipment&originid='.$expedition->id.'>'.$expedition->deliveryaddress->label.'</a>';
|
||||
}
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
|
||||
@ -502,15 +502,13 @@ Class pdf_expedition_merou extends ModelePdfExpedition
|
||||
|
||||
// If SHIPPING contact defined on invoice, we use it
|
||||
$usecontact=false;
|
||||
//if ($conf->global->FACTURE_USE_BILL_CONTACT_AS_RECIPIENT)
|
||||
//{
|
||||
$arrayidcontact=$object->commande->getIdContact('external','SHIPPING');
|
||||
if (sizeof($arrayidcontact) > 0)
|
||||
{
|
||||
$usecontact=true;
|
||||
$result=$object->fetch_contact($arrayidcontact[0]);
|
||||
}
|
||||
//}
|
||||
$arrayidcontact=$object->commande->getIdContact('external','SHIPPING');
|
||||
if (sizeof($arrayidcontact) > 0)
|
||||
{
|
||||
$usecontact=true;
|
||||
$result=$object->fetch_contact($arrayidcontact[0]);
|
||||
}
|
||||
|
||||
if ($usecontact)
|
||||
{
|
||||
// On peut utiliser le nom de la societe du contact
|
||||
@ -527,6 +525,18 @@ Class pdf_expedition_merou extends ModelePdfExpedition
|
||||
$carac_client.="\n".$outputlangs->convToOutputCharset($object->contact->cp) . " " . $outputlangs->convToOutputCharset($object->contact->ville)."\n";
|
||||
if ($object->contact->pays_code != $this->emetteur->pays_code) $carac_client.=$outputlangs->convToOutputCharset($outputlangs->transnoentitiesnoconv("Country".$object->contact->pays_code))."\n";
|
||||
}
|
||||
else if (!empty($object->fk_delivery_address))
|
||||
{
|
||||
$object->fetch_adresse_livraison($object->fk_delivery_address);
|
||||
|
||||
// Customer name
|
||||
$carac_client_name=$outputlangs->convToOutputCharset($object->deliveryaddress->nom);
|
||||
|
||||
// Customer properties
|
||||
$carac_client.="\n".$outputlangs->convToOutputCharset($object->deliveryaddress->address);
|
||||
$carac_client.="\n".$outputlangs->convToOutputCharset($object->deliveryaddress->cp) . " " . $outputlangs->convToOutputCharset($object->deliveryaddress->ville)."\n";
|
||||
if ($object->deliveryaddress->pays_code != $this->emetteur->pays_code) $carac_client.=$outputlangs->convToOutputCharset($outputlangs->transnoentitiesnoconv("Country".$object->deliveryaddress->pays_code))."\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
// Nom client
|
||||
|
||||
@ -107,7 +107,7 @@ class Societe extends CommonObject
|
||||
|
||||
/**
|
||||
* \brief Constructeur de la classe
|
||||
* \param DB handler acc<EFBFBD>s base de donn<EFBFBD>es
|
||||
* \param DB handler acces base de donnees
|
||||
* \param id id societe (0 par defaut)
|
||||
*/
|
||||
function Societe($DB, $id=0)
|
||||
@ -990,10 +990,10 @@ class Societe extends CommonObject
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief D<EFBFBD>finit la soci<EFBFBD>t<EFBFBD> comme un client
|
||||
* \brief Definit la societe comme un client
|
||||
* \param remise Valeur en % de la remise
|
||||
* \param note Note/Motif de modification de la remise
|
||||
* \param user Utilisateur qui d<EFBFBD>finie la remise
|
||||
* \param user Utilisateur qui definie la remise
|
||||
* \return int <0 si ko, >0 si ok
|
||||
*/
|
||||
function set_remise_client($remise, $note, $user)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user