Maxi debug for UTF8 support
This commit is contained in:
parent
767185b9b6
commit
7deb33c52d
@ -69,11 +69,21 @@ if ($_GET["action"] == 'specimen')
|
|||||||
|
|
||||||
$obj = new $classname($db);
|
$obj = new $classname($db);
|
||||||
|
|
||||||
if ($obj->write_file($commande) > 0)
|
if ($obj->write_file($commande,$langs) > 0)
|
||||||
{
|
{
|
||||||
header("Location: ".DOL_URL_ROOT."/document.php?modulepart=commande&file=SPECIMEN.pdf");
|
header("Location: ".DOL_URL_ROOT."/document.php?modulepart=commande&file=SPECIMEN.pdf");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$mesg='<div class="error">'.$obj->error.'</div>';
|
||||||
|
dolibarr_syslog($obj->error, LOG_ERR);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$mesg='<div class="error">'.$langs->trans("ErrorModuleNotFound").'</div>';
|
||||||
|
dolibarr_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -55,11 +55,21 @@ if ($_GET["action"] == 'specimen')
|
|||||||
|
|
||||||
$obj = new $classname($db);
|
$obj = new $classname($db);
|
||||||
|
|
||||||
if ($obj->write_file($don) > 0)
|
if ($obj->write_file($don,$langs) > 0)
|
||||||
{
|
{
|
||||||
header("Location: ".DOL_URL_ROOT."/document.php?modulepart=don&file=SPECIMEN.html");
|
header("Location: ".DOL_URL_ROOT."/document.php?modulepart=don&file=SPECIMEN.html");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$mesg='<div class="error">'.$obj->error.'</div>';
|
||||||
|
dolibarr_syslog($obj->error, LOG_ERR);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$mesg='<div class="error">'.$langs->trans("ErrorModuleNotFound").'</div>';
|
||||||
|
dolibarr_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -78,10 +78,16 @@ if ($_GET["action"] == 'specimen')
|
|||||||
header("Location: ".DOL_URL_ROOT."/document.php?modulepart=facture&file=SPECIMEN.pdf");
|
header("Location: ".DOL_URL_ROOT."/document.php?modulepart=facture&file=SPECIMEN.pdf");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$mesg='<div class="error">'.$obj->error.'</div>';
|
||||||
|
dolibarr_syslog($obj->error, LOG_ERR);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$mesg='<div class="error">'.$langs->trans("ErrorModuleNotFound").'</div>';
|
$mesg='<div class="error">'.$langs->trans("ErrorModuleNotFound").'</div>';
|
||||||
|
dolibarr_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -78,10 +78,16 @@ if ($_GET["action"] == 'specimen')
|
|||||||
header("Location: ".DOL_URL_ROOT."/document.php?modulepart=ficheinter&file=SPECIMEN.pdf");
|
header("Location: ".DOL_URL_ROOT."/document.php?modulepart=ficheinter&file=SPECIMEN.pdf");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$mesg='<div class="error">'.$obj->error.'</div>';
|
||||||
|
dolibarr_syslog($obj->error, LOG_ERR);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$mesg='<div class="error">'.$langs->trans("ErrorModuleNotFound").'</div>';
|
$mesg='<div class="error">'.$langs->trans("ErrorModuleNotFound").'</div>';
|
||||||
|
dolibarr_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -25,7 +25,7 @@
|
|||||||
\ingroup fournisseur
|
\ingroup fournisseur
|
||||||
\brief Page d'administration-configuration du module Fournisseur
|
\brief Page d'administration-configuration du module Fournisseur
|
||||||
\version $Id$
|
\version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("./pre.inc.php");
|
require("./pre.inc.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php");
|
require_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php");
|
||||||
@ -38,7 +38,7 @@ $langs->load("other");
|
|||||||
$langs->load("orders");
|
$langs->load("orders");
|
||||||
|
|
||||||
if (!$user->admin)
|
if (!$user->admin)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -74,10 +74,16 @@ if ($_GET["action"] == 'specimen')
|
|||||||
header("Location: ".DOL_URL_ROOT."/document.php?modulepart=commande_fournisseur&file=SPECIMEN.pdf");
|
header("Location: ".DOL_URL_ROOT."/document.php?modulepart=commande_fournisseur&file=SPECIMEN.pdf");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$mesg='<div class="error">'.$obj->error.'</div>';
|
||||||
|
dolibarr_syslog($obj->error, LOG_ERR);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$mesg='<div class="error">'.$langs->trans("ErrorModuleNotFound").'</div>';
|
$mesg='<div class="error">'.$langs->trans("ErrorModuleNotFound").'</div>';
|
||||||
|
dolibarr_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -373,17 +379,17 @@ closedir($handle);
|
|||||||
print '</table><br/>';
|
print '</table><br/>';
|
||||||
|
|
||||||
/* Obsolete. Les categories de fournisseurs sont gerees dans la table llx_categories
|
/* Obsolete. Les categories de fournisseurs sont gerees dans la table llx_categories
|
||||||
sur le meme principe que les categories clients et produits
|
sur le meme principe que les categories clients et produits
|
||||||
|
|
||||||
print_titre($langs->trans("Categories"));
|
print_titre($langs->trans("Categories"));
|
||||||
|
|
||||||
$sql = "SELECT rowid, label";
|
$sql = "SELECT rowid, label";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."fournisseur_categorie";
|
$sql.= " FROM ".MAIN_DB_PREFIX."fournisseur_categorie";
|
||||||
$sql.= " ORDER BY label ASC";
|
$sql.= " ORDER BY label ASC";
|
||||||
|
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
$num = $db->num_rows($resql);
|
$num = $db->num_rows($resql);
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
@ -410,12 +416,12 @@ if ($resql)
|
|||||||
print "</table></form>\n";
|
print "</table></form>\n";
|
||||||
|
|
||||||
$db->free($resql);
|
$db->free($resql);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dolibarr_print_error($db);
|
dolibarr_print_error($db);
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
llxFooter('$Date$ - $Revision$');
|
llxFooter('$Date$ - $Revision$');
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -70,11 +70,21 @@ if ($_GET["action"] == 'specimen')
|
|||||||
|
|
||||||
$module = new $classname($db);
|
$module = new $classname($db);
|
||||||
|
|
||||||
if ($module->write_file($propal) > 0)
|
if ($module->write_file($propal,$langs) > 0)
|
||||||
{
|
{
|
||||||
header("Location: ".DOL_URL_ROOT."/document.php?modulepart=propal&file=SPECIMEN.pdf");
|
header("Location: ".DOL_URL_ROOT."/document.php?modulepart=propal&file=SPECIMEN.pdf");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$mesg='<div class="error">'.$module->error.'</div>';
|
||||||
|
dolibarr_syslog($module->error, LOG_ERR);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$mesg='<div class="error">'.$langs->trans("ErrorModuleNotFound").'</div>';
|
||||||
|
dolibarr_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -77,7 +77,7 @@ class CommActionRapport
|
|||||||
|
|
||||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||||
// Force output charset to ISO, because, FPDF expect text encoded in ISO
|
// Force output charset to ISO, because, FPDF expect text encoded in ISO
|
||||||
$outputlangs->charset_output=$outputlangs->character_set_client='ISO-8859-1';
|
$outputlangs->charset_output='ISO-8859-1';
|
||||||
|
|
||||||
$outputlangs->load("main");
|
$outputlangs->load("main");
|
||||||
$outputlangs->load("dict");
|
$outputlangs->load("dict");
|
||||||
|
|||||||
@ -15,15 +15,13 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*
|
|
||||||
* $Id$
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\file htdocs/comm/pre.inc.php
|
\file htdocs/comm/pre.inc.php
|
||||||
\ingroup commercial
|
\ingroup commercial
|
||||||
\brief Fichier de gestion du menu gauche de l'espace commercial
|
\brief Fichier de gestion du menu gauche de l'espace commercial
|
||||||
\version $Revision$
|
\version $Id$
|
||||||
*/
|
*/
|
||||||
require("../main.inc.php");
|
require("../main.inc.php");
|
||||||
|
|
||||||
|
|||||||
@ -22,10 +22,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\file htdocs/comm/propal.php
|
* \file htdocs/comm/propal.php
|
||||||
\ingroup propale
|
* \ingroup propale
|
||||||
\brief Page liste des propales (vision commercial)
|
* \brief Page liste des propales (vision commercial)
|
||||||
\version $Id$
|
* \version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("./pre.inc.php");
|
require("./pre.inc.php");
|
||||||
|
|||||||
@ -18,10 +18,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\file htdocs/commande/index.php
|
* \file htdocs/commande/index.php
|
||||||
\ingroup commande
|
* \ingroup commande
|
||||||
\brief Page acceuil espace commandes
|
* \brief Page acceuil espace commandes
|
||||||
\version $Id$
|
* \version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("./pre.inc.php");
|
require("./pre.inc.php");
|
||||||
@ -42,6 +42,11 @@ if ($user->societe_id > 0)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* View
|
||||||
|
*/
|
||||||
|
|
||||||
$commandestatic=new Commande($db);
|
$commandestatic=new Commande($db);
|
||||||
$html = new Form($db);
|
$html = new Form($db);
|
||||||
$formfile = new FormFile($db);
|
$formfile = new FormFile($db);
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
\ingroup facture
|
\ingroup facture
|
||||||
\brief Onglet paiement cheque
|
\brief Onglet paiement cheque
|
||||||
\version $Id$
|
\version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require('./pre.inc.php');
|
require('./pre.inc.php');
|
||||||
require_once(DOL_DOCUMENT_ROOT."/html.formfile.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/html.formfile.class.php");
|
||||||
@ -123,7 +123,7 @@ if ($_POST['action'] == 'builddoc' && $user->rights->banque)
|
|||||||
$result = $remisecheque->Fetch($_GET["id"]);
|
$result = $remisecheque->Fetch($_GET["id"]);
|
||||||
if ($result == 0)
|
if ($result == 0)
|
||||||
{
|
{
|
||||||
$result = $remisecheque->GeneratePdf($_POST["model"]);
|
$result = $remisecheque->GeneratePdf($_POST["model"], $langs);
|
||||||
Header("Location: fiche.php?id=".$remisecheque->id);
|
Header("Location: fiche.php?id=".$remisecheque->id);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,59 +0,0 @@
|
|||||||
Liste des termes a employer
|
|
||||||
|
|
||||||
http://fr.wikipedia.org/wiki/Charpente
|
|
||||||
|
|
||||||
dans la section termes utilisés :
|
|
||||||
|
|
||||||
Utilisé
|
|
||||||
=======
|
|
||||||
Blochet
|
|
||||||
|
|
||||||
Libre :
|
|
||||||
=======
|
|
||||||
Aisselier
|
|
||||||
Arbalétrier ou poutre
|
|
||||||
Arêtier
|
|
||||||
|
|
||||||
Chevêtre
|
|
||||||
Chevron
|
|
||||||
Chevron ou faux comble
|
|
||||||
Comble
|
|
||||||
Comble à surcroît
|
|
||||||
Comble brisé dit à la Mansart
|
|
||||||
Contrefiche
|
|
||||||
Coyer
|
|
||||||
Coyau
|
|
||||||
Dé
|
|
||||||
Échantignole
|
|
||||||
Enrayure
|
|
||||||
Entrait moisé
|
|
||||||
Entrait ou Tirant
|
|
||||||
Entrait retroussé ou faux entrait
|
|
||||||
Faîtage
|
|
||||||
Faîte
|
|
||||||
Faux-entrait
|
|
||||||
Ferme
|
|
||||||
Ferme à une pente ou appentis
|
|
||||||
Gousset
|
|
||||||
Hourdis
|
|
||||||
Jambe de force
|
|
||||||
Jambe de force moisée
|
|
||||||
Jambette
|
|
||||||
Lien de faîtage
|
|
||||||
Lierne ou sous faîte
|
|
||||||
Linçoir
|
|
||||||
Moise
|
|
||||||
Noue
|
|
||||||
Panne
|
|
||||||
Panne faîtière
|
|
||||||
Pignon
|
|
||||||
Poinçon
|
|
||||||
Portée
|
|
||||||
Poutre
|
|
||||||
Sablière
|
|
||||||
Solive
|
|
||||||
Solive boiteuse
|
|
||||||
Solive d'enchevêtrure
|
|
||||||
Sous faîte
|
|
||||||
Trémie
|
|
||||||
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2007 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2007-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -15,25 +15,22 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*
|
|
||||||
* $Id$
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\file htdocs/compta/paiement/cheque/remisecheque.class.php
|
* \file htdocs/compta/paiement/cheque/remisecheque.class.php
|
||||||
\ingroup compta
|
* \ingroup compta
|
||||||
\brief Fichier de la classe des bordereau de remise de cheque
|
* \brief Fichier de la classe des bordereau de remise de cheque
|
||||||
\version $Revision$
|
* \version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once(DOL_DOCUMENT_ROOT ."/commonobject.class.php");
|
require_once(DOL_DOCUMENT_ROOT ."/commonobject.class.php");
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\class RemiseCheque
|
* \class RemiseCheque
|
||||||
\brief Classe permettant la gestion des remises de cheque
|
* \brief Classe permettant la gestion des remises de cheque
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class RemiseCheque extends CommonObject
|
class RemiseCheque extends CommonObject
|
||||||
{
|
{
|
||||||
var $db;
|
var $db;
|
||||||
@ -52,10 +49,9 @@ class RemiseCheque extends CommonObject
|
|||||||
* \param DB handler accès base de données
|
* \param DB handler accès base de données
|
||||||
* \param id id compte (0 par defaut)
|
* \param id id compte (0 par defaut)
|
||||||
*/
|
*/
|
||||||
function RemiseCheque($DB,$langs='')
|
function RemiseCheque($DB)
|
||||||
{
|
{
|
||||||
$this->db = $DB;
|
$this->db = $DB;
|
||||||
$this->langs = $langs;
|
|
||||||
$this->next_id = 0;
|
$this->next_id = 0;
|
||||||
$this->previous_id = 0;
|
$this->previous_id = 0;
|
||||||
}
|
}
|
||||||
@ -402,19 +398,19 @@ class RemiseCheque extends CommonObject
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\brief Génère le fichier PDF
|
* \brief Génère le fichier PDF
|
||||||
\param model Nom du modele
|
* \param model Nom du modele
|
||||||
\return int <0 si KO, 0 si OK
|
* \return int <0 si KO, 0 si OK
|
||||||
\TODO Finir la gestion multi modèle
|
|
||||||
*/
|
*/
|
||||||
function GeneratePdf($model='Blochet')
|
function GeneratePdf($model='blochet', $outputlangs)
|
||||||
{
|
{
|
||||||
require_once(DOL_DOCUMENT_ROOT ."/compta/bank/account.class.php");
|
require_once(DOL_DOCUMENT_ROOT ."/compta/bank/account.class.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT ."/compta/paiement/cheque/pdf/pdf_blochet.class.php");
|
require_once(DOL_DOCUMENT_ROOT ."/includes/modules/cheque/pdf/pdf_".$model.".class.php");
|
||||||
|
|
||||||
$result = $this->Fetch($this->id);
|
$result = $this->Fetch($this->id);
|
||||||
|
|
||||||
$pdf = new BordereauChequeBlochet($db);
|
$class='BordereauCheque'.ucfirst($model);
|
||||||
|
$pdf = new $class($db);
|
||||||
|
|
||||||
$sql = "SELECT b.banque, b.emetteur, b.amount, b.num_chq ";
|
$sql = "SELECT b.banque, b.emetteur, b.amount, b.num_chq ";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."bank as b, ".MAIN_DB_PREFIX."bank_account as ba ";
|
$sql.= " FROM ".MAIN_DB_PREFIX."bank as b, ".MAIN_DB_PREFIX."bank_account as ba ";
|
||||||
@ -447,7 +443,21 @@ class RemiseCheque extends CommonObject
|
|||||||
|
|
||||||
$pdf->account = &$account;
|
$pdf->account = &$account;
|
||||||
|
|
||||||
$pdf->write_file(DOL_DATA_ROOT.'/compta/bordereau', $this->number );
|
// We save charset_output to restore it because write_file can change it if needed for
|
||||||
|
// output format that does not support UTF8.
|
||||||
|
$sav_charset_output=$outputlangs->charset_output;
|
||||||
|
if ($pdf->write_file(DOL_DATA_ROOT.'/compta/bordereau', $this->number, $outputlangs) > 0)
|
||||||
|
{
|
||||||
|
$outputlangs->charset_output=$sav_charset_output;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$outputlangs->charset_output=$sav_charset_output;
|
||||||
|
dolibarr_syslog("Error");
|
||||||
|
dolibarr_print_error($db,$pdf->pdferror());
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -24,14 +24,14 @@
|
|||||||
\ingroup facture
|
\ingroup facture
|
||||||
\brief Rapports de paiements
|
\brief Rapports de paiements
|
||||||
\version $Revision$
|
\version $Revision$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("./pre.inc.php");
|
require("./pre.inc.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/includes/modules/rapport/pdf_paiement.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/includes/modules/rapport/pdf_paiement.class.php");
|
||||||
|
|
||||||
// Sécurité accés
|
// Sécurité accés
|
||||||
if (! $user->rights->facture->lire)
|
if (! $user->rights->facture->lire)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
$dir = $conf->compta->dir_output.'/payments';
|
$dir = $conf->compta->dir_output.'/payments';
|
||||||
|
|
||||||
@ -52,11 +52,26 @@ if (! $year) { $year=date("Y"); }
|
|||||||
if ($_POST["action"] == 'gen')
|
if ($_POST["action"] == 'gen')
|
||||||
{
|
{
|
||||||
$rap = new pdf_paiement($db);
|
$rap = new pdf_paiement($db);
|
||||||
$rap->write_file($dir, $_POST["remonth"], $_POST["reyear"]);
|
|
||||||
|
// We save charset_output to restore it because write_file can change it if needed for
|
||||||
|
// output format that does not support UTF8.
|
||||||
|
$sav_charset_output=$outputlangs->charset_output;
|
||||||
|
if ($rap->write_file($dir, $_POST["remonth"], $_POST["reyear"], $outputlangs) > 0)
|
||||||
|
{
|
||||||
|
$outputlangs->charset_output=$sav_charset_output;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$outputlangs->charset_output=$sav_charset_output;
|
||||||
|
dolibarr_syslog("Erreur dans commande_pdf_create");
|
||||||
|
dolibarr_print_error($db,$obj->pdferror());
|
||||||
|
}
|
||||||
|
|
||||||
$year = $_POST["reyear"];
|
$year = $_POST["reyear"];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
llxHeader();
|
llxHeader();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -62,11 +62,14 @@ $staticcontratligne=new ContratLigne($db);
|
|||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
$now=mktime();
|
||||||
|
|
||||||
$form=new Form($db);
|
$form=new Form($db);
|
||||||
|
|
||||||
llxHeader();
|
llxHeader();
|
||||||
|
|
||||||
$sql = "SELECT s.rowid as socid, s.nom, c.rowid as cid,";
|
$sql = "SELECT c.rowid as cid, c.ref, c.statut as cstatut,";
|
||||||
|
$sql.= " s.rowid as socid, s.nom,";
|
||||||
$sql.= " cd.rowid, cd.description, cd.statut, p.rowid as pid, p.label as label,";
|
$sql.= " cd.rowid, cd.description, cd.statut, p.rowid as pid, p.label as label,";
|
||||||
if (!$user->rights->societe->client->voir && !$socid) $sql .= " sc.fk_soc, sc.fk_user,";
|
if (!$user->rights->societe->client->voir && !$socid) $sql .= " sc.fk_soc, sc.fk_user,";
|
||||||
$sql.= " ".$db->pdate("cd.date_ouverture_prevue")." as date_ouverture_prevue,";
|
$sql.= " ".$db->pdate("cd.date_ouverture_prevue")." as date_ouverture_prevue,";
|
||||||
@ -165,14 +168,19 @@ if ($resql)
|
|||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
$now=mktime();
|
|
||||||
$var=True;
|
$var=True;
|
||||||
while ($i < min($num,$limit))
|
while ($i < min($num,$limit))
|
||||||
{
|
{
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print "<tr $bc[$var]>";
|
print "<tr $bc[$var]>";
|
||||||
print '<td><a href="fiche.php?id='.$obj->cid.'">'.img_object($langs->trans("ShowContract"),"contract").' '.$obj->cid.'</a></td>';
|
print '<td>';
|
||||||
|
$contractstatic=new Contrat($db);
|
||||||
|
$contractstatic->id=$obj->cid;
|
||||||
|
$contractstatic->ref=$obj->ref?$obj->ref:$obj->cid;
|
||||||
|
print $contractstatic->getNomUrl(1);
|
||||||
|
//'<a href="fiche.php?id='.$obj->cid.'">'.img_object($langs->trans("ShowContract"),"contract").' '.$obj->cid.'</a>';
|
||||||
|
print '</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
if ($obj->pid)
|
if ($obj->pid)
|
||||||
{
|
{
|
||||||
@ -202,9 +210,17 @@ if ($resql)
|
|||||||
else print ' ';
|
else print ' ';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td align="right">';
|
print '<td align="right">';
|
||||||
|
if ($obj->cstatut == 0)
|
||||||
|
{
|
||||||
|
print $contractstatic->LibStatut(0,5);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
print '<a href="'.DOL_URL_ROOT.'/contrat/fiche.php?id='.$obj->cid.'&line='.$obj->rowid.'">';
|
print '<a href="'.DOL_URL_ROOT.'/contrat/fiche.php?id='.$obj->cid.'&line='.$obj->rowid.'">';
|
||||||
print $staticcontratligne->LibStatut($obj->statut,5);
|
print $staticcontratligne->LibStatut($obj->statut,5);
|
||||||
print '</a></td>';
|
print '</a>';
|
||||||
|
}
|
||||||
|
print '</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -18,11 +18,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\file htdocs/fourn/commande/index.php
|
* \file htdocs/fourn/commande/index.php
|
||||||
\ingroup commande
|
* \ingroup commande
|
||||||
\brief Page accueil commandes fournisseurs
|
* \brief Page accueil commandes fournisseurs
|
||||||
\version $Revision$
|
* \version $Revision$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("./pre.inc.php");
|
require("./pre.inc.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/contact.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/contact.class.php");
|
||||||
@ -40,6 +40,7 @@ $result = restrictedArea($user, 'commande_fournisseur', $orderid,'');
|
|||||||
llxHeader('',$langs->trans("SuppliersOrdersArea"));
|
llxHeader('',$langs->trans("SuppliersOrdersArea"));
|
||||||
|
|
||||||
$commande = new CommandeFournisseur($db);
|
$commande = new CommandeFournisseur($db);
|
||||||
|
$userstatic=new User($db);
|
||||||
|
|
||||||
print_barre_liste($langs->trans("SuppliersOrdersArea"), $page, "index.php", "", $sortfield, $sortorder, '', $num);
|
print_barre_liste($langs->trans("SuppliersOrdersArea"), $page, "index.php", "", $sortfield, $sortorder, '', $num);
|
||||||
|
|
||||||
@ -64,7 +65,9 @@ if ($resql)
|
|||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
print '<table class="liste" width="100%">';
|
print '<table class="liste" width="100%">';
|
||||||
print '<tr class="liste_titre"><td>'.$langs->trans("Status").'</td><td align="center">'.$langs->trans("Nb").'</td><td> </td>';
|
|
||||||
|
print '<tr class="liste_titre"><td>'.$langs->trans("Status").'</td>';
|
||||||
|
print '<td align="right">'.$langs->trans("Nb").'</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
$var=True;
|
$var=True;
|
||||||
|
|
||||||
@ -75,8 +78,7 @@ if ($resql)
|
|||||||
|
|
||||||
print "<tr $bc[$var]>";
|
print "<tr $bc[$var]>";
|
||||||
print '<td>'.$commande->statuts[$row[1]].'</td>';
|
print '<td>'.$commande->statuts[$row[1]].'</td>';
|
||||||
print '<td align="center">'.$row[0].'</td>';
|
print '<td align="right"><a href="liste.php?statut='.$row[1].'">'.$row[0].' '.$commande->LibStatut($row[1],3).'</a></td>';
|
||||||
print '<td align="center"><a href="liste.php?statut='.$row[1].'">'.$commande->LibStatut($row[1],3).'</a></td>';
|
|
||||||
|
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
$i++;
|
$i++;
|
||||||
@ -93,11 +95,11 @@ else
|
|||||||
print '</td><td width="70%" valign="top" class="notopnoleft">';
|
print '</td><td width="70%" valign="top" class="notopnoleft">';
|
||||||
|
|
||||||
|
|
||||||
$sql = "SELECT u.name, u.firstname";
|
$sql = "SELECT u.rowid, u.name, u.firstname";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."user as u";
|
$sql.= " FROM ".MAIN_DB_PREFIX."user as u,";
|
||||||
$sql .= " , ".MAIN_DB_PREFIX."user_rights as ur";
|
$sql.= " ".MAIN_DB_PREFIX."user_rights as ur, ".MAIN_DB_PREFIX."rights_def as rd";
|
||||||
$sql .= " WHERE u.rowid = ur.fk_user";
|
$sql.= " WHERE u.rowid = ur.fk_user AND ur.fk_id = rd.id";
|
||||||
$sql .= " AND ur.fk_id = 184";
|
$sql.= " AND module='fournisseur' AND perms='commande' AND subperms='approuver'";
|
||||||
|
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
@ -106,17 +108,22 @@ if ($resql)
|
|||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
print '<table class="liste" width="100%">';
|
print '<table class="liste" width="100%">';
|
||||||
print '<tr class="liste_titre"><td>Personnes habilitées à approuver les commandes</td>';
|
print '<tr class="liste_titre"><td>'.$langs->trans("UserWithApproveOrderGrant").'</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
$var=True;
|
$var=True;
|
||||||
|
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
$row = $db->fetch_row($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
|
|
||||||
print "<tr $bc[$var]>";
|
print "<tr $bc[$var]>";
|
||||||
print '<td>'.$row[1].' '.$row[0].'</td>';
|
print '<td>';
|
||||||
|
$userstatic->id=$obj->rowid;
|
||||||
|
$userstatic->nom=$obj->name;
|
||||||
|
$userstatic->prenom=$obj->firstname;
|
||||||
|
print $userstatic->getNomUrl(1);
|
||||||
|
print '</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -15,30 +15,31 @@
|
|||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
* or see http://www.gnu.org/
|
* or see http://www.gnu.org/
|
||||||
*
|
|
||||||
* $Id$
|
|
||||||
* $Source$
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\file htdocs/compta/paiement/cheque/pdf/pdf_blochet.class.php
|
\file htdocs/compta/paiement/cheque/pdf/pdf_blochet.class.php
|
||||||
\ingroup banque
|
\ingroup banque
|
||||||
\brief Fichier de la classe permettant de g<EFBFBD>n<EFBFBD>rer les bordereau de remise de cheque
|
\brief Fichier de la classe permettant de g<EFBFBD>n<EFBFBD>rer les bordereau de remise de cheque
|
||||||
\version $Revision$
|
\version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
require_once(DOL_DOCUMENT_ROOT.'/lib/functions.lib.php');
|
||||||
|
require_once(DOL_DOCUMENT_ROOT.'/includes/fpdf/fpdfi/fpdi_protection.php');
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\class BordereauChequeBlochet
|
* \class BordereauChequeBlochet
|
||||||
\brief Classe permettant de g<EFBFBD>n<EFBFBD>rer les bordereau de remise de cheque
|
* \brief Classe permettant de g�n�rer les bordereau de remise de cheque
|
||||||
*/
|
*/
|
||||||
|
class BordereauChequeBlochet extends FPDF
|
||||||
class BordereauChequeBlochet
|
|
||||||
{
|
{
|
||||||
|
var $error='';
|
||||||
|
|
||||||
var $emetteur; // Objet societe qui emet
|
var $emetteur; // Objet societe qui emet
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\brief Constructeur
|
* \brief Constructeur
|
||||||
*/
|
*/
|
||||||
function BordereauChequeBlochet($db)
|
function BordereauChequeBlochet($db)
|
||||||
{
|
{
|
||||||
@ -49,7 +50,6 @@ class BordereauChequeBlochet
|
|||||||
|
|
||||||
$this->db = $db;
|
$this->db = $db;
|
||||||
$this->name = "blochet";
|
$this->name = "blochet";
|
||||||
$this->description = $langs->transnoentities("CheckReceipt");
|
|
||||||
|
|
||||||
$this->tab_top = 60;
|
$this->tab_top = 60;
|
||||||
|
|
||||||
@ -68,6 +68,13 @@ class BordereauChequeBlochet
|
|||||||
$this->tab_height = 200; //$this->line_height * $this->line_per_page;
|
$this->tab_height = 200; //$this->line_height * $this->line_per_page;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Renvoi le dernier message d'erreur de création de propale
|
||||||
|
*/
|
||||||
|
function pdferror()
|
||||||
|
{
|
||||||
|
return $this->error;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\brief Generate Header
|
\brief Generate Header
|
||||||
@ -75,22 +82,22 @@ class BordereauChequeBlochet
|
|||||||
\param page current page number
|
\param page current page number
|
||||||
\param pages number of pages
|
\param pages number of pages
|
||||||
*/
|
*/
|
||||||
function Header(&$pdf, $page, $pages)
|
function Header(&$pdf, $page, $pages, $outputlangs)
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
$title = $this->description;
|
$title = $outputlangs->transnoentities("CheckReceipt");
|
||||||
$pdf->SetFont('Arial','B',10);
|
$pdf->SetFont('Arial','B',10);
|
||||||
$pdf->Text(10, 10, $title);
|
$pdf->Text(10, 10, $title);
|
||||||
|
|
||||||
$pdf->SetFont('Arial','',10);
|
$pdf->SetFont('Arial','',10);
|
||||||
$pdf->Text(10, 19, $langs->transnoentities("Numero"));
|
$pdf->Text(10, 19, $outputlangs->transnoentities("Numero"));
|
||||||
|
|
||||||
$pdf->SetFont('Arial','',10);
|
$pdf->SetFont('Arial','',10);
|
||||||
$pdf->Text(10, 27, $langs->transnoentities("Date") );
|
$pdf->Text(10, 27, $outputlangs->transnoentities("Date") );
|
||||||
|
|
||||||
$pdf->SetFont('Arial','',10);
|
$pdf->SetFont('Arial','',10);
|
||||||
$pdf->Text(10, 35, $langs->transnoentities("Owner"));
|
$pdf->Text(10, 35, $outputlangs->transnoentities("Owner"));
|
||||||
|
|
||||||
$pdf->SetFont('Arial','B',10);
|
$pdf->SetFont('Arial','B',10);
|
||||||
$pdf->Text(32, 35, $this->account->proprio);
|
$pdf->Text(32, 35, $this->account->proprio);
|
||||||
@ -103,7 +110,7 @@ class BordereauChequeBlochet
|
|||||||
|
|
||||||
|
|
||||||
$pdf->SetFont('Arial','',10);
|
$pdf->SetFont('Arial','',10);
|
||||||
$pdf->Text(10, 43, "Compte");
|
$pdf->Text(10, 43, $outputlangs->transnoentities("Account"));
|
||||||
|
|
||||||
$pdf->SetFont('Arial','B',10);
|
$pdf->SetFont('Arial','B',10);
|
||||||
$pdf->Text(32, 43, $this->account->code_banque);
|
$pdf->Text(32, 43, $this->account->code_banque);
|
||||||
@ -112,7 +119,7 @@ class BordereauChequeBlochet
|
|||||||
$pdf->Text(104, 43, $this->account->cle_rib);
|
$pdf->Text(104, 43, $this->account->cle_rib);
|
||||||
|
|
||||||
$pdf->SetFont('Arial','',10);
|
$pdf->SetFont('Arial','',10);
|
||||||
$pdf->Text(114, 19, "Signature");
|
$pdf->Text(114, 19, $outputlangs->transnoentities("Sign"));
|
||||||
|
|
||||||
$pdf->Rect(9, 47, 192, 7);
|
$pdf->Rect(9, 47, 192, 7);
|
||||||
$pdf->line(55, 47, 55, 54);
|
$pdf->line(55, 47, 55, 54);
|
||||||
@ -120,7 +127,7 @@ class BordereauChequeBlochet
|
|||||||
$pdf->line(170, 47, 170, 54);
|
$pdf->line(170, 47, 170, 54);
|
||||||
|
|
||||||
$pdf->SetFont('Arial','',10);
|
$pdf->SetFont('Arial','',10);
|
||||||
$pdf->Text(10, 52, "Nombre de ch<63>que");
|
$pdf->Text(10, 52, $outputlangs->transnoentities("ChequeNumber"));
|
||||||
|
|
||||||
$pdf->SetFont('Arial','B',10);
|
$pdf->SetFont('Arial','B',10);
|
||||||
$pdf->Text(57, 52, $this->nbcheque);
|
$pdf->Text(57, 52, $this->nbcheque);
|
||||||
@ -134,16 +141,16 @@ class BordereauChequeBlochet
|
|||||||
|
|
||||||
// Tableau
|
// Tableau
|
||||||
$pdf->SetFont('Arial','',8);
|
$pdf->SetFont('Arial','',8);
|
||||||
$pdf->Text(11,$this->tab_top + 6,$langs->transnoentities("Num"));
|
$pdf->Text(11,$this->tab_top + 6,$outputlangs->transnoentities("Num"));
|
||||||
$pdf->line(30, $this->tab_top, 30, $this->tab_top + $this->tab_height + 10);
|
$pdf->line(30, $this->tab_top, 30, $this->tab_top + $this->tab_height + 10);
|
||||||
|
|
||||||
$pdf->Text(31,$this->tab_top + 6,$langs->transnoentities("Bank"));
|
$pdf->Text(31,$this->tab_top + 6,$outputlangs->transnoentities("Bank"));
|
||||||
$pdf->line(100, $this->tab_top, 100, $this->tab_top + $this->tab_height + 10);
|
$pdf->line(100, $this->tab_top, 100, $this->tab_top + $this->tab_height + 10);
|
||||||
$pdf->Text(101, $this->tab_top + 6, $langs->transnoentities("CheckTransmitter"));
|
$pdf->Text(101, $this->tab_top + 6, $outputlangs->transnoentities("CheckTransmitter"));
|
||||||
|
|
||||||
$pdf->line(180, $this->tab_top, 180, $this->tab_top + $this->tab_height + 10);
|
$pdf->line(180, $this->tab_top, 180, $this->tab_top + $this->tab_height + 10);
|
||||||
$pdf->SetXY (180, $this->tab_top);
|
$pdf->SetXY (180, $this->tab_top);
|
||||||
$pdf->MultiCell(20, 10, $langs->transnoentities("Amount"), 0, 'R');
|
$pdf->MultiCell(20, 10, $outputlangs->transnoentities("Amount"), 0, 'R');
|
||||||
$pdf->line(9, $this->tab_top + 10, 201, $this->tab_top + 10 );
|
$pdf->line(9, $this->tab_top + 10, 201, $this->tab_top + 10 );
|
||||||
|
|
||||||
$pdf->Rect(9, $this->tab_top, 192, $this->tab_height + 10);
|
$pdf->Rect(9, $this->tab_top, 192, $this->tab_height + 10);
|
||||||
@ -162,7 +169,7 @@ class BordereauChequeBlochet
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function Body(&$pdf, $page)
|
function Body(&$pdf, $page, $outputlangs)
|
||||||
{
|
{
|
||||||
// x=10 - Num
|
// x=10 - Num
|
||||||
// x=30 - Banque
|
// x=30 - Banque
|
||||||
@ -191,15 +198,27 @@ class BordereauChequeBlochet
|
|||||||
$yp = $yp + $this->line_height;
|
$yp = $yp + $this->line_height;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\brief Fonction g<EFBFBD>n<EFBFBD>rant le rapport sur le disque
|
* \brief Fonction generant le rapport sur le disque
|
||||||
\param _dir repertoire
|
* \param _dir Directory
|
||||||
\param month mois du rapport
|
* \param number Number
|
||||||
\param year annee du rapport
|
* \param outputlangs Lang output object
|
||||||
*/
|
*/
|
||||||
function write_file($_dir, $number)
|
function write_file($_dir, $number, $outputlangs)
|
||||||
{
|
{
|
||||||
global $langs;
|
global $user,$conf,$langs,$mysoc;
|
||||||
|
|
||||||
|
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||||
|
// Force output charset to ISO, because, FPDF expect text encoded in ISO
|
||||||
|
$outputlangs->charset_output='ISO-8859-1';
|
||||||
|
|
||||||
|
$outputlangs->load("main");
|
||||||
|
$outputlangs->load("companies");
|
||||||
|
$outputlangs->load("bills");
|
||||||
|
$outputlangs->load("products");
|
||||||
|
|
||||||
|
$outputlangs->setPhpLang();
|
||||||
|
|
||||||
$dir = $_dir . "/".get_exdir($number);
|
$dir = $_dir . "/".get_exdir($number);
|
||||||
|
|
||||||
@ -252,9 +271,9 @@ class BordereauChequeBlochet
|
|||||||
|
|
||||||
$pdf->AddPage();
|
$pdf->AddPage();
|
||||||
|
|
||||||
$this->Header($pdf, 1, $pages);
|
$this->Header($pdf, 1, $pages, $outputlangs);
|
||||||
|
|
||||||
$this->Body($pdf, 1);
|
$this->Body($pdf, 1, $outputlangs);
|
||||||
|
|
||||||
$pdf->Output($_file);
|
$pdf->Output($_file);
|
||||||
if (! empty($conf->global->MAIN_UMASK))
|
if (! empty($conf->global->MAIN_UMASK))
|
||||||
@ -161,10 +161,10 @@ class ModeleNumRefCommandes
|
|||||||
\brief Crée un bon de commande sur disque en fonction d'un modèle
|
\brief Crée un bon de commande sur disque en fonction d'un modèle
|
||||||
\param db objet base de donnée
|
\param db objet base de donnée
|
||||||
\param id id de la propale à créer
|
\param id id de la propale à créer
|
||||||
\param modele force le modele à utiliser ('' par defaut)
|
\param modele force le modele à utiliser ('' to not force)
|
||||||
\param outputlangs objet lang a utiliser pour traduction
|
\param outputlangs objet lang a utiliser pour traduction
|
||||||
*/
|
*/
|
||||||
function commande_pdf_create($db, $id, $modele='', $outputlangs='')
|
function commande_pdf_create($db, $id, $modele, $outputlangs)
|
||||||
{
|
{
|
||||||
global $conf,$langs;
|
global $conf,$langs;
|
||||||
$langs->load("orders");
|
$langs->load("orders");
|
||||||
@ -203,14 +203,19 @@ function commande_pdf_create($db, $id, $modele='', $outputlangs='')
|
|||||||
|
|
||||||
$obj = new $classname($db);
|
$obj = new $classname($db);
|
||||||
|
|
||||||
|
// We save charset_output to restore it because write_file can change it if needed for
|
||||||
|
// output format that does not support UTF8.
|
||||||
|
$sav_charset_output=$outputlangs->charset_output;
|
||||||
if ($obj->write_file($id, $outputlangs) > 0)
|
if ($obj->write_file($id, $outputlangs) > 0)
|
||||||
{
|
{
|
||||||
|
$outputlangs->charset_output=$sav_charset_output;
|
||||||
// on supprime l'image correspondant au preview
|
// on supprime l'image correspondant au preview
|
||||||
commande_delete_preview($db, $id);
|
commande_delete_preview($db, $id);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
$outputlangs->charset_output=$sav_charset_output;
|
||||||
dolibarr_syslog("Erreur dans commande_pdf_create");
|
dolibarr_syslog("Erreur dans commande_pdf_create");
|
||||||
dolibarr_print_error($db,$obj->pdferror());
|
dolibarr_print_error($db,$obj->pdferror());
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@ -90,7 +90,7 @@ class pdf_edison extends ModelePDFCommandes
|
|||||||
|
|
||||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||||
// Force output charset to ISO, because, FPDF expect text encoded in ISO
|
// Force output charset to ISO, because, FPDF expect text encoded in ISO
|
||||||
$outputlangs->charset_output=$outputlangs->character_set_client='ISO-8859-1';
|
$outputlangs->charset_output='ISO-8859-1';
|
||||||
|
|
||||||
$outputlangs->load("main");
|
$outputlangs->load("main");
|
||||||
$outputlangs->load("companies");
|
$outputlangs->load("companies");
|
||||||
|
|||||||
@ -110,7 +110,7 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
|
|
||||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||||
// Force output charset to ISO, because, FPDF expect text encoded in ISO
|
// Force output charset to ISO, because, FPDF expect text encoded in ISO
|
||||||
$outputlangs->charset_output=$outputlangs->character_set_client='ISO-8859-1';
|
$outputlangs->charset_output='ISO-8859-1';
|
||||||
|
|
||||||
$outputlangs->load("main");
|
$outputlangs->load("main");
|
||||||
$outputlangs->load("dict");
|
$outputlangs->load("dict");
|
||||||
|
|||||||
@ -159,7 +159,7 @@ class ModeleNumRefDons
|
|||||||
\param outputlangs objet lang a utiliser pour traduction
|
\param outputlangs objet lang a utiliser pour traduction
|
||||||
\return int 0 si KO, 1 si OK
|
\return int 0 si KO, 1 si OK
|
||||||
*/
|
*/
|
||||||
function don_create($db, $id, $message='', $modele='', $outputlangs='')
|
function don_create($db, $id, $message, $modele, $outputlangs)
|
||||||
{
|
{
|
||||||
global $conf, $langs;
|
global $conf, $langs;
|
||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
@ -192,18 +192,22 @@ function don_create($db, $id, $message='', $modele='', $outputlangs='')
|
|||||||
|
|
||||||
$obj->message = $message;
|
$obj->message = $message;
|
||||||
|
|
||||||
if ( $obj->write_file($id,$outputlangs) > 0)
|
// We save charset_output to restore it because write_file can change it if needed for
|
||||||
|
// output format that does not support UTF8.
|
||||||
|
$sav_charset_output=$outputlangs->charset_output;
|
||||||
|
if ($obj->write_file($id,$outputlangs) > 0)
|
||||||
{
|
{
|
||||||
// Succès de la création de la facture. On génère le fichier meta
|
// Succès de la création de la facture. On génère le fichier meta
|
||||||
don_meta_create($db, $id);
|
don_meta_create($db, $id);
|
||||||
|
|
||||||
// et on supprime l'image correspondant au preview
|
// et on supprime l'image correspondant au preview
|
||||||
don_delete_preview($db, $id);
|
don_delete_preview($db, $id);
|
||||||
|
|
||||||
|
$outputlangs->charset_output=$sav_charset_output;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
$outputlangs->charset_output=$sav_charset_output;
|
||||||
dolibarr_syslog("Erreur dans don_create");
|
dolibarr_syslog("Erreur dans don_create");
|
||||||
dolibarr_print_error($db,$obj->pdferror());
|
dolibarr_print_error($db,$obj->pdferror());
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@ -88,10 +88,10 @@ class ModelePdfExpedition extends DolibarrPdfBarCode
|
|||||||
\brief Cree un bon d'expedition sur disque
|
\brief Cree un bon d'expedition sur disque
|
||||||
\param db objet base de donnee
|
\param db objet base de donnee
|
||||||
\param id id de la expedition a creer
|
\param id id de la expedition a creer
|
||||||
\param modele force le modele a utiliser ('' par defaut)
|
\param modele force le modele a utiliser ('' to not force)
|
||||||
\param outputlangs objet lang a utiliser pour traduction
|
\param outputlangs objet lang a utiliser pour traduction
|
||||||
*/
|
*/
|
||||||
function expedition_pdf_create($db, $id, $modele='', $outputlangs='')
|
function expedition_pdf_create($db, $id, $modele, $outputlangs)
|
||||||
{
|
{
|
||||||
global $conf,$langs;
|
global $conf,$langs;
|
||||||
$langs->load("sendings");
|
$langs->load("sendings");
|
||||||
@ -134,14 +134,19 @@ function expedition_pdf_create($db, $id, $modele='', $outputlangs='')
|
|||||||
$result=$expedition->fetch($id);
|
$result=$expedition->fetch($id);
|
||||||
$result=$expedition->fetch_object($expedition->origin);
|
$result=$expedition->fetch_object($expedition->origin);
|
||||||
|
|
||||||
|
// We save charset_output to restore it because write_file can change it if needed for
|
||||||
|
// output format that does not support UTF8.
|
||||||
|
$sav_charset_output=$outputlangs->charset_output;
|
||||||
if ($obj->write_file($expedition, $langs) > 0)
|
if ($obj->write_file($expedition, $langs) > 0)
|
||||||
{
|
{
|
||||||
|
$outputlangs->charset_output=$sav_charset_output;
|
||||||
// on supprime l'image correspondant au preview
|
// on supprime l'image correspondant au preview
|
||||||
// expedition_delete_preview($db, $id);
|
//expedition_delete_preview($db, $id);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
$outputlangs->charset_output=$sav_charset_output;
|
||||||
dolibarr_syslog("Erreur dans expedition_pdf_create");
|
dolibarr_syslog("Erreur dans expedition_pdf_create");
|
||||||
dolibarr_print_error($db,$obj->pdferror());
|
dolibarr_print_error($db,$obj->pdferror());
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@ -80,7 +80,7 @@ Class pdf_expedition_merou extends ModelePdfExpedition
|
|||||||
|
|
||||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||||
// Force output charset to ISO, because, FPDF expect text encoded in ISO
|
// Force output charset to ISO, because, FPDF expect text encoded in ISO
|
||||||
$outputlangs->charset_output=$outputlangs->character_set_client='ISO-8859-1';
|
$outputlangs->charset_output='ISO-8859-1';
|
||||||
|
|
||||||
$outputlangs->load("main");
|
$outputlangs->load("main");
|
||||||
$outputlangs->load("companies");
|
$outputlangs->load("companies");
|
||||||
|
|||||||
@ -122,7 +122,7 @@ Class pdf_expedition_rouget extends ModelePdfExpedition
|
|||||||
|
|
||||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||||
// Force output charset to ISO, because, FPDF expect text encoded in ISO
|
// Force output charset to ISO, because, FPDF expect text encoded in ISO
|
||||||
$outputlangs->charset_output=$outputlangs->character_set_client='ISO-8859-1';
|
$outputlangs->charset_output='ISO-8859-1';
|
||||||
|
|
||||||
$outputlangs->load("main");
|
$outputlangs->load("main");
|
||||||
$outputlangs->load("companies");
|
$outputlangs->load("companies");
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
\ingroup export
|
\ingroup export
|
||||||
\brief Fichier contenant la classe mère de generation des exports
|
\brief Fichier contenant la classe mère de generation des exports
|
||||||
\version $Id$
|
\version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once(DOL_DOCUMENT_ROOT.'/lib/functions.lib.php');
|
require_once(DOL_DOCUMENT_ROOT.'/lib/functions.lib.php');
|
||||||
|
|
||||||
@ -31,7 +31,7 @@ require_once(DOL_DOCUMENT_ROOT.'/lib/functions.lib.php');
|
|||||||
/**
|
/**
|
||||||
\class ModeleExports
|
\class ModeleExports
|
||||||
\brief Classe mère des modèles de format d'export
|
\brief Classe mère des modèles de format d'export
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class ModeleExports
|
class ModeleExports
|
||||||
{
|
{
|
||||||
|
|||||||
@ -162,11 +162,11 @@ class ModeleNumRefFactures
|
|||||||
\param db objet base de donnee
|
\param db objet base de donnee
|
||||||
\param id id de la facture a creer
|
\param id id de la facture a creer
|
||||||
\param message message
|
\param message message
|
||||||
\param modele force le modele a utiliser ('' par defaut)
|
\param modele force le modele a utiliser ('' to not force)
|
||||||
\param outputlangs objet lang a utiliser pour traduction
|
\param outputlangs objet lang a utiliser pour traduction
|
||||||
\return int <0 si KO, >0 si OK
|
\return int <0 si KO, >0 si OK
|
||||||
*/
|
*/
|
||||||
function facture_pdf_create($db, $id, $message='', $modele='', $outputlangs='')
|
function facture_pdf_create($db, $id, $message, $modele, $outputlangs)
|
||||||
{
|
{
|
||||||
global $conf,$langs;
|
global $conf,$langs;
|
||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
@ -197,19 +197,23 @@ function facture_pdf_create($db, $id, $message='', $modele='', $outputlangs='')
|
|||||||
$obj = new $classname($db);
|
$obj = new $classname($db);
|
||||||
$obj->message = $message;
|
$obj->message = $message;
|
||||||
|
|
||||||
|
// We save charset_output to restore it because write_file can change it if needed for
|
||||||
|
// output format that does not support UTF8.
|
||||||
|
$sav_charset_output=$outputlangs->charset_output;
|
||||||
if ($obj->write_file($id, $outputlangs) > 0)
|
if ($obj->write_file($id, $outputlangs) > 0)
|
||||||
{
|
{
|
||||||
// Success in building document. We build meta file.
|
// Success in building document. We build meta file.
|
||||||
facture_meta_create($db, $id);
|
facture_meta_create($db, $id);
|
||||||
|
|
||||||
// et on supprime l'image correspondant au preview
|
// et on supprime l'image correspondant au preview
|
||||||
facture_delete_preview($db, $id);
|
facture_delete_preview($db, $id);
|
||||||
|
|
||||||
|
$outputlangs->charset_output=$sav_charset_output;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dolibarr_print_error('',"facture_pdf_create Error: ".$obj->error);
|
$outputlangs->charset_output=$sav_charset_output;
|
||||||
|
dolibarr_print_error($db,"facture_pdf_create Error: ".$obj->error);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -111,7 +111,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
|
|
||||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||||
// Force output charset to ISO, because, FPDF expect text encoded in ISO
|
// Force output charset to ISO, because, FPDF expect text encoded in ISO
|
||||||
$outputlangs->charset_output=$outputlangs->character_set_client='ISO-8859-1';
|
$outputlangs->charset_output='ISO-8859-1';
|
||||||
|
|
||||||
$outputlangs->load("main");
|
$outputlangs->load("main");
|
||||||
$outputlangs->load("dict");
|
$outputlangs->load("dict");
|
||||||
|
|||||||
@ -95,7 +95,7 @@ class pdf_huitre extends ModelePDFFactures
|
|||||||
|
|
||||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||||
// Force output charset to ISO, because, FPDF expect text encoded in ISO
|
// Force output charset to ISO, because, FPDF expect text encoded in ISO
|
||||||
$outputlangs->charset_output=$outputlangs->character_set_client='ISO-8859-1';
|
$outputlangs->charset_output='ISO-8859-1';
|
||||||
|
|
||||||
$outputlangs->load("main");
|
$outputlangs->load("main");
|
||||||
$outputlangs->load("companies");
|
$outputlangs->load("companies");
|
||||||
|
|||||||
@ -99,7 +99,7 @@ class pdf_oursin extends ModelePDFFactures
|
|||||||
|
|
||||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||||
// Force output charset to ISO, because, FPDF expect text encoded in ISO
|
// Force output charset to ISO, because, FPDF expect text encoded in ISO
|
||||||
$outputlangs->charset_output=$outputlangs->character_set_client='ISO-8859-1';
|
$outputlangs->charset_output='ISO-8859-1';
|
||||||
|
|
||||||
$outputlangs->load("main");
|
$outputlangs->load("main");
|
||||||
$outputlangs->load("companies");
|
$outputlangs->load("companies");
|
||||||
|
|||||||
@ -24,7 +24,7 @@
|
|||||||
\brief Fichier contenant la classe mère de generation des fiches interventions en PDF
|
\brief Fichier contenant la classe mère de generation des fiches interventions en PDF
|
||||||
et la classe mère de numérotation des fiches interventions
|
et la classe mère de numérotation des fiches interventions
|
||||||
\version $Id$
|
\version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once(DOL_DOCUMENT_ROOT.'/lib/functions.lib.php');
|
require_once(DOL_DOCUMENT_ROOT.'/lib/functions.lib.php');
|
||||||
require_once(DOL_DOCUMENT_ROOT.'/includes/fpdf/fpdfi/fpdi_protection.php');
|
require_once(DOL_DOCUMENT_ROOT.'/includes/fpdf/fpdfi/fpdi_protection.php');
|
||||||
@ -33,7 +33,7 @@ require_once(DOL_DOCUMENT_ROOT.'/includes/fpdf/fpdfi/fpdi_protection.php');
|
|||||||
/**
|
/**
|
||||||
\class ModelePDFFicheinter
|
\class ModelePDFFicheinter
|
||||||
\brief Classe mère des modèles de fiche intervention
|
\brief Classe mère des modèles de fiche intervention
|
||||||
*/
|
*/
|
||||||
class ModelePDFFicheinter extends FPDF
|
class ModelePDFFicheinter extends FPDF
|
||||||
{
|
{
|
||||||
var $error='';
|
var $error='';
|
||||||
@ -90,7 +90,7 @@ class ModelePDFFicheinter extends FPDF
|
|||||||
/**
|
/**
|
||||||
\class ModeleNumRefFicheinter
|
\class ModeleNumRefFicheinter
|
||||||
\brief Classe mère des modèles de numérotation des références de fiches d'intervention
|
\brief Classe mère des modèles de numérotation des références de fiches d'intervention
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class ModeleNumRefFicheinter
|
class ModeleNumRefFicheinter
|
||||||
{
|
{
|
||||||
@ -165,7 +165,7 @@ class ModeleNumRefFicheinter
|
|||||||
\param modele force le modele à utiliser ('' par defaut)
|
\param modele force le modele à utiliser ('' par defaut)
|
||||||
\param outputlangs objet lang a utiliser pour traduction
|
\param outputlangs objet lang a utiliser pour traduction
|
||||||
\return int 0 si KO, 1 si OK
|
\return int 0 si KO, 1 si OK
|
||||||
*/
|
*/
|
||||||
function fichinter_create($db, $object, $modele='', $outputlangs='')
|
function fichinter_create($db, $object, $modele='', $outputlangs='')
|
||||||
{
|
{
|
||||||
global $conf,$langs;
|
global $conf,$langs;
|
||||||
@ -198,12 +198,18 @@ function fichinter_create($db, $object, $modele='', $outputlangs='')
|
|||||||
$obj = new $classname($db);
|
$obj = new $classname($db);
|
||||||
|
|
||||||
dolibarr_syslog("fichinter_create build PDF", LOG_DEBUG);
|
dolibarr_syslog("fichinter_create build PDF", LOG_DEBUG);
|
||||||
|
|
||||||
|
// We save charset_output to restore it because write_file can change it if needed for
|
||||||
|
// output format that does not support UTF8.
|
||||||
|
$sav_charset_output=$outputlangs->charset_output;
|
||||||
if ($obj->write_file($object,$outputlangs) > 0)
|
if ($obj->write_file($object,$outputlangs) > 0)
|
||||||
{
|
{
|
||||||
|
$outputlangs->charset_output=$sav_charset_output;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
$outputlangs->charset_output=$sav_charset_output;
|
||||||
dolibarr_print_error($db,$obj->pdferror());
|
dolibarr_print_error($db,$obj->pdferror());
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -220,7 +226,7 @@ function fichinter_create($db, $object, $modele='', $outputlangs='')
|
|||||||
\param db objet base de donnée
|
\param db objet base de donnée
|
||||||
\param propalid id de la propal à effacer
|
\param propalid id de la propal à effacer
|
||||||
\param propalref référence de la propal si besoin
|
\param propalref référence de la propal si besoin
|
||||||
*/
|
*/
|
||||||
function fichinter_delete_preview($db, $fichinterid, $fichinterref='')
|
function fichinter_delete_preview($db, $fichinterid, $fichinterref='')
|
||||||
{
|
{
|
||||||
global $langs,$conf;
|
global $langs,$conf;
|
||||||
|
|||||||
@ -84,7 +84,7 @@ class pdf_soleil extends ModelePDFFicheinter
|
|||||||
|
|
||||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||||
// Force output charset to ISO, because, FPDF expect text encoded in ISO
|
// Force output charset to ISO, because, FPDF expect text encoded in ISO
|
||||||
$outputlangs->charset_output=$outputlangs->character_set_client='ISO-8859-1';
|
$outputlangs->charset_output='ISO-8859-1';
|
||||||
|
|
||||||
$outputlangs->load("main");
|
$outputlangs->load("main");
|
||||||
$outputlangs->load("dict");
|
$outputlangs->load("dict");
|
||||||
|
|||||||
@ -155,7 +155,14 @@ class ModeleNumRefDeliveryOrder
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Create object on disk
|
||||||
|
* \param db objet base de donnée
|
||||||
|
* \param deliveryid id object
|
||||||
|
* \param modele force le modele à utiliser ('' to not force)
|
||||||
|
* \param outputlangs objet lang a utiliser pour traduction
|
||||||
|
* \return int 0 si KO, 1 si OK
|
||||||
|
*/
|
||||||
function delivery_order_pdf_create($db, $deliveryid, $modele='', $outputlangs='')
|
function delivery_order_pdf_create($db, $deliveryid, $modele='', $outputlangs='')
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
@ -185,14 +192,20 @@ function delivery_order_pdf_create($db, $deliveryid, $modele='', $outputlangs=''
|
|||||||
|
|
||||||
$obj = new $classname($db);
|
$obj = new $classname($db);
|
||||||
|
|
||||||
|
// We save charset_output to restore it because write_file can change it if needed for
|
||||||
|
// output format that does not support UTF8.
|
||||||
|
$sav_charset_output=$outputlangs->charset_output;
|
||||||
if ($obj->write_file($deliveryid,$outputlangs) > 0)
|
if ($obj->write_file($deliveryid,$outputlangs) > 0)
|
||||||
{
|
{
|
||||||
// on supprime l'image correspondant au preview
|
// on supprime l'image correspondant au preview
|
||||||
delivery_order_delete_preview($db, $deliveryid);
|
delivery_order_delete_preview($db, $deliveryid);
|
||||||
|
|
||||||
|
$outputlangs->charset_output=$sav_charset_output;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
$outputlangs->charset_output=$sav_charset_output;
|
||||||
dolibarr_syslog("Erreur dans delivery_order_pdf_create");
|
dolibarr_syslog("Erreur dans delivery_order_pdf_create");
|
||||||
dolibarr_print_error($db,$obj->pdferror());
|
dolibarr_print_error($db,$obj->pdferror());
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@ -91,7 +91,7 @@ class pdf_sirocco extends ModelePDFDeliveryOrder
|
|||||||
|
|
||||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||||
// Force output charset to ISO, because, FPDF expect text encoded in ISO
|
// Force output charset to ISO, because, FPDF expect text encoded in ISO
|
||||||
$outputlangs->charset_output=$outputlangs->character_set_client='ISO-8859-1';
|
$outputlangs->charset_output='ISO-8859-1';
|
||||||
|
|
||||||
$outputlangs->load("main");
|
$outputlangs->load("main");
|
||||||
$outputlangs->load("bills");
|
$outputlangs->load("bills");
|
||||||
|
|||||||
@ -114,7 +114,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
|||||||
|
|
||||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||||
// Force output charset to ISO, because, FPDF expect text encoded in ISO
|
// Force output charset to ISO, because, FPDF expect text encoded in ISO
|
||||||
$outputlangs->charset_output=$outputlangs->character_set_client='ISO-8859-1';
|
$outputlangs->charset_output='ISO-8859-1';
|
||||||
|
|
||||||
$outputlangs->load("main");
|
$outputlangs->load("main");
|
||||||
$outputlangs->load("dict");
|
$outputlangs->load("dict");
|
||||||
|
|||||||
@ -156,11 +156,11 @@ class ModeleNumRefPropales
|
|||||||
\brief Crée une propale sur disque en fonction du modèle de PROPALE_ADDON_PDF
|
\brief Crée une propale sur disque en fonction du modèle de PROPALE_ADDON_PDF
|
||||||
\param db objet base de donnée
|
\param db objet base de donnée
|
||||||
\param id id de la propale à créer
|
\param id id de la propale à créer
|
||||||
\param modele force le modele à utiliser ('' par defaut)
|
\param modele force le modele à utiliser ('' to not force)
|
||||||
\param outputlangs objet lang a utiliser pour traduction
|
\param outputlangs objet lang a utiliser pour traduction
|
||||||
\return int 0 si KO, 1 si OK
|
\return int 0 si KO, 1 si OK
|
||||||
*/
|
*/
|
||||||
function propale_pdf_create($db, $id, $modele='', $outputlangs='')
|
function propale_pdf_create($db, $id, $modele, $outputlangs)
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
$langs->load("propale");
|
$langs->load("propale");
|
||||||
@ -200,15 +200,20 @@ function propale_pdf_create($db, $id, $modele='', $outputlangs='')
|
|||||||
|
|
||||||
$obj = new $classname($db);
|
$obj = new $classname($db);
|
||||||
|
|
||||||
|
// We save charset_output to restore it because write_file can change it if needed for
|
||||||
|
// output format that does not support UTF8.
|
||||||
|
$sav_charset_output=$outputlangs->charset_output;
|
||||||
if ($obj->write_file($id, $outputlangs) > 0)
|
if ($obj->write_file($id, $outputlangs) > 0)
|
||||||
{
|
{
|
||||||
|
$outputlangs->charset_output=$sav_charset_output;
|
||||||
// on supprime l'image correspondant au preview
|
// on supprime l'image correspondant au preview
|
||||||
propale_delete_preview($db, $id);
|
propale_delete_preview($db, $id);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dolibarr_syslog("Erreur dans propale_pdf_create");
|
$outputlangs->charset_output=$sav_charset_output;
|
||||||
|
dolibarr_syslog("modules_propale::propale_pdf_create error");
|
||||||
dolibarr_print_error($db,$obj->pdferror());
|
dolibarr_print_error($db,$obj->pdferror());
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -20,11 +20,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\file htdocs/includes/modules/propale/pdf_propale_azur.modules.php
|
* \file htdocs/includes/modules/propale/pdf_propale_azur.modules.php
|
||||||
\ingroup propale
|
* \ingroup propale
|
||||||
\brief Fichier de la classe permettant de générer les propales au modèle Azur
|
* \brief Fichier de la classe permettant de générer les propales au modèle Azur
|
||||||
\author Laurent Destailleur
|
* \author Laurent Destailleur
|
||||||
\version $Id$
|
* \version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once(DOL_DOCUMENT_ROOT."/includes/modules/propale/modules_propale.php");
|
require_once(DOL_DOCUMENT_ROOT."/includes/modules/propale/modules_propale.php");
|
||||||
@ -33,8 +33,8 @@ require_once(DOL_DOCUMENT_ROOT."/lib/company.lib.php");
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\class pdf_propale_azur
|
* \class pdf_propale_azur
|
||||||
\brief Classe permettant de générer les propales au modèle Azur
|
* \brief Classe permettant de générer les propales au modèle Azur
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class pdf_propale_azur extends ModelePDFPropales
|
class pdf_propale_azur extends ModelePDFPropales
|
||||||
@ -43,8 +43,8 @@ class pdf_propale_azur extends ModelePDFPropales
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\brief Constructeur
|
* \brief Constructeur
|
||||||
\param db Handler accès base de donnée
|
* \param db Handler accès base de donnée
|
||||||
*/
|
*/
|
||||||
function pdf_propale_azur($db)
|
function pdf_propale_azur($db)
|
||||||
{
|
{
|
||||||
@ -99,18 +99,19 @@ class pdf_propale_azur extends ModelePDFPropales
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\brief Fonction générant la propale sur le disque
|
* \brief Fonction générant la propale sur le disque
|
||||||
\param propale Objet propal à générer (ou id si ancienne methode)
|
* \param propale Objet propal à générer (ou id si ancienne methode)
|
||||||
\param outputlangs Lang object for output language
|
* \param outputlangs Lang object for output language
|
||||||
\return int 1=ok, 0=ko
|
* \return int 1=ok, 0=ko
|
||||||
*/
|
*/
|
||||||
function write_file($propale,$outputlangs='')
|
function write_file($propale,$outputlangs)
|
||||||
{
|
{
|
||||||
global $user,$langs,$conf;
|
global $user,$langs,$conf;
|
||||||
|
|
||||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||||
// Force output charset to ISO, because FPDF expect text to be encoded in ISO
|
// Force output charset to ISO, because FPDF expect text to be encoded in ISO
|
||||||
$outputlangs->charset_output=$outputlangs->character_set_client='ISO-8859-1';
|
$sav_charset_output=$outputlangs->charset_output;
|
||||||
|
$outputlangs->charset_output='ISO-8859-1';
|
||||||
|
|
||||||
$outputlangs->load("main");
|
$outputlangs->load("main");
|
||||||
$outputlangs->load("dict");
|
$outputlangs->load("dict");
|
||||||
@ -400,6 +401,7 @@ class pdf_propale_azur extends ModelePDFPropales
|
|||||||
if (! empty($conf->global->MAIN_UMASK))
|
if (! empty($conf->global->MAIN_UMASK))
|
||||||
@chmod($file, octdec($conf->global->MAIN_UMASK));
|
@chmod($file, octdec($conf->global->MAIN_UMASK));
|
||||||
|
|
||||||
|
$outputlangs->charset_output=$sav_charset_output;
|
||||||
$langs->setPhpLang(); // On restaure langue session
|
$langs->setPhpLang(); // On restaure langue session
|
||||||
return 1; // Pas d'erreur
|
return 1; // Pas d'erreur
|
||||||
}
|
}
|
||||||
|
|||||||
@ -94,8 +94,9 @@ class pdf_propale_jaune extends ModelePDFPropales
|
|||||||
global $user,$langs,$conf;
|
global $user,$langs,$conf;
|
||||||
|
|
||||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||||
// Force output charset to ISO, because, FPDF expect text encoded in ISO
|
// Force output charset to ISO, because FPDF expect text to be encoded in ISO
|
||||||
$outputlangs->charset_output=$outputlangs->character_set_client='ISO-8859-1';
|
$sav_charset_output=$outputlangs->charset_output;
|
||||||
|
$outputlangs->charset_output='ISO-8859-1';
|
||||||
|
|
||||||
$outputlangs->load("main");
|
$outputlangs->load("main");
|
||||||
$outputlangs->load("dict");
|
$outputlangs->load("dict");
|
||||||
@ -158,7 +159,7 @@ class pdf_propale_jaune extends ModelePDFPropales
|
|||||||
$pdf->AddPage();
|
$pdf->AddPage();
|
||||||
|
|
||||||
$pdf->SetTitle($propale->ref);
|
$pdf->SetTitle($propale->ref);
|
||||||
$pdf->SetSubject("Proposition commerciale");
|
$pdf->SetSubject($outputlangs->transnoentities("CommercialProposal"));
|
||||||
$pdf->SetCreator("Dolibarr ".DOL_VERSION);
|
$pdf->SetCreator("Dolibarr ".DOL_VERSION);
|
||||||
$pdf->SetAuthor($user->fullname);
|
$pdf->SetAuthor($user->fullname);
|
||||||
|
|
||||||
@ -227,7 +228,7 @@ class pdf_propale_jaune extends ModelePDFPropales
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->_tableau($pdf, $tab_top, $tab_height, $nexY);
|
$this->_tableau($pdf, $tab_top, $tab_height, $nexY, $outputlangs);
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@ -279,7 +280,7 @@ class pdf_propale_jaune extends ModelePDFPropales
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function _tableau(&$pdf, $tab_top, $tab_height, $nexY)
|
function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs)
|
||||||
{
|
{
|
||||||
global $langs,$conf;
|
global $langs,$conf;
|
||||||
$langs->load("main");
|
$langs->load("main");
|
||||||
@ -288,26 +289,26 @@ class pdf_propale_jaune extends ModelePDFPropales
|
|||||||
$pdf->SetFont('Arial','',11);
|
$pdf->SetFont('Arial','',11);
|
||||||
|
|
||||||
$pdf->SetXY(10,$tab_top);
|
$pdf->SetXY(10,$tab_top);
|
||||||
$pdf->MultiCell(20,10,$langs->transnoentities("Ref"),0,'C',1);
|
$pdf->MultiCell(20,10,$outputlangs->transnoentities("Ref"),0,'C',1);
|
||||||
|
|
||||||
$pdf->SetXY(30,$tab_top);
|
$pdf->SetXY(30,$tab_top);
|
||||||
$pdf->MultiCell(102,10,$langs->transnoentities("Designation"),0,'L',1);
|
$pdf->MultiCell(102,10,$outputlangs->transnoentities("Designation"),0,'L',1);
|
||||||
|
|
||||||
$pdf->line(132, $tab_top, 132, $tab_top + $tab_height);
|
$pdf->line(132, $tab_top, 132, $tab_top + $tab_height);
|
||||||
$pdf->SetXY(132,$tab_top);
|
$pdf->SetXY(132,$tab_top);
|
||||||
$pdf->MultiCell(12, 10,$langs->transnoentities("VAT"),0,'C',1);
|
$pdf->MultiCell(12, 10,$outputlangs->transnoentities("VAT"),0,'C',1);
|
||||||
|
|
||||||
$pdf->line(144, $tab_top, 144, $tab_top + $tab_height);
|
$pdf->line(144, $tab_top, 144, $tab_top + $tab_height);
|
||||||
$pdf->SetXY(144,$tab_top);
|
$pdf->SetXY(144,$tab_top);
|
||||||
$pdf->MultiCell(10,10,$langs->transnoentities("Qty"),0,'C',1);
|
$pdf->MultiCell(10,10,$outputlangs->transnoentities("Qty"),0,'C',1);
|
||||||
|
|
||||||
$pdf->line(154, $tab_top, 154, $tab_top + $tab_height);
|
$pdf->line(154, $tab_top, 154, $tab_top + $tab_height);
|
||||||
$pdf->SetXY(154,$tab_top);
|
$pdf->SetXY(154,$tab_top);
|
||||||
$pdf->MultiCell(22,10,$langs->transnoentities("PriceU"),0,'R',1);
|
$pdf->MultiCell(22,10,$outputlangs->transnoentities("PriceU"),0,'R',1);
|
||||||
|
|
||||||
$pdf->line(176, $tab_top, 176, $tab_top + $tab_height);
|
$pdf->line(176, $tab_top, 176, $tab_top + $tab_height);
|
||||||
$pdf->SetXY(176,$tab_top);
|
$pdf->SetXY(176,$tab_top);
|
||||||
$pdf->MultiCell(24,10,$langs->transnoentities("Total"),0,'R',1);
|
$pdf->MultiCell(24,10,$outputlangs->transnoentities("Total"),0,'R',1);
|
||||||
|
|
||||||
$pdf->Rect(10, $tab_top, 190, $tab_height);
|
$pdf->Rect(10, $tab_top, 190, $tab_height);
|
||||||
|
|
||||||
@ -315,6 +316,7 @@ class pdf_propale_jaune extends ModelePDFPropales
|
|||||||
$pdf->SetFont('Arial','',10);
|
$pdf->SetFont('Arial','',10);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function _pagehead(&$pdf, $propale, $outputlangs)
|
function _pagehead(&$pdf, $propale, $outputlangs)
|
||||||
{
|
{
|
||||||
//Affiche le filigrane brouillon - Print Draft Watermark
|
//Affiche le filigrane brouillon - Print Draft Watermark
|
||||||
@ -356,20 +358,20 @@ class pdf_propale_jaune extends ModelePDFPropales
|
|||||||
{
|
{
|
||||||
$pdf->SetX(12);
|
$pdf->SetX(12);
|
||||||
$pdf->SetFont('Arial','',10);
|
$pdf->SetFont('Arial','',10);
|
||||||
$pdf->MultiCell(76, 5, "T<EFBFBD>l : ".FAC_PDF_TEL);
|
$pdf->MultiCell(76, 5, $outputlangs->trans("Tel")." : ".FAC_PDF_TEL);
|
||||||
}
|
}
|
||||||
if (defined("MAIN_INFO_SIREN"))
|
if (defined("MAIN_INFO_SIREN"))
|
||||||
{
|
{
|
||||||
$pdf->SetX(12);
|
$pdf->SetX(12);
|
||||||
$pdf->SetFont('Arial','',10);
|
$pdf->SetFont('Arial','',10);
|
||||||
$pdf->MultiCell(76, 5, "SIREN : ".MAIN_INFO_SIREN);
|
$pdf->MultiCell(76, 5, $outputlangs->trans("SIREN")." : ".MAIN_INFO_SIREN);
|
||||||
}
|
}
|
||||||
$pdf->rect(10, 40, 80, 40);
|
$pdf->rect(10, 40, 80, 40);
|
||||||
|
|
||||||
$pdf->SetXY(10,5);
|
$pdf->SetXY(10,5);
|
||||||
$pdf->SetFont('Arial','B',16);
|
$pdf->SetFont('Arial','B',16);
|
||||||
$pdf->SetTextColor(0,0,200);
|
$pdf->SetTextColor(0,0,200);
|
||||||
$pdf->MultiCell(200, 20, "PROPOSITION COMMERCIALE", '' , 'C');
|
$pdf->MultiCell(200, 20, $outputlangs->transnoentities("CommercialProposal"), '' , 'C');
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Adresse Client
|
* Adresse Client
|
||||||
|
|||||||
@ -43,7 +43,6 @@ class pdf_paiement extends FPDF
|
|||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
|
|
||||||
$this->db = $db;
|
$this->db = $db;
|
||||||
$this->description = $langs->transnoentities("ListOfCustomerPayments");
|
|
||||||
|
|
||||||
// Dimension page pour format A4
|
// Dimension page pour format A4
|
||||||
$this->type = 'pdf';
|
$this->type = 'pdf';
|
||||||
@ -62,43 +61,45 @@ class pdf_paiement extends FPDF
|
|||||||
$this->tab_height = 230; //$this->line_height * $this->line_per_page;
|
$this->tab_height = 230; //$this->line_height * $this->line_per_page;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\brief Generate Header
|
\brief Generate Header
|
||||||
\param pdf pdf object
|
\param pdf pdf object
|
||||||
\param page current page number
|
\param page current page number
|
||||||
\param pages number of pages
|
\param pages number of pages
|
||||||
*/
|
*/
|
||||||
function Header(&$pdf, $page, $pages)
|
function Header(&$pdf, $page, $pages, $outputlangs)
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
$title=$this->description.' - '.dolibarr_print_date(dolibarr_mktime(0,0,0,$this->month,1,$this->year),"%B %Y");
|
$title=$outputlangs->transnoentities("ListOfCustomerPayments");
|
||||||
|
$title.=' - '.dolibarr_print_date(dolibarr_mktime(0,0,0,$this->month,1,$this->year),"%B %Y");
|
||||||
$pdf->SetFont('Arial','B',12);
|
$pdf->SetFont('Arial','B',12);
|
||||||
$pdf->Text(76, 10, $title);
|
$pdf->Text(76, 10, $title);
|
||||||
|
|
||||||
$pdf->SetFont('Arial','B',12);
|
$pdf->SetFont('Arial','B',12);
|
||||||
$pdf->Text(11, 16, $langs->transnoentities("Date")." : ".dolibarr_print_date(time(),"day"));
|
$pdf->Text(11, 16, $outputlangs->transnoentities("Date")." : ".dolibarr_print_date(time(),"day"));
|
||||||
|
|
||||||
$pdf->SetFont('Arial','',12);
|
$pdf->SetFont('Arial','',12);
|
||||||
$pdf->Text(11, 22, $langs->transnoentities("Page")." : ".$page);
|
$pdf->Text(11, 22, $outputlangs->transnoentities("Page")." : ".$page);
|
||||||
|
|
||||||
$pdf->SetFont('Arial','',12);
|
$pdf->SetFont('Arial','',12);
|
||||||
|
|
||||||
$pdf->Text(11,$this->tab_top + 6,'Date');
|
$pdf->Text(11,$this->tab_top + 6,'Date');
|
||||||
|
|
||||||
$pdf->line(40, $this->tab_top, 40, $this->tab_top + $this->tab_height + 10);
|
$pdf->line(40, $this->tab_top, 40, $this->tab_top + $this->tab_height + 10);
|
||||||
$pdf->Text(42, $this->tab_top + 6, $langs->transnoentities("PaymentMode"));
|
$pdf->Text(42, $this->tab_top + 6, $outputlangs->transnoentities("PaymentMode"));
|
||||||
|
|
||||||
$pdf->line(80, $this->tab_top, 80, $this->tab_top + $this->tab_height + 10);
|
$pdf->line(80, $this->tab_top, 80, $this->tab_top + $this->tab_height + 10);
|
||||||
$pdf->Text(82, $this->tab_top + 6, $langs->transnoentities("Invoice"));
|
$pdf->Text(82, $this->tab_top + 6, $outputlangs->transnoentities("Invoice"));
|
||||||
|
|
||||||
$pdf->line(120, $this->tab_top, 120, $this->tab_top + $this->tab_height + 10);
|
$pdf->line(120, $this->tab_top, 120, $this->tab_top + $this->tab_height + 10);
|
||||||
$pdf->Text(122, $this->tab_top + 6, $langs->transnoentities("AmountInvoice"));
|
$pdf->Text(122, $this->tab_top + 6, $outputlangs->transnoentities("AmountInvoice"));
|
||||||
|
|
||||||
$pdf->line(160, $this->tab_top, 160, $this->tab_top + $this->tab_height + 10);
|
$pdf->line(160, $this->tab_top, 160, $this->tab_top + $this->tab_height + 10);
|
||||||
|
|
||||||
$pdf->SetXY (160, $this->tab_top);
|
$pdf->SetXY (160, $this->tab_top);
|
||||||
$pdf->MultiCell(40, 10, $langs->transnoentities("AmountPayment"), 0, 'R');
|
$pdf->MultiCell(40, 10, $outputlangs->transnoentities("AmountPayment"), 0, 'R');
|
||||||
|
|
||||||
$pdf->line(10, $this->tab_top + 10, 200, $this->tab_top + 10 );
|
$pdf->line(10, $this->tab_top + 10, 200, $this->tab_top + 10 );
|
||||||
|
|
||||||
@ -106,7 +107,7 @@ class pdf_paiement extends FPDF
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function Body(&$pdf, $page, $lines)
|
function Body(&$pdf, $page, $lines, $outputlangs)
|
||||||
{
|
{
|
||||||
$pdf->SetFont('Arial','', 9);
|
$pdf->SetFont('Arial','', 9);
|
||||||
$oldprowid = 0;
|
$oldprowid = 0;
|
||||||
@ -163,13 +164,13 @@ class pdf_paiement extends FPDF
|
|||||||
\param month mois du rapport
|
\param month mois du rapport
|
||||||
\param year annee du rapport
|
\param year annee du rapport
|
||||||
*/
|
*/
|
||||||
function write_file($_dir, $month, $year, $outputlangs='')
|
function write_file($_dir, $month, $year, $outputlangs)
|
||||||
{
|
{
|
||||||
global $user,$langs,$conf;
|
global $user,$langs,$conf;
|
||||||
|
|
||||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||||
// Force output charset to ISO, because FPDF expect text to be encoded in ISO
|
// Force output charset to ISO, because FPDF expect text to be encoded in ISO
|
||||||
$outputlangs->charset_output=$outputlangs->character_set_client='ISO-8859-1';
|
$outputlangs->charset_output='ISO-8859-1';
|
||||||
|
|
||||||
$outputlangs->setPhpLang();
|
$outputlangs->setPhpLang();
|
||||||
|
|
||||||
@ -274,9 +275,9 @@ class pdf_paiement extends FPDF
|
|||||||
|
|
||||||
$pdf->AddPage();
|
$pdf->AddPage();
|
||||||
|
|
||||||
$this->Header($pdf, 1, $pages);
|
$this->Header($pdf, 1, $pages, $outputlangs);
|
||||||
|
|
||||||
$this->Body($pdf, 1, $lines);
|
$this->Body($pdf, 1, $lines, $outputlangs);
|
||||||
|
|
||||||
$pdf->Output($_file);
|
$pdf->Output($_file);
|
||||||
if (! empty($conf->global->MAIN_UMASK))
|
if (! empty($conf->global->MAIN_UMASK))
|
||||||
|
|||||||
@ -33,7 +33,7 @@ require_once(DOL_DOCUMENT_ROOT.'/includes/fpdf/fpdfi/fpdi_protection.php');
|
|||||||
/**
|
/**
|
||||||
\class ModelePDFSuppliersorders
|
\class ModelePDFSuppliersorders
|
||||||
\brief Classe mère des modèles de commandes fournisseurs
|
\brief Classe mère des modèles de commandes fournisseurs
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class ModelePDFSuppliersOrders extends FPDF
|
class ModelePDFSuppliersOrders extends FPDF
|
||||||
{
|
{
|
||||||
@ -85,7 +85,7 @@ class ModelePDFSuppliersOrders extends FPDF
|
|||||||
/**
|
/**
|
||||||
\class ModeleNumRefSuppliersOrders
|
\class ModeleNumRefSuppliersOrders
|
||||||
\brief Classe mère des modèles de numérotation des références de commandes fournisseurs
|
\brief Classe mère des modèles de numérotation des références de commandes fournisseurs
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class ModeleNumRefSuppliersOrders
|
class ModeleNumRefSuppliersOrders
|
||||||
{
|
{
|
||||||
@ -153,7 +153,15 @@ class ModeleNumRefSuppliersOrders
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function supplier_order_pdf_create($db, $comid, $modele='',$outputlangs='')
|
/**
|
||||||
|
* \brief Create object on disk
|
||||||
|
* \param db objet base de donnée
|
||||||
|
* \param deliveryid id object
|
||||||
|
* \param modele force le modele à utiliser ('' to not force)
|
||||||
|
* \param outputlangs objet lang a utiliser pour traduction
|
||||||
|
* \return int 0 si KO, 1 si OK
|
||||||
|
*/
|
||||||
|
function supplier_order_pdf_create($db, $comid, $modele,$outputlangs)
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
$langs->load("suppliers");
|
$langs->load("suppliers");
|
||||||
@ -182,14 +190,20 @@ function supplier_order_pdf_create($db, $comid, $modele='',$outputlangs='')
|
|||||||
|
|
||||||
$obj = new $classname($db);
|
$obj = new $classname($db);
|
||||||
|
|
||||||
|
// We save charset_output to restore it because write_file can change it if needed for
|
||||||
|
// output format that does not support UTF8.
|
||||||
|
$sav_charset_output=$outputlangs->charset_output;
|
||||||
if ($obj->write_file($comid,$outputlangs) > 0)
|
if ($obj->write_file($comid,$outputlangs) > 0)
|
||||||
{
|
{
|
||||||
// on supprime l'image correspondant au preview
|
// on supprime l'image correspondant au preview
|
||||||
supplier_order_delete_preview($db, $comid);
|
supplier_order_delete_preview($db, $comid);
|
||||||
|
|
||||||
|
$outputlangs->charset_output=$sav_charset_output;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
$outputlangs->charset_output=$sav_charset_output;
|
||||||
dolibarr_syslog("Erreur dans supplier_order_pdf_create");
|
dolibarr_syslog("Erreur dans supplier_order_pdf_create");
|
||||||
dolibarr_print_error($db,$obj->pdferror());
|
dolibarr_print_error($db,$obj->pdferror());
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@ -112,7 +112,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||||||
|
|
||||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||||
// Force output charset to ISO, because, FPDF expect text encoded in ISO
|
// Force output charset to ISO, because, FPDF expect text encoded in ISO
|
||||||
$outputlangs->charset_output=$outputlangs->character_set_client='ISO-8859-1';
|
$outputlangs->charset_output='ISO-8859-1';
|
||||||
|
|
||||||
$outputlangs->load("main");
|
$outputlangs->load("main");
|
||||||
$outputlangs->load("companies");
|
$outputlangs->load("companies");
|
||||||
|
|||||||
@ -156,7 +156,7 @@ if ($_POST["action"] == "set")
|
|||||||
$requestnb++;
|
$requestnb++;
|
||||||
if ($conf->character_set_client == "UTF-8")
|
if ($conf->character_set_client == "UTF-8")
|
||||||
{
|
{
|
||||||
$buffer=utf8_encode ($buffer);
|
$buffer=utf8_encode($buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
dolibarr_install_syslog("Request: ".$buffer,LOG_DEBUG);
|
dolibarr_install_syslog("Request: ".$buffer,LOG_DEBUG);
|
||||||
@ -268,7 +268,7 @@ if ($_POST["action"] == "set")
|
|||||||
$requestnb++;
|
$requestnb++;
|
||||||
if ($conf->character_set_client == "UTF-8")
|
if ($conf->character_set_client == "UTF-8")
|
||||||
{
|
{
|
||||||
$buffer=utf8_encode ($buffer);
|
$buffer=utf8_encode($buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
dolibarr_install_syslog("Request: ".$buffer,LOG_DEBUG);
|
dolibarr_install_syslog("Request: ".$buffer,LOG_DEBUG);
|
||||||
|
|||||||
@ -97,6 +97,7 @@ OrderMode=Order method
|
|||||||
AuthorRequest=Request author
|
AuthorRequest=Request author
|
||||||
UseCustomerContactAsOrderRecipientIfExist=Use customer contact address if defined instead of third party address as order recipient address
|
UseCustomerContactAsOrderRecipientIfExist=Use customer contact address if defined instead of third party address as order recipient address
|
||||||
RunningOrders=Orders on process
|
RunningOrders=Orders on process
|
||||||
|
UserWithApproveOrderGrant=Useres granted with "approve orders" permission.
|
||||||
|
|
||||||
Error_COMMANDE_SUPPLIER_ADDON_NotDefined=Constant COMMANDE_SUPPLIER_ADDON not defined
|
Error_COMMANDE_SUPPLIER_ADDON_NotDefined=Constant COMMANDE_SUPPLIER_ADDON not defined
|
||||||
Error_COMMANDE_ADDON_NotDefined=Constant COMMANDE_ADDON not defined
|
Error_COMMANDE_ADDON_NotDefined=Constant COMMANDE_ADDON not defined
|
||||||
|
|||||||
@ -97,6 +97,7 @@ OrderMode=M
|
|||||||
AuthorRequest=Auteur/Demandeur
|
AuthorRequest=Auteur/Demandeur
|
||||||
UseCustomerContactAsOrderRecipientIfExist=Utiliser adresse contact suivi client si défini plutot que adresse tiers comme destinataire des commandes
|
UseCustomerContactAsOrderRecipientIfExist=Utiliser adresse contact suivi client si défini plutot que adresse tiers comme destinataire des commandes
|
||||||
RunningOrders=Commandes en cours
|
RunningOrders=Commandes en cours
|
||||||
|
UserWithApproveOrderGrant=Utilisateurs habilités à approuver les commandes
|
||||||
|
|
||||||
Error_COMMANDE_SUPPLIER_ADDON_NotDefined=Constante COMMANDE_SUPPLIER_ADDON non définie
|
Error_COMMANDE_SUPPLIER_ADDON_NotDefined=Constante COMMANDE_SUPPLIER_ADDON non définie
|
||||||
Error_COMMANDE_ADDON_NotDefined=Constante COMMANDE_ADDON non définie
|
Error_COMMANDE_ADDON_NotDefined=Constante COMMANDE_ADDON non définie
|
||||||
|
|||||||
@ -788,8 +788,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
|
|||||||
{
|
{
|
||||||
print "<head>\n";
|
print "<head>\n";
|
||||||
|
|
||||||
print $langs->lang_header();
|
print "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=".$conf->character_set_client."\">\n";
|
||||||
print $head;
|
|
||||||
|
|
||||||
// Affiche meta
|
// Affiche meta
|
||||||
print '<meta name="robots" content="noindex,nofollow">'."\n"; // Evite indexation par robots
|
print '<meta name="robots" content="noindex,nofollow">'."\n"; // Evite indexation par robots
|
||||||
|
|||||||
@ -456,17 +456,6 @@ class Translate {
|
|||||||
return $langs_available;
|
return $langs_available;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* \brief Exp<EFBFBD>die le header correct et retourne le d<EFBFBD>but de la page html
|
|
||||||
* [en] Send header and return a string of html start page
|
|
||||||
* \return string html header avec charset
|
|
||||||
*/
|
|
||||||
function lang_header()
|
|
||||||
{
|
|
||||||
$texte = "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=".$this->charset_output."\">\n";
|
|
||||||
return $texte;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Renvoi si le fichier $filename existe dans la version de la langue courante ou alternative
|
* \brief Renvoi si le fichier $filename existe dans la version de la langue courante ou alternative
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user