mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-05 09:08:09 +01:00
clean code (#34196)
* clean code * fix * fix --------- Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
@@ -727,7 +727,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
|
||||
$pdf->SetFont('', '', $default_font_size - 1);
|
||||
|
||||
$diffsizetitle = (!getDolGlobalString('PDF_DIFFSIZE_TITLE') ? 3 : $conf->global->PDF_DIFFSIZE_TITLE);
|
||||
$diffsizetitle = getDolGlobalInt('PDF_DIFFSIZE_TITLE', 3);
|
||||
|
||||
// If France, show VAT mention if not applicable
|
||||
if ($this->emetteur->country_code == 'FR' && empty($mysoc->tva_assuj)) {
|
||||
@@ -740,7 +740,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
|
||||
$posxval = 52;
|
||||
|
||||
$diffsizetitle = (!getDolGlobalString('PDF_DIFFSIZE_TITLE') ? 3 : $conf->global->PDF_DIFFSIZE_TITLE);
|
||||
$diffsizetitle = getDolGlobalInt('PDF_DIFFSIZE_TITLE', 3);
|
||||
|
||||
// Show payments conditions
|
||||
if ($object->cond_reglement_code || $object->cond_reglement) {
|
||||
|
||||
@@ -1007,7 +1007,7 @@ class pdf_eratosthene extends ModelePDFCommandes
|
||||
|
||||
$pdf->SetFont('', '', $default_font_size - 1);
|
||||
|
||||
$diffsizetitle = (!getDolGlobalString('PDF_DIFFSIZE_TITLE') ? 3 : $conf->global->PDF_DIFFSIZE_TITLE);
|
||||
$diffsizetitle = getDolGlobalInt('PDF_DIFFSIZE_TITLE', 3);
|
||||
|
||||
// If France, show VAT mention if not applicable
|
||||
if ($this->emetteur->country_code == 'FR' && empty($mysoc->tva_assuj)) {
|
||||
@@ -1020,7 +1020,7 @@ class pdf_eratosthene extends ModelePDFCommandes
|
||||
|
||||
$posxval = 52;
|
||||
|
||||
$diffsizetitle = (!getDolGlobalString('PDF_DIFFSIZE_TITLE') ? 3 : $conf->global->PDF_DIFFSIZE_TITLE);
|
||||
$diffsizetitle = getDolGlobalInt('PDF_DIFFSIZE_TITLE', 3);
|
||||
|
||||
// Show payments conditions
|
||||
if ($object->cond_reglement_code || $object->cond_reglement) {
|
||||
|
||||
@@ -929,7 +929,7 @@ class pdf_azur extends ModelePDFPropales
|
||||
|
||||
$pdf->SetFont('', '', $default_font_size - 1);
|
||||
|
||||
$diffsizetitle = (!getDolGlobalString('PDF_DIFFSIZE_TITLE') ? 3 : $conf->global->PDF_DIFFSIZE_TITLE);
|
||||
$diffsizetitle = getDolGlobalInt('PDF_DIFFSIZE_TITLE', 3);
|
||||
|
||||
// If France, show VAT mention if not applicable
|
||||
if ($this->emetteur->country_code == 'FR' && empty($mysoc->tva_assuj)) {
|
||||
|
||||
@@ -1092,7 +1092,7 @@ class pdf_cyan extends ModelePDFPropales
|
||||
|
||||
$pdf->SetFont('', '', $default_font_size - 1);
|
||||
|
||||
$diffsizetitle = (!getDolGlobalString('PDF_DIFFSIZE_TITLE') ? 3 : $conf->global->PDF_DIFFSIZE_TITLE);
|
||||
$diffsizetitle = getDolGlobalInt('PDF_DIFFSIZE_TITLE', 3);
|
||||
|
||||
// If France, show VAT mention if not applicable
|
||||
if ($this->emetteur->country_code == 'FR' && empty($mysoc->tva_assuj)) {
|
||||
|
||||
@@ -881,7 +881,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
|
||||
global $conf, $mysoc;
|
||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||
|
||||
$diffsizetitle = (!getDolGlobalString('PDF_DIFFSIZE_TITLE') ? 3 : $conf->global->PDF_DIFFSIZE_TITLE);
|
||||
$diffsizetitle = getDolGlobalInt('PDF_DIFFSIZE_TITLE', 3);
|
||||
|
||||
// If France, show VAT mention if not applicable
|
||||
if ($this->emetteur->country_code == 'FR' && empty($mysoc->tva_assuj)) {
|
||||
|
||||
@@ -741,7 +741,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
global $conf, $mysoc;
|
||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||
|
||||
$diffsizetitle = (!getDolGlobalString('PDF_DIFFSIZE_TITLE') ? 3 : $conf->global->PDF_DIFFSIZE_TITLE);
|
||||
$diffsizetitle = getDolGlobalInt('PDF_DIFFSIZE_TITLE', 3);
|
||||
|
||||
// If France, show VAT mention if not applicable
|
||||
if ($this->emetteur->country_code == 'FR' && empty($mysoc->tva_assuj)) {
|
||||
|
||||
@@ -730,7 +730,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
||||
global $conf;
|
||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||
|
||||
$diffsizetitle = (!getDolGlobalString('PDF_DIFFSIZE_TITLE') ? 3 : $conf->global->PDF_DIFFSIZE_TITLE);
|
||||
$diffsizetitle = getDolGlobalInt('PDF_DIFFSIZE_TITLE', 3);
|
||||
|
||||
$pdf->SetFont('', '', $default_font_size - 1);
|
||||
|
||||
|
||||
@@ -860,7 +860,7 @@ class pdf_zenith extends ModelePDFSupplierProposal
|
||||
global $conf, $mysoc;
|
||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||
|
||||
$diffsizetitle = (!getDolGlobalString('PDF_DIFFSIZE_TITLE') ? 3 : $conf->global->PDF_DIFFSIZE_TITLE);
|
||||
$diffsizetitle = getDolGlobalInt('PDF_DIFFSIZE_TITLE', 3);
|
||||
|
||||
// If France, show VAT mention if not applicable
|
||||
if ($this->emetteur->country_code == 'FR' && empty($mysoc->tva_assuj)) {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* Copyright (C) 2005-2017 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2011-2012 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2021-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2021-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
*
|
||||
@@ -154,6 +154,7 @@ if (!getDolGlobalString('MAIN_REMOVE_INSTALL_WARNING')) {
|
||||
$newPerm = $currentPerm & ~0222;
|
||||
//print $conffile.' '.decoct($currentPerm).' '.(string) decoct($newPerm).' '.substr(decoct($newPerm), -4);
|
||||
dolChmod($conffile, decoct($newPerm));
|
||||
|
||||
// @phpstan-ignore-next-line
|
||||
if (is_writable($conffile)) {
|
||||
$langs->load("errors");
|
||||
|
||||
Reference in New Issue
Block a user