@@ -267,7 +267,7 @@ discard block |
||
267 | 267 | $this->export_dependencies_array[$r] = array('category' => 'p.rowid'); |
268 | 268 | } |
269 | 269 | $this->export_sql_start[$r] = 'SELECT DISTINCT '; |
270 | - $this->export_sql_end[$r] = ' FROM ' . MAIN_DB_PREFIX . 'product as p'; |
|
270 | + $this->export_sql_end[$r] = ' FROM ' . MAIN_DB_PREFIX . 'product as p'; |
|
271 | 271 | if (getDolGlobalString('MAIN_PRODUCT_PERENTITY_SHARED')) { |
272 | 272 | $this->export_sql_end[$r] .= " LEFT JOIN " . MAIN_DB_PREFIX . "product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = " . ((int) $conf->entity); |
273 | 273 | } |
@@ -409,14 +409,14 @@ discard block |
||
409 | 409 | $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('p.barcode' => 'virtualproduct')); |
410 | 410 | } |
411 | 411 | $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('pa.qty' => "subproduct", 'pa.incdec' => 'subproduct')); |
412 | - $keyforselect = 'product'; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
413 | - $keyforelement = 'product'; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
414 | - $keyforaliasextra = 'extra'; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
412 | + $keyforselect = 'product'; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
413 | + $keyforelement = 'product'; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
414 | + $keyforaliasextra = 'extra'; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
415 | 415 | include DOL_DOCUMENT_ROOT . '/core/extrafieldsinexport.inc.php'; |
416 | 416 | $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('p2.rowid' => "Id", 'p2.ref' => "Ref", 'p2.label' => "Label", 'p2.description' => "Description")); |
417 | 417 | $this->export_entities_array[$r] = array_merge($this->export_entities_array[$r], array('p2.rowid' => "subproduct", 'p2.ref' => "subproduct", 'p2.label' => "subproduct", 'p2.description' => "subproduct")); |
418 | 418 | $this->export_sql_start[$r] = 'SELECT DISTINCT '; |
419 | - $this->export_sql_end[$r] = ' FROM ' . MAIN_DB_PREFIX . 'product as p'; |
|
419 | + $this->export_sql_end[$r] = ' FROM ' . MAIN_DB_PREFIX . 'product as p'; |
|
420 | 420 | if (getDolGlobalString('MAIN_PRODUCT_PERENTITY_SHARED')) { |
421 | 421 | $this->export_sql_end[$r] .= " LEFT JOIN " . MAIN_DB_PREFIX . "product_perentity as pac ON pac.fk_product = p.rowid AND pac.entity = " . ((int) $conf->entity); |
422 | 422 | } |
@@ -91,10 +91,10 @@ |
||
91 | 91 | |
92 | 92 | // Permissions |
93 | 93 | $this->rights = array(); // Permission array used by this module |
94 | - $r = 0; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
94 | + $r = 0; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
95 | 95 | |
96 | 96 | // Main menu entries |
97 | - $r = 0; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
97 | + $r = 0; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
98 | 98 | /* $this->menu[$r]=array( |
99 | 99 | 'fk_menu'=>'fk_mainmenu=billing,fk_leftmenu=customers_bills_payment', // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode |
100 | 100 | 'mainmenu'=>'billing', |
@@ -75,7 +75,7 @@ |
||
75 | 75 | |
76 | 76 | // Constants |
77 | 77 | $this->const = array(); // List of particular constants to add when module is enabled (key, 'chaine', value, desc, visible, 0 or 'allentities') |
78 | - $r = 0; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
78 | + $r = 0; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
79 | 79 | |
80 | 80 | $this->const[$r][0] = "EXPENSEREPORT_ADDON_PDF"; |
81 | 81 | $this->const[$r][1] = "chaine"; |
@@ -104,7 +104,7 @@ |
||
104 | 104 | |
105 | 105 | // Main menu entries |
106 | 106 | $this->menu = array(); // List of menus to add |
107 | - $r = 0; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
107 | + $r = 0; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
108 | 108 | |
109 | 109 | // This is to declare the Top Menu entry: |
110 | 110 | //$this->menu[$r]=array( 'fk_menu'=>'fk_mainmenu=home,fk_leftmenu=admintools', // Put 0 if this is a top menu |
@@ -339,7 +339,7 @@ |
||
339 | 339 | /* END MODULEBUILDER EXPORT WORKSTATION */ |
340 | 340 | |
341 | 341 | // Imports profiles provided by this module |
342 | - $r = 1; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
342 | + $r = 1; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
343 | 343 | /* BEGIN MODULEBUILDER IMPORT WORKSTATION */ |
344 | 344 | /* |
345 | 345 | $langs->load("workstation@workstation"); |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | return $pass; |
176 | 176 | } |
177 | 177 | |
178 | - return $this->getNewGeneratedPassword(); // warning, may generate infinite loop if conditions are not possible |
|
178 | + return $this->getNewGeneratedPassword(); // warning, may generate infinite loop if conditions are not possible |
|
179 | 179 | } |
180 | 180 | |
181 | 181 | /** |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | { |
190 | 190 | global $langs; |
191 | 191 | |
192 | - $this->initAll(); // For the case this method is called alone |
|
192 | + $this->initAll(); // For the case this method is called alone |
|
193 | 193 | |
194 | 194 | $password_a = preg_split('//u', $password, 0, PREG_SPLIT_NO_EMPTY); |
195 | 195 | $maj = preg_split('//u', $this->Maj, 0, PREG_SPLIT_NO_EMPTY); |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | |
95 | 95 | // Boxes |
96 | 96 | $this->boxes = array(); // List of boxes |
97 | - $r = 0; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
97 | + $r = 0; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
98 | 98 | |
99 | 99 | // Add here list of php file(s) stored in core/boxes that contains class to show a box. |
100 | 100 | // Example: |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | |
107 | 107 | // Permissions |
108 | 108 | $this->rights = array(); // Permission array used by this module |
109 | - $r = 0; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
109 | + $r = 0; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
110 | 110 | |
111 | 111 | // Add here list of permission defined by an id, a label, a boolean and two constant strings. |
112 | 112 | // Example: |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | |
121 | 121 | // Main menu entries |
122 | 122 | $this->menu = array(); // List of menus to add |
123 | - $r = 0; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
123 | + $r = 0; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
124 | 124 | |
125 | 125 | // Add here entries to declare new menus |
126 | 126 | // Example to declare the Top Menu entry: |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | */ |
82 | 82 | public function getExample() |
83 | 83 | { |
84 | - return $this->prefix . '0-0501-0001'; // TC0-0501-0001 |
|
84 | + return $this->prefix . '0-0501-0001'; // TC0-0501-0001 |
|
85 | 85 | } |
86 | 86 | |
87 | 87 | /** |
@@ -98,10 +98,10 @@ discard block |
||
98 | 98 | $pryymm = ''; |
99 | 99 | $max = ''; |
100 | 100 | |
101 | - $pos_source = 0; // POS source = Terminal ID |
|
101 | + $pos_source = 0; // POS source = Terminal ID |
|
102 | 102 | |
103 | 103 | // First, we get the max value |
104 | - $posindice = strlen($this->prefix . $pos_source . '-____-') + 1; // So posindice is position after TCX-YYMM- |
|
104 | + $posindice = strlen($this->prefix . $pos_source . '-____-') + 1; // So posindice is position after TCX-YYMM- |
|
105 | 105 | |
106 | 106 | $sql = "SELECT MAX(CAST(SUBSTRING(ref FROM " . $posindice . ") AS SIGNED)) as max"; |
107 | 107 | $sql .= " FROM " . MAIN_DB_PREFIX . "facture"; |
@@ -141,10 +141,10 @@ discard block |
||
141 | 141 | { |
142 | 142 | global $db; |
143 | 143 | |
144 | - $pos_source = is_object($invoice) && $invoice->pos_source > 0 ? $invoice->pos_source : 0; // POS source = Terminal ID |
|
144 | + $pos_source = is_object($invoice) && $invoice->pos_source > 0 ? $invoice->pos_source : 0; // POS source = Terminal ID |
|
145 | 145 | |
146 | 146 | // First, we get the max value |
147 | - $posindice = strlen($this->prefix . $pos_source . '-____-') + 1; // So posindice is position after TCX-YYMM- |
|
147 | + $posindice = strlen($this->prefix . $pos_source . '-____-') + 1; // So posindice is position after TCX-YYMM- |
|
148 | 148 | $sql = "SELECT MAX(CAST(SUBSTRING(ref FROM " . $posindice . ") AS SIGNED)) as max"; // This is standard SQL |
149 | 149 | $sql .= " FROM " . MAIN_DB_PREFIX . "facture"; |
150 | 150 | $sql .= " WHERE ref LIKE '" . $db->escape($this->prefix . $pos_source . "-____-%") . "'"; |
@@ -120,7 +120,7 @@ |
||
120 | 120 | $code = trim($code); |
121 | 121 | |
122 | 122 | if (empty($code) && $this->code_null && !getDolGlobalString('MAIN_COMPANY_CODE_ALWAYS_REQUIRED')) { |
123 | - $result = 0; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
123 | + $result = 0; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
124 | 124 | } elseif (empty($code) && (!$this->code_null || getDolGlobalString('MAIN_COMPANY_CODE_ALWAYS_REQUIRED'))) { |
125 | 125 | $result = -2; |
126 | 126 | } |