@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | */ |
38 | 38 | abstract class ModeleDon 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($db, $maxfilenamelength = 0) |
49 | 49 | { |
50 | - // phpcs:enable |
|
50 | + // phpcs:enable |
|
51 | 51 | $type = 'donation'; |
52 | 52 | $list = array(); |
53 | 53 |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | } |
67 | 67 | |
68 | 68 | |
69 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
69 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
70 | 70 | /** |
71 | 71 | * Write the object to document file to disk |
72 | 72 | * |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | */ |
78 | 78 | public function write_file($don, $outputlangs, $currency = '') |
79 | 79 | { |
80 | - // phpcs:enable |
|
80 | + // phpcs:enable |
|
81 | 81 | global $user, $conf, $langs, $mysoc; |
82 | 82 | |
83 | 83 | $now = dol_now(); |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | $this->version_lib = DOL_VERSION; |
62 | 62 | } |
63 | 63 | |
64 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
64 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
65 | 65 | /** |
66 | 66 | * Output title line into file |
67 | 67 | * |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | return parent::write_title($array_export_fields_label, $array_selected_sorted, $outputlangs, $array_types); |
80 | 80 | } |
81 | 81 | |
82 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
82 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
83 | 83 | /** |
84 | 84 | * Output record line into file |
85 | 85 | * |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | } |
130 | 130 | |
131 | 131 | |
132 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
132 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
133 | 133 | /** |
134 | 134 | * Open output file |
135 | 135 | * |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | */ |
140 | 140 | public function open_file($file, $outputlangs) |
141 | 141 | { |
142 | - // phpcs:enable |
|
142 | + // phpcs:enable |
|
143 | 143 | global $langs; |
144 | 144 | |
145 | 145 | dol_syslog("ExportCsv::open_file file=" . $file); |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | return $ret; |
158 | 158 | } |
159 | 159 | |
160 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
160 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
161 | 161 | /** |
162 | 162 | * Output header into file |
163 | 163 | * |
@@ -166,12 +166,12 @@ discard block |
||
166 | 166 | */ |
167 | 167 | public function write_header($outputlangs) |
168 | 168 | { |
169 | - // phpcs:enable |
|
169 | + // phpcs:enable |
|
170 | 170 | return 0; |
171 | 171 | } |
172 | 172 | |
173 | 173 | |
174 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
174 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
175 | 175 | /** |
176 | 176 | * Output title line into file |
177 | 177 | * |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | */ |
184 | 184 | public function write_title($array_export_fields_label, $array_selected_sorted, $outputlangs, $array_types) |
185 | 185 | { |
186 | - // phpcs:enable |
|
186 | + // phpcs:enable |
|
187 | 187 | $outputlangs->charset_output = getDolGlobalString('EXPORT_CSV_FORCE_CHARSET'); |
188 | 188 | |
189 | 189 | $selectlabel = array(); |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | } |
208 | 208 | |
209 | 209 | |
210 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
210 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
211 | 211 | /** |
212 | 212 | * Output record line into file |
213 | 213 | * |
@@ -219,7 +219,7 @@ discard block |
||
219 | 219 | */ |
220 | 220 | public function write_record($array_selected_sorted, $objp, $outputlangs, $array_types) |
221 | 221 | { |
222 | - // phpcs:enable |
|
222 | + // phpcs:enable |
|
223 | 223 | global $conf; |
224 | 224 | |
225 | 225 | $outputlangs->charset_output = getDolGlobalString('EXPORT_CSV_FORCE_CHARSET'); |
@@ -271,7 +271,7 @@ discard block |
||
271 | 271 | return 0; |
272 | 272 | } |
273 | 273 | |
274 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
274 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
275 | 275 | /** |
276 | 276 | * Output footer into file |
277 | 277 | * |
@@ -280,11 +280,11 @@ discard block |
||
280 | 280 | */ |
281 | 281 | public function write_footer($outputlangs) |
282 | 282 | { |
283 | - // phpcs:enable |
|
283 | + // phpcs:enable |
|
284 | 284 | return 0; |
285 | 285 | } |
286 | 286 | |
287 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
287 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
288 | 288 | /** |
289 | 289 | * Close file handle |
290 | 290 | * |
@@ -292,7 +292,7 @@ discard block |
||
292 | 292 | */ |
293 | 293 | public function close_file() |
294 | 294 | { |
295 | - // phpcs:enable |
|
295 | + // phpcs:enable |
|
296 | 296 | fclose($this->handle); |
297 | 297 | return 0; |
298 | 298 | } |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | } |
185 | 185 | |
186 | 186 | |
187 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
187 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
188 | 188 | /** |
189 | 189 | * Open output file |
190 | 190 | * |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | */ |
195 | 195 | public function open_file($file, $outputlangs) |
196 | 196 | { |
197 | - // phpcs:enable |
|
197 | + // phpcs:enable |
|
198 | 198 | global $user, $conf, $langs; |
199 | 199 | |
200 | 200 | dol_syslog(get_class($this) . "::open_file file=" . $file); |
@@ -230,7 +230,7 @@ discard block |
||
230 | 230 | return $ret; |
231 | 231 | } |
232 | 232 | |
233 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
233 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
234 | 234 | /** |
235 | 235 | * Write header |
236 | 236 | * |
@@ -239,14 +239,14 @@ discard block |
||
239 | 239 | */ |
240 | 240 | public function write_header($outputlangs) |
241 | 241 | { |
242 | - // phpcs:enable |
|
242 | + // phpcs:enable |
|
243 | 243 | //$outputlangs->charset_output='ISO-8859-1'; // Because Excel 5 format is ISO |
244 | 244 | |
245 | 245 | return 0; |
246 | 246 | } |
247 | 247 | |
248 | 248 | |
249 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
249 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
250 | 250 | /** |
251 | 251 | * Output title line into file |
252 | 252 | * |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | */ |
259 | 259 | public function write_title($array_export_fields_label, $array_selected_sorted, $outputlangs, $array_types) |
260 | 260 | { |
261 | - // phpcs:enable |
|
261 | + // phpcs:enable |
|
262 | 262 | |
263 | 263 | // Create a format for the column headings |
264 | 264 | $this->workbook->getActiveSheet()->getStyle('1')->getFont()->setBold(true); |
@@ -299,7 +299,7 @@ discard block |
||
299 | 299 | return 0; |
300 | 300 | } |
301 | 301 | |
302 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
302 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
303 | 303 | /** |
304 | 304 | * Output record line into file |
305 | 305 | * |
@@ -311,7 +311,7 @@ discard block |
||
311 | 311 | */ |
312 | 312 | public function write_record($array_selected_sorted, $objp, $outputlangs, $array_types) |
313 | 313 | { |
314 | - // phpcs:enable |
|
314 | + // phpcs:enable |
|
315 | 315 | |
316 | 316 | // Define first row |
317 | 317 | $this->col = 1; |
@@ -408,7 +408,7 @@ discard block |
||
408 | 408 | } |
409 | 409 | |
410 | 410 | |
411 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
411 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
412 | 412 | /** |
413 | 413 | * Write footer |
414 | 414 | * |
@@ -417,12 +417,12 @@ discard block |
||
417 | 417 | */ |
418 | 418 | public function write_footer($outputlangs) |
419 | 419 | { |
420 | - // phpcs:enable |
|
420 | + // phpcs:enable |
|
421 | 421 | return 0; |
422 | 422 | } |
423 | 423 | |
424 | 424 | |
425 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
425 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
426 | 426 | /** |
427 | 427 | * Close Excel file |
428 | 428 | * |
@@ -430,7 +430,7 @@ discard block |
||
430 | 430 | */ |
431 | 431 | public function close_file() |
432 | 432 | { |
433 | - // phpcs:enable |
|
433 | + // phpcs:enable |
|
434 | 434 | |
435 | 435 | $objWriter = new Xlsx($this->workbook); |
436 | 436 | $objWriter->save($this->file); |
@@ -441,7 +441,7 @@ discard block |
||
441 | 441 | } |
442 | 442 | |
443 | 443 | |
444 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
444 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
445 | 445 | /** |
446 | 446 | * Clean a cell to respect rules of Excel file cells |
447 | 447 | * |
@@ -450,7 +450,7 @@ discard block |
||
450 | 450 | */ |
451 | 451 | public function excel_clean($newvalue) |
452 | 452 | { |
453 | - // phpcs:enable |
|
453 | + // phpcs:enable |
|
454 | 454 | // Rule Dolibarr: No HTML |
455 | 455 | $newvalue = dol_string_nohtmltag($newvalue); |
456 | 456 |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | } |
152 | 152 | |
153 | 153 | |
154 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
154 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
155 | 155 | /** |
156 | 156 | * Open output file |
157 | 157 | * |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | */ |
162 | 162 | public function open_file($file, $outputlangs) |
163 | 163 | { |
164 | - // phpcs:enable |
|
164 | + // phpcs:enable |
|
165 | 165 | global $langs; |
166 | 166 | |
167 | 167 | dol_syslog("ExportTsv::open_file file=" . $file); |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | return $ret; |
180 | 180 | } |
181 | 181 | |
182 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
182 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
183 | 183 | /** |
184 | 184 | * Output header into file |
185 | 185 | * |
@@ -188,12 +188,12 @@ discard block |
||
188 | 188 | */ |
189 | 189 | public function write_header($outputlangs) |
190 | 190 | { |
191 | - // phpcs:enable |
|
191 | + // phpcs:enable |
|
192 | 192 | return 0; |
193 | 193 | } |
194 | 194 | |
195 | 195 | |
196 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
196 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
197 | 197 | /** |
198 | 198 | * Output title line into file |
199 | 199 | * |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | */ |
206 | 206 | public function write_title($array_export_fields_label, $array_selected_sorted, $outputlangs, $array_types) |
207 | 207 | { |
208 | - // phpcs:enable |
|
208 | + // phpcs:enable |
|
209 | 209 | $selectlabel = array(); |
210 | 210 | foreach ($array_selected_sorted as $code => $value) { |
211 | 211 | $newvalue = $outputlangs->transnoentities($array_export_fields_label[$code]); // newvalue is now $outputlangs->charset_output encoded |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | } |
227 | 227 | |
228 | 228 | |
229 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
229 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
230 | 230 | /** |
231 | 231 | * Output record line into file |
232 | 232 | * |
@@ -238,7 +238,7 @@ discard block |
||
238 | 238 | */ |
239 | 239 | public function write_record($array_selected_sorted, $objp, $outputlangs, $array_types) |
240 | 240 | { |
241 | - // phpcs:enable |
|
241 | + // phpcs:enable |
|
242 | 242 | global $conf; |
243 | 243 | |
244 | 244 | $this->col = 0; |
@@ -284,7 +284,7 @@ discard block |
||
284 | 284 | return 0; |
285 | 285 | } |
286 | 286 | |
287 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
287 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
288 | 288 | /** |
289 | 289 | * Output footer into file |
290 | 290 | * |
@@ -293,11 +293,11 @@ discard block |
||
293 | 293 | */ |
294 | 294 | public function write_footer($outputlangs) |
295 | 295 | { |
296 | - // phpcs:enable |
|
296 | + // phpcs:enable |
|
297 | 297 | return 0; |
298 | 298 | } |
299 | 299 | |
300 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
300 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
301 | 301 | /** |
302 | 302 | * Close file handle |
303 | 303 | * |
@@ -305,12 +305,12 @@ discard block |
||
305 | 305 | */ |
306 | 306 | public function close_file() |
307 | 307 | { |
308 | - // phpcs:enable |
|
308 | + // phpcs:enable |
|
309 | 309 | fclose($this->handle); |
310 | 310 | return 0; |
311 | 311 | } |
312 | 312 | |
313 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
313 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
314 | 314 | /** |
315 | 315 | * Clean a cell to respect rules of TSV file cells |
316 | 316 | * |
@@ -320,7 +320,7 @@ discard block |
||
320 | 320 | */ |
321 | 321 | public function tsv_clean($newvalue, $charset) |
322 | 322 | { |
323 | - // phpcs:enable |
|
323 | + // phpcs:enable |
|
324 | 324 | // Rule Dolibarr: No HTML |
325 | 325 | $newvalue = dol_string_nohtmltag($newvalue, 1, $charset); |
326 | 326 |
@@ -450,7 +450,7 @@ discard block |
||
450 | 450 | $this->import_convertvalue_array[$r] = array( |
451 | 451 | 'ps.fk_product' => array('rule' => 'fetchidfromref', 'classfile' => '/product/class/product.class.php', 'class' => 'Product', 'method' => 'fetch', 'element' => 'product'), |
452 | 452 | 'ps.fk_entrepot' => array('rule' => 'fetchidfromref', 'classfile' => '/product/stock/class/entrepot.class.php', 'class' => 'Entrepot', 'method' => 'fetch', 'element' => 'ref') |
453 | - ); |
|
453 | + ); |
|
454 | 454 | $this->import_examplevalues_array[$r] = array( |
455 | 455 | 'ps.fk_product' => "id or ref of product", 'ps.fk_entrepot' => "id or ref of warehouse", 'ps.reel' => "10" |
456 | 456 | ); |
@@ -500,10 +500,10 @@ discard block |
||
500 | 500 | $sql = array(); |
501 | 501 | |
502 | 502 | $sql = array( |
503 | - "DELETE FROM " . MAIN_DB_PREFIX . "document_model WHERE nom = '" . $this->db->escape($this->const[1][2]) . "' AND type = 'stock' AND entity = " . ((int) $conf->entity), |
|
504 | - "INSERT INTO " . MAIN_DB_PREFIX . "document_model (nom, type, entity) VALUES('" . $this->db->escape($this->const[1][2]) . "','stock'," . ((int) $conf->entity) . ")", |
|
505 | - "DELETE FROM " . MAIN_DB_PREFIX . "document_model WHERE nom = '" . $this->db->escape($this->const[2][2]) . "' AND type = 'mouvement' AND entity = " . ((int) $conf->entity), |
|
506 | - "INSERT INTO " . MAIN_DB_PREFIX . "document_model (nom, type, entity) VALUES('" . $this->db->escape($this->const[2][2]) . "','mouvement'," . ((int) $conf->entity) . ")", |
|
503 | + "DELETE FROM " . MAIN_DB_PREFIX . "document_model WHERE nom = '" . $this->db->escape($this->const[1][2]) . "' AND type = 'stock' AND entity = " . ((int) $conf->entity), |
|
504 | + "INSERT INTO " . MAIN_DB_PREFIX . "document_model (nom, type, entity) VALUES('" . $this->db->escape($this->const[1][2]) . "','stock'," . ((int) $conf->entity) . ")", |
|
505 | + "DELETE FROM " . MAIN_DB_PREFIX . "document_model WHERE nom = '" . $this->db->escape($this->const[2][2]) . "' AND type = 'mouvement' AND entity = " . ((int) $conf->entity), |
|
506 | + "INSERT INTO " . MAIN_DB_PREFIX . "document_model (nom, type, entity) VALUES('" . $this->db->escape($this->const[2][2]) . "','mouvement'," . ((int) $conf->entity) . ")", |
|
507 | 507 | ); |
508 | 508 | |
509 | 509 | return $this->_init($sql, $options); |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | |
201 | 201 | // Exports |
202 | 202 | //-------- |
203 | - $r = 0; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
203 | + $r = 0; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
204 | 204 | |
205 | 205 | // Export warehouses |
206 | 206 | $r++; |
@@ -219,7 +219,7 @@ discard block |
||
219 | 219 | 'e.phone' => 'Text', 'e.fax' => 'Text', 'e.statut' => 'Text', 'pe.rowid' => 'List:entrepot:ref:rowid:stock', 'pe.ref' => 'Text' |
220 | 220 | ); |
221 | 221 | $this->export_entities_array[$r] = array(); // We define here only fields that use another icon that the one defined into export_icon |
222 | - $this->export_aggregate_array[$r] = array(); // TODO Not used yet |
|
222 | + $this->export_aggregate_array[$r] = array(); // TODO Not used yet |
|
223 | 223 | $keyforselect = 'warehouse'; |
224 | 224 | $keyforelement = 'warehouse'; |
225 | 225 | $keyforaliasextra = 'extra'; |
@@ -266,7 +266,7 @@ discard block |
||
266 | 266 | 'p.datec' => 'product', 'p.tms' => 'product', 'p.pmp' => 'product', 'p.cost_price' => 'product', |
267 | 267 | 'ps.reel' => 'stock', |
268 | 268 | 'p.seuil_stock_alerte' => 'product', 'p.barcode' => 'product', 'bt.libelle' => 'product', |
269 | - ); // We define here only fields that use another icon that the one defined into export_icon |
|
269 | + ); // We define here only fields that use another icon that the one defined into export_icon |
|
270 | 270 | if (isModEnabled('barcode')) { |
271 | 271 | $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('p.barcode' => 'product')); |
272 | 272 | } |
@@ -274,7 +274,7 @@ discard block |
||
274 | 274 | $this->export_dependencies_array[$r] = array('stock' => array('p.rowid', 'e.rowid')); // We must keep this until the aggregate_array is used. To have a unique key, if we ask a field of a child, to avoid the DISTINCT to discard them. |
275 | 275 | $keyforselect = 'product'; |
276 | 276 | $keyforelement = 'product'; |
277 | - $keyforaliasextra = 'extra'; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
277 | + $keyforaliasextra = 'extra'; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
278 | 278 | include DOL_DOCUMENT_ROOT . '/core/extrafieldsinexport.inc.php'; |
279 | 279 | $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('ps.reel' => 'Stock')); |
280 | 280 | |
@@ -325,7 +325,7 @@ discard block |
||
325 | 325 | 'p.datec' => 'product', 'p.tms' => 'product', 'p.pmp' => 'product', 'p.cost_price' => 'product', |
326 | 326 | 'pb.rowid' => 'batch', 'pb.batch' => 'batch', 'pb.qty' => 'batch', |
327 | 327 | 'pl.eatby' => 'batch', 'pl.sellby' => 'batch' |
328 | - ); // We define here only fields that use another icon that the one defined into export_icon |
|
328 | + ); // We define here only fields that use another icon that the one defined into export_icon |
|
329 | 329 | if (isModEnabled('barcode')) { |
330 | 330 | $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('p.barcode' => 'product')); |
331 | 331 | } |
@@ -333,7 +333,7 @@ discard block |
||
333 | 333 | $this->export_dependencies_array[$r] = array('stockbatch' => array('pb.rowid'), 'batch' => array('pb.rowid')); // We must keep this until the aggregate_array is used. To add unique key if we ask a field of a child to avoid the DISTINCT to discard them. |
334 | 334 | $keyforselect = 'product_lot'; |
335 | 335 | $keyforelement = 'batch'; |
336 | - $keyforaliasextra = 'extra'; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
336 | + $keyforaliasextra = 'extra'; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
337 | 337 | include DOL_DOCUMENT_ROOT . '/core/extrafieldsinexport.inc.php'; |
338 | 338 | |
339 | 339 | $this->export_sql_start[$r] = 'SELECT DISTINCT '; |
@@ -375,7 +375,7 @@ discard block |
||
375 | 375 | 'e.rowid' => 'warehouse', 'e.ref' => 'warehouse', 'e.description' => 'warehouse', 'e.lieu' => 'warehouse', 'e.address' => 'warehouse', 'e.zip' => 'warehouse', 'e.town' => 'warehouse', |
376 | 376 | 'p.rowid' => "product", 'p.ref' => "product", 'p.fk_product_type' => "product", 'p.label' => "product", 'p.description' => "product", 'p.note' => "product", |
377 | 377 | 'p.price' => "product", 'p.tva_tx' => 'product', 'p.tosell' => "product", 'p.tobuy' => "product", 'p.duration' => "product", 'p.datec' => 'product', 'p.tms' => 'product' |
378 | - ); // We define here only fields that use another icon that the one defined into export_icon |
|
378 | + ); // We define here only fields that use another icon that the one defined into export_icon |
|
379 | 379 | if (isModEnabled('productbatch')) { |
380 | 380 | $this->export_fields_array[$r]['sm.batch'] = 'Batch'; |
381 | 381 | $this->export_TypeFields_array[$r]['sm.batch'] = 'Text'; |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | $this->atleastonediscount = 0; |
134 | 134 | } |
135 | 135 | |
136 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
136 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
137 | 137 | /** |
138 | 138 | * Function to build pdf onto disk |
139 | 139 | * |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | */ |
148 | 148 | public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) |
149 | 149 | { |
150 | - // phpcs:enable |
|
150 | + // phpcs:enable |
|
151 | 151 | global $user, $langs, $conf, $mysoc, $db, $hookmanager, $nblines; |
152 | 152 | |
153 | 153 | if (!is_object($outputlangs)) { |
@@ -1100,7 +1100,7 @@ discard block |
||
1100 | 1100 | return ($tab2_top + ($tab2_hl * $index)); |
1101 | 1101 | } |
1102 | 1102 | |
1103 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
1103 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
1104 | 1104 | /** |
1105 | 1105 | * Show table for lines |
1106 | 1106 | * |
@@ -1156,8 +1156,8 @@ discard block |
||
1156 | 1156 | } |
1157 | 1157 | } |
1158 | 1158 | |
1159 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1160 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
1159 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1160 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
1161 | 1161 | /** |
1162 | 1162 | * Show top header of page. |
1163 | 1163 | * |
@@ -1170,7 +1170,7 @@ discard block |
||
1170 | 1170 | */ |
1171 | 1171 | protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlekey = "StockTransferSheetProforma") |
1172 | 1172 | { |
1173 | - // phpcs:enable |
|
1173 | + // phpcs:enable |
|
1174 | 1174 | global $conf, $langs; |
1175 | 1175 | |
1176 | 1176 | // Load traductions files required by page |
@@ -1449,8 +1449,8 @@ discard block |
||
1449 | 1449 | return $top_shift; |
1450 | 1450 | } |
1451 | 1451 | |
1452 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1453 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
1452 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1453 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
1454 | 1454 | /** |
1455 | 1455 | * Show footer of page. Need this->emetteur object |
1456 | 1456 | * |
@@ -1462,7 +1462,7 @@ discard block |
||
1462 | 1462 | */ |
1463 | 1463 | protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) |
1464 | 1464 | { |
1465 | - // phpcs:enable |
|
1465 | + // phpcs:enable |
|
1466 | 1466 | $showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0); |
1467 | 1467 | return pdf_pagefoot($pdf, $outputlangs, 'ORDER_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext); |
1468 | 1468 | } |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | }*/ |
165 | 165 | } |
166 | 166 | |
167 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
167 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
168 | 168 | /** |
169 | 169 | * Function to build pdf onto disk |
170 | 170 | * |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | */ |
179 | 179 | public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) |
180 | 180 | { |
181 | - // phpcs:enable |
|
181 | + // phpcs:enable |
|
182 | 182 | global $db, $user, $conf, $langs, $hookmanager; |
183 | 183 | |
184 | 184 | $object->fetch_thirdparty(); |
@@ -707,8 +707,8 @@ discard block |
||
707 | 707 | } |
708 | 708 | } |
709 | 709 | |
710 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
711 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
710 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
711 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
712 | 712 | /** |
713 | 713 | * Show total to pay |
714 | 714 | * |
@@ -721,7 +721,7 @@ discard block |
||
721 | 721 | */ |
722 | 722 | protected function _tableau_tot(&$pdf, $object, $deja_regle, $posy, $outputlangs) |
723 | 723 | { |
724 | - // phpcs:enable |
|
724 | + // phpcs:enable |
|
725 | 725 | global $conf, $mysoc; |
726 | 726 | |
727 | 727 | $sign = 1; |
@@ -821,7 +821,7 @@ discard block |
||
821 | 821 | return ($tab2_top + ($tab2_hl * $index)); |
822 | 822 | } |
823 | 823 | |
824 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
824 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
825 | 825 | /** |
826 | 826 | * Show table for lines |
827 | 827 | * |
@@ -836,7 +836,7 @@ discard block |
||
836 | 836 | */ |
837 | 837 | protected function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0) |
838 | 838 | { |
839 | - // phpcs:enable |
|
839 | + // phpcs:enable |
|
840 | 840 | global $conf; |
841 | 841 | |
842 | 842 | // Force to disable hidetop and hidebottom |
@@ -941,7 +941,7 @@ discard block |
||
941 | 941 | return false; |
942 | 942 | } |
943 | 943 | |
944 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
944 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
945 | 945 | /** |
946 | 946 | * Show top header of page. |
947 | 947 | * |
@@ -953,7 +953,7 @@ discard block |
||
953 | 953 | */ |
954 | 954 | protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs) |
955 | 955 | { |
956 | - // phpcs:enable |
|
956 | + // phpcs:enable |
|
957 | 957 | global $conf, $langs; |
958 | 958 | |
959 | 959 | $langs->load("orders"); |
@@ -1220,7 +1220,7 @@ discard block |
||
1220 | 1220 | return 0; |
1221 | 1221 | } |
1222 | 1222 | |
1223 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
1223 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
1224 | 1224 | /** |
1225 | 1225 | * Show footer of page. Need this->emetteur object |
1226 | 1226 | * |
@@ -1232,7 +1232,7 @@ discard block |
||
1232 | 1232 | */ |
1233 | 1233 | protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) |
1234 | 1234 | { |
1235 | - // phpcs:enable |
|
1235 | + // phpcs:enable |
|
1236 | 1236 | $showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0); |
1237 | 1237 | return pdf_pagefoot($pdf, $outputlangs, 'SHIPPING_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext); |
1238 | 1238 | } |