@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | // use this method in future refactoring |
| 48 | 48 | } |
| 49 | 49 | |
| 50 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 50 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 51 | 51 | /** |
| 52 | 52 | * Output a sticker on page at position _COUNTX, _COUNTY (_COUNTX and _COUNTY start from 0) |
| 53 | 53 | * - %LOGO% is replace with company logo |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | */ |
| 65 | 65 | public function Add_PDF_label(&$pdf, $textleft, $header, $footer, $outputlangs, $textright = '', $photo = '') |
| 66 | 66 | { |
| 67 | - // phpcs:enable |
|
| 67 | + // phpcs:enable |
|
| 68 | 68 | global $mysoc, $conf, $langs; |
| 69 | 69 | global $forceimgscalewidth, $forceimgscaleheight; |
| 70 | 70 | |
@@ -224,7 +224,7 @@ discard block |
||
| 224 | 224 | |
| 225 | 225 | |
| 226 | 226 | |
| 227 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 227 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 228 | 228 | /** |
| 229 | 229 | * Function to build PDF on disk, then output on HTTP stream. |
| 230 | 230 | * |
@@ -237,7 +237,7 @@ discard block |
||
| 237 | 237 | */ |
| 238 | 238 | public function write_file($arrayofrecords, $outputlangs, $srctemplatepath, $outputdir = '', $filename = 'tmp_address_sheet.pdf') |
| 239 | 239 | { |
| 240 | - // phpcs:enable |
|
| 240 | + // phpcs:enable |
|
| 241 | 241 | global $user, $conf, $langs, $mysoc, $_Avery_Labels; |
| 242 | 242 | |
| 243 | 243 | $this->code = $srctemplatepath; |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | public $error = ''; |
| 43 | 43 | |
| 44 | 44 | |
| 45 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 45 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 46 | 46 | /** |
| 47 | 47 | * Return list of active generation modules |
| 48 | 48 | * |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | */ |
| 53 | 53 | public function liste_modeles($db, $maxfilenamelength = 0) |
| 54 | 54 | { |
| 55 | - // phpcs:enable |
|
| 55 | + // phpcs:enable |
|
| 56 | 56 | $type = 'members_labels'; |
| 57 | 57 | $list = array(); |
| 58 | 58 | |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | */ |
| 80 | 80 | function doc_label_pdf_create($db, $arrayofrecords, $modele, $outputlangs, $outputdir = '', $template = 'standardlabel', $filename = 'tmp_address_sheet.pdf') |
| 81 | 81 | { |
| 82 | - // phpcs:enable |
|
| 82 | + // phpcs:enable |
|
| 83 | 83 | global $conf, $langs; |
| 84 | 84 | $langs->load("members"); |
| 85 | 85 | |
@@ -161,8 +161,8 @@ |
||
| 161 | 161 | } |
| 162 | 162 | |
| 163 | 163 | $sql = array( |
| 164 | - "DELETE FROM " . MAIN_DB_PREFIX . "document_model WHERE nom = '" . $this->db->escape($this->const[0][2]) . "' AND type = 'donation' AND entity = " . ((int) $conf->entity), |
|
| 165 | - "INSERT INTO " . MAIN_DB_PREFIX . "document_model (nom, type, entity) VALUES('" . $this->db->escape($this->const[0][2]) . "','donation'," . ((int) $conf->entity) . ")", |
|
| 164 | + "DELETE FROM " . MAIN_DB_PREFIX . "document_model WHERE nom = '" . $this->db->escape($this->const[0][2]) . "' AND type = 'donation' AND entity = " . ((int) $conf->entity), |
|
| 165 | + "INSERT INTO " . MAIN_DB_PREFIX . "document_model (nom, type, entity) VALUES('" . $this->db->escape($this->const[0][2]) . "','donation'," . ((int) $conf->entity) . ")", |
|
| 166 | 166 | ); |
| 167 | 167 | |
| 168 | 168 | return $this->_init($sql, $options); |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | */ |
| 35 | 35 | abstract class ModelePDFUserGroup extends CommonDocGenerator |
| 36 | 36 | { |
| 37 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 37 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 38 | 38 | /** |
| 39 | 39 | * Return list of active generation modules |
| 40 | 40 | * |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | */ |
| 45 | 45 | public static function liste_modeles($db, $maxfilenamelength = 0) |
| 46 | 46 | { |
| 47 | - // phpcs:enable |
|
| 47 | + // phpcs:enable |
|
| 48 | 48 | $type = 'group'; |
| 49 | 49 | $list = array(); |
| 50 | 50 | |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | */ |
| 38 | 38 | abstract class ModeleThirdPartyDoc extends CommonDocGenerator |
| 39 | 39 | { |
| 40 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 40 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 41 | 41 | /** |
| 42 | 42 | * Return list of active generation modules |
| 43 | 43 | * |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | */ |
| 48 | 48 | public static function liste_modeles($dbs, $maxfilenamelength = 0) |
| 49 | 49 | { |
| 50 | - // phpcs:enable |
|
| 50 | + // phpcs:enable |
|
| 51 | 51 | $type = 'company'; |
| 52 | 52 | $list = array(); |
| 53 | 53 | |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | } |
| 86 | 86 | |
| 87 | 87 | |
| 88 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 88 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 89 | 89 | /** |
| 90 | 90 | * Renvoie la liste des modeles de numérotation |
| 91 | 91 | * |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | */ |
| 96 | 96 | public static function liste_modeles($dbs, $maxfilenamelength = 0) |
| 97 | 97 | { |
| 98 | - // phpcs:enable |
|
| 98 | + // phpcs:enable |
|
| 99 | 99 | $list = array(); |
| 100 | 100 | $sql = ""; |
| 101 | 101 | |
@@ -185,7 +185,7 @@ discard block |
||
| 185 | 185 | return $s; |
| 186 | 186 | } |
| 187 | 187 | |
| 188 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 188 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 189 | 189 | /** |
| 190 | 190 | * Check if mask/numbering use prefix |
| 191 | 191 | * |
@@ -193,7 +193,7 @@ discard block |
||
| 193 | 193 | */ |
| 194 | 194 | public function verif_prefixIsUsed() |
| 195 | 195 | { |
| 196 | - // phpcs:enable |
|
| 196 | + // phpcs:enable |
|
| 197 | 197 | return 0; |
| 198 | 198 | } |
| 199 | 199 | } |
@@ -250,7 +250,7 @@ discard block |
||
| 250 | 250 | return $s; |
| 251 | 251 | } |
| 252 | 252 | |
| 253 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 253 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 254 | 254 | /** |
| 255 | 255 | * Set accountancy account code for a third party into this->code |
| 256 | 256 | * |
@@ -261,7 +261,7 @@ discard block |
||
| 261 | 261 | */ |
| 262 | 262 | public function get_code($db, $societe, $type = '') |
| 263 | 263 | { |
| 264 | - // phpcs:enable |
|
| 264 | + // phpcs:enable |
|
| 265 | 265 | global $langs; |
| 266 | 266 | |
| 267 | 267 | return $langs->trans("NotAvailable"); |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | } |
| 148 | 148 | |
| 149 | 149 | |
| 150 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 150 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 151 | 151 | /** |
| 152 | 152 | * Set accountancy account code for a third party into this->code |
| 153 | 153 | * |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | */ |
| 159 | 159 | public function get_code($db, $societe, $type = '') |
| 160 | 160 | { |
| 161 | - // phpcs:enable |
|
| 161 | + // phpcs:enable |
|
| 162 | 162 | global $conf; |
| 163 | 163 | |
| 164 | 164 | $i = 0; |
@@ -185,7 +185,7 @@ discard block |
||
| 185 | 185 | return $s; |
| 186 | 186 | } |
| 187 | 187 | |
| 188 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 188 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 189 | 189 | /** |
| 190 | 190 | * Set accountancy account code for a third party into this->code |
| 191 | 191 | * |
@@ -196,7 +196,7 @@ discard block |
||
| 196 | 196 | */ |
| 197 | 197 | public function get_code($db, $societe, $type = '') |
| 198 | 198 | { |
| 199 | - // phpcs:enable |
|
| 199 | + // phpcs:enable |
|
| 200 | 200 | global $conf; |
| 201 | 201 | $i = 0; |
| 202 | 202 | $this->code = ''; |
@@ -190,7 +190,7 @@ discard block |
||
| 190 | 190 | } |
| 191 | 191 | |
| 192 | 192 | |
| 193 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 193 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 194 | 194 | /** |
| 195 | 195 | * Indicates if the code is available or not (by another third party) |
| 196 | 196 | * |
@@ -202,7 +202,7 @@ discard block |
||
| 202 | 202 | */ |
| 203 | 203 | public function verif_dispo($db, $code, $soc, $type = 0) |
| 204 | 204 | { |
| 205 | - // phpcs:enable |
|
| 205 | + // phpcs:enable |
|
| 206 | 206 | $sql = "SELECT rowid FROM " . MAIN_DB_PREFIX . "societe"; |
| 207 | 207 | if ($type == 1) { |
| 208 | 208 | $sql .= " WHERE code_fournisseur = '" . $db->escape($code) . "'"; |
@@ -228,7 +228,7 @@ discard block |
||
| 228 | 228 | } |
| 229 | 229 | |
| 230 | 230 | |
| 231 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 231 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 232 | 232 | /** |
| 233 | 233 | * Renvoi si un code respecte la syntax |
| 234 | 234 | * |
@@ -237,7 +237,7 @@ discard block |
||
| 237 | 237 | */ |
| 238 | 238 | public function verif_syntax($code) |
| 239 | 239 | { |
| 240 | - // phpcs:enable |
|
| 240 | + // phpcs:enable |
|
| 241 | 241 | $res = 0; |
| 242 | 242 | |
| 243 | 243 | if (dol_strlen($code) < 11) { |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | $code = strtoupper(trim($code)); |
| 166 | 166 | |
| 167 | 167 | if (empty($code) && $this->code_null && !getDolGlobalString('MAIN_COMPANY_CODE_ALWAYS_REQUIRED')) { |
| 168 | - $result = 0; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
| 168 | + $result = 0; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
| 169 | 169 | } elseif (empty($code) && (!$this->code_null || getDolGlobalString('MAIN_COMPANY_CODE_ALWAYS_REQUIRED'))) { |
| 170 | 170 | $result = -2; |
| 171 | 171 | } else { |
@@ -174,7 +174,7 @@ discard block |
||
| 174 | 174 | if ($is_dispo != 0) { |
| 175 | 175 | $result = -3; |
| 176 | 176 | } else { |
| 177 | - $result = 0; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
| 177 | + $result = 0; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
| 178 | 178 | } |
| 179 | 179 | } else { |
| 180 | 180 | if (dol_strlen($code) == 0) { |
@@ -243,7 +243,7 @@ discard block |
||
| 243 | 243 | if (dol_strlen($code) < 11) { |
| 244 | 244 | $res = -1; |
| 245 | 245 | } else { |
| 246 | - $res = 0; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
| 246 | + $res = 0; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
| 247 | 247 | } |
| 248 | 248 | return $res; |
| 249 | 249 | } |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | return ''; |
| 85 | 85 | } |
| 86 | 86 | |
| 87 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 87 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 88 | 88 | /** |
| 89 | 89 | * Set accountancy account code for a third party into this->code |
| 90 | 90 | * |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | */ |
| 96 | 96 | public function get_code($db, $societe, $type = '') |
| 97 | 97 | { |
| 98 | - // phpcs:enable |
|
| 98 | + // phpcs:enable |
|
| 99 | 99 | $this->code = ''; |
| 100 | 100 | |
| 101 | 101 | if (is_object($societe)) { |