Début ajout bon de livraison
This commit is contained in:
parent
8b1dc624c2
commit
ae1c5d9054
@ -142,9 +142,9 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
|||||||
|
|
||||||
$delivery->commande = new Livraison($this->db);
|
$delivery->commande = new Livraison($this->db);
|
||||||
$delivery->commande->commande_id = $delivery->commande_id;
|
$delivery->commande->commande_id = $delivery->commande_id;
|
||||||
$delivery->commande->fetch_commande();
|
$lignecommande = $delivery->commande->fetch_commande();
|
||||||
|
|
||||||
$nblignes = sizeof($delivery->commande->lignes);
|
$nblignes = sizeof($lignecommande);
|
||||||
|
|
||||||
$deliveryref = sanitize_string($delivery->ref);
|
$deliveryref = sanitize_string($delivery->ref);
|
||||||
$deliveryref = str_replace("(","",$deliveryref);
|
$deliveryref = str_replace("(","",$deliveryref);
|
||||||
@ -205,18 +205,18 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
|||||||
$curY = $nexY;
|
$curY = $nexY;
|
||||||
|
|
||||||
// Description de la ligne produit
|
// Description de la ligne produit
|
||||||
$libelleproduitservice=$delivery->commande->lignes[$i]->libelle;
|
$libelleproduitservice=$lignecommande[$i]->label;
|
||||||
if ($delivery->commande->lignes[$i]->desc&&$delivery->commande->lignes[$i]->desc!=$delivery->commande->lignes[$i]->libelle)
|
if ($lignecommande[$i]->description&&$lignecommande[$i]->description!=$lignecommande[$i]->label)
|
||||||
{
|
{
|
||||||
if ($libelleproduitservice) $libelleproduitservice.="\n";
|
if ($libelleproduitservice) $libelleproduitservice.="\n";
|
||||||
$libelleproduitservice.=$delivery->commande->lignes[$i]->desc;
|
$libelleproduitservice.=$lignecommande[$i]->description;
|
||||||
}
|
}
|
||||||
// Si ligne associée à un code produit
|
// Si ligne associée à un code produit
|
||||||
if ($delivery->commande->lignes[$i]->product_id)
|
if ($lignecommande[$i]->product_id)
|
||||||
{
|
{
|
||||||
$prodser = new Product($this->db);
|
$prodser = new Product($this->db);
|
||||||
|
|
||||||
$prodser->fetch($delivery->commande->lignes[$i]->product_id);
|
$prodser->fetch($lignecommande[$i]->product_id);
|
||||||
if ($prodser->ref)
|
if ($prodser->ref)
|
||||||
{
|
{
|
||||||
$libelleproduitservice=$langs->trans("Product")." ".$prodser->ref." - ".$libelleproduitservice;
|
$libelleproduitservice=$langs->trans("Product")." ".$prodser->ref." - ".$libelleproduitservice;
|
||||||
@ -225,17 +225,17 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
|||||||
// Ajoute description du produit
|
// Ajoute description du produit
|
||||||
if ($conf->global->COMMANDE_ADD_PROD_DESC && !$conf->global->PRODUIT_CHANGE_PROD_DESC)
|
if ($conf->global->COMMANDE_ADD_PROD_DESC && !$conf->global->PRODUIT_CHANGE_PROD_DESC)
|
||||||
{
|
{
|
||||||
if ($delivery->commande->lignes[$i]->product_desc&&$delivery->commande->lignes[$i]->product_desc!=$delivery->commande->lignes[$i]->libelle&&$delivery->commande->lignes[$i]->product_desc!=$delivery->commande->lignes[$i]->desc)
|
if ($lignecommande[$i]->product_desc&&$lignecommande[$i]->product_desc!=$lignecommande[$i]->libelle&&$lignecommande[$i]->product_desc!=$lignecommande[$i]->desc)
|
||||||
{
|
{
|
||||||
if ($libelleproduitservice) $libelleproduitservice.="\n";
|
if ($libelleproduitservice) $libelleproduitservice.="\n";
|
||||||
$libelleproduitservice.=$delivery->commande->lignes[$i]->product_desc;
|
$libelleproduitservice.=$lignecommande[$i]->product_desc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($delivery->commande->lignes[$i]->date_start && $delivery->commande->lignes[$i]->date_end)
|
if ($lignecommande[$i]->date_start && $lignecommande[$i]->date_end)
|
||||||
{
|
{
|
||||||
// Affichage durée si il y en a une
|
// Affichage durée si il y en a une
|
||||||
$libelleproduitservice.="\n(".$langs->trans("From")." ".dolibarr_print_date($delivery->commande->lignes[$i]->date_start)." ".$langs->trans("to")." ".dolibarr_print_date($delivery->commande->lignes[$i]->date_end).")";
|
$libelleproduitservice.="\n(".$langs->trans("From")." ".dolibarr_print_date($lignecommande[$i]->date_start)." ".$langs->trans("to")." ".dolibarr_print_date($lignecommande[$i]->date_end).")";
|
||||||
}
|
}
|
||||||
|
|
||||||
$pdf->SetFont('Arial','', 9); // Dans boucle pour gérer multi-page
|
$pdf->SetFont('Arial','', 9); // Dans boucle pour gérer multi-page
|
||||||
@ -255,7 +255,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
|||||||
*/
|
*/
|
||||||
// Quantité
|
// Quantité
|
||||||
$pdf->SetXY ($this->posxqty, $curY);
|
$pdf->SetXY ($this->posxqty, $curY);
|
||||||
$pdf->MultiCell(10, 4, $delivery->commande->lignes[$i]->qty, 0, 'R');
|
$pdf->MultiCell(10, 4, $lignecommande[$i]->qty, 0, 'R');
|
||||||
/*
|
/*
|
||||||
// Remise sur ligne
|
// Remise sur ligne
|
||||||
$pdf->SetXY ($this->posxdiscount, $curY);
|
$pdf->SetXY ($this->posxdiscount, $curY);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user