@@ -632,7 +632,7 @@ |
||
632 | 632 | } |
633 | 633 | $sql .= " WHERE ps.fk_entrepot = ".((int) $this->id); |
634 | 634 | if ($separatedPMP) { |
635 | - $sql .= " AND pa.fk_product = p.rowid AND pa.entity = ". (int) $conf->entity; |
|
635 | + $sql .= " AND pa.fk_product = p.rowid AND pa.entity = ".(int) $conf->entity; |
|
636 | 636 | } |
637 | 637 | $sql .= " AND ps.fk_product = p.rowid"; |
638 | 638 | //print $sql; |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | require_once DOL_DOCUMENT_ROOT.'/societe/class/societeaccount.class.php'; |
50 | 50 | require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; |
51 | 51 | require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; |
52 | -require_once DOL_DOCUMENT_ROOT . '/comm/action/class/actioncomm.class.php'; |
|
52 | +require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; |
|
53 | 53 | // Hook to be used by external payment modules (ie Payzen, ...) |
54 | 54 | include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; |
55 | 55 | $hookmanager = new HookManager($db); |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | // Has not already voted |
171 | 171 | $conforbooth = new ActionComm($db); |
172 | 172 | $resultconforbooth = $conforbooth->fetch($idvote); |
173 | - if ($resultconforbooth<=0) { |
|
173 | + if ($resultconforbooth <= 0) { |
|
174 | 174 | $error++; |
175 | 175 | $errmsg .= $conforbooth->error; |
176 | 176 | } else { |
@@ -186,11 +186,11 @@ discard block |
||
186 | 186 | } |
187 | 187 | } |
188 | 188 | } |
189 | - if ($votestatus=="ok") { |
|
189 | + if ($votestatus == "ok") { |
|
190 | 190 | setEventMessage($langs->trans("VoteOk"), 'mesgs'); |
191 | - } elseif ($votestatus=="ko") { |
|
191 | + } elseif ($votestatus == "ko") { |
|
192 | 192 | setEventMessage($langs->trans("AlreadyVoted"), 'warnings'); |
193 | - } elseif ($votestatus=="err") { |
|
193 | + } elseif ($votestatus == "err") { |
|
194 | 194 | setEventMessage($langs->trans("VoteError"), 'warnings'); |
195 | 195 | } |
196 | 196 | header("Refresh:0;url=".dol_buildpath('/public/project/viewandvote.php?id='.$id.'&securekey=', 1).$securekeyreceived); |
@@ -268,9 +268,9 @@ discard block |
||
268 | 268 | // Exports profiles provided by this module |
269 | 269 | $r = 1; |
270 | 270 | |
271 | - $this->export_code[$r]=$this->rights_class.'_'.$r; |
|
272 | - $this->export_label[$r]='MOs'; // Translation key (used only if key ExportDataset_xxx_z not found) |
|
273 | - $this->export_icon[$r]='mrp'; |
|
271 | + $this->export_code[$r] = $this->rights_class.'_'.$r; |
|
272 | + $this->export_label[$r] = 'MOs'; // Translation key (used only if key ExportDataset_xxx_z not found) |
|
273 | + $this->export_icon[$r] = 'mrp'; |
|
274 | 274 | $this->export_fields_array[$r] = array( |
275 | 275 | 'm.rowid'=>"Id", |
276 | 276 | 'm.ref'=>"Ref", |
@@ -350,9 +350,9 @@ discard block |
||
350 | 350 | $r++; */ |
351 | 351 | /* END MODULEBUILDER IMPORT MO */ |
352 | 352 | $r++; |
353 | - $this->import_code[$r]=$this->rights_class.'_'.$r; |
|
354 | - $this->import_label[$r]='MOs'; // Translation key (used only if key ExportDataset_xxx_z not found) |
|
355 | - $this->import_icon[$r]='mrp'; |
|
353 | + $this->import_code[$r] = $this->rights_class.'_'.$r; |
|
354 | + $this->import_label[$r] = 'MOs'; // Translation key (used only if key ExportDataset_xxx_z not found) |
|
355 | + $this->import_icon[$r] = 'mrp'; |
|
356 | 356 | $this->import_entities_array[$r] = array(); // We define here only fields that use a different icon from the one defined in import_icon |
357 | 357 | $this->import_tables_array[$r] = array('m'=>MAIN_DB_PREFIX.'mrp_mo', 'extra'=>MAIN_DB_PREFIX.'mrp_mo_extrafields'); |
358 | 358 | $this->import_tables_creator_array[$r] = array('m'=>'fk_user_creat'); // Fields to store import user id |
@@ -94,7 +94,7 @@ |
||
94 | 94 | //var_dump($db); |
95 | 95 | if ($resql) { |
96 | 96 | while ($row = $db->fetch_array($resql)) { |
97 | - $row_array['label'] = $row['location_incoterms'].($row['label']?' - '.$row['label'] : ''); |
|
97 | + $row_array['label'] = $row['location_incoterms'].($row['label'] ? ' - '.$row['label'] : ''); |
|
98 | 98 | if ($location_incoterms) { |
99 | 99 | $row_array['value'] = $row['location_incoterms']; |
100 | 100 | } |
@@ -470,7 +470,7 @@ |
||
470 | 470 | $sql .= ", ".($this->fk_project > 0 ? ((int) $this->fk_project) : 0); |
471 | 471 | $sql .= ", ".((int) $user->id); |
472 | 472 | $sql .= ", '".$this->db->idate($now)."'"; |
473 | - $sql .= ", NULL"; // Filled later |
|
473 | + $sql .= ", NULL"; // Filled later |
|
474 | 474 | $sql .= ", ".((int) $conf->entity); |
475 | 475 | $sql .= ")"; |
476 | 476 |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | $this->db = $db; |
137 | 137 | $this->name = "vinci"; |
138 | 138 | $this->description = $langs->trans('DocumentModelStandardPDF'); |
139 | - $this->update_main_doc_field = 1; // Save the name of generated file as the main doc when generating a doc with this template |
|
139 | + $this->update_main_doc_field = 1; // Save the name of generated file as the main doc when generating a doc with this template |
|
140 | 140 | |
141 | 141 | // Page size for A4 format |
142 | 142 | $this->type = 'pdf'; |
@@ -564,7 +564,7 @@ discard block |
||
564 | 564 | if ($this->getColumnStatus('desc')) { |
565 | 565 | $pdf->startTransaction(); //description |
566 | 566 | $des = $prod -> description; |
567 | - $descr = $des;//implode("<br>", $des); |
|
567 | + $descr = $des; //implode("<br>", $des); |
|
568 | 568 | |
569 | 569 | $this->printStdColumnContent($pdf, $curY, 'desc', $descr); |
570 | 570 | |
@@ -1199,7 +1199,7 @@ discard block |
||
1199 | 1199 | $pdf->SetFont('', 'B', $default_font_size + 3); |
1200 | 1200 | $pdf->SetXY($posx, $posy); |
1201 | 1201 | $pdf->SetTextColor(0, 0, 60); |
1202 | - $pdf->MultiCell($w, 3, $outputlangs->transnoentities("QtyToProduce").": " .$object->qty, '', 'R'); |
|
1202 | + $pdf->MultiCell($w, 3, $outputlangs->transnoentities("QtyToProduce").": ".$object->qty, '', 'R'); |
|
1203 | 1203 | |
1204 | 1204 | |
1205 | 1205 | $pdf->SetTextColor(0, 0, 60); |
@@ -905,13 +905,13 @@ discard block |
||
905 | 905 | $sql .= " WHERE ug.entity IN (".getEntity('usergroup').")"; |
906 | 906 | $sql .= " AND ug.fk_user = u.rowid "; |
907 | 907 | } else { |
908 | - if ($usergroup > 0) { |
|
908 | + if ($usergroup > 0) { |
|
909 | 909 | $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."usergroup_user as ug ON u.rowid = ug.fk_user"; |
910 | 910 | } |
911 | 911 | $sql .= " WHERE u.entity IN (".getEntity('user').")"; |
912 | 912 | } |
913 | 913 | $sql .= " AND u.statut = 1"; |
914 | - if ($usergroup > 0) { |
|
914 | + if ($usergroup > 0) { |
|
915 | 915 | $sql .= " AND ug.fk_usergroup = ".((int) $usergroup); |
916 | 916 | } |
917 | 917 | |
@@ -1134,8 +1134,8 @@ discard block |
||
1134 | 1134 | // We are in a particular day for $username, now we scan all events |
1135 | 1135 | foreach ($eventarray as $daykey => $notused) { |
1136 | 1136 | $annee = dol_print_date($daykey, '%Y'); |
1137 | - $mois = dol_print_date($daykey, '%m'); |
|
1138 | - $jour = dol_print_date($daykey, '%d'); |
|
1137 | + $mois = dol_print_date($daykey, '%m'); |
|
1138 | + $jour = dol_print_date($daykey, '%d'); |
|
1139 | 1139 | |
1140 | 1140 | if ($day == $jour && $month == $mois && $year == $annee) { // Is it the day we are looking for when calling function ? |
1141 | 1141 | // Scan all event for this date |
@@ -206,12 +206,12 @@ |
||
206 | 206 | $entry .= '</td>'; |
207 | 207 | $entry .= '<td class="right" width="20px;">'; |
208 | 208 | if ($user->rights->categorie->creer) { |
209 | - $entry .= '<a class="editfielda" href="' . DOL_URL_ROOT . '/categories/edit.php?id=' . $val['id'] . '&type=' . $type . $moreparam . '&backtopage=' . urlencode($_SERVER["PHP_SELF"] . '?type=' . $type) . '">' . img_edit() . '</a>'; |
|
209 | + $entry .= '<a class="editfielda" href="'.DOL_URL_ROOT.'/categories/edit.php?id='.$val['id'].'&type='.$type.$moreparam.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?type='.$type).'">'.img_edit().'</a>'; |
|
210 | 210 | } |
211 | 211 | $entry .= '</td>'; |
212 | 212 | $entry .= '<td class="right" width="20px;">'; |
213 | 213 | if ($user->rights->categorie->supprimer) { |
214 | - $entry .= '<a class="deletefilelink" href="' . DOL_URL_ROOT . '/categories/viewcat.php?action=delete&token=' . newToken() . '&id=' . $val['id'] . '&type=' . $type . $moreparam . '&backtopage=' . urlencode($_SERVER["PHP_SELF"] . '?type=' . $type . $moreparam) . '&backtolist=' . urlencode($_SERVER["PHP_SELF"] . '?type=' . $type . $moreparam) . '">' . img_delete() . '</a>'; |
|
214 | + $entry .= '<a class="deletefilelink" href="'.DOL_URL_ROOT.'/categories/viewcat.php?action=delete&token='.newToken().'&id='.$val['id'].'&type='.$type.$moreparam.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?type='.$type.$moreparam).'&backtolist='.urlencode($_SERVER["PHP_SELF"].'?type='.$type.$moreparam).'">'.img_delete().'</a>'; |
|
215 | 215 | } |
216 | 216 | $entry .= '</td>'; |
217 | 217 |
@@ -140,11 +140,11 @@ discard block |
||
140 | 140 | |
141 | 141 | // Add here list of permission defined by an id, a label, a boolean and two constant strings. |
142 | 142 | // Example: |
143 | - $this->rights[$r][0] = $this->numero + $r; // Permission id (must not be already used) |
|
144 | - $this->rights[$r][1] = 'Générer / modifier la clé API des utilisateurs'; // Permission label |
|
145 | - $this->rights[$r][3] = 0; // Permission by default for new user (0/1) |
|
146 | - $this->rights[$r][4] = 'apikey'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2) |
|
147 | - $this->rights[$r][5] = 'generate'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2) |
|
143 | + $this->rights[$r][0] = $this->numero + $r; // Permission id (must not be already used) |
|
144 | + $this->rights[$r][1] = 'Générer / modifier la clé API des utilisateurs'; // Permission label |
|
145 | + $this->rights[$r][3] = 0; // Permission by default for new user (0/1) |
|
146 | + $this->rights[$r][4] = 'apikey'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2) |
|
147 | + $this->rights[$r][5] = 'generate'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2) |
|
148 | 148 | $r++; |
149 | 149 | |
150 | 150 | |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | { |
248 | 248 | // Remove old constants with entity fields different of 0 |
249 | 249 | $sql = array( |
250 | - "DELETE FROM ".MAIN_DB_PREFIX."const WHERE name = ".$this->db->encrypt('MAIN_MODULE_API'), // API can't be enabled per environment. Why ? |
|
250 | + "DELETE FROM ".MAIN_DB_PREFIX."const WHERE name = ".$this->db->encrypt('MAIN_MODULE_API'), // API can't be enabled per environment. Why ? |
|
251 | 251 | "DELETE FROM ".MAIN_DB_PREFIX."const WHERE name = ".$this->db->encrypt('API_PRODUCTION_MODE') // Not in production mode by default at activation |
252 | 252 | ); |
253 | 253 |