[Task #7349] Patch + Correction mise en page adresse contact sur PDF

This commit is contained in:
Laurent Destailleur 2008-06-09 18:55:24 +00:00
parent 5d8d2ff274
commit 394b3375a1
14 changed files with 298 additions and 22 deletions

View File

@ -5,6 +5,7 @@
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
* Copyright (C) 2004 Andre Cianfarani <acianfa@free.fr>
* Copyright (C) 2005-2007 Regis Houssin <regis.houssin@dolibarr.fr>
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.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
@ -131,6 +132,11 @@ if ($_GET["action"] == 'setmod')
dolibarr_set_const($db, "COMMANDE_ADDON",$_GET["value"]);
}
if ($_POST["action"] == 'set_COMMANDE_DRAFT_WATERMARK')
{
dolibarr_set_const($db, "COMMANDE_DRAFT_WATERMARK",trim($_POST["COMMANDE_DRAFT_WATERMARK"]));
}
if ($_POST["action"] == 'set_COMMANDE_FREE_TEXT')
{
dolibarr_set_const($db, "COMMANDE_FREE_TEXT",trim($_POST["COMMANDE_FREE_TEXT"]));
@ -354,6 +360,11 @@ while (($file = readdir($handle))!==false)
$htmltooltip.='<br><b>'.$langs->trans("PaymentMode").'</b>: '.yn($module->option_modereg);
$htmltooltip.='<br><b>'.$langs->trans("PaymentConditions").'</b>: '.yn($module->option_condreg);
$htmltooltip.='<br><b>'.$langs->trans("MultiLanguage").'</b>: '.yn($module->option_multilang);
// \TODO : $htmltooltip.='<br><b>'.$langs->trans("Escompte").'</b>: '.yn($module->option_escompte);
$htmltooltip.='<br><b>'.$langs->trans("CreditNote").'</b>: '.yn($module->option_credit_note);
$htmltooltip.='<br><b>'.$langs->trans("FreeLegalTextOnOrders").'</b>: '.yn($module->option_freetext);
$htmltooltip.='<br><b>'.$langs->trans("WatermarkOnDraftOrders").'</b>: '.yn($module->option_draft_watermark);
print '<td align="center">';
print $html->textwithhelp('',$htmltooltip,1,0);
print '</td>';
@ -425,6 +436,18 @@ print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">'
print "</td></tr>\n";
print '</form>';
//Use draft Watermark
$var=!$var;
print "<form method=\"post\" action=\"".$_SERVER["PHP_SELF"]."\">";
print "<input type=\"hidden\" name=\"action\" value=\"set_COMMANDE_DRAFT_WATERMARK\">";
print '<tr '.$bc[$var].'><td colspan="2">';
print $langs->trans("WatermarkOnDraftOrders").'<br>';
print '<input size="50" class="flat" type="text" name="COMMANDE_DRAFT_WATERMARK" value="'.$conf->global->COMMANDE_DRAFT_WATERMARK.'">';
print '</td><td align="right">';
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
print "</td></tr>\n";
print '</form>';
print '</table>';
print '<br>';

View File

@ -3,6 +3,7 @@
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005 Eric Seigne <eric.seigne@ryxeo.com>
* Copyright (C) 2005-2007 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.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
@ -145,6 +146,11 @@ if ($_POST["action"] == 'setribchq')
dolibarr_set_const($db, "FACTURE_CHQ_NUMBER",$_POST["chq"]);
}
if ($_POST["action"] == 'set_FACTURE_DRAFT_WATERMARK')
{
dolibarr_set_const($db, "FACTURE_DRAFT_WATERMARK",trim($_POST["FACTURE_DRAFT_WATERMARK"]));
}
if ($_POST["action"] == 'set_FACTURE_FREE_TEXT')
{
dolibarr_set_const($db, "FACTURE_FREE_TEXT",trim($_POST["FACTURE_FREE_TEXT"]));
@ -427,6 +433,12 @@ while (($file = readdir($handle))!==false)
$htmltooltip.='<br><b>'.$langs->trans("Escompte").'</b>: '.yn($module->option_escompte,1,1);
$htmltooltip.='<br><b>'.$langs->trans("CreditNote").'</b>: '.yn($module->option_credit_note,1,1);
$htmltooltip.='<br><b>'.$langs->trans("MultiLanguage").'</b>: '.yn($module->option_multilang,1,1);
//TODO : $htmltooltip.='<br><b>'.$langs->trans("Escompte").'</b>: '.yn($module->option_escompte);
$htmltooltip.='<br><b>'.$langs->trans("CreditNote").'</b>: '.yn($module->option_credit_note);
$htmltooltip.='<br><b>'.$langs->trans("FreeLegalTextOnInvoices").'</b>: '.yn($module->option_freetext);
$htmltooltip.='<br><b>'.$langs->trans("WatermarkOnDraftInvoices").'</b>: '.yn($module->option_draft_watermark);
print '<td align="center">';
print $html->textwithhelp('',$htmltooltip,1,0);
print '</td>';
@ -608,6 +620,17 @@ print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">'
print "</td></tr>\n";
print '</form>';
$var=!$var;
print "<form method=\"post\" action=\"".$_SERVER["PHP_SELF"]."\">";
print "<input type=\"hidden\" name=\"action\" value=\"set_FACTURE_DRAFT_WATERMARK\">";
print '<tr '.$bc[$var].'><td colspan="2">';
print $langs->trans("WatermarkOnDraftBill").'<br>';
print '<input size="50" class="flat" type="text" name="FACTURE_DRAFT_WATERMARK" value="'.$conf->global->FACTURE_DRAFT_WATERMARK.'">';
print '</td><td align="right">';
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
print "</td></tr>\n";
print '</form>';
print '</table>';

View File

@ -4,6 +4,7 @@
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
* Copyright (C) 2005-2007 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.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
@ -50,6 +51,11 @@ if ($_POST["action"] == 'updateMask')
if ($maskconst) dolibarr_set_const($db,$maskconst,$maskvalue);
}
if ($_POST["action"] == 'set_FICHINTER_DRAFT_WATERMARK')
{
dolibarr_set_const($db, "FICHINTER_DRAFT_WATERMARK",trim($_POST["FICHINTER_DRAFT_WATERMARK"]));
}
if ($_GET["action"] == 'specimen')
{
$modele=$_GET["module"];
@ -327,6 +333,10 @@ while (($file = readdir($handle))!==false)
$htmltooltip.='<br><b>'.$langs->trans("Height").'</b>: '.$module->page_hauteur;
$htmltooltip.='<br><br>'.$langs->trans("FeaturesSupported").':';
$htmltooltip.='<br><b>'.$langs->trans("Logo").'</b>: '.yn($module->option_logo);
$htmltooltip.='<br><b>'.$langs->trans("PaymentMode").'</b>: '.yn($module->option_modereg);
$htmltooltip.='<br><b>'.$langs->trans("PaymentConditions").'</b>: '.yn($module->option_condreg);
$htmltooltip.='<br><b>'.$langs->trans("MultiLanguage").'</b>: '.yn($module->option_multilang);
$htmltooltip.='<br><b>'.$langs->trans("WatermarkOnDraftOrders").'</b>: '.yn($module->option_draft_watermark);
print '<td align="center">';
print $html->textwithhelp('',$htmltooltip,1,0);
print '</td>';
@ -341,6 +351,34 @@ closedir($handle);
print '</table>';
//Autres Options
print "<br>";
print_titre($langs->trans("OtherOptions"));
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Parameter").'</td>';
print '<td align="center" width="60">'.$langs->trans("Value").'</td>';
print "<td>&nbsp;</td>\n";
print "</tr>\n";
$var=true;
//Use draft Watermark
$var=!$var;
print "<form method=\"post\" action=\"".$_SERVER["PHP_SELF"]."\">";
print "<input type=\"hidden\" name=\"action\" value=\"set_FICHINTER_DRAFT_WATERMARK\">";
print '<tr '.$bc[$var].'><td colspan="2">';
print $langs->trans("WatermarkOnDraftInterventionCards").'<br>';
print '<input size="50" class="flat" type="text" name="FICHINTER_DRAFT_WATERMARK" value="'.$conf->global->FICHINTER_DRAFT_WATERMARK.'">';
print '</td><td align="right">';
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
print "</td></tr>\n";
print '</form>';
print '</table>';
print '<br>';
$db->close();

View File

@ -5,6 +5,7 @@
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
* Copyright (C) 2005-2007 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.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
@ -77,6 +78,11 @@ if ($_GET["action"] == 'specimen')
}
}
if ($_POST["action"] == 'set_PROPALE_DRAFT_WATERMARK')
{
dolibarr_set_const($db, "PROPALE_DRAFT_WATERMARK",trim($_POST["PROPALE_DRAFT_WATERMARK"]));
}
if ($_POST["action"] == 'set_PROPALE_FREE_TEXT')
{
dolibarr_set_const($db, "PROPALE_FREE_TEXT",trim($_POST["PROPALE_FREE_TEXT"]));
@ -378,6 +384,13 @@ while (($file = readdir($handle))!==false)
$htmltooltip.='<br><b>'.$langs->trans("PaymentMode").'</b>: '.yn($module->option_modereg);
$htmltooltip.='<br><b>'.$langs->trans("PaymentConditions").'</b>: '.yn($module->option_condreg);
$htmltooltip.='<br><b>'.$langs->trans("MultiLanguage").'</b>: '.yn($module->option_multilang);
//TODO : $htmltooltip.='<br><b>'.$langs->trans("Escompte").'</b>: '.yn($module->option_escompte);
$htmltooltip.='<br><b>'.$langs->trans("CreditNote").'</b>: '.yn($module->option_credit_note);
$htmltooltip.='<br><b>'.$langs->trans("FreeLegalTextOnProposal").'</b>: '.yn($module->option_freetext);
$htmltooltip.='<br><b>'.$langs->trans("WatermarkOnDraftProposal").'</b>: '.yn($module->option_draft_watermark);
print '<td align="center">';
print $html->textwithhelp('',$htmltooltip,1,0);
print '</td>';
@ -488,6 +501,17 @@ print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">'
print "</td></tr>\n";
print '</form>';
$var=!$var;
print "<form method=\"post\" action=\"".$_SERVER["PHP_SELF"]."\">";
print "<input type=\"hidden\" name=\"action\" value=\"set_PROPALE_DRAFT_WATERMARK\">";
print '<tr '.$bc[$var].'><td colspan="2">';
print $langs->trans("WatermarkOnDraftProposal").'<br>';
print '<input size="50" class="flat" type="text" name="PROPALE_DRAFT_WATERMARK" value="'.$conf->global->PROPALE_DRAFT_WATERMARK.'">';
print '</td><td align="right">';
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
print "</td></tr>\n";
print '</form>';
print '</table>';

View File

@ -1,6 +1,7 @@
<?php
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.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
@ -55,6 +56,7 @@ class pdf_edison extends ModelePDFCommandes
$this->format = array($this->page_largeur,$this->page_hauteur);
$this->option_multilang = 0; // Dispo en plusieurs langues
$this->option_draft_watermark = 1; //Support add of a watermark on drafts
$this->error = "";
}
@ -309,9 +311,28 @@ class pdf_edison extends ModelePDFCommandes
function _pagehead(&$pdf, $com)
{
global $langs,$mysoc;
global $conf,$langs,$mysoc;
$langs->load("orders");
//Affiche le filigrane brouillon - Print Draft Watermark
if($com->statut==0 && (! empty($conf->global->COMMANDE_DRAFT_WATERMARK)) )
{
$watermark_angle=atan($this->page_hauteur/$this->page_largeur);
$watermark_x=5;
$watermark_y=$this->page_hauteur-25; //Set to $this->page_hauteur-50 or less if problems
$watermark_width=$this->page_hauteur;
$pdf->SetFont('Arial','B',50);
$pdf->SetTextColor(255,192,203);
//rotate
$pdf->_out(sprintf('q %.5F %.5F %.5F %.5F %.2F %.2F cm 1 0 0 1 %.2F %.2F cm',cos($watermark_angle),sin($watermark_angle),-sin($watermark_angle),cos($watermark_angle),$watermark_x*$pdf->k,($pdf->h-$watermark_y)*$pdf->k,-$watermark_x*$pdf->k,-($pdf->h-$watermark_y)*$pdf->k));
//print watermark
$pdf->SetXY($watermark_x,$watermark_y);
$pdf->Cell($watermark_width,25,clean_html($conf->global->COMMANDE_DRAFT_WATERMARK),0,2,"C",0);
//antirotate
$pdf->_out('Q');
}
//Print content
$pdf->SetXY(10,8);
if (defined("MAIN_INFO_SOCIETE_NOM"))
{

View File

@ -1,6 +1,7 @@
<?php
/* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2007 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.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
@ -75,6 +76,7 @@ class pdf_einstein extends ModelePDFCommandes
$this->option_escompte = 1; // Affiche si il y a eu escompte
$this->option_credit_note = 1; // Gère les avoirs
$this->option_freetext = 1; // Support add of a personalised text
$this->option_draft_watermark = 1; //Support add of a watermark on drafts
if (defined("FACTURE_TVAOPTION") && FACTURE_TVAOPTION == 'franchise')
$this->franchise=1;
@ -762,6 +764,25 @@ class pdf_einstein extends ModelePDFCommandes
$outputlangs->load("propal");
$outputlangs->load("companies");
//Affiche le filigrane brouillon - Print Draft Watermark
if($object->statut==0 && (! empty($conf->global->COMMANDE_DRAFT_WATERMARK)) )
{
$watermark_angle=atan($this->page_hauteur/$this->page_largeur);
$watermark_x=5;
$watermark_y=$this->page_hauteur-25; //Set to $this->page_hauteur-50 or less if problems
$watermark_width=$this->page_hauteur;
$pdf->SetFont('Arial','B',50);
$pdf->SetTextColor(255,192,203);
//rotate
$pdf->_out(sprintf('q %.5F %.5F %.5F %.5F %.2F %.2F cm 1 0 0 1 %.2F %.2F cm',cos($watermark_angle),sin($watermark_angle),-sin($watermark_angle),cos($watermark_angle),$watermark_x*$pdf->k,($pdf->h-$watermark_y)*$pdf->k,-$watermark_x*$pdf->k,-($pdf->h-$watermark_y)*$pdf->k));
//print watermark
$pdf->SetXY($watermark_x,$watermark_y);
$pdf->Cell($watermark_width,25,clean_html($conf->global->COMMANDE_DRAFT_WATERMARK),0,2,"C",0);
//antirotate
$pdf->_out('Q');
}
//Print content
$pdf->SetTextColor(0,0,60);
$pdf->SetFont('Arial','B',13);
@ -893,15 +914,12 @@ class pdf_einstein extends ModelePDFCommandes
$pdf->SetXY(102,$posy+3);
$pdf->SetFont('Arial','B',11);
$pdf->MultiCell(106,4, $object->client->nom, 0, 'L');
$posy+=4;
// Nom client
$pdf->SetXY(102,$posy+4);
$pdf->SetFont('Arial','',9);
$pdf->MultiCell(106,4, $object->contact->getFullName($outputlangs,1), 0, 'L');
$carac_client = "\n".$object->contact->getFullName($outputlangs,1);
// Caractéristiques client
$carac_client=$object->contact->adresse;
$carac_client.=$object->contact->adresse;
$carac_client.="\n".$object->contact->cp . " " . $object->contact->ville."\n";
if ($this->emetteur->pays_code != $object->contact->pays_code)
{

View File

@ -1,6 +1,7 @@
<?php
/* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2007 Regis Houssin <regis.houssin@dolibarr.fr>
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.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
@ -74,7 +75,9 @@ class pdf_crabe extends ModelePDFFactures
$this->option_multilang = 1; // Dispo en plusieurs langues
$this->option_escompte = 1; // Affiche si il y a eu escompte
$this->option_credit_note = 1; // Gère les avoirs
$this->option_freetext = 1; // Support add of a personalised text
$this->option_freetext = 1; // Support add of a personalised text
$this->option_draft_watermark = 1; //Support add of a watermark on drafts
if (defined("FACTURE_TVAOPTION") && FACTURE_TVAOPTION == 'franchise')
$this->franchise=1;
@ -917,6 +920,25 @@ class pdf_crabe extends ModelePDFFactures
$outputlangs->load("propal");
$outputlangs->load("companies");
//Affiche le filigrane brouillon - Print Draft Watermark
if($object->statut==0 && (! empty($conf->global->FACTURE_DRAFT_WATERMARK)) )
{
$watermark_angle=atan($this->page_hauteur/$this->page_largeur);
$watermark_x=5;
$watermark_y=$this->page_hauteur-25; //Set to $this->page_hauteur-50 or less if problems
$watermark_width=$this->page_hauteur;
$pdf->SetFont('Arial','B',50);
$pdf->SetTextColor(255,192,203);
//rotate
$pdf->_out(sprintf('q %.5F %.5F %.5F %.5F %.2F %.2F cm 1 0 0 1 %.2F %.2F cm',cos($watermark_angle),sin($watermark_angle),-sin($watermark_angle),cos($watermark_angle),$watermark_x*$pdf->k,($pdf->h-$watermark_y)*$pdf->k,-$watermark_x*$pdf->k,-($pdf->h-$watermark_y)*$pdf->k));
//print watermark
$pdf->SetXY($watermark_x,$watermark_y);
$pdf->Cell($watermark_width,25,clean_html($conf->global->FACTURE_DRAFT_WATERMARK),0,2,"C",0);
//antirotate
$pdf->_out('Q');
}
//Print content
$pdf->SetTextColor(0,0,60);
$pdf->SetFont('Arial','B',13);
@ -1085,15 +1107,12 @@ class pdf_crabe extends ModelePDFFactures
$pdf->SetXY(102,$posy+3);
$pdf->SetFont('Arial','B',11);
$pdf->MultiCell(106,4, $object->client->nom, 0, 'L');
$posy+=4;
// Nom client
$pdf->SetXY(102,$posy+4);
$pdf->SetFont('Arial','',9);
$pdf->MultiCell(106,4, $object->contact->getFullName($outputlangs,1), 0, 'L');
$carac_client = "\n".$object->contact->getFullName($outputlangs,1);
// Caractéristiques client
$carac_client=$object->contact->adresse;
$carac_client.="\n".$object->contact->adresse;
$carac_client.="\n".$object->contact->cp . " " . $object->contact->ville."\n";
if ($this->emetteur->pays_code != $object->contact->pays_code)
{

View File

@ -1,6 +1,7 @@
<?php
/* Copyright (C) 2003-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.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
@ -71,6 +72,7 @@ class pdf_huitre extends ModelePDFFactures
$this->option_multilang = 1; // Dispo en plusieurs langues
$this->option_escompte = 0; // Affiche si il y a eu escompte
$this->option_credit_note = 0; // Gère les avoirs
$this->option_draft_watermark = 1; //Support add of a watermark on drafts
// Recupere emmetteur
$this->emetteur=$mysoc;
@ -506,6 +508,25 @@ class pdf_huitre extends ModelePDFFactures
$tab4_sl = 4;
$ligne = 2;
//Affiche le filigrane brouillon - Print Draft Watermark
if($fac->statut==0 && (! empty($conf->global->FACTURE_DRAFT_WATERMARK)) )
{
$watermark_angle=atan($this->page_hauteur/$this->page_largeur);
$watermark_x=5;
$watermark_y=$this->page_hauteur-50;
$watermark_width=$this->page_hauteur;
$pdf->SetFont('Arial','B',50);
$pdf->SetTextColor(255,192,203);
//rotate
$pdf->_out(sprintf('q %.5F %.5F %.5F %.5F %.2F %.2F cm 1 0 0 1 %.2F %.2F cm',cos($watermark_angle),sin($watermark_angle),-sin($watermark_angle),cos($watermark_angle),$watermark_x*$pdf->k,($pdf->h-$watermark_y)*$pdf->k,-$watermark_x*$pdf->k,-($pdf->h-$watermark_y)*$pdf->k));
//print watermark
$pdf->SetXY($watermark_x,$watermark_y);
$pdf->Cell($watermark_width,25,clean_html($conf->global->FACTURE_DRAFT_WATERMARK),0,2,"C",0);
//antirotate
$pdf->_out('Q');
}
//Print content
$pdf->SetXY(10,5);
// Logo

View File

@ -2,6 +2,7 @@
/* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005 Sylvain SCATTOLINI <sylvain@s-infoservices.com>
* Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.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
@ -72,6 +73,7 @@ class pdf_oursin extends ModelePDFFactures
$this->option_multilang = 1; // Dispo en plusieurs langues
$this->option_escompte = 0; // Affiche si il y a eu escompte
$this->option_credit_note = 1; // Gère les avoirs
$this->option_draft_watermark = 1; //Support add of a watermark on drafts
if (defined("FACTURE_TVAOPTION") && FACTURE_TVAOPTION == 'franchise')
$this->franchise=1;
@ -639,6 +641,25 @@ class pdf_oursin extends ModelePDFFactures
$langs->load("bills");
$langs->load("propal");
$langs->load("companies");
//Affiche le filigrane brouillon - Print Draft Watermark
if($fac->statut==0 && (! empty($conf->global->FACTURE_DRAFT_WATERMARK)) )
{
$watermark_angle=atan($this->page_hauteur/$this->page_largeur);
$watermark_x=5;
$watermark_y=$this->page_hauteur-50;
$watermark_width=$this->page_hauteur;
$pdf->SetFont('Arial','B',50);
$pdf->SetTextColor(255,192,203);
//rotate
$pdf->_out(sprintf('q %.5F %.5F %.5F %.5F %.2F %.2F cm 1 0 0 1 %.2F %.2F cm',cos($watermark_angle),sin($watermark_angle),-sin($watermark_angle),cos($watermark_angle),$watermark_x*$pdf->k,($pdf->h-$watermark_y)*$pdf->k,-$watermark_x*$pdf->k,-($pdf->h-$watermark_y)*$pdf->k));
//print watermark
$pdf->SetXY($watermark_x,$watermark_y);
$pdf->Cell($watermark_width,25,clean_html($conf->global->FACTURE_DRAFT_WATERMARK),0,2,"C",0);
//antirotate
$pdf->_out('Q');
}
//Print content
$pdf->SetTextColor(0,0,60);
$pdf->SetFont('Arial','B',13);

View File

@ -1,6 +1,7 @@
<?php
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.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
@ -67,6 +68,7 @@ class pdf_soleil extends ModelePDFFicheinter
$this->option_condreg = 0; // Affiche conditions règlement
$this->option_codeproduitservice = 0; // Affiche code produit-service
$this->option_multilang = 0; // Dispo en plusieurs langues
$this->option_draft_watermark = 1; //Support add of a watermark on drafts
// Recupere code pays de l'emmetteur
$this->emetteur=$mysoc;
@ -137,6 +139,25 @@ class pdf_soleil extends ModelePDFFicheinter
$pdf->Open();
$pdf->AddPage();
//Affiche le filigrane brouillon - Print Draft Watermark
if($fichinter->statut==0 && (! empty($conf->global->FICHINTER_DRAFT_WATERMARK)) )
{
$watermark_angle=atan($this->page_hauteur/$this->page_largeur);
$watermark_x=5;
$watermark_y=$this->page_hauteur-50;
$watermark_width=$this->page_hauteur;
$pdf->SetFont('Arial','B',50);
$pdf->SetTextColor(255,192,203);
//rotate
$pdf->_out(sprintf('q %.5F %.5F %.5F %.5F %.2F %.2F cm 1 0 0 1 %.2F %.2F cm',cos($watermark_angle),sin($watermark_angle),-sin($watermark_angle),cos($watermark_angle),$watermark_x*$pdf->k,($pdf->h-$watermark_y)*$pdf->k,-$watermark_x*$pdf->k,-($pdf->h-$watermark_y)*$pdf->k));
//print watermark
$pdf->SetXY($watermark_x,$watermark_y);
$pdf->Cell($watermark_width,25,clean_html($conf->global->FICHINTER_DRAFT_WATERMARK),0,2,"C",0);
//antirotate
$pdf->_out('Q');
}
//Print content
$posy=$this->marge_haute;
$pdf->SetXY($this->marge_gauche,$posy);

View File

@ -1,6 +1,7 @@
<?php
/* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2007 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.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
@ -74,7 +75,8 @@ class pdf_propale_azur extends ModelePDFPropales
$this->option_multilang = 1; // Dispo en plusieurs langues
$this->option_escompte = 1; // Affiche si il y a eu escompte
$this->option_credit_note = 1; // Gère les avoirs
$this->option_freetext = 1; // Support add of a personalised text
$this->option_freetext = 1; // Support add of a personalised text
$this->option_draft_watermark = 1; //Support add of a watermark on drafts
if (defined("FACTURE_TVAOPTION") && FACTURE_TVAOPTION == 'franchise')
$this->franchise=1;
@ -786,7 +788,26 @@ class pdf_propale_azur extends ModelePDFPropales
$outputlangs->load("bills");
$outputlangs->load("propal");
$outputlangs->load("companies");
//Affiche le filigrane brouillon - Print Draft Watermark
if($object->statut==0 && (! empty($conf->global->PROPALE_DRAFT_WATERMARK)) )
{
$watermark_angle=atan($this->page_hauteur/$this->page_largeur);
$watermark_x=5;
$watermark_y=$this->page_hauteur-25; //Set to $this->page_hauteur-50 or less if problems
$watermark_width=$this->page_hauteur;
$pdf->SetFont('Arial','B',50);
$pdf->SetTextColor(255,192,203);
//rotate
$pdf->_out(sprintf('q %.5F %.5F %.5F %.5F %.2F %.2F cm 1 0 0 1 %.2F %.2F cm',cos($watermark_angle),sin($watermark_angle),-sin($watermark_angle),cos($watermark_angle),$watermark_x*$pdf->k,($pdf->h-$watermark_y)*$pdf->k,-$watermark_x*$pdf->k,-($pdf->h-$watermark_y)*$pdf->k));
//print watermark
$pdf->SetXY($watermark_x,$watermark_y);
$pdf->Cell($watermark_width,25,clean_html($conf->global->PROPALE_DRAFT_WATERMARK),0,2,"C",0);
//antirotate
$pdf->_out('Q');
}
//Prepare la suite
$pdf->SetTextColor(0,0,60);
$pdf->SetFont('Arial','B',13);
@ -919,15 +940,12 @@ class pdf_propale_azur extends ModelePDFPropales
$pdf->SetXY(102,$posy+3);
$pdf->SetFont('Arial','B',11);
$pdf->MultiCell(106,4, $object->client->nom, 0, 'L');
$posy+=4;
// Nom client
$pdf->SetXY(102,$posy+4);
$pdf->SetFont('Arial','',9);
$pdf->MultiCell(106,4, $object->contact->getFullName($outputlangs,1), 0, 'L');
$carac_client = "\n".$object->contact->getFullName($outputlangs,1);
// Caractéristiques client
$carac_client=$object->contact->adresse;
$carac_client.="\n".$object->contact->adresse;
$carac_client.="\n".$object->contact->cp . " " . $object->contact->ville."\n";
if ($this->emetteur->pays_code != $object->contact->pays_code)
{

View File

@ -1,6 +1,7 @@
<?php
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.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
@ -16,14 +17,12 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* or see http://www.gnu.org/
*
* $Id$
*/
/** \file htdocs/includes/modules/propale/pdf_propale_jaune.modules.php
\ingroup propale
\brief Fichier de la classe permettant de générer les propales au modèle Jaune
\version $Revision$
\version $Id$
*/
require_once(DOL_DOCUMENT_ROOT ."/includes/modules/propale/modules_propale.php");
@ -54,6 +53,8 @@ class pdf_propale_jaune extends ModelePDFPropales
$this->page_largeur = 210;
$this->page_hauteur = 297;
$this->format = array($this->page_largeur,$this->page_hauteur);
$this->option_draft_watermark = 1; //Support add of a watermark on drafts
$this->error = "";
@ -284,6 +285,26 @@ class pdf_propale_jaune extends ModelePDFPropales
function _pagehead(&$pdf, $propale)
{
//Affiche le filigrane brouillon - Print Draft Watermark
if($propale->statut==0 && defined("PROPALE_DRAFT_WATERMARK") )
{
$watermark_angle=deg2rad(55);
$watermark_x=5;
$watermark_y=$this->page_hauteur-50;
$watermark_width=300;
$pdf->SetFont('Arial','B',50);
$pdf->SetTextColor(255,192,203);
//rotate
$pdf->_out(sprintf('q %.5F %.5F %.5F %.5F %.2F %.2F cm 1 0 0 1 %.2F %.2F cm',cos($watermark_angle),sin($watermark_angle),-sin($watermark_angle),cos($watermark_angle),$watermark_x*$pdf->k,($pdf->h-$watermark_y)*$pdf->k,-$watermark_x*$pdf->k,-($pdf->h-$watermark_y)*$pdf->k));
//print watermark
$pdf->SetXY($watermark_x,$watermark_y);
$pdf->Cell($watermark_width,25,clean_html(PROPALE_DRAFT_WATERMARK),0,2,"C",0);
//antirotate
$pdf->_out('Q');
}
//print Content
$pdf->SetXY(12,42);
if (defined("FAC_PDF_INTITULE"))
{

View File

@ -642,6 +642,7 @@ EnableEditDeleteValidInvoice=Enable the possibility to edit/delete valid invoice
SuggestPaymentByRIBOnAccount=Suggest payment by withdraw on account
SuggestPaymentByChequeToAddress=Suggest payment by cheque to
FreeLegalTextOnInvoices=Free text on invoices
WatermarkOnDraftInvoices=Watermark on draft invoices (any if empty)
##### Proposals #####
PropalSetup=Commercial proposals module setup
CreateForm=Create forms
@ -657,6 +658,7 @@ AddShippingDateAbility=Add shipping date ability
AddDeliveryAddressAbility=Add delivery date ability
UseOptionLineIfNoQuantity=A line of product/service with a zero amount is considered as an option
FreeLegalTextOnProposal=Free text on commercial proposals
WatermarkOnDraftProposal=Watermark on draft commercial proposals (any if empty)
##### Orders #####
OrdersSetup=Orders' management setup
OrdersNumberingModules=Orders numbering modules
@ -664,9 +666,11 @@ OrdersModelModule=Order documents models
HideTreadedOrders=Hide the treated or canceled orders in the list
ValidOrderAfterPropalClosed=To validate the order after proposal closer, makes it possible not to step by the provisional order
FreeLegalTextOnOrders=Free text on orders
WatermarkOnDraftOrders=Watermark on draft orders (any if empty)
##### Fiche inter #####
FicheinterNumberingModules=Intervention numbering modules
TemplatePDFInterventions=Intervention card documents models
WatermarkOnDraftInterventionCards=Watermark on intervention card documents (any if empty)
##### Clicktodial #####
ClickToDialSetup=Click To Dial module setup
ClickToDialUrlDesc=Url called when a click on phone picto is done.<br>Complete url will be: URL?login=...&password=...&caller=...&called=phonecalled

View File

@ -640,6 +640,7 @@ EnableEditDeleteValidInvoice=Activer la possibilit
SuggestPaymentByRIBOnAccount=Proposer paiement par RIB sur le compte
SuggestPaymentByChequeToAddress=Proposer paiement par chèque à l'ordre et adresse de
FreeLegalTextOnInvoices=Mention complémentaire sur les factures
WatermarkOnDraftInvoices=Filigrane sur les brouillons de factures (aucun si vide)
##### Proposals #####
PropalSetup=Configuration du module Propositions Commerciales
CreateForm=Création formulaire
@ -655,6 +656,7 @@ AddShippingDateAbility=Possibilit
AddDeliveryAddressAbility=Possibilité de sélectionner une adresse de livraison
UseOptionLineIfNoQuantity=Une ligne de produit/service ayant une quantité nulle est considérée comme une option
FreeLegalTextOnProposal=Mention complémentaire sur les propositions
WatermarkOnDraftProposal=Filigrane sur les brouillons de propositions (aucun si vide)
##### Orders #####
OrdersSetup=Configuration du module Commandes
OrdersNumberingModules=Modules de numérotation des commandes
@ -662,9 +664,11 @@ OrdersModelModule=Mod
HideTreadedOrders=Cacher les commandes traitées ou annulées de la liste
ValidOrderAfterPropalClosed=Valider la commande après la clôture de la propale, permet de ne pas passer par la commande provisoire
FreeLegalTextOnOrders=Mention complémentaire sur les commandes
WatermarkOnDraftOrders=Filigrane sur les brouillons de commandes (aucun si vide)
##### Fiche inter #####
FicheinterNumberingModules=Modules de numérotation des fiches interventions
TemplatePDFInterventions=Modèle de documents des fiches d'interventions
WatermarkOnDraftInterventionCards=Filigrane sur les brouillons des fiches d'interventions (aucun si vide)
##### Clicktodial #####
ClickToDialSetup=Configuration du module Click To Dial
ClickToDialUrlDesc=Url appelée lors dun clic sur le picto téléphone.<br>L'url complète appelée sera: URL?login=...&password=...&caller=...&called=telappelé