Add: possibilité d'utiliser l'adresse du contact suivi commande dans le document
Add: patch de Team Raider qui permet d'afficher les nom de contact si défini dans les documents Fix: uniformisation du code
This commit is contained in:
parent
9c4ae61554
commit
52d6005929
@ -1,9 +1,10 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2003-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2003-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
||||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||||
* Copyright (C) 2004 Andre Cianfarani <acianfa@free.fr>
|
* Copyright (C) 2004 Andre Cianfarani <acianfa@free.fr>
|
||||||
|
* Copyright (C) 2005-2007 Regis Houssin <regis.houssin@dolibarr.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -122,16 +123,29 @@ if ($_GET["action"] == 'setmod')
|
|||||||
// par appel methode canBeActivated
|
// par appel methode canBeActivated
|
||||||
|
|
||||||
dolibarr_set_const($db, "COMMANDE_ADDON",$_GET["value"]);
|
dolibarr_set_const($db, "COMMANDE_ADDON",$_GET["value"]);
|
||||||
|
Header("Location: commande.php");
|
||||||
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_POST["action"] == 'setvalidorder')
|
if ($_POST["action"] == 'setvalidorder')
|
||||||
{
|
{
|
||||||
dolibarr_set_const($db, "COMMANDE_VALID_AFTER_CLOSE_PROPAL",$_POST["validorder"]);
|
dolibarr_set_const($db, "COMMANDE_VALID_AFTER_CLOSE_PROPAL",$_POST["validorder"]);
|
||||||
|
Header("Location: commande.php");
|
||||||
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_POST["action"] == 'deliverycostline')
|
if ($_POST["action"] == 'deliverycostline')
|
||||||
{
|
{
|
||||||
dolibarr_set_const($db, "COMMANDE_ADD_DELIVERY_COST_LINE",$_POST["addline"]);
|
dolibarr_set_const($db, "COMMANDE_ADD_DELIVERY_COST_LINE",$_POST["addline"]);
|
||||||
|
Header("Location: commande.php");
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($_POST["action"] == 'set_use_customer_contact_as_recipient')
|
||||||
|
{
|
||||||
|
dolibarr_set_const($db, "COMMANDE_USE_CUSTOMER_CONTACT_AS_RECIPIENT",$_POST["use_customer_contact_as_recipient"]);
|
||||||
|
Header("Location: commande.php");
|
||||||
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
// défini les constantes du modèle saphir
|
// défini les constantes du modèle saphir
|
||||||
@ -348,36 +362,44 @@ print_titre($langs->trans("OtherOptions"));
|
|||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>'.$langs->trans("Parameter").'</td>';
|
print '<td>'.$langs->trans("Parameter").'</td>';
|
||||||
print '<td align="center" width="160">'.$langs->trans("Value").'</td>';
|
print '<td align="center" width="60">'.$langs->trans("Value").'</td>';
|
||||||
|
print "<td> </td>\n";
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
$var=true;
|
$var=true;
|
||||||
|
|
||||||
// Valider la commande après cloture de la propale
|
// Valider la commande après cloture de la propale
|
||||||
// permet de na pas passer par l'option commande provisoire
|
// permet de na pas passer par l'option commande provisoire
|
||||||
$var=! $var;
|
$var=! $var;
|
||||||
|
|
||||||
print '<tr '.$bc[$var].'><td>';
|
|
||||||
print $langs->trans("ValidOrderAfterPropalClosed");
|
|
||||||
print '</td><td width="160" align="center">';
|
|
||||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
||||||
print '<input type="hidden" name="action" value="setvalidorder">';
|
print '<input type="hidden" name="action" value="setvalidorder">';
|
||||||
print $html->selectyesno("validorder",$conf->global->COMMANDE_VALID_AFTER_CLOSE_PROPAL,1);
|
print '<tr '.$bc[$var].'>';
|
||||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
print '<td>'.$langs->trans("ValidOrderAfterPropalClosed").'</td>';
|
||||||
print "</form>\n";
|
print '<td width="60" align="center">'.$html->selectyesno("validorder",$conf->global->COMMANDE_VALID_AFTER_CLOSE_PROPAL,1).'</td>';
|
||||||
print "</td></tr>\n";
|
print '<td align="right"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
|
||||||
|
print '</tr>';
|
||||||
|
print '</form>';
|
||||||
|
|
||||||
// Ajouter une ligne de frais port indiquant le poids de la commande
|
// Ajouter une ligne de frais port indiquant le poids de la commande
|
||||||
$var=! $var;
|
$var=! $var;
|
||||||
|
|
||||||
print '<tr '.$bc[$var].'><td>';
|
|
||||||
print $langs->trans("AddDeliveryCostLine");
|
|
||||||
print '</td><td width="160" align="center">';
|
|
||||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
||||||
print '<input type="hidden" name="action" value="deliverycostline">';
|
print '<input type="hidden" name="action" value="deliverycostline">';
|
||||||
print $html->selectyesno("addline",$conf->global->COMMANDE_ADD_DELIVERY_COST_LINE,1);
|
print '<tr '.$bc[$var].'>';
|
||||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
print '<td>'.$langs->trans("AddDeliveryCostLine").'</td>';
|
||||||
|
print '<td width="60" align="center">'.$html->selectyesno("addline",$conf->global->COMMANDE_ADD_DELIVERY_COST_LINE,1).'</td>';
|
||||||
|
print '<td align="right"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
|
||||||
|
print '</tr>';
|
||||||
|
print '</form>';
|
||||||
|
|
||||||
|
// Utiliser le contact de la commande dans le document
|
||||||
|
$var=! $var;
|
||||||
|
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
||||||
|
print '<input type="hidden" name="action" value="set_use_customer_contact_as_recipient">';
|
||||||
|
print '<tr '.$bc[$var].'>';
|
||||||
|
print '<td>'.$langs->trans("UseCustomerContactAsOrderRecipientIfExist").'</td>';
|
||||||
|
print '<td width="60" align="center">'.$html->selectyesno("use_customer_contact_as_recipient",$conf->global->COMMANDE_USE_CUSTOMER_CONTACT_AS_RECIPIENT,1).'</td>';
|
||||||
|
print '<td align="right"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
|
||||||
|
print '</tr>';
|
||||||
print '</form>';
|
print '</form>';
|
||||||
print "</td></tr>\n";
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -18,7 +18,6 @@
|
|||||||
* or see http://www.gnu.org/
|
* or see http://www.gnu.org/
|
||||||
*
|
*
|
||||||
* $Id$
|
* $Id$
|
||||||
* $Source$
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -742,143 +741,190 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
*/
|
*/
|
||||||
function _pagehead(&$pdf, $object, $showadress=1, $outputlangs)
|
function _pagehead(&$pdf, $object, $showadress=1, $outputlangs)
|
||||||
{
|
{
|
||||||
global $conf,$langs;
|
global $conf,$langs;
|
||||||
|
|
||||||
$outputlangs->load("main");
|
$outputlangs->load("main");
|
||||||
$outputlangs->load("bills");
|
$outputlangs->load("bills");
|
||||||
$outputlangs->load("propal");
|
$outputlangs->load("propal");
|
||||||
$outputlangs->load("companies");
|
$outputlangs->load("companies");
|
||||||
|
|
||||||
$pdf->SetTextColor(0,0,60);
|
$pdf->SetTextColor(0,0,60);
|
||||||
$pdf->SetFont('Arial','B',13);
|
$pdf->SetFont('Arial','B',13);
|
||||||
|
|
||||||
$posy=$this->marge_haute;
|
$posy=$this->marge_haute;
|
||||||
|
|
||||||
$pdf->SetXY($this->marge_gauche,$posy);
|
$pdf->SetXY($this->marge_gauche,$posy);
|
||||||
|
|
||||||
// Logo
|
// Logo
|
||||||
$logo=$conf->societe->dir_logos.'/'.$this->emetteur->logo;
|
$logo=$conf->societe->dir_logos.'/'.$this->emetteur->logo;
|
||||||
if ($this->emetteur->logo)
|
if ($this->emetteur->logo)
|
||||||
{
|
{
|
||||||
if (is_readable($logo))
|
if (is_readable($logo))
|
||||||
{
|
{
|
||||||
$pdf->Image($logo, $this->marge_gauche, $posy, 0, 24);
|
$pdf->Image($logo, $this->marge_gauche, $posy, 0, 24);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$pdf->SetTextColor(200,0,0);
|
$pdf->SetTextColor(200,0,0);
|
||||||
$pdf->SetFont('Arial','B',8);
|
$pdf->SetFont('Arial','B',8);
|
||||||
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("ErrorLogoFileNotFound",$logo), 0, 'L');
|
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("ErrorLogoFileNotFound",$logo), 0, 'L');
|
||||||
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("ErrorGoToModuleSetup"), 0, 'L');
|
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("ErrorGoToModuleSetup"), 0, 'L');
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (defined("FAC_PDF_INTITULE"))
|
|
||||||
{
|
|
||||||
$pdf->MultiCell(100, 4, FAC_PDF_INTITULE, 0, 'L');
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else if (defined("FAC_PDF_INTITULE"))
|
||||||
|
{
|
||||||
|
$pdf->MultiCell(100, 4, FAC_PDF_INTITULE, 0, 'L');
|
||||||
|
}
|
||||||
|
|
||||||
|
$pdf->SetFont('Arial','B',13);
|
||||||
|
$pdf->SetXY(100,$posy);
|
||||||
|
$pdf->SetTextColor(0,0,60);
|
||||||
|
$title=$outputlangs->transnoentities("Order");
|
||||||
|
$pdf->MultiCell(100, 4, $title, '' , 'R');
|
||||||
|
|
||||||
|
$pdf->SetFont('Arial','B',12);
|
||||||
|
|
||||||
|
$posy+=6;
|
||||||
|
$pdf->SetXY(100,$posy);
|
||||||
|
$pdf->SetTextColor(0,0,60);
|
||||||
|
$pdf->MultiCell(100, 4, $outputlangs->transnoentities("Ref")." : " . $object->ref, '', 'R');
|
||||||
|
|
||||||
|
$posy+=1;
|
||||||
|
$pdf->SetFont('Arial','',10);
|
||||||
|
|
||||||
$pdf->SetFont('Arial','B',13);
|
$posy+=5;
|
||||||
$pdf->SetXY(100,$posy);
|
$pdf->SetXY(100,$posy);
|
||||||
$pdf->SetTextColor(0,0,60);
|
$pdf->SetTextColor(0,0,60);
|
||||||
$title=$outputlangs->transnoentities("Order");
|
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("OrderDate")." : " . dolibarr_print_date($object->date,"%d %b %Y"), '', 'R');
|
||||||
$pdf->MultiCell(100, 4, $title, '' , 'R');
|
|
||||||
|
if ($showadress)
|
||||||
$pdf->SetFont('Arial','B',12);
|
{
|
||||||
|
// Emetteur
|
||||||
$posy+=6;
|
$posy=42;
|
||||||
$pdf->SetXY(100,$posy);
|
$hautcadre=40;
|
||||||
$pdf->SetTextColor(0,0,60);
|
$pdf->SetTextColor(0,0,0);
|
||||||
$pdf->MultiCell(100, 4, $outputlangs->transnoentities("Ref")." : " . $object->ref, '', 'R');
|
$pdf->SetFont('Arial','',8);
|
||||||
|
$pdf->SetXY($this->marge_gauche,$posy-5);
|
||||||
$posy+=1;
|
$pdf->MultiCell(66,5, $outputlangs->transnoentities("BillFrom").":");
|
||||||
$pdf->SetFont('Arial','',10);
|
|
||||||
|
|
||||||
$posy+=5;
|
|
||||||
$pdf->SetXY(100,$posy);
|
|
||||||
$pdf->SetTextColor(0,0,60);
|
|
||||||
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("OrderDate")." : " . dolibarr_print_date($object->date,"%d %b %Y"), '', 'R');
|
|
||||||
|
|
||||||
|
|
||||||
|
$pdf->SetXY($this->marge_gauche,$posy);
|
||||||
if ($showadress)
|
$pdf->SetFillColor(230,230,230);
|
||||||
{
|
$pdf->MultiCell(82, $hautcadre, "", 0, 'R', 1);
|
||||||
// Emetteur
|
|
||||||
$posy=42;
|
|
||||||
$hautcadre=40;
|
|
||||||
$pdf->SetTextColor(0,0,0);
|
|
||||||
$pdf->SetFont('Arial','',8);
|
|
||||||
$pdf->SetXY($this->marge_gauche,$posy-5);
|
|
||||||
$pdf->MultiCell(66,5, $outputlangs->transnoentities("BillFrom").":");
|
|
||||||
|
|
||||||
|
|
||||||
$pdf->SetXY($this->marge_gauche,$posy);
|
$pdf->SetXY($this->marge_gauche+2,$posy+3);
|
||||||
$pdf->SetFillColor(230,230,230);
|
|
||||||
$pdf->MultiCell(82, $hautcadre, "", 0, 'R', 1);
|
|
||||||
|
|
||||||
|
// Nom emetteur
|
||||||
|
$pdf->SetTextColor(0,0,60);
|
||||||
|
$pdf->SetFont('Arial','B',11);
|
||||||
|
if (defined("FAC_PDF_SOCIETE_NOM") && FAC_PDF_SOCIETE_NOM) $pdf->MultiCell(80, 4, FAC_PDF_SOCIETE_NOM, 0, 'L');
|
||||||
|
else $pdf->MultiCell(80, 4, $this->emetteur->nom, 0, 'L');
|
||||||
|
|
||||||
$pdf->SetXY($this->marge_gauche+2,$posy+3);
|
// Caractéristiques emetteur
|
||||||
|
$carac_emetteur = '';
|
||||||
|
if (defined("FAC_PDF_ADRESSE") && FAC_PDF_ADRESSE) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).FAC_PDF_ADRESSE;
|
||||||
|
else {
|
||||||
|
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$this->emetteur->adresse;
|
||||||
|
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$this->emetteur->cp.' '.$this->emetteur->ville;
|
||||||
|
}
|
||||||
|
$carac_emetteur .= "\n";
|
||||||
|
|
||||||
|
// Tel
|
||||||
|
if (defined("FAC_PDF_TEL") && FAC_PDF_TEL) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Phone").": ".FAC_PDF_TEL;
|
||||||
|
elseif ($this->emetteur->tel) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Phone").": ".$this->emetteur->tel;
|
||||||
|
|
||||||
|
// Fax
|
||||||
|
if (defined("FAC_PDF_FAX") && FAC_PDF_FAX) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Fax").": ".FAC_PDF_FAX;
|
||||||
|
elseif ($this->emetteur->fax) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Fax").": ".$this->emetteur->fax;
|
||||||
|
|
||||||
|
// EMail
|
||||||
|
if (defined("FAC_PDF_MEL") && FAC_PDF_MEL) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Email").": ".FAC_PDF_MEL;
|
||||||
|
elseif ($this->emetteur->email) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Email").": ".$this->emetteur->email;
|
||||||
|
|
||||||
|
// Web
|
||||||
|
if (defined("FAC_PDF_WWW") && FAC_PDF_WWW) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Web").": ".FAC_PDF_WWW;
|
||||||
|
elseif ($this->emetteur->url) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Web").": ".$this->emetteur->url;
|
||||||
|
|
||||||
// Nom emetteur
|
$pdf->SetFont('Arial','',9);
|
||||||
$pdf->SetTextColor(0,0,60);
|
$pdf->SetXY($this->marge_gauche+2,$posy+8);
|
||||||
$pdf->SetFont('Arial','B',11);
|
$pdf->MultiCell(80,4, $carac_emetteur);
|
||||||
if (defined("FAC_PDF_SOCIETE_NOM") && FAC_PDF_SOCIETE_NOM) $pdf->MultiCell(80, 4, FAC_PDF_SOCIETE_NOM, 0, 'L');
|
|
||||||
else $pdf->MultiCell(80, 4, $this->emetteur->nom, 0, 'L');
|
|
||||||
|
|
||||||
// Caractéristiques emetteur
|
// Client destinataire
|
||||||
$carac_emetteur = '';
|
$posy=42;
|
||||||
if (defined("FAC_PDF_ADRESSE") && FAC_PDF_ADRESSE) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).FAC_PDF_ADRESSE;
|
$pdf->SetTextColor(0,0,0);
|
||||||
else {
|
$pdf->SetFont('Arial','',8);
|
||||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$this->emetteur->adresse;
|
$pdf->SetXY(102,$posy-5);
|
||||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$this->emetteur->cp.' '.$this->emetteur->ville;
|
$pdf->MultiCell(80,5, $outputlangs->transnoentities("BillTo").":");
|
||||||
}
|
$object->fetch_client();
|
||||||
$carac_emetteur .= "\n";
|
|
||||||
// Tel
|
// Cadre client destinataire
|
||||||
if (defined("FAC_PDF_TEL") && FAC_PDF_TEL) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Phone").": ".FAC_PDF_TEL;
|
$pdf->rect(100, $posy, 100, $hautcadre);
|
||||||
elseif ($this->emetteur->tel) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Phone").": ".$this->emetteur->tel;
|
|
||||||
// Fax
|
// If CUSTOMER contact defined on invoice, we use it
|
||||||
if (defined("FAC_PDF_FAX") && FAC_PDF_FAX) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Fax").": ".FAC_PDF_FAX;
|
$usecontact=false;
|
||||||
elseif ($this->emetteur->fax) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Fax").": ".$this->emetteur->fax;
|
if ($conf->global->COMMANDE_USE_CUSTOMER_CONTACT_AS_RECIPIENT)
|
||||||
// EMail
|
{
|
||||||
if (defined("FAC_PDF_MEL") && FAC_PDF_MEL) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Email").": ".FAC_PDF_MEL;
|
$arrayidcontact=$object->getIdContact('external','CUSTOMER');
|
||||||
elseif ($this->emetteur->email) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Email").": ".$this->emetteur->email;
|
if (sizeof($arrayidcontact) > 0)
|
||||||
// Web
|
{
|
||||||
if (defined("FAC_PDF_WWW") && FAC_PDF_WWW) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Web").": ".FAC_PDF_WWW;
|
$usecontact=true;
|
||||||
elseif ($this->emetteur->url) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Web").": ".$this->emetteur->url;
|
$result=$object->fetch_contact($arrayidcontact[0]);
|
||||||
|
}
|
||||||
$pdf->SetFont('Arial','',9);
|
}
|
||||||
$pdf->SetXY($this->marge_gauche+2,$posy+8);
|
|
||||||
$pdf->MultiCell(80,4, $carac_emetteur);
|
if ($usecontact)
|
||||||
|
{
|
||||||
// Client destinataire
|
// Nom societe
|
||||||
$posy=42;
|
$pdf->SetXY(102,$posy+3);
|
||||||
$pdf->SetTextColor(0,0,0);
|
$pdf->SetFont('Arial','B',11);
|
||||||
$pdf->SetFont('Arial','',8);
|
$pdf->MultiCell(106,4, $object->client->nom, 0, 'L');
|
||||||
$pdf->SetXY(102,$posy-5);
|
$posy+=4;
|
||||||
$pdf->MultiCell(80,5, $outputlangs->transnoentities("BillTo").":");
|
|
||||||
$object->fetch_client();
|
// Nom client
|
||||||
|
$pdf->SetXY(102,$posy+4);
|
||||||
// Cadre client destinataire
|
$pdf->SetFont('Arial','',9);
|
||||||
$pdf->rect(100, $posy, 100, $hautcadre);
|
$pdf->MultiCell(106,4, $object->contact->getFullName($outputlangs,1), 0, 'L');
|
||||||
|
|
||||||
// Nom client
|
// Caractéristiques client
|
||||||
$pdf->SetXY(102,$posy+3);
|
$carac_client=$object->contact->adresse;
|
||||||
$pdf->SetFont('Arial','B',11);
|
$carac_client.="\n".$object->contact->cp . " " . $object->contact->ville."\n";
|
||||||
$pdf->MultiCell(106,4, $object->client->nom, 0, 'L');
|
if ($this->emetteur->pays_code != $object->contact->pays_code)
|
||||||
|
{
|
||||||
// Caractéristiques client
|
$carac_client.=$object->contact->pays."\n";
|
||||||
$carac_client=$object->client->adresse;
|
}
|
||||||
$carac_client.="\n".$object->client->cp . " " . $object->client->ville."\n";
|
}
|
||||||
if ($this->emetteur->pays_code != $object->client->pays_code)
|
else
|
||||||
{
|
{
|
||||||
$carac_client.=$object->client->pays."\n";
|
// Nom client
|
||||||
}
|
$pdf->SetXY(102,$posy+3);
|
||||||
if ($object->client->tva_intra) $carac_client.="\n".$outputlangs->transnoentities("VATIntraShort").': '.$object->client->tva_intra;
|
$pdf->SetFont('Arial','B',11);
|
||||||
$pdf->SetFont('Arial','',9);
|
$pdf->MultiCell(106,4, $object->client->nom, 0, 'L');
|
||||||
$pdf->SetXY(102,$posy+8);
|
|
||||||
$pdf->MultiCell(86,4, $carac_client);
|
// Nom du contact suivi commande si c'est une société
|
||||||
}
|
$arrayidcontact = $object->getIdContact('external','CUSTOMER');
|
||||||
|
if (sizeof($arrayidcontact) > 0)
|
||||||
}
|
{
|
||||||
|
$object->fetch_contact($arrayidcontact[0]);
|
||||||
|
// On vérifie si c'est une société ou un particulier
|
||||||
|
if( !preg_match('#'.$object->contact->getFullName($outputlangs,1).'#isU',$object->client->nom) )
|
||||||
|
{
|
||||||
|
$carac_client .= "\n".$object->contact->getFullName($outputlangs,1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Caractéristiques client
|
||||||
|
$carac_client.="\n".$object->client->adresse;
|
||||||
|
$carac_client.="\n".$object->client->cp . " " . $object->client->ville."\n";
|
||||||
|
if ($this->emetteur->pays_code != $object->client->pays_code) $carac_client.=$object->client->pays."\n";
|
||||||
|
}
|
||||||
|
// Numéro TVA intracom
|
||||||
|
if ($object->client->tva_intra) $carac_client.="\n".$outputlangs->transnoentities("VATIntraShort").': '.$object->client->tva_intra;
|
||||||
|
$pdf->SetFont('Arial','',9);
|
||||||
|
$pdf->SetXY(102,$posy+6);
|
||||||
|
$pdf->MultiCell(86,4, $carac_client);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* \brief Affiche le pied de page
|
* \brief Affiche le pied de page
|
||||||
|
|||||||
@ -1,23 +1,24 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
*
|
* Copyright (C) 2005-2007 Regis Houssin <regis.houssin@dolibarr.fr>
|
||||||
* This program is free software; you can redistribute it and/or modify
|
*
|
||||||
* it under the terms of the GNU General Public License as published by
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
* it under the terms of the GNU General Public License as published by
|
||||||
* (at your option) any later version.
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
*
|
* (at your option) any later version.
|
||||||
* This program is distributed in the hope that it will be useful,
|
*
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* This program is distributed in the hope that it will be useful,
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* GNU General Public License for more details.
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
*
|
* GNU General Public License for more details.
|
||||||
* You should have received a copy of the GNU General Public License
|
*
|
||||||
* along with this program; if not, write to the Free Software
|
* You should have received a copy of the GNU General Public License
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
* along with this program; if not, write to the Free Software
|
||||||
* or see http://www.gnu.org/
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*
|
* or see http://www.gnu.org/
|
||||||
* $Id$
|
*
|
||||||
*/
|
* $Id$
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\file htdocs/includes/modules/facture/pdf_crabe.modules.php
|
\file htdocs/includes/modules/facture/pdf_crabe.modules.php
|
||||||
@ -1032,10 +1033,6 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
{
|
{
|
||||||
$carac_client.=$object->contact->pays."\n";
|
$carac_client.=$object->contact->pays."\n";
|
||||||
}
|
}
|
||||||
if ($object->client->tva_intra) $carac_client.="\n".$outputlangs->transnoentities("VATIntraShort").': '.$object->client->tva_intra;
|
|
||||||
$pdf->SetFont('Arial','',9);
|
|
||||||
$pdf->SetXY(102,$posy+8);
|
|
||||||
$pdf->MultiCell(86,4, $carac_client);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1043,22 +1040,33 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$pdf->SetXY(102,$posy+3);
|
$pdf->SetXY(102,$posy+3);
|
||||||
$pdf->SetFont('Arial','B',11);
|
$pdf->SetFont('Arial','B',11);
|
||||||
$pdf->MultiCell(106,4, $object->client->nom, 0, 'L');
|
$pdf->MultiCell(106,4, $object->client->nom, 0, 'L');
|
||||||
|
|
||||||
|
// Nom du contact facturation si c'est une société
|
||||||
|
$arrayidcontact = $object->getIdContact('external','BILLING');
|
||||||
|
if (sizeof($arrayidcontact) > 0)
|
||||||
|
{
|
||||||
|
$object->fetch_contact($arrayidcontact[0]);
|
||||||
|
// On vérifie si c'est une société ou un particulier
|
||||||
|
if( !preg_match('#'.$object->contact->getFullName($outputlangs,1).'#isU',$object->client->nom) )
|
||||||
|
{
|
||||||
|
$carac_client .= "\n".$object->contact->getFullName($outputlangs,1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Caractéristiques client
|
// Caractéristiques client
|
||||||
$carac_client=$object->client->adresse;
|
$carac_client.="\n".$object->client->adresse;
|
||||||
$carac_client.="\n".$object->client->cp . " " . $object->client->ville."\n";
|
$carac_client.="\n".$object->client->cp . " " . $object->client->ville."\n";
|
||||||
if ($this->emetteur->pays_code != $object->client->pays_code)
|
if ($this->emetteur->pays_code != $object->client->pays_code)
|
||||||
{
|
{
|
||||||
$carac_client.=$object->client->pays."\n";
|
$carac_client.=$object->client->pays."\n";
|
||||||
}
|
}
|
||||||
if ($object->client->tva_intra) $carac_client.="\n".$outputlangs->transnoentities("VATIntraShort").': '.$object->client->tva_intra;
|
|
||||||
$pdf->SetFont('Arial','',9);
|
|
||||||
$pdf->SetXY(102,$posy+8);
|
|
||||||
$pdf->MultiCell(86,4, $carac_client);
|
|
||||||
}
|
}
|
||||||
}
|
if ($object->client->tva_intra) $carac_client.="\n".$outputlangs->transnoentities("VATIntraShort").': '.$object->client->tva_intra;
|
||||||
|
$pdf->SetFont('Arial','',9);
|
||||||
}
|
$pdf->SetXY(102,$posy+6);
|
||||||
|
$pdf->MultiCell(86,4, $carac_client);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* \brief Affiche le pied de page
|
* \brief Affiche le pied de page
|
||||||
|
|||||||
@ -1,23 +1,24 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
*
|
* Copyright (C) 2005-2007 Regis Houssin <regis@dolibarr.fr>
|
||||||
* This program is free software; you can redistribute it and/or modify
|
*
|
||||||
* it under the terms of the GNU General Public License as published by
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
* it under the terms of the GNU General Public License as published by
|
||||||
* (at your option) any later version.
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
*
|
* (at your option) any later version.
|
||||||
* This program is distributed in the hope that it will be useful,
|
*
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* This program is distributed in the hope that it will be useful,
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* GNU General Public License for more details.
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
*
|
* GNU General Public License for more details.
|
||||||
* You should have received a copy of the GNU General Public License
|
*
|
||||||
* along with this program; if not, write to the Free Software
|
* You should have received a copy of the GNU General Public License
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
* along with this program; if not, write to the Free Software
|
||||||
* or see http://www.gnu.org/
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*
|
* or see http://www.gnu.org/
|
||||||
* $Id$
|
*
|
||||||
*/
|
* $Id$
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\file htdocs/includes/modules/propale/pdf_propale_azur.modules.php
|
\file htdocs/includes/modules/propale/pdf_propale_azur.modules.php
|
||||||
@ -907,33 +908,40 @@ class pdf_propale_azur extends ModelePDFPropales
|
|||||||
{
|
{
|
||||||
$carac_client.=$object->contact->pays."\n";
|
$carac_client.=$object->contact->pays."\n";
|
||||||
}
|
}
|
||||||
if ($object->client->tva_intra) $carac_client.="\n".$outputlangs->transnoentities("VATIntraShort").': '.$object->client->tva_intra;
|
|
||||||
$pdf->SetFont('Arial','',9);
|
|
||||||
$pdf->SetXY(102,$posy+8);
|
|
||||||
$pdf->MultiCell(86,4, $carac_client);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Nom client
|
// Nom client
|
||||||
$pdf->SetXY(102,$posy+3);
|
$pdf->SetXY(102,$posy+3);
|
||||||
$pdf->SetFont('Arial','B',11);
|
$pdf->SetFont('Arial','B',11);
|
||||||
$pdf->MultiCell(106,4, $object->client->nom, 0, 'L');
|
$pdf->MultiCell(106,4, $object->client->nom, 0, 'L');
|
||||||
|
|
||||||
|
// Nom du contact suivi propal si c'est une société
|
||||||
|
$arrayidcontact = $object->getIdContact('external','CUSTOMER');
|
||||||
|
if (sizeof($arrayidcontact) > 0)
|
||||||
|
{
|
||||||
|
$object->fetch_contact($arrayidcontact[0]);
|
||||||
|
// On vérifie si c'est une société ou un particulier
|
||||||
|
if( !preg_match('#'.$object->contact->getFullName($outputlangs,1).'#isU',$object->client->nom) )
|
||||||
|
{
|
||||||
|
$carac_client .= "\n".$object->contact->getFullName($outputlangs,1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Caractéristiques client
|
// Caractéristiques client
|
||||||
$carac_client=$object->client->adresse;
|
$carac_client.="\n".$object->client->adresse;
|
||||||
$carac_client.="\n".$object->client->cp . " " . $object->client->ville."\n";
|
$carac_client.="\n".$object->client->cp . " " . $object->client->ville."\n";
|
||||||
if ($this->emetteur->pays_code != $object->client->pays_code)
|
if ($this->emetteur->pays_code != $object->client->pays_code)
|
||||||
{
|
{
|
||||||
$carac_client.=$object->client->pays."\n";
|
$carac_client.=$object->client->pays."\n";
|
||||||
}
|
}
|
||||||
if ($object->client->tva_intra) $carac_client.="\n".$outputlangs->transnoentities("VATIntraShort").': '.$object->client->tva_intra;
|
|
||||||
$pdf->SetFont('Arial','',9);
|
|
||||||
$pdf->SetXY(102,$posy+8);
|
|
||||||
$pdf->MultiCell(86,4, $carac_client);
|
|
||||||
}
|
}
|
||||||
}
|
if ($object->client->tva_intra) $carac_client.="\n".$outputlangs->transnoentities("VATIntraShort").': '.$object->client->tva_intra;
|
||||||
|
$pdf->SetFont('Arial','',9);
|
||||||
}
|
$pdf->SetXY(102,$posy+6);
|
||||||
|
$pdf->MultiCell(86,4, $carac_client);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* \brief Affiche le pied de page
|
* \brief Affiche le pied de page
|
||||||
|
|||||||
@ -94,6 +94,8 @@ Error_COMMANDE_SUPPLIER_ADDON_NotDefined=Constant COMMANDE_SUPPLIER_ADDON not de
|
|||||||
Error_COMMANDE_ADDON_NotDefined=Constant COMMANDE_ADDON not defined
|
Error_COMMANDE_ADDON_NotDefined=Constant COMMANDE_ADDON not defined
|
||||||
Error_FailedToLoad_COMMANDE_SUPPLIER_ADDON_File=Failed to load module file '%s'
|
Error_FailedToLoad_COMMANDE_SUPPLIER_ADDON_File=Failed to load module file '%s'
|
||||||
Error_FailedToLoad_COMMANDE_ADDON_File=Failed to load module file '%s'
|
Error_FailedToLoad_COMMANDE_ADDON_File=Failed to load module file '%s'
|
||||||
|
UseCustomerContactAsOrderRecipientIfExist=Use customer contact address if defined instead of third party address as order recipient address
|
||||||
|
|
||||||
# Sources
|
# Sources
|
||||||
OrderSource0=Commercial proposal
|
OrderSource0=Commercial proposal
|
||||||
OrderSource1=Internet
|
OrderSource1=Internet
|
||||||
|
|||||||
@ -74,7 +74,7 @@ SetDateLivraison=Set shipping date
|
|||||||
CopyPropalFrom=Create commercial proposal by copying existing proposal
|
CopyPropalFrom=Create commercial proposal by copying existing proposal
|
||||||
CreateEmptyPropal=Create empty commercial proposals vierge or from list of products/services
|
CreateEmptyPropal=Create empty commercial proposals vierge or from list of products/services
|
||||||
DefaultProposalDurationValidity=Default commercial proposal validity duration (in days)
|
DefaultProposalDurationValidity=Default commercial proposal validity duration (in days)
|
||||||
UseCustomerContactAsPropalRecipientIfExist=Use customer contact adress if defined instead of third party address as proposal recipient address
|
UseCustomerContactAsPropalRecipientIfExist=Use customer contact address if defined instead of third party address as proposal recipient address
|
||||||
|
|
||||||
# azur PDF Model
|
# azur PDF Model
|
||||||
PDFAzurDescription=A complete proposal model (logo...)
|
PDFAzurDescription=A complete proposal model (logo...)
|
||||||
|
|||||||
@ -94,6 +94,8 @@ Error_COMMANDE_SUPPLIER_ADDON_NotDefined=Constante COMMANDE_SUPPLIER_ADDON non d
|
|||||||
Error_COMMANDE_ADDON_NotDefined=Constante COMMANDE_ADDON non définie
|
Error_COMMANDE_ADDON_NotDefined=Constante COMMANDE_ADDON non définie
|
||||||
Error_FailedToLoad_COMMANDE_SUPPLIER_ADDON_File=Echec chargement du fichier module '%s'
|
Error_FailedToLoad_COMMANDE_SUPPLIER_ADDON_File=Echec chargement du fichier module '%s'
|
||||||
Error_FailedToLoad_COMMANDE_ADDON_File=Echec chargement du fichier module '%s'
|
Error_FailedToLoad_COMMANDE_ADDON_File=Echec chargement du fichier module '%s'
|
||||||
|
UseCustomerContactAsOrderRecipientIfExist=Utiliser adresse contact suivi client si défini plutot que adresse tiers comme destinataire des commandes
|
||||||
|
|
||||||
# Sources
|
# Sources
|
||||||
OrderSource0=Proposition commerciale
|
OrderSource0=Proposition commerciale
|
||||||
OrderSource1=Internet
|
OrderSource1=Internet
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user