diff --git a/.travis.yml b/.travis.yml index 6dd9dd7dac3..11da1e2d048 100644 --- a/.travis.yml +++ b/.travis.yml @@ -216,7 +216,7 @@ before_script: - | export CONF_FILE=htdocs/conf/conf.php echo "Setting up Dolibarr $CONF_FILE" - echo ' $CONF_FILE + echo ' $CONF_FILE echo '$'dolibarr_main_url_root=\'http://127.0.0.1\'';' >> $CONF_FILE echo '$'dolibarr_main_document_root=\'$TRAVIS_BUILD_DIR/htdocs\'';' >> $CONF_FILE echo '$'dolibarr_main_data_root=\'$TRAVIS_BUILD_DIR/documents\'';' >> $CONF_FILE diff --git a/build/aps/Limitations of APS Support in the Panel_fichiers/highlight.js b/build/aps/Limitations of APS Support in the Panel_fichiers/highlight.js index d6386c93792..10056e95fd4 100644 --- a/build/aps/Limitations of APS Support in the Panel_fichiers/highlight.js +++ b/build/aps/Limitations of APS Support in the Panel_fichiers/highlight.js @@ -15,14 +15,14 @@ else return 0; function highlightTOC(str) { - - - - - + + + + + if (StopProcess()) return; try { - + str = str || parent.BODY.document.location.href; uri = last(str); list = parent.TOC.document.getElementsByTagName("a"); @@ -33,7 +33,7 @@ function highlightTOC(str) { list[i].style.backgroundColor = "#6697cc"; list[i].style.padding = "2px"; list[i].style.color = "#ffffff"; - + } else { list[i].style.backgroundColor = "#ffffff"; list[i].style.color = "#003380"; diff --git a/build/aps/Limitations of APS Support in the Panel_fichiers/prettify.css b/build/aps/Limitations of APS Support in the Panel_fichiers/prettify.css index ee31b50285a..ab64ac4bb6b 100644 --- a/build/aps/Limitations of APS Support in the Panel_fichiers/prettify.css +++ b/build/aps/Limitations of APS Support in the Panel_fichiers/prettify.css @@ -12,7 +12,7 @@ .atn { color: #606; } .atv { color: #080; } .dec { color: #606; } -pre.preformatted { +pre.preformatted { display: block; font-family: "Courier New", verdana, arial, helvetica, sans-serif; diff --git a/build/aps/Limitations of APS Support in the Panel_fichiers/prettify.js b/build/aps/Limitations of APS Support in the Panel_fichiers/prettify.js index 11234738656..fab5c8e6f2a 100644 --- a/build/aps/Limitations of APS Support in the Panel_fichiers/prettify.js +++ b/build/aps/Limitations of APS Support in the Panel_fichiers/prettify.js @@ -1116,7 +1116,7 @@ window['_pr_isIE6'] = function () { for (var i = 0; i < 10; ++i) { lineBreaks[i] = lineBreakHtml + '
| '.$langs->trans("CONNECTOR_DUMMY").': | '.$langs->trans("CONNECTOR_DUMMY_HELP").' | ||||||||||||||||||||||||||||||||||||||
| '.$langs->trans("Description").' | '; print "|||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| <'.$printer->tags[$tag].'> | '.$langs->trans(strtoupper($printer->tags[$tag])).' | '; @@ -436,14 +436,14 @@ if ($mode == 'template' && $user->admin) } // to remove after test -$object=new stdClass(); -$object->date_time = '2015-11-02 22:30:25'; -$object->id = 1234; -$object->customer_firstname = 'John'; -$object->customer_lastname = 'Deuf'; -$object->vendor_firstname = 'Jim'; -$object->vendor_lastname = 'Big'; -$object->barcode = '3700123862396'; +// $object=new stdClass(); +// $object->date_time = '2015-11-02 22:30:25'; +// $object->id = 1234; +// $object->customer_firstname = 'John'; +// $object->customer_lastname = 'Deuf'; +// $object->vendor_firstname = 'Jim'; +// $object->vendor_lastname = 'Big'; +// $object->barcode = '3700123862396'; //$printer->sendToPrinter($object, 1, 16); //setEventMessages($printer->error, $printer->errors, 'errors'); diff --git a/htdocs/admin/sms.php b/htdocs/admin/sms.php index 3dbc785d1d7..45071117c89 100644 --- a/htdocs/admin/sms.php +++ b/htdocs/admin/sms.php @@ -48,12 +48,12 @@ $action=GETPOST('action','aZ09'); if ($action == 'update' && empty($_POST["cancel"])) { - dolibarr_set_const($db, "MAIN_DISABLE_ALL_SMS", $_POST["MAIN_DISABLE_ALL_SMS"],'chaine',0,'',$conf->entity); + dolibarr_set_const($db, "MAIN_DISABLE_ALL_SMS", $_POST["MAIN_DISABLE_ALL_SMS"], 'chaine', 0, '', $conf->entity); - dolibarr_set_const($db, "MAIN_SMS_SENDMODE", $_POST["MAIN_SMS_SENDMODE"],'chaine',0,'',$conf->entity); + dolibarr_set_const($db, "MAIN_SMS_SENDMODE", $_POST["MAIN_SMS_SENDMODE"], 'chaine', 0, '', $conf->entity); - dolibarr_set_const($db, "MAIN_MAIL_SMS_FROM", $_POST["MAIN_MAIL_SMS_FROM"],'chaine',0,'',$conf->entity); - //dolibarr_set_const($db, "MAIN_MAIL_AUTOCOPY_TO", $_POST["MAIN_MAIL_AUTOCOPY_TO"],'chaine',0,'',$conf->entity); + dolibarr_set_const($db, "MAIN_MAIL_SMS_FROM", $_POST["MAIN_MAIL_SMS_FROM"], 'chaine', 0, '', $conf->entity); + //dolibarr_set_const($db, "MAIN_MAIL_AUTOCOPY_TO", $_POST["MAIN_MAIL_AUTOCOPY_TO"], 'chaine', 0, '', $conf->entity); header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup"); exit; @@ -169,21 +169,21 @@ if ($action == 'edit') print '||||||||||||||||||||||||||||||||||||||
| '.$langs->trans("Parameter").' | '.$langs->trans("Value").' | |||||||||||||||
| '.$langs->trans("MAIN_DISABLE_ALL_SMS").' | '; print $form->selectyesno('MAIN_DISABLE_ALL_SMS',$conf->global->MAIN_DISABLE_ALL_SMS,1); print ' | |||||||||||||||
| '.$langs->trans("MAIN_SMS_SENDMODE").' | '; if (count($listofmethods)) print $form->selectarray('MAIN_SMS_SENDMODE',$listofmethods,$conf->global->MAIN_SMS_SENDMODE,1); else print ''.$langs->trans("None").''; print ' | |||||||||||||||
| '.$langs->trans("MAIN_MAIL_SMS_FROM",$langs->transnoentities("Undefined")).' | '; print '||||||||||||||||
| '.$langs->trans("Parameter").' | '.$langs->trans("Value").' | |||||||||||||||
| '.$langs->trans("MAIN_DISABLE_ALL_SMS").' | '.yn($conf->global->MAIN_DISABLE_ALL_SMS).' | |||||||||||||||
| '.$langs->trans("MAIN_SMS_SENDMODE").' | '; $text=$listofmethods[$conf->global->MAIN_SMS_SENDMODE]; if (empty($text)) $text=$langs->trans("Undefined").' '.img_warning(); print $text; print ' | |||||||||||||||
| '.$langs->trans("MAIN_MAIL_SMS_FROM",$langs->transnoentities("Undefined")).' | '; print ''.$conf->global->MAIN_MAIL_SMS_FROM; if (!empty($conf->global->MAIN_MAIL_SMS_FROM) && ! isValidPhone($conf->global->MAIN_MAIL_SMS_FROM)) print ' '.img_warning($langs->trans("ErrorBadPhone")); diff --git a/htdocs/admin/stock.php b/htdocs/admin/stock.php index b83f87af162..2e62f6f49e7 100644 --- a/htdocs/admin/stock.php +++ b/htdocs/admin/stock.php @@ -373,7 +373,7 @@ if($conf->invoice->enabled) print " | |||||||||||||||
| '.$langs->trans("StockMustBeEnoughForOrder").' | '; @@ -388,7 +388,7 @@ if($conf->order->enabled) print "||||||||||||||||
| '.$langs->trans("StockMustBeEnoughForShipment").' | '; diff --git a/htdocs/admin/system/modules.php b/htdocs/admin/system/modules.php index fda1946875a..65e19fb9d83 100644 --- a/htdocs/admin/system/modules.php +++ b/htdocs/admin/system/modules.php @@ -79,17 +79,17 @@ foreach($modulesdir as $dir) { try { $objMod = new $modName($db); - + $modules[$objMod->numero]=$objMod; $modules_names[$objMod->numero]=$objMod->name; $modules_files[$objMod->numero]=$file; $modules_fullpath[$file]=$dir.$file; $picto[$objMod->numero]=(isset($objMod->picto) && $objMod->picto)?$objMod->picto:'generic'; - } + } catch(Exception $e) { dol_syslog("Failed to load ".$dir.$file." ".$e->getMessage(), LOG_ERR); - } + } } else { diff --git a/htdocs/admin/ticket.php b/htdocs/admin/ticket.php index 38f0a8eb497..5cf72b302c9 100644 --- a/htdocs/admin/ticket.php +++ b/htdocs/admin/ticket.php @@ -54,11 +54,11 @@ if ($action == 'updateMask') { $error++; } - if (!$error) + if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } - else + } + else { setEventMessages($langs->trans("Error"), null, 'errors'); } diff --git a/htdocs/asterisk/cidlookup.php b/htdocs/asterisk/cidlookup.php index e6b4985f6b8..56e90c1a639 100644 --- a/htdocs/asterisk/cidlookup.php +++ b/htdocs/asterisk/cidlookup.php @@ -31,9 +31,9 @@ include '../master.inc.php'; $phone = GETPOST('phone'); $notfound = $langs->trans("Unknown"); - + // Security check -if (empty($conf->clicktodial->enabled)) +if (empty($conf->clicktodial->enabled)) { print "Error: Module Click to dial is not enabled.\n"; exit; diff --git a/htdocs/blockedlog/admin/blockedlog_list.php b/htdocs/blockedlog/admin/blockedlog_list.php index 7693063a517..3fd68b836f3 100644 --- a/htdocs/blockedlog/admin/blockedlog_list.php +++ b/htdocs/blockedlog/admin/blockedlog_list.php @@ -131,7 +131,7 @@ else if (GETPOST('downloadcsv','alpha')) { // Make the first fetch to get first line $obj = $db->fetch_object($res); - if ($obj) + if ($obj) { $previoushash = $block_static->getPreviousHash(0, $obj->rowid); $firstid = $obj->rowid; diff --git a/htdocs/cashdesk/css/style.css b/htdocs/cashdesk/css/style.css index d4149619aae..dc579711aa3 100644 --- a/htdocs/cashdesk/css/style.css +++ b/htdocs/cashdesk/css/style.css @@ -52,7 +52,7 @@ p { } .logopos { padding-top: 20px; - max-height: 40px; + max-height: 40px; } /* ------------------- Header ------------------- */ diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index 70c38205eac..30715f96a49 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -5,7 +5,7 @@ * Copyright (C) 2011-2017 Juanjo Menent||||||||||||||||
| '.$langs->trans("Mask").' ('.$langs->trans("InvoiceReplacement").'): | '; $texte.= ''.$form->textwithpicto('',$tooltip,1,1).' | '; $texte.= '|||||||||||||||
| '.$langs->trans("Mask").' ('.$langs->trans("InvoiceAvoir").'): | '; $texte.= ''.$form->textwithpicto('',$tooltip,1,1).' | '; @@ -135,7 +135,7 @@ class mod_facture_mercure extends ModeleNumRefFactures // Get Mask value $mask = ''; - if (is_object($facture) && $facture->type == 1) + if (is_object($facture) && $facture->type == 1) { $mask=$conf->global->FACTURE_MERCURE_MASK_REPLACEMENT; if (! $mask) diff --git a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php index 551b9ded2cb..e542c564fd6 100644 --- a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php +++ b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php @@ -52,7 +52,7 @@ class pdf_soleil extends ModelePDFFicheinter * @var string model description (short text) */ public $description; - + /** * @var string document type */ @@ -62,8 +62,8 @@ class pdf_soleil extends ModelePDFFicheinter * @var array() Minimum version of PHP required by module. * e.g.: PHP ≥ 5.4 = array(5, 4) */ - public $phpmin = array(5, 4); - + public $phpmin = array(5, 4); + /** * Dolibarr version of the loaded document * @public string @@ -74,37 +74,37 @@ class pdf_soleil extends ModelePDFFicheinter * @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 @@ -169,7 +169,7 @@ class pdf_soleil extends ModelePDFFicheinter 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'; - + // Translations $outputlangs->loadLangs(array("main", "interventions", "dict", "companies")); @@ -552,7 +552,7 @@ class pdf_soleil extends ModelePDFFicheinter { global $conf,$langs; $default_font_size = pdf_getPDFFontSize($outputlangs); - + // Load traductions files requiredby by page $outputlangs->loadLangs(array("main", "dict", "companies", "interventions")); @@ -732,4 +732,3 @@ class pdf_soleil extends ModelePDFFicheinter } } - diff --git a/htdocs/core/modules/import/import_csv.modules.php b/htdocs/core/modules/import/import_csv.modules.php index 09b33aea877..5f8776b9cbc 100644 --- a/htdocs/core/modules/import/import_csv.modules.php +++ b/htdocs/core/modules/import/import_csv.modules.php @@ -648,8 +648,8 @@ class ImportCsv extends ModeleImports } } else { // We have a last INSERT ID. Check if we have a row referencing this foreign key. - // This is required when updating table with some extrafields. When inserting a record in parent table, we can make - // a direct insert into subtable extrafields, but when me wake an update, the insertid is defined and the child record + // This is required when updating table with some extrafields. When inserting a record in parent table, we can make + // a direct insert into subtable extrafields, but when me wake an update, the insertid is defined and the child record // may already exists. So we rescan the extrafield table to be know if record exists or not for the rowid. $sqlSelect = 'SELECT rowid FROM '.$tablename; @@ -771,5 +771,3 @@ function cleansep($value) { return str_replace(array(',',';'),'/',$value); }; - - diff --git a/htdocs/core/modules/import/import_xlsx.modules.php b/htdocs/core/modules/import/import_xlsx.modules.php index f260c255465..1c0116d92ad 100644 --- a/htdocs/core/modules/import/import_xlsx.modules.php +++ b/htdocs/core/modules/import/import_xlsx.modules.php @@ -672,8 +672,8 @@ class ImportXlsx extends ModeleImports } } else { // We have a last INSERT ID. Check if we have a row referencing this foreign key. - // This is required when updating table with some extrafields. When inserting a record in parent table, we can make - // a direct insert into subtable extrafields, but when me wake an update, the insertid is defined and the child record + // This is required when updating table with some extrafields. When inserting a record in parent table, we can make + // a direct insert into subtable extrafields, but when me wake an update, the insertid is defined and the child record // may already exists. So we rescan the extrafield table to be know if record exists or not for the rowid. $sqlSelect = 'SELECT rowid FROM '.$tablename; diff --git a/htdocs/core/modules/livraison/doc/pdf_typhon.modules.php b/htdocs/core/modules/livraison/doc/pdf_typhon.modules.php index f3329fa9b18..79cb4c4961c 100644 --- a/htdocs/core/modules/livraison/doc/pdf_typhon.modules.php +++ b/htdocs/core/modules/livraison/doc/pdf_typhon.modules.php @@ -35,7 +35,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; /** - * Class to build Delivery Order documents with typhon model + * Class to build Delivery Order documents with typhon model */ class pdf_typhon extends ModelePDFDeliveryOrder { @@ -43,69 +43,69 @@ class pdf_typhon extends ModelePDFDeliveryOrder * @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); - + 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 @@ -120,7 +120,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder function __construct($db) { global $conf,$langs,$mysoc; - + // Translations $langs->loadLangs(array("main", "bills", "sendings", "companies")); @@ -192,7 +192,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder 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'; - + // Translations $outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products", "sendings", "deliveries")); @@ -953,4 +953,3 @@ class pdf_typhon extends ModelePDFDeliveryOrder } } - diff --git a/htdocs/core/modules/mailings/example.modules.php b/htdocs/core/modules/mailings/example.modules.php index fb7b6c94519..beeadebeecd 100644 --- a/htdocs/core/modules/mailings/example.modules.php +++ b/htdocs/core/modules/mailings/example.modules.php @@ -32,9 +32,9 @@ class mailing_example extends MailingTargets var $desc='Put here a description'; // CHANGE THIS: Set to 1 if selector is available for admin users only var $require_admin=0; - // CHANGE THIS: Add a tooltip language key to add a tooltip help icon after the email target selector + // CHANGE THIS: Add a tooltip language key to add a tooltip help icon after the email target selector var $tooltip='MyTooltipLangKey'; - + var $require_module=array(); var $picto=''; @@ -148,4 +148,3 @@ class mailing_example extends MailingTargets } } - diff --git a/htdocs/core/modules/mailings/pomme.modules.php b/htdocs/core/modules/mailings/pomme.modules.php index b3265ac35f7..21250bf693d 100644 --- a/htdocs/core/modules/mailings/pomme.modules.php +++ b/htdocs/core/modules/mailings/pomme.modules.php @@ -121,7 +121,7 @@ class mailing_pomme extends MailingTargets $s.=''; $s.=''; $s.=''; - + $s.=' '; $s.=$langs->trans("Employee").': '; $s.=''; - + return $s; } @@ -159,7 +159,7 @@ class mailing_pomme extends MailingTargets if ($filtersarray) { dol_syslog(__METHOD__ . ": filtersarray parameter is deprecated", LOG_WARNING); } - + global $conf, $langs; $langs->load("companies"); @@ -172,10 +172,10 @@ class mailing_pomme extends MailingTargets $sql.= " WHERE u.email <> ''"; // u.email IS NOT NULL est implicite dans ce test $sql.= " AND u.entity IN (0,".$conf->entity.")"; $sql.= " AND u.email NOT IN (SELECT email FROM ".MAIN_DB_PREFIX."mailing_cibles WHERE fk_mailing=".$mailing_id.")"; - if (isset($_POST["filter"]) && $_POST["filter"] == '1') $sql.= " AND u.statut=1"; - if (isset($_POST["filter"]) && $_POST["filter"] == '0') $sql.= " AND u.statut=0"; - if (isset($_POST["filteremployee"]) && $_POST["filteremployee"] == '1') $sql.= " AND u.employee=1"; - if (isset($_POST["filteremployee"]) && $_POST["filteremployee"] == '0') $sql.= " AND u.employee=0"; + if (isset($_POST["filter"]) && $_POST["filter"] == '1') $sql.= " AND u.statut=1"; + if (isset($_POST["filter"]) && $_POST["filter"] == '0') $sql.= " AND u.statut=0"; + if (isset($_POST["filteremployee"]) && $_POST["filteremployee"] == '1') $sql.= " AND u.employee=1"; + if (isset($_POST["filteremployee"]) && $_POST["filteremployee"] == '0') $sql.= " AND u.employee=0"; $sql.= " ORDER BY u.email"; // Stocke destinataires dans cibles @@ -225,4 +225,3 @@ class mailing_pomme extends MailingTargets } } - diff --git a/htdocs/core/modules/printsheet/doc/pdf_tcpdflabel.class.php b/htdocs/core/modules/printsheet/doc/pdf_tcpdflabel.class.php index 1b5d2fef4fb..b43adf3b38d 100644 --- a/htdocs/core/modules/printsheet/doc/pdf_tcpdflabel.class.php +++ b/htdocs/core/modules/printsheet/doc/pdf_tcpdflabel.class.php @@ -77,7 +77,7 @@ class pdf_tcpdflabel extends CommonStickerGenerator * @param int $y y position in user units * @param int $w width in user units * @param int $h height in user units - * @return void + * @return void */ private function writeBarcode(&$pdf, $code, $encoding, $is2d, $x, $y, $w, $h) { diff --git a/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php b/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php index 62898fc40a3..5bede258b07 100644 --- a/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php +++ b/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php @@ -932,109 +932,109 @@ class doc_generic_project_odt extends ModelePDFProjects 'title' => "ListProposalsAssociatedProject", 'class' => 'Propal', 'table' => 'propal', - 'test' => $conf->propal->enabled && $user->rights->propale->lire + 'test' => $conf->propal->enabled && $user->rights->propale->lire ), 'order' => array( 'title' => "ListOrdersAssociatedProject", 'class' => 'Commande', 'table' => 'commande', - 'test' => $conf->commande->enabled && $user->rights->commande->lire + 'test' => $conf->commande->enabled && $user->rights->commande->lire ), 'invoice' => array( 'title' => "ListInvoicesAssociatedProject", 'class' => 'Facture', 'table' => 'facture', - 'test' => $conf->facture->enabled && $user->rights->facture->lire + 'test' => $conf->facture->enabled && $user->rights->facture->lire ), 'invoice_predefined' => array( 'title' => "ListPredefinedInvoicesAssociatedProject", 'class' => 'FactureRec', 'table' => 'facture_rec', - 'test' => $conf->facture->enabled && $user->rights->facture->lire + 'test' => $conf->facture->enabled && $user->rights->facture->lire ), 'proposal_supplier' => array( 'title' => "ListSupplierProposalsAssociatedProject", 'class' => 'SupplierProposal', 'table' => 'supplier_proposal', - 'test' => $conf->supplier_proposal->enabled && $user->rights->supplier_proposal->lire + 'test' => $conf->supplier_proposal->enabled && $user->rights->supplier_proposal->lire ), 'order_supplier' => array( 'title' => "ListSupplierOrdersAssociatedProject", 'table' => 'commande_fournisseur', 'class' => 'CommandeFournisseur', - 'test' => $conf->fournisseur->enabled && $user->rights->fournisseur->commande->lire + 'test' => $conf->fournisseur->enabled && $user->rights->fournisseur->commande->lire ), 'invoice_supplier' => array( 'title' => "ListSupplierInvoicesAssociatedProject", 'table' => 'facture_fourn', 'class' => 'FactureFournisseur', - 'test' => $conf->fournisseur->enabled && $user->rights->fournisseur->facture->lire + 'test' => $conf->fournisseur->enabled && $user->rights->fournisseur->facture->lire ), 'contract' => array( 'title' => "ListContractAssociatedProject", 'class' => 'Contrat', 'table' => 'contrat', - 'test' => $conf->contrat->enabled && $user->rights->contrat->lire + 'test' => $conf->contrat->enabled && $user->rights->contrat->lire ), 'intervention' => array( 'title' => "ListFichinterAssociatedProject", 'class' => 'Fichinter', 'table' => 'fichinter', 'disableamount' => 1, - 'test' => $conf->ficheinter->enabled && $user->rights->ficheinter->lire + 'test' => $conf->ficheinter->enabled && $user->rights->ficheinter->lire ), 'shipping' => array( 'title' => "ListShippingAssociatedProject", 'class' => 'Expedition', 'table' => 'expedition', 'disableamount' => 1, - 'test' => $conf->expedition->enabled && $user->rights->expedition->lire + 'test' => $conf->expedition->enabled && $user->rights->expedition->lire ), 'trip' => array( 'title' => "ListTripAssociatedProject", 'class' => 'Deplacement', 'table' => 'deplacement', 'disableamount' => 1, - 'test' => $conf->deplacement->enabled && $user->rights->deplacement->lire + 'test' => $conf->deplacement->enabled && $user->rights->deplacement->lire ), 'expensereport' => array( 'title' => "ListExpenseReportsAssociatedProject", 'class' => 'ExpenseReportLine', 'table' => 'expensereport_det', - 'test' => $conf->expensereport->enabled && $user->rights->expensereport->lire + 'test' => $conf->expensereport->enabled && $user->rights->expensereport->lire ), 'donation' => array( 'title' => "ListDonationsAssociatedProject", 'class' => 'Don', 'table' => 'don', - 'test' => $conf->don->enabled && $user->rights->don->lire + 'test' => $conf->don->enabled && $user->rights->don->lire ), 'loan' => array( 'title' => "ListLoanAssociatedProject", 'class' => 'Loan', 'table' => 'loan', - 'test' => $conf->loan->enabled && $user->rights->loan->read + 'test' => $conf->loan->enabled && $user->rights->loan->read ), 'chargesociales' => array( 'title' => "ListSocialContributionAssociatedProject", 'class' => 'ChargeSociales', 'table' => 'chargesociales', 'urlnew' => DOL_URL_ROOT . '/compta/sociales/card.php?action=create&projectid=' . $id, - 'test' => $conf->tax->enabled && $user->rights->tax->charges->lire + 'test' => $conf->tax->enabled && $user->rights->tax->charges->lire ), 'stock_mouvement' => array( 'title' => "ListMouvementStockProject", 'class' => 'MouvementStock', 'table' => 'stock_mouvement', - 'test' => ($conf->stock->enabled && $user->rights->stock->mouvement->lire && ! empty($conf->global->STOCK_MOVEMENT_INTO_PROJECT_OVERVIEW)) + 'test' => ($conf->stock->enabled && $user->rights->stock->mouvement->lire && ! empty($conf->global->STOCK_MOVEMENT_INTO_PROJECT_OVERVIEW)) ), 'agenda' => array( 'title' => "ListActionsAssociatedProject", 'class' => 'ActionComm', 'table' => 'actioncomm', 'disableamount' => 1, - 'test' => $conf->agenda->enabled && $user->rights->agenda->allactions->lire - ) + 'test' => $conf->agenda->enabled && $user->rights->agenda->allactions->lire + ) ); //Insert reference diff --git a/htdocs/core/modules/project/doc/pdf_baleine.modules.php b/htdocs/core/modules/project/doc/pdf_baleine.modules.php index 229aec99beb..44683111e5a 100644 --- a/htdocs/core/modules/project/doc/pdf_baleine.modules.php +++ b/htdocs/core/modules/project/doc/pdf_baleine.modules.php @@ -42,69 +42,69 @@ class pdf_baleine extends ModelePDFProjects * @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); - + 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 @@ -119,7 +119,7 @@ class pdf_baleine extends ModelePDFProjects function __construct($db) { global $conf,$langs,$mysoc; - + // Translations $langs->loadLangs(array("main", "projects", "companies")); @@ -179,7 +179,7 @@ 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'; - + // Load traductions files requiredby by page $outputlangs->loadLangs(array("main", "dict", "companies", "projects")); diff --git a/htdocs/core/modules/project/doc/pdf_beluga.modules.php b/htdocs/core/modules/project/doc/pdf_beluga.modules.php index b487c211376..330aefd5c67 100644 --- a/htdocs/core/modules/project/doc/pdf_beluga.modules.php +++ b/htdocs/core/modules/project/doc/pdf_beluga.modules.php @@ -64,7 +64,7 @@ class pdf_beluga extends ModelePDFProjects function __construct($db) { global $conf,$langs,$mysoc; - + // Translations $langs->loadLangs(array("main", "projects", "companies")); @@ -126,7 +126,7 @@ 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'; - + // Load traductions files requiredby by page $outputlangs->loadLangs(array("main", "dict", "companies", "projects")); @@ -253,7 +253,7 @@ class pdf_beluga extends ModelePDFProjects $iniY = $tab_top + $heightoftitleline + 1; $curY = $tab_top + $heightoftitleline + 1; $nexY = $tab_top + $heightoftitleline + 1; - + $listofreferent=array( 'propal'=>array( 'name'=>"Proposals", @@ -368,8 +368,8 @@ class pdf_beluga extends ModelePDFProjects //var_dump("$key, $tablename, $datefieldname, $dates, $datee"); $elementarray = $object->get_element_list($key, $tablename, $datefieldname, $dates, $datee); - - if ($key == 'agenda') + + if ($key == 'agenda') { // var_dump($elementarray); } @@ -378,11 +378,11 @@ class pdf_beluga extends ModelePDFProjects if ($num >= 0) { $nexY = $pdf->GetY() + 5; - + $curY = $nexY; $pdf->SetFont('','', $default_font_size - 1); // Into loop to work with multipage $pdf->SetTextColor(0,0,0); - + $pdf->SetXY($this->posxref, $curY); $pdf->MultiCell($this->posxstatut - $this->posxref, 3, $outputlangs->transnoentities($title), 0, 'L'); @@ -418,7 +418,7 @@ class pdf_beluga extends ModelePDFProjects $num = count($elementarray); // Loop on each lines - for ($i = 0; $i < $num; $i ++) + for ($i = 0; $i < $num; $i ++) { $curY = $nexY; $pdf->SetFont('','', $default_font_size - 1); // Into loop to work with multipage @@ -496,10 +496,10 @@ class pdf_beluga extends ModelePDFProjects $pdf->SetFont('','', $default_font_size - 1); // On repositionne la police par defaut $pdf->MultiCell(0, 3, ''); // Set interline to 3 $pdf->SetTextColor(0,0,0); - + $pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it. $curY = $tab_top_newpage + $heightoftitleline + 1; - + // Label $pdf->SetXY($this->posxref, $curY); $posybefore=$pdf->GetY(); @@ -557,7 +557,7 @@ class pdf_beluga extends ModelePDFProjects { $pdf->MultiCell($this->posxamountht - $this->posxsociety, 3, (is_object($element->thirdparty)?$element->thirdparty->name:''), 1, 'L'); } - + // Amount without tax if (empty($value['disableamount'])) { $pdf->SetXY($this->posxamountht, $curY); @@ -610,7 +610,7 @@ class pdf_beluga extends ModelePDFProjects $curY = $nexY; } } - + $nexY+=2; // Passe espace entre les lignes // Detect if some page were added automatically and output _tableau for past pages @@ -775,7 +775,7 @@ class pdf_beluga extends ModelePDFProjects $pdf->SetXY($posx,$posy); $pdf->MultiCell(100, 4, $outputlangs->transnoentities("ThirdParty")." : " . $object->thirdparty->getFullName($outputlangs), '', 'R'); } - + $pdf->SetTextColor(0,0,60); } diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php index bf78f7edae6..4d52707649e 100644 --- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php @@ -44,79 +44,79 @@ class pdf_azur extends ModelePDFPropales * @var DoliDb Database handler */ public $db; - + /** * @var string model name */ public $name; - + /** * @var string model description (short text) */ public $description; - + /** * @var string Save the name of generated file as the main doc when generating a doc with this template */ public $update_main_doc_field; - + /** * @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 Objet societe qui emet */ - public $emetteur; + public $emetteur; /** @@ -127,7 +127,7 @@ class pdf_azur extends ModelePDFPropales function __construct($db) { global $conf,$langs,$mysoc; - + // Translations $langs->loadLangs(array("main", "bills")); @@ -219,7 +219,7 @@ 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'; - + // Load traductions files requiredby by page $outputlangs->loadLangs(array("main", "dict", "companies", "bills", "propal", "products")); @@ -1432,7 +1432,7 @@ class pdf_azur extends ModelePDFPropales function _pagehead(&$pdf, $object, $showaddress, $outputlangs) { global $conf,$langs; - + // Load traductions files requiredby by page $outputlangs->loadLangs(array("main", "propal", "companies", "bills")); @@ -1691,4 +1691,3 @@ class pdf_azur extends ModelePDFPropales return ($tab_hl*7); } } - diff --git a/htdocs/core/modules/stock/doc/pdf_standard.modules.php b/htdocs/core/modules/stock/doc/pdf_standard.modules.php index 66ad1413dcd..6adcd2e9cb7 100644 --- a/htdocs/core/modules/stock/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/stock/doc/pdf_standard.modules.php @@ -87,7 +87,7 @@ class pdf_standard extends ModelePDFStock public function __construct($db) { global $conf,$langs,$mysoc; - + // Load traductions files requiredby by page $langs->loadLangs(array("main", "companies")); @@ -114,12 +114,12 @@ class pdf_standard extends ModelePDFStock // Recupere emetteur $this->emetteur=$mysoc; if (! $this->emetteur->country_code) $this->emetteur->country_code=substr($langs->defaultlang,-2); // By default if not defined - + // Define position of columns $this->wref = 15; $this->posxdesc=$this->marge_gauche+1; $this->posxlabel=$this->posxdesc+$this->wref; - $this->posxtva=80; + $this->posxtva=80; $this->posxqty=95; $this->posxup=115; $this->posxunit=135; @@ -164,7 +164,7 @@ 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'; - + // Load traductions files requiredby by page $outputlangs->loadLangs(array("main", "dict", "companies", "bills", "stocks", "orders", "deliveries")); @@ -188,7 +188,7 @@ class pdf_standard extends ModelePDFStock $stockFournisseur = new ProductFournisseur($this->db); $supplierprices = $stockFournisseur->list_product_fournisseur_price($object->id); $object->supplierprices = $supplierprices; - + $productstatic=new Product($db); if (! file_exists($dir)) @@ -268,8 +268,8 @@ class pdf_standard extends ModelePDFStock /* Affichage de la liste des produits de l'entrepot */ /* */ /* ************************************************************************** */ - - $nexY+=5; + + $nexY+=5; $nexY = $pdf->GetY(); $nexY+=10; @@ -311,7 +311,7 @@ class pdf_standard extends ModelePDFStock if ($objtp->label != '') $objp->produit = $objtp->label; } } - + $curY = $nexY; $pdf->SetFont('','', $default_font_size - 1); // Into loop to work with multipage $pdf->SetTextColor(0,0,0); @@ -319,7 +319,7 @@ class pdf_standard extends ModelePDFStock $pdf->setTopMargin($tab_top_newpage); $pdf->setPageOrientation('', 1, $heightforfooter+$heightforfreetext+$heightforinfotot); // The only function to edit the bottom margin of current page to set it. $pageposbefore=$pdf->getPage(); - + // Description of product line $curX = $this->posxdesc-1; @@ -372,13 +372,13 @@ class pdf_standard extends ModelePDFStock } $pdf->SetFont('','', $default_font_size - 1); // On repositionne la police par defaut - + $productstatic->id=$objp->rowid; $productstatic->ref = $objp->ref; $productstatic->label = $objp->produit; $productstatic->type=$objp->type; $productstatic->entity=$objp->entity; - $productstatic->status_batch=$objp->tobatch; + $productstatic->status_batch=$objp->tobatch; // Ref. $pdf->SetXY($this->posxdesc, $curY); @@ -391,12 +391,12 @@ class pdf_standard extends ModelePDFStock // Quantity $valtoshow=price2num($objp->value, 'MS'); $towrite = (empty($valtoshow)?'0':$valtoshow); - + $pdf->SetXY($this->posxqty, $curY); - $pdf->MultiCell($this->posxup-$this->posxqty-0.8, 3, $towrite, 0, 'R'); - + $pdf->MultiCell($this->posxup-$this->posxqty-0.8, 3, $towrite, 0, 'R'); + $totalunit+=$objp->value; - + $pdf->SetXY($this->posxup, $curY); $pdf->MultiCell($this->posxunit-$this->posxup-0.8, 3, price(price2num($objp->ppmp,'MU'), 0, $outputlangs), 0, 'R'); @@ -429,7 +429,7 @@ class pdf_standard extends ModelePDFStock } $nexY+=2; // Passe espace entre les lignes - + // Detect if some page were added automatically and output _tableau for past pages while ($pagenb < $pageposafter) { @@ -466,20 +466,20 @@ class pdf_standard extends ModelePDFStock if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); } } - + $db->free($resql); - + /** * footer table */ $nexY = $pdf->GetY(); $nexY+=2; - $curY = $nexY; - - $pdf->SetLineStyle(array('dash'=>'0','color'=>array(220,26,26))); + $curY = $nexY; + + $pdf->SetLineStyle(array('dash'=>'0','color'=>array(220,26,26))); $pdf->line($this->marge_gauche, $curY-1, $this->page_largeur-$this->marge_droite, $curY-1); $pdf->SetLineStyle(array('dash'=>0)); - + $pdf->SetFont('','B',$default_font_size-1); $pdf->SetTextColor(0,0,120); @@ -487,7 +487,7 @@ class pdf_standard extends ModelePDFStock $pdf->SetXY($this->posxdesc, $curY); $pdf->MultiCell($this->wref, 3, $langs->trans("Total"), 0, 'L'); - // Quantity + // Quantity $valtoshow=price2num($totalunit, 'MS'); $towrite = empty($valtoshow)?'0':$valtoshow; @@ -736,8 +736,8 @@ class pdf_standard extends ModelePDFStock } } */ - $tab_top = $tab_top_newpage+21; - + $tab_top = $tab_top_newpage+21; + // Show square if ($pagenb == 1) { @@ -749,7 +749,7 @@ class pdf_standard extends ModelePDFStock $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 1, 0, $object->multicurrency_code); $bottomlasttab=$this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1; } - + $bottomlasttab=$this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1; // Affiche zone infos @@ -836,21 +836,21 @@ class pdf_standard extends ModelePDFStock // Output Rect //$this->printRect($pdf,$this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect prend une longueur en 3eme param et 4eme param - + $pdf->SetLineStyle(array('dash'=>'0','color'=>array(220,26,26))); - $pdf->SetDrawColor(220,26,26); + $pdf->SetDrawColor(220,26,26); $pdf->line($this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_droite, $tab_top); $pdf->SetLineStyle(array('dash'=>0)); $pdf->SetDrawColor(128,128,128); $pdf->SetTextColor(0,0,120); - + if (empty($hidetop)) { //$pdf->line($this->marge_gauche, $tab_top+5, $this->page_largeur-$this->marge_droite, $tab_top+5); // line prend une position y en 2eme param et 4eme param $pdf->SetXY($this->posxdesc-1, $tab_top+1); $pdf->MultiCell($this->wref,3, $outputlangs->transnoentities("Ref"),'','L'); } - + //$pdf->line($this->posxlabel-1, $tab_top, $this->posxlabel-1, $tab_top + $tab_height); if (empty($hidetop)) { @@ -860,7 +860,7 @@ class pdf_standard extends ModelePDFStock //$pdf->line($this->posxqty-1, $tab_top, $this->posxqty-1, $tab_top + $tab_height); if (empty($hidetop)) - { + { $pdf->SetXY($this->posxqty-1, $tab_top+1); $pdf->MultiCell($this->posxup-$this->posxqty-1,2, $outputlangs->transnoentities("Units"),'','C'); } @@ -873,7 +873,7 @@ class pdf_standard extends ModelePDFStock } //$pdf->line($this->posxunit - 1, $tab_top, $this->posxunit - 1, $tab_top + $tab_height); - if (empty($hidetop)) + if (empty($hidetop)) { $pdf->SetXY($this->posxunit - 1, $tab_top + 1); $pdf->MultiCell($this->posxdiscount - $this->posxunit - 1, 2, $outputlangs->transnoentities("EstimatedStockValueShort"), '', @@ -887,18 +887,18 @@ class pdf_standard extends ModelePDFStock $pdf->MultiCell($this->postotalht-$this->posxdiscount+1,2, $outputlangs->transnoentities("SellPriceMin"),'','C'); } - //$pdf->line($this->postotalht, $tab_top, $this->postotalht, $tab_top + $tab_height); + //$pdf->line($this->postotalht, $tab_top, $this->postotalht, $tab_top + $tab_height); if (empty($hidetop)) { $pdf->SetXY($this->postotalht-1, $tab_top+1); $pdf->MultiCell($this->page_largeur-$this->marge_droite-$this->postotalht,2, $outputlangs->transnoentities("EstimatedStockValueSellShort"),'','C'); } - - $pdf->SetDrawColor(220,26,26); + + $pdf->SetDrawColor(220,26,26); $pdf->SetLineStyle(array('dash'=>'0','color'=>array(220,26,26))); - $pdf->line($this->marge_gauche, $tab_top+11, $this->page_largeur-$this->marge_droite, $tab_top+11); + $pdf->line($this->marge_gauche, $tab_top+11, $this->page_largeur-$this->marge_droite, $tab_top+11); $pdf->SetLineStyle(array('dash'=>0)); - + } /** @@ -914,7 +914,7 @@ 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")); @@ -961,7 +961,7 @@ class pdf_standard extends ModelePDFStock $text=$this->emetteur->name; $pdf->MultiCell(100, 4, $outputlangs->convToOutputCharset($text), 0, 'L'); } - + $pdf->SetFont('','B', $default_font_size + 3); $pdf->SetXY($posx,$posy); $pdf->SetTextColor(0,0,60); @@ -981,22 +981,22 @@ class pdf_standard extends ModelePDFStock $pdf->SetXY($posx,$posy); $pdf->SetTextColor(0,0,60); $pdf->MultiCell(100, 3, $outputlangs->transnoentities("LocationSummary").' :', '', 'R'); - + $posy+=4; $pdf->SetXY($posx-50,$posy); $pdf->MultiCell(150, 3, $object->lieu, '', 'R'); - - + + // Parent entrepot $posy+=4; $pdf->SetXY($posx,$posy); $pdf->SetTextColor(0,0,60); $pdf->MultiCell(100, 3, $outputlangs->transnoentities("ParentWarehouse").' :', '', 'R'); - + $posy+=4; $pdf->SetXY($posx-50,$posy); $e = new Entrepot($db); - if(!empty($object->fk_parent) && $e->fetch($object->fk_parent) > 0) + if(!empty($object->fk_parent) && $e->fetch($object->fk_parent) > 0) { $pdf->MultiCell(150, 3, $e->libelle, '', 'R'); } @@ -1004,14 +1004,14 @@ class pdf_standard extends ModelePDFStock { $pdf->MultiCell(150, 3, $outputlangs->transnoentities("None"), '', 'R'); } - + // Description $nexY = $pdf->GetY(); $nexY+=5; $pdf->SetXY($posx,$posy); $pdf->writeHTMLCell(190, 2, $this->marge_gauche, $nexY, ''.$outputlangs->transnoentities("Description").' : '.nl2br($object->description), 0, 1); $nexY = $pdf->GetY(); - + $calcproductsunique=$object->nb_different_products(); $calcproducts=$object->nb_products(); @@ -1023,12 +1023,12 @@ class pdf_standard extends ModelePDFStock $valtoshow=price2num($calcproducts['nb'], 'MS'); $pdf->writeHTMLCell(190, 2, $this->marge_gauche, $nexY, ''.$outputlangs->transnoentities("NumberOfProducts").' : '.(empty($valtoshow)?'0':$valtoshow), 0, 1); $nexY = $pdf->GetY(); - + // Value $pdf->writeHTMLCell(190, 2, $this->marge_gauche, $nexY, ''.$outputlangs->transnoentities("EstimatedStockValueShort").' : '. price((empty($calcproducts['value'])?'0':price2num($calcproducts['value'],'MT')), 0, $langs, 0, -1, -1, $conf->currency), 0, 1); $nexY = $pdf->GetY(); - - + + // Last movement $sql = "SELECT max(m.datem) as datem"; $sql .= " FROM ".MAIN_DB_PREFIX."stock_mouvement as m"; @@ -1056,7 +1056,7 @@ class pdf_standard extends ModelePDFStock $pdf->writeHTMLCell(190, 2, $this->marge_gauche, $nexY, ''.$outputlangs->transnoentities("LastMovement").' : '.$toWrite, 0, 1); $nexY = $pdf->GetY(); - + /*if ($object->ref_client) { $posy+=5; @@ -1147,4 +1147,3 @@ class pdf_standard extends ModelePDFStock } } - diff --git a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php index d14a9bdcdc8..be563f4d495 100644 --- a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php +++ b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php @@ -40,75 +40,75 @@ class pdf_canelle extends ModelePDFSuppliersInvoices * @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 Objet societe qui emet */ - public $emetteur; - + public $emetteur; + /** @@ -1249,4 +1249,3 @@ class pdf_canelle extends ModelePDFSuppliersInvoices } } - diff --git a/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php b/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php index bda0170397d..1bd1b89cd38 100644 --- a/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php @@ -42,17 +42,17 @@ class pdf_standard extends ModelePDFSuppliersPayments * @var DoliDb Database handler */ public $db; - + /** * @var string model name */ public $name; - + /** * @var string model description (short text) */ public $description; - + /** * @var string document type */ @@ -62,54 +62,54 @@ class pdf_standard extends ModelePDFSuppliersPayments * @var array() Minimum version of PHP required by module. * e.g.: PHP ≥ 5.4 = array(5, 4) */ - public $phpmin = 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; + public $emetteur; /** @@ -120,7 +120,7 @@ class pdf_standard extends ModelePDFSuppliersPayments function __construct($db) { global $conf,$langs,$mysoc; - + // Translations $langs->loadLangs(array("main", "bills")); @@ -814,4 +814,3 @@ class pdf_standard extends ModelePDFSuppliersPayments } } - diff --git a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php index 5f971cab2d1..7d7009a3c58 100644 --- a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php +++ b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php @@ -42,17 +42,17 @@ class pdf_aurore extends ModelePDFSupplierProposal * @var DoliDb Database handler */ public $db; - + /** * @var string model name */ public $name; - + /** * @var string model description (short text) */ public $description; - + /** * @var string document type */ @@ -62,8 +62,8 @@ class pdf_aurore extends ModelePDFSupplierProposal * @var array() Minimum version of PHP required by module. * e.g.: PHP ≥ 5.4 = array(5, 4) */ - public $phpmin = array(5, 4); - + public $phpmin = array(5, 4); + /** * Dolibarr version of the loaded document * @public string @@ -74,32 +74,32 @@ class pdf_aurore extends ModelePDFSupplierProposal * @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 */ @@ -120,7 +120,7 @@ class pdf_aurore extends ModelePDFSupplierProposal public function __construct($db) { global $conf, $langs, $mysoc; - + // Translations $langs->loadLangs(array("main", "bills")); @@ -160,7 +160,7 @@ class pdf_aurore extends ModelePDFSupplierProposal $this->posxdesc=$this->marge_gauche+1; $this->posxdiscount=162; $this->postotalht=174; - + if ($conf->global->PRODUCT_USE_UNITS) { $this->posxtva=101; @@ -172,7 +172,7 @@ class pdf_aurore extends ModelePDFSupplierProposal $this->posxup=126; $this->posxqty=145; } - + if (! empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT) || ! empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_COLUMN)) $this->posxup=$this->posxtva; $this->posxpicture=$this->posxtva - (empty($conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH)?20:$conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH); // width of images if ($this->page_largeur < 210) // To work with US executive format @@ -211,7 +211,7 @@ class pdf_aurore extends ModelePDFSupplierProposal 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'; - + // Translations $outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products", "supplier_proposal")); @@ -524,7 +524,7 @@ class pdf_aurore extends ModelePDFSupplierProposal { $pdf->MultiCell($this->posxdiscount-$this->posxqty-0.8, 3, $qty, 0, 'R'); } - + // Unit if($conf->global->PRODUCT_USE_UNITS) { @@ -1232,7 +1232,7 @@ class pdf_aurore extends ModelePDFSupplierProposal $pdf->MultiCell($this->posxdiscount-$this->posxqty-1,2, $outputlangs->transnoentities("Qty"),'','C'); } } - + if($conf->global->PRODUCT_USE_UNITS) { $pdf->line($this->posxunit - 1, $tab_top, $this->posxunit - 1, $tab_top + $tab_height); if (empty($hidetop)) { @@ -1274,7 +1274,7 @@ class pdf_aurore extends ModelePDFSupplierProposal function _pagehead(&$pdf, $object, $showaddress, $outputlangs) { global $conf,$langs; - + // Translations $outputlangs->loadLangs(array("main", "bills", "supplier_proposal", "companies")); @@ -1496,4 +1496,3 @@ class pdf_aurore extends ModelePDFSupplierProposal } } - diff --git a/htdocs/core/modules/syslog/mod_syslog_firephp.php b/htdocs/core/modules/syslog/mod_syslog_firephp.php index 98a3c7142af..abc341f9a30 100644 --- a/htdocs/core/modules/syslog/mod_syslog_firephp.php +++ b/htdocs/core/modules/syslog/mod_syslog_firephp.php @@ -126,8 +126,8 @@ class mod_syslog_firephp extends LogHandler implements LogHandlerInterface if (is_object($langs)) // $langs may not be defined yet. { $errors[] = $langs->trans("ErrorFailedToOpenFile", self::$firephp_class_path); - } - else + } + else { $errors[] = "ErrorFailedToOpenFile " . self::$firephp_class_path; } diff --git a/htdocs/core/tpl/advtarget.tpl.php b/htdocs/core/tpl/advtarget.tpl.php index a25abbdde6a..05db2d46fd3 100644 --- a/htdocs/core/tpl/advtarget.tpl.php +++ b/htdocs/core/tpl/advtarget.tpl.php @@ -1,6 +1,6 @@ }); }); '; - - + + print_fiche_titre($langs->trans("AdvTgtTitle")); print '|||||||||||||||
| '.$langs->trans("TotalDuration").' | '; print ''.convertSecondToTime( - $object->duration, 'all', + $object->duration, 'all', $conf->global->MAIN_DURATION_OF_WORKDAY ).' | '; print '"; print " "; print $form->selectarray( - 'unit_frequency', + 'unit_frequency', array('d'=>$langs->trans('Day'), 'm'=>$langs->trans('Month'), 'y'=>$langs->trans('Year')), (GETPOST('unit_frequency')?GETPOST('unit_frequency'):'m') ); @@ -423,7 +423,7 @@ if ($action == 'create') { } $db->free($result); - } else + } else print $db->error(); print " | |