If there is a commercial contact, use its name in proposal
This commit is contained in:
parent
d7291bc655
commit
ba175ce7f4
@ -71,7 +71,6 @@ 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 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;
|
||||||
|
|||||||
@ -501,7 +501,7 @@ class pdf_propale_azur extends ModelePDFPropales
|
|||||||
|
|
||||||
$pdf->SetXY($this->marge_gauche, $posy);
|
$pdf->SetXY($this->marge_gauche, $posy);
|
||||||
$pdf->SetFont('Arial','B',8);
|
$pdf->SetFont('Arial','B',8);
|
||||||
$pdf->MultiCell(90, 3, $outputlangs->transnoentities('PaymentByChequeOrderedTo',$outputlangs->convToOutputCharset($account->proprio)).':',0,'L',0);
|
$pdf->MultiCell(90, 3, $outputlangs->transnoentities('PaymentByChequeOrderedTo',$account->proprio).':',0,'L',0);
|
||||||
$posy=$pdf->GetY()+1;
|
$posy=$pdf->GetY()+1;
|
||||||
|
|
||||||
$pdf->SetXY($this->marge_gauche, $posy);
|
$pdf->SetXY($this->marge_gauche, $posy);
|
||||||
@ -828,17 +828,24 @@ class pdf_propale_azur extends ModelePDFPropales
|
|||||||
|
|
||||||
$pdf->SetXY($this->marge_gauche+2,$posy+3);
|
$pdf->SetXY($this->marge_gauche+2,$posy+3);
|
||||||
|
|
||||||
// Customer name
|
// Sender name
|
||||||
$pdf->SetTextColor(0,0,60);
|
$pdf->SetTextColor(0,0,60);
|
||||||
$pdf->SetFont('Arial','B',11);
|
$pdf->SetFont('Arial','B',11);
|
||||||
$pdf->MultiCell(80, 4, $outputlangs->convToOutputCharset($this->emetteur->nom), 0, 'L');
|
$pdf->MultiCell(80, 3, $outputlangs->convToOutputCharset($this->emetteur->nom), 0, 'L');
|
||||||
|
|
||||||
// Customer properties
|
// Sended properties
|
||||||
$carac_emetteur = '';
|
$carac_emetteur = '';
|
||||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->adresse);
|
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->adresse);
|
||||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->cp).' '.$outputlangs->convToOutputCharset($this->emetteur->ville);
|
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->cp).' '.$outputlangs->convToOutputCharset($this->emetteur->ville);
|
||||||
$carac_emetteur .= "\n";
|
$carac_emetteur .= "\n";
|
||||||
// Tel
|
// Add internal contact of proposal if defined
|
||||||
|
$arrayidcontact=$object->getIdContact('internal','SALESREPFOLL');
|
||||||
|
if (sizeof($arrayidcontact) > 0)
|
||||||
|
{
|
||||||
|
$object->fetch_user($arrayidcontact[0]);
|
||||||
|
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Name").": ".$outputlangs->convToOutputCharset($object->user->fullname);
|
||||||
|
}
|
||||||
|
// Tel
|
||||||
if ($this->emetteur->tel) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Phone").": ".$outputlangs->convToOutputCharset($this->emetteur->tel);
|
if ($this->emetteur->tel) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Phone").": ".$outputlangs->convToOutputCharset($this->emetteur->tel);
|
||||||
// Fax
|
// Fax
|
||||||
if ($this->emetteur->fax) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Fax").": ".$outputlangs->convToOutputCharset($this->emetteur->fax);
|
if ($this->emetteur->fax) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Fax").": ".$outputlangs->convToOutputCharset($this->emetteur->fax);
|
||||||
@ -849,14 +856,14 @@ class pdf_propale_azur extends ModelePDFPropales
|
|||||||
|
|
||||||
$pdf->SetFont('Arial','',9);
|
$pdf->SetFont('Arial','',9);
|
||||||
$pdf->SetXY($this->marge_gauche+2,$posy+8);
|
$pdf->SetXY($this->marge_gauche+2,$posy+8);
|
||||||
$pdf->MultiCell(80,4, $carac_emetteur);
|
$pdf->MultiCell(80,3, $carac_emetteur);
|
||||||
|
|
||||||
// Client destinataire
|
// Client destinataire
|
||||||
$posy=42;
|
$posy=42;
|
||||||
$pdf->SetTextColor(0,0,0);
|
$pdf->SetTextColor(0,0,0);
|
||||||
$pdf->SetFont('Arial','',8);
|
$pdf->SetFont('Arial','',8);
|
||||||
$pdf->SetXY(102,$posy-5);
|
$pdf->SetXY(102,$posy-5);
|
||||||
$pdf->MultiCell(80,5, $outputlangs->transnoentities("BillTo").":");
|
$pdf->MultiCell(80,4, $outputlangs->transnoentities("BillTo").":");
|
||||||
$object->fetch_client();
|
$object->fetch_client();
|
||||||
|
|
||||||
// Cadre client destinataire
|
// Cadre client destinataire
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.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
|
||||||
@ -172,7 +172,7 @@ class pdf_propale_jaune extends ModelePDFPropales
|
|||||||
// New page
|
// New page
|
||||||
$pdf->AddPage();
|
$pdf->AddPage();
|
||||||
$pagenb++;
|
$pagenb++;
|
||||||
$this->_pagehead($pdf, $propale, $outputlangs);
|
$this->_pagehead($pdf, $propale, 1, $outputlangs);
|
||||||
$pdf->SetFont('Arial','', 9);
|
$pdf->SetFont('Arial','', 9);
|
||||||
$pdf->MultiCell(0, 4, '', 0, 'J'); // Set interline to 3
|
$pdf->MultiCell(0, 4, '', 0, 'J'); // Set interline to 3
|
||||||
$pdf->SetTextColor(0,0,0);
|
$pdf->SetTextColor(0,0,0);
|
||||||
@ -246,7 +246,7 @@ class pdf_propale_jaune extends ModelePDFPropales
|
|||||||
// New page
|
// New page
|
||||||
$pdf->AddPage();
|
$pdf->AddPage();
|
||||||
$pagenb++;
|
$pagenb++;
|
||||||
$this->_pagehead($pdf, $propale, $outputlangs);
|
$this->_pagehead($pdf, $propale, 0, $outputlangs);
|
||||||
$pdf->SetFont('Arial','', 9);
|
$pdf->SetFont('Arial','', 9);
|
||||||
$pdf->MultiCell(0, 4, '', 0, 'J'); // Set interline to 3
|
$pdf->MultiCell(0, 4, '', 0, 'J'); // Set interline to 3
|
||||||
$pdf->SetTextColor(0,0,0);
|
$pdf->SetTextColor(0,0,0);
|
||||||
@ -343,12 +343,12 @@ class pdf_propale_jaune extends ModelePDFPropales
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function _pagehead(&$pdf, $propale, $outputlangs)
|
function _pagehead(&$pdf, $object, $showadress=1, $outputlangs)
|
||||||
{
|
{
|
||||||
global $conf,$langs;
|
global $conf,$langs;
|
||||||
|
|
||||||
//Affiche le filigrane brouillon - Print Draft Watermark
|
//Affiche le filigrane brouillon - Print Draft Watermark
|
||||||
if($propale->statut==0 && defined("PROPALE_DRAFT_WATERMARK") )
|
if($object->statut==0 && defined("PROPALE_DRAFT_WATERMARK") )
|
||||||
{
|
{
|
||||||
$watermark_angle=deg2rad(55);
|
$watermark_angle=deg2rad(55);
|
||||||
$watermark_x=5;
|
$watermark_x=5;
|
||||||
@ -365,13 +365,27 @@ class pdf_propale_jaune extends ModelePDFPropales
|
|||||||
$pdf->_out('Q');
|
$pdf->_out('Q');
|
||||||
}
|
}
|
||||||
|
|
||||||
$pdf->SetTextColor(0,0,0);
|
$posy=42;
|
||||||
|
|
||||||
// Caracteristiques emetteur
|
$pdf->SetXY($this->marge_gauche+2,$posy);
|
||||||
|
|
||||||
|
// Sender name
|
||||||
|
$pdf->SetTextColor(0,0,00);
|
||||||
|
$pdf->SetFont('Arial','B',11);
|
||||||
|
$pdf->MultiCell(80, 3, $outputlangs->convToOutputCharset($this->emetteur->nom), 0, 'L');
|
||||||
|
|
||||||
|
// Sender properties
|
||||||
$carac_emetteur = '';
|
$carac_emetteur = '';
|
||||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->adresse);
|
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->adresse);
|
||||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->cp).' '.$outputlangs->convToOutputCharset($this->emetteur->ville);
|
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->cp).' '.$outputlangs->convToOutputCharset($this->emetteur->ville);
|
||||||
$carac_emetteur .= "\n";
|
$carac_emetteur .= "\n";
|
||||||
|
// Add internal contact of proposal if defined
|
||||||
|
$arrayidcontact=$object->getIdContact('internal','SALESREPFOLL');
|
||||||
|
if (sizeof($arrayidcontact) > 0)
|
||||||
|
{
|
||||||
|
$object->fetch_user($arrayidcontact[0]);
|
||||||
|
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Name").": ".$outputlangs->convToOutputCharset($object->user->fullname);
|
||||||
|
}
|
||||||
// Tel
|
// Tel
|
||||||
if ($this->emetteur->tel) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Phone").": ".$outputlangs->convToOutputCharset($this->emetteur->tel);
|
if ($this->emetteur->tel) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Phone").": ".$outputlangs->convToOutputCharset($this->emetteur->tel);
|
||||||
// Fax
|
// Fax
|
||||||
@ -382,7 +396,7 @@ class pdf_propale_jaune extends ModelePDFPropales
|
|||||||
if ($this->emetteur->url) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Web").": ".$outputlangs->convToOutputCharset($this->emetteur->url);
|
if ($this->emetteur->url) $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Web").": ".$outputlangs->convToOutputCharset($this->emetteur->url);
|
||||||
|
|
||||||
$pdf->SetFont('Arial','',9);
|
$pdf->SetFont('Arial','',9);
|
||||||
$pdf->SetXY(12,42);
|
$pdf->SetXY($this->marge_gauche+2,$posy+4);
|
||||||
$pdf->MultiCell(80,3, $carac_emetteur);
|
$pdf->MultiCell(80,3, $carac_emetteur);
|
||||||
|
|
||||||
|
|
||||||
@ -403,14 +417,13 @@ class pdf_propale_jaune extends ModelePDFPropales
|
|||||||
$pdf->rect(110, 90, 90, 10);
|
$pdf->rect(110, 90, 90, 10);
|
||||||
|
|
||||||
$pdf->SetXY(10,90);
|
$pdf->SetXY(10,90);
|
||||||
$pdf->MultiCell(110, 10, $outputlangs->transnoentities("Ref")." : ".$outputlangs->convToOutputCharset($propale->ref));
|
$pdf->MultiCell(110, 10, $outputlangs->transnoentities("Ref")." : ".$outputlangs->convToOutputCharset($object->ref));
|
||||||
$pdf->SetXY(110,90);
|
$pdf->SetXY(110,90);
|
||||||
$pdf->MultiCell(100, 10, $outputlangs->transnoentities("Date")." : " . dol_print_date($propale->date,'day',false,$outputlangs,true));
|
$pdf->MultiCell(100, 10, $outputlangs->transnoentities("Date")." : " . dol_print_date($object->date,'day',false,$outputlangs,true));
|
||||||
|
|
||||||
|
|
||||||
$posy=39;
|
$posy=39;
|
||||||
|
|
||||||
$object=$propale;
|
|
||||||
$object->fetch_client();
|
$object->fetch_client();
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -357,60 +357,6 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||||||
$pdf->SetTextColor(0,0,0);
|
$pdf->SetTextColor(0,0,0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Propose mode r<EFBFBD>glement par CHQ
|
|
||||||
*/
|
|
||||||
/*
|
|
||||||
if (defined("FACTURE_CHQ_NUMBER"))
|
|
||||||
{
|
|
||||||
if (FACTURE_CHQ_NUMBER > 0)
|
|
||||||
{
|
|
||||||
$account = new Account($this->db);
|
|
||||||
$account->fetch(FACTURE_CHQ_NUMBER);
|
|
||||||
|
|
||||||
$pdf->SetXY ($this->marge_gauche, 227);
|
|
||||||
$pdf->SetFont('Arial','B',8);
|
|
||||||
$pdf->MultiCell(90, 3, "R<EFBFBD>glement par ch<63>que <20> l'ordre de ".$account->proprio." envoy<6F> <20>:",0,'L',0);
|
|
||||||
$pdf->SetXY ($this->marge_gauche, 231);
|
|
||||||
$pdf->SetFont('Arial','',8);
|
|
||||||
$pdf->MultiCell(80, 3, $account->adresse_proprio, 0, 'L', 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Propose mode reglement par RIB
|
|
||||||
*/
|
|
||||||
/*
|
|
||||||
if (defined("FACTURE_RIB_NUMBER"))
|
|
||||||
{
|
|
||||||
if (FACTURE_RIB_NUMBER > 0)
|
|
||||||
{
|
|
||||||
$account = new Account($this->db);
|
|
||||||
$account->fetch(FACTURE_RIB_NUMBER);
|
|
||||||
|
|
||||||
$curx=$this->marge_gauche;
|
|
||||||
$cury=242;
|
|
||||||
|
|
||||||
pdf_bank($pdf,$outputlangs,$curx,$cury,$account);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Conditions de r<EFBFBD>glements
|
|
||||||
*/
|
|
||||||
/* Pour l'instant les conditions de r<>glement ne sont pas g<>r<EFBFBD>es sur les propales */
|
|
||||||
/*
|
|
||||||
$pdf->SetFont('Arial','B',10);
|
|
||||||
$pdf->SetXY($this->marge_gauche, 217);
|
|
||||||
$titre = "Conditions de r<>glement:";
|
|
||||||
$pdf->MultiCell(80, 5, $titre, 0, 'L');
|
|
||||||
$pdf->SetFont('Arial','',10);
|
|
||||||
$pdf->SetXY(54, 217);
|
|
||||||
$pdf->MultiCell(80, 5, $prop->cond_reglement_facture,0,'L');
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Pied de page
|
* Pied de page
|
||||||
*/
|
*/
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user