[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dolibarr-bugtrack] [bug #18642] bon de livrasion ne mentione pas l'adre
From: |
Franky Van Liedekerke |
Subject: |
[Dolibarr-bugtrack] [bug #18642] bon de livrasion ne mentione pas l'adresse de livraison (avec solution) |
Date: |
Sat, 30 Dec 2006 16:51:37 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.8.1) Gecko/20060601 Firefox/2.0 (Ubuntu-edgy) |
Follow-up Comment #1, bug #18642 (project dolibarr):
Dans ma post, j'ai oublie tde traitre le cas ou pas d'adresse de livraison
est defini. Alors le code suivante est une meilleure solution:
$pdf->MultiCell(80,5,
$langs->transnoentities("DeliveryAddress").":");
$commande = new Commande ($this->db);
$commande->fetch($delivery->commande_id);
$adresse_livraison = new AdresseLivraison ($this->db);
$adresse_livraison->fetch($delivery->socid);
// if there's at least one delivery address defined
if (count($adresse_livraison->lignes)>0) {
$delivery->client =
$adresse_livraison->lignes[$commande->adresse_livraison_id];
} else {
$client = new Societe($this->db);
$client->fetch($delivery->socid);
$delivery->client = $client;
}
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?18642>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/