--- /tmp/dsg/dolibarr/htdocs/core/modules/cheque/github_mod_chequereceipt_mint.php +++ /tmp/dsg/dolibarr/htdocs/core/modules/cheque/client_mod_chequereceipt_mint.php @@ -126,7 +126,9 @@ $obj = $db->fetch_object($resql); if ($obj) $max = intval($obj->max); else $max = 0; - } else { + } + else + { dol_syslog(__METHOD__, LOG_DEBUG); return -1; } --- /tmp/dsg/dolibarr/htdocs/core/modules/cheque/github_mod_chequereceipt_thyme.php +++ /tmp/dsg/dolibarr/htdocs/core/modules/cheque/client_mod_chequereceipt_thyme.php @@ -32,9 +32,9 @@ class mod_chequereceipt_thyme extends ModeleNumRefChequeReceipts { /** - * Dolibarr version of the loaded document - * @var string - */ + * Dolibarr version of the loaded document + * @var string + */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' /** @@ -45,14 +45,14 @@ public $name = 'Thyme'; - /** - * Returns the description of the numbering model - * - * @return string Texte descripif - */ + /** + * Returns the description of the numbering model + * + * @return string Texte descripif + */ public function info() - { - global $conf, $langs, $db; + { + global $conf, $langs, $db; $langs->load("bills"); @@ -83,20 +83,20 @@ $texte .= ''; return $texte; - } + } - /** - * Return an example of numbering - * - * @return string Example - */ - public function getExample() - { - global $conf, $langs, $mysoc; + /** + * Return an example of numbering + * + * @return string Example + */ + public function getExample() + { + global $conf, $langs, $mysoc; - $old_code_client = $mysoc->code_client; - $mysoc->code_client = 'CCCCCCCCCC'; - $numExample = $this->getNextValue($mysoc, ''); + $old_code_client = $mysoc->code_client; + $mysoc->code_client = 'CCCCCCCCCC'; + $numExample = $this->getNextValue($mysoc, ''); $mysoc->code_client = $old_code_client; if (!$numExample) @@ -104,7 +104,7 @@ $numExample = $langs->trans('NotConfigured'); } return $numExample; - } + } /** * Return next free value @@ -113,8 +113,8 @@ * @param Object $object Object we need next value for * @return string Value if KO, <0 if KO */ - public function getNextValue($objsoc, $object) - { + public function getNextValue($objsoc, $object) + { global $db, $conf; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; @@ -134,17 +134,17 @@ } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Return next free value * * @param Societe $objsoc Object third party * @param string $objforref Object for number to search * @return string Next free value - */ - public function chequereceipt_get_num($objsoc, $objforref) - { - // phpcs:enable - return $this->getNextValue($objsoc, $objforref); - } + */ + public function chequereceipt_get_num($objsoc, $objforref) + { + // phpcs:enable + return $this->getNextValue($objsoc, $objforref); + } } --- /tmp/dsg/dolibarr/htdocs/core/modules/cheque/github_modules_chequereceipts.php +++ /tmp/dsg/dolibarr/htdocs/core/modules/cheque/client_modules_chequereceipts.php @@ -178,7 +178,9 @@ if (!empty($conf->global->CHEQUERECEIPT_ADDON_PDF)) { $modele = $conf->global->CHEQUERECEIPT_ADDON_PDF; - } else { + } + else + { //print $langs->trans("Error")." ".$langs->trans("Error_FACTURE_ADDON_PDF_NotDefined"); //return 0; $modele = 'blochet'; @@ -201,12 +203,16 @@ { $outputlangs->charset_output = $sav_charset_output; return 1; - } else { + } + else + { $outputlangs->charset_output = $sav_charset_output; dol_print_error($db, "chequereceipt_pdf_create Error: ".$obj->error); return -1; } - } else { + } + else + { dol_print_error('', $langs->trans("Error")." ".$langs->trans("ErrorFileDoesNotExists", $dir.$file)); return -1; }