Some fixes
This commit is contained in:
parent
a6855be45b
commit
1831bb3983
@ -22,7 +22,7 @@
|
|||||||
/**
|
/**
|
||||||
\file htdocs/includes/modules/commande/pdf_edison.modules.php
|
\file htdocs/includes/modules/commande/pdf_edison.modules.php
|
||||||
\ingroup commande
|
\ingroup commande
|
||||||
\brief Fichier de la classe permettant de générer les commandes au modèle Edison
|
\brief Fichier de la classe permettant de g<EFBFBD>n<EFBFBD>rer les commandes au mod<EFBFBD>le Edison
|
||||||
\version $Id$
|
\version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -31,20 +31,20 @@ require_once(DOL_DOCUMENT_ROOT ."/includes/modules/commande/modules_commande.php
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
\class pdf_edison
|
\class pdf_edison
|
||||||
\brief Classe permettant de générer les commandes au modèle Edison
|
\brief Classe permettant de g<EFBFBD>n<EFBFBD>rer les commandes au mod<EFBFBD>le Edison
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class pdf_edison extends ModelePDFCommandes
|
class pdf_edison extends ModelePDFCommandes
|
||||||
{
|
{
|
||||||
|
|
||||||
/** \brief Constructeur
|
/** \brief Constructeur
|
||||||
\param db handler accès base de donnée
|
\param db handler acc<EFBFBD>s base de donn<EFBFBD>e
|
||||||
*/
|
*/
|
||||||
function pdf_edison($db=0)
|
function pdf_edison($db=0)
|
||||||
{
|
{
|
||||||
$this->db = $db;
|
$this->db = $db;
|
||||||
$this->name = "edison";
|
$this->name = "edison";
|
||||||
$this->description = "Modèle de commande simple";
|
$this->description = "Modele de commande simple";
|
||||||
|
|
||||||
// Dimension page pour format A4
|
// Dimension page pour format A4
|
||||||
$this->type = 'pdf';
|
$this->type = 'pdf';
|
||||||
@ -59,8 +59,8 @@ class pdf_edison extends ModelePDFCommandes
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/** \brief Renvoi dernière erreur
|
/** \brief Renvoi derni<EFBFBD>re erreur
|
||||||
\return string Dernière erreur
|
\return string Derni<EFBFBD>re erreur
|
||||||
*/
|
*/
|
||||||
function pdferror()
|
function pdferror()
|
||||||
{
|
{
|
||||||
@ -69,8 +69,8 @@ class pdf_edison extends ModelePDFCommandes
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\brief Fonction générant la commande sur le disque
|
\brief Fonction g<EFBFBD>n<EFBFBD>rant la commande sur le disque
|
||||||
\param id id de la propale à générer
|
\param id id de la propale <EFBFBD> g<EFBFBD>n<EFBFBD>rer
|
||||||
\return int 1=ok, 0=ko
|
\return int 1=ok, 0=ko
|
||||||
*/
|
*/
|
||||||
function write_file($com,$outputlangs='')
|
function write_file($com,$outputlangs='')
|
||||||
@ -85,7 +85,7 @@ class pdf_edison extends ModelePDFCommandes
|
|||||||
|
|
||||||
$outputlangs->setPhpLang();
|
$outputlangs->setPhpLang();
|
||||||
|
|
||||||
// Définition de l'objet $com (pour compatibilite ascendante)
|
// D<EFBFBD>finition de l'objet $com (pour compatibilite ascendante)
|
||||||
if (! is_object($com))
|
if (! is_object($com))
|
||||||
{
|
{
|
||||||
$id = $com;
|
$id = $com;
|
||||||
@ -95,7 +95,7 @@ class pdf_edison extends ModelePDFCommandes
|
|||||||
|
|
||||||
if ($conf->commande->dir_output)
|
if ($conf->commande->dir_output)
|
||||||
{
|
{
|
||||||
// Définition de $dir et $file
|
// D<EFBFBD>finition de $dir et $file
|
||||||
if ($com->specimen)
|
if ($com->specimen)
|
||||||
{
|
{
|
||||||
$dir = $conf->commande->dir_output;
|
$dir = $conf->commande->dir_output;
|
||||||
@ -126,7 +126,7 @@ class pdf_edison extends ModelePDFCommandes
|
|||||||
$pdf=new FPDI_Protection('P','mm',$this->format);
|
$pdf=new FPDI_Protection('P','mm',$this->format);
|
||||||
$pdfrights = array('print'); // Ne permet que l'impression du document
|
$pdfrights = array('print'); // Ne permet que l'impression du document
|
||||||
$pdfuserpass = ''; // Mot de passe pour l'utilisateur final
|
$pdfuserpass = ''; // Mot de passe pour l'utilisateur final
|
||||||
$pdfownerpass = NULL; // Mot de passe du propriétaire, créé aléatoirement si pas défini
|
$pdfownerpass = NULL; // Mot de passe du propri<EFBFBD>taire, cr<63><72> al<61>atoirement si pas d<>fini
|
||||||
$pdf->SetProtection($pdfrights,$pdfuserpass,$pdfownerpass);
|
$pdf->SetProtection($pdfrights,$pdfuserpass,$pdfownerpass);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -232,7 +232,7 @@ class pdf_edison extends ModelePDFCommandes
|
|||||||
$pdf->MultiCell(42, $tab2_lh, $langs->transnoentities("Reduction"), 0, 'R', 0);
|
$pdf->MultiCell(42, $tab2_lh, $langs->transnoentities("Reduction"), 0, 'R', 0);
|
||||||
|
|
||||||
$pdf->SetXY (132, $tab2_top + $tab2_lh*2);
|
$pdf->SetXY (132, $tab2_top + $tab2_lh*2);
|
||||||
$pdf->MultiCell(42, $tab2_lh, "Total HT après remise", 0, 'R', 0);
|
$pdf->MultiCell(42, $tab2_lh, "Total HT apr<EFBFBD>s remise", 0, 'R', 0);
|
||||||
|
|
||||||
$pdf->SetXY (132, $tab2_top + $tab2_lh*3);
|
$pdf->SetXY (132, $tab2_top + $tab2_lh*3);
|
||||||
$pdf->MultiCell(42, $tab2_lh, $langs->transnoentities("TotalVAT"), 0, 'R', 0);
|
$pdf->MultiCell(42, $tab2_lh, $langs->transnoentities("TotalVAT"), 0, 'R', 0);
|
||||||
@ -348,7 +348,7 @@ class pdf_edison extends ModelePDFCommandes
|
|||||||
if (defined("FAC_PDF_TEL"))
|
if (defined("FAC_PDF_TEL"))
|
||||||
{
|
{
|
||||||
$pdf->SetFont('Arial','',10);
|
$pdf->SetFont('Arial','',10);
|
||||||
$pdf->MultiCell(76, 5, "Tél : ".FAC_PDF_TEL);
|
$pdf->MultiCell(76, 5, "T<EFBFBD>l : ".FAC_PDF_TEL);
|
||||||
}
|
}
|
||||||
if (defined("MAIN_INFO_SIREN"))
|
if (defined("MAIN_INFO_SIREN"))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -6,4 +6,6 @@ DeliveryOrder=Delivery order
|
|||||||
DeliveryOrders=Delivery orders
|
DeliveryOrders=Delivery orders
|
||||||
DeliveryDate=Delivery date
|
DeliveryDate=Delivery date
|
||||||
CreateDeliveryOrder=Generate delivery order
|
CreateDeliveryOrder=Generate delivery order
|
||||||
SetDeliveryDate=Set shipping date
|
SetDeliveryDate=Set shipping date
|
||||||
|
ValidateDeliveryReceipt=Validate delivery receipt
|
||||||
|
ValidateDeliveryReceiptConfirm=Are you sure you want to validate this delivery receipt ?
|
||||||
@ -7,4 +7,6 @@ DeliveryOrders=Bons de livraison
|
|||||||
DeliveryDate=Date de livraison
|
DeliveryDate=Date de livraison
|
||||||
CreateDeliveryOrder=Générer bon de livraison
|
CreateDeliveryOrder=Générer bon de livraison
|
||||||
QtyDelivered=Qté livrée
|
QtyDelivered=Qté livrée
|
||||||
SetDeliveryDate=Définir la date de livraison
|
SetDeliveryDate=Définir la date de livraison
|
||||||
|
ValidateDeliveryReceipt=Valider le bon de livraison
|
||||||
|
ValidateDeliveryReceiptConfirm=Etes-vous sur de vouloir valider ce bon de livraison ?
|
||||||
@ -402,7 +402,7 @@ else
|
|||||||
*/
|
*/
|
||||||
if ($_GET["action"] == 'valid')
|
if ($_GET["action"] == 'valid')
|
||||||
{
|
{
|
||||||
$html->form_confirm($_SERVER['PHP_SELF'].'?id='.$livraison->id,'Valider le bon de livraison','Etes-vous s<>r de vouloir valider ce bon de livraison ?','confirm_valid');
|
$html->form_confirm($_SERVER['PHP_SELF'].'?id='.$livraison->id,$langs->trans("ValidateDeliveryReceipt"),$langs->trans("ValidateDeliveryReceiptConfirm"),'confirm_valid');
|
||||||
print '<br>';
|
print '<br>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -591,7 +591,7 @@ class Livraison extends CommonObject
|
|||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Lit le document associ<EFBFBD>
|
* Lit le document associe
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
function fetch_object()
|
function fetch_object()
|
||||||
@ -606,7 +606,6 @@ class Livraison extends CommonObject
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function fetch_adresse_livraison($id)
|
function fetch_adresse_livraison($id)
|
||||||
{
|
{
|
||||||
$idadresse = $id;
|
$idadresse = $id;
|
||||||
@ -648,10 +647,11 @@ class Livraison extends CommonObject
|
|||||||
$ligne->qty_asked = $obj->qty_asked;
|
$ligne->qty_asked = $obj->qty_asked;
|
||||||
$ligne->qty_shipped = $obj->qty_shipped;
|
$ligne->qty_shipped = $obj->qty_shipped;
|
||||||
$ligne->ref = $obj->ref;
|
$ligne->ref = $obj->ref;
|
||||||
$ligne->label = stripslashes(nl2br($obj->label));
|
$ligne->label = $obj->label;
|
||||||
$ligne->description = stripslashes(nl2br($obj->description));
|
$ligne->description = $obj->description;
|
||||||
$ligne->price = $obj->price;
|
$ligne->price = $obj->price;
|
||||||
|
$ligne->total_ht = $obj->total_ht;
|
||||||
|
|
||||||
$this->lignes[$i] = $ligne;
|
$this->lignes[$i] = $ligne;
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
/**
|
/**
|
||||||
\file htdocs/livraison/mods/pdf/pdf_sirocco.modules.php
|
\file htdocs/livraison/mods/pdf/pdf_sirocco.modules.php
|
||||||
\ingroup livraison
|
\ingroup livraison
|
||||||
\brief Fichier de la classe permettant de générer les bons de livraison au modèle Sirocco
|
\brief Fichier de la classe permettant de g<EFBFBD>n<EFBFBD>rer les bons de livraison au mod<EFBFBD>le Sirocco
|
||||||
\version $Id$
|
\version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -32,33 +32,37 @@ require_once(DOL_DOCUMENT_ROOT."/livraison/mods/modules_livraison.php");
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
\class pdf_sirocco
|
\class pdf_sirocco
|
||||||
\brief Classe permettant de générer les bons de livraison au modèle Sirocco
|
\brief Classe permettant de g<EFBFBD>n<EFBFBD>rer les bons de livraison au mod<EFBFBD>le Sirocco
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class pdf_sirocco extends ModelePDFDeliveryOrder
|
class pdf_sirocco extends ModelePDFDeliveryOrder
|
||||||
{
|
{
|
||||||
|
|
||||||
/** \brief Constructeur
|
/** \brief Constructeur
|
||||||
\param db handler accès base de donnée
|
\param db handler acc<EFBFBD>s base de donn<EFBFBD>e
|
||||||
*/
|
*/
|
||||||
function pdf_sirocco($db=0)
|
function pdf_sirocco($db=0)
|
||||||
{
|
{
|
||||||
$this->db = $db;
|
$this->db = $db;
|
||||||
$this->name = "sirocco";
|
$this->name = "sirocco";
|
||||||
$this->description = "Modèle de bon de livraison simple";
|
$this->description = "Modele de bon de livraison simple";
|
||||||
|
|
||||||
// Dimension page pour format A4
|
// Dimension page pour format A4
|
||||||
$this->type = 'pdf';
|
$this->type = 'pdf';
|
||||||
$this->page_largeur = 210;
|
$this->page_largeur = 210;
|
||||||
$this->page_hauteur = 297;
|
$this->page_hauteur = 297;
|
||||||
$this->format = array($this->page_largeur,$this->page_hauteur);
|
$this->format = array($this->page_largeur,$this->page_hauteur);
|
||||||
|
$this->marge_gauche=10;
|
||||||
|
$this->marge_droite=10;
|
||||||
|
$this->marge_haute=10;
|
||||||
|
$this->marge_basse=10;
|
||||||
|
|
||||||
$this->error = "";
|
$this->error = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/** \brief Renvoi dernière erreur
|
/** \brief Renvoi derniere erreur
|
||||||
* \return string Dernière erreur
|
* \return string Derniere erreur
|
||||||
*/
|
*/
|
||||||
function pdferror()
|
function pdferror()
|
||||||
{
|
{
|
||||||
@ -67,10 +71,10 @@ class pdf_sirocco extends ModelePDFDeliveryOrder
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\brief Fonction générant le bon de livraison sur le disque
|
\brief Fonction g<EFBFBD>n<EFBFBD>rant le bon de livraison sur le disque
|
||||||
\param delivery Object livraison à générer
|
\param delivery Object livraison <EFBFBD> g<EFBFBD>n<EFBFBD>rer
|
||||||
\param outputlangs Output language
|
\param outputlangs Output language
|
||||||
\return int 1 if OK, <=0 if KO
|
\return int 1 if OK, <=0 if KO
|
||||||
*/
|
*/
|
||||||
function write_file($delivery,$outputlangs='')
|
function write_file($delivery,$outputlangs='')
|
||||||
{
|
{
|
||||||
@ -118,7 +122,7 @@ class pdf_sirocco extends ModelePDFDeliveryOrder
|
|||||||
$pdf=new FPDI_Protection('P','mm',$this->format);
|
$pdf=new FPDI_Protection('P','mm',$this->format);
|
||||||
$pdfrights = array('print'); // Ne permet que l'impression du document
|
$pdfrights = array('print'); // Ne permet que l'impression du document
|
||||||
$pdfuserpass = ''; // Mot de passe pour l'utilisateur final
|
$pdfuserpass = ''; // Mot de passe pour l'utilisateur final
|
||||||
$pdfownerpass = NULL; // Mot de passe du propriétaire, créé aléatoirement si pas défini
|
$pdfownerpass = NULL; // Mot de passe du proprietaire, cree aleatoirement si pas defini
|
||||||
$pdf->SetProtection($pdfrights,$pdfuserpass,$pdfownerpass);
|
$pdf->SetProtection($pdfrights,$pdfuserpass,$pdfownerpass);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -136,13 +140,9 @@ class pdf_sirocco extends ModelePDFDeliveryOrder
|
|||||||
|
|
||||||
$this->_pagehead($pdf, $delivery);
|
$this->_pagehead($pdf, $delivery);
|
||||||
|
|
||||||
/*
|
$pagenb = 1;
|
||||||
*/
|
|
||||||
$tab_top = 100;
|
$tab_top = 100;
|
||||||
$tab_height = 140;
|
$tab_height = 140;
|
||||||
/*
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
$pdf->SetFillColor(220,220,220);
|
$pdf->SetFillColor(220,220,220);
|
||||||
|
|
||||||
@ -158,32 +158,66 @@ class pdf_sirocco extends ModelePDFDeliveryOrder
|
|||||||
|
|
||||||
for ($i = 0 ; $i < $nblignes ; $i++)
|
for ($i = 0 ; $i < $nblignes ; $i++)
|
||||||
{
|
{
|
||||||
|
$curY = $nexY;
|
||||||
|
|
||||||
$curY = $nexY;
|
// Description de la ligne produit
|
||||||
|
$libelleproduitservice=dol_htmlentitiesbr($delivery->lignes[$i]->label,1);
|
||||||
|
if ($delivery->lignes[$i]->description && $delivery->lignes[$i]->description!=$delivery->lignes[$i]->label)
|
||||||
|
{
|
||||||
|
if ($libelleproduitservice) $libelleproduitservice.="<br>";
|
||||||
|
$libelleproduitservice.=dol_htmlentitiesbr($delivery->lignes[$i]->description,1);
|
||||||
|
}
|
||||||
|
// Si ligne associee a un code produit
|
||||||
|
if ($delivery->lignes[$i]->fk_product)
|
||||||
|
{
|
||||||
|
$prodser = new Product($this->db);
|
||||||
|
$prodser->fetch($delivery->lignes[$i]->fk_product);
|
||||||
|
if ($prodser->ref)
|
||||||
|
{
|
||||||
|
$prefix_prodserv = "";
|
||||||
|
if($prodser->isservice())
|
||||||
|
{
|
||||||
|
// Un service peur aussi etre livre
|
||||||
|
$prefix_prodserv = $langs->transnoentities("Service")." ";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$prefix_prodserv = $langs->transnoentities("Product")." ";
|
||||||
|
}
|
||||||
|
$libelleproduitservice=$prefix_prodserv.$prodser->ref." - ".$libelleproduitservice;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($delivery->lignes[$i]->date_start && $delivery->lignes[$i]->date_end)
|
||||||
|
{
|
||||||
|
// Affichage duree si il y en a une
|
||||||
|
$libelleproduitservice.="<br>".dol_htmlentitiesbr("(".$langs->transnoentities("From")." ".dolibarr_print_date($delivery->lignes[$i]->date_start)." ".$langs->transnoentities("to")." ".dolibarr_print_date($delivery->lignes[$i]->date_end).")",1);
|
||||||
|
}
|
||||||
|
|
||||||
|
$pdf->SetXY (30, $curY );
|
||||||
|
|
||||||
|
$pdf->MultiCell(100, 5, $libelleproduitservice, 0, 'J', 0);
|
||||||
|
|
||||||
$pdf->SetXY (30, $curY );
|
$nexY = $pdf->GetY();
|
||||||
|
|
||||||
$pdf->MultiCell(100, 5, $delivery->lignes[$i]->desc, 0, 'J', 0);
|
|
||||||
|
|
||||||
$nexY = $pdf->GetY();
|
|
||||||
|
|
||||||
$pdf->SetXY (10, $curY );
|
$pdf->SetXY (10, $curY );
|
||||||
|
|
||||||
$pdf->MultiCell(20, 5, $delivery->lignes[$i]->ref, 0, 'C');
|
$pdf->MultiCell(20, 5, $delivery->lignes[$i]->ref, 0, 'C');
|
||||||
|
|
||||||
|
// \TODO Field not yet saved in database
|
||||||
$pdf->SetXY (133, $curY );
|
$pdf->SetXY (133, $curY );
|
||||||
$pdf->MultiCell(10, 5, $delivery->lignes[$i]->tva_tx, 0, 'C');
|
$pdf->MultiCell(10, 5, $delivery->lignes[$i]->tva_tx, 0, 'C');
|
||||||
|
|
||||||
$pdf->SetXY (145, $curY );
|
|
||||||
$pdf->MultiCell(10, 5, $delivery->lignes[$i]->qty, 0, 'C');
|
|
||||||
|
|
||||||
|
$pdf->SetXY (145, $curY );
|
||||||
|
$pdf->MultiCell(10, 5, $delivery->lignes[$i]->qty_shipped, 0, 'C');
|
||||||
|
|
||||||
|
// \TODO Field not yet saved in database
|
||||||
$pdf->SetXY (156, $curY );
|
$pdf->SetXY (156, $curY );
|
||||||
$pdf->MultiCell(18, 5, price($delivery->lignes[$i]->price), 0, 'R', 0);
|
$pdf->MultiCell(18, 5, price($delivery->lignes[$i]->price), 0, 'R', 0);
|
||||||
|
|
||||||
$pdf->SetXY (174, $curY );
|
$pdf->SetXY (174, $curY );
|
||||||
$total = price($delivery->lignes[$i]->price * $delivery->lignes[$i]->qty);
|
$total = price($delivery->lignes[$i]->price * $delivery->lignes[$i]->qty_shipped);
|
||||||
$pdf->MultiCell(26, 5, $total, 0, 'R', 0);
|
$pdf->MultiCell(26, 5, $total, 0, 'R', 0);
|
||||||
|
|
||||||
$pdf->line(10, $curY, 200, $curY );
|
$pdf->line(10, $curY, 200, $curY );
|
||||||
|
|
||||||
if ($nexY > 240 && $i < $nblignes - 1)
|
if ($nexY > 240 && $i < $nblignes - 1)
|
||||||
@ -222,7 +256,7 @@ class pdf_sirocco extends ModelePDFDeliveryOrder
|
|||||||
$pdf->MultiCell(42, $tab2_lh, $langs->transnoentities("Discount"), 0, 'R', 0);
|
$pdf->MultiCell(42, $tab2_lh, $langs->transnoentities("Discount"), 0, 'R', 0);
|
||||||
|
|
||||||
$pdf->SetXY (132, $tab2_top + $tab2_lh*2);
|
$pdf->SetXY (132, $tab2_top + $tab2_lh*2);
|
||||||
$pdf->MultiCell(42, $tab2_lh, "Total HT après remise", 0, 'R', 0);
|
$pdf->MultiCell(42, $tab2_lh, "Total HT apr<EFBFBD>s remise", 0, 'R', 0);
|
||||||
|
|
||||||
$pdf->SetXY (132, $tab2_top + $tab2_lh*3);
|
$pdf->SetXY (132, $tab2_top + $tab2_lh*3);
|
||||||
$pdf->MultiCell(42, $tab2_lh, $langs->transnoentities("TotalVAT"), 0, 'R', 0);
|
$pdf->MultiCell(42, $tab2_lh, $langs->transnoentities("TotalVAT"), 0, 'R', 0);
|
||||||
@ -295,7 +329,7 @@ class pdf_sirocco extends ModelePDFDeliveryOrder
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* \brief Affiche en-tête propale
|
* \brief Affiche en-t<EFBFBD>te propale
|
||||||
* \param pdf objet PDF
|
* \param pdf objet PDF
|
||||||
* \param fac objet propale
|
* \param fac objet propale
|
||||||
* \param showadress 0=non, 1=oui
|
* \param showadress 0=non, 1=oui
|
||||||
@ -321,7 +355,7 @@ class pdf_sirocco extends ModelePDFDeliveryOrder
|
|||||||
if (defined("FAC_PDF_TEL"))
|
if (defined("FAC_PDF_TEL"))
|
||||||
{
|
{
|
||||||
$pdf->SetFont('Arial','',10);
|
$pdf->SetFont('Arial','',10);
|
||||||
$pdf->MultiCell(76, 5, "Tél : ".FAC_PDF_TEL);
|
$pdf->MultiCell(76, 5, "T<EFBFBD>l : ".FAC_PDF_TEL);
|
||||||
}
|
}
|
||||||
if (defined("MAIN_INFO_SIREN"))
|
if (defined("MAIN_INFO_SIREN"))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -50,7 +50,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
|||||||
|
|
||||||
$this->db = $db;
|
$this->db = $db;
|
||||||
$this->name = "typhon";
|
$this->name = "typhon";
|
||||||
$this->description = "Mod<EFBFBD>le de bon de livraison complet (logo...)";
|
$this->description = "Modele de bon de livraison complet (logo...)";
|
||||||
|
|
||||||
// Dimension page pour format A4
|
// Dimension page pour format A4
|
||||||
$this->type = 'pdf';
|
$this->type = 'pdf';
|
||||||
@ -64,7 +64,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
|||||||
|
|
||||||
$this->option_logo = 1; // Affiche logo FAC_PDF_LOGO
|
$this->option_logo = 1; // Affiche logo FAC_PDF_LOGO
|
||||||
$this->option_tva = 1; // Gere option tva FACTURE_TVAOPTION
|
$this->option_tva = 1; // Gere option tva FACTURE_TVAOPTION
|
||||||
$this->option_modereg = 1; // Gere choix mode r<EFBFBD>glement FACTURE_CHQ_NUMBER, FACTURE_RIB_NUMBER
|
$this->option_modereg = 1; // Gere choix mode reglement FACTURE_CHQ_NUMBER, FACTURE_RIB_NUMBER
|
||||||
$this->option_codeproduitservice = 1; // Affiche code produit-service
|
$this->option_codeproduitservice = 1; // Affiche code produit-service
|
||||||
if (defined("FACTURE_TVAOPTION") && FACTURE_TVAOPTION == 'franchise')
|
if (defined("FACTURE_TVAOPTION") && FACTURE_TVAOPTION == 'franchise')
|
||||||
$this->franchise=1;
|
$this->franchise=1;
|
||||||
@ -149,7 +149,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
|||||||
$pdf=new FPDI_Protection('P','mm',$this->format);
|
$pdf=new FPDI_Protection('P','mm',$this->format);
|
||||||
$pdfrights = array('print'); // Ne permet que l'impression du document
|
$pdfrights = array('print'); // Ne permet que l'impression du document
|
||||||
$pdfuserpass = ''; // Mot de passe pour l'utilisateur final
|
$pdfuserpass = ''; // Mot de passe pour l'utilisateur final
|
||||||
$pdfownerpass = NULL; // Mot de passe du propri<EFBFBD>taire, cr<63><72> al<61>atoirement si pas d<>fini
|
$pdfownerpass = NULL; // Mot de passe du proprietaire, cree aleatoirement si pas defini
|
||||||
$pdf->SetProtection($pdfrights,$pdfuserpass,$pdfownerpass);
|
$pdf->SetProtection($pdfrights,$pdfuserpass,$pdfownerpass);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -202,7 +202,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
|||||||
if ($libelleproduitservice) $libelleproduitservice.="<br>";
|
if ($libelleproduitservice) $libelleproduitservice.="<br>";
|
||||||
$libelleproduitservice.=dol_htmlentitiesbr($delivery->lignes[$i]->description,1);
|
$libelleproduitservice.=dol_htmlentitiesbr($delivery->lignes[$i]->description,1);
|
||||||
}
|
}
|
||||||
// Si ligne associ<EFBFBD>e <20> un code produit
|
// Si ligne associee a un code produit
|
||||||
if ($delivery->lignes[$i]->fk_product)
|
if ($delivery->lignes[$i]->fk_product)
|
||||||
{
|
{
|
||||||
$prodser = new Product($this->db);
|
$prodser = new Product($this->db);
|
||||||
@ -212,7 +212,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
|||||||
$prefix_prodserv = "";
|
$prefix_prodserv = "";
|
||||||
if($prodser->isservice())
|
if($prodser->isservice())
|
||||||
{
|
{
|
||||||
// Un service peur aussi <EFBFBD>tre livr<76>
|
// Un service peur aussi etre livre
|
||||||
$prefix_prodserv = $langs->transnoentities("Service")." ";
|
$prefix_prodserv = $langs->transnoentities("Service")." ";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -228,11 +228,11 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
|||||||
$libelleproduitservice.="<br>".dol_htmlentitiesbr("(".$langs->transnoentities("From")." ".dolibarr_print_date($delivery->lignes[$i]->date_start)." ".$langs->transnoentities("to")." ".dolibarr_print_date($delivery->lignes[$i]->date_end).")",1);
|
$libelleproduitservice.="<br>".dol_htmlentitiesbr("(".$langs->transnoentities("From")." ".dolibarr_print_date($delivery->lignes[$i]->date_start)." ".$langs->transnoentities("to")." ".dolibarr_print_date($delivery->lignes[$i]->date_end).")",1);
|
||||||
}
|
}
|
||||||
|
|
||||||
$pdf->SetFont('Arial','', 9); // Dans boucle pour g<EFBFBD>rer multi-page
|
$pdf->SetFont('Arial','', 9); // Dans boucle pour gerer multi-page
|
||||||
|
|
||||||
$pdf->writeHTMLCell(108, 4, $this->posxdesc-1, $curY, $libelleproduitservice, 0, 1);
|
$pdf->writeHTMLCell(108, 4, $this->posxdesc-1, $curY, $libelleproduitservice, 0, 1);
|
||||||
|
|
||||||
$pdf->SetFont('Arial','', 9); // On repositionne la police par d<EFBFBD>faut
|
$pdf->SetFont('Arial','', 9); // On repositionne la police par defaut
|
||||||
|
|
||||||
$nexY = $pdf->GetY();
|
$nexY = $pdf->GetY();
|
||||||
/*
|
/*
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user