Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
4128cee3ee
@ -99,12 +99,9 @@ class CommActionRapport
|
||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
||||
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
|
||||
|
||||
$outputlangs->load("main");
|
||||
$outputlangs->load("dict");
|
||||
$outputlangs->load("companies");
|
||||
$outputlangs->load("bills");
|
||||
$outputlangs->load("products");
|
||||
|
||||
// Load traductions files requiredby by page
|
||||
$outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products"));
|
||||
|
||||
$dir = $conf->agenda->dir_temp."/";
|
||||
$file = $dir . "actions-".$this->month."-".$this->year.".pdf";
|
||||
|
||||
@ -99,11 +99,9 @@ class pdf_ban extends ModeleBankAccountDoc
|
||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
||||
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
|
||||
|
||||
$outputlangs->load("main");
|
||||
$outputlangs->load("dict");
|
||||
$outputlangs->load("companies");
|
||||
$outputlangs->load("projects");
|
||||
|
||||
// Load traductions files requiredby by page
|
||||
$outputlangs->loadLangs(array("main", "dict", "companies", "projects"));
|
||||
|
||||
if ($conf->bank->dir_output)
|
||||
{
|
||||
|
||||
@ -44,9 +44,9 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
|
||||
function __construct($db)
|
||||
{
|
||||
global $conf,$langs,$mysoc;
|
||||
|
||||
$langs->load("main");
|
||||
$langs->load("bills");
|
||||
|
||||
// Load traductions files requiredby by page
|
||||
$langs->loadLangs(array("main", "bills"));
|
||||
|
||||
$this->db = $db;
|
||||
$this->name = "blochet";
|
||||
@ -91,12 +91,9 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
|
||||
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
||||
$sav_charset_output=$outputlangs->charset_output;
|
||||
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
|
||||
|
||||
$outputlangs->load("main");
|
||||
$outputlangs->load("companies");
|
||||
$outputlangs->load("bills");
|
||||
$outputlangs->load("products");
|
||||
$outputlangs->load("compta");
|
||||
|
||||
// Load traductions files requiredby by page
|
||||
$outputlangs->loadLangs(array("main", "companies", "bills", "products", "compta"));
|
||||
|
||||
$dir = $_dir . "/".get_exdir($number,0,1,0,$object,'cheque').$number;
|
||||
|
||||
@ -213,9 +210,9 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
|
||||
{
|
||||
global $langs;
|
||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||
|
||||
$outputlangs->load("compta");
|
||||
$outputlangs->load("banks");
|
||||
|
||||
// Load traductions files requiredby by page
|
||||
$outputlangs->loadLangs(array("compta", "banks"));
|
||||
|
||||
$title = $outputlangs->transnoentities("CheckReceipt");
|
||||
$pdf->SetFont('','B', $default_font_size);
|
||||
@ -391,4 +388,3 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
|
||||
return pdf_pagefoot($pdf,$outputlangs,$newfreetext,$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,$showdetails,$hidefreetext);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -68,24 +68,55 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
|
||||
/**
|
||||
* @var array() Minimum version of PHP required by module.
|
||||
* e.g.: PHP ≥ 5.3 = array(5, 3)
|
||||
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||
*/
|
||||
public $phpmin = array(5, 2);
|
||||
public $phpmin = array(5, 4);
|
||||
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
* @public string
|
||||
*/
|
||||
public $version = 'dolibarr';
|
||||
|
||||
|
||||
/**
|
||||
* @var int page_largeur
|
||||
*/
|
||||
public $page_largeur;
|
||||
|
||||
/**
|
||||
* @var int page_hauteur
|
||||
*/
|
||||
public $page_hauteur;
|
||||
|
||||
/**
|
||||
* @var array format
|
||||
*/
|
||||
public $format;
|
||||
|
||||
/**
|
||||
* @var int marge_gauche
|
||||
*/
|
||||
public $marge_gauche;
|
||||
|
||||
/**
|
||||
* @var int marge_droite
|
||||
*/
|
||||
public $marge_droite;
|
||||
|
||||
/**
|
||||
* @var int marge_haute
|
||||
*/
|
||||
public $marge_haute;
|
||||
|
||||
/**
|
||||
* @var int marge_basse
|
||||
*/
|
||||
public $marge_basse;
|
||||
|
||||
|
||||
/**
|
||||
* Issuer
|
||||
* @var Societe
|
||||
*/
|
||||
public $emetteur; // Objet societe qui emet
|
||||
|
||||
|
||||
|
||||
@ -39,21 +39,72 @@ require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||
*/
|
||||
class pdf_strato extends ModelePDFContract
|
||||
{
|
||||
var $db;
|
||||
var $name;
|
||||
var $description;
|
||||
var $type;
|
||||
/**
|
||||
* @var DoliDb Database handler
|
||||
*/
|
||||
public $db;
|
||||
|
||||
/**
|
||||
* @var string model name
|
||||
*/
|
||||
public $name;
|
||||
|
||||
/**
|
||||
* @var string model description (short text)
|
||||
*/
|
||||
public $description;
|
||||
|
||||
/**
|
||||
* @var string document type
|
||||
*/
|
||||
public $type;
|
||||
|
||||
var $phpmin = array(4,3,0); // Minimum version of PHP required by module
|
||||
var $version = 'dolibarr';
|
||||
/**
|
||||
* @var array() Minimum version of PHP required by module.
|
||||
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||
*/
|
||||
public $phpmin = array(5, 4);
|
||||
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
* @public string
|
||||
*/
|
||||
public $version = 'dolibarr';
|
||||
|
||||
var $page_largeur;
|
||||
var $page_hauteur;
|
||||
var $format;
|
||||
var $marge_gauche;
|
||||
var $marge_droite;
|
||||
var $marge_haute;
|
||||
var $marge_basse;
|
||||
/**
|
||||
* @var int page_largeur
|
||||
*/
|
||||
public $page_largeur;
|
||||
|
||||
/**
|
||||
* @var int page_hauteur
|
||||
*/
|
||||
public $page_hauteur;
|
||||
|
||||
/**
|
||||
* @var array format
|
||||
*/
|
||||
public $format;
|
||||
|
||||
/**
|
||||
* @var int marge_gauche
|
||||
*/
|
||||
public $marge_gauche;
|
||||
|
||||
/**
|
||||
* @var int marge_droite
|
||||
*/
|
||||
public $marge_droite;
|
||||
|
||||
/**
|
||||
* @var int marge_haute
|
||||
*/
|
||||
public $marge_haute;
|
||||
|
||||
/**
|
||||
* @var int marge_basse
|
||||
*/
|
||||
public $marge_basse;
|
||||
|
||||
/**
|
||||
* Issuer
|
||||
|
||||
@ -33,11 +33,82 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
|
||||
|
||||
|
||||
/**
|
||||
* Classe permettant de generer les borderaux envoi au modele Merou
|
||||
* Class to build sending documents with model Merou
|
||||
*/
|
||||
class pdf_merou extends ModelePdfExpedition
|
||||
{
|
||||
var $emetteur; // Objet societe qui emet
|
||||
/**
|
||||
* @var DoliDb Database handler
|
||||
*/
|
||||
public $db;
|
||||
|
||||
/**
|
||||
* @var string model name
|
||||
*/
|
||||
public $name;
|
||||
|
||||
/**
|
||||
* @var string model description (short text)
|
||||
*/
|
||||
public $description;
|
||||
|
||||
/**
|
||||
* @var string document type
|
||||
*/
|
||||
public $type;
|
||||
|
||||
/**
|
||||
* @var array() Minimum version of PHP required by module.
|
||||
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||
*/
|
||||
public $phpmin = array(5, 4);
|
||||
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
* @public string
|
||||
*/
|
||||
public $version = 'dolibarr';
|
||||
|
||||
/**
|
||||
* @var int page_largeur
|
||||
*/
|
||||
public $page_largeur;
|
||||
|
||||
/**
|
||||
* @var int page_hauteur
|
||||
*/
|
||||
public $page_hauteur;
|
||||
|
||||
/**
|
||||
* @var array format
|
||||
*/
|
||||
public $format;
|
||||
|
||||
/**
|
||||
* @var int marge_gauche
|
||||
*/
|
||||
public $marge_gauche;
|
||||
|
||||
/**
|
||||
* @var int marge_droite
|
||||
*/
|
||||
public $marge_droite;
|
||||
|
||||
/**
|
||||
* @var int marge_haute
|
||||
*/
|
||||
public $marge_haute;
|
||||
|
||||
/**
|
||||
* @var int marge_basse
|
||||
*/
|
||||
public $marge_basse;
|
||||
|
||||
/**
|
||||
* Issuer
|
||||
* @var Societe
|
||||
*/
|
||||
public $emetteur;
|
||||
|
||||
|
||||
/**
|
||||
@ -65,7 +136,7 @@ class pdf_merou extends ModelePdfExpedition
|
||||
|
||||
$this->option_logo = 1;
|
||||
|
||||
// Recupere emmetteur
|
||||
// Get source company
|
||||
$this->emetteur=$mysoc;
|
||||
if (! $this->emetteur->country_code) $this->emetteur->country_code=substr($langs->defaultlang,-2); // By default if not defined
|
||||
}
|
||||
|
||||
@ -32,11 +32,82 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
|
||||
|
||||
|
||||
/**
|
||||
* Classe permettant de generer les borderaux envoi au modele Rouget
|
||||
* Class to build sending documents with model Rouget
|
||||
*/
|
||||
class pdf_rouget extends ModelePdfExpedition
|
||||
{
|
||||
var $emetteur; // Objet societe qui emet
|
||||
/**
|
||||
* @var DoliDb Database handler
|
||||
*/
|
||||
public $db;
|
||||
|
||||
/**
|
||||
* @var string model name
|
||||
*/
|
||||
public $name;
|
||||
|
||||
/**
|
||||
* @var string model description (short text)
|
||||
*/
|
||||
public $description;
|
||||
|
||||
/**
|
||||
* @var string document type
|
||||
*/
|
||||
public $type;
|
||||
|
||||
/**
|
||||
* @var array() Minimum version of PHP required by module.
|
||||
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||
*/
|
||||
public $phpmin = array(5, 4);
|
||||
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
* @public string
|
||||
*/
|
||||
public $version = 'dolibarr';
|
||||
|
||||
/**
|
||||
* @var int page_largeur
|
||||
*/
|
||||
public $page_largeur;
|
||||
|
||||
/**
|
||||
* @var int page_hauteur
|
||||
*/
|
||||
public $page_hauteur;
|
||||
|
||||
/**
|
||||
* @var array format
|
||||
*/
|
||||
public $format;
|
||||
|
||||
/**
|
||||
* @var int marge_gauche
|
||||
*/
|
||||
public $marge_gauche;
|
||||
|
||||
/**
|
||||
* @var int marge_droite
|
||||
*/
|
||||
public $marge_droite;
|
||||
|
||||
/**
|
||||
* @var int marge_haute
|
||||
*/
|
||||
public $marge_haute;
|
||||
|
||||
/**
|
||||
* @var int marge_basse
|
||||
*/
|
||||
public $marge_basse;
|
||||
|
||||
/**
|
||||
* Issuer
|
||||
* @var Societe
|
||||
*/
|
||||
public $emetteur; // Objet societe qui emet
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@ -58,18 +58,58 @@ class pdf_standard extends ModeleExpenseReport
|
||||
*/
|
||||
public $type;
|
||||
|
||||
var $phpmin = array(4,3,0); // Minimum version of PHP required by module
|
||||
var $version = 'dolibarr';
|
||||
/**
|
||||
* @var array() Minimum version of PHP required by module.
|
||||
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||
*/
|
||||
public $phpmin = array(5, 4);
|
||||
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
* @public string
|
||||
*/
|
||||
public $version = 'dolibarr';
|
||||
|
||||
var $page_largeur;
|
||||
var $page_hauteur;
|
||||
var $format;
|
||||
var $marge_gauche;
|
||||
var $marge_droite;
|
||||
var $marge_haute;
|
||||
var $marge_basse;
|
||||
|
||||
var $emetteur; // Objet societe qui emet
|
||||
/**
|
||||
* @var int page_largeur
|
||||
*/
|
||||
public $page_largeur;
|
||||
|
||||
/**
|
||||
* @var int page_hauteur
|
||||
*/
|
||||
public $page_hauteur;
|
||||
|
||||
/**
|
||||
* @var array format
|
||||
*/
|
||||
public $format;
|
||||
|
||||
/**
|
||||
* @var int marge_gauche
|
||||
*/
|
||||
public $marge_gauche;
|
||||
|
||||
/**
|
||||
* @var int marge_droite
|
||||
*/
|
||||
public $marge_droite;
|
||||
|
||||
/**
|
||||
* @var int marge_haute
|
||||
*/
|
||||
public $marge_haute;
|
||||
|
||||
/**
|
||||
* @var int marge_basse
|
||||
*/
|
||||
public $marge_basse;
|
||||
|
||||
/**
|
||||
* Issuer
|
||||
* @var Societe
|
||||
*/
|
||||
public $emetteur; // Objet societe qui emet
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@ -69,24 +69,55 @@ class pdf_crabe extends ModelePDFFactures
|
||||
|
||||
/**
|
||||
* @var array() Minimum version of PHP required by module.
|
||||
* e.g.: PHP ≥ 5.3 = array(5, 3)
|
||||
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||
*/
|
||||
public $phpmin = array(5, 2);
|
||||
|
||||
public $phpmin = array(5, 4);
|
||||
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
* @public string
|
||||
*/
|
||||
public $version = 'dolibarr';
|
||||
|
||||
/**
|
||||
* @var int page_largeur
|
||||
*/
|
||||
public $page_largeur;
|
||||
|
||||
/**
|
||||
* @var int page_hauteur
|
||||
*/
|
||||
public $page_hauteur;
|
||||
|
||||
/**
|
||||
* @var array format
|
||||
*/
|
||||
public $format;
|
||||
|
||||
/**
|
||||
* @var int marge_gauche
|
||||
*/
|
||||
public $marge_gauche;
|
||||
|
||||
/**
|
||||
* @var int marge_droite
|
||||
*/
|
||||
public $marge_droite;
|
||||
|
||||
/**
|
||||
* @var int marge_haute
|
||||
*/
|
||||
public $marge_haute;
|
||||
|
||||
/**
|
||||
* @var int marge_basse
|
||||
*/
|
||||
public $marge_basse;
|
||||
|
||||
|
||||
/**
|
||||
* Issuer
|
||||
* @var Societe
|
||||
*/
|
||||
public $emetteur; // Objet societe qui emet
|
||||
|
||||
/**
|
||||
|
||||
@ -38,21 +38,78 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
*/
|
||||
class pdf_soleil extends ModelePDFFicheinter
|
||||
{
|
||||
var $db;
|
||||
var $name;
|
||||
var $description;
|
||||
var $type;
|
||||
/**
|
||||
* @var DoliDb Database handler
|
||||
*/
|
||||
public $db;
|
||||
|
||||
var $phpmin = array(4,3,0); // Minimum version of PHP required by module
|
||||
var $version = 'dolibarr';
|
||||
/**
|
||||
* @var string model name
|
||||
*/
|
||||
public $name;
|
||||
|
||||
var $page_largeur;
|
||||
var $page_hauteur;
|
||||
var $format;
|
||||
var $marge_gauche;
|
||||
var $marge_droite;
|
||||
var $marge_haute;
|
||||
var $marge_basse;
|
||||
/**
|
||||
* @var string model description (short text)
|
||||
*/
|
||||
public $description;
|
||||
|
||||
/**
|
||||
* @var string document type
|
||||
*/
|
||||
public $type;
|
||||
|
||||
/**
|
||||
* @var array() Minimum version of PHP required by module.
|
||||
* e.g.: PHP ≥ 5.4 = array(5, 4)
|
||||
*/
|
||||
public $phpmin = array(5, 4);
|
||||
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
* @public string
|
||||
*/
|
||||
public $version = 'dolibarr';
|
||||
|
||||
/**
|
||||
* @var int page_largeur
|
||||
*/
|
||||
public $page_largeur;
|
||||
|
||||
/**
|
||||
* @var int page_hauteur
|
||||
*/
|
||||
public $page_hauteur;
|
||||
|
||||
/**
|
||||
* @var array format
|
||||
*/
|
||||
public $format;
|
||||
|
||||
/**
|
||||
* @var int marge_gauche
|
||||
*/
|
||||
public $marge_gauche;
|
||||
|
||||
/**
|
||||
* @var int marge_droite
|
||||
*/
|
||||
public $marge_droite;
|
||||
|
||||
/**
|
||||
* @var int marge_haute
|
||||
*/
|
||||
public $marge_haute;
|
||||
|
||||
/**
|
||||
* @var int marge_basse
|
||||
*/
|
||||
public $marge_basse;
|
||||
|
||||
/**
|
||||
* Issuer
|
||||
* @var Societe
|
||||
*/
|
||||
public $emetteur; // Objet societe qui emet
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
@ -495,11 +552,9 @@ class pdf_soleil extends ModelePDFFicheinter
|
||||
{
|
||||
global $conf,$langs;
|
||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||
|
||||
$outputlangs->load("main");
|
||||
$outputlangs->load("dict");
|
||||
$outputlangs->load("companies");
|
||||
$outputlangs->load("interventions");
|
||||
|
||||
// Load traductions files requiredby by page
|
||||
$outputlangs->loadLangs(array("main", "dict", "companies", "interventions"));
|
||||
|
||||
pdf_pagehead($pdf,$outputlangs,$this->page_hauteur);
|
||||
|
||||
|
||||
@ -323,12 +323,9 @@ class pdf_standard extends CommonStickerGenerator
|
||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
||||
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
|
||||
|
||||
$outputlangs->load("main");
|
||||
$outputlangs->load("dict");
|
||||
$outputlangs->load("companies");
|
||||
$outputlangs->load("admin");
|
||||
$outputlangs->load("members");
|
||||
|
||||
// Load traductions files requiredby by page
|
||||
$outputlangs->loadLangs(array("main", "dict", "companies", "admin", "members"));
|
||||
|
||||
if (empty($mode) || $mode == 'member')
|
||||
{
|
||||
|
||||
@ -254,11 +254,9 @@ class pdf_standardlabel extends CommonStickerGenerator
|
||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
||||
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
|
||||
|
||||
$outputlangs->load("main");
|
||||
$outputlangs->load("dict");
|
||||
$outputlangs->load("companies");
|
||||
$outputlangs->load("admin");
|
||||
|
||||
// Load traductions files requiredby by page
|
||||
$outputlangs->loadLangs(array("main", "dict", "companies", "admin"));
|
||||
|
||||
$title=$outputlangs->transnoentities('Labels');
|
||||
$keywords=$title." ".$outputlangs->convToOutputCharset($mysoc->name);
|
||||
|
||||
@ -295,11 +295,9 @@ class pdf_tcpdflabel extends CommonStickerGenerator
|
||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
||||
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
|
||||
|
||||
$outputlangs->load("main");
|
||||
$outputlangs->load("dict");
|
||||
$outputlangs->load("companies");
|
||||
$outputlangs->load("admin");
|
||||
|
||||
// Load traductions files requiredby by page
|
||||
$outputlangs->loadLangs(array("main", "dict", "companies", "admin"));
|
||||
|
||||
$title=$outputlangs->transnoentities('Labels');
|
||||
$keywords=$title." ".$outputlangs->convToOutputCharset($mysoc->name);
|
||||
|
||||
@ -87,9 +87,9 @@ class pdf_standard extends ModelePDFProduct
|
||||
public function __construct($db)
|
||||
{
|
||||
global $conf,$langs,$mysoc;
|
||||
|
||||
$langs->load("main");
|
||||
$langs->load("companies");
|
||||
|
||||
// Load traductions files requiredby by page
|
||||
$langs->loadLangs(array("main", "companies"));
|
||||
|
||||
$this->db = $db;
|
||||
$this->name = "standard";
|
||||
@ -135,14 +135,9 @@ class pdf_standard extends ModelePDFProduct
|
||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
||||
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
|
||||
|
||||
$outputlangs->load("main");
|
||||
$outputlangs->load("dict");
|
||||
$outputlangs->load("companies");
|
||||
$outputlangs->load("bills");
|
||||
$outputlangs->load("products");
|
||||
$outputlangs->load("orders");
|
||||
$outputlangs->load("deliveries");
|
||||
|
||||
// Load traductions files requiredby by page
|
||||
$outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products", "orders", "deliveries"));
|
||||
|
||||
$nblignes = count($object->lines);
|
||||
|
||||
@ -687,12 +682,10 @@ class pdf_standard extends ModelePDFProduct
|
||||
function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlekey="")
|
||||
{
|
||||
global $conf,$langs,$hookmanager;
|
||||
|
||||
// Load traductions files requiredby by page
|
||||
$outputlangs->loadLangs(array("main", "propal", "companies", "bills", "orders"));
|
||||
|
||||
$outputlangs->load("main");
|
||||
$outputlangs->load("bills");
|
||||
$outputlangs->load("propal");
|
||||
$outputlangs->load("companies");
|
||||
$outputlangs->load("orders");
|
||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||
|
||||
if ($object->type == 1) $titlekey='ServiceSheet';
|
||||
|
||||
@ -179,11 +179,9 @@ class pdf_baleine extends ModelePDFProjects
|
||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
||||
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
|
||||
|
||||
$outputlangs->load("main");
|
||||
$outputlangs->load("dict");
|
||||
$outputlangs->load("companies");
|
||||
$outputlangs->load("projects");
|
||||
|
||||
// Load traductions files requiredby by page
|
||||
$outputlangs->loadLangs(array("main", "dict", "companies", "projects"));
|
||||
|
||||
if ($conf->projet->dir_output)
|
||||
{
|
||||
|
||||
@ -126,11 +126,9 @@ class pdf_beluga extends ModelePDFProjects
|
||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
||||
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
|
||||
|
||||
$outputlangs->load("main");
|
||||
$outputlangs->load("dict");
|
||||
$outputlangs->load("companies");
|
||||
$outputlangs->load("projects");
|
||||
|
||||
// Load traductions files requiredby by page
|
||||
$outputlangs->loadLangs(array("main", "dict", "companies", "projects"));
|
||||
|
||||
if ($conf->projet->dir_output)
|
||||
{
|
||||
|
||||
@ -107,11 +107,9 @@ class pdf_timespent extends ModelePDFProjects
|
||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
||||
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
|
||||
|
||||
$outputlangs->load("main");
|
||||
$outputlangs->load("dict");
|
||||
$outputlangs->load("companies");
|
||||
$outputlangs->load("projects");
|
||||
|
||||
// Load traductions files requiredby by page
|
||||
$outputlangs->loadLangs(array("main", "dict", "companies", "projects"));
|
||||
|
||||
if ($conf->projet->dir_output)
|
||||
{
|
||||
|
||||
@ -219,13 +219,9 @@ class pdf_azur extends ModelePDFPropales
|
||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
||||
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
|
||||
|
||||
$outputlangs->load("main");
|
||||
$outputlangs->load("dict");
|
||||
$outputlangs->load("companies");
|
||||
$outputlangs->load("bills");
|
||||
$outputlangs->load("propal");
|
||||
$outputlangs->load("products");
|
||||
|
||||
// Load traductions files requiredby by page
|
||||
$outputlangs->loadLangs(array("main", "dict", "companies", "bills", "propal", "products"));
|
||||
|
||||
$nblignes = count($object->lines);
|
||||
|
||||
@ -1436,11 +1432,9 @@ class pdf_azur extends ModelePDFPropales
|
||||
function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
|
||||
{
|
||||
global $conf,$langs;
|
||||
|
||||
$outputlangs->load("main");
|
||||
$outputlangs->load("bills");
|
||||
$outputlangs->load("propal");
|
||||
$outputlangs->load("companies");
|
||||
|
||||
// Load traductions files requiredby by page
|
||||
$outputlangs->loadLangs(array("main", "propal", "companies", "bills"));
|
||||
|
||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||
|
||||
|
||||
@ -87,9 +87,9 @@ class pdf_standard extends ModelePDFStock
|
||||
public function __construct($db)
|
||||
{
|
||||
global $conf,$langs,$mysoc;
|
||||
|
||||
$langs->load("main");
|
||||
$langs->load("companies");
|
||||
|
||||
// Load traductions files requiredby by page
|
||||
$langs->loadLangs(array("main", "companies"));
|
||||
|
||||
$this->db = $db;
|
||||
$this->name = "standard";
|
||||
@ -164,14 +164,9 @@ class pdf_standard extends ModelePDFStock
|
||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
||||
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
|
||||
|
||||
$outputlangs->load("main");
|
||||
$outputlangs->load("dict");
|
||||
$outputlangs->load("companies");
|
||||
$outputlangs->load("bills");
|
||||
$outputlangs->load("stocks");
|
||||
$outputlangs->load("orders");
|
||||
$outputlangs->load("deliveries");
|
||||
|
||||
// Load traductions files requiredby by page
|
||||
$outputlangs->loadLangs(array("main", "dict", "companies", "bills", "stocks", "orders", "deliveries"));
|
||||
|
||||
$nblignes = count($object->lines);
|
||||
|
||||
@ -919,13 +914,10 @@ class pdf_standard extends ModelePDFStock
|
||||
function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlekey="")
|
||||
{
|
||||
global $conf,$langs,$db,$hookmanager;
|
||||
|
||||
// Load traductions files requiredby by page
|
||||
$outputlangs->loadLangs(array("main", "propal", "companies", "bills", "orders", "stocks"));
|
||||
|
||||
$outputlangs->load("main");
|
||||
$outputlangs->load("bills");
|
||||
$outputlangs->load("propal");
|
||||
$outputlangs->load("companies");
|
||||
$outputlangs->load("orders");
|
||||
$outputlangs->load("stocks");
|
||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||
|
||||
if ($object->type == 1) $titlekey='ServiceSheet';
|
||||
|
||||
@ -88,9 +88,9 @@ class pdf_stdmovement extends ModelePDFMovement
|
||||
public function __construct($db)
|
||||
{
|
||||
global $conf,$langs,$mysoc;
|
||||
|
||||
$langs->load("main");
|
||||
$langs->load("companies");
|
||||
|
||||
// Load traductions files requiredby by page
|
||||
$langs->loadLangs(array("main", "companies"));
|
||||
|
||||
$this->db = $db;
|
||||
$this->name = "stdmouvement";
|
||||
@ -167,14 +167,9 @@ class pdf_stdmovement extends ModelePDFMovement
|
||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
||||
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
|
||||
|
||||
$outputlangs->load("main");
|
||||
$outputlangs->load("dict");
|
||||
$outputlangs->load("companies");
|
||||
$outputlangs->load("bills");
|
||||
$outputlangs->load("stocks");
|
||||
$outputlangs->load("orders");
|
||||
$outputlangs->load("deliveries");
|
||||
|
||||
// Load traductions files requiredby by page
|
||||
$outputlangs->loadLangs(array("main", "dict", "companies", "bills", "stocks", "orders", "deliveries"));
|
||||
|
||||
/**
|
||||
* TODO: get from object
|
||||
@ -921,13 +916,10 @@ class pdf_stdmovement extends ModelePDFMovement
|
||||
function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlekey="")
|
||||
{
|
||||
global $conf,$langs,$db,$hookmanager;
|
||||
|
||||
// Load traductions files requiredby by page
|
||||
$outputlangs->loadLangs(array("main", "propal", "companies", "bills", "orders", "stocks"));
|
||||
|
||||
$outputlangs->load("main");
|
||||
$outputlangs->load("bills");
|
||||
$outputlangs->load("propal");
|
||||
$outputlangs->load("companies");
|
||||
$outputlangs->load("orders");
|
||||
$outputlangs->load("stocks");
|
||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||
|
||||
if ($object->type == 1) $titlekey='ServiceSheet';
|
||||
|
||||
@ -83,7 +83,7 @@ class MyObject extends CommonObject
|
||||
'label' =>array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>1, 'visible'=>1, 'position'=>30, 'searchall'=>1, 'css'=>'minwidth200', 'help'=>'Help text', 'showoncombobox'=>1),
|
||||
'amount' =>array('type'=>'double(24,8)', 'label'=>'Amount', 'enabled'=>1, 'visible'=>1, 'default'=>'null', 'position'=>40, 'searchall'=>0, 'isameasure'=>1, 'help'=>'Help text'),
|
||||
'fk_soc' =>array('type'=>'integer:Societe:societe/class/societe.class.php', 'label'=>'ThirdParty', 'visible'=>1, 'enabled'=>1, 'position'=>50, 'notnull'=>-1, 'index'=>1, 'help'=>'LinkToThirparty'),
|
||||
'description' =>array('type'=>'text', 'label'=>'Descrption', 'enabled'=>1, 'visible'=>0, 'position'=>60),
|
||||
'description' =>array('type'=>'text', 'label'=>'Description', 'enabled'=>1, 'visible'=>0, 'position'=>60),
|
||||
'note_public' =>array('type'=>'html', 'label'=>'NotePublic', 'enabled'=>1, 'visible'=>0, 'position'=>61),
|
||||
'note_private' =>array('type'=>'html', 'label'=>'NotePrivate', 'enabled'=>1, 'visible'=>0, 'position'=>62),
|
||||
'date_creation' =>array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>500),
|
||||
|
||||
@ -42,6 +42,9 @@ if ($user->societe_id) {
|
||||
}
|
||||
$result=restrictedArea($user,'produit|service');
|
||||
|
||||
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
||||
$hookmanager->initHooks(array('stockreplenishlist'));
|
||||
|
||||
//checks if a product has been ordered
|
||||
|
||||
$action = GETPOST('action','alpha');
|
||||
@ -86,6 +89,9 @@ if (! empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT)
|
||||
$usevirtualstock=0;
|
||||
if ($mode == 'virtual') $usevirtualstock=1;
|
||||
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||
|
||||
/*
|
||||
* Actions
|
||||
@ -669,6 +675,11 @@ while ($i < ($limit ? min($num, $limit) : $num))
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
|
||||
$parameters=array('sql'=>$sql);
|
||||
$reshook=$hookmanager->executeHooks('printFieldListFooter',$parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user