Completed
Branch develop (abd236)
by
unknown
19:53
created
htdocs/comm/action/card.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 $offsetunit = GETPOST('offsetunittype_duration', 'aZ09');
74 74
 $remindertype = GETPOST('selectremindertype', 'aZ09');
75 75
 $modelmail = GETPOST('actioncommsendmodel_mail', 'int');
76
-$complete = GETPOST('complete', 'alpha');	// 'na' must be allowed
76
+$complete = GETPOST('complete', 'alpha'); // 'na' must be allowed
77 77
 $private = GETPOST('private', 'alphanohtml');
78 78
 if ($complete == 'na' || $complete == -2) {
79 79
 	$complete = -1;
@@ -547,12 +547,12 @@  discard block
 block discarded – undo
547 547
 			if ($selectedrecurrulefreq == 'WEEKLY' && !empty($selectedrecurrulebyday)) {
548 548
 				$firstdatearray = dol_get_first_day_week(GETPOST("apday", 'int'), GETPOST("apmonth", 'int'), GETPOST("apyear", 'int'));
549 549
 				$datep = dol_mktime($fulldayevent ? '00' : GETPOST("aphour", 'int'), $fulldayevent ? '00' : GETPOST("apmin", 'int'), $fulldayevent ? '00' : GETPOST("apsec", 'int'), $firstdatearray['month'], $firstdatearray['first_day'], $firstdatearray['year'], $tzforfullday ? $tzforfullday : 'tzuserrel');
550
-				$datep = dol_time_plus_duree($datep, $selectedrecurrulebyday + 6, 'd');//We begin the week after
550
+				$datep = dol_time_plus_duree($datep, $selectedrecurrulebyday + 6, 'd'); //We begin the week after
551 551
 				$dayoffset = 7;
552 552
 				$monthoffset = 0;
553 553
 			} elseif ($selectedrecurrulefreq == 'MONTHLY' && !empty($selectedrecurrulebymonthday)) {
554 554
 				$firstday = $selectedrecurrulebymonthday;
555
-				$firstmonth = GETPOST("apday") > $selectedrecurrulebymonthday ?  GETPOST("apmonth", 'int') + 1 : GETPOST("apmonth", 'int');//We begin the week after
555
+				$firstmonth = GETPOST("apday") > $selectedrecurrulebymonthday ?  GETPOST("apmonth", 'int') + 1 : GETPOST("apmonth", 'int'); //We begin the week after
556 556
 				$datep = dol_mktime($fulldayevent ? '00' : GETPOST("aphour", 'int'), $fulldayevent ? '00' : GETPOST("apmin", 'int'), $fulldayevent ? '00' : GETPOST("apsec", 'int'), $firstmonth, $firstday, GETPOST("apyear", 'int'), $tzforfullday ? $tzforfullday : 'tzuserrel');
557 557
 				$dayoffset = 0;
558 558
 				$monthoffset = 1;
@@ -990,7 +990,7 @@  discard block
 block discarded – undo
990 990
 if (empty($reshook) && GETPOST('actionmove', 'alpha') == 'mupdate') {
991 991
 	$error = 0;
992 992
 
993
-	$shour = dol_print_date($object->datep, "%H", 'tzuserrel');		// We take the date visible by user $newdate is also date visible by user.
993
+	$shour = dol_print_date($object->datep, "%H", 'tzuserrel'); // We take the date visible by user $newdate is also date visible by user.
994 994
 	$smin = dol_print_date($object->datep, "%M", 'tzuserrel');
995 995
 
996 996
 	$newdate = GETPOST('newdate', 'alpha');
@@ -1210,7 +1210,7 @@  discard block
 block discarded – undo
1210 1210
 		$default = getDolGlobalString('AGENDA_USE_EVENT_TYPE_DEFAULT', 'AC_RDV');
1211 1211
 		print img_picto($langs->trans("ActionType"), 'square', 'class="fawidth30 inline-block" style="color: #ddd;"');
1212 1212
 		$selectedvalue = GETPOSTISSET("actioncode") ? GETPOST("actioncode", 'aZ09') : ($object->type_code ? $object->type_code : $default);
1213
-		print $formactions->select_type_actions($selectedvalue, "actioncode", "systemauto", 0, -1, 0, 1);	// TODO Replace 0 with -2 in onlyautoornot
1213
+		print $formactions->select_type_actions($selectedvalue, "actioncode", "systemauto", 0, -1, 0, 1); // TODO Replace 0 with -2 in onlyautoornot
1214 1214
 		print '</td></tr>';
1215 1215
 	}
1216 1216
 
@@ -1383,7 +1383,7 @@  discard block
 block discarded – undo
1383 1383
 	// Status
1384 1384
 	print '<tr><td>'.$langs->trans("Status").' / '.$langs->trans("Percentage").'</td>';
1385 1385
 	print '<td>';
1386
-	$percent = $complete !=='' ? $complete : -1;
1386
+	$percent = $complete !== '' ? $complete : -1;
1387 1387
 	if (GETPOSTISSET('status')) {
1388 1388
 		$percent = GETPOST('status');
1389 1389
 	} elseif (GETPOSTISSET('percentage')) {
@@ -1440,7 +1440,7 @@  discard block
 block discarded – undo
1440 1440
 		if (GETPOST('contactid', 'int')) {
1441 1441
 			$preselectedids[GETPOST('contactid', 'int')] = GETPOST('contactid', 'int');
1442 1442
 		}
1443
-		if ($origin=='contact') $preselectedids[GETPOST('originid', 'int')] = GETPOST('originid', 'int');
1443
+		if ($origin == 'contact') $preselectedids[GETPOST('originid', 'int')] = GETPOST('originid', 'int');
1444 1444
 		print img_picto('', 'contact', 'class="paddingrightonly"');
1445 1445
 		print $form->selectcontacts(empty($conf->global->MAIN_ACTIONCOM_CAN_ADD_ANY_CONTACT) ? GETPOST('socid', 'int') : 0, $preselectedids, 'socpeopleassigned[]', 1, '', '', 0, 'minwidth300 quatrevingtpercent', false, 0, array(), false, 'multiple', 'contactid');
1446 1446
 		print '</td></tr>';
@@ -1501,7 +1501,7 @@  discard block
 block discarded – undo
1501 1501
 		}
1502 1502
 		//var_dump('origin='.$origin.' originid='.$originid.' hasPermissionOnLinkedObject='.$hasPermissionOnLinkedObject);
1503 1503
 
1504
-		if (! in_array($origin, array('societe', 'project', 'task', 'user'))) {
1504
+		if (!in_array($origin, array('societe', 'project', 'task', 'user'))) {
1505 1505
 			// We do not use link for object that already contains a hard coded field to make links with agenda events
1506 1506
 			print '<tr><td class="titlefieldcreate">'.$langs->trans("LinkedObject").'</td>';
1507 1507
 			print '<td colspan="3">';
@@ -1646,7 +1646,7 @@  discard block
 block discarded – undo
1646 1646
 			$object->socpeopleassigned[$id] = array('id' => $tmpid);
1647 1647
 		}
1648 1648
 		$object->contact_id   = GETPOST("contactid", 'int');
1649
-		$object->fk_project  = GETPOST("projectid", 'int');
1649
+		$object->fk_project = GETPOST("projectid", 'int');
1650 1650
 
1651 1651
 		$object->note_private = GETPOST("note", 'restricthtml');
1652 1652
 	}
@@ -1718,7 +1718,7 @@  discard block
 block discarded – undo
1718 1718
 		if ($backtopage) {
1719 1719
 			print '<input type="hidden" name="backtopage" value="'.($backtopage != '1' ? $backtopage : '').'">';
1720 1720
 		}
1721
-		if (empty($conf->global->AGENDA_USE_EVENT_TYPE) && ! preg_match('/^TICKET_MSG_PRIVATE/', $object->code)) {
1721
+		if (empty($conf->global->AGENDA_USE_EVENT_TYPE) && !preg_match('/^TICKET_MSG_PRIVATE/', $object->code)) {
1722 1722
 			print '<input type="hidden" name="actioncode" value="'.$object->type_code.'">';
1723 1723
 		}
1724 1724
 
@@ -2106,7 +2106,7 @@  discard block
 block discarded – undo
2106 2106
                    })';
2107 2107
 			print '</script>'."\n";
2108 2108
 
2109
-			print '</div>';		// End of div for reminderparameters
2109
+			print '</div>'; // End of div for reminderparameters
2110 2110
 		}
2111 2111
 
2112 2112
 		print dol_get_fiche_end();
@@ -2127,8 +2127,8 @@  discard block
 block discarded – undo
2127 2127
 		// Call Hook formConfirm
2128 2128
 		$parameters = array();
2129 2129
 		$reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
2130
-		if (empty($reshook)) $formconfirm.=$hookmanager->resPrint;
2131
-		elseif ($reshook > 0) $formconfirm=$hookmanager->resPrint;
2130
+		if (empty($reshook)) $formconfirm .= $hookmanager->resPrint;
2131
+		elseif ($reshook > 0) $formconfirm = $hookmanager->resPrint;
2132 2132
 
2133 2133
 		// Print form confirm
2134 2134
 		print $formconfirm;
Please login to merge, or discard this patch.
htdocs/projet/tasks/time.php 1 patch
Spacing   +168 added lines, -168 removed lines patch added patch discarded remove patch
@@ -30,14 +30,14 @@  discard block
 block discarded – undo
30 30
 
31 31
 // Load Dolibarr environment
32 32
 require '../../main.inc.php';
33
-require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php';
34
-require_once DOL_DOCUMENT_ROOT . '/projet/class/task.class.php';
35
-require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
36
-require_once DOL_DOCUMENT_ROOT . '/core/lib/project.lib.php';
37
-require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
38
-require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php';
39
-require_once DOL_DOCUMENT_ROOT . '/core/class/html.formprojet.class.php';
40
-require_once DOL_DOCUMENT_ROOT . '/core/class/html.formintervention.class.php';
33
+require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
34
+require_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php';
35
+require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
36
+require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php';
37
+require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
38
+require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
39
+require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
40
+require_once DOL_DOCUMENT_ROOT.'/core/class/html.formintervention.class.php';
41 41
 
42 42
 // Load translation files required by the page
43 43
 $langsLoad = array('projects', 'bills', 'orders', 'companies');
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
 	setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
165 165
 }
166 166
 
167
-include DOL_DOCUMENT_ROOT . '/core/actions_changeselectedfields.inc.php';
167
+include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php';
168 168
 
169 169
 // Purge search criteria
170 170
 if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // All tests are required to be compatible with all browsers
@@ -354,10 +354,10 @@  discard block
 block discarded – undo
354 354
 }
355 355
 
356 356
 if ($action == 'confirm_deleteline' && $confirm == "yes" && ($user->hasRight('projet', 'time') || $user->hasRight('projet', 'all', 'creer'))) {
357
-	$object->fetchTimeSpent(GETPOST('lineid', 'int'));    // load properties like $object->timespent_xxx
357
+	$object->fetchTimeSpent(GETPOST('lineid', 'int')); // load properties like $object->timespent_xxx
358 358
 
359 359
 	if (in_array($object->timespent_fk_user, $childids) || $user->hasRight('projet', 'all', 'creer')) {
360
-		$result = $object->delTimeSpent($user);    // delete line with $object->timespent_id
360
+		$result = $object->delTimeSpent($user); // delete line with $object->timespent_id
361 361
 
362 362
 		if ($result < 0) {
363 363
 			$langs->load("errors");
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
 		if (count($tasksarray) > 0) {
378 378
 			$id = $tasksarray[0]->id;
379 379
 		} else {
380
-			header("Location: " . DOL_URL_ROOT . '/projet/tasks.php?id=' . $projectstatic->id . ($withproject ? '&withproject=1' : '') . (empty($mode) ? '' : '&mode=' . $mode));
380
+			header("Location: ".DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.($withproject ? '&withproject=1' : '').(empty($mode) ? '' : '&mode='.$mode));
381 381
 			exit;
382 382
 		}
383 383
 	}
@@ -414,9 +414,9 @@  discard block
 block discarded – undo
414 414
 	if (!($projectstatic->thirdparty->id > 0)) {
415 415
 		setEventMessages($langs->trans("ThirdPartyRequiredToGenerateInvoice"), null, 'errors');
416 416
 	} else {
417
-		include_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
418
-		include_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php';
419
-		include_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php';
417
+		include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
418
+		include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
419
+		include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
420 420
 
421 421
 		$tmpinvoice = new Facture($db);
422 422
 		$tmptimespent = new Task($db);
@@ -481,7 +481,7 @@  discard block
 block discarded – undo
481 481
 				$arrayoftasks = array();
482 482
 				foreach ($toselect as $key => $value) {
483 483
 					// Get userid, timepent
484
-					$object->fetchTimeSpent($value);    // $value is ID of 1 line in timespent table
484
+					$object->fetchTimeSpent($value); // $value is ID of 1 line in timespent table
485 485
 					$arrayoftasks[$object->timespent_fk_user][(int) $object->timespent_fk_product]['timespent'] += $object->timespent_duration;
486 486
 					$arrayoftasks[$object->timespent_fk_user][(int) $object->timespent_fk_product]['totalvaluetodivideby3600'] += ($object->timespent_duration * $object->timespent_thm);
487 487
 				}
@@ -553,7 +553,7 @@  discard block
 block discarded – undo
553 553
 						}
554 554
 
555 555
 						// Add lines
556
-						$lineid = $tmpinvoice->addline($langs->trans("TimeSpentForInvoice", $username) . ' : ' . $qtyhourtext, $pu_htline, round($qtyhour / $prodDurationHours, 2), $txtvaline, $localtax1line, $localtax2line, ($idprodline > 0 ? $idprodline : 0));
556
+						$lineid = $tmpinvoice->addline($langs->trans("TimeSpentForInvoice", $username).' : '.$qtyhourtext, $pu_htline, round($qtyhour / $prodDurationHours, 2), $txtvaline, $localtax1line, $localtax2line, ($idprodline > 0 ? $idprodline : 0));
557 557
 						if ($lineid < 0) {
558 558
 							$error++;
559 559
 							setEventMessages(null, $tmpinvoice->errors, 'errors');
@@ -586,16 +586,16 @@  discard block
 block discarded – undo
586 586
 
587 587
 					$arrayoftasks[$object->timespent_id]['timespent'] = $object->timespent_duration;
588 588
 					$arrayoftasks[$object->timespent_id]['totalvaluetodivideby3600'] = $object->timespent_duration * $object->timespent_thm;
589
-					$arrayoftasks[$object->timespent_id]['note'] = $ftask->ref . ' - ' . $ftask->label . ' - ' . $username;
589
+					$arrayoftasks[$object->timespent_id]['note'] = $ftask->ref.' - '.$ftask->label.' - '.$username;
590 590
 					$arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $object->timespent_note);
591 591
 
592 592
 					if (!empty($withdetail)) {
593 593
 						if (!empty($object->timespent_withhour)) {
594
-							$arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $langs->trans("Date") . ': ' . dol_print_date($object->timespent_datehour));
594
+							$arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $langs->trans("Date").': '.dol_print_date($object->timespent_datehour));
595 595
 						} else {
596
-							$arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $langs->trans("Date") . ': ' . dol_print_date($object->timespent_date));
596
+							$arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $langs->trans("Date").': '.dol_print_date($object->timespent_date));
597 597
 						}
598
-						$arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $langs->trans("Duration") . ': ' . convertSecondToTime($object->timespent_duration, 'all', $conf->global->MAIN_DURATION_OF_WORKDAY));
598
+						$arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $langs->trans("Duration").': '.convertSecondToTime($object->timespent_duration, 'all', $conf->global->MAIN_DURATION_OF_WORKDAY));
599 599
 					}
600 600
 					$arrayoftasks[$object->timespent_id]['user'] = $object->timespent_fk_user;
601 601
 					$arrayoftasks[$object->timespent_id]['fk_product'] = $object->timespent_fk_product;
@@ -673,7 +673,7 @@  discard block
 block discarded – undo
673 673
 				$arrayoftasks = array();
674 674
 				foreach ($toselect as $key => $value) {
675 675
 					// Get userid, timepent
676
-					$object->fetchTimeSpent($value);        // Call method to get list of timespent for a timespent line id (We use the utiliy method found into Task object)
676
+					$object->fetchTimeSpent($value); // Call method to get list of timespent for a timespent line id (We use the utiliy method found into Task object)
677 677
 					// $object->id is now the task id
678 678
 					$arrayoftasks[$object->id][(int) $object->timespent_fk_product]['timespent'] += $object->timespent_duration;
679 679
 					$arrayoftasks[$object->id][(int) $object->timespent_fk_product]['totalvaluetodivideby3600'] += ($object->timespent_duration * $object->timespent_thm);
@@ -749,7 +749,7 @@  discard block
 block discarded – undo
749 749
 						// Add lines
750 750
 						$date_start = '';
751 751
 						$date_end = '';
752
-						$lineName = $ftask->ref . ' - ' . $ftask->label;
752
+						$lineName = $ftask->ref.' - '.$ftask->label;
753 753
 						$lineid = $tmpinvoice->addline($lineName, $pu_ht_for_task, price2num($qtyhour / $prodDurationHours, 'MS'), $txtvaline, $localtax1line, $localtax2line, ($idprodline > 0 ? $idprodline : 0), 0, $date_start, $date_end, 0, 0, '', 'HT', 0, 1, -1, 0, '', 0, 0, null, $pa_ht);
754 754
 						if ($lineid < 0) {
755 755
 							$error++;
@@ -759,8 +759,8 @@  discard block
 block discarded – undo
759 759
 
760 760
 						if (!$error) {
761 761
 							// Update lineid into line of timespent
762
-							$sql = 'UPDATE ' . MAIN_DB_PREFIX . 'element_time SET invoice_line_id = ' . ((int) $lineid) . ', invoice_id = ' . ((int) $tmpinvoice->id);
763
-							$sql .= ' WHERE rowid IN (' . $db->sanitize(join(',', $toselect)) . ')';
762
+							$sql = 'UPDATE '.MAIN_DB_PREFIX.'element_time SET invoice_line_id = '.((int) $lineid).', invoice_id = '.((int) $tmpinvoice->id);
763
+							$sql .= ' WHERE rowid IN ('.$db->sanitize(join(',', $toselect)).')';
764 764
 							$result = $db->query($sql);
765 765
 							if (!$result) {
766 766
 								$error++;
@@ -796,12 +796,12 @@  discard block
 block discarded – undo
796 796
 	if (!($projectstatic->thirdparty->id > 0)) {
797 797
 		setEventMessages($langs->trans("ThirdPartyRequiredToGenerateIntervention"), null, 'errors');
798 798
 	} else {
799
-		include_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
800
-		include_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php';
801
-		include_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php';
799
+		include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
800
+		include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
801
+		include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
802 802
 
803 803
 
804
-		require_once DOL_DOCUMENT_ROOT . '/fichinter/class/fichinter.class.php';
804
+		require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php';
805 805
 		$tmpinter = new Fichinter($db);
806 806
 		$tmptimespent = new Task($db);
807 807
 		$fuser = new User($db);
@@ -813,7 +813,7 @@  discard block
 block discarded – undo
813 813
 		$tmpinter->socid = $projectstatic->thirdparty->id;
814 814
 		$tmpinter->date = dol_mktime(GETPOST('rehour', 'int'), GETPOST('remin', 'int'), GETPOST('resec', 'int'), GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int'));
815 815
 		$tmpinter->fk_project = $projectstatic->id;
816
-		$tmpinter->description = $projectstatic->title . (!empty($projectstatic->description) ? '-' . $projectstatic->label : '');
816
+		$tmpinter->description = $projectstatic->title.(!empty($projectstatic->description) ? '-'.$projectstatic->label : '');
817 817
 
818 818
 		if ($interToUse) {
819 819
 			$tmpinter->fetch($interToUse);
@@ -846,7 +846,7 @@  discard block
 block discarded – undo
846 846
 				$qtyhourtext = convertSecondToTime($value['timespent'], 'all', $conf->global->MAIN_DURATION_OF_WORKDAY);
847 847
 
848 848
 				// Add lines
849
-				$lineid = $tmpinter->addline($user, $tmpinter->id, $ftask->label . (!empty($value['note']) ? ' - ' . $value['note'] : ''), $value['date'], $value['timespent']);
849
+				$lineid = $tmpinter->addline($user, $tmpinter->id, $ftask->label.(!empty($value['note']) ? ' - '.$value['note'] : ''), $value['date'], $value['timespent']);
850 850
 			}
851 851
 		}
852 852
 
@@ -877,9 +877,9 @@  discard block
 block discarded – undo
877 877
 //$result = $projectstatic->fetch($object->fk_project);
878 878
 $arrayofselected = is_array($toselect) ? $toselect : array();
879 879
 
880
-$title = $object->ref . ' - ' . $langs->trans("TimeSpent");
880
+$title = $object->ref.' - '.$langs->trans("TimeSpent");
881 881
 if (!empty($withproject)) {
882
-	$title .= ' | ' . $langs->trans("Project") . (!empty($projectstatic->ref) ? ': ' . $projectstatic->ref : '');
882
+	$title .= ' | '.$langs->trans("Project").(!empty($projectstatic->ref) ? ': '.$projectstatic->ref : '');
883 883
 }
884 884
 $help_url = '';
885 885
 
@@ -928,13 +928,13 @@  discard block
 block discarded – undo
928 928
 
929 929
 			$param = ((!empty($mode) && $mode == 'mine') ? '&mode=mine' : '');
930 930
 			if ($search_user) {
931
-				$param .= '&search_user=' . ((int) $search_user);
931
+				$param .= '&search_user='.((int) $search_user);
932 932
 			}
933 933
 			if ($search_month) {
934
-				$param .= '&search_month=' . ((int) $search_month);
934
+				$param .= '&search_month='.((int) $search_month);
935 935
 			}
936 936
 			if ($search_year) {
937
-				$param .= '&search_year=' . ((int) $search_year);
937
+				$param .= '&search_year='.((int) $search_year);
938 938
 			}
939 939
 
940 940
 			// Project card
@@ -946,14 +946,14 @@  discard block
 block discarded – undo
946 946
 			$morehtmlref .= $projectstatic->title;
947 947
 			// Thirdparty
948 948
 			if (!empty($projectstatic->thirdparty->id) && $projectstatic->thirdparty->id > 0) {
949
-				$morehtmlref .= '<br>' . $projectstatic->thirdparty->getNomUrl(1, 'project');
949
+				$morehtmlref .= '<br>'.$projectstatic->thirdparty->getNomUrl(1, 'project');
950 950
 			}
951 951
 			$morehtmlref .= '</div>';
952 952
 
953 953
 			// Define a complementary filter for search of next/prev ref.
954 954
 			if (empty($user->rights->projet->all->lire)) {
955 955
 				$objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0);
956
-				$projectstatic->next_prev_filter = " rowid IN (" . $db->sanitize(count($objectsListId) ? join(',', array_keys($objectsListId)) : '0') . ")";
956
+				$projectstatic->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ? join(',', array_keys($objectsListId)) : '0').")";
957 957
 			}
958 958
 
959 959
 			dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref, $param);
@@ -971,25 +971,25 @@  discard block
 block discarded – undo
971 971
 				print '</td>';
972 972
 				print '<td>';
973 973
 				if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) {
974
-					print '<input type="checkbox" disabled name="usage_opportunity"' . (GETPOSTISSET('usage_opportunity') ? (GETPOST('usage_opportunity', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_opportunity ? ' checked="checked"' : '')) . '"> ';
974
+					print '<input type="checkbox" disabled name="usage_opportunity"'.(GETPOSTISSET('usage_opportunity') ? (GETPOST('usage_opportunity', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_opportunity ? ' checked="checked"' : '')).'"> ';
975 975
 					$htmltext = $langs->trans("ProjectFollowOpportunity");
976 976
 					print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext);
977 977
 					print '<br>';
978 978
 				}
979 979
 				if (empty($conf->global->PROJECT_HIDE_TASKS)) {
980
-					print '<input type="checkbox" disabled name="usage_task"' . (GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_task ? ' checked="checked"' : '')) . '"> ';
980
+					print '<input type="checkbox" disabled name="usage_task"'.(GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_task ? ' checked="checked"' : '')).'"> ';
981 981
 					$htmltext = $langs->trans("ProjectFollowTasks");
982 982
 					print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext);
983 983
 					print '<br>';
984 984
 				}
985 985
 				if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT)) {
986
-					print '<input type="checkbox" disabled name="usage_bill_time"' . (GETPOSTISSET('usage_bill_time') ? (GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_bill_time ? ' checked="checked"' : '')) . '"> ';
986
+					print '<input type="checkbox" disabled name="usage_bill_time"'.(GETPOSTISSET('usage_bill_time') ? (GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_bill_time ? ' checked="checked"' : '')).'"> ';
987 987
 					$htmltext = $langs->trans("ProjectBillTimeDescription");
988 988
 					print $form->textwithpicto($langs->trans("BillTime"), $htmltext);
989 989
 					print '<br>';
990 990
 				}
991 991
 				if (isModEnabled('eventorganization')) {
992
-					print '<input type="checkbox" disabled name="usage_organize_event"' . (GETPOSTISSET('usage_organize_event') ? (GETPOST('usage_organize_event', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_organize_event ? ' checked="checked"' : '')) . '"> ';
992
+					print '<input type="checkbox" disabled name="usage_organize_event"'.(GETPOSTISSET('usage_organize_event') ? (GETPOST('usage_organize_event', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_organize_event ? ' checked="checked"' : '')).'"> ';
993 993
 					$htmltext = $langs->trans("EventOrganizationDescriptionLong");
994 994
 					print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext);
995 995
 				}
@@ -997,7 +997,7 @@  discard block
 block discarded – undo
997 997
 			}
998 998
 
999 999
 			// Visibility
1000
-			print '<tr><td class="titlefield">' . $langs->trans("Visibility") . '</td><td>';
1000
+			print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>';
1001 1001
 			if ($projectstatic->public) {
1002 1002
 				print img_picto($langs->trans('SharedProject'), 'world', 'class="paddingrightonly"');
1003 1003
 				print $langs->trans('SharedProject');
@@ -1008,14 +1008,14 @@  discard block
 block discarded – undo
1008 1008
 			print '</td></tr>';
1009 1009
 
1010 1010
 			// Budget
1011
-			print '<tr><td>' . $langs->trans("Budget") . '</td><td>';
1011
+			print '<tr><td>'.$langs->trans("Budget").'</td><td>';
1012 1012
 			if (!is_null($projectstatic->budget_amount) && strcmp($projectstatic->budget_amount, '')) {
1013
-				print '<span class="amount">' . price($projectstatic->budget_amount, '', $langs, 1, 0, 0, $conf->currency) . '</span>';
1013
+				print '<span class="amount">'.price($projectstatic->budget_amount, '', $langs, 1, 0, 0, $conf->currency).'</span>';
1014 1014
 			}
1015 1015
 			print '</td></tr>';
1016 1016
 
1017 1017
 			// Date start - end project
1018
-			print '<tr><td>' . $langs->trans("Dates") . '</td><td>';
1018
+			print '<tr><td>'.$langs->trans("Dates").'</td><td>';
1019 1019
 			$start = dol_print_date($projectstatic->date_start, 'day');
1020 1020
 			print ($start ? $start : '?');
1021 1021
 			$end = dol_print_date($projectstatic->date_end, 'day');
@@ -1030,7 +1030,7 @@  discard block
 block discarded – undo
1030 1030
 			$cols = 2;
1031 1031
 			$savobject = $object;
1032 1032
 			$object = $projectstatic;
1033
-			include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php';
1033
+			include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
1034 1034
 			$object = $savobject;
1035 1035
 
1036 1036
 			print '</table>';
@@ -1048,7 +1048,7 @@  discard block
 block discarded – undo
1048 1048
 
1049 1049
 			// Categories
1050 1050
 			if (isModEnabled('categorie')) {
1051
-				print '<tr><td class="valignmiddle">' . $langs->trans("Categories") . '</td><td>';
1051
+				print '<tr><td class="valignmiddle">'.$langs->trans("Categories").'</td><td>';
1052 1052
 				print $form->showCategories($projectstatic->id, 'project', 1);
1053 1053
 				print "</td></tr>";
1054 1054
 			}
@@ -1077,12 +1077,12 @@  discard block
 block discarded – undo
1077 1077
 
1078 1078
 				if (!empty($projectidforalltimes)) {
1079 1079
 					// We are on tab 'Time Spent' of project
1080
-					$backtourl = $_SERVER['PHP_SELF'] . '?projectid=' . $projectstatic->id . ($withproject ? '&withproject=1' : '');
1081
-					$linktocreatetimeUrl = $_SERVER['PHP_SELF'] . '?' . ($withproject ? 'withproject=1' : '') . '&projectid=' . $projectstatic->id . '&action=createtime&token=' . newToken() . $param . '&backtopage=' . urlencode($backtourl);
1080
+					$backtourl = $_SERVER['PHP_SELF'].'?projectid='.$projectstatic->id.($withproject ? '&withproject=1' : '');
1081
+					$linktocreatetimeUrl = $_SERVER['PHP_SELF'].'?'.($withproject ? 'withproject=1' : '').'&projectid='.$projectstatic->id.'&action=createtime&token='.newToken().$param.'&backtopage='.urlencode($backtourl);
1082 1082
 				} else {
1083 1083
 					// We are on tab 'Time Spent' of task
1084
-					$backtourl = $_SERVER['PHP_SELF'] . '?id=' . $object->id . ($withproject ? '&withproject=1' : '');
1085
-					$linktocreatetimeUrl = $_SERVER['PHP_SELF'] . '?' . ($withproject ? 'withproject=1' : '') . ($object->id > 0 ? '&id=' . $object->id : '&projectid=' . $projectstatic->id) . '&action=createtime&token=' . newToken() . $param . '&backtopage=' . urlencode($backtourl);
1084
+					$backtourl = $_SERVER['PHP_SELF'].'?id='.$object->id.($withproject ? '&withproject=1' : '');
1085
+					$linktocreatetimeUrl = $_SERVER['PHP_SELF'].'?'.($withproject ? 'withproject=1' : '').($object->id > 0 ? '&id='.$object->id : '&projectid='.$projectstatic->id).'&action=createtime&token='.newToken().$param.'&backtopage='.urlencode($backtourl);
1086 1086
 				}
1087 1087
 			} else {
1088 1088
 				$linktocreatetimeBtnStatus = -2;
@@ -1127,19 +1127,19 @@  discard block
 block discarded – undo
1127 1127
 		print dol_get_fiche_head($head, 'task_time', $langs->trans("Task"), -1, 'projecttask', 0, '', 'reposition');
1128 1128
 
1129 1129
 		if ($action == 'deleteline') {
1130
-			$urlafterconfirm = $_SERVER["PHP_SELF"] . "?" . ($object->id > 0 ? "id=" . $object->id : 'projectid=' . $projectstatic->id) . '&lineid=' . GETPOST("lineid", 'int') . ($withproject ? '&withproject=1' : '');
1130
+			$urlafterconfirm = $_SERVER["PHP_SELF"]."?".($object->id > 0 ? "id=".$object->id : 'projectid='.$projectstatic->id).'&lineid='.GETPOST("lineid", 'int').($withproject ? '&withproject=1' : '');
1131 1131
 			print $form->formconfirm($urlafterconfirm, $langs->trans("DeleteATimeSpent"), $langs->trans("ConfirmDeleteATimeSpent"), "confirm_deleteline", '', '', 1);
1132 1132
 		}
1133 1133
 
1134 1134
 		$param = ($withproject ? '&withproject=1' : '');
1135
-		$param .= ($param ? '&' : '') . 'id=' . $object->id;        // ID of task
1136
-		$linkback = $withproject ? '<a href="' . DOL_URL_ROOT . '/projet/tasks.php?id=' . $projectstatic->id . '">' . $langs->trans("BackToList") . '</a>' : '';
1135
+		$param .= ($param ? '&' : '').'id='.$object->id; // ID of task
1136
+		$linkback = $withproject ? '<a href="'.DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.'">'.$langs->trans("BackToList").'</a>' : '';
1137 1137
 
1138 1138
 		if (!GETPOST('withproject') || empty($projectstatic->id)) {
1139 1139
 			$projectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 1);
1140
-			$object->next_prev_filter = " fk_projet IN (" . $db->sanitize($projectsListId) . ")";
1140
+			$object->next_prev_filter = " fk_projet IN (".$db->sanitize($projectsListId).")";
1141 1141
 		} else {
1142
-			$object->next_prev_filter = " fk_projet = " . ((int) $projectstatic->id);
1142
+			$object->next_prev_filter = " fk_projet = ".((int) $projectstatic->id);
1143 1143
 		}
1144 1144
 
1145 1145
 		$morehtmlref = '';
@@ -1147,12 +1147,12 @@  discard block
 block discarded – undo
1147 1147
 		// Project
1148 1148
 		if (empty($withproject)) {
1149 1149
 			$morehtmlref .= '<div class="refidno">';
1150
-			$morehtmlref .= $langs->trans("Project") . ': ';
1150
+			$morehtmlref .= $langs->trans("Project").': ';
1151 1151
 			$morehtmlref .= $projectstatic->getNomUrl(1);
1152 1152
 			$morehtmlref .= '<br>';
1153 1153
 
1154 1154
 			// Third party
1155
-			$morehtmlref .= $langs->trans("ThirdParty") . ': ';
1155
+			$morehtmlref .= $langs->trans("ThirdParty").': ';
1156 1156
 			if (!empty($projectstatic->thirdparty) && is_object($projectstatic->thirdparty)) {
1157 1157
 				$morehtmlref .= $projectstatic->thirdparty->getNomUrl(1);
1158 1158
 			}
@@ -1168,7 +1168,7 @@  discard block
 block discarded – undo
1168 1168
 		print '<table class="border centpercent tableforfield">';
1169 1169
 
1170 1170
 		// Task parent
1171
-		print '<tr><td>' . $langs->trans("ChildOfTask") . '</td><td>';
1171
+		print '<tr><td>'.$langs->trans("ChildOfTask").'</td><td>';
1172 1172
 		if ($object->fk_task_parent > 0) {
1173 1173
 			$tasktmp = new Task($db);
1174 1174
 			$tasktmp->fetch($object->fk_task_parent);
@@ -1177,7 +1177,7 @@  discard block
 block discarded – undo
1177 1177
 		print '</td></tr>';
1178 1178
 
1179 1179
 		// Date start - Date end task
1180
-		print '<tr><td class="titlefield">' . $langs->trans("DateStart") . ' - ' . $langs->trans("Deadline") . '</td><td>';
1180
+		print '<tr><td class="titlefield">'.$langs->trans("DateStart").' - '.$langs->trans("Deadline").'</td><td>';
1181 1181
 		$start = dol_print_date($object->date_start, 'dayhour');
1182 1182
 		print ($start ? $start : '?');
1183 1183
 		$end = dol_print_date($object->date_end, 'dayhour');
@@ -1189,7 +1189,7 @@  discard block
 block discarded – undo
1189 1189
 		print '</td></tr>';
1190 1190
 
1191 1191
 		// Planned workload
1192
-		print '<tr><td>' . $langs->trans("PlannedWorkload") . '</td><td>';
1192
+		print '<tr><td>'.$langs->trans("PlannedWorkload").'</td><td>';
1193 1193
 		if ($object->planned_workload) {
1194 1194
 			print convertSecondToTime($object->planned_workload, 'allhourmin');
1195 1195
 		}
@@ -1204,21 +1204,21 @@  discard block
 block discarded – undo
1204 1204
 		print '<table class="border tableforfield centpercent">';
1205 1205
 
1206 1206
 		// Progress declared
1207
-		print '<tr><td class="titlefield">' . $langs->trans("ProgressDeclared") . '</td><td>';
1208
-		print $object->progress != '' ? $object->progress . ' %' : '';
1207
+		print '<tr><td class="titlefield">'.$langs->trans("ProgressDeclared").'</td><td>';
1208
+		print $object->progress != '' ? $object->progress.' %' : '';
1209 1209
 		print '</td></tr>';
1210 1210
 
1211 1211
 		// Progress calculated
1212
-		print '<tr><td>' . $langs->trans("ProgressCalculated") . '</td><td>';
1212
+		print '<tr><td>'.$langs->trans("ProgressCalculated").'</td><td>';
1213 1213
 		if ($object->planned_workload) {
1214 1214
 			$tmparray = $object->getSummaryOfTimeSpent();
1215 1215
 			if ($tmparray['total_duration'] > 0) {
1216
-				print round($tmparray['total_duration'] / $object->planned_workload * 100, 2) . ' %';
1216
+				print round($tmparray['total_duration'] / $object->planned_workload * 100, 2).' %';
1217 1217
 			} else {
1218 1218
 				print '0 %';
1219 1219
 			}
1220 1220
 		} else {
1221
-			print '<span class="opacitymedium">' . $langs->trans("WorkloadNotDefined") . '</span>';
1221
+			print '<span class="opacitymedium">'.$langs->trans("WorkloadNotDefined").'</span>';
1222 1222
 		}
1223 1223
 		print '</td>';
1224 1224
 
@@ -1234,7 +1234,7 @@  discard block
 block discarded – undo
1234 1234
 		print dol_get_fiche_end();
1235 1235
 	} else {
1236 1236
 		if ($action == 'deleteline') {
1237
-			$urlafterconfirm = $_SERVER["PHP_SELF"] . "?" . ($object->id > 0 ? "id=" . $object->id : 'projectid=' . $projectstatic->id) . '&lineid=' . GETPOST("lineid", 'int') . ($withproject ? '&withproject=1' : '');
1237
+			$urlafterconfirm = $_SERVER["PHP_SELF"]."?".($object->id > 0 ? "id=".$object->id : 'projectid='.$projectstatic->id).'&lineid='.GETPOST("lineid", 'int').($withproject ? '&withproject=1' : '');
1238 1238
 			print $form->formconfirm($urlafterconfirm, $langs->trans("DeleteATimeSpent"), $langs->trans("ConfirmDeleteATimeSpent"), "confirm_deleteline", '', '', 1);
1239 1239
 		}
1240 1240
 	}
@@ -1248,7 +1248,7 @@  discard block
 block discarded – undo
1248 1248
 
1249 1249
 		if ($action == 'deleteline' && !empty($projectidforalltimes)) {
1250 1250
 			// We must use projectidprojectid if on list of timespent of project and id=taskid if on list of timespent of a task
1251
-			$urlafterconfirm = $_SERVER["PHP_SELF"] . "?" . ($projectstatic->id > 0 ? 'projectid=' . $projectstatic->id : ($object->id > 0 ? "id=" . $object->id : '')) . '&lineid=' . GETPOST('lineid', 'int') . ($withproject ? '&withproject=1' : '') . "&contextpage=" . urlencode($contextpage);
1251
+			$urlafterconfirm = $_SERVER["PHP_SELF"]."?".($projectstatic->id > 0 ? 'projectid='.$projectstatic->id : ($object->id > 0 ? "id=".$object->id : '')).'&lineid='.GETPOST('lineid', 'int').($withproject ? '&withproject=1' : '')."&contextpage=".urlencode($contextpage);
1252 1252
 			$formconfirm = $form->formconfirm($urlafterconfirm, $langs->trans("DeleteATimeSpent"), $langs->trans("ConfirmDeleteATimeSpent"), "confirm_deleteline", '', '', 1);
1253 1253
 		}
1254 1254
 
@@ -1267,10 +1267,10 @@  discard block
 block discarded – undo
1267 1267
 		// Definition of fields for list
1268 1268
 		$arrayfields = array();
1269 1269
 		$arrayfields['t.element_date'] = array('label'=>$langs->trans("Date"), 'checked'=>1);
1270
-		$arrayfields['p.fk_soc'] = array('label'=>$langs->trans("ThirdParty"), 'type'=>'integer:Societe:/societe/class/societe.class.php:1','checked'=>1);
1270
+		$arrayfields['p.fk_soc'] = array('label'=>$langs->trans("ThirdParty"), 'type'=>'integer:Societe:/societe/class/societe.class.php:1', 'checked'=>1);
1271 1271
 		$arrayfields['s.name_alias'] = array('label'=>$langs->trans("AliasNameShort"), 'type'=>'integer:Societe:/societe/class/societe.class.php:1');
1272 1272
 		if ((empty($id) && empty($ref)) || !empty($projectidforalltimes)) {	// Not a dedicated task
1273
-			if (! empty($allprojectforuser)) {
1273
+			if (!empty($allprojectforuser)) {
1274 1274
 				$arrayfields['p.project_ref'] = ['label' => $langs->trans('RefProject'), 'checked' => 1];
1275 1275
 				$arrayfields['p.project_label'] = ['label' => $langs->trans('ProjectLabel'), 'checked' => 1];
1276 1276
 			}
@@ -1286,82 +1286,82 @@  discard block
 block discarded – undo
1286 1286
 		$arrayfields['value'] = array('label'=>$langs->trans("Value"), 'checked'=>1, 'enabled'=>isModEnabled("salaries"));
1287 1287
 		$arrayfields['valuebilled'] = array('label'=>$langs->trans("Billed"), 'checked'=>1, 'enabled'=>(((getDolGlobalInt('PROJECT_HIDE_TASKS') || !getDolGlobalInt('PROJECT_BILL_TIME_SPENT')) ? 0 : 1) && $projectstatic->usage_bill_time));
1288 1288
 		// Extra fields
1289
-		include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_list_array_fields.tpl.php';
1289
+		include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php';
1290 1290
 
1291 1291
 		$arrayfields = dol_sort_array($arrayfields, 'position');
1292 1292
 
1293 1293
 		$param = '';
1294 1294
 		if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) {
1295
-			$param .= '&contextpage=' . urlencode($contextpage);
1295
+			$param .= '&contextpage='.urlencode($contextpage);
1296 1296
 		}
1297 1297
 		if ($limit > 0 && $limit != $conf->liste_limit) {
1298 1298
 			$param .= '&limit='.((int) $limit);
1299 1299
 		}
1300 1300
 		if ($search_month > 0) {
1301
-			$param .= '&search_month=' . urlencode($search_month);
1301
+			$param .= '&search_month='.urlencode($search_month);
1302 1302
 		}
1303 1303
 		if ($search_year > 0) {
1304
-			$param .= '&search_year=' . urlencode($search_year);
1304
+			$param .= '&search_year='.urlencode($search_year);
1305 1305
 		}
1306 1306
 		if (!empty($search_user)) { 	// We keep param if -1 because default value is forced to user id if not set
1307 1307
 			$param .= '&search_user='.urlencode($search_user);
1308 1308
 		}
1309 1309
 		if ($search_task_ref != '') {
1310
-			$param .= '&search_task_ref=' . urlencode($search_task_ref);
1310
+			$param .= '&search_task_ref='.urlencode($search_task_ref);
1311 1311
 		}
1312 1312
 		if ($search_company != '') {
1313
-			$param .= '&amp;$search_company=' . urlencode($search_company);
1313
+			$param .= '&amp;$search_company='.urlencode($search_company);
1314 1314
 		}
1315 1315
 		if ($search_company_alias != '') {
1316
-			$param .= '&amp;$search_company_alias=' . urlencode($search_company_alias);
1316
+			$param .= '&amp;$search_company_alias='.urlencode($search_company_alias);
1317 1317
 		}
1318 1318
 		if ($search_project_ref != '') {
1319
-			$param .= '&amp;$search_project_ref=' . urlencode($search_project_ref);
1319
+			$param .= '&amp;$search_project_ref='.urlencode($search_project_ref);
1320 1320
 		}
1321 1321
 		if ($search_project_label != '') {
1322
-			$param .= '&amp;$search_project_label=' . urlencode($search_project_label);
1322
+			$param .= '&amp;$search_project_label='.urlencode($search_project_label);
1323 1323
 		}
1324 1324
 		if ($search_task_label != '') {
1325
-			$param .= '&search_task_label=' . urlencode($search_task_label);
1325
+			$param .= '&search_task_label='.urlencode($search_task_label);
1326 1326
 		}
1327 1327
 		if ($search_note != '') {
1328
-			$param .= '&search_note=' . urlencode($search_note);
1328
+			$param .= '&search_note='.urlencode($search_note);
1329 1329
 		}
1330 1330
 		if ($search_duration != '') {
1331
-			$param .= '&amp;search_field2=' . urlencode($search_duration);
1331
+			$param .= '&amp;search_field2='.urlencode($search_duration);
1332 1332
 		}
1333 1333
 		if ($optioncss != '') {
1334
-			$param .= '&optioncss=' . urlencode($optioncss);
1334
+			$param .= '&optioncss='.urlencode($optioncss);
1335 1335
 		}
1336 1336
 		if ($search_date_startday) {
1337
-			$param .= '&search_date_startday=' . urlencode($search_date_startday);
1337
+			$param .= '&search_date_startday='.urlencode($search_date_startday);
1338 1338
 		}
1339 1339
 		if ($search_date_startmonth) {
1340
-			$param .= '&search_date_startmonth=' . urlencode($search_date_startmonth);
1340
+			$param .= '&search_date_startmonth='.urlencode($search_date_startmonth);
1341 1341
 		}
1342 1342
 		if ($search_date_startyear) {
1343
-			$param .= '&search_date_startyear=' . urlencode($search_date_startyear);
1343
+			$param .= '&search_date_startyear='.urlencode($search_date_startyear);
1344 1344
 		}
1345 1345
 		if ($search_date_endday) {
1346
-			$param .= '&search_date_endday=' . urlencode($search_date_endday);
1346
+			$param .= '&search_date_endday='.urlencode($search_date_endday);
1347 1347
 		}
1348 1348
 		if ($search_date_endmonth) {
1349
-			$param .= '&search_date_endmonth=' . urlencode($search_date_endmonth);
1349
+			$param .= '&search_date_endmonth='.urlencode($search_date_endmonth);
1350 1350
 		}
1351 1351
 		if ($search_date_endyear) {
1352
-			$param .= '&search_date_endyear=' . urlencode($search_date_endyear);
1352
+			$param .= '&search_date_endyear='.urlencode($search_date_endyear);
1353 1353
 		}
1354 1354
 		if ($search_timespent_starthour) {
1355
-			$param .= '&search_timespent_duration_starthour=' . urlencode($search_timespent_starthour);
1355
+			$param .= '&search_timespent_duration_starthour='.urlencode($search_timespent_starthour);
1356 1356
 		}
1357 1357
 		if ($search_timespent_startmin) {
1358
-			$param .= '&search_timespent_duration_startmin=' . urlencode($search_timespent_startmin);
1358
+			$param .= '&search_timespent_duration_startmin='.urlencode($search_timespent_startmin);
1359 1359
 		}
1360 1360
 		if ($search_timespent_endhour) {
1361
-			$param .= '&search_timespent_duration_endhour=' . urlencode($search_timespent_endhour);
1361
+			$param .= '&search_timespent_duration_endhour='.urlencode($search_timespent_endhour);
1362 1362
 		}
1363 1363
 		if ($search_timespent_endmin) {
1364
-			$param .= '&search_timespent_duration_endmin=' . urlencode($search_timespent_endmin);
1364
+			$param .= '&search_timespent_duration_endmin='.urlencode($search_timespent_endmin);
1365 1365
 		}
1366 1366
 
1367 1367
 		/*
@@ -1369,24 +1369,24 @@  discard block
 block discarded – undo
1369 1369
 		 include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
1370 1370
 		 */
1371 1371
 		if ($id) {
1372
-			$param .= '&id=' . urlencode($id);
1372
+			$param .= '&id='.urlencode($id);
1373 1373
 		}
1374 1374
 		if ($projectid) {
1375
-			$param .= '&projectid=' . urlencode($projectid);
1375
+			$param .= '&projectid='.urlencode($projectid);
1376 1376
 		}
1377 1377
 		if ($withproject) {
1378
-			$param .= '&withproject=' . urlencode($withproject);
1378
+			$param .= '&withproject='.urlencode($withproject);
1379 1379
 		}
1380 1380
 		// Add $param from hooks
1381 1381
 		$parameters = array();
1382 1382
 		$reshook = $hookmanager->executeHooks('printFieldListSearchParam', $parameters, $object); // Note that $action and $object may have been modified by hook
1383 1383
 		$param .= $hookmanager->resPrint;
1384 1384
 
1385
-		print '<form method="POST" action="' . $_SERVER["PHP_SELF"] . '">';
1385
+		print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
1386 1386
 		if ($optioncss != '') {
1387
-			print '<input type="hidden" name="optioncss" value="' . $optioncss . '">';
1387
+			print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
1388 1388
 		}
1389
-		print '<input type="hidden" name="token" value="' . newToken() . '">';
1389
+		print '<input type="hidden" name="token" value="'.newToken().'">';
1390 1390
 		print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
1391 1391
 		if ($action == 'editline') {
1392 1392
 			print '<input type="hidden" name="action" value="updateline">';
@@ -1401,13 +1401,13 @@  discard block
 block discarded – undo
1401 1401
 		} else {
1402 1402
 			print '<input type="hidden" name="action" value="list">';
1403 1403
 		}
1404
-		print '<input type="hidden" name="sortfield" value="' . $sortfield . '">';
1405
-		print '<input type="hidden" name="sortorder" value="' . $sortorder . '">';
1404
+		print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
1405
+		print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
1406 1406
 
1407
-		print '<input type="hidden" name="id" value="' . $id . '">';
1408
-		print '<input type="hidden" name="projectid" value="' . $projectidforalltimes . '">';
1409
-		print '<input type="hidden" name="withproject" value="' . $withproject . '">';
1410
-		print '<input type="hidden" name="tab" value="' . $tab . '">';
1407
+		print '<input type="hidden" name="id" value="'.$id.'">';
1408
+		print '<input type="hidden" name="projectid" value="'.$projectidforalltimes.'">';
1409
+		print '<input type="hidden" name="withproject" value="'.$withproject.'">';
1410
+		print '<input type="hidden" name="tab" value="'.$tab.'">';
1411 1411
 		print '<input type="hidden" name="page_y" value="">';
1412 1412
 
1413 1413
 		// Form to convert time spent into invoice
@@ -1434,7 +1434,7 @@  discard block
 block discarded – undo
1434 1434
 					'onelineperperiod' => 'OneLinePerTimeSpentLine',
1435 1435
 				);
1436 1436
 				print $form->selectarray('generateinvoicemode', $tmparray, 'onelineperuser', 0, 0, 0, '', 1);
1437
-				print "\n" . '<script type="text/javascript">';
1437
+				print "\n".'<script type="text/javascript">';
1438 1438
 				print '
1439 1439
 				$(document).ready(function () {
1440 1440
 					setDetailVisibility();
@@ -1451,8 +1451,8 @@  discard block
 block discarded – undo
1451 1451
             		}
1452 1452
             	});
1453 1453
             			';
1454
-				print '</script>' . "\n";
1455
-				print '<span style="display:none" id="detail_time_duration"><input type="checkbox" value="detail" name="detail_time_duration"/>' . $langs->trans('AddDetailDateAndDuration') . '</span>';
1454
+				print '</script>'."\n";
1455
+				print '<span style="display:none" id="detail_time_duration"><input type="checkbox" value="detail" name="detail_time_duration"/>'.$langs->trans('AddDetailDateAndDuration').'</span>';
1456 1456
 				print '</td>';
1457 1457
 				print '</tr>';
1458 1458
 
@@ -1487,14 +1487,14 @@  discard block
 block discarded – undo
1487 1487
 
1488 1488
 				print '<br>';
1489 1489
 				print '<div class="center">';
1490
-				print '<input type="submit" class="button" id="createbills" name="createbills" value="' . $langs->trans('GenerateBill') . '">  ';
1491
-				print '<input type="submit" class="button button-cancel" id="cancel" name="cancel" value="' . $langs->trans("Cancel") . '">';
1490
+				print '<input type="submit" class="button" id="createbills" name="createbills" value="'.$langs->trans('GenerateBill').'">  ';
1491
+				print '<input type="submit" class="button button-cancel" id="cancel" name="cancel" value="'.$langs->trans("Cancel").'">';
1492 1492
 				print '</div>';
1493 1493
 				print '<br>';
1494 1494
 			} else {
1495
-				print '<div class="warning">' . $langs->trans("ThirdPartyRequiredToGenerateInvoice") . '</div>';
1495
+				print '<div class="warning">'.$langs->trans("ThirdPartyRequiredToGenerateInvoice").'</div>';
1496 1496
 				print '<div class="center">';
1497
-				print '<input type="submit" class="button button-cancel" id="cancel" name="cancel" value="' . $langs->trans("Cancel") . '">';
1497
+				print '<input type="submit" class="button button-cancel" id="cancel" name="cancel" value="'.$langs->trans("Cancel").'">';
1498 1498
 				print '</div>';
1499 1499
 				$massaction = '';
1500 1500
 			}
@@ -1507,7 +1507,7 @@  discard block
 block discarded – undo
1507 1507
 				print '<table class="noborder centpercent">';
1508 1508
 				print '<tr>';
1509 1509
 				print '<td class="titlefield">';
1510
-				print img_picto('', 'intervention', 'class="pictofixedwidth"') . $langs->trans('InterToUse');
1510
+				print img_picto('', 'intervention', 'class="pictofixedwidth"').$langs->trans('InterToUse');
1511 1511
 				print '</td>';
1512 1512
 				print '<td>';
1513 1513
 				$forminter = new FormIntervention($db);
@@ -1517,14 +1517,14 @@  discard block
 block discarded – undo
1517 1517
 				print '</table>';
1518 1518
 
1519 1519
 				print '<div class="center">';
1520
-				print '<input type="submit" class="button" id="createinter" name="createinter" value="' . $langs->trans('GenerateInter') . '">  ';
1521
-				print '<input type="submit" class="button" id="cancel" name="cancel" value="' . $langs->trans('Cancel') . '">';
1520
+				print '<input type="submit" class="button" id="createinter" name="createinter" value="'.$langs->trans('GenerateInter').'">  ';
1521
+				print '<input type="submit" class="button" id="cancel" name="cancel" value="'.$langs->trans('Cancel').'">';
1522 1522
 				print '</div>';
1523 1523
 				print '<br>';
1524 1524
 			} else {
1525
-				print '<div class="warning">' . $langs->trans("ThirdPartyRequiredToGenerateIntervention") . '</div>';
1525
+				print '<div class="warning">'.$langs->trans("ThirdPartyRequiredToGenerateIntervention").'</div>';
1526 1526
 				print '<div class="center">';
1527
-				print '<input type="submit" class="button" id="cancel" name="cancel" value="' . $langs->trans('Cancel') . '">';
1527
+				print '<input type="submit" class="button" id="cancel" name="cancel" value="'.$langs->trans('Cancel').'">';
1528 1528
 				print '</div>';
1529 1529
 				$massaction = '';
1530 1530
 			}
@@ -1585,13 +1585,13 @@  discard block
 block discarded – undo
1585 1585
 			$sql .= " AND t.fk_element =".((int) $object->id);
1586 1586
 		} elseif (!empty($projectidforalltimes)) {
1587 1587
 			// Limit on one project
1588
-			$sql .= " AND pt.fk_projet IN (" . $db->sanitize($projectidforalltimes) . ")";
1588
+			$sql .= " AND pt.fk_projet IN (".$db->sanitize($projectidforalltimes).")";
1589 1589
 		} elseif (!empty($allprojectforuser)) {
1590 1590
 			// Limit on on user
1591 1591
 			if (empty($search_user)) {
1592 1592
 				$search_user = $user->id;
1593 1593
 			}
1594
-			if ($search_user > 0) $sql .= " AND t.fk_user = " . ((int) $search_user);
1594
+			if ($search_user > 0) $sql .= " AND t.fk_user = ".((int) $search_user);
1595 1595
 		}
1596 1596
 
1597 1597
 		if ($search_note) {
@@ -1643,13 +1643,13 @@  discard block
 block discarded – undo
1643 1643
 			if ($search_timespent_starthour || $search_timespent_startmin) {
1644 1644
 				$timespent_duration_start = $search_timespent_starthour * 60 * 60; // We store duration in seconds
1645 1645
 				$timespent_duration_start += ($search_timespent_startmin ? $search_timespent_startmin : 0) * 60; // We store duration in seconds
1646
-				$sql .= " AND t.element_duration >= " . $timespent_duration_start;
1646
+				$sql .= " AND t.element_duration >= ".$timespent_duration_start;
1647 1647
 			}
1648 1648
 
1649 1649
 			if ($search_timespent_endhour || $search_timespent_endmin) {
1650 1650
 				$timespent_duration_end = $search_timespent_endhour * 60 * 60; // We store duration in seconds
1651 1651
 				$timespent_duration_end += ($search_timespent_endmin ? $search_timespent_endmin : 0) * 60; // We store duration in seconds
1652
-				$sql .= " AND t.element_duration <= " . $timespent_duration_end;
1652
+				$sql .= " AND t.element_duration <= ".$timespent_duration_end;
1653 1653
 			}
1654 1654
 		}
1655 1655
 
@@ -1697,13 +1697,13 @@  discard block
 block discarded – undo
1697 1697
 
1698 1698
 		if ($num >= 0) {
1699 1699
 			if (!empty($projectidforalltimes)) {
1700
-				print '<!-- List of time spent for project -->' . "\n";
1700
+				print '<!-- List of time spent for project -->'."\n";
1701 1701
 
1702 1702
 				$title = $langs->trans("ListTaskTimeUserProject");
1703 1703
 
1704 1704
 				print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'clock', 0, $linktocreatetime, '', $limit, 0, 0, 1);
1705 1705
 			} else {
1706
-				print '<!-- List of time spent -->' . "\n";
1706
+				print '<!-- List of time spent -->'."\n";
1707 1707
 
1708 1708
 				$title = $langs->trans("ListTaskTimeForTask");
1709 1709
 
@@ -1725,26 +1725,26 @@  discard block
 block discarded – undo
1725 1725
 		 * Form to add a new line of time spent
1726 1726
 		 */
1727 1727
 		if ($action == 'createtime' && $user->hasRight('projet', 'time')) {
1728
-			print '<!-- table to add time spent -->' . "\n";
1728
+			print '<!-- table to add time spent -->'."\n";
1729 1729
 			if (!empty($id)) {
1730
-				print '<input type="hidden" name="taskid" value="' . $id . '">';
1730
+				print '<input type="hidden" name="taskid" value="'.$id.'">';
1731 1731
 			}
1732 1732
 
1733 1733
 			print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
1734 1734
 			print '<table class="noborder nohover centpercent">';
1735 1735
 
1736 1736
 			print '<tr class="liste_titre">';
1737
-			print '<td>' . $langs->trans("Date") . '</td>';
1737
+			print '<td>'.$langs->trans("Date").'</td>';
1738 1738
 			if (!empty($allprojectforuser)) {
1739
-				print '<td>' . $langs->trans("Project") . '</td>';
1739
+				print '<td>'.$langs->trans("Project").'</td>';
1740 1740
 			}
1741 1741
 			if (empty($id)) {
1742
-				print '<td>' . $langs->trans("Task") . '</td>';
1742
+				print '<td>'.$langs->trans("Task").'</td>';
1743 1743
 			}
1744
-			print '<td>' . $langs->trans("By") . '</td>';
1745
-			print '<td>' . $langs->trans("Note") . '</td>';
1746
-			print '<td>' . $langs->trans("NewTimeSpent") . '</td>';
1747
-			print '<td>' . $langs->trans("ProgressDeclared") . '</td>';
1744
+			print '<td>'.$langs->trans("By").'</td>';
1745
+			print '<td>'.$langs->trans("Note").'</td>';
1746
+			print '<td>'.$langs->trans("NewTimeSpent").'</td>';
1747
+			print '<td>'.$langs->trans("ProgressDeclared").'</td>';
1748 1748
 			if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT)) {
1749 1749
 				print '<td></td>';
1750 1750
 
@@ -1798,14 +1798,14 @@  discard block
 block discarded – undo
1798 1798
 				print $form->select_dolusers((GETPOST('userid', 'int') ? GETPOST('userid', 'int') : $userid), 'userid', 0, '', 0, '', $contactsofproject, 0, 0, 0, '', 0, $langs->trans("ResourceNotAssignedToProject"), 'minwidth150imp maxwidth200');
1799 1799
 			} else {
1800 1800
 				if ($nboftasks) {
1801
-					print img_error($langs->trans('FirstAddRessourceToAllocateTime')) . ' ' . $langs->trans('FirstAddRessourceToAllocateTime');
1801
+					print img_error($langs->trans('FirstAddRessourceToAllocateTime')).' '.$langs->trans('FirstAddRessourceToAllocateTime');
1802 1802
 				}
1803 1803
 			}
1804 1804
 			print '</td>';
1805 1805
 
1806 1806
 			// Note
1807 1807
 			print '<td>';
1808
-			print '<textarea name="timespent_note" class="maxwidth100onsmartphone" rows="' . ROWS_2 . '">' . (GETPOST('timespent_note') ? GETPOST('timespent_note') : '') . '</textarea>';
1808
+			print '<textarea name="timespent_note" class="maxwidth100onsmartphone" rows="'.ROWS_2.'">'.(GETPOST('timespent_note') ? GETPOST('timespent_note') : '').'</textarea>';
1809 1809
 			print '</td>';
1810 1810
 
1811 1811
 			// Duration - Time spent
@@ -1873,7 +1873,7 @@  discard block
 block discarded – undo
1873 1873
 		$selectedfields .= (is_array($arrayofmassactions) && count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
1874 1874
 
1875 1875
 		print '<div class="div-table-responsive">';
1876
-		print '<table class="tagtable nobottomiftotal liste' . ($moreforfilter ? " listwithfilterbefore" : "") . '">' . "\n";
1876
+		print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
1877 1877
 
1878 1878
 		// Fields title search
1879 1879
 		// --------------------------------------------------------------------
@@ -1898,20 +1898,20 @@  discard block
 block discarded – undo
1898 1898
 		}
1899 1899
 		// Thirdparty
1900 1900
 		if (!empty($arrayfields['p.fk_soc']['checked'])) {
1901
-			print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_company" value="' . dol_escape_htmltag($search_company) . '"></td>';
1901
+			print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_company" value="'.dol_escape_htmltag($search_company).'"></td>';
1902 1902
 		}
1903 1903
 
1904 1904
 		// Thirdparty alias
1905 1905
 		if (!empty($arrayfields['s.name_alias']['checked'])) {
1906
-			print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_company_alias" value="' . dol_escape_htmltag($search_company_alias) . '"></td>';
1906
+			print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_company_alias" value="'.dol_escape_htmltag($search_company_alias).'"></td>';
1907 1907
 		}
1908 1908
 
1909 1909
 		if (!empty($allprojectforuser)) {
1910 1910
 			if (!empty($arrayfields['p.project_ref']['checked'])) {
1911
-				print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_project_ref" value="' . dol_escape_htmltag($search_project_ref) . '"></td>';
1911
+				print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_project_ref" value="'.dol_escape_htmltag($search_project_ref).'"></td>';
1912 1912
 			}
1913 1913
 			if (!empty($arrayfields['p.project_label']['checked'])) {
1914
-				print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_project_label" value="' . dol_escape_htmltag($search_project_label) . '"></td>';
1914
+				print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_project_label" value="'.dol_escape_htmltag($search_project_label).'"></td>';
1915 1915
 			}
1916 1916
 		}
1917 1917
 		// Task
@@ -1929,7 +1929,7 @@  discard block
 block discarded – undo
1929 1929
 		}
1930 1930
 		// Note
1931 1931
 		if (!empty($arrayfields['t.note']['checked'])) {
1932
-			print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="search_note" value="' . dol_escape_htmltag($search_note) . '"></td>';
1932
+			print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="search_note" value="'.dol_escape_htmltag($search_note).'"></td>';
1933 1933
 		}
1934 1934
 		// Duration
1935 1935
 		if (!empty($arrayfields['t.element_duration']['checked'])) {
@@ -1940,7 +1940,7 @@  discard block
 block discarded – undo
1940 1940
 			if ($search_timespent_starthour || $search_timespent_startmin) {
1941 1941
 				$durationtouse_start = ($search_timespent_starthour * 3600 + $search_timespent_startmin * 60);
1942 1942
 			}
1943
-			print '<div class="nowraponall">' . $langs->trans('from') . ' ';
1943
+			print '<div class="nowraponall">'.$langs->trans('from').' ';
1944 1944
 			print $form->select_duration('search_timespent_duration_start', $durationtouse_start, 0, 'text', 0, 1);
1945 1945
 			print '</div>';
1946 1946
 
@@ -1948,7 +1948,7 @@  discard block
 block discarded – undo
1948 1948
 			if ($search_timespent_endhour || $search_timespent_endmin) {
1949 1949
 				$durationtouse_end = ($search_timespent_endhour * 3600 + $search_timespent_endmin * 60);
1950 1950
 			}
1951
-			print '<div class="nowraponall">' . $langs->trans('at') . ' ';
1951
+			print '<div class="nowraponall">'.$langs->trans('at').' ';
1952 1952
 			print $form->select_duration('search_timespent_duration_end', $durationtouse_end, 0, 'text', 0, 1);
1953 1953
 			print '</div>';
1954 1954
 
@@ -1964,7 +1964,7 @@  discard block
 block discarded – undo
1964 1964
 		}
1965 1965
 		// Value billed
1966 1966
 		if (!empty($arrayfields['valuebilled']['checked'])) {
1967
-			print '<td class="liste_titre center">' . $form->selectyesno('search_valuebilled', $search_valuebilled, 1, false, 1) . '</td>';
1967
+			print '<td class="liste_titre center">'.$form->selectyesno('search_valuebilled', $search_valuebilled, 1, false, 1).'</td>';
1968 1968
 		}
1969 1969
 
1970 1970
 		/*
@@ -1982,7 +1982,7 @@  discard block
 block discarded – undo
1982 1982
 			print $searchpicto;
1983 1983
 			print '</td>';
1984 1984
 		}
1985
-		print '</tr>' . "\n";
1985
+		print '</tr>'."\n";
1986 1986
 
1987 1987
 		$totalarray = array();
1988 1988
 		$totalarray['nbfield'] = 0;
@@ -2092,7 +2092,7 @@  discard block
 block discarded – undo
2092 2092
 			if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
2093 2093
 				print '<td class="center nowraponall">';
2094 2094
 				if (($action == 'editline' || $action == 'splitline') && GETPOST('lineid', 'int') == $task_time->rowid) {
2095
-					print '<input type="hidden" name="lineid" value="' . GETPOST('lineid', 'int') . '">';
2095
+					print '<input type="hidden" name="lineid" value="'.GETPOST('lineid', 'int').'">';
2096 2096
 					print '<input type="submit" class="button buttongen smallpaddingimp margintoponlyshort marginbottomonlyshort button-save" name="save" value="'.$langs->trans("Save").'">';
2097 2097
 					print '<br>';
2098 2098
 					print '<input type="submit" class="button buttongen smallpaddingimp margintoponlyshort marginbottomonlyshort button-cancel" name="cancel" value="'.$langs->trans("Cancel").'">';
@@ -2100,7 +2100,7 @@  discard block
 block discarded – undo
2100 2100
 					if (in_array($task_time->fk_user, $childids) || $user->hasRight('projet', 'all', 'creer')) {
2101 2101
 						if (getDolGlobalString('MAIN_FEATURES_LEVEL') >= 2) {
2102 2102
 							print '&nbsp;';
2103
-							print '<a class="reposition" href="' . $_SERVER["PHP_SELF"] . '?action=splitline&token=' . newToken() . '&lineid=' . $task_time->rowid . $param . ((empty($id) || $tab == 'timespent') ? '&tab=timespent' : '') . '">';
2103
+							print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=splitline&token='.newToken().'&lineid='.$task_time->rowid.$param.((empty($id) || $tab == 'timespent') ? '&tab=timespent' : '').'">';
2104 2104
 							print img_split('', 'class="pictofixedwidth"');
2105 2105
 							print '</a>';
2106 2106
 						}
@@ -2119,7 +2119,7 @@  discard block
 block discarded – undo
2119 2119
 								$selected = 1;
2120 2120
 							}
2121 2121
 							print '&nbsp;';
2122
-							print '<input id="cb' . $task_time->rowid . '" class="flat checkforselect marginleftonly" type="checkbox" name="toselect[]" value="' . $task_time->rowid . '"' . ($selected ? ' checked="checked"' : '') . '>';
2122
+							print '<input id="cb'.$task_time->rowid.'" class="flat checkforselect marginleftonly" type="checkbox" name="toselect[]" value="'.$task_time->rowid.'"'.($selected ? ' checked="checked"' : '').'>';
2123 2123
 						}
2124 2124
 					}
2125 2125
 				}
@@ -2237,7 +2237,7 @@  discard block
 block discarded – undo
2237 2237
 					}
2238 2238
 				}
2239 2239
 			} elseif ($action !== 'createtime') {
2240
-				print '<input type="hidden" name="taskid" value="' . $id . '">';
2240
+				print '<input type="hidden" name="taskid" value="'.$id.'">';
2241 2241
 			}
2242 2242
 
2243 2243
 			// Task label
@@ -2267,7 +2267,7 @@  discard block
 block discarded – undo
2267 2267
 						print img_object('', 'user', 'class="hideonsmartphone"');
2268 2268
 						print $form->select_dolusers($task_time->fk_user, 'userid_line', 0, '', 0, '', $contactsoftask, '0', 0, 0, '', 0, '', 'maxwidth200');
2269 2269
 					} else {
2270
-						print img_error($langs->trans('FirstAddRessourceToAllocateTime')) . $langs->trans('FirstAddRessourceToAllocateTime');
2270
+						print img_error($langs->trans('FirstAddRessourceToAllocateTime')).$langs->trans('FirstAddRessourceToAllocateTime');
2271 2271
 					}
2272 2272
 				} else {
2273 2273
 					$userstatic->id = $task_time->fk_user;
@@ -2287,7 +2287,7 @@  discard block
 block discarded – undo
2287 2287
 			if (!empty($arrayfields['t.note']['checked'])) {
2288 2288
 				if ($action == 'editline' && GETPOST('lineid', 'int') == $task_time->rowid) {
2289 2289
 					print '<td class="small">';
2290
-					print '<textarea name="timespent_note_line" width="95%" rows="' . ROWS_1 . '">' . dol_escape_htmltag($task_time->note, 0, 1) . '</textarea>';
2290
+					print '<textarea name="timespent_note_line" width="95%" rows="'.ROWS_1.'">'.dol_escape_htmltag($task_time->note, 0, 1).'</textarea>';
2291 2291
 					print '</td>';
2292 2292
 				} else {
2293 2293
 					print '<td class="small tdoverflowmax150 classfortooltip" title="'.dol_string_onlythesehtmltags(dol_htmlentitiesbr($task_time->note)).'">';
@@ -2298,7 +2298,7 @@  discard block
 block discarded – undo
2298 2298
 					$totalarray['nbfield']++;
2299 2299
 				}
2300 2300
 			} elseif ($action == 'editline' && GETPOST('lineid', 'int') == $task_time->rowid) {
2301
-				print '<input type="hidden" name="timespent_note_line" value="' . dol_escape_htmltag($task_time->note, 0, 1) . '">';
2301
+				print '<input type="hidden" name="timespent_note_line" value="'.dol_escape_htmltag($task_time->note, 0, 1).'">';
2302 2302
 			}
2303 2303
 
2304 2304
 			// Time spent
@@ -2358,7 +2358,7 @@  discard block
 block discarded – undo
2358 2358
 				$value = price2num($task_time->thm * $task_time->element_duration / 3600, 'MT', 1);
2359 2359
 
2360 2360
 				print '<td class="nowraponall right">';
2361
-				print '<span class="amount" title="' . $langs->trans("THM") . ': ' . price($task_time->thm) . '">';
2361
+				print '<span class="amount" title="'.$langs->trans("THM").': '.price($task_time->thm).'">';
2362 2362
 				print price($value, 1, $langs, 1, -1, -1, $conf->currency);
2363 2363
 				print '</span>';
2364 2364
 				print '</td>';
@@ -2391,7 +2391,7 @@  discard block
 block discarded – undo
2391 2391
 						if ($task_time->invoice_id) {
2392 2392
 							$result = $tmpinvoice->fetch($task_time->invoice_id);
2393 2393
 							if ($result > 0) {
2394
-								if ($action=='editline' && $_GET['lineid'] == $task_time->rowid) {
2394
+								if ($action == 'editline' && $_GET['lineid'] == $task_time->rowid) {
2395 2395
 									print $formproject->selectInvoiceAndLine($task_time->invoice_id, $task_time->invoice_line_id, 'invoiceid', 'invoicelineid', 'maxwidth500', array('p.rowid'=>$projectstatic->id));
2396 2396
 								} else {
2397 2397
 									print $tmpinvoice->getNomUrl(1);
@@ -2409,7 +2409,7 @@  discard block
 block discarded – undo
2409 2409
 							print $langs->trans("No");
2410 2410
 						}
2411 2411
 					} else {
2412
-						print '<span class="opacitymedium">' . $langs->trans("NA") . '</span>';
2412
+						print '<span class="opacitymedium">'.$langs->trans("NA").'</span>';
2413 2413
 					}
2414 2414
 				}
2415 2415
 				print '</td>';
@@ -2440,7 +2440,7 @@  discard block
 block discarded – undo
2440 2440
 					if (in_array($task_time->fk_user, $childids) || $user->hasRight('projet', 'all', 'creer')) {
2441 2441
 						if (getDolGlobalString('MAIN_FEATURES_LEVEL') >= 2) {
2442 2442
 							print '&nbsp;';
2443
-							print '<a class="reposition" href="' . $_SERVER["PHP_SELF"] . '?action=splitline&token=' . newToken() . '&lineid=' . $task_time->rowid . $param . ((empty($id) || $tab == 'timespent') ? '&tab=timespent' : '') . '">';
2443
+							print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=splitline&token='.newToken().'&lineid='.$task_time->rowid.$param.((empty($id) || $tab == 'timespent') ? '&tab=timespent' : '').'">';
2444 2444
 							print img_split('', 'class="pictofixedwidth"');
2445 2445
 							print '</a>';
2446 2446
 						}
@@ -2459,7 +2459,7 @@  discard block
 block discarded – undo
2459 2459
 								$selected = 1;
2460 2460
 							}
2461 2461
 							print '&nbsp;';
2462
-							print '<input id="cb' . $task_time->rowid . '" class="flat checkforselect marginleftonly" type="checkbox" name="toselect[]" value="' . $task_time->rowid . '"' . ($selected ? ' checked="checked"' : '') . '>';
2462
+							print '<input id="cb'.$task_time->rowid.'" class="flat checkforselect marginleftonly" type="checkbox" name="toselect[]" value="'.$task_time->rowid.'"'.($selected ? ' checked="checked"' : '').'>';
2463 2463
 						}
2464 2464
 					}
2465 2465
 				}
@@ -2549,7 +2549,7 @@  discard block
 block discarded – undo
2549 2549
 							print img_object('', 'user', 'class="hideonsmartphone"');
2550 2550
 							print $form->select_dolusers($task_time->fk_user, 'userid_line', 0, '', 0, '', $contactsoftask);
2551 2551
 						} else {
2552
-							print img_error($langs->trans('FirstAddRessourceToAllocateTime')) . $langs->trans('FirstAddRessourceToAllocateTime');
2552
+							print img_error($langs->trans('FirstAddRessourceToAllocateTime')).$langs->trans('FirstAddRessourceToAllocateTime');
2553 2553
 						}
2554 2554
 					} else {
2555 2555
 						$userstatic->id = $task_time->fk_user;
@@ -2566,13 +2566,13 @@  discard block
 block discarded – undo
2566 2566
 				if (!empty($arrayfields['t.note']['checked'])) {
2567 2567
 					print '<td class="tdoverflowmax300">';
2568 2568
 					if ($action == 'splitline' && GETPOST('lineid', 'int') == $task_time->rowid) {
2569
-						print '<textarea name="timespent_note_line" width="95%" rows="' . ROWS_1 . '">' . dol_escape_htmltag($task_time->note, 0, 1) . '</textarea>';
2569
+						print '<textarea name="timespent_note_line" width="95%" rows="'.ROWS_1.'">'.dol_escape_htmltag($task_time->note, 0, 1).'</textarea>';
2570 2570
 					} else {
2571 2571
 						print dol_nl2br($task_time->note);
2572 2572
 					}
2573 2573
 					print '</td>';
2574 2574
 				} elseif ($action == 'splitline' && GETPOST('lineid', 'int') == $task_time->rowid) {
2575
-					print '<input type="hidden" name="timespent_note_line" rows="' . ROWS_1 . '" value="' . dol_escape_htmltag($task_time->note, 0, 1) . '">';
2575
+					print '<input type="hidden" name="timespent_note_line" rows="'.ROWS_1.'" value="'.dol_escape_htmltag($task_time->note, 0, 1).'">';
2576 2576
 				}
2577 2577
 
2578 2578
 				// Time spent
@@ -2705,7 +2705,7 @@  discard block
 block discarded – undo
2705 2705
 							print img_object('', 'user', 'class="hideonsmartphone"');
2706 2706
 							print $form->select_dolusers($task_time->fk_user, 'userid_line_2', 0, '', 0, '', $contactsoftask);
2707 2707
 						} else {
2708
-							print img_error($langs->trans('FirstAddRessourceToAllocateTime')) . $langs->trans('FirstAddRessourceToAllocateTime');
2708
+							print img_error($langs->trans('FirstAddRessourceToAllocateTime')).$langs->trans('FirstAddRessourceToAllocateTime');
2709 2709
 						}
2710 2710
 					} else {
2711 2711
 						$userstatic->id = $task_time->fk_user;
@@ -2722,13 +2722,13 @@  discard block
 block discarded – undo
2722 2722
 				if (!empty($arrayfields['t.note']['checked'])) {
2723 2723
 					print '<td class="small tdoverflowmax300"">';
2724 2724
 					if ($action == 'splitline' && GETPOST('lineid', 'int') == $task_time->rowid) {
2725
-						print '<textarea name="timespent_note_line_2" width="95%" rows="' . ROWS_1 . '">' . dol_escape_htmltag($task_time->note, 0, 1) . '</textarea>';
2725
+						print '<textarea name="timespent_note_line_2" width="95%" rows="'.ROWS_1.'">'.dol_escape_htmltag($task_time->note, 0, 1).'</textarea>';
2726 2726
 					} else {
2727 2727
 						print dol_nl2br($task_time->note);
2728 2728
 					}
2729 2729
 					print '</td>';
2730 2730
 				} elseif ($action == 'splitline' && GETPOST('lineid', 'int') == $task_time->rowid) {
2731
-					print '<input type="hidden" name="timespent_note_line_2" value="' . dol_escape_htmltag($task_time->note, 0, 1) . '">';
2731
+					print '<input type="hidden" name="timespent_note_line_2" value="'.dol_escape_htmltag($task_time->note, 0, 1).'">';
2732 2732
 				}
2733 2733
 
2734 2734
 				// Time spent
@@ -2800,14 +2800,14 @@  discard block
 block discarded – undo
2800 2800
 				$i++;
2801 2801
 				if ($i == 1) {
2802 2802
 					if ($num < $limit && empty($offset)) {
2803
-						print '<td class="left">' . $langs->trans("Total") . '</td>';
2803
+						print '<td class="left">'.$langs->trans("Total").'</td>';
2804 2804
 					} else {
2805 2805
 						print '<td class="left">'.$form->textwithpicto($langs->trans("Total"), $langs->trans("Totalforthispage")).'</td>';
2806 2806
 					}
2807 2807
 				} elseif ($totalarray['totaldurationfield'] == $i) {
2808
-					print '<td class="right">' . convertSecondToTime($totalarray['totalduration'], 'allhourmin') . '</td>';
2808
+					print '<td class="right">'.convertSecondToTime($totalarray['totalduration'], 'allhourmin').'</td>';
2809 2809
 				} elseif ($totalarray['totalvaluefield'] == $i) {
2810
-					print '<td class="right">' . price($totalarray['totalvalue']) . '</td>';
2810
+					print '<td class="right">'.price($totalarray['totalvalue']).'</td>';
2811 2811
 					//} elseif ($totalarray['totalvaluebilledfield'] == $i) { print '<td class="center">'.price($totalarray['totalvaluebilled']).'</td>';
2812 2812
 				} else {
2813 2813
 					print '<td></td>';
@@ -2823,8 +2823,8 @@  discard block
 block discarded – undo
2823 2823
 					$totalnboffields++;
2824 2824
 				}
2825 2825
 			}
2826
-			print '<tr class="oddeven"><td colspan="' . $totalnboffields . '">';
2827
-			print '<span class="opacitymedium">' . $langs->trans("None") . '</span>';
2826
+			print '<tr class="oddeven"><td colspan="'.$totalnboffields.'">';
2827
+			print '<span class="opacitymedium">'.$langs->trans("None").'</span>';
2828 2828
 			print '</td></tr>';
2829 2829
 		}
2830 2830
 
Please login to merge, or discard this patch.
htdocs/core/actions_extrafields.inc.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -164,14 +164,14 @@  discard block
 block discarded – undo
164 164
 				} else {
165 165
 					// Else it's separated key/value and coma list
166 166
 					foreach ($parameters_array as $param_ligne) {
167
-						if (strpos($param_ligne, ',')!==false) {
167
+						if (strpos($param_ligne, ',') !== false) {
168 168
 							list($key, $value) = explode(',', $param_ligne);
169 169
 							if (!array_key_exists('options', $params)) {
170 170
 								$params['options'] = array();
171 171
 							}
172 172
 						} else {
173
-							$key=$param_ligne;
174
-							$value=null;
173
+							$key = $param_ligne;
174
+							$value = null;
175 175
 						}
176 176
 						$params['options'][$key] = $value;
177 177
 					}
@@ -448,7 +448,7 @@  discard block
 block discarded – undo
448 448
 						$resql = $db->query($sql);
449 449
 						if ($resql) {
450 450
 							$num_rows = $db->num_rows($resql);
451
-							$i=0;
451
+							$i = 0;
452 452
 							while ($i < $num_rows) {
453 453
 								$objtmp = $db->fetch_object($resql);
454 454
 								$id = $objtmp->rowid;
Please login to merge, or discard this patch.
htdocs/product/list.php 1 patch
Spacing   +47 added lines, -47 removed lines patch added patch discarded remove patch
@@ -256,12 +256,12 @@  discard block
 block discarded – undo
256 256
 	'p.tobatch'=>array('label'=>"ManageLotSerial", 'checked'=>0, 'enabled'=>(isModEnabled('productbatch')), 'position'=>60),
257 257
 	'p.fk_country'=>array('label'=>"Country", 'checked'=>0, 'position'=>100),
258 258
 	'p.fk_state'=>array('label'=>"State", 'checked'=>0, 'position'=>101),
259
-	$alias_product_perentity . '.accountancy_code_sell'=>array('label'=>"ProductAccountancySellCode", 'checked'=>0, 'enabled'=>empty($conf->global->PRODUCT_DISABLE_ACCOUNTING), 'position'=>400),
260
-	$alias_product_perentity . '.accountancy_code_sell_intra'=>array('label'=>"ProductAccountancySellIntraCode", 'checked'=>0, 'enabled'=>$isInEEC && empty($conf->global->PRODUCT_DISABLE_ACCOUNTING), 'position'=>401),
261
-	$alias_product_perentity . '.accountancy_code_sell_export'=>array('label'=>"ProductAccountancySellExportCode", 'checked'=>0, 'enabled'=>empty($conf->global->PRODUCT_DISABLE_ACCOUNTING), 'position'=>402),
262
-	$alias_product_perentity . '.accountancy_code_buy'=>array('label'=>"ProductAccountancyBuyCode", 'checked'=>0, 'enabled'=>empty($conf->global->PRODUCT_DISABLE_ACCOUNTING), 'position'=>403),
263
-	$alias_product_perentity . '.accountancy_code_buy_intra'=>array('label'=>"ProductAccountancyBuyIntraCode", 'checked'=>0, 'enabled'=>$isInEEC && empty($conf->global->PRODUCT_DISABLE_ACCOUNTING), 'position'=>404),
264
-	$alias_product_perentity . '.accountancy_code_buy_export'=>array('label'=>"ProductAccountancyBuyExportCode", 'checked'=>0, 'enabled'=>empty($conf->global->PRODUCT_DISABLE_ACCOUNTING), 'position'=>405),
259
+	$alias_product_perentity.'.accountancy_code_sell'=>array('label'=>"ProductAccountancySellCode", 'checked'=>0, 'enabled'=>empty($conf->global->PRODUCT_DISABLE_ACCOUNTING), 'position'=>400),
260
+	$alias_product_perentity.'.accountancy_code_sell_intra'=>array('label'=>"ProductAccountancySellIntraCode", 'checked'=>0, 'enabled'=>$isInEEC && empty($conf->global->PRODUCT_DISABLE_ACCOUNTING), 'position'=>401),
261
+	$alias_product_perentity.'.accountancy_code_sell_export'=>array('label'=>"ProductAccountancySellExportCode", 'checked'=>0, 'enabled'=>empty($conf->global->PRODUCT_DISABLE_ACCOUNTING), 'position'=>402),
262
+	$alias_product_perentity.'.accountancy_code_buy'=>array('label'=>"ProductAccountancyBuyCode", 'checked'=>0, 'enabled'=>empty($conf->global->PRODUCT_DISABLE_ACCOUNTING), 'position'=>403),
263
+	$alias_product_perentity.'.accountancy_code_buy_intra'=>array('label'=>"ProductAccountancyBuyIntraCode", 'checked'=>0, 'enabled'=>$isInEEC && empty($conf->global->PRODUCT_DISABLE_ACCOUNTING), 'position'=>404),
264
+	$alias_product_perentity.'.accountancy_code_buy_export'=>array('label'=>"ProductAccountancyBuyExportCode", 'checked'=>0, 'enabled'=>empty($conf->global->PRODUCT_DISABLE_ACCOUNTING), 'position'=>405),
265 265
 	'p.datec'=>array('label'=>"DateCreation", 'checked'=>0, 'position'=>500),
266 266
 	'p.tms'=>array('label'=>"DateModificationShort", 'checked'=>0, 'position'=>500),
267 267
 	'p.tosell'=>array('label'=>$langs->transnoentitiesnoconv("Status").' ('.$langs->transnoentitiesnoconv("Sell").')', 'checked'=>1, 'position'=>1000),
@@ -468,10 +468,10 @@  discard block
 block discarded – undo
468 468
 
469 469
 $sql .= ' FROM '.MAIN_DB_PREFIX.'product as p';
470 470
 if (isModEnabled('workstation')) {
471
-	$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "workstation_workstation as ws ON (p.fk_default_workstation = ws.rowid)";
471
+	$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."workstation_workstation as ws ON (p.fk_default_workstation = ws.rowid)";
472 472
 }
473 473
 if (!empty($conf->global->MAIN_PRODUCT_PERENTITY_SHARED)) {
474
-	$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = " . ((int) $conf->entity);
474
+	$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = ".((int) $conf->entity);
475 475
 }
476 476
 if (!empty($extrafields->attributes[$object->table_element]['label']) && is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) {
477 477
 	$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_extrafields as ef on (p.rowid = ef.fk_object)";
@@ -561,7 +561,7 @@  discard block
 block discarded – undo
561 561
 			if ($searchCategoryProductOperator == 0) {
562 562
 				$searchCategoryProductSqlList[] = " EXISTS (SELECT ck.fk_product FROM ".MAIN_DB_PREFIX."categorie_product as ck WHERE p.rowid = ck.fk_product AND ck.fk_categorie = ".((int) $searchCategoryProduct).")";
563 563
 			} else {
564
-				$listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategoryProduct);
564
+				$listofcategoryid .= ($listofcategoryid ? ', ' : '').((int) $searchCategoryProduct);
565 565
 			}
566 566
 		}
567 567
 	}
@@ -591,22 +591,22 @@  discard block
 block discarded – undo
591 591
 	$sql .= " AND p.finished = ".((int) $search_finished);
592 592
 }
593 593
 if ($search_accountancy_code_sell) {
594
-	$sql .= natural_search($alias_product_perentity . '.accountancy_code_sell', clean_account($search_accountancy_code_sell));
594
+	$sql .= natural_search($alias_product_perentity.'.accountancy_code_sell', clean_account($search_accountancy_code_sell));
595 595
 }
596 596
 if ($search_accountancy_code_sell_intra) {
597
-	$sql .= natural_search($alias_product_perentity . '.accountancy_code_sell_intra', clean_account($search_accountancy_code_sell_intra));
597
+	$sql .= natural_search($alias_product_perentity.'.accountancy_code_sell_intra', clean_account($search_accountancy_code_sell_intra));
598 598
 }
599 599
 if ($search_accountancy_code_sell_export) {
600
-	$sql .= natural_search($alias_product_perentity . '.accountancy_code_sell_export', clean_account($search_accountancy_code_sell_export));
600
+	$sql .= natural_search($alias_product_perentity.'.accountancy_code_sell_export', clean_account($search_accountancy_code_sell_export));
601 601
 }
602 602
 if ($search_accountancy_code_buy) {
603
-	$sql .= natural_search($alias_product_perentity . '.accountancy_code_buy', clean_account($search_accountancy_code_buy));
603
+	$sql .= natural_search($alias_product_perentity.'.accountancy_code_buy', clean_account($search_accountancy_code_buy));
604 604
 }
605 605
 if ($search_accountancy_code_buy_intra) {
606
-	$sql .= natural_search($alias_product_perentity . '.accountancy_code_buy_intra', clean_account($search_accountancy_code_buy_intra));
606
+	$sql .= natural_search($alias_product_perentity.'.accountancy_code_buy_intra', clean_account($search_accountancy_code_buy_intra));
607 607
 }
608 608
 if ($search_accountancy_code_buy_export) {
609
-	$sql .= natural_search($alias_product_perentity . '.accountancy_code_buy_export', clean_account($search_accountancy_code_buy_export));
609
+	$sql .= natural_search($alias_product_perentity.'.accountancy_code_buy_export', clean_account($search_accountancy_code_buy_export));
610 610
 }
611 611
 if (!empty($conf->global->PRODUCT_USE_UNITS) && $search_units) {
612 612
 	$sql .= natural_search('cu.rowid', $search_units);
@@ -831,7 +831,7 @@  discard block
 block discarded – undo
831 831
 if (isModEnabled('category') && $user->hasRight($rightskey, 'creer')) {
832 832
 	$arrayofmassactions['preaffecttag'] = img_picto('', 'category', 'class="pictofixedwidth"').$langs->trans("AffectTag");
833 833
 }
834
-if (in_array($massaction, array('presend', 'predelete','preaffecttag', 'edit_extrafields', 'preupdateprice'))) {
834
+if (in_array($massaction, array('presend', 'predelete', 'preaffecttag', 'edit_extrafields', 'preupdateprice'))) {
835 835
 	$arrayofmassactions = array();
836 836
 }
837 837
 $massactionbutton = $form->selectMassAction('', $arrayofmassactions);
@@ -1181,23 +1181,23 @@  discard block
 block discarded – undo
1181 1181
 	print '</td>';
1182 1182
 }
1183 1183
 // Accountancy code sell
1184
-if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_sell']['checked'])) {
1184
+if (!empty($arrayfields[$alias_product_perentity.'.accountancy_code_sell']['checked'])) {
1185 1185
 	print '<td class="liste_titre"><input class="flat maxwidth75" type="text" name="search_accountancy_code_sell" value="'.dol_escape_htmltag($search_accountancy_code_sell).'"></td>';
1186 1186
 }
1187
-if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_sell_intra']['checked'])) {
1187
+if (!empty($arrayfields[$alias_product_perentity.'.accountancy_code_sell_intra']['checked'])) {
1188 1188
 	print '<td class="liste_titre"><input class="flat maxwidth75" type="text" name="search_accountancy_code_sell_intra" value="'.dol_escape_htmltag($search_accountancy_code_sell_intra).'"></td>';
1189 1189
 }
1190
-if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_sell_export']['checked'])) {
1190
+if (!empty($arrayfields[$alias_product_perentity.'.accountancy_code_sell_export']['checked'])) {
1191 1191
 	print '<td class="liste_titre"><input class="flat maxwidth75" type="text" name="search_accountancy_code_sell_export" value="'.dol_escape_htmltag($search_accountancy_code_sell_export).'"></td>';
1192 1192
 }
1193 1193
 // Accountancy code buy
1194
-if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_buy']['checked'])) {
1194
+if (!empty($arrayfields[$alias_product_perentity.'.accountancy_code_buy']['checked'])) {
1195 1195
 	print '<td class="liste_titre"><input class="flat maxwidth75" type="text" name="search_accountancy_code_buy" value="'.dol_escape_htmltag($search_accountancy_code_buy).'"></td>';
1196 1196
 }
1197
-if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_buy_intra']['checked'])) {
1197
+if (!empty($arrayfields[$alias_product_perentity.'.accountancy_code_buy_intra']['checked'])) {
1198 1198
 	print '<td class="liste_titre"><input class="flat maxwidth75" type="text" name="search_accountancy_code_buy_intra" value="'.dol_escape_htmltag($search_accountancy_code_buy_intra).'"></td>';
1199 1199
 }
1200
-if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_buy_export']['checked'])) {
1200
+if (!empty($arrayfields[$alias_product_perentity.'.accountancy_code_buy_export']['checked'])) {
1201 1201
 	print '<td class="liste_titre"><input class="flat maxwidth75" type="text" name="search_accountancy_code_buy_export" value="'.dol_escape_htmltag($search_accountancy_code_buy_export).'"></td>';
1202 1202
 }
1203 1203
 // Extra fields
@@ -1405,28 +1405,28 @@  discard block
 block discarded – undo
1405 1405
 	print_liste_field_titre($arrayfields['p.fk_state']['label'], $_SERVER["PHP_SELF"], "p.fk_state", "", $param, '', $sortfield, $sortorder);
1406 1406
 	$totalarray['nbfield']++;
1407 1407
 }
1408
-if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_sell']['checked'])) {
1409
-	print_liste_field_titre($arrayfields[$alias_product_perentity . '.accountancy_code_sell']['label'], $_SERVER["PHP_SELF"], $alias_product_perentity . ".accountancy_code_sell", "", $param, '', $sortfield, $sortorder);
1408
+if (!empty($arrayfields[$alias_product_perentity.'.accountancy_code_sell']['checked'])) {
1409
+	print_liste_field_titre($arrayfields[$alias_product_perentity.'.accountancy_code_sell']['label'], $_SERVER["PHP_SELF"], $alias_product_perentity.".accountancy_code_sell", "", $param, '', $sortfield, $sortorder);
1410 1410
 	$totalarray['nbfield']++;
1411 1411
 }
1412
-if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_sell_intra']['checked'])) {
1413
-	print_liste_field_titre($arrayfields[$alias_product_perentity . '.accountancy_code_sell_intra']['label'], $_SERVER["PHP_SELF"], $alias_product_perentity . ".accountancy_code_sell_intra", "", $param, '', $sortfield, $sortorder);
1412
+if (!empty($arrayfields[$alias_product_perentity.'.accountancy_code_sell_intra']['checked'])) {
1413
+	print_liste_field_titre($arrayfields[$alias_product_perentity.'.accountancy_code_sell_intra']['label'], $_SERVER["PHP_SELF"], $alias_product_perentity.".accountancy_code_sell_intra", "", $param, '', $sortfield, $sortorder);
1414 1414
 	$totalarray['nbfield']++;
1415 1415
 }
1416
-if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_sell_export']['checked'])) {
1417
-	print_liste_field_titre($arrayfields[$alias_product_perentity . '.accountancy_code_sell_export']['label'], $_SERVER["PHP_SELF"], $alias_product_perentity . ".accountancy_code_sell_export", "", $param, '', $sortfield, $sortorder);
1416
+if (!empty($arrayfields[$alias_product_perentity.'.accountancy_code_sell_export']['checked'])) {
1417
+	print_liste_field_titre($arrayfields[$alias_product_perentity.'.accountancy_code_sell_export']['label'], $_SERVER["PHP_SELF"], $alias_product_perentity.".accountancy_code_sell_export", "", $param, '', $sortfield, $sortorder);
1418 1418
 	$totalarray['nbfield']++;
1419 1419
 }
1420
-if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_buy']['checked'])) {
1421
-	print_liste_field_titre($arrayfields[$alias_product_perentity . '.accountancy_code_buy']['label'], $_SERVER["PHP_SELF"], $alias_product_perentity . ".accountancy_code_buy", "", $param, '', $sortfield, $sortorder);
1420
+if (!empty($arrayfields[$alias_product_perentity.'.accountancy_code_buy']['checked'])) {
1421
+	print_liste_field_titre($arrayfields[$alias_product_perentity.'.accountancy_code_buy']['label'], $_SERVER["PHP_SELF"], $alias_product_perentity.".accountancy_code_buy", "", $param, '', $sortfield, $sortorder);
1422 1422
 	$totalarray['nbfield']++;
1423 1423
 }
1424
-if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_buy_intra']['checked'])) {
1425
-	print_liste_field_titre($arrayfields[$alias_product_perentity . '.accountancy_code_buy_intra']['label'], $_SERVER["PHP_SELF"], $alias_product_perentity . ".accountancy_code_buy_intra", "", $param, '', $sortfield, $sortorder);
1424
+if (!empty($arrayfields[$alias_product_perentity.'.accountancy_code_buy_intra']['checked'])) {
1425
+	print_liste_field_titre($arrayfields[$alias_product_perentity.'.accountancy_code_buy_intra']['label'], $_SERVER["PHP_SELF"], $alias_product_perentity.".accountancy_code_buy_intra", "", $param, '', $sortfield, $sortorder);
1426 1426
 	$totalarray['nbfield']++;
1427 1427
 }
1428
-if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_buy_export']['checked'])) {
1429
-	print_liste_field_titre($arrayfields[$alias_product_perentity . '.accountancy_code_buy_export']['label'], $_SERVER["PHP_SELF"], $alias_product_perentity . ".accountancy_code_buy_export", "", $param, '', $sortfield, $sortorder);
1428
+if (!empty($arrayfields[$alias_product_perentity.'.accountancy_code_buy_export']['checked'])) {
1429
+	print_liste_field_titre($arrayfields[$alias_product_perentity.'.accountancy_code_buy_export']['label'], $_SERVER["PHP_SELF"], $alias_product_perentity.".accountancy_code_buy_export", "", $param, '', $sortfield, $sortorder);
1430 1430
 	$totalarray['nbfield']++;
1431 1431
 }
1432 1432
 // Extra fields
@@ -1545,9 +1545,9 @@  discard block
 block discarded – undo
1545 1545
 
1546 1546
 	$object = $product_static;
1547 1547
 
1548
-	$usercancreadprice = getDolGlobalString('MAIN_USE_ADVANCED_PERMS')?$user->hasRight('product', 'product_advance', 'read_prices'):$user->hasRight('product', 'lire');
1548
+	$usercancreadprice = getDolGlobalString('MAIN_USE_ADVANCED_PERMS') ? $user->hasRight('product', 'product_advance', 'read_prices') : $user->hasRight('product', 'lire');
1549 1549
 	if ($product_static->isService()) {
1550
-		$usercancreadprice = getDolGlobalString('MAIN_USE_ADVANCED_PERMS')?$user->hasRight('service', 'service_advance', 'read_prices'):$user->hasRight('service', 'lire');
1550
+		$usercancreadprice = getDolGlobalString('MAIN_USE_ADVANCED_PERMS') ? $user->hasRight('service', 'service_advance', 'read_prices') : $user->hasRight('service', 'lire');
1551 1551
 	}
1552 1552
 
1553 1553
 	if ($mode == 'kanban') {
@@ -1628,7 +1628,7 @@  discard block
 block discarded – undo
1628 1628
 				}
1629 1629
 			}
1630 1630
 
1631
-			print '<td class="center">' . $product_thumbnail_html . '</td>';
1631
+			print '<td class="center">'.$product_thumbnail_html.'</td>';
1632 1632
 			if (!$i) {
1633 1633
 				$totalarray['nbfield']++;
1634 1634
 			}
@@ -1697,7 +1697,7 @@  discard block
 block discarded – undo
1697 1697
 				if (!empty($conf->cache['product'][$obj->fk_product_parent])) {
1698 1698
 					$product_parent_static = $conf->cache['product'][$obj->fk_product_parent];
1699 1699
 				} else {
1700
-					$product_parent_static= new Product($db);
1700
+					$product_parent_static = new Product($db);
1701 1701
 					$product_parent_static->fetch($obj->fk_product_parent);
1702 1702
 					$conf->cache['product'][$obj->fk_product_parent] = $product_parent_static;
1703 1703
 				}
@@ -1885,10 +1885,10 @@  discard block
 block discarded – undo
1885 1885
 
1886 1886
 		// Multiprices
1887 1887
 		if (!empty($conf->global->PRODUIT_MULTIPRICES)) {
1888
-			if (! isset($productpricescache)) {
1889
-				$productpricescache=array();
1888
+			if (!isset($productpricescache)) {
1889
+				$productpricescache = array();
1890 1890
 			}
1891
-			if (! isset($productpricescache[$obj->rowid])) {
1891
+			if (!isset($productpricescache[$obj->rowid])) {
1892 1892
 				$productpricescache[$obj->rowid] = array();
1893 1893
 			}
1894 1894
 
@@ -2086,38 +2086,38 @@  discard block
 block discarded – undo
2086 2086
 			}
2087 2087
 		}
2088 2088
 		// Accountancy code sell
2089
-		if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_sell']['checked'])) {
2089
+		if (!empty($arrayfields[$alias_product_perentity.'.accountancy_code_sell']['checked'])) {
2090 2090
 			print '<td>'.length_accountg($product_static->accountancy_code_sell).'</td>';
2091 2091
 			if (!$i) {
2092 2092
 				$totalarray['nbfield']++;
2093 2093
 			}
2094 2094
 		}
2095
-		if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_sell_intra']['checked'])) {
2095
+		if (!empty($arrayfields[$alias_product_perentity.'.accountancy_code_sell_intra']['checked'])) {
2096 2096
 			print '<td>'.length_accountg($product_static->accountancy_code_sell_intra).'</td>';
2097 2097
 			if (!$i) {
2098 2098
 				$totalarray['nbfield']++;
2099 2099
 			}
2100 2100
 		}
2101
-		if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_sell_export']['checked'])) {
2101
+		if (!empty($arrayfields[$alias_product_perentity.'.accountancy_code_sell_export']['checked'])) {
2102 2102
 			print '<td>'.length_accountg($product_static->accountancy_code_sell_export).'</td>';
2103 2103
 			if (!$i) {
2104 2104
 				$totalarray['nbfield']++;
2105 2105
 			}
2106 2106
 		}
2107 2107
 		// Accountancy code buy
2108
-		if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_buy']['checked'])) {
2108
+		if (!empty($arrayfields[$alias_product_perentity.'.accountancy_code_buy']['checked'])) {
2109 2109
 			print '<td>'.length_accountg($product_static->accountancy_code_buy).'</td>';
2110 2110
 			if (!$i) {
2111 2111
 				$totalarray['nbfield']++;
2112 2112
 			}
2113 2113
 		}
2114
-		if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_buy_intra']['checked'])) {
2114
+		if (!empty($arrayfields[$alias_product_perentity.'.accountancy_code_buy_intra']['checked'])) {
2115 2115
 			print '<td>'.length_accountg($product_static->accountancy_code_buy_intra).'</td>';
2116 2116
 			if (!$i) {
2117 2117
 				$totalarray['nbfield']++;
2118 2118
 			}
2119 2119
 		}
2120
-		if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_buy_export']['checked'])) {
2120
+		if (!empty($arrayfields[$alias_product_perentity.'.accountancy_code_buy_export']['checked'])) {
2121 2121
 			print '<td>'.length_accountg($product_static->accountancy_code_buy_export).'</td>';
2122 2122
 			if (!$i) {
2123 2123
 				$totalarray['nbfield']++;
Please login to merge, or discard this patch.
htdocs/opensurvey/class/opensurveysondage.class.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
 	/**
106 106
 	 * @var array  Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
107 107
 	 */
108
-	public $fields=array(
108
+	public $fields = array(
109 109
 		'id_sondage' => array('type'=>'varchar(16)', 'label'=>'Idsondage', 'enabled'=>'1', 'position'=>10, 'notnull'=>1, 'visible'=>-1,),
110 110
 		'commentaires' => array('type'=>'mediumtext', 'label'=>'Commentaires', 'enabled'=>'1', 'position'=>15, 'notnull'=>0, 'visible'=>-1,),
111 111
 		'mail_admin' => array('type'=>'varchar(128)', 'label'=>'Mailadmin', 'enabled'=>'1', 'position'=>20, 'notnull'=>0, 'visible'=>-1,),
@@ -527,7 +527,7 @@  discard block
 block discarded – undo
527 527
 				$label = $langs->trans("ShowMyObject");
528 528
 				$linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"';
529 529
 			}
530
-			$linkclose .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' :  ' title="tocomplete"');
530
+			$linkclose .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' : ' title="tocomplete"');
531 531
 			$linkclose .= $dataparams.' class="'.$classfortooltip.($morecss ? ' '.$morecss : '').'"';
532 532
 		} else {
533 533
 			$linkclose = ($morecss ? ' class="'.$morecss.'"' : '');
Please login to merge, or discard this patch.
htdocs/commande/card.php 1 patch
Spacing   +65 added lines, -65 removed lines patch added patch discarded remove patch
@@ -79,18 +79,18 @@  discard block
 block discarded – undo
79 79
 
80 80
 
81 81
 $id        = (GETPOST('id', 'int') ? GETPOST('id', 'int') : GETPOST('orderid', 'int'));
82
-$ref       =  GETPOST('ref', 'alpha');
83
-$socid     =  GETPOST('socid', 'int');
84
-$action    =  GETPOST('action', 'aZ09');
85
-$cancel    =  GETPOST('cancel', 'alpha');
86
-$confirm   =  GETPOST('confirm', 'alpha');
82
+$ref       = GETPOST('ref', 'alpha');
83
+$socid     = GETPOST('socid', 'int');
84
+$action    = GETPOST('action', 'aZ09');
85
+$cancel    = GETPOST('cancel', 'alpha');
86
+$confirm   = GETPOST('confirm', 'alpha');
87 87
 $backtopage = GETPOST('backtopage', 'alpha');
88 88
 
89
-$lineid    =  GETPOST('lineid', 'int');
90
-$contactid =  GETPOST('contactid', 'int');
91
-$projectid =  GETPOST('projectid', 'int');
92
-$origin    =  GETPOST('origin', 'alpha');
93
-$originid  = (GETPOST('originid', 'int') ? GETPOST('originid', 'int') : GETPOST('origin_id', 'int'));    // For backward compatibility
89
+$lineid    = GETPOST('lineid', 'int');
90
+$contactid = GETPOST('contactid', 'int');
91
+$projectid = GETPOST('projectid', 'int');
92
+$origin    = GETPOST('origin', 'alpha');
93
+$originid  = (GETPOST('originid', 'int') ? GETPOST('originid', 'int') : GETPOST('origin_id', 'int')); // For backward compatibility
94 94
 $rank      = (GETPOST('rank', 'int') > 0) ? GETPOST('rank', 'int') : -1;
95 95
 
96 96
 // PDF
@@ -115,26 +115,26 @@  discard block
 block discarded – undo
115 115
 $extrafields->fetch_name_optionals_label($object->table_element);
116 116
 
117 117
 // Load object
118
-include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php';     // Must be include, not include_once
118
+include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once
119 119
 
120 120
 // Permissions / Rights
121
-$usercanread    =  $user->hasRight("commande", "lire");
122
-$usercancreate  =  $user->hasRight("commande", "creer");
123
-$usercandelete  =  $user->hasRight("commande", "supprimer");
121
+$usercanread    = $user->hasRight("commande", "lire");
122
+$usercancreate  = $user->hasRight("commande", "creer");
123
+$usercandelete  = $user->hasRight("commande", "supprimer");
124 124
 
125 125
 // Advanced permissions
126
-$usercanclose       =  ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($usercancreate)) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('commande', 'order_advance', 'close')));
127
-$usercanvalidate    =  ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $usercancreate) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('commande', 'order_advance', 'validate')));
128
-$usercancancel      =  ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $usercancreate) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('commande', 'order_advance', 'annuler')));
129
-$usercansend        =   (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->hasRight('commande', 'order_advance', 'send'));
130
-$usercangeneretedoc =   (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->hasRight('commande', 'order_advance', 'generetedoc'));
126
+$usercanclose       = ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($usercancreate)) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('commande', 'order_advance', 'close')));
127
+$usercanvalidate    = ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $usercancreate) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('commande', 'order_advance', 'validate')));
128
+$usercancancel      = ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $usercancreate) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('commande', 'order_advance', 'annuler')));
129
+$usercansend        = (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->hasRight('commande', 'order_advance', 'send'));
130
+$usercangeneretedoc = (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->hasRight('commande', 'order_advance', 'generetedoc'));
131 131
 
132 132
 $usermustrespectpricemin    = ((!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->produit->ignore_price_min_advance)) || empty($conf->global->MAIN_USE_ADVANCED_PERMS));
133 133
 $usercancreatepurchaseorder = ($user->hasRight('fournisseur', 'commande', 'creer') || $user->hasRight('supplier_order', 'creer'));
134 134
 
135
-$permissionnote    = $usercancreate;     //  Used by the include of actions_setnotes.inc.php
136
-$permissiondellink = $usercancreate;     //  Used by the include of actions_dellink.inc.php
137
-$permissiontoadd   = $usercancreate;     //  Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
135
+$permissionnote    = $usercancreate; //  Used by the include of actions_setnotes.inc.php
136
+$permissiondellink = $usercancreate; //  Used by the include of actions_dellink.inc.php
137
+$permissiontoadd   = $usercancreate; //  Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
138 138
 
139 139
 
140 140
 $error = 0;
@@ -177,11 +177,11 @@  discard block
 block discarded – undo
177 177
 		$action = '';
178 178
 	}
179 179
 
180
-	include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php';    // Must be include, not include_once
180
+	include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once
181 181
 
182
-	include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php';     // Must be include, not include_once
182
+	include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; // Must be include, not include_once
183 183
 
184
-	include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php';  // Must be include, not include_once
184
+	include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php'; // Must be include, not include_once
185 185
 
186 186
 	// Action clone object
187 187
 	if ($action == 'confirm_clone' && $confirm == 'yes' && $usercancreate) {
@@ -666,7 +666,7 @@  discard block
 block discarded – undo
666 666
 		$pu_ht = '';
667 667
 		$pu_ttc = '';
668 668
 		$pu_ht_devise = '';
669
-		$pu_ttc_devise  = '';
669
+		$pu_ttc_devise = '';
670 670
 
671 671
 		if (GETPOST('price_ht') !== '') {
672 672
 			$price_ht = price2num(GETPOST('price_ht'), 'MU', 2);
@@ -808,8 +808,8 @@  discard block
 block discarded – undo
808 808
 						if (count($prodcustprice->lines) > 0) {
809 809
 							$pu_ht = price($prodcustprice->lines[0]->price);
810 810
 							$pu_ttc = price($prodcustprice->lines[0]->price_ttc);
811
-							$price_min =  price($prodcustprice->lines[0]->price_min);
812
-							$price_min_ttc =  price($prodcustprice->lines[0]->price_min_ttc);
811
+							$price_min = price($prodcustprice->lines[0]->price_min);
812
+							$price_min_ttc = price($prodcustprice->lines[0]->price_min_ttc);
813 813
 							$price_base_type = $prodcustprice->lines[0]->price_base_type;
814 814
 							$tva_tx = $prodcustprice->lines[0]->tva_tx;
815 815
 							if ($prodcustprice->lines[0]->default_vat_code && !preg_match('/\(.*\)/', $tva_tx)) {
@@ -908,8 +908,8 @@  discard block
 block discarded – undo
908 908
 				}
909 909
 
910 910
 				//If text set in desc is the same as product descpription (as now it's preloaded) whe add it only one time
911
-				if ($product_desc==$desc && !empty($conf->global->PRODUIT_AUTOFILL_DESC)) {
912
-					$product_desc='';
911
+				if ($product_desc == $desc && !empty($conf->global->PRODUIT_AUTOFILL_DESC)) {
912
+					$product_desc = '';
913 913
 				}
914 914
 
915 915
 				if (!empty($product_desc) && !empty($conf->global->MAIN_NO_CONCAT_DESCRIPTION)) {
@@ -1305,7 +1305,7 @@  discard block
 block discarded – undo
1305 1305
 					GETPOST('generate_deposit', 'alpha') == 'on' && !empty($deposit_percent_from_payment_terms)
1306 1306
 					&& isModEnabled('facture') && !empty($user->rights->facture->creer)
1307 1307
 				) {
1308
-					require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
1308
+					require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
1309 1309
 
1310 1310
 					$date = dol_mktime(0, 0, 0, GETPOST('datefmonth', 'int'), GETPOST('datefday', 'int'), GETPOST('datefyear', 'int'));
1311 1311
 					$forceFields = array();
@@ -1318,7 +1318,7 @@  discard block
 block discarded – undo
1318 1318
 
1319 1319
 					if ($deposit) {
1320 1320
 						setEventMessage('DepositGenerated');
1321
-						$locationTarget = DOL_URL_ROOT . '/compta/facture/card.php?id=' . $deposit->id;
1321
+						$locationTarget = DOL_URL_ROOT.'/compta/facture/card.php?id='.$deposit->id;
1322 1322
 					} else {
1323 1323
 						$error++;
1324 1324
 						setEventMessages($object->error, $object->errors, 'errors');
@@ -1326,7 +1326,7 @@  discard block
 block discarded – undo
1326 1326
 				}
1327 1327
 
1328 1328
 				// Define output language
1329
-				if (! $error) {
1329
+				if (!$error) {
1330 1330
 					$db->commit();
1331 1331
 
1332 1332
 					if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) {
@@ -1354,7 +1354,7 @@  discard block
 block discarded – undo
1354 1354
 					}
1355 1355
 
1356 1356
 					if ($locationTarget) {
1357
-						header('Location: ' . $locationTarget);
1357
+						header('Location: '.$locationTarget);
1358 1358
 						exit;
1359 1359
 					}
1360 1360
 				} else {
@@ -1547,7 +1547,7 @@  discard block
 block discarded – undo
1547 1547
 	include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php';
1548 1548
 
1549 1549
 	// Actions to build doc
1550
-	$upload_dir = !empty($conf->commande->multidir_output[$object->entity])?$conf->commande->multidir_output[$object->entity]:$conf->commande->dir_output;
1550
+	$upload_dir = !empty($conf->commande->multidir_output[$object->entity]) ? $conf->commande->multidir_output[$object->entity] : $conf->commande->dir_output;
1551 1551
 	$permissiontoadd = $usercancreate;
1552 1552
 	include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php';
1553 1553
 
@@ -1780,7 +1780,7 @@  discard block
 block discarded – undo
1780 1780
 	print '<form name="crea_commande" action="'.$_SERVER["PHP_SELF"].'" method="POST">';
1781 1781
 	print '<input type="hidden" name="token" value="'.newToken().'">';
1782 1782
 	print '<input type="hidden" name="action" value="add">';
1783
-	print '<input type="hidden" name="changecompany" value="0">';	// will be set to 1 by javascript so we know post is done after a company change
1783
+	print '<input type="hidden" name="changecompany" value="0">'; // will be set to 1 by javascript so we know post is done after a company change
1784 1784
 	print '<input type="hidden" name="remise_percent" value="'.$soc->remise_percent.'">';
1785 1785
 	print '<input type="hidden" name="origin" value="'.$origin.'">';
1786 1786
 	print '<input type="hidden" name="originid" value="'.$originid.'">';
@@ -1842,7 +1842,7 @@  discard block
 block discarded – undo
1842 1842
 		// Contacts (ask contact only if thirdparty already defined).
1843 1843
 		print "<tr><td>".$langs->trans("DefaultContact").'</td><td>';
1844 1844
 		print img_picto('', 'contact', 'class="pictofixedwidth"');
1845
-		print $form->selectcontacts($soc->id, $contactid, 'contactid', 1, !empty($srccontactslist)?$srccontactslist:"", '', 1, 'maxwidth200 widthcentpercentminusx');
1845
+		print $form->selectcontacts($soc->id, $contactid, 'contactid', 1, !empty($srccontactslist) ? $srccontactslist : "", '', 1, 'maxwidth200 widthcentpercentminusx');
1846 1846
 		print '</td></tr>';
1847 1847
 
1848 1848
 		// Ligne info remises tiers
@@ -1911,14 +1911,14 @@  discard block
 block discarded – undo
1911 1911
 		require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
1912 1912
 		$formproduct = new FormProduct($db);
1913 1913
 		print '<tr><td>'.$langs->trans('Warehouse').'</td><td>';
1914
-		print img_picto('', 'stock', 'class="pictofixedwidth"').$formproduct->selectWarehouses((GETPOSTISSET('warehouse_id')?GETPOST('warehouse_id'):$warehouse_id), 'warehouse_id', '', 1, 0, 0, '', 0, 0, array(), 'maxwidth500 widthcentpercentminusxx');
1914
+		print img_picto('', 'stock', 'class="pictofixedwidth"').$formproduct->selectWarehouses((GETPOSTISSET('warehouse_id') ?GETPOST('warehouse_id') : $warehouse_id), 'warehouse_id', '', 1, 0, 0, '', 0, 0, array(), 'maxwidth500 widthcentpercentminusxx');
1915 1915
 		print '</td></tr>';
1916 1916
 	}
1917 1917
 
1918 1918
 	// Source / Channel - What trigger creation
1919 1919
 	print '<tr><td>'.$langs->trans('Channel').'</td><td>';
1920 1920
 	print img_picto('', 'question', 'class="pictofixedwidth"');
1921
-	$form->selectInputReason((GETPOSTISSET('demand_reason_id')?GETPOST('demand_reason_id'):$demand_reason_id), 'demand_reason_id', '', 1, 'maxwidth200 widthcentpercentminusx');
1921
+	$form->selectInputReason((GETPOSTISSET('demand_reason_id') ?GETPOST('demand_reason_id') : $demand_reason_id), 'demand_reason_id', '', 1, 'maxwidth200 widthcentpercentminusx');
1922 1922
 	print '</td></tr>';
1923 1923
 
1924 1924
 	// TODO How record was recorded OrderMode (llx_c_input_method)
@@ -1928,7 +1928,7 @@  discard block
 block discarded – undo
1928 1928
 		$langs->load("projects");
1929 1929
 		print '<tr>';
1930 1930
 		print '<td>'.$langs->trans("Project").'</td><td>';
1931
-		print img_picto('', 'project', 'class="pictofixedwidth"').$formproject->select_projects(($soc->id > 0 ? $soc->id : -1), (GETPOSTISSET('projectid')?GETPOST('projectid'):$projectid), 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 1, 0, 'maxwidth500 widthcentpercentminusxx');
1931
+		print img_picto('', 'project', 'class="pictofixedwidth"').$formproject->select_projects(($soc->id > 0 ? $soc->id : -1), (GETPOSTISSET('projectid') ?GETPOST('projectid') : $projectid), 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 1, 0, 'maxwidth500 widthcentpercentminusxx');
1932 1932
 		print ' <a href="'.DOL_URL_ROOT.'/projet/card.php?socid='.$soc->id.'&action=create&status=1&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create&socid='.$soc->id).'"><span class="fa fa-plus-circle valignmiddle" title="'.$langs->trans("AddProject").'"></span></a>';
1933 1933
 		print '</td>';
1934 1934
 		print '</tr>';
@@ -1953,7 +1953,7 @@  discard block
 block discarded – undo
1953 1953
 	// Other attributes
1954 1954
 	$parameters = array();
1955 1955
 	if (!empty($origin) && !empty($originid) && is_object($objectsrc)) {
1956
-		$parameters['objectsrc'] =  $objectsrc;
1956
+		$parameters['objectsrc'] = $objectsrc;
1957 1957
 	}
1958 1958
 	$parameters['socid'] = $socid;
1959 1959
 
@@ -1988,7 +1988,7 @@  discard block
 block discarded – undo
1988 1988
 		print '<tr>';
1989 1989
 		print '<td>'.$form->editfieldkey("Currency", 'multicurrency_code', '', $object, 0).'</td>';
1990 1990
 		print '<td class="maxwidthonsmartphone">';
1991
-		print img_picto('', 'currency', 'class="pictofixedwidth"').$form->selectMultiCurrency((GETPOSTISSET('multicurrency_code')?GETPOST('multicurrency_code'):$currency_code), 'multicurrency_code', 0, '', false, 'maxwidth200 widthcentpercentminusx');
1991
+		print img_picto('', 'currency', 'class="pictofixedwidth"').$form->selectMultiCurrency((GETPOSTISSET('multicurrency_code') ?GETPOST('multicurrency_code') : $currency_code), 'multicurrency_code', 0, '', false, 'maxwidth200 widthcentpercentminusx');
1992 1992
 		print '</td></tr>';
1993 1993
 	}
1994 1994
 
@@ -2169,14 +2169,14 @@  discard block
 block discarded – undo
2169 2169
 			$nbMandated = 0;
2170 2170
 			foreach ($object->lines as $line) {
2171 2171
 				$res = $line->fetch_product();
2172
-				if ($res  > 0  ) {
2173
-					if ($line->product->isService() && $line->product->isMandatoryPeriod() && (empty($line->date_start) || empty($line->date_end) )) {
2172
+				if ($res > 0) {
2173
+					if ($line->product->isService() && $line->product->isMandatoryPeriod() && (empty($line->date_start) || empty($line->date_end))) {
2174 2174
 						$nbMandated++;
2175 2175
 						break;
2176 2176
 					}
2177 2177
 				}
2178 2178
 			}
2179
-			if ($nbMandated > 0 ) $text .= '<div><span class="clearboth nowraponall warning">'.$langs->trans("mandatoryPeriodNeedTobeSetMsgValidate").'</span></div>';
2179
+			if ($nbMandated > 0) $text .= '<div><span class="clearboth nowraponall warning">'.$langs->trans("mandatoryPeriodNeedTobeSetMsgValidate").'</span></div>';
2180 2180
 
2181 2181
 			if (getDolGlobalInt('SALE_ORDER_SUGGEST_DOWN_PAYMENT_INVOICE_CREATION')) {
2182 2182
 				// This is a hidden option:
@@ -2186,7 +2186,7 @@  discard block
 block discarded – undo
2186 2186
 				$deposit_percent_from_payment_terms = getDictionaryValue('c_payment_term', 'deposit_percent', $object->cond_reglement_id);
2187 2187
 
2188 2188
 				if (!empty($deposit_percent_from_payment_terms) && isModEnabled('facture') && !empty($user->rights->facture->creer)) {
2189
-					require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
2189
+					require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
2190 2190
 
2191 2191
 					$object->fetchObjectLinked();
2192 2192
 
@@ -2716,55 +2716,55 @@  discard block
 block discarded – undo
2716 2716
 
2717 2717
 		$alert = '';
2718 2718
 		if (!empty($conf->global->ORDER_MANAGE_MIN_AMOUNT) && $object->total_ht < $object->thirdparty->order_min_amount) {
2719
-			$alert = ' ' . img_warning($langs->trans('OrderMinAmount') . ': ' . price($object->thirdparty->order_min_amount));
2719
+			$alert = ' '.img_warning($langs->trans('OrderMinAmount').': '.price($object->thirdparty->order_min_amount));
2720 2720
 		}
2721 2721
 
2722 2722
 		print '<tr>';
2723
-		print '<td class="titlefieldmiddle">' . $langs->trans('AmountHT') . '</td>';
2724
-		print '<td class="nowrap amountcard right">' . price($object->total_ht, '', $langs, 0, -1, -1, $conf->currency) . '</td>';
2723
+		print '<td class="titlefieldmiddle">'.$langs->trans('AmountHT').'</td>';
2724
+		print '<td class="nowrap amountcard right">'.price($object->total_ht, '', $langs, 0, -1, -1, $conf->currency).'</td>';
2725 2725
 		if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
2726 2726
 			// Multicurrency Amount HT
2727
-			print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_ht, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
2727
+			print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_ht, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
2728 2728
 		}
2729 2729
 		print '</tr>';
2730 2730
 
2731 2731
 		print '<tr>';
2732
-		print '<td class="titlefieldmiddle">' . $langs->trans('AmountVAT') . '</td>';
2733
-		print '<td class="nowrap amountcard right">' . price($object->total_tva, '', $langs, 0, -1, -1, $conf->currency) . '</td>';
2732
+		print '<td class="titlefieldmiddle">'.$langs->trans('AmountVAT').'</td>';
2733
+		print '<td class="nowrap amountcard right">'.price($object->total_tva, '', $langs, 0, -1, -1, $conf->currency).'</td>';
2734 2734
 		if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
2735 2735
 			// Multicurrency Amount VAT
2736
-			print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_tva, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
2736
+			print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_tva, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
2737 2737
 		}
2738 2738
 		print '</tr>';
2739 2739
 
2740 2740
 		// Amount Local Taxes
2741 2741
 		if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0) {
2742 2742
 			print '<tr>';
2743
-			print '<td class="titlefieldmiddle">' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '</td>';
2744
-			print '<td class="nowrap amountcard right">' . price($object->total_localtax1, '', $langs, 0, -1, -1, $conf->currency) . '</td>';
2743
+			print '<td class="titlefieldmiddle">'.$langs->transcountry("AmountLT1", $mysoc->country_code).'</td>';
2744
+			print '<td class="nowrap amountcard right">'.price($object->total_localtax1, '', $langs, 0, -1, -1, $conf->currency).'</td>';
2745 2745
 			if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
2746
-				print '<td class="nowrap amountcard right">' . price($object->total_localtax1, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
2746
+				print '<td class="nowrap amountcard right">'.price($object->total_localtax1, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
2747 2747
 			}
2748 2748
 			print '</tr>';
2749 2749
 
2750 2750
 			// Amount Local Taxes
2751 2751
 			if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0) {
2752 2752
 				print '<tr>';
2753
-				print '<td>' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '</td>';
2754
-				print '<td class="nowrap amountcard right">' . price($object->total_localtax2, '', $langs, 0, -1, -1, $conf->currency) . '</td>';
2753
+				print '<td>'.$langs->transcountry("AmountLT2", $mysoc->country_code).'</td>';
2754
+				print '<td class="nowrap amountcard right">'.price($object->total_localtax2, '', $langs, 0, -1, -1, $conf->currency).'</td>';
2755 2755
 				if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
2756
-					print '<td class="nowrap amountcard right">' . price($object->total_localtax2, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
2756
+					print '<td class="nowrap amountcard right">'.price($object->total_localtax2, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
2757 2757
 				}
2758 2758
 				print '</tr>';
2759 2759
 			}
2760 2760
 		}
2761 2761
 
2762 2762
 		print '<tr>';
2763
-		print '<td>' . $langs->trans('AmountTTC') . '</td>';
2764
-		print '<td class="valuefield nowrap right amountcard">' . price($object->total_ttc, 1, '', 1, -1, -1, $conf->currency) . '</td>';
2763
+		print '<td>'.$langs->trans('AmountTTC').'</td>';
2764
+		print '<td class="valuefield nowrap right amountcard">'.price($object->total_ttc, 1, '', 1, -1, -1, $conf->currency).'</td>';
2765 2765
 		if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
2766 2766
 			// Multicurrency Amount TTC
2767
-			print '<td class="valuefield nowrap right amountcard">' . price($object->multicurrency_total_ttc, 1, '', 1, -1, -1, $object->multicurrency_code) . '</td>';
2767
+			print '<td class="valuefield nowrap right amountcard">'.price($object->multicurrency_total_ttc, 1, '', 1, -1, -1, $object->multicurrency_code).'</td>';
2768 2768
 		}
2769 2769
 		print '</tr>'."\n";
2770 2770
 
@@ -2874,7 +2874,7 @@  discard block
 block discarded – undo
2874 2874
 						if ($usercansend) {
2875 2875
 							print dolGetButtonAction('', $langs->trans('SendMail'), 'email', $_SERVER["PHP_SELF"].'?action=presend&token='.newToken().'&id='.$object->id.'&mode=init#formmailbeforetitle', '');
2876 2876
 						} else {
2877
-							print dolGetButtonAction('', $langs->trans('SendMail'), 'email', $_SERVER['PHP_SELF']. '#', '', false);
2877
+							print dolGetButtonAction('', $langs->trans('SendMail'), 'email', $_SERVER['PHP_SELF'].'#', '', false);
2878 2878
 						}
2879 2879
 					}
2880 2880
 				}
@@ -2939,7 +2939,7 @@  discard block
 block discarded – undo
2939 2939
 						}*/
2940 2940
 					} else {
2941 2941
 						$langs->load("errors");
2942
-						print dolGetButtonAction($langs->trans('ErrorModuleSetupNotComplete'), $langs->trans('CreateShipment'), 'default', $_SERVER['PHP_SELF']. '#', '', false);
2942
+						print dolGetButtonAction($langs->trans('ErrorModuleSetupNotComplete'), $langs->trans('CreateShipment'), 'default', $_SERVER['PHP_SELF'].'#', '', false);
2943 2943
 					}
2944 2944
 				}
2945 2945
 
@@ -2987,7 +2987,7 @@  discard block
 block discarded – undo
2987 2987
 					if ($numshipping == 0) {
2988 2988
 						print dolGetButtonAction('', $langs->trans('Delete'), 'delete', $_SERVER["PHP_SELF"].'?action=delete&token='.newToken().'&id='.$object->id, '');
2989 2989
 					} else {
2990
-						print dolGetButtonAction($langs->trans('ShippingExist'), $langs->trans('Delete'), 'default', $_SERVER['PHP_SELF']. '#', '', false);
2990
+						print dolGetButtonAction($langs->trans('ShippingExist'), $langs->trans('Delete'), 'default', $_SERVER['PHP_SELF'].'#', '', false);
2991 2991
 					}
2992 2992
 				}
2993 2993
 			}
Please login to merge, or discard this patch.
htdocs/commande/class/commande.class.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -400,8 +400,8 @@  discard block
 block discarded – undo
400 400
 	/**
401 401
 	 * Shipment on process
402 402
 	 */
403
-	const STATUS_SHIPMENTONPROCESS = 2;		// We set this status when a shipment is validated
404
-	const STATUS_ACCEPTED = 2; 				// For backward compatibility. Use key STATUS_SHIPMENTONPROCESS instead.
403
+	const STATUS_SHIPMENTONPROCESS = 2; // We set this status when a shipment is validated
404
+	const STATUS_ACCEPTED = 2; // For backward compatibility. Use key STATUS_SHIPMENTONPROCESS instead.
405 405
 
406 406
 	/**
407 407
 	 * Closed (Sent, billed or not)
@@ -609,7 +609,7 @@  discard block
 block discarded – undo
609 609
 		// Set new ref and current status
610 610
 		if (!$error) {
611 611
 			$this->ref = $num;
612
-			$this->statut = self::STATUS_VALIDATED;	// deprecated
612
+			$this->statut = self::STATUS_VALIDATED; // deprecated
613 613
 			$this->status = self::STATUS_VALIDATED;
614 614
 		}
615 615
 
@@ -989,7 +989,7 @@  discard block
 block discarded – undo
989 989
 		$sql .= ", ".(!empty($this->shipping_method_id) && $this->shipping_method_id > 0 ? ((int) $this->shipping_method_id) : 'NULL');
990 990
 		$sql .= ", ".(!empty($this->warehouse_id) && $this->warehouse_id > 0 ? ((int) $this->warehouse_id) : 'NULL');
991 991
 		$sql .= ", ".($this->remise_absolue > 0 ? $this->db->escape($this->remise_absolue) : 'NULL');
992
-		$sql .= ", ".($this->remise_percent > 0 ? $this->db->escape($this->remise_percent) : 0);		// TODO deprecated
992
+		$sql .= ", ".($this->remise_percent > 0 ? $this->db->escape($this->remise_percent) : 0); // TODO deprecated
993 993
 		$sql .= ", ".(int) $this->fk_incoterms;
994 994
 		$sql .= ", '".$this->db->escape($this->location_incoterms)."'";
995 995
 		$sql .= ", ".setEntity($this);
@@ -1233,7 +1233,7 @@  discard block
 block discarded – undo
1233 1233
 			if ($objsoc->fetch($socid) > 0) {
1234 1234
 				$this->socid = $objsoc->id;
1235 1235
 				$this->cond_reglement_id	= (!empty($objsoc->cond_reglement_id) ? $objsoc->cond_reglement_id : 0);
1236
-				$this->deposit_percent		= (!empty($objsoc->deposit_percent) ? $objsoc->deposit_percent : null);
1236
+				$this->deposit_percent = (!empty($objsoc->deposit_percent) ? $objsoc->deposit_percent : null);
1237 1237
 				$this->mode_reglement_id	= (!empty($objsoc->mode_reglement_id) ? $objsoc->mode_reglement_id : 0);
1238 1238
 				$this->fk_project = 0;
1239 1239
 				$this->fk_delivery_address = 0;
@@ -1248,7 +1248,7 @@  discard block
 block discarded – undo
1248 1248
 
1249 1249
 		// Clear fields
1250 1250
 		$this->user_author_id     = $user->id;
1251
-		$this->user_valid         = 0;		// deprecated
1251
+		$this->user_valid         = 0; // deprecated
1252 1252
 		$this->user_validation_id = 0;
1253 1253
 		$this->date = dol_now();
1254 1254
 		$this->date_commande = dol_now();
@@ -1358,7 +1358,7 @@  discard block
 block discarded – undo
1358 1358
 			$line->fk_parent_line    = $object->lines[$i]->fk_parent_line;
1359 1359
 			$line->fk_unit = $object->lines[$i]->fk_unit;
1360 1360
 
1361
-			$line->date_start 		= $object->lines[$i]->date_start;
1361
+			$line->date_start = $object->lines[$i]->date_start;
1362 1362
 			$line->date_end    		= $object->lines[$i]->date_end;
1363 1363
 
1364 1364
 			$line->fk_fournprice	= $object->lines[$i]->fk_fournprice;
@@ -1927,7 +1927,7 @@  discard block
 block discarded – undo
1927 1927
 				$this->user_author_id = $obj->fk_user_author;
1928 1928
 				$this->user_creation_id = $obj->fk_user_author;
1929 1929
 				$this->user_validation_id = $obj->fk_user_valid;
1930
-				$this->user_valid = $obj->fk_user_valid;			// deprecated
1930
+				$this->user_valid = $obj->fk_user_valid; // deprecated
1931 1931
 				$this->user_modification_id = $obj->fk_user_modif;
1932 1932
 				$this->user_modification    = $obj->fk_user_modif;
1933 1933
 				$this->total_ht				= $obj->total_ht;
@@ -1941,7 +1941,7 @@  discard block
 block discarded – undo
1941 1941
 				$this->date_validation = $this->db->jdate($obj->date_valid);
1942 1942
 				$this->date_modification = $this->db->jdate($obj->tms);
1943 1943
 				$this->remise				= $obj->remise;
1944
-				$this->remise_percent		= $obj->remise_percent;	// TODO deprecated
1944
+				$this->remise_percent		= $obj->remise_percent; // TODO deprecated
1945 1945
 				$this->remise_absolue		= $obj->remise_absolue;
1946 1946
 				$this->source				= $obj->source;
1947 1947
 				$this->billed				= $obj->billed;
@@ -3594,15 +3594,15 @@  discard block
 block discarded – undo
3594 3594
 		//$sql.= " AND c.fk_statut IN (1,2,3) AND c.facture = 0";
3595 3595
 		if ($mode == 'toship') {
3596 3596
 			// An order to ship is an open order (validated or in progress)
3597
-			$sql .= " AND c.fk_statut IN (" . self::STATUS_VALIDATED . "," . self::STATUS_SHIPMENTONPROCESS . ")";
3597
+			$sql .= " AND c.fk_statut IN (".self::STATUS_VALIDATED.",".self::STATUS_SHIPMENTONPROCESS.")";
3598 3598
 		}
3599 3599
 		if ($mode == 'tobill') {
3600 3600
 			// An order to bill is an order not already billed
3601
-			$sql .= " AND c.fk_statut IN (" . self::STATUS_VALIDATED . "," . self::STATUS_SHIPMENTONPROCESS . ", " . self::STATUS_CLOSED . ") AND c.facture = 0";
3601
+			$sql .= " AND c.fk_statut IN (".self::STATUS_VALIDATED.",".self::STATUS_SHIPMENTONPROCESS.", ".self::STATUS_CLOSED.") AND c.facture = 0";
3602 3602
 		}
3603 3603
 		if ($mode == 'shippedtobill') {
3604 3604
 			// An order shipped and to bill is a delivered order not already billed
3605
-			$sql .= " AND c.fk_statut IN (" . self::STATUS_CLOSED . ") AND c.facture = 0";
3605
+			$sql .= " AND c.fk_statut IN (".self::STATUS_CLOSED.") AND c.facture = 0";
3606 3606
 		}
3607 3607
 		if ($user->socid) {
3608 3608
 			$sql .= " AND c.fk_soc = ".((int) $user->socid);
@@ -3887,7 +3887,7 @@  discard block
 block discarded – undo
3887 3887
 				$label = $langs->trans("Order");
3888 3888
 				$linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"';
3889 3889
 			}
3890
-			$linkclose .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' :  ' title="tocomplete"');
3890
+			$linkclose .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' : ' title="tocomplete"');
3891 3891
 			$linkclose .= $dataparams.' class="'.$classfortooltip.'"';
3892 3892
 
3893 3893
 			$target_value = array('_self', '_blank', '_parent', '_top');
@@ -3929,7 +3929,7 @@  discard block
 block discarded – undo
3929 3929
 		}
3930 3930
 
3931 3931
 		global $action;
3932
-		$hookmanager->initHooks(array($this->element . 'dao'));
3932
+		$hookmanager->initHooks(array($this->element.'dao'));
3933 3933
 		$parameters = array('id'=>$this->id, 'getnomurl' => &$result);
3934 3934
 		$reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
3935 3935
 		if ($reshook > 0) {
@@ -4332,7 +4332,7 @@  discard block
 block discarded – undo
4332 4332
 			$objp = $this->db->fetch_object($result);
4333 4333
 
4334 4334
 			if (!$objp) {
4335
-				$this->error = 'OrderLine with id '. $rowid .' not found sql='.$sql;
4335
+				$this->error = 'OrderLine with id '.$rowid.' not found sql='.$sql;
4336 4336
 				return 0;
4337 4337
 			}
4338 4338
 
Please login to merge, or discard this patch.
htdocs/core/menus/standard/eldy.lib.php 1 patch
Spacing   +364 added lines, -364 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 	// Members
97 97
 	$tmpentry = array(
98 98
 		'enabled' => isModEnabled('adherent'),
99
-		'perms' => $user->hasRight('adherent',  'lire'),
99
+		'perms' => $user->hasRight('adherent', 'lire'),
100 100
 		'module' => 'adherent'
101 101
 	);
102 102
 	$menu_arr[] = array(
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 			)
126 126
 			|| (isModEnabled('supplier_proposal') || isModEnabled('supplier_order') || isModEnabled('supplier_invoice'))
127 127
 			),
128
-		'perms'=> ($user->hasRight('societe',  'lire') || $user->hasRight('fournisseur',  'lire') || $user->hasRight('supplier_order',  'lire') || $user->hasRight('supplier_invoice',  'lire') || $user->hasRight('supplier_proposal',  'lire')),
128
+		'perms'=> ($user->hasRight('societe', 'lire') || $user->hasRight('fournisseur', 'lire') || $user->hasRight('supplier_order', 'lire') || $user->hasRight('supplier_invoice', 'lire') || $user->hasRight('supplier_proposal', 'lire')),
129 129
 		'module'=>'societe|fournisseur'
130 130
 	);
131 131
 	$menu_arr[] = array(
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 	// Products-Services
151 151
 	$tmpentry = array(
152 152
 		'enabled'=> (isModEnabled('product') || isModEnabled('service') || isModEnabled('expedition')),
153
-		'perms'=> ($user->hasRight('product',  'read') || $user->hasRight('service',  'read') || $user->hasRight('expedition',  'lire')),
153
+		'perms'=> ($user->hasRight('product', 'read') || $user->hasRight('service', 'read') || $user->hasRight('expedition', 'lire')),
154 154
 		'module'=>'product|service'
155 155
 	);
156 156
 	$menu_arr[] = array(
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
 	// MRP - GPAO
178 178
 	$tmpentry = array(
179 179
 		'enabled'=>(isModEnabled('bom') || isModEnabled('mrp')),
180
-		'perms'=>($user->hasRight('bom',  'read') || $user->hasRight('mrp',  'read')),
180
+		'perms'=>($user->hasRight('bom', 'read') || $user->hasRight('mrp', 'read')),
181 181
 		'module'=>'bom|mrp'
182 182
 	);
183 183
 	$menu_arr[] = array(
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
 	// Projects
203 203
 	$tmpentry = array(
204 204
 		'enabled'=> (isModEnabled('projet') ? 1 : 0),
205
-		'perms'=> ($user->hasRight('projet',  'lire') ? 1 : 0),
205
+		'perms'=> ($user->hasRight('projet', 'lire') ? 1 : 0),
206 206
 		'module'=>'projet'
207 207
 	);
208 208
 
@@ -247,25 +247,25 @@  discard block
 block discarded – undo
247 247
 			|| isModEnabled('contrat')
248 248
 			|| isModEnabled('ficheinter')
249 249
 			) ? 1 : 0,
250
-		'perms'=>($user->hasRight('propal',  'read')
251
-			|| $user->hasRight('commande',  'lire')
252
-			|| $user->hasRight('supplier_proposal',  'lire')
253
-			|| $user->hasRight('fournisseur',  'lire')
254
-			|| $user->hasRight('fournisseur',  'commande', 'lire')
255
-			|| $user->hasRight('supplier_order',  'lire')
256
-			|| $user->hasRight('contrat',  'lire')
257
-			|| $user->hasRight('ficheinter',  'lire')
250
+		'perms'=>($user->hasRight('propal', 'read')
251
+			|| $user->hasRight('commande', 'lire')
252
+			|| $user->hasRight('supplier_proposal', 'lire')
253
+			|| $user->hasRight('fournisseur', 'lire')
254
+			|| $user->hasRight('fournisseur', 'commande', 'lire')
255
+			|| $user->hasRight('supplier_order', 'lire')
256
+			|| $user->hasRight('contrat', 'lire')
257
+			|| $user->hasRight('ficheinter', 'lire')
258 258
 			),
259 259
 		'module'=>'propal|commande|supplier_proposal|supplier_order|contrat|ficheinter'
260 260
 	);
261 261
 
262
-	$onlysupplierorder = $user->hasRight('fournisseur',  'commande', 'lire') &&
263
-	!$user->hasRight('propal',  'lire') &&
264
-	!$user->hasRight('commande',  'lire') &&
265
-	!$user->hasRight('supplier_order',  'lire') &&
266
-	!$user->hasRight('supplier_proposal',  'lire') &&
267
-	!$user->hasRight('contrat',  'lire') &&
268
-	!$user->hasRight('ficheinter',  'lire');
262
+	$onlysupplierorder = $user->hasRight('fournisseur', 'commande', 'lire') &&
263
+	!$user->hasRight('propal', 'lire') &&
264
+	!$user->hasRight('commande', 'lire') &&
265
+	!$user->hasRight('supplier_order', 'lire') &&
266
+	!$user->hasRight('supplier_proposal', 'lire') &&
267
+	!$user->hasRight('contrat', 'lire') &&
268
+	!$user->hasRight('ficheinter', 'lire');
269 269
 
270 270
 	$menu_arr[] = array(
271 271
 		'name' => 'Commercial',
@@ -296,9 +296,9 @@  discard block
 block discarded – undo
296 296
 			isModEnabled('loan') ||
297 297
 			isModEnabled('margins')
298 298
 			) ? 1 : 0,
299
-		'perms'=>($user->hasRight('facture',  'lire') || $user->hasRight('don',  'contact', 'lire')
300
-			|| $user->hasRight('tax',  'charges', 'lire') || $user->hasRight('salaries',  'read')
301
-			|| $user->hasRight('fournisseur',  'facture', 'lire') || $user->hasRight('loan',  'read') || $user->hasRight('margins',  'liretous')),
299
+		'perms'=>($user->hasRight('facture', 'lire') || $user->hasRight('don', 'contact', 'lire')
300
+			|| $user->hasRight('tax', 'charges', 'lire') || $user->hasRight('salaries', 'read')
301
+			|| $user->hasRight('fournisseur', 'facture', 'lire') || $user->hasRight('loan', 'read') || $user->hasRight('margins', 'liretous')),
302 302
 		'module'=>'facture|supplier_invoice|don|tax|salaries|loan'
303 303
 	);
304 304
 	$menu_arr[] = array(
@@ -323,7 +323,7 @@  discard block
 block discarded – undo
323 323
 	// Bank
324 324
 	$tmpentry = array(
325 325
 		'enabled'=>(isModEnabled('banque') || isModEnabled('prelevement')),
326
-		'perms'=>($user->hasRight('banque',  'lire') || $user->hasRight('prelevement',  'lire') || $user->hasRight('paymentbybanktransfer',  'read')),
326
+		'perms'=>($user->hasRight('banque', 'lire') || $user->hasRight('prelevement', 'lire') || $user->hasRight('paymentbybanktransfer', 'read')),
327 327
 		'module'=>'banque|prelevement|paymentbybanktransfer'
328 328
 	);
329 329
 	$menu_arr[] = array(
@@ -348,7 +348,7 @@  discard block
 block discarded – undo
348 348
 	// Accounting
349 349
 	$tmpentry = array(
350 350
 		'enabled'=>(isModEnabled('comptabilite') || isModEnabled('accounting') || isModEnabled('asset') || isModEnabled('intracommreport')),
351
-		'perms'=>($user->hasRight('compta',  'resultat', 'lire') || $user->hasRight('accounting',  'comptarapport', 'lire') || $user->hasRight('accounting',  'mouvements', 'lire') || $user->hasRight('asset',  'read') || $user->hasRight('intracommreport',  'read')),
351
+		'perms'=>($user->hasRight('compta', 'resultat', 'lire') || $user->hasRight('accounting', 'comptarapport', 'lire') || $user->hasRight('accounting', 'mouvements', 'lire') || $user->hasRight('asset', 'read') || $user->hasRight('intracommreport', 'read')),
352 352
 		'module'=>'comptabilite|accounting|asset|intracommreport'
353 353
 	);
354 354
 	$menu_arr[] = array(
@@ -373,7 +373,7 @@  discard block
 block discarded – undo
373 373
 	// HRM
374 374
 	$tmpentry = array(
375 375
 		'enabled'=>(isModEnabled('hrm') || (isModEnabled('holiday')) || isModEnabled('deplacement') || isModEnabled('expensereport') || isModEnabled('recruitment')),
376
-		'perms'=>($user->hasRight('user',  'user', 'lire') || $user->hasRight('holiday',  'read') || $user->hasRight('deplacement',  'lire') || $user->hasRight('expensereport',  'lire') || $user->hasRight('recruitment',  'recruitmentjobposition', 'read')),
376
+		'perms'=>($user->hasRight('user', 'user', 'lire') || $user->hasRight('holiday', 'read') || $user->hasRight('deplacement', 'lire') || $user->hasRight('expensereport', 'lire') || $user->hasRight('recruitment', 'recruitmentjobposition', 'read')),
377 377
 		'module'=>'hrm|holiday|deplacement|expensereport|recruitment'
378 378
 	);
379 379
 
@@ -399,7 +399,7 @@  discard block
 block discarded – undo
399 399
 	// Tickets and Knowledge base
400 400
 	$tmpentry = array(
401 401
 		'enabled'=>(isModEnabled('ticket') || isModEnabled('knowledgemanagement')),
402
-		'perms'=>($user->hasRight('ticket',  'read') || $user->hasRight('knowledgemanagement',  'knowledgerecord', 'read')),
402
+		'perms'=>($user->hasRight('ticket', 'read') || $user->hasRight('knowledgemanagement', 'knowledgerecord', 'read')),
403 403
 		'module'=>'ticket|knowledgemanagement'
404 404
 	);
405 405
 	$link = '';
@@ -1182,17 +1182,17 @@  discard block
 block discarded – undo
1182 1182
 		$newmenu->add("/user/home.php?leftmenu=users", $langs->trans("MenuUsersAndGroups"), 0, $user->hasRight('user', 'user', 'read'), '', $mainmenu, 'users', 0, '', '', '', img_picto('', 'user', 'class="paddingright pictofixedwidth"'));
1183 1183
 		if ($user->hasRight('user', 'user', 'read')) {
1184 1184
 			if ($usemenuhider || empty($leftmenu) || $leftmenu == "users") {
1185
-				$newmenu->add("", $langs->trans("Users"), 1, $user->hasRight('user',  'user', 'lire') || $user->admin);
1185
+				$newmenu->add("", $langs->trans("Users"), 1, $user->hasRight('user', 'user', 'lire') || $user->admin);
1186 1186
 				$newmenu->add("/user/card.php?leftmenu=users&action=create", $langs->trans("NewUser"), 2, ($user->hasRight("user", "user", "write") || $user->admin) && !(isModEnabled('multicompany') && $conf->entity > 1 && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)), '', 'home');
1187
-				$newmenu->add("/user/list.php?leftmenu=users", $langs->trans("ListOfUsers"), 2, $user->hasRight('user',  'user', 'lire') || $user->admin);
1188
-				$newmenu->add("/user/hierarchy.php?leftmenu=users", $langs->trans("HierarchicView"), 2, $user->hasRight('user',  'user', 'lire') || $user->admin);
1187
+				$newmenu->add("/user/list.php?leftmenu=users", $langs->trans("ListOfUsers"), 2, $user->hasRight('user', 'user', 'lire') || $user->admin);
1188
+				$newmenu->add("/user/hierarchy.php?leftmenu=users", $langs->trans("HierarchicView"), 2, $user->hasRight('user', 'user', 'lire') || $user->admin);
1189 1189
 				if (isModEnabled('categorie')) {
1190 1190
 					$langs->load("categories");
1191
-					$newmenu->add("/categories/index.php?leftmenu=users&type=7", $langs->trans("UsersCategoriesShort"), 2, $user->hasRight('categorie',  'lire'), '', $mainmenu, 'cat');
1191
+					$newmenu->add("/categories/index.php?leftmenu=users&type=7", $langs->trans("UsersCategoriesShort"), 2, $user->hasRight('categorie', 'lire'), '', $mainmenu, 'cat');
1192 1192
 				}
1193
-				$newmenu->add("", $langs->trans("Groups"), 1, ($user->hasRight('user',  'user', 'lire') || $user->admin) && !(isModEnabled('multicompany') && $conf->entity > 1 && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)));
1193
+				$newmenu->add("", $langs->trans("Groups"), 1, ($user->hasRight('user', 'user', 'lire') || $user->admin) && !(isModEnabled('multicompany') && $conf->entity > 1 && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)));
1194 1194
 				$newmenu->add("/user/group/card.php?leftmenu=users&action=create", $langs->trans("NewGroup"), 2, ((!empty($conf->global->MAIN_USE_ADVANCED_PERMS) ? $user->hasRight("user", "group_advance", "create") : $user->hasRight("user", "user", "create")) || $user->admin) && !(isModEnabled('multicompany') && $conf->entity > 1 && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)));
1195
-				$newmenu->add("/user/group/list.php?leftmenu=users", $langs->trans("ListOfGroups"), 2, ((!empty($conf->global->MAIN_USE_ADVANCED_PERMS) ? $user->hasRight('user',  'group_advance', 'read') : $user->hasRight('user',  'user', 'lire')) || $user->admin) && !(isModEnabled('multicompany') && $conf->entity > 1 && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)));
1195
+				$newmenu->add("/user/group/list.php?leftmenu=users", $langs->trans("ListOfGroups"), 2, ((!empty($conf->global->MAIN_USE_ADVANCED_PERMS) ? $user->hasRight('user', 'group_advance', 'read') : $user->hasRight('user', 'user', 'lire')) || $user->admin) && !(isModEnabled('multicompany') && $conf->entity > 1 && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)));
1196 1196
 			}
1197 1197
 		}
1198 1198
 	}
@@ -1216,9 +1216,9 @@  discard block
 block discarded – undo
1216 1216
 		// Societes
1217 1217
 		if (isModEnabled('societe')) {
1218 1218
 			$langs->load("companies");
1219
-			$newmenu->add("/societe/index.php?leftmenu=thirdparties", $langs->trans("ThirdParty"), 0, $user->hasRight('societe',  'lire'), '', $mainmenu, 'thirdparties', 0, '', '', '', img_picto('', 'company', 'class="paddingright pictofixedwidth"'));
1219
+			$newmenu->add("/societe/index.php?leftmenu=thirdparties", $langs->trans("ThirdParty"), 0, $user->hasRight('societe', 'lire'), '', $mainmenu, 'thirdparties', 0, '', '', '', img_picto('', 'company', 'class="paddingright pictofixedwidth"'));
1220 1220
 
1221
-			if ($user->hasRight('societe',  'creer')) {
1221
+			if ($user->hasRight('societe', 'creer')) {
1222 1222
 				$newmenu->add("/societe/card.php?action=create", $langs->trans("MenuNewThirdParty"), 1);
1223 1223
 				if (!$conf->use_javascript_ajax) {
1224 1224
 					$newmenu->add("/societe/card.php?action=create&amp;private=1", $langs->trans("MenuNewPrivateIndividual"), 1);
@@ -1231,7 +1231,7 @@  discard block
 block discarded – undo
1231 1231
 		// Prospects
1232 1232
 		if (isModEnabled('societe') && empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) {
1233 1233
 			$langs->load("commercial");
1234
-			$newmenu->add("/societe/list.php?type=p&amp;leftmenu=prospects", $langs->trans("ListProspectsShort"), 2, $user->hasRight('societe',  'lire'), '', $mainmenu, 'prospects');
1234
+			$newmenu->add("/societe/list.php?type=p&amp;leftmenu=prospects", $langs->trans("ListProspectsShort"), 2, $user->hasRight('societe', 'lire'), '', $mainmenu, 'prospects');
1235 1235
 			/* no more required, there is a filter that can do more
1236 1236
 			 if ($usemenuhider || empty($leftmenu) || $leftmenu=="prospects") $newmenu->add("/societe/list.php?type=p&amp;sortfield=s.datec&amp;sortorder=desc&amp;begin=&amp;search_stcomm=-1", $langs->trans("LastProspectDoNotContact"), 2, $user->hasRight('societe',  'lire'));
1237 1237
 			 if ($usemenuhider || empty($leftmenu) || $leftmenu=="prospects") $newmenu->add("/societe/list.php?type=p&amp;sortfield=s.datec&amp;sortorder=desc&amp;begin=&amp;search_stcomm=0", $langs->trans("LastProspectNeverContacted"), 2, $user->hasRight('societe',  'lire'));
@@ -1239,22 +1239,22 @@  discard block
 block discarded – undo
1239 1239
 			 if ($usemenuhider || empty($leftmenu) || $leftmenu=="prospects") $newmenu->add("/societe/list.php?type=p&amp;sortfield=s.datec&amp;sortorder=desc&amp;begin=&amp;search_stcomm=2", $langs->trans("LastProspectContactInProcess"), 2, $user->hasRight('societe',  'lire'));
1240 1240
 			 if ($usemenuhider || empty($leftmenu) || $leftmenu=="prospects") $newmenu->add("/societe/list.php?type=p&amp;sortfield=s.datec&amp;sortorder=desc&amp;begin=&amp;search_stcomm=3", $langs->trans("LastProspectContactDone"), 2, $user->hasRight('societe',  'lire'));
1241 1241
 			 */
1242
-			$newmenu->add("/societe/card.php?leftmenu=prospects&amp;action=create&amp;type=p", $langs->trans("MenuNewProspect"), 3, $user->hasRight('societe',  'creer'));
1242
+			$newmenu->add("/societe/card.php?leftmenu=prospects&amp;action=create&amp;type=p", $langs->trans("MenuNewProspect"), 3, $user->hasRight('societe', 'creer'));
1243 1243
 		}
1244 1244
 
1245 1245
 		// Customers/Prospects
1246 1246
 		if (isModEnabled('societe') && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) {
1247 1247
 			$langs->load("commercial");
1248
-			$newmenu->add("/societe/list.php?type=c&amp;leftmenu=customers", $langs->trans("ListCustomersShort"), 2, $user->hasRight('societe',  'lire'), '', $mainmenu, 'customers');
1248
+			$newmenu->add("/societe/list.php?type=c&amp;leftmenu=customers", $langs->trans("ListCustomersShort"), 2, $user->hasRight('societe', 'lire'), '', $mainmenu, 'customers');
1249 1249
 
1250
-			$newmenu->add("/societe/card.php?leftmenu=customers&amp;action=create&amp;type=c", $langs->trans("MenuNewCustomer"), 3, $user->hasRight('societe',  'creer'));
1250
+			$newmenu->add("/societe/card.php?leftmenu=customers&amp;action=create&amp;type=c", $langs->trans("MenuNewCustomer"), 3, $user->hasRight('societe', 'creer'));
1251 1251
 		}
1252 1252
 
1253 1253
 		// Suppliers
1254 1254
 		if (isModEnabled('societe') && (isModEnabled('supplier_order') || isModEnabled('supplier_invoice') || isModEnabled('supplier_proposal'))) {
1255 1255
 			$langs->load("suppliers");
1256
-			$newmenu->add("/societe/list.php?type=f&amp;leftmenu=suppliers", $langs->trans("ListSuppliersShort"), 2, ($user->hasRight('fournisseur',  'lire') || $user->hasRight('supplier_order',  'lire') || $user->hasRight('supplier_invoice',  'lire') || $user->hasRight('supplier_proposal',  'lire')), '', $mainmenu, 'suppliers');
1257
-			$newmenu->add("/societe/card.php?leftmenu=suppliers&amp;action=create&amp;type=f", $langs->trans("MenuNewSupplier"), 3, $user->hasRight('societe',  'creer') && ($user->hasRight('fournisseur',  'lire') || $user->hasRight('supplier_order',  'lire') || $user->hasRight('supplier_invoice',  'lire') || $user->hasRight('supplier_proposal',  'lire')));
1256
+			$newmenu->add("/societe/list.php?type=f&amp;leftmenu=suppliers", $langs->trans("ListSuppliersShort"), 2, ($user->hasRight('fournisseur', 'lire') || $user->hasRight('supplier_order', 'lire') || $user->hasRight('supplier_invoice', 'lire') || $user->hasRight('supplier_proposal', 'lire')), '', $mainmenu, 'suppliers');
1257
+			$newmenu->add("/societe/card.php?leftmenu=suppliers&amp;action=create&amp;type=f", $langs->trans("MenuNewSupplier"), 3, $user->hasRight('societe', 'creer') && ($user->hasRight('fournisseur', 'lire') || $user->hasRight('supplier_order', 'lire') || $user->hasRight('supplier_invoice', 'lire') || $user->hasRight('supplier_proposal', 'lire')));
1258 1258
 		}
1259 1259
 
1260 1260
 		// Categories
@@ -1269,36 +1269,36 @@  discard block
 block discarded – undo
1269 1269
 				if (!empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) {
1270 1270
 					$menutoshow = $langs->trans("ProspectsCategoriesShort");
1271 1271
 				}
1272
-				$newmenu->add("/categories/index.php?leftmenu=cat&amp;type=2", $menutoshow, 1, $user->hasRight('categorie',  'lire'), '', $mainmenu, 'cat');
1272
+				$newmenu->add("/categories/index.php?leftmenu=cat&amp;type=2", $menutoshow, 1, $user->hasRight('categorie', 'lire'), '', $mainmenu, 'cat');
1273 1273
 			}
1274 1274
 			// Categories suppliers
1275 1275
 			if (isModEnabled('supplier_proposal') || isModEnabled('supplier_order') || isModEnabled('supplier_invoice')) {
1276
-				$newmenu->add("/categories/index.php?leftmenu=catfournish&amp;type=1", $langs->trans("SuppliersCategoriesShort"), 1, $user->hasRight('categorie',  'lire'));
1276
+				$newmenu->add("/categories/index.php?leftmenu=catfournish&amp;type=1", $langs->trans("SuppliersCategoriesShort"), 1, $user->hasRight('categorie', 'lire'));
1277 1277
 			}
1278 1278
 		}
1279 1279
 
1280 1280
 		// Contacts
1281
-		$newmenu->add("/societe/index.php?leftmenu=thirdparties", (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("Contacts") : $langs->trans("ContactsAddresses")), 0, $user->hasRight('societe',  'contact', 'lire'), '', $mainmenu, 'contacts', 0, '', '', '', img_picto('', 'contact', 'class="paddingright pictofixedwidth"'));
1281
+		$newmenu->add("/societe/index.php?leftmenu=thirdparties", (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("Contacts") : $langs->trans("ContactsAddresses")), 0, $user->hasRight('societe', 'contact', 'lire'), '', $mainmenu, 'contacts', 0, '', '', '', img_picto('', 'contact', 'class="paddingright pictofixedwidth"'));
1282 1282
 
1283
-		$newmenu->add("/contact/card.php?leftmenu=contacts&amp;action=create", (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("NewContact") : $langs->trans("NewContactAddress")), 1, $user->hasRight('societe',  'contact', 'creer'));
1284
-		$newmenu->add("/contact/list.php?leftmenu=contacts", $langs->trans("List"), 1, $user->hasRight('societe',  'contact', 'lire'));
1283
+		$newmenu->add("/contact/card.php?leftmenu=contacts&amp;action=create", (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("NewContact") : $langs->trans("NewContactAddress")), 1, $user->hasRight('societe', 'contact', 'creer'));
1284
+		$newmenu->add("/contact/list.php?leftmenu=contacts", $langs->trans("List"), 1, $user->hasRight('societe', 'contact', 'lire'));
1285 1285
 		if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) {
1286
-			$newmenu->add("/contact/list.php?leftmenu=contacts&type=p", $langs->trans("Prospects"), 2, $user->hasRight('societe',  'contact', 'lire'));
1286
+			$newmenu->add("/contact/list.php?leftmenu=contacts&type=p", $langs->trans("Prospects"), 2, $user->hasRight('societe', 'contact', 'lire'));
1287 1287
 		}
1288 1288
 		if (empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) {
1289
-			$newmenu->add("/contact/list.php?leftmenu=contacts&type=c", $langs->trans("Customers"), 2, $user->hasRight('societe',  'contact', 'lire'));
1289
+			$newmenu->add("/contact/list.php?leftmenu=contacts&type=c", $langs->trans("Customers"), 2, $user->hasRight('societe', 'contact', 'lire'));
1290 1290
 		}
1291 1291
 		if (isModEnabled('supplier_proposal') || isModEnabled('supplier_order') || isModEnabled('supplier_invoice')) {
1292
-			$newmenu->add("/contact/list.php?leftmenu=contacts&type=f", $langs->trans("Suppliers"), 2, $user->hasRight('fournisseur',  'lire'));
1292
+			$newmenu->add("/contact/list.php?leftmenu=contacts&type=f", $langs->trans("Suppliers"), 2, $user->hasRight('fournisseur', 'lire'));
1293 1293
 		}
1294
-		$newmenu->add("/contact/list.php?leftmenu=contacts&type=o", $langs->trans("ContactOthers"), 2, $user->hasRight('societe',  'contact', 'lire'));
1294
+		$newmenu->add("/contact/list.php?leftmenu=contacts&type=o", $langs->trans("ContactOthers"), 2, $user->hasRight('societe', 'contact', 'lire'));
1295 1295
 		//$newmenu->add("/contact/list.php?userid=$user->id", $langs->trans("MyContacts"), 1, $user->hasRight('societe',  'contact', 'lire'));
1296 1296
 
1297 1297
 		// Categories
1298 1298
 		if (isModEnabled('categorie')) {
1299 1299
 			$langs->load("categories");
1300 1300
 			// Categories Contact
1301
-			$newmenu->add("/categories/index.php?leftmenu=catcontact&amp;type=4", $langs->trans("ContactCategoriesShort"), 1, $user->hasRight('categorie',  'lire'), '', $mainmenu, 'cat');
1301
+			$newmenu->add("/categories/index.php?leftmenu=catcontact&amp;type=4", $langs->trans("ContactCategoriesShort"), 1, $user->hasRight('categorie', 'lire'), '', $mainmenu, 'cat');
1302 1302
 		}
1303 1303
 	}
1304 1304
 }
@@ -1323,101 +1323,101 @@  discard block
 block discarded – undo
1323 1323
 		// Customer proposal
1324 1324
 		if (isModEnabled('propal')) {
1325 1325
 			$langs->load("propal");
1326
-			$newmenu->add("/comm/propal/index.php?leftmenu=propals", $langs->trans("Proposals"), 0, $user->hasRight('propal',  'read'), '', $mainmenu, 'propals', 100, '', '', '', img_picto('', 'propal', 'class="paddingright pictofixedwidth"'));
1327
-			$newmenu->add("/comm/propal/card.php?action=create&amp;leftmenu=propals", $langs->trans("NewPropal"), 1, $user->hasRight('propal',  'write'));
1328
-			$newmenu->add("/comm/propal/list.php?leftmenu=propals", $langs->trans("List"), 1, $user->hasRight('propal',  'read'));
1326
+			$newmenu->add("/comm/propal/index.php?leftmenu=propals", $langs->trans("Proposals"), 0, $user->hasRight('propal', 'read'), '', $mainmenu, 'propals', 100, '', '', '', img_picto('', 'propal', 'class="paddingright pictofixedwidth"'));
1327
+			$newmenu->add("/comm/propal/card.php?action=create&amp;leftmenu=propals", $langs->trans("NewPropal"), 1, $user->hasRight('propal', 'write'));
1328
+			$newmenu->add("/comm/propal/list.php?leftmenu=propals", $langs->trans("List"), 1, $user->hasRight('propal', 'read'));
1329 1329
 			if ($usemenuhider || empty($leftmenu) || $leftmenu == "propals") {
1330
-				$newmenu->add("/comm/propal/list.php?leftmenu=propals&search_status=0", $langs->trans("PropalsDraft"), 2, $user->hasRight('propal',  'read'));
1331
-				$newmenu->add("/comm/propal/list.php?leftmenu=propals&search_status=1", $langs->trans("PropalsOpened"), 2, $user->hasRight('propal',  'read'));
1332
-				$newmenu->add("/comm/propal/list.php?leftmenu=propals&search_status=2", $langs->trans("PropalStatusSigned"), 2, $user->hasRight('propal',  'read'));
1333
-				$newmenu->add("/comm/propal/list.php?leftmenu=propals&search_status=3", $langs->trans("PropalStatusNotSigned"), 2, $user->hasRight('propal',  'read'));
1334
-				$newmenu->add("/comm/propal/list.php?leftmenu=propals&search_status=4", $langs->trans("PropalStatusBilled"), 2, $user->hasRight('propal',  'read'));
1330
+				$newmenu->add("/comm/propal/list.php?leftmenu=propals&search_status=0", $langs->trans("PropalsDraft"), 2, $user->hasRight('propal', 'read'));
1331
+				$newmenu->add("/comm/propal/list.php?leftmenu=propals&search_status=1", $langs->trans("PropalsOpened"), 2, $user->hasRight('propal', 'read'));
1332
+				$newmenu->add("/comm/propal/list.php?leftmenu=propals&search_status=2", $langs->trans("PropalStatusSigned"), 2, $user->hasRight('propal', 'read'));
1333
+				$newmenu->add("/comm/propal/list.php?leftmenu=propals&search_status=3", $langs->trans("PropalStatusNotSigned"), 2, $user->hasRight('propal', 'read'));
1334
+				$newmenu->add("/comm/propal/list.php?leftmenu=propals&search_status=4", $langs->trans("PropalStatusBilled"), 2, $user->hasRight('propal', 'read'));
1335 1335
 				//$newmenu->add("/comm/propal/list.php?leftmenu=propals&search_status=2,3,4", $langs->trans("PropalStatusClosedShort"), 2, $user->hasRight('propal',  'read'));
1336 1336
 			}
1337
-			$newmenu->add("/comm/propal/stats/index.php?leftmenu=propals", $langs->trans("Statistics"), 1, $user->hasRight('propal',  'read'));
1337
+			$newmenu->add("/comm/propal/stats/index.php?leftmenu=propals", $langs->trans("Statistics"), 1, $user->hasRight('propal', 'read'));
1338 1338
 		}
1339 1339
 
1340 1340
 		// Customers orders
1341 1341
 		if (isModEnabled('commande')) {
1342 1342
 			$langs->load("orders");
1343
-			$newmenu->add("/commande/index.php?leftmenu=orders", $langs->trans("CustomersOrders"), 0, $user->hasRight('commande',  'lire'), '', $mainmenu, 'orders', 200, '', '', '', img_picto('', 'order', 'class="paddingright pictofixedwidth"'));
1344
-			$newmenu->add("/commande/card.php?action=create&amp;leftmenu=orders", $langs->trans("NewOrder"), 1, $user->hasRight('commande',  'creer'));
1345
-			$newmenu->add("/commande/list.php?leftmenu=orders", $langs->trans("List"), 1, $user->hasRight('commande',  'lire'));
1343
+			$newmenu->add("/commande/index.php?leftmenu=orders", $langs->trans("CustomersOrders"), 0, $user->hasRight('commande', 'lire'), '', $mainmenu, 'orders', 200, '', '', '', img_picto('', 'order', 'class="paddingright pictofixedwidth"'));
1344
+			$newmenu->add("/commande/card.php?action=create&amp;leftmenu=orders", $langs->trans("NewOrder"), 1, $user->hasRight('commande', 'creer'));
1345
+			$newmenu->add("/commande/list.php?leftmenu=orders", $langs->trans("List"), 1, $user->hasRight('commande', 'lire'));
1346 1346
 			if ($usemenuhider || empty($leftmenu) || $leftmenu == "orders") {
1347
-				$newmenu->add("/commande/list.php?leftmenu=orders&search_status=0", $langs->trans("StatusOrderDraftShort"), 2, $user->hasRight('commande',  'lire'));
1348
-				$newmenu->add("/commande/list.php?leftmenu=orders&search_status=1", $langs->trans("StatusOrderValidated"), 2, $user->hasRight('commande',  'lire'));
1347
+				$newmenu->add("/commande/list.php?leftmenu=orders&search_status=0", $langs->trans("StatusOrderDraftShort"), 2, $user->hasRight('commande', 'lire'));
1348
+				$newmenu->add("/commande/list.php?leftmenu=orders&search_status=1", $langs->trans("StatusOrderValidated"), 2, $user->hasRight('commande', 'lire'));
1349 1349
 				if (isModEnabled('expedition')) {
1350
-					$newmenu->add("/commande/list.php?leftmenu=orders&search_status=2", $langs->trans("StatusOrderSentShort"), 2, $user->hasRight('commande',  'lire'));
1350
+					$newmenu->add("/commande/list.php?leftmenu=orders&search_status=2", $langs->trans("StatusOrderSentShort"), 2, $user->hasRight('commande', 'lire'));
1351 1351
 				}
1352
-				$newmenu->add("/commande/list.php?leftmenu=orders&search_status=3", $langs->trans("StatusOrderDelivered"), 2, $user->hasRight('commande',  'lire'));
1352
+				$newmenu->add("/commande/list.php?leftmenu=orders&search_status=3", $langs->trans("StatusOrderDelivered"), 2, $user->hasRight('commande', 'lire'));
1353 1353
 				//$newmenu->add("/commande/list.php?leftmenu=orders&search_status=4", $langs->trans("StatusOrderProcessed"), 2, $user->hasRight('commande',  'lire'));
1354
-				$newmenu->add("/commande/list.php?leftmenu=orders&search_status=-1", $langs->trans("StatusOrderCanceledShort"), 2, $user->hasRight('commande',  'lire'));
1354
+				$newmenu->add("/commande/list.php?leftmenu=orders&search_status=-1", $langs->trans("StatusOrderCanceledShort"), 2, $user->hasRight('commande', 'lire'));
1355 1355
 			}
1356 1356
 			if ($conf->global->MAIN_FEATURES_LEVEL >= 2 && empty($user->socid)) {
1357
-				$newmenu->add("/commande/list_det.php?leftmenu=orders", $langs->trans("ListOrderLigne"), 1, $user->hasRight('commande',  'lire'));
1357
+				$newmenu->add("/commande/list_det.php?leftmenu=orders", $langs->trans("ListOrderLigne"), 1, $user->hasRight('commande', 'lire'));
1358 1358
 			}
1359
-			$newmenu->add("/commande/stats/index.php?leftmenu=orders", $langs->trans("Statistics"), 1, $user->hasRight('commande',  'lire'));
1359
+			$newmenu->add("/commande/stats/index.php?leftmenu=orders", $langs->trans("Statistics"), 1, $user->hasRight('commande', 'lire'));
1360 1360
 		}
1361 1361
 
1362 1362
 		// Supplier proposal
1363 1363
 		if (isModEnabled('supplier_proposal')) {
1364 1364
 			$langs->load("supplier_proposal");
1365
-			$newmenu->add("/supplier_proposal/index.php?leftmenu=propals_supplier", $langs->trans("SupplierProposalsShort"), 0, $user->hasRight('supplier_proposal',  'lire'), '', $mainmenu, 'propals_supplier', 300, '', '', '', img_picto('', 'supplier_proposal', 'class="paddingright pictofixedwidth"'));
1366
-			$newmenu->add("/supplier_proposal/card.php?action=create&amp;leftmenu=supplier_proposals", $langs->trans("SupplierProposalNew"), 1, $user->hasRight('supplier_proposal',  'creer'));
1367
-			$newmenu->add("/supplier_proposal/list.php?leftmenu=supplier_proposals", $langs->trans("List"), 1, $user->hasRight('supplier_proposal',  'lire'));
1368
-			$newmenu->add("/comm/propal/stats/index.php?leftmenu=supplier_proposals&amp;mode=supplier", $langs->trans("Statistics"), 1, $user->hasRight('supplier_proposal',  'lire'));
1365
+			$newmenu->add("/supplier_proposal/index.php?leftmenu=propals_supplier", $langs->trans("SupplierProposalsShort"), 0, $user->hasRight('supplier_proposal', 'lire'), '', $mainmenu, 'propals_supplier', 300, '', '', '', img_picto('', 'supplier_proposal', 'class="paddingright pictofixedwidth"'));
1366
+			$newmenu->add("/supplier_proposal/card.php?action=create&amp;leftmenu=supplier_proposals", $langs->trans("SupplierProposalNew"), 1, $user->hasRight('supplier_proposal', 'creer'));
1367
+			$newmenu->add("/supplier_proposal/list.php?leftmenu=supplier_proposals", $langs->trans("List"), 1, $user->hasRight('supplier_proposal', 'lire'));
1368
+			$newmenu->add("/comm/propal/stats/index.php?leftmenu=supplier_proposals&amp;mode=supplier", $langs->trans("Statistics"), 1, $user->hasRight('supplier_proposal', 'lire'));
1369 1369
 		}
1370 1370
 
1371 1371
 		// Suppliers orders
1372 1372
 		if (isModEnabled('supplier_order')) {
1373 1373
 			$langs->load("orders");
1374
-			$newmenu->add("/fourn/commande/index.php?leftmenu=orders_suppliers", $langs->trans("SuppliersOrders"), 0, $user->hasRight('fournisseur',  'commande', 'lire'), '', $mainmenu, 'orders_suppliers', 400, '', '', '', img_picto('', 'supplier_order', 'class="paddingright pictofixedwidth"'));
1375
-			$newmenu->add("/fourn/commande/card.php?action=create&amp;leftmenu=orders_suppliers", $langs->trans("NewSupplierOrderShort"), 1, $user->hasRight('fournisseur',  'commande', 'creer'));
1376
-			$newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers", $langs->trans("List"), 1, $user->hasRight('fournisseur',  'commande', 'lire'));
1374
+			$newmenu->add("/fourn/commande/index.php?leftmenu=orders_suppliers", $langs->trans("SuppliersOrders"), 0, $user->hasRight('fournisseur', 'commande', 'lire'), '', $mainmenu, 'orders_suppliers', 400, '', '', '', img_picto('', 'supplier_order', 'class="paddingright pictofixedwidth"'));
1375
+			$newmenu->add("/fourn/commande/card.php?action=create&amp;leftmenu=orders_suppliers", $langs->trans("NewSupplierOrderShort"), 1, $user->hasRight('fournisseur', 'commande', 'creer'));
1376
+			$newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers", $langs->trans("List"), 1, $user->hasRight('fournisseur', 'commande', 'lire'));
1377 1377
 
1378 1378
 			if ($usemenuhider || empty($leftmenu) || $leftmenu == "orders_suppliers") {
1379
-				$newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=0", $langs->trans("StatusSupplierOrderDraftShort"), 2, $user->hasRight('fournisseur',  'commande', 'lire'));
1379
+				$newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=0", $langs->trans("StatusSupplierOrderDraftShort"), 2, $user->hasRight('fournisseur', 'commande', 'lire'));
1380 1380
 				if (empty($conf->global->SUPPLIER_ORDER_HIDE_VALIDATED)) {
1381
-					$newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=1", $langs->trans("StatusSupplierOrderValidated"), 2, $user->hasRight('fournisseur',  'commande', 'lire'));
1381
+					$newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=1", $langs->trans("StatusSupplierOrderValidated"), 2, $user->hasRight('fournisseur', 'commande', 'lire'));
1382 1382
 				}
1383
-				$newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=2", $langs->trans("StatusSupplierOrderApprovedShort"), 2, $user->hasRight('fournisseur',  'commande', 'lire'));
1384
-				$newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=3", $langs->trans("StatusSupplierOrderOnProcessShort"), 2, $user->hasRight('fournisseur',  'commande', 'lire'));
1385
-				$newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=4", $langs->trans("StatusSupplierOrderReceivedPartiallyShort"), 2, $user->hasRight('fournisseur',  'commande', 'lire'));
1386
-				$newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=5", $langs->trans("StatusSupplierOrderReceivedAll"), 2, $user->hasRight('fournisseur',  'commande', 'lire'));
1387
-				$newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=6,7", $langs->trans("StatusSupplierOrderCanceled"), 2, $user->hasRight('fournisseur',  'commande', 'lire'));
1388
-				$newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=9", $langs->trans("StatusSupplierOrderRefused"), 2, $user->hasRight('fournisseur',  'commande', 'lire'));
1383
+				$newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=2", $langs->trans("StatusSupplierOrderApprovedShort"), 2, $user->hasRight('fournisseur', 'commande', 'lire'));
1384
+				$newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=3", $langs->trans("StatusSupplierOrderOnProcessShort"), 2, $user->hasRight('fournisseur', 'commande', 'lire'));
1385
+				$newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=4", $langs->trans("StatusSupplierOrderReceivedPartiallyShort"), 2, $user->hasRight('fournisseur', 'commande', 'lire'));
1386
+				$newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=5", $langs->trans("StatusSupplierOrderReceivedAll"), 2, $user->hasRight('fournisseur', 'commande', 'lire'));
1387
+				$newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=6,7", $langs->trans("StatusSupplierOrderCanceled"), 2, $user->hasRight('fournisseur', 'commande', 'lire'));
1388
+				$newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=9", $langs->trans("StatusSupplierOrderRefused"), 2, $user->hasRight('fournisseur', 'commande', 'lire'));
1389 1389
 			}
1390 1390
 			// Billed is another field. We should add instead a dedicated filter on list. if ($usemenuhider || empty($leftmenu) || $leftmenu=="orders_suppliers") $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&billed=1", $langs->trans("Billed"), 2, $user->hasRight('fournisseur',  'commande', 'lire'));
1391 1391
 
1392 1392
 
1393
-			$newmenu->add("/commande/stats/index.php?leftmenu=orders_suppliers&amp;mode=supplier", $langs->trans("Statistics"), 1, $user->hasRight('fournisseur',  'commande', 'lire'));
1393
+			$newmenu->add("/commande/stats/index.php?leftmenu=orders_suppliers&amp;mode=supplier", $langs->trans("Statistics"), 1, $user->hasRight('fournisseur', 'commande', 'lire'));
1394 1394
 		}
1395 1395
 
1396 1396
 		// Contrat
1397 1397
 		if (isModEnabled('contrat')) {
1398 1398
 			$langs->load("contracts");
1399
-			$newmenu->add("/contrat/index.php?leftmenu=contracts", $langs->trans("ContractsSubscriptions"), 0, $user->hasRight('contrat',  'lire'), '', $mainmenu, 'contracts', 2000, '', '', '', img_picto('', 'contract', 'class="paddingright pictofixedwidth"'));
1400
-			$newmenu->add("/contrat/card.php?action=create&amp;leftmenu=contracts", $langs->trans("NewContractSubscription"), 1, $user->hasRight('contrat',  'creer'));
1401
-			$newmenu->add("/contrat/list.php?leftmenu=contracts", $langs->trans("List"), 1, $user->hasRight('contrat',  'lire'));
1402
-			$newmenu->add("/contrat/services_list.php?leftmenu=contracts", $langs->trans("MenuServices"), 1, $user->hasRight('contrat',  'lire'));
1399
+			$newmenu->add("/contrat/index.php?leftmenu=contracts", $langs->trans("ContractsSubscriptions"), 0, $user->hasRight('contrat', 'lire'), '', $mainmenu, 'contracts', 2000, '', '', '', img_picto('', 'contract', 'class="paddingright pictofixedwidth"'));
1400
+			$newmenu->add("/contrat/card.php?action=create&amp;leftmenu=contracts", $langs->trans("NewContractSubscription"), 1, $user->hasRight('contrat', 'creer'));
1401
+			$newmenu->add("/contrat/list.php?leftmenu=contracts", $langs->trans("List"), 1, $user->hasRight('contrat', 'lire'));
1402
+			$newmenu->add("/contrat/services_list.php?leftmenu=contracts", $langs->trans("MenuServices"), 1, $user->hasRight('contrat', 'lire'));
1403 1403
 			if ($usemenuhider || empty($leftmenu) || $leftmenu == "contracts") {
1404
-				$newmenu->add("/contrat/services_list.php?leftmenu=contracts&amp;search_status=0", $langs->trans("MenuInactiveServices"), 2, $user->hasRight('contrat',  'lire'));
1405
-				$newmenu->add("/contrat/services_list.php?leftmenu=contracts&amp;search_status=4", $langs->trans("MenuRunningServices"), 2, $user->hasRight('contrat',  'lire'));
1406
-				$newmenu->add("/contrat/services_list.php?leftmenu=contracts&amp;search_status=4&amp;filter=expired", $langs->trans("MenuExpiredServices"), 2, $user->hasRight('contrat',  'lire'));
1407
-				$newmenu->add("/contrat/services_list.php?leftmenu=contracts&amp;search_status=5", $langs->trans("MenuClosedServices"), 2, $user->hasRight('contrat',  'lire'));
1404
+				$newmenu->add("/contrat/services_list.php?leftmenu=contracts&amp;search_status=0", $langs->trans("MenuInactiveServices"), 2, $user->hasRight('contrat', 'lire'));
1405
+				$newmenu->add("/contrat/services_list.php?leftmenu=contracts&amp;search_status=4", $langs->trans("MenuRunningServices"), 2, $user->hasRight('contrat', 'lire'));
1406
+				$newmenu->add("/contrat/services_list.php?leftmenu=contracts&amp;search_status=4&amp;filter=expired", $langs->trans("MenuExpiredServices"), 2, $user->hasRight('contrat', 'lire'));
1407
+				$newmenu->add("/contrat/services_list.php?leftmenu=contracts&amp;search_status=5", $langs->trans("MenuClosedServices"), 2, $user->hasRight('contrat', 'lire'));
1408 1408
 			}
1409 1409
 		}
1410 1410
 
1411 1411
 		// Interventions
1412 1412
 		if (isModEnabled('ficheinter')) {
1413 1413
 			$langs->load("interventions");
1414
-			$newmenu->add("/fichinter/index.php?leftmenu=ficheinter", $langs->trans("Interventions"), 0, $user->hasRight('ficheinter',  'lire'), '', $mainmenu, 'ficheinter', 2200, '', '', '', img_picto('', 'intervention', 'class="paddingright pictofixedwidth"'));
1415
-			$newmenu->add("/fichinter/card.php?action=create&amp;leftmenu=ficheinter", $langs->trans("NewIntervention"), 1, $user->hasRight('ficheinter',  'creer'), '', '', '', 201);
1416
-			$newmenu->add("/fichinter/list.php?leftmenu=ficheinter", $langs->trans("List"), 1, $user->hasRight('ficheinter',  'lire'), '', '', '', 202);
1414
+			$newmenu->add("/fichinter/index.php?leftmenu=ficheinter", $langs->trans("Interventions"), 0, $user->hasRight('ficheinter', 'lire'), '', $mainmenu, 'ficheinter', 2200, '', '', '', img_picto('', 'intervention', 'class="paddingright pictofixedwidth"'));
1415
+			$newmenu->add("/fichinter/card.php?action=create&amp;leftmenu=ficheinter", $langs->trans("NewIntervention"), 1, $user->hasRight('ficheinter', 'creer'), '', '', '', 201);
1416
+			$newmenu->add("/fichinter/list.php?leftmenu=ficheinter", $langs->trans("List"), 1, $user->hasRight('ficheinter', 'lire'), '', '', '', 202);
1417 1417
 			if ($conf->global->MAIN_FEATURES_LEVEL >= 2) {
1418
-				$newmenu->add("/fichinter/card-rec.php?leftmenu=ficheinter", $langs->trans("ListOfTemplates"), 1, $user->hasRight('ficheinter',  'lire'), '', '', '', 203);
1418
+				$newmenu->add("/fichinter/card-rec.php?leftmenu=ficheinter", $langs->trans("ListOfTemplates"), 1, $user->hasRight('ficheinter', 'lire'), '', '', '', 203);
1419 1419
 			}
1420
-			$newmenu->add("/fichinter/stats/index.php?leftmenu=ficheinter", $langs->trans("Statistics"), 1, $user->hasRight('ficheinter',  'lire'));
1420
+			$newmenu->add("/fichinter/stats/index.php?leftmenu=ficheinter", $langs->trans("Statistics"), 1, $user->hasRight('ficheinter', 'lire'));
1421 1421
 		}
1422 1422
 	}
1423 1423
 }
@@ -1442,59 +1442,59 @@  discard block
 block discarded – undo
1442 1442
 		// Customers invoices
1443 1443
 		if (isModEnabled('facture')) {
1444 1444
 			$langs->load("bills");
1445
-			$newmenu->add("/compta/facture/index.php?leftmenu=customers_bills", $langs->trans("BillsCustomers"), 0, $user->hasRight('facture',  'lire'), '', $mainmenu, 'customers_bills', 0, '', '', '', img_picto('', 'bill', 'class="paddingright pictofixedwidth"'));
1446
-			$newmenu->add("/compta/facture/card.php?action=create", $langs->trans("NewBill"), 1, $user->hasRight('facture',  'creer'));
1447
-			$newmenu->add("/compta/facture/list.php?leftmenu=customers_bills", $langs->trans("List"), 1, $user->hasRight('facture',  'lire'), '', $mainmenu, 'customers_bills_list');
1445
+			$newmenu->add("/compta/facture/index.php?leftmenu=customers_bills", $langs->trans("BillsCustomers"), 0, $user->hasRight('facture', 'lire'), '', $mainmenu, 'customers_bills', 0, '', '', '', img_picto('', 'bill', 'class="paddingright pictofixedwidth"'));
1446
+			$newmenu->add("/compta/facture/card.php?action=create", $langs->trans("NewBill"), 1, $user->hasRight('facture', 'creer'));
1447
+			$newmenu->add("/compta/facture/list.php?leftmenu=customers_bills", $langs->trans("List"), 1, $user->hasRight('facture', 'lire'), '', $mainmenu, 'customers_bills_list');
1448 1448
 
1449 1449
 			if ($usemenuhider || empty($leftmenu) || preg_match('/customers_bills(|_draft|_notpaid|_paid|_canceled)$/', $leftmenu)) {
1450
-				$newmenu->add("/compta/facture/list.php?leftmenu=customers_bills_draft&amp;search_status=0", $langs->trans("BillShortStatusDraft"), 2, $user->hasRight('facture',  'lire'));
1451
-				$newmenu->add("/compta/facture/list.php?leftmenu=customers_bills_notpaid&amp;search_status=1", $langs->trans("BillShortStatusNotPaid"), 2, $user->hasRight('facture',  'lire'));
1452
-				$newmenu->add("/compta/facture/list.php?leftmenu=customers_bills_paid&amp;search_status=2", $langs->trans("BillShortStatusPaid"), 2, $user->hasRight('facture',  'lire'));
1453
-				$newmenu->add("/compta/facture/list.php?leftmenu=customers_bills_canceled&amp;search_status=3", $langs->trans("BillShortStatusCanceled"), 2, $user->hasRight('facture',  'lire'));
1450
+				$newmenu->add("/compta/facture/list.php?leftmenu=customers_bills_draft&amp;search_status=0", $langs->trans("BillShortStatusDraft"), 2, $user->hasRight('facture', 'lire'));
1451
+				$newmenu->add("/compta/facture/list.php?leftmenu=customers_bills_notpaid&amp;search_status=1", $langs->trans("BillShortStatusNotPaid"), 2, $user->hasRight('facture', 'lire'));
1452
+				$newmenu->add("/compta/facture/list.php?leftmenu=customers_bills_paid&amp;search_status=2", $langs->trans("BillShortStatusPaid"), 2, $user->hasRight('facture', 'lire'));
1453
+				$newmenu->add("/compta/facture/list.php?leftmenu=customers_bills_canceled&amp;search_status=3", $langs->trans("BillShortStatusCanceled"), 2, $user->hasRight('facture', 'lire'));
1454 1454
 			}
1455
-			$newmenu->add("/compta/facture/invoicetemplate_list.php?leftmenu=customers_bills_templates", $langs->trans("ListOfTemplates"), 1, $user->hasRight('facture',  'creer'), '', $mainmenu, 'customers_bills_templates'); // No need to see recurring invoices, if user has no permission to create invoice.
1455
+			$newmenu->add("/compta/facture/invoicetemplate_list.php?leftmenu=customers_bills_templates", $langs->trans("ListOfTemplates"), 1, $user->hasRight('facture', 'creer'), '', $mainmenu, 'customers_bills_templates'); // No need to see recurring invoices, if user has no permission to create invoice.
1456 1456
 
1457
-			$newmenu->add("/compta/paiement/list.php?leftmenu=customers_bills_payment", $langs->trans("Payments"), 1, $user->hasRight('facture',  'lire'), '', $mainmenu, 'customers_bills_payment');
1457
+			$newmenu->add("/compta/paiement/list.php?leftmenu=customers_bills_payment", $langs->trans("Payments"), 1, $user->hasRight('facture', 'lire'), '', $mainmenu, 'customers_bills_payment');
1458 1458
 
1459 1459
 			if (!empty($conf->global->BILL_ADD_PAYMENT_VALIDATION)) {
1460
-				$newmenu->add("/compta/paiement/tovalidate.php?leftmenu=customers_bills_tovalid", $langs->trans("MenuToValid"), 2, $user->hasRight('facture',  'lire'), '', $mainmenu, 'customer_bills_tovalid');
1460
+				$newmenu->add("/compta/paiement/tovalidate.php?leftmenu=customers_bills_tovalid", $langs->trans("MenuToValid"), 2, $user->hasRight('facture', 'lire'), '', $mainmenu, 'customer_bills_tovalid');
1461 1461
 			}
1462 1462
 			if ($usemenuhider || empty($leftmenu) || preg_match('/customers_bills/', $leftmenu)) {
1463
-				$newmenu->add("/compta/paiement/rapport.php?leftmenu=customers_bills_payment_report", $langs->trans("Reportings"), 2, $user->hasRight('facture',  'lire'), '', $mainmenu, 'customers_bills_payment_report');
1463
+				$newmenu->add("/compta/paiement/rapport.php?leftmenu=customers_bills_payment_report", $langs->trans("Reportings"), 2, $user->hasRight('facture', 'lire'), '', $mainmenu, 'customers_bills_payment_report');
1464 1464
 			}
1465 1465
 
1466
-			$newmenu->add("/compta/facture/stats/index.php?leftmenu=customers_bills_stats", $langs->trans("Statistics"), 1, $user->hasRight('facture',  'lire'), '', $mainmenu, 'customers_bills_stats');
1466
+			$newmenu->add("/compta/facture/stats/index.php?leftmenu=customers_bills_stats", $langs->trans("Statistics"), 1, $user->hasRight('facture', 'lire'), '', $mainmenu, 'customers_bills_stats');
1467 1467
 		}
1468 1468
 
1469 1469
 		// Suppliers invoices
1470 1470
 		if (isModEnabled('societe') && isModEnabled('supplier_invoice')) {
1471 1471
 			$langs->load("bills");
1472
-			$newmenu->add("/fourn/facture/index.php?leftmenu=suppliers_bills", $langs->trans("BillsSuppliers"), 0, $user->hasRight('fournisseur',  'facture', 'lire'), '', $mainmenu, 'suppliers_bills', 0, '', '', '', img_picto('', 'supplier_invoice', 'class="paddingright pictofixedwidth"'));
1473
-			$newmenu->add("/fourn/facture/card.php?leftmenu=suppliers_bills&amp;action=create", $langs->trans("NewBill"), 1, ($user->hasRight('fournisseur',  'facture', 'creer') || $user->hasRight('supplier_invoice',  'creer')), '', $mainmenu, 'suppliers_bills_create');
1474
-			$newmenu->add("/fourn/facture/list.php?leftmenu=suppliers_bills", $langs->trans("List"), 1, $user->hasRight('fournisseur',  'facture', 'lire'), '', $mainmenu, 'suppliers_bills_list');
1472
+			$newmenu->add("/fourn/facture/index.php?leftmenu=suppliers_bills", $langs->trans("BillsSuppliers"), 0, $user->hasRight('fournisseur', 'facture', 'lire'), '', $mainmenu, 'suppliers_bills', 0, '', '', '', img_picto('', 'supplier_invoice', 'class="paddingright pictofixedwidth"'));
1473
+			$newmenu->add("/fourn/facture/card.php?leftmenu=suppliers_bills&amp;action=create", $langs->trans("NewBill"), 1, ($user->hasRight('fournisseur', 'facture', 'creer') || $user->hasRight('supplier_invoice', 'creer')), '', $mainmenu, 'suppliers_bills_create');
1474
+			$newmenu->add("/fourn/facture/list.php?leftmenu=suppliers_bills", $langs->trans("List"), 1, $user->hasRight('fournisseur', 'facture', 'lire'), '', $mainmenu, 'suppliers_bills_list');
1475 1475
 
1476 1476
 			if ($usemenuhider || empty($leftmenu) || preg_match('/suppliers_bills/', $leftmenu)) {
1477
-				$newmenu->add("/fourn/facture/list.php?leftmenu=suppliers_bills_draft&amp;search_status=0", $langs->trans("BillShortStatusDraft"), 2, $user->hasRight('fournisseur',  'facture', 'lire'), '', $mainmenu, 'suppliers_bills_draft');
1478
-				$newmenu->add("/fourn/facture/list.php?leftmenu=suppliers_bills_notpaid&amp;search_status=1", $langs->trans("BillShortStatusNotPaid"), 2, $user->hasRight('fournisseur',  'facture', 'lire'), '', $mainmenu, 'suppliers_bills_notpaid');
1479
-				$newmenu->add("/fourn/facture/list.php?leftmenu=suppliers_bills_paid&amp;search_status=2", $langs->trans("BillShortStatusPaid"), 2, $user->hasRight('fournisseur',  'facture', 'lire'), '', $mainmenu, 'suppliers_bills_paid');
1477
+				$newmenu->add("/fourn/facture/list.php?leftmenu=suppliers_bills_draft&amp;search_status=0", $langs->trans("BillShortStatusDraft"), 2, $user->hasRight('fournisseur', 'facture', 'lire'), '', $mainmenu, 'suppliers_bills_draft');
1478
+				$newmenu->add("/fourn/facture/list.php?leftmenu=suppliers_bills_notpaid&amp;search_status=1", $langs->trans("BillShortStatusNotPaid"), 2, $user->hasRight('fournisseur', 'facture', 'lire'), '', $mainmenu, 'suppliers_bills_notpaid');
1479
+				$newmenu->add("/fourn/facture/list.php?leftmenu=suppliers_bills_paid&amp;search_status=2", $langs->trans("BillShortStatusPaid"), 2, $user->hasRight('fournisseur', 'facture', 'lire'), '', $mainmenu, 'suppliers_bills_paid');
1480 1480
 			}
1481 1481
 
1482
-			$newmenu->add("/fourn/facture/list-rec.php?leftmenu=supplierinvoicestemplate_list", $langs->trans("ListOfTemplates"), 1, $user->hasRight('fournisseur',  'facture', 'lire'), '', $mainmenu, 'supplierinvoicestemplate_list');
1482
+			$newmenu->add("/fourn/facture/list-rec.php?leftmenu=supplierinvoicestemplate_list", $langs->trans("ListOfTemplates"), 1, $user->hasRight('fournisseur', 'facture', 'lire'), '', $mainmenu, 'supplierinvoicestemplate_list');
1483 1483
 
1484
-			$newmenu->add("/fourn/paiement/list.php?leftmenu=suppliers_bills_payment", $langs->trans("Payments"), 1, $user->hasRight('fournisseur',  'facture', 'lire'), '', $mainmenu, 'suppliers_bills_payment');
1484
+			$newmenu->add("/fourn/paiement/list.php?leftmenu=suppliers_bills_payment", $langs->trans("Payments"), 1, $user->hasRight('fournisseur', 'facture', 'lire'), '', $mainmenu, 'suppliers_bills_payment');
1485 1485
 
1486 1486
 			if ($usemenuhider || empty($leftmenu) || preg_match('/suppliers_bills/', $leftmenu)) {
1487
-				$newmenu->add("/fourn/facture/rapport.php?leftmenu=suppliers_bills_payment_report", $langs->trans("Reportings"), 2, $user->hasRight('fournisseur',  'facture', 'lire'), '', $mainmenu, 'suppliers_bills_payment_report');
1487
+				$newmenu->add("/fourn/facture/rapport.php?leftmenu=suppliers_bills_payment_report", $langs->trans("Reportings"), 2, $user->hasRight('fournisseur', 'facture', 'lire'), '', $mainmenu, 'suppliers_bills_payment_report');
1488 1488
 			}
1489 1489
 
1490
-			$newmenu->add("/compta/facture/stats/index.php?mode=supplier&amp;leftmenu=suppliers_bills_stats", $langs->trans("Statistics"), 1, $user->hasRight('fournisseur',  'facture', 'lire'), '', $mainmenu, 'suppliers_bills_stats');
1490
+			$newmenu->add("/compta/facture/stats/index.php?mode=supplier&amp;leftmenu=suppliers_bills_stats", $langs->trans("Statistics"), 1, $user->hasRight('fournisseur', 'facture', 'lire'), '', $mainmenu, 'suppliers_bills_stats');
1491 1491
 		}
1492 1492
 
1493 1493
 		// Orders
1494 1494
 		if (isModEnabled('commande')) {
1495 1495
 			$langs->load("orders");
1496 1496
 			if (isModEnabled('facture')) {
1497
-				$newmenu->add("/commande/list.php?leftmenu=orders&amp;search_status=-3&amp;billed=0&amp;contextpage=billableorders", $langs->trans("MenuOrdersToBill2"), 0, $user->hasRight('commande',  'lire'), '', $mainmenu, 'orders', 0, '', '', '', img_picto('', 'order', 'class="paddingright pictofixedwidth"'));
1497
+				$newmenu->add("/commande/list.php?leftmenu=orders&amp;search_status=-3&amp;billed=0&amp;contextpage=billableorders", $langs->trans("MenuOrdersToBill2"), 0, $user->hasRight('commande', 'lire'), '', $mainmenu, 'orders', 0, '', '', '', img_picto('', 'order', 'class="paddingright pictofixedwidth"'));
1498 1498
 			}
1499 1499
 			//if ($usemenuhider || empty($leftmenu) || $leftmenu=="orders") $newmenu->add("/commande/", $langs->trans("StatusOrderToBill"), 1, $user->hasRight('commande',  'lire'));
1500 1500
 		}
@@ -1503,7 +1503,7 @@  discard block
 block discarded – undo
1503 1503
 		if (isModEnabled('supplier_invoice')) {
1504 1504
 			if (!empty($conf->global->SUPPLIER_MENU_ORDER_RECEIVED_INTO_INVOICE)) {
1505 1505
 				$langs->load("supplier");
1506
-				$newmenu->add("/fourn/commande/list.php?leftmenu=orders&amp;search_status=5&amp;billed=0", $langs->trans("MenuOrdersSupplierToBill"), 0, $user->hasRight('commande',  'lire'), '', $mainmenu, 'orders', 0, '', '', '', img_picto('', 'supplier_order', 'class="paddingright pictofixedwidth"'));
1506
+				$newmenu->add("/fourn/commande/list.php?leftmenu=orders&amp;search_status=5&amp;billed=0", $langs->trans("MenuOrdersSupplierToBill"), 0, $user->hasRight('commande', 'lire'), '', $mainmenu, 'orders', 0, '', '', '', img_picto('', 'supplier_order', 'class="paddingright pictofixedwidth"'));
1507 1507
 				//if ($usemenuhider || empty($leftmenu) || $leftmenu=="orders") $newmenu->add("/commande/", $langs->trans("StatusOrderToBill"), 1, $user->hasRight('commande',  'lire'));
1508 1508
 			}
1509 1509
 		}
@@ -1512,58 +1512,58 @@  discard block
 block discarded – undo
1512 1512
 		// Donations
1513 1513
 		if (isModEnabled('don')) {
1514 1514
 			$langs->load("donations");
1515
-			$newmenu->add("/don/index.php?leftmenu=donations&amp;mainmenu=billing", $langs->trans("Donations"), 0, $user->hasRight('don',  'lire'), '', $mainmenu, 'donations', 0, '', '', '', img_picto('', 'donation', 'class="paddingright pictofixedwidth"'));
1515
+			$newmenu->add("/don/index.php?leftmenu=donations&amp;mainmenu=billing", $langs->trans("Donations"), 0, $user->hasRight('don', 'lire'), '', $mainmenu, 'donations', 0, '', '', '', img_picto('', 'donation', 'class="paddingright pictofixedwidth"'));
1516 1516
 			if ($usemenuhider || empty($leftmenu) || $leftmenu == "donations") {
1517
-				$newmenu->add("/don/card.php?leftmenu=donations&amp;action=create", $langs->trans("NewDonation"), 1, $user->hasRight('don',  'creer'));
1518
-				$newmenu->add("/don/list.php?leftmenu=donations", $langs->trans("List"), 1, $user->hasRight('don',  'lire'));
1517
+				$newmenu->add("/don/card.php?leftmenu=donations&amp;action=create", $langs->trans("NewDonation"), 1, $user->hasRight('don', 'creer'));
1518
+				$newmenu->add("/don/list.php?leftmenu=donations", $langs->trans("List"), 1, $user->hasRight('don', 'lire'));
1519 1519
 			}
1520 1520
 			// if ($leftmenu=="donations") $newmenu->add("/don/stats/index.php",$langs->trans("Statistics"), 1, $user->hasRight('don',  'lire'));
1521 1521
 		}
1522 1522
 
1523 1523
 		// Taxes and social contributions
1524 1524
 		if (isModEnabled('tax')) {
1525
-			$newmenu->add("/compta/charges/index.php?leftmenu=tax&amp;mainmenu=billing", $langs->trans("MenuTaxesAndSpecialExpenses"), 0, $user->hasRight('tax',  'charges', 'lire'), '', $mainmenu, 'tax', 0, '', '', '', img_picto('', 'payment', 'class="paddingright pictofixedwidth"'));
1525
+			$newmenu->add("/compta/charges/index.php?leftmenu=tax&amp;mainmenu=billing", $langs->trans("MenuTaxesAndSpecialExpenses"), 0, $user->hasRight('tax', 'charges', 'lire'), '', $mainmenu, 'tax', 0, '', '', '', img_picto('', 'payment', 'class="paddingright pictofixedwidth"'));
1526 1526
 
1527
-			$newmenu->add("/compta/sociales/list.php?leftmenu=tax_social", $langs->trans("MenuSocialContributions"), 1, $user->hasRight('tax',  'charges', 'lire'));
1527
+			$newmenu->add("/compta/sociales/list.php?leftmenu=tax_social", $langs->trans("MenuSocialContributions"), 1, $user->hasRight('tax', 'charges', 'lire'));
1528 1528
 			if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_social/i', $leftmenu)) {
1529
-				$newmenu->add("/compta/sociales/card.php?leftmenu=tax_social&action=create", $langs->trans("MenuNewSocialContribution"), 2, $user->hasRight('tax',  'charges', 'creer'));
1530
-				$newmenu->add("/compta/sociales/list.php?leftmenu=tax_social", $langs->trans("List"), 2, $user->hasRight('tax',  'charges', 'lire'));
1531
-				$newmenu->add("/compta/sociales/payments.php?leftmenu=tax_social&amp;mainmenu=billing", $langs->trans("Payments"), 2, $user->hasRight('tax',  'charges', 'lire'));
1529
+				$newmenu->add("/compta/sociales/card.php?leftmenu=tax_social&action=create", $langs->trans("MenuNewSocialContribution"), 2, $user->hasRight('tax', 'charges', 'creer'));
1530
+				$newmenu->add("/compta/sociales/list.php?leftmenu=tax_social", $langs->trans("List"), 2, $user->hasRight('tax', 'charges', 'lire'));
1531
+				$newmenu->add("/compta/sociales/payments.php?leftmenu=tax_social&amp;mainmenu=billing", $langs->trans("Payments"), 2, $user->hasRight('tax', 'charges', 'lire'));
1532 1532
 			}
1533 1533
 			// VAT
1534 1534
 			if (empty($conf->global->TAX_DISABLE_VAT_MENUS)) {
1535 1535
 				global $mysoc;
1536 1536
 
1537
-				$newmenu->add("/compta/tva/list.php?leftmenu=tax_vat&amp;mainmenu=billing", $langs->transcountry("VAT", $mysoc->country_code), 1, $user->hasRight('tax',  'charges', 'lire'), '', $mainmenu, 'tax_vat');
1537
+				$newmenu->add("/compta/tva/list.php?leftmenu=tax_vat&amp;mainmenu=billing", $langs->transcountry("VAT", $mysoc->country_code), 1, $user->hasRight('tax', 'charges', 'lire'), '', $mainmenu, 'tax_vat');
1538 1538
 				if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_vat/i', $leftmenu)) {
1539
-					$newmenu->add("/compta/tva/card.php?leftmenu=tax_vat&action=create", $langs->trans("New"), 2, $user->hasRight('tax',  'charges', 'creer'));
1540
-					$newmenu->add("/compta/tva/list.php?leftmenu=tax_vat", $langs->trans("List"), 2, $user->hasRight('tax',  'charges', 'lire'));
1541
-					$newmenu->add("/compta/tva/payments.php?mode=tvaonly&amp;leftmenu=tax_vat", $langs->trans("Payments"), 2, $user->hasRight('tax',  'charges', 'lire'));
1542
-					$newmenu->add("/compta/tva/index.php?leftmenu=tax_vat", $langs->trans("ReportByMonth"), 2, $user->hasRight('tax',  'charges', 'lire'));
1543
-					$newmenu->add("/compta/tva/clients.php?leftmenu=tax_vat", $langs->trans("ReportByThirdparties"), 2, $user->hasRight('tax',  'charges', 'lire'));
1544
-					$newmenu->add("/compta/tva/quadri_detail.php?leftmenu=tax_vat", $langs->trans("ReportByQuarter"), 2, $user->hasRight('tax',  'charges', 'lire'));
1539
+					$newmenu->add("/compta/tva/card.php?leftmenu=tax_vat&action=create", $langs->trans("New"), 2, $user->hasRight('tax', 'charges', 'creer'));
1540
+					$newmenu->add("/compta/tva/list.php?leftmenu=tax_vat", $langs->trans("List"), 2, $user->hasRight('tax', 'charges', 'lire'));
1541
+					$newmenu->add("/compta/tva/payments.php?mode=tvaonly&amp;leftmenu=tax_vat", $langs->trans("Payments"), 2, $user->hasRight('tax', 'charges', 'lire'));
1542
+					$newmenu->add("/compta/tva/index.php?leftmenu=tax_vat", $langs->trans("ReportByMonth"), 2, $user->hasRight('tax', 'charges', 'lire'));
1543
+					$newmenu->add("/compta/tva/clients.php?leftmenu=tax_vat", $langs->trans("ReportByThirdparties"), 2, $user->hasRight('tax', 'charges', 'lire'));
1544
+					$newmenu->add("/compta/tva/quadri_detail.php?leftmenu=tax_vat", $langs->trans("ReportByQuarter"), 2, $user->hasRight('tax', 'charges', 'lire'));
1545 1545
 				}
1546 1546
 
1547 1547
 				//Local Taxes 1
1548 1548
 				if ($mysoc->useLocalTax(1) && (isset($mysoc->localtax1_assuj) && $mysoc->localtax1_assuj == "1")) {
1549
-					$newmenu->add("/compta/localtax/list.php?leftmenu=tax_1_vat&amp;mainmenu=billing&amp;localTaxType=1", $langs->transcountry("LT1", $mysoc->country_code), 1, $user->hasRight('tax',  'charges', 'lire'));
1549
+					$newmenu->add("/compta/localtax/list.php?leftmenu=tax_1_vat&amp;mainmenu=billing&amp;localTaxType=1", $langs->transcountry("LT1", $mysoc->country_code), 1, $user->hasRight('tax', 'charges', 'lire'));
1550 1550
 					if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_1_vat/i', $leftmenu)) {
1551
-						$newmenu->add("/compta/localtax/card.php?leftmenu=tax_1_vat&action=create&amp;localTaxType=1", $langs->trans("New"), 2, $user->hasRight('tax',  'charges', 'creer'));
1552
-						$newmenu->add("/compta/localtax/list.php?leftmenu=tax_1_vat&amp;localTaxType=1", $langs->trans("List"), 2, $user->hasRight('tax',  'charges', 'lire'));
1553
-						$newmenu->add("/compta/localtax/index.php?leftmenu=tax_1_vat&amp;localTaxType=1", $langs->trans("ReportByMonth"), 2, $user->hasRight('tax',  'charges', 'lire'));
1554
-						$newmenu->add("/compta/localtax/clients.php?leftmenu=tax_1_vat&amp;localTaxType=1", $langs->trans("ReportByThirdparties"), 2, $user->hasRight('tax',  'charges', 'lire'));
1555
-						$newmenu->add("/compta/localtax/quadri_detail.php?leftmenu=tax_1_vat&amp;localTaxType=1", $langs->trans("ReportByQuarter"), 2, $user->hasRight('tax',  'charges', 'lire'));
1551
+						$newmenu->add("/compta/localtax/card.php?leftmenu=tax_1_vat&action=create&amp;localTaxType=1", $langs->trans("New"), 2, $user->hasRight('tax', 'charges', 'creer'));
1552
+						$newmenu->add("/compta/localtax/list.php?leftmenu=tax_1_vat&amp;localTaxType=1", $langs->trans("List"), 2, $user->hasRight('tax', 'charges', 'lire'));
1553
+						$newmenu->add("/compta/localtax/index.php?leftmenu=tax_1_vat&amp;localTaxType=1", $langs->trans("ReportByMonth"), 2, $user->hasRight('tax', 'charges', 'lire'));
1554
+						$newmenu->add("/compta/localtax/clients.php?leftmenu=tax_1_vat&amp;localTaxType=1", $langs->trans("ReportByThirdparties"), 2, $user->hasRight('tax', 'charges', 'lire'));
1555
+						$newmenu->add("/compta/localtax/quadri_detail.php?leftmenu=tax_1_vat&amp;localTaxType=1", $langs->trans("ReportByQuarter"), 2, $user->hasRight('tax', 'charges', 'lire'));
1556 1556
 					}
1557 1557
 				}
1558 1558
 				//Local Taxes 2
1559 1559
 				if ($mysoc->useLocalTax(2) && (isset($mysoc->localtax2_assuj) && $mysoc->localtax2_assuj == "1")) {
1560
-					$newmenu->add("/compta/localtax/list.php?leftmenu=tax_2_vat&amp;mainmenu=billing&amp;localTaxType=2", $langs->transcountry("LT2", $mysoc->country_code), 1, $user->hasRight('tax',  'charges', 'lire'));
1560
+					$newmenu->add("/compta/localtax/list.php?leftmenu=tax_2_vat&amp;mainmenu=billing&amp;localTaxType=2", $langs->transcountry("LT2", $mysoc->country_code), 1, $user->hasRight('tax', 'charges', 'lire'));
1561 1561
 					if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_2_vat/i', $leftmenu)) {
1562
-						$newmenu->add("/compta/localtax/card.php?leftmenu=tax_2_vat&action=create&amp;localTaxType=2", $langs->trans("New"), 2, $user->hasRight('tax',  'charges', 'creer'));
1563
-						$newmenu->add("/compta/localtax/list.php?leftmenu=tax_2_vat&amp;localTaxType=2", $langs->trans("List"), 2, $user->hasRight('tax',  'charges', 'lire'));
1564
-						$newmenu->add("/compta/localtax/index.php?leftmenu=tax_2_vat&amp;localTaxType=2", $langs->trans("ReportByMonth"), 2, $user->hasRight('tax',  'charges', 'lire'));
1565
-						$newmenu->add("/compta/localtax/clients.php?leftmenu=tax_2_vat&amp;localTaxType=2", $langs->trans("ReportByThirdparties"), 2, $user->hasRight('tax',  'charges', 'lire'));
1566
-						$newmenu->add("/compta/localtax/quadri_detail.php?leftmenu=tax_2_vat&amp;localTaxType=2", $langs->trans("ReportByQuarter"), 2, $user->hasRight('tax',  'charges', 'lire'));
1562
+						$newmenu->add("/compta/localtax/card.php?leftmenu=tax_2_vat&action=create&amp;localTaxType=2", $langs->trans("New"), 2, $user->hasRight('tax', 'charges', 'creer'));
1563
+						$newmenu->add("/compta/localtax/list.php?leftmenu=tax_2_vat&amp;localTaxType=2", $langs->trans("List"), 2, $user->hasRight('tax', 'charges', 'lire'));
1564
+						$newmenu->add("/compta/localtax/index.php?leftmenu=tax_2_vat&amp;localTaxType=2", $langs->trans("ReportByMonth"), 2, $user->hasRight('tax', 'charges', 'lire'));
1565
+						$newmenu->add("/compta/localtax/clients.php?leftmenu=tax_2_vat&amp;localTaxType=2", $langs->trans("ReportByThirdparties"), 2, $user->hasRight('tax', 'charges', 'lire'));
1566
+						$newmenu->add("/compta/localtax/quadri_detail.php?leftmenu=tax_2_vat&amp;localTaxType=2", $langs->trans("ReportByQuarter"), 2, $user->hasRight('tax', 'charges', 'lire'));
1567 1567
 					}
1568 1568
 				}
1569 1569
 			}
@@ -1572,21 +1572,21 @@  discard block
 block discarded – undo
1572 1572
 		// Salaries
1573 1573
 		if (isModEnabled('salaries')) {
1574 1574
 			$langs->load("salaries");
1575
-			$newmenu->add("/salaries/list.php?leftmenu=tax_salary&amp;mainmenu=billing", $langs->trans("Salaries"), 0, $user->hasRight('salaries',  'read'), '', $mainmenu, 'tax_salary', 0, '', '', '', img_picto('', 'salary', 'class="paddingright pictofixedwidth"'));
1575
+			$newmenu->add("/salaries/list.php?leftmenu=tax_salary&amp;mainmenu=billing", $langs->trans("Salaries"), 0, $user->hasRight('salaries', 'read'), '', $mainmenu, 'tax_salary', 0, '', '', '', img_picto('', 'salary', 'class="paddingright pictofixedwidth"'));
1576 1576
 			if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_salary/i', $leftmenu)) {
1577
-				$newmenu->add("/salaries/card.php?leftmenu=tax_salary&action=create", $langs->trans("New"), 1, $user->hasRight('salaries',  'write'));
1578
-				$newmenu->add("/salaries/list.php?leftmenu=tax_salary", $langs->trans("List"), 1, $user->hasRight('salaries',  'read'));
1579
-				$newmenu->add("/salaries/payments.php?leftmenu=tax_salary", $langs->trans("Payments"), 1, $user->hasRight('salaries',  'read'));
1580
-				$newmenu->add("/salaries/stats/index.php?leftmenu=tax_salary", $langs->trans("Statistics"), 1, $user->hasRight('salaries',  'read'));
1577
+				$newmenu->add("/salaries/card.php?leftmenu=tax_salary&action=create", $langs->trans("New"), 1, $user->hasRight('salaries', 'write'));
1578
+				$newmenu->add("/salaries/list.php?leftmenu=tax_salary", $langs->trans("List"), 1, $user->hasRight('salaries', 'read'));
1579
+				$newmenu->add("/salaries/payments.php?leftmenu=tax_salary", $langs->trans("Payments"), 1, $user->hasRight('salaries', 'read'));
1580
+				$newmenu->add("/salaries/stats/index.php?leftmenu=tax_salary", $langs->trans("Statistics"), 1, $user->hasRight('salaries', 'read'));
1581 1581
 			}
1582 1582
 		}
1583 1583
 
1584 1584
 		// Loan
1585 1585
 		if (isModEnabled('loan')) {
1586 1586
 			$langs->load("loan");
1587
-			$newmenu->add("/loan/list.php?leftmenu=tax_loan&amp;mainmenu=billing", $langs->trans("Loans"), 0, $user->hasRight('loan',  'read'), '', $mainmenu, 'tax_loan', 0, '', '', '', img_picto('', 'loan', 'class="paddingright pictofixedwidth"'));
1587
+			$newmenu->add("/loan/list.php?leftmenu=tax_loan&amp;mainmenu=billing", $langs->trans("Loans"), 0, $user->hasRight('loan', 'read'), '', $mainmenu, 'tax_loan', 0, '', '', '', img_picto('', 'loan', 'class="paddingright pictofixedwidth"'));
1588 1588
 			if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_loan/i', $leftmenu)) {
1589
-				$newmenu->add("/loan/card.php?leftmenu=tax_loan&action=create", $langs->trans("NewLoan"), 1, $user->hasRight('loan',  'write'));
1589
+				$newmenu->add("/loan/card.php?leftmenu=tax_loan&action=create", $langs->trans("NewLoan"), 1, $user->hasRight('loan', 'write'));
1590 1590
 				//$newmenu->add("/loan/payment/list.php?leftmenu=tax_loan",$langs->trans("Payments"),2,$user->hasRight('loan',  'read'));
1591 1591
 			}
1592 1592
 		}
@@ -1594,10 +1594,10 @@  discard block
 block discarded – undo
1594 1594
 		// Various payment
1595 1595
 		if (isModEnabled('banque') && empty($conf->global->BANK_USE_OLD_VARIOUS_PAYMENT)) {
1596 1596
 			$langs->load("banks");
1597
-			$newmenu->add("/compta/bank/various_payment/list.php?leftmenu=tax_various&amp;mainmenu=billing", $langs->trans("MenuVariousPayment"), 0, $user->hasRight('banque',  'lire'), '', $mainmenu, 'tax_various', 0, '', '', '', img_picto('', 'payment', 'class="paddingright pictofixedwidth"'));
1597
+			$newmenu->add("/compta/bank/various_payment/list.php?leftmenu=tax_various&amp;mainmenu=billing", $langs->trans("MenuVariousPayment"), 0, $user->hasRight('banque', 'lire'), '', $mainmenu, 'tax_various', 0, '', '', '', img_picto('', 'payment', 'class="paddingright pictofixedwidth"'));
1598 1598
 			if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_various/i', $leftmenu)) {
1599
-				$newmenu->add("/compta/bank/various_payment/card.php?leftmenu=tax_various&action=create", $langs->trans("New"), 1, $user->hasRight('banque',  'modifier'));
1600
-				$newmenu->add("/compta/bank/various_payment/list.php?leftmenu=tax_various", $langs->trans("List"), 1, $user->hasRight('banque',  'lire'));
1599
+				$newmenu->add("/compta/bank/various_payment/card.php?leftmenu=tax_various&action=create", $langs->trans("New"), 1, $user->hasRight('banque', 'modifier'));
1600
+				$newmenu->add("/compta/bank/various_payment/list.php?leftmenu=tax_various", $langs->trans("List"), 1, $user->hasRight('banque', 'lire'));
1601 1601
 			}
1602 1602
 		}
1603 1603
 	}
@@ -1627,71 +1627,71 @@  discard block
 block discarded – undo
1627 1627
 			//$newmenu->add("/accountancy/index.php?leftmenu=accountancy", $langs->trans("MenuAccountancy"), 0, $permtoshowmenu, '', $mainmenu, 'accountancy');
1628 1628
 
1629 1629
 			// Configuration
1630
-			$newmenu->add("/accountancy/index.php?leftmenu=accountancy_admin", $langs->trans("Setup"), 0, $user->hasRight('accounting',  'chartofaccount'), '', $mainmenu, 'accountancy_admin', 1, '', '', '', img_picto('', 'technic', 'class="paddingright pictofixedwidth"'));
1630
+			$newmenu->add("/accountancy/index.php?leftmenu=accountancy_admin", $langs->trans("Setup"), 0, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin', 1, '', '', '', img_picto('', 'technic', 'class="paddingright pictofixedwidth"'));
1631 1631
 			if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_admin/', $leftmenu)) {
1632 1632
 				global $mysoc;
1633
-				$newmenu->add("/accountancy/admin/index.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("General"), 1, $user->hasRight('accounting',  'chartofaccount'), '', $mainmenu, 'accountancy_admin_general', 10);
1633
+				$newmenu->add("/accountancy/admin/index.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("General"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_general', 10);
1634 1634
 
1635 1635
 				// Fiscal year - Not really yet used. In a future will lock some periods.
1636 1636
 				if ($conf->global->MAIN_FEATURES_LEVEL > 1) {
1637
-					$newmenu->add("/accountancy/admin/fiscalyear.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("FiscalPeriod"), 1, $user->hasRight('accounting',  'fiscalyear', 'write'), '', $mainmenu, 'fiscalyear', 20);
1637
+					$newmenu->add("/accountancy/admin/fiscalyear.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("FiscalPeriod"), 1, $user->hasRight('accounting', 'fiscalyear', 'write'), '', $mainmenu, 'fiscalyear', 20);
1638 1638
 				}
1639 1639
 
1640
-				$newmenu->add("/accountancy/admin/journals_list.php?id=35&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("AccountingJournals"), 1, $user->hasRight('accounting',  'chartofaccount'), '', $mainmenu, 'accountancy_admin_journal', 30);
1641
-				$newmenu->add("/accountancy/admin/accountmodel.php?id=31&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("Pcg_version"), 1, $user->hasRight('accounting',  'chartofaccount'), '', $mainmenu, 'accountancy_admin_chartmodel', 40);
1642
-				$newmenu->add("/accountancy/admin/account.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("Chartofaccounts"), 1, $user->hasRight('accounting',  'chartofaccount'), '', $mainmenu, 'accountancy_admin_chart', 41);
1643
-				$newmenu->add("/accountancy/admin/subaccount.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("ChartOfSubaccounts"), 1, $user->hasRight('accounting',  'chartofaccount'), '', $mainmenu, 'accountancy_admin_chart', 41);
1644
-				$newmenu->add("/accountancy/admin/defaultaccounts.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuDefaultAccounts"), 1, $user->hasRight('accounting',  'chartofaccount'), '', $mainmenu, 'accountancy_admin_default', 60);
1640
+				$newmenu->add("/accountancy/admin/journals_list.php?id=35&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("AccountingJournals"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_journal', 30);
1641
+				$newmenu->add("/accountancy/admin/accountmodel.php?id=31&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("Pcg_version"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_chartmodel', 40);
1642
+				$newmenu->add("/accountancy/admin/account.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("Chartofaccounts"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_chart', 41);
1643
+				$newmenu->add("/accountancy/admin/subaccount.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("ChartOfSubaccounts"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_chart', 41);
1644
+				$newmenu->add("/accountancy/admin/defaultaccounts.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuDefaultAccounts"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_default', 60);
1645 1645
 				if (isModEnabled('banque')) {
1646
-					$newmenu->add("/compta/bank/list.php?mainmenu=accountancy&leftmenu=accountancy_admin&search_status=-1", $langs->trans("MenuBankAccounts"), 1, $user->hasRight('accounting',  'chartofaccount'), '', $mainmenu, 'accountancy_admin_bank', 70);
1646
+					$newmenu->add("/compta/bank/list.php?mainmenu=accountancy&leftmenu=accountancy_admin&search_status=-1", $langs->trans("MenuBankAccounts"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_bank', 70);
1647 1647
 				}
1648 1648
 				if (isModEnabled('facture') || isModEnabled('supplier_invoice')) {
1649
-					$newmenu->add("/admin/dict.php?id=10&from=accountancy&search_country_id=".$mysoc->country_id."&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuVatAccounts"), 1, $user->hasRight('accounting',  'chartofaccount'), '', $mainmenu, 'accountancy_admin_default', 80);
1649
+					$newmenu->add("/admin/dict.php?id=10&from=accountancy&search_country_id=".$mysoc->country_id."&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuVatAccounts"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_default', 80);
1650 1650
 				}
1651 1651
 				if (isModEnabled('tax')) {
1652
-					$newmenu->add("/admin/dict.php?id=7&from=accountancy&search_country_id=".$mysoc->country_id."&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuTaxAccounts"), 1, $user->hasRight('accounting',  'chartofaccount'), '', $mainmenu, 'accountancy_admin_default', 90);
1652
+					$newmenu->add("/admin/dict.php?id=7&from=accountancy&search_country_id=".$mysoc->country_id."&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuTaxAccounts"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_default', 90);
1653 1653
 				}
1654 1654
 				if (isModEnabled('expensereport')) {
1655
-					$newmenu->add("/admin/dict.php?id=17&from=accountancy&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuExpenseReportAccounts"), 1, $user->hasRight('accounting',  'chartofaccount'), '', $mainmenu, 'accountancy_admin_default', 100);
1655
+					$newmenu->add("/admin/dict.php?id=17&from=accountancy&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuExpenseReportAccounts"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_default', 100);
1656 1656
 				}
1657
-				$newmenu->add("/accountancy/admin/productaccount.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuProductsAccounts"), 1, $user->hasRight('accounting',  'chartofaccount'), '', $mainmenu, 'accountancy_admin_product', 110);
1657
+				$newmenu->add("/accountancy/admin/productaccount.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuProductsAccounts"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_product', 110);
1658 1658
 				if ($conf->global->MAIN_FEATURES_LEVEL > 1) {
1659
-					$newmenu->add("/accountancy/admin/closure.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuClosureAccounts"), 1, $user->hasRight('accounting',  'chartofaccount'), '', $mainmenu, 'accountancy_admin_closure', 120);
1659
+					$newmenu->add("/accountancy/admin/closure.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuClosureAccounts"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_closure', 120);
1660 1660
 				}
1661
-				$newmenu->add("/accountancy/admin/categories_list.php?id=32&search_country_id=".$mysoc->country_id."&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("AccountingCategory"), 1, $user->hasRight('accounting',  'chartofaccount'), '', $mainmenu, 'accountancy_admin_chart', 125);
1662
-				$newmenu->add("/accountancy/admin/export.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("ExportOptions"), 1, $user->hasRight('accounting',  'chartofaccount'), '', $mainmenu, 'accountancy_admin_export', 130);
1661
+				$newmenu->add("/accountancy/admin/categories_list.php?id=32&search_country_id=".$mysoc->country_id."&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("AccountingCategory"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_chart', 125);
1662
+				$newmenu->add("/accountancy/admin/export.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("ExportOptions"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_export', 130);
1663 1663
 			}
1664 1664
 
1665 1665
 			// Transfer in accounting
1666
-			$newmenu->add("/accountancy/index.php?leftmenu=accountancy_transfer", $langs->trans("TransferInAccounting"), 0, $user->hasRight('accounting',  'bind', 'write'), '', $mainmenu, 'transfer', 1, '', '', '', img_picto('', 'long-arrow-alt-right', 'class="paddingright pictofixedwidth"'));
1666
+			$newmenu->add("/accountancy/index.php?leftmenu=accountancy_transfer", $langs->trans("TransferInAccounting"), 0, $user->hasRight('accounting', 'bind', 'write'), '', $mainmenu, 'transfer', 1, '', '', '', img_picto('', 'long-arrow-alt-right', 'class="paddingright pictofixedwidth"'));
1667 1667
 
1668 1668
 			// Binding
1669 1669
 			// $newmenu->add("", $langs->trans("Binding"), 0, $user->hasRight('accounting',  'bind', 'write'), '', $mainmenu, 'dispatch');
1670 1670
 			if (isModEnabled('facture') && empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_SALES)) {
1671
-				$newmenu->add("/accountancy/customer/index.php?leftmenu=accountancy_dispatch_customer&amp;mainmenu=accountancy", $langs->trans("CustomersVentilation"), 1, $user->hasRight('accounting',  'bind', 'write'), '', $mainmenu, 'dispatch_customer');
1671
+				$newmenu->add("/accountancy/customer/index.php?leftmenu=accountancy_dispatch_customer&amp;mainmenu=accountancy", $langs->trans("CustomersVentilation"), 1, $user->hasRight('accounting', 'bind', 'write'), '', $mainmenu, 'dispatch_customer');
1672 1672
 				if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_dispatch_customer/', $leftmenu)) {
1673
-					$newmenu->add("/accountancy/customer/list.php?mainmenu=accountancy&amp;leftmenu=accountancy_dispatch_customer", $langs->trans("ToBind"), 2, $user->hasRight('accounting',  'bind', 'write'));
1674
-					$newmenu->add("/accountancy/customer/lines.php?mainmenu=accountancy&amp;leftmenu=accountancy_dispatch_customer", $langs->trans("Binded"), 2, $user->hasRight('accounting',  'bind', 'write'));
1673
+					$newmenu->add("/accountancy/customer/list.php?mainmenu=accountancy&amp;leftmenu=accountancy_dispatch_customer", $langs->trans("ToBind"), 2, $user->hasRight('accounting', 'bind', 'write'));
1674
+					$newmenu->add("/accountancy/customer/lines.php?mainmenu=accountancy&amp;leftmenu=accountancy_dispatch_customer", $langs->trans("Binded"), 2, $user->hasRight('accounting', 'bind', 'write'));
1675 1675
 				}
1676 1676
 			}
1677 1677
 			if (isModEnabled('supplier_invoice') && empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_PURCHASES)) {
1678
-				$newmenu->add("/accountancy/supplier/index.php?leftmenu=accountancy_dispatch_supplier&amp;mainmenu=accountancy", $langs->trans("SuppliersVentilation"), 1, $user->hasRight('accounting',  'bind', 'write'), '', $mainmenu, 'dispatch_supplier');
1678
+				$newmenu->add("/accountancy/supplier/index.php?leftmenu=accountancy_dispatch_supplier&amp;mainmenu=accountancy", $langs->trans("SuppliersVentilation"), 1, $user->hasRight('accounting', 'bind', 'write'), '', $mainmenu, 'dispatch_supplier');
1679 1679
 				if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_dispatch_supplier/', $leftmenu)) {
1680
-					$newmenu->add("/accountancy/supplier/list.php?mainmenu=accountancy&amp;leftmenu=accountancy_dispatch_supplier", $langs->trans("ToBind"), 2, $user->hasRight('accounting',  'bind', 'write'));
1681
-					$newmenu->add("/accountancy/supplier/lines.php?mainmenu=accountancy&amp;leftmenu=accountancy_dispatch_supplier", $langs->trans("Binded"), 2, $user->hasRight('accounting',  'bind', 'write'));
1680
+					$newmenu->add("/accountancy/supplier/list.php?mainmenu=accountancy&amp;leftmenu=accountancy_dispatch_supplier", $langs->trans("ToBind"), 2, $user->hasRight('accounting', 'bind', 'write'));
1681
+					$newmenu->add("/accountancy/supplier/lines.php?mainmenu=accountancy&amp;leftmenu=accountancy_dispatch_supplier", $langs->trans("Binded"), 2, $user->hasRight('accounting', 'bind', 'write'));
1682 1682
 				}
1683 1683
 			}
1684 1684
 			if (isModEnabled('expensereport') && empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS)) {
1685
-				$newmenu->add("/accountancy/expensereport/index.php?leftmenu=accountancy_dispatch_expensereport&amp;mainmenu=accountancy", $langs->trans("ExpenseReportsVentilation"), 1, $user->hasRight('accounting',  'bind', 'write'), '', $mainmenu, 'dispatch_expensereport');
1685
+				$newmenu->add("/accountancy/expensereport/index.php?leftmenu=accountancy_dispatch_expensereport&amp;mainmenu=accountancy", $langs->trans("ExpenseReportsVentilation"), 1, $user->hasRight('accounting', 'bind', 'write'), '', $mainmenu, 'dispatch_expensereport');
1686 1686
 				if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_dispatch_expensereport/', $leftmenu)) {
1687
-					$newmenu->add("/accountancy/expensereport/list.php?mainmenu=accountancy&amp;leftmenu=accountancy_dispatch_expensereport", $langs->trans("ToBind"), 2, $user->hasRight('accounting',  'bind', 'write'));
1688
-					$newmenu->add("/accountancy/expensereport/lines.php?mainmenu=accountancy&amp;leftmenu=accountancy_dispatch_expensereport", $langs->trans("Binded"), 2, $user->hasRight('accounting',  'bind', 'write'));
1687
+					$newmenu->add("/accountancy/expensereport/list.php?mainmenu=accountancy&amp;leftmenu=accountancy_dispatch_expensereport", $langs->trans("ToBind"), 2, $user->hasRight('accounting', 'bind', 'write'));
1688
+					$newmenu->add("/accountancy/expensereport/lines.php?mainmenu=accountancy&amp;leftmenu=accountancy_dispatch_expensereport", $langs->trans("Binded"), 2, $user->hasRight('accounting', 'bind', 'write'));
1689 1689
 				}
1690 1690
 			}
1691 1691
 
1692 1692
 			// Journals
1693
-			if (isModEnabled('accounting') && $user->hasRight('accounting',  'comptarapport', 'lire') && $mainmenu == 'accountancy') {
1694
-				$newmenu->add('', $langs->trans("RegistrationInAccounting"), 1, $user->hasRight('accounting',  'comptarapport', 'lire'), '', $mainmenu, 'accountancy_journal');
1693
+			if (isModEnabled('accounting') && $user->hasRight('accounting', 'comptarapport', 'lire') && $mainmenu == 'accountancy') {
1694
+				$newmenu->add('', $langs->trans("RegistrationInAccounting"), 1, $user->hasRight('accounting', 'comptarapport', 'lire'), '', $mainmenu, 'accountancy_journal');
1695 1695
 
1696 1696
 				// Multi journal
1697 1697
 				$sql = "SELECT rowid, code, label, nature";
@@ -1727,7 +1727,7 @@  discard block
 block discarded – undo
1727 1727
 								$nature = "expensereports";
1728 1728
 							}
1729 1729
 							if ($objp->nature == 1 && isModEnabled('asset')) {
1730
-								$nature = "various";	// Warning: The page /accountancy/journal/variousjournal.php is bugged. It read tables that does not exists.
1730
+								$nature = "various"; // Warning: The page /accountancy/journal/variousjournal.php is bugged. It read tables that does not exists.
1731 1731
 							}
1732 1732
 							if ($objp->nature == 8) {
1733 1733
 								$nature = "inventory";
@@ -1751,16 +1751,16 @@  discard block
 block discarded – undo
1751 1751
 									$journallabel = '<span class="opacitymedium">('.$langs->trans($objp->label).')</span>'; // Label of bank account in llx_accounting_journal
1752 1752
 								}
1753 1753
 
1754
-								$key = $langs->trans("AccountingJournalType".$objp->nature);	// $objp->nature is 1, 2, 3 ...
1755
-								$transferlabel = (($objp->nature && $key != "AccountingJournalType".$objp->nature) ? $key.($journallabelwithoutspan != $key ? ' '.$journallabel : ''): $journallabel);
1754
+								$key = $langs->trans("AccountingJournalType".$objp->nature); // $objp->nature is 1, 2, 3 ...
1755
+								$transferlabel = (($objp->nature && $key != "AccountingJournalType".$objp->nature) ? $key.($journallabelwithoutspan != $key ? ' '.$journallabel : '') : $journallabel);
1756 1756
 
1757
-								$newmenu->add('/accountancy/journal/'.$nature.'journal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal='.$objp->rowid, $transferlabel, 2, $user->hasRight('accounting',  'comptarapport', 'lire'));
1757
+								$newmenu->add('/accountancy/journal/'.$nature.'journal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal='.$objp->rowid, $transferlabel, 2, $user->hasRight('accounting', 'comptarapport', 'lire'));
1758 1758
 							}
1759 1759
 							$i++;
1760 1760
 						}
1761 1761
 					} else {
1762 1762
 						// Should not happend. Entries are added
1763
-						$newmenu->add('', $langs->trans("NoJournalDefined"), 2, $user->hasRight('accounting',  'comptarapport', 'lire'));
1763
+						$newmenu->add('', $langs->trans("NoJournalDefined"), 2, $user->hasRight('accounting', 'comptarapport', 'lire'));
1764 1764
 					}
1765 1765
 				} else {
1766 1766
 					dol_print_error($db);
@@ -1770,48 +1770,48 @@  discard block
 block discarded – undo
1770 1770
 
1771 1771
 			// Files
1772 1772
 			if (empty($conf->global->ACCOUNTANCY_HIDE_EXPORT_FILES_MENU)) {
1773
-				$newmenu->add("/compta/accounting-files.php?mainmenu=accountancy&amp;leftmenu=accountancy_files", $langs->trans("AccountantFiles"), 1, $user->hasRight('accounting',  'mouvements', 'lire'));
1773
+				$newmenu->add("/compta/accounting-files.php?mainmenu=accountancy&amp;leftmenu=accountancy_files", $langs->trans("AccountantFiles"), 1, $user->hasRight('accounting', 'mouvements', 'lire'));
1774 1774
 			}
1775 1775
 
1776 1776
 
1777 1777
 			// Accounting
1778
-			$newmenu->add("/accountancy/index.php?leftmenu=accountancy_accountancy", $langs->trans("MenuAccountancy"), 0, $user->hasRight('accounting',  'mouvements', 'lire') || $user->hasRight('accounting',  'comptarapport', 'lire'), '', $mainmenu, 'accountancy', 1, '', '', '', img_picto('', 'accountancy', 'class="paddingright pictofixedwidth"'));
1778
+			$newmenu->add("/accountancy/index.php?leftmenu=accountancy_accountancy", $langs->trans("MenuAccountancy"), 0, $user->hasRight('accounting', 'mouvements', 'lire') || $user->hasRight('accounting', 'comptarapport', 'lire'), '', $mainmenu, 'accountancy', 1, '', '', '', img_picto('', 'accountancy', 'class="paddingright pictofixedwidth"'));
1779 1779
 
1780 1780
 			// General Ledger
1781
-			$newmenu->add("/accountancy/bookkeeping/listbyaccount.php?mainmenu=accountancy&amp;leftmenu=accountancy_accountancy", $langs->trans("Bookkeeping"), 1, $user->hasRight('accounting',  'mouvements', 'lire'));
1781
+			$newmenu->add("/accountancy/bookkeeping/listbyaccount.php?mainmenu=accountancy&amp;leftmenu=accountancy_accountancy", $langs->trans("Bookkeeping"), 1, $user->hasRight('accounting', 'mouvements', 'lire'));
1782 1782
 
1783 1783
 			// Journals
1784
-			$newmenu->add("/accountancy/bookkeeping/list.php?mainmenu=accountancy&amp;leftmenu=accountancy_accountancy", $langs->trans("Journals"), 1, $user->hasRight('accounting',  'mouvements', 'lire'));
1784
+			$newmenu->add("/accountancy/bookkeeping/list.php?mainmenu=accountancy&amp;leftmenu=accountancy_accountancy", $langs->trans("Journals"), 1, $user->hasRight('accounting', 'mouvements', 'lire'));
1785 1785
 
1786 1786
 			// Account Balance
1787
-			$newmenu->add("/accountancy/bookkeeping/balance.php?mainmenu=accountancy&amp;leftmenu=accountancy_accountancy", $langs->trans("AccountBalance"), 1, $user->hasRight('accounting',  'mouvements', 'lire'));
1787
+			$newmenu->add("/accountancy/bookkeeping/balance.php?mainmenu=accountancy&amp;leftmenu=accountancy_accountancy", $langs->trans("AccountBalance"), 1, $user->hasRight('accounting', 'mouvements', 'lire'));
1788 1788
 
1789 1789
 			// Export accountancy
1790
-			$newmenu->add("/accountancy/bookkeeping/export.php?mainmenu=accountancy&amp;leftmenu=accountancy_accountancy", $langs->trans("MenuExportAccountancy"), 1, $user->hasRight('accounting',  'mouvements', 'lire'));
1790
+			$newmenu->add("/accountancy/bookkeeping/export.php?mainmenu=accountancy&amp;leftmenu=accountancy_accountancy", $langs->trans("MenuExportAccountancy"), 1, $user->hasRight('accounting', 'mouvements', 'lire'));
1791 1791
 
1792 1792
 			// Closure
1793
-			$newmenu->add("/accountancy/closure/index.php?mainmenu=accountancy&amp;leftmenu=accountancy_closure", $langs->trans("MenuAccountancyClosure"), 1, $user->hasRight('accounting',  'fiscalyear', 'write'), '', $mainmenu, 'closure');
1793
+			$newmenu->add("/accountancy/closure/index.php?mainmenu=accountancy&amp;leftmenu=accountancy_closure", $langs->trans("MenuAccountancyClosure"), 1, $user->hasRight('accounting', 'fiscalyear', 'write'), '', $mainmenu, 'closure');
1794 1794
 
1795 1795
 			// Reports
1796
-			$newmenu->add("/accountancy/index.php?leftmenu=accountancy_report", $langs->trans("Reportings"), 1, $user->hasRight('accounting',  'comptarapport', 'lire'), '', $mainmenu, 'ca');
1796
+			$newmenu->add("/accountancy/index.php?leftmenu=accountancy_report", $langs->trans("Reportings"), 1, $user->hasRight('accounting', 'comptarapport', 'lire'), '', $mainmenu, 'ca');
1797 1797
 
1798 1798
 			if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_report/', $leftmenu)) {
1799
-				$newmenu->add("/compta/resultat/index.php?leftmenu=accountancy_report", $langs->trans("MenuReportInOut"), 2, $user->hasRight('accounting',  'comptarapport', 'lire'));
1800
-				$newmenu->add("/compta/resultat/clientfourn.php?leftmenu=accountancy_report", $langs->trans("ByPredefinedAccountGroups"), 3, $user->hasRight('accounting',  'comptarapport', 'lire'));
1801
-				$newmenu->add("/compta/resultat/result.php?leftmenu=accountancy_report", $langs->trans("ByPersonalizedAccountGroups"), 3, $user->hasRight('accounting',  'comptarapport', 'lire'));
1799
+				$newmenu->add("/compta/resultat/index.php?leftmenu=accountancy_report", $langs->trans("MenuReportInOut"), 2, $user->hasRight('accounting', 'comptarapport', 'lire'));
1800
+				$newmenu->add("/compta/resultat/clientfourn.php?leftmenu=accountancy_report", $langs->trans("ByPredefinedAccountGroups"), 3, $user->hasRight('accounting', 'comptarapport', 'lire'));
1801
+				$newmenu->add("/compta/resultat/result.php?leftmenu=accountancy_report", $langs->trans("ByPersonalizedAccountGroups"), 3, $user->hasRight('accounting', 'comptarapport', 'lire'));
1802 1802
 			}
1803 1803
 
1804 1804
 			$modecompta = 'CREANCES-DETTES';
1805
-			if (isModEnabled('accounting') && $user->hasRight('accounting',  'comptarapport', 'lire') && $mainmenu == 'accountancy') {
1805
+			if (isModEnabled('accounting') && $user->hasRight('accounting', 'comptarapport', 'lire') && $mainmenu == 'accountancy') {
1806 1806
 				$modecompta = 'BOOKKEEPING'; // Not yet implemented. Should be BOOKKEEPINGCOLLECTED
1807 1807
 			}
1808 1808
 			if ($modecompta) {
1809 1809
 				if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_report/', $leftmenu)) {
1810
-					$newmenu->add("/compta/stats/index.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ReportTurnover"), 2, $user->hasRight('accounting',  'comptarapport', 'lire'));
1811
-					$newmenu->add("/compta/stats/casoc.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 3, $user->hasRight('accounting',  'comptarapport', 'lire'));
1812
-					$newmenu->add("/compta/stats/cabyuser.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByUsers"), 3, $user->hasRight('accounting',  'comptarapport', 'lire'));
1813
-					$newmenu->add("/compta/stats/cabyprodserv.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByProductsAndServices"), 3, $user->hasRight('accounting',  'comptarapport', 'lire'));
1814
-					$newmenu->add("/compta/stats/byratecountry.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByVatRate"), 3, $user->hasRight('accounting',  'comptarapport', 'lire'));
1810
+					$newmenu->add("/compta/stats/index.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ReportTurnover"), 2, $user->hasRight('accounting', 'comptarapport', 'lire'));
1811
+					$newmenu->add("/compta/stats/casoc.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 3, $user->hasRight('accounting', 'comptarapport', 'lire'));
1812
+					$newmenu->add("/compta/stats/cabyuser.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByUsers"), 3, $user->hasRight('accounting', 'comptarapport', 'lire'));
1813
+					$newmenu->add("/compta/stats/cabyprodserv.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByProductsAndServices"), 3, $user->hasRight('accounting', 'comptarapport', 'lire'));
1814
+					$newmenu->add("/compta/stats/byratecountry.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByVatRate"), 3, $user->hasRight('accounting', 'comptarapport', 'lire'));
1815 1815
 				}
1816 1816
 			}
1817 1817
 
@@ -1819,34 +1819,34 @@  discard block
 block discarded – undo
1819 1819
 			//if (isModEnabled('accounting') && $user->hasRight('accounting',  'comptarapport', 'lire') && $mainmenu == 'accountancy') $modecompta='';	// Not yet implemented. Should be BOOKKEEPINGCOLLECTED
1820 1820
 			if ($modecompta) {
1821 1821
 				if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_report/', $leftmenu)) {
1822
-					$newmenu->add("/compta/stats/index.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ReportTurnoverCollected"), 2, $user->hasRight('accounting',  'comptarapport', 'lire'));
1823
-					$newmenu->add("/compta/stats/casoc.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 3, $user->hasRight('accounting',  'comptarapport', 'lire'));
1824
-					$newmenu->add("/compta/stats/cabyuser.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByUsers"), 3, $user->hasRight('accounting',  'comptarapport', 'lire'));
1822
+					$newmenu->add("/compta/stats/index.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ReportTurnoverCollected"), 2, $user->hasRight('accounting', 'comptarapport', 'lire'));
1823
+					$newmenu->add("/compta/stats/casoc.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 3, $user->hasRight('accounting', 'comptarapport', 'lire'));
1824
+					$newmenu->add("/compta/stats/cabyuser.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByUsers"), 3, $user->hasRight('accounting', 'comptarapport', 'lire'));
1825 1825
 					//$newmenu->add("/compta/stats/cabyprodserv.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByProductsAndServices"),3,$user->hasRight('accounting',  'comptarapport', 'lire'));
1826 1826
 					//$newmenu->add("/compta/stats/byratecountry.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByVatRate"),3,$user->hasRight('accounting',  'comptarapport', 'lire'));
1827 1827
 				}
1828 1828
 			}
1829 1829
 
1830 1830
 			$modecompta = 'CREANCES-DETTES';
1831
-			if (isModEnabled('accounting') && $user->hasRight('accounting',  'comptarapport', 'lire') && $mainmenu == 'accountancy') {
1831
+			if (isModEnabled('accounting') && $user->hasRight('accounting', 'comptarapport', 'lire') && $mainmenu == 'accountancy') {
1832 1832
 				$modecompta = 'BOOKKEEPING'; // Not yet implemented.
1833 1833
 			}
1834 1834
 			if ($modecompta && isModEnabled('supplier_invoice')) {
1835 1835
 				if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_report/', $leftmenu)) {
1836
-					$newmenu->add("/compta/stats/supplier_turnover.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ReportPurchaseTurnover"), 2, $user->hasRight('accounting',  'comptarapport', 'lire'));
1837
-					$newmenu->add("/compta/stats/supplier_turnover_by_thirdparty.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 3, $user->hasRight('accounting',  'comptarapport', 'lire'));
1838
-					$newmenu->add("/compta/stats/supplier_turnover_by_prodserv.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByProductsAndServices"), 3, $user->hasRight('accounting',  'comptarapport', 'lire'));
1836
+					$newmenu->add("/compta/stats/supplier_turnover.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ReportPurchaseTurnover"), 2, $user->hasRight('accounting', 'comptarapport', 'lire'));
1837
+					$newmenu->add("/compta/stats/supplier_turnover_by_thirdparty.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 3, $user->hasRight('accounting', 'comptarapport', 'lire'));
1838
+					$newmenu->add("/compta/stats/supplier_turnover_by_prodserv.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByProductsAndServices"), 3, $user->hasRight('accounting', 'comptarapport', 'lire'));
1839 1839
 				}
1840 1840
 			}
1841 1841
 
1842 1842
 			$modecompta = 'RECETTES-DEPENSES';
1843
-			if (isModEnabled('accounting') && $user->hasRight('accounting',  'comptarapport', 'lire') && $mainmenu == 'accountancy') {
1843
+			if (isModEnabled('accounting') && $user->hasRight('accounting', 'comptarapport', 'lire') && $mainmenu == 'accountancy') {
1844 1844
 				$modecompta = 'BOOKKEEPINGCOLLECTED'; // Not yet implemented.
1845 1845
 			}
1846 1846
 			if ($modecompta && ((isModEnabled('fournisseur') && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled('supplier_invoice'))) {
1847 1847
 				if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_report/', $leftmenu)) {
1848
-					$newmenu->add("/compta/stats/supplier_turnover.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ReportPurchaseTurnoverCollected"), 2, $user->hasRight('accounting',  'comptarapport', 'lire'));
1849
-					$newmenu->add("/compta/stats/supplier_turnover_by_thirdparty.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 3, $user->hasRight('accounting',  'comptarapport', 'lire'));
1848
+					$newmenu->add("/compta/stats/supplier_turnover.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ReportPurchaseTurnoverCollected"), 2, $user->hasRight('accounting', 'comptarapport', 'lire'));
1849
+					$newmenu->add("/compta/stats/supplier_turnover_by_thirdparty.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 3, $user->hasRight('accounting', 'comptarapport', 'lire'));
1850 1850
 				}
1851 1851
 			}
1852 1852
 		}
@@ -1855,15 +1855,15 @@  discard block
 block discarded – undo
1855 1855
 		if (isModEnabled('comptabilite')) {
1856 1856
 			// Files
1857 1857
 			if (empty($conf->global->ACCOUNTANCY_HIDE_EXPORT_FILES_MENU)) {
1858
-				$newmenu->add("/compta/accounting-files.php?mainmenu=accountancy&leftmenu=accountancy_files", $langs->trans("AccountantFiles"), 0, $user->hasRight('compta',  'resultat', 'lire'), '', $mainmenu, 'files', 0, '', '', '', img_picto('', 'accountancy', 'class="paddingright pictofixedwidth"'));
1858
+				$newmenu->add("/compta/accounting-files.php?mainmenu=accountancy&leftmenu=accountancy_files", $langs->trans("AccountantFiles"), 0, $user->hasRight('compta', 'resultat', 'lire'), '', $mainmenu, 'files', 0, '', '', '', img_picto('', 'accountancy', 'class="paddingright pictofixedwidth"'));
1859 1859
 			}
1860 1860
 
1861 1861
 			// Bilan, resultats
1862
-			$newmenu->add("/compta/resultat/index.php?leftmenu=report&mainmenu=accountancy", $langs->trans("Reportings"), 0, $user->hasRight('compta',  'resultat', 'lire'), '', $mainmenu, 'ca', 0, '', '', '', img_picto('', 'accountancy', 'class="paddingright pictofixedwidth"'));
1862
+			$newmenu->add("/compta/resultat/index.php?leftmenu=report&mainmenu=accountancy", $langs->trans("Reportings"), 0, $user->hasRight('compta', 'resultat', 'lire'), '', $mainmenu, 'ca', 0, '', '', '', img_picto('', 'accountancy', 'class="paddingright pictofixedwidth"'));
1863 1863
 
1864 1864
 			if ($usemenuhider || empty($leftmenu) || preg_match('/report/', $leftmenu)) {
1865
-				$newmenu->add("/compta/resultat/index.php?leftmenu=report", $langs->trans("MenuReportInOut"), 1, $user->hasRight('compta',  'resultat', 'lire'));
1866
-				$newmenu->add("/compta/resultat/clientfourn.php?leftmenu=report", $langs->trans("ByCompanies"), 2, $user->hasRight('compta',  'resultat', 'lire'));
1865
+				$newmenu->add("/compta/resultat/index.php?leftmenu=report", $langs->trans("MenuReportInOut"), 1, $user->hasRight('compta', 'resultat', 'lire'));
1866
+				$newmenu->add("/compta/resultat/clientfourn.php?leftmenu=report", $langs->trans("ByCompanies"), 2, $user->hasRight('compta', 'resultat', 'lire'));
1867 1867
 				/* On verra ca avec module compabilite expert
1868 1868
 				 $newmenu->add("/compta/resultat/compteres.php?leftmenu=report","Compte de resultat",2,$user->hasRight('compta',  'resultat', 'lire'));
1869 1869
 				 $newmenu->add("/compta/resultat/bilan.php?leftmenu=report","Bilan",2,$user->hasRight('compta',  'resultat', 'lire'));
@@ -1878,22 +1878,22 @@  discard block
 block discarded – undo
1878 1878
 				 */
1879 1879
 
1880 1880
 				$modecompta = 'CREANCES-DETTES';
1881
-				$newmenu->add("/compta/stats/index.php?leftmenu=report&modecompta=".$modecompta, $langs->trans("ReportTurnover"), 1, $user->hasRight('compta',  'resultat', 'lire'));
1882
-				$newmenu->add("/compta/stats/casoc.php?leftmenu=report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 2, $user->hasRight('compta',  'resultat', 'lire'));
1883
-				$newmenu->add("/compta/stats/cabyuser.php?leftmenu=report&modecompta=".$modecompta, $langs->trans("ByUsers"), 2, $user->hasRight('compta',  'resultat', 'lire'));
1884
-				$newmenu->add("/compta/stats/cabyprodserv.php?leftmenu=report&modecompta=".$modecompta, $langs->trans("ByProductsAndServices"), 2, $user->hasRight('compta',  'resultat', 'lire'));
1885
-				$newmenu->add("/compta/stats/byratecountry.php?leftmenu=report&modecompta=".$modecompta, $langs->trans("ByVatRate"), 2, $user->hasRight('compta',  'resultat', 'lire'));
1881
+				$newmenu->add("/compta/stats/index.php?leftmenu=report&modecompta=".$modecompta, $langs->trans("ReportTurnover"), 1, $user->hasRight('compta', 'resultat', 'lire'));
1882
+				$newmenu->add("/compta/stats/casoc.php?leftmenu=report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 2, $user->hasRight('compta', 'resultat', 'lire'));
1883
+				$newmenu->add("/compta/stats/cabyuser.php?leftmenu=report&modecompta=".$modecompta, $langs->trans("ByUsers"), 2, $user->hasRight('compta', 'resultat', 'lire'));
1884
+				$newmenu->add("/compta/stats/cabyprodserv.php?leftmenu=report&modecompta=".$modecompta, $langs->trans("ByProductsAndServices"), 2, $user->hasRight('compta', 'resultat', 'lire'));
1885
+				$newmenu->add("/compta/stats/byratecountry.php?leftmenu=report&modecompta=".$modecompta, $langs->trans("ByVatRate"), 2, $user->hasRight('compta', 'resultat', 'lire'));
1886 1886
 
1887 1887
 				$modecompta = 'RECETTES-DEPENSES';
1888
-				$newmenu->add("/compta/stats/index.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ReportTurnoverCollected"), 1, $user->hasRight('compta',  'resultat', 'lire'));
1889
-				$newmenu->add("/compta/stats/casoc.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 2, $user->hasRight('compta',  'resultat', 'lire'));
1890
-				$newmenu->add("/compta/stats/cabyuser.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByUsers"), 2, $user->hasRight('compta',  'resultat', 'lire'));
1888
+				$newmenu->add("/compta/stats/index.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ReportTurnoverCollected"), 1, $user->hasRight('compta', 'resultat', 'lire'));
1889
+				$newmenu->add("/compta/stats/casoc.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 2, $user->hasRight('compta', 'resultat', 'lire'));
1890
+				$newmenu->add("/compta/stats/cabyuser.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByUsers"), 2, $user->hasRight('compta', 'resultat', 'lire'));
1891 1891
 
1892 1892
 				//Achats
1893 1893
 				$modecompta = 'CREANCES-DETTES';
1894
-				$newmenu->add("/compta/stats/supplier_turnover.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ReportPurchaseTurnover"), 1, $user->hasRight('compta',  'resultat', 'lire'));
1895
-				$newmenu->add("/compta/stats/supplier_turnover_by_thirdparty.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 2, $user->hasRight('compta',  'resultat', 'lire'));
1896
-				$newmenu->add("/compta/stats/supplier_turnover_by_prodserv.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByProductsAndServices"), 2, $user->hasRight('compta',  'resultat', 'lire'));
1894
+				$newmenu->add("/compta/stats/supplier_turnover.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ReportPurchaseTurnover"), 1, $user->hasRight('compta', 'resultat', 'lire'));
1895
+				$newmenu->add("/compta/stats/supplier_turnover_by_thirdparty.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 2, $user->hasRight('compta', 'resultat', 'lire'));
1896
+				$newmenu->add("/compta/stats/supplier_turnover_by_prodserv.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByProductsAndServices"), 2, $user->hasRight('compta', 'resultat', 'lire'));
1897 1897
 
1898 1898
 				/*
1899 1899
 				 $modecompta = 'RECETTES-DEPENSES';
@@ -1903,31 +1903,31 @@  discard block
 block discarded – undo
1903 1903
 				 */
1904 1904
 
1905 1905
 				// Journals
1906
-				$newmenu->add("/compta/journal/sellsjournal.php?leftmenu=report", $langs->trans("SellsJournal"), 1, $user->hasRight('compta',  'resultat', 'lire'), '', '', '', 50);
1907
-				$newmenu->add("/compta/journal/purchasesjournal.php?leftmenu=report", $langs->trans("PurchasesJournal"), 1, $user->hasRight('compta',  'resultat', 'lire'), '', '', '', 51);
1906
+				$newmenu->add("/compta/journal/sellsjournal.php?leftmenu=report", $langs->trans("SellsJournal"), 1, $user->hasRight('compta', 'resultat', 'lire'), '', '', '', 50);
1907
+				$newmenu->add("/compta/journal/purchasesjournal.php?leftmenu=report", $langs->trans("PurchasesJournal"), 1, $user->hasRight('compta', 'resultat', 'lire'), '', '', '', 51);
1908 1908
 			}
1909 1909
 			//if ($leftmenu=="ca") $newmenu->add("/compta/journaux/index.php?leftmenu=ca",$langs->trans("Journals"),1,$user->hasRight('compta',  'resultat', 'lire')||$user->hasRight('accounting',  'comptarapport', 'lire'));
1910 1910
 		}
1911 1911
 
1912 1912
 		// Intracomm report
1913 1913
 		if (isModEnabled('intracommreport')) {
1914
-			$newmenu->add("/intracommreport/list.php?leftmenu=intracommreport", $langs->trans("MenuIntracommReport"), 0, $user->hasRight('intracommreport',  'read'), '', $mainmenu, 'intracommreport', 60, '', '', '', img_picto('', 'intracommreport', 'class="paddingright pictofixedwidth"'));
1914
+			$newmenu->add("/intracommreport/list.php?leftmenu=intracommreport", $langs->trans("MenuIntracommReport"), 0, $user->hasRight('intracommreport', 'read'), '', $mainmenu, 'intracommreport', 60, '', '', '', img_picto('', 'intracommreport', 'class="paddingright pictofixedwidth"'));
1915 1915
 			if ($usemenuhider || empty($leftmenu) || preg_match('/intracommreport/', $leftmenu)) {
1916 1916
 				// DEB / DES
1917
-				$newmenu->add("/intracommreport/card.php?action=create&leftmenu=intracommreport", $langs->trans("MenuIntracommReportNew"), 1, $user->hasRight('intracommreport',  'write'), '', $mainmenu, 'intracommreport', 1);
1918
-				$newmenu->add("/intracommreport/list.php?leftmenu=intracommreport", $langs->trans("MenuIntracommReportList"), 1, $user->hasRight('intracommreport',  'read'), '', $mainmenu, 'intracommreport', 1);
1917
+				$newmenu->add("/intracommreport/card.php?action=create&leftmenu=intracommreport", $langs->trans("MenuIntracommReportNew"), 1, $user->hasRight('intracommreport', 'write'), '', $mainmenu, 'intracommreport', 1);
1918
+				$newmenu->add("/intracommreport/list.php?leftmenu=intracommreport", $langs->trans("MenuIntracommReportList"), 1, $user->hasRight('intracommreport', 'read'), '', $mainmenu, 'intracommreport', 1);
1919 1919
 			}
1920 1920
 		}
1921 1921
 
1922 1922
 		// Assets
1923 1923
 		if (isModEnabled('asset')) {
1924
-			$newmenu->add("/asset/list.php?leftmenu=asset&amp;mainmenu=accountancy", $langs->trans("MenuAssets"), 0, $user->hasRight('asset',  'read'), '', $mainmenu, 'asset', 100, '', '', '', img_picto('', 'payment', 'class="paddingright pictofixedwidth"'));
1925
-			$newmenu->add("/asset/card.php?leftmenu=asset&amp;action=create", $langs->trans("MenuNewAsset"), 1, $user->hasRight('asset',  'write'));
1926
-			$newmenu->add("/asset/list.php?leftmenu=asset&amp;mainmenu=accountancy", $langs->trans("MenuListAssets"), 1, $user->hasRight('asset',  'read'));
1927
-			$newmenu->add("/asset/model/list.php?leftmenu=asset_model", $langs->trans("MenuAssetModels"), 1, (empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('asset',  'read')) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('asset',  'model_advance', 'read')), '', $mainmenu, 'asset_model');
1924
+			$newmenu->add("/asset/list.php?leftmenu=asset&amp;mainmenu=accountancy", $langs->trans("MenuAssets"), 0, $user->hasRight('asset', 'read'), '', $mainmenu, 'asset', 100, '', '', '', img_picto('', 'payment', 'class="paddingright pictofixedwidth"'));
1925
+			$newmenu->add("/asset/card.php?leftmenu=asset&amp;action=create", $langs->trans("MenuNewAsset"), 1, $user->hasRight('asset', 'write'));
1926
+			$newmenu->add("/asset/list.php?leftmenu=asset&amp;mainmenu=accountancy", $langs->trans("MenuListAssets"), 1, $user->hasRight('asset', 'read'));
1927
+			$newmenu->add("/asset/model/list.php?leftmenu=asset_model", $langs->trans("MenuAssetModels"), 1, (empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('asset', 'read')) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('asset', 'model_advance', 'read')), '', $mainmenu, 'asset_model');
1928 1928
 			if ($usemenuhider || empty($leftmenu) || preg_match('/asset_model/', $leftmenu)) {
1929
-				$newmenu->add("/asset/model/card.php?leftmenu=asset_model&amp;action=create", $langs->trans("MenuNewAssetModel"), 2, (empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('asset',  'write')) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('asset',  'model_advance', 'write')));
1930
-				$newmenu->add("/asset/model/list.php?leftmenu=asset_model", $langs->trans("MenuListAssetModels"), 2, (empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('asset',  'read')) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('asset',  'model_advance', 'read')));
1929
+				$newmenu->add("/asset/model/card.php?leftmenu=asset_model&amp;action=create", $langs->trans("MenuNewAssetModel"), 2, (empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('asset', 'write')) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('asset', 'model_advance', 'write')));
1930
+				$newmenu->add("/asset/model/list.php?leftmenu=asset_model", $langs->trans("MenuListAssetModels"), 2, (empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('asset', 'read')) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('asset', 'model_advance', 'read')));
1931 1931
 			}
1932 1932
 		}
1933 1933
 	}
@@ -1953,62 +1953,62 @@  discard block
 block discarded – undo
1953 1953
 
1954 1954
 		// Bank-Cash account
1955 1955
 		if (isModEnabled('banque')) {
1956
-			$newmenu->add("/compta/bank/list.php?leftmenu=bank&amp;mainmenu=bank", $langs->trans("MenuBankCash"), 0, $user->hasRight('banque',  'lire'), '', $mainmenu, 'bank', 0, '', '', '', img_picto('', 'bank_account', 'class="paddingright pictofixedwidth"'));
1956
+			$newmenu->add("/compta/bank/list.php?leftmenu=bank&amp;mainmenu=bank", $langs->trans("MenuBankCash"), 0, $user->hasRight('banque', 'lire'), '', $mainmenu, 'bank', 0, '', '', '', img_picto('', 'bank_account', 'class="paddingright pictofixedwidth"'));
1957 1957
 
1958
-			$newmenu->add("/compta/bank/card.php?action=create", $langs->trans("MenuNewFinancialAccount"), 1, $user->hasRight('banque',  'configurer'));
1959
-			$newmenu->add("/compta/bank/list.php?leftmenu=bank&amp;mainmenu=bank", $langs->trans("List"), 1, $user->hasRight('banque',  'lire'), '', $mainmenu, 'bank');
1960
-			$newmenu->add("/compta/bank/bankentries_list.php", $langs->trans("ListTransactions"), 1, $user->hasRight('banque',  'lire'));
1961
-			$newmenu->add("/compta/bank/budget.php", $langs->trans("ListTransactionsByCategory"), 1, $user->hasRight('banque',  'lire'));
1958
+			$newmenu->add("/compta/bank/card.php?action=create", $langs->trans("MenuNewFinancialAccount"), 1, $user->hasRight('banque', 'configurer'));
1959
+			$newmenu->add("/compta/bank/list.php?leftmenu=bank&amp;mainmenu=bank", $langs->trans("List"), 1, $user->hasRight('banque', 'lire'), '', $mainmenu, 'bank');
1960
+			$newmenu->add("/compta/bank/bankentries_list.php", $langs->trans("ListTransactions"), 1, $user->hasRight('banque', 'lire'));
1961
+			$newmenu->add("/compta/bank/budget.php", $langs->trans("ListTransactionsByCategory"), 1, $user->hasRight('banque', 'lire'));
1962 1962
 
1963
-			$newmenu->add("/compta/bank/transfer.php", $langs->trans("MenuBankInternalTransfer"), 1, $user->hasRight('banque',  'transfer'));
1963
+			$newmenu->add("/compta/bank/transfer.php", $langs->trans("MenuBankInternalTransfer"), 1, $user->hasRight('banque', 'transfer'));
1964 1964
 		}
1965 1965
 
1966 1966
 		if (isModEnabled('categorie')) {
1967 1967
 			$langs->load("categories");
1968
-			$newmenu->add("/categories/index.php?type=5", $langs->trans("Rubriques"), 1, $user->hasRight('categorie',  'creer'), '', $mainmenu, 'tags');
1969
-			$newmenu->add("/compta/bank/categ.php", $langs->trans("RubriquesTransactions"), 1, $user->hasRight('banque',  'configurer'), '', $mainmenu, 'tags');
1968
+			$newmenu->add("/categories/index.php?type=5", $langs->trans("Rubriques"), 1, $user->hasRight('categorie', 'creer'), '', $mainmenu, 'tags');
1969
+			$newmenu->add("/compta/bank/categ.php", $langs->trans("RubriquesTransactions"), 1, $user->hasRight('banque', 'configurer'), '', $mainmenu, 'tags');
1970 1970
 		}
1971 1971
 
1972 1972
 		// Direct debit order
1973 1973
 		if (isModEnabled('prelevement')) {
1974
-			$newmenu->add("/compta/prelevement/index.php?leftmenu=withdraw&amp;mainmenu=bank", $langs->trans("PaymentByDirectDebit"), 0, $user->hasRight('prelevement',  'bons', 'lire'), '', $mainmenu, 'withdraw', 0, '', '', '', img_picto('', 'payment', 'class="paddingright pictofixedwidth"'));
1974
+			$newmenu->add("/compta/prelevement/index.php?leftmenu=withdraw&amp;mainmenu=bank", $langs->trans("PaymentByDirectDebit"), 0, $user->hasRight('prelevement', 'bons', 'lire'), '', $mainmenu, 'withdraw', 0, '', '', '', img_picto('', 'payment', 'class="paddingright pictofixedwidth"'));
1975 1975
 
1976 1976
 			if ($usemenuhider || empty($leftmenu) || $leftmenu == "withdraw") {
1977
-				$newmenu->add("/compta/prelevement/create.php?mainmenu=bank", $langs->trans("NewStandingOrder"), 1, $user->hasRight('prelevement',  'bons', 'creer'));
1977
+				$newmenu->add("/compta/prelevement/create.php?mainmenu=bank", $langs->trans("NewStandingOrder"), 1, $user->hasRight('prelevement', 'bons', 'creer'));
1978 1978
 
1979
-				$newmenu->add("/compta/prelevement/orders_list.php?mainmenu=bank", $langs->trans("WithdrawalsReceipts"), 1, $user->hasRight('prelevement',  'bons', 'lire'));
1980
-				$newmenu->add("/compta/prelevement/list.php?mainmenu=bank", $langs->trans("WithdrawalsLines"), 1, $user->hasRight('prelevement',  'bons', 'lire'));
1981
-				$newmenu->add("/compta/prelevement/rejets.php?mainmenu=bank", $langs->trans("Rejects"), 1, $user->hasRight('prelevement',  'bons', 'lire'));
1982
-				$newmenu->add("/compta/prelevement/stats.php?mainmenu=bank", $langs->trans("Statistics"), 1, $user->hasRight('prelevement',  'bons', 'lire'));
1979
+				$newmenu->add("/compta/prelevement/orders_list.php?mainmenu=bank", $langs->trans("WithdrawalsReceipts"), 1, $user->hasRight('prelevement', 'bons', 'lire'));
1980
+				$newmenu->add("/compta/prelevement/list.php?mainmenu=bank", $langs->trans("WithdrawalsLines"), 1, $user->hasRight('prelevement', 'bons', 'lire'));
1981
+				$newmenu->add("/compta/prelevement/rejets.php?mainmenu=bank", $langs->trans("Rejects"), 1, $user->hasRight('prelevement', 'bons', 'lire'));
1982
+				$newmenu->add("/compta/prelevement/stats.php?mainmenu=bank", $langs->trans("Statistics"), 1, $user->hasRight('prelevement', 'bons', 'lire'));
1983 1983
 			}
1984 1984
 		}
1985 1985
 
1986 1986
 		// Bank transfer order
1987 1987
 		if (isModEnabled('paymentbybanktransfer')) {
1988
-			$newmenu->add("/compta/paymentbybanktransfer/index.php?leftmenu=banktransfer&amp;mainmenu=bank", $langs->trans("PaymentByBankTransfer"), 0, $user->hasRight('paymentbybanktransfer',  'read'), '', $mainmenu, 'banktransfer', 0, '', '', '', img_picto('', 'payment', 'class="paddingright pictofixedwidth"'));
1988
+			$newmenu->add("/compta/paymentbybanktransfer/index.php?leftmenu=banktransfer&amp;mainmenu=bank", $langs->trans("PaymentByBankTransfer"), 0, $user->hasRight('paymentbybanktransfer', 'read'), '', $mainmenu, 'banktransfer', 0, '', '', '', img_picto('', 'payment', 'class="paddingright pictofixedwidth"'));
1989 1989
 
1990 1990
 			if ($usemenuhider || empty($leftmenu) || $leftmenu == "banktransfer") {
1991
-				$newmenu->add("/compta/prelevement/create.php?type=bank-transfer&mainmenu=bank", $langs->trans("NewPaymentByBankTransfer"), 1, $user->hasRight('paymentbybanktransfer',  'create'));
1991
+				$newmenu->add("/compta/prelevement/create.php?type=bank-transfer&mainmenu=bank", $langs->trans("NewPaymentByBankTransfer"), 1, $user->hasRight('paymentbybanktransfer', 'create'));
1992 1992
 
1993
-				$newmenu->add("/compta/prelevement/orders_list.php?type=bank-transfer&mainmenu=bank", $langs->trans("PaymentByBankTransferReceipts"), 1, $user->hasRight('paymentbybanktransfer',  'read'));
1994
-				$newmenu->add("/compta/prelevement/list.php?type=bank-transfer&mainmenu=bank", $langs->trans("PaymentByBankTransferLines"), 1, $user->hasRight('paymentbybanktransfer',  'read'));
1995
-				$newmenu->add("/compta/prelevement/rejets.php?type=bank-transfer&mainmenu=bank", $langs->trans("Rejects"), 1, $user->hasRight('paymentbybanktransfer',  'read'));
1996
-				$newmenu->add("/compta/prelevement/stats.php?type=bank-transfer&mainmenu=bank", $langs->trans("Statistics"), 1, $user->hasRight('paymentbybanktransfer',  'read'));
1993
+				$newmenu->add("/compta/prelevement/orders_list.php?type=bank-transfer&mainmenu=bank", $langs->trans("PaymentByBankTransferReceipts"), 1, $user->hasRight('paymentbybanktransfer', 'read'));
1994
+				$newmenu->add("/compta/prelevement/list.php?type=bank-transfer&mainmenu=bank", $langs->trans("PaymentByBankTransferLines"), 1, $user->hasRight('paymentbybanktransfer', 'read'));
1995
+				$newmenu->add("/compta/prelevement/rejets.php?type=bank-transfer&mainmenu=bank", $langs->trans("Rejects"), 1, $user->hasRight('paymentbybanktransfer', 'read'));
1996
+				$newmenu->add("/compta/prelevement/stats.php?type=bank-transfer&mainmenu=bank", $langs->trans("Statistics"), 1, $user->hasRight('paymentbybanktransfer', 'read'));
1997 1997
 			}
1998 1998
 		}
1999 1999
 
2000 2000
 		// Management of checks
2001 2001
 		if (empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT) && isModEnabled('banque') && (isModEnabled('facture') || !empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON))) {
2002
-			$newmenu->add("/compta/paiement/cheque/index.php?leftmenu=checks&amp;mainmenu=bank", $langs->trans("MenuChequeDeposits"), 0, $user->hasRight('banque',  'cheque'), '', $mainmenu, 'checks', 0, '', '', '', img_picto('', 'payment', 'class="paddingright pictofixedwidth"'));
2002
+			$newmenu->add("/compta/paiement/cheque/index.php?leftmenu=checks&amp;mainmenu=bank", $langs->trans("MenuChequeDeposits"), 0, $user->hasRight('banque', 'cheque'), '', $mainmenu, 'checks', 0, '', '', '', img_picto('', 'payment', 'class="paddingright pictofixedwidth"'));
2003 2003
 			if (preg_match('/checks/', $leftmenu)) {
2004
-				$newmenu->add("/compta/paiement/cheque/card.php?leftmenu=checks_bis&amp;action=new&amp;mainmenu=bank", $langs->trans("NewChequeDeposit"), 1, $user->hasRight('banque',  'cheque'));
2005
-				$newmenu->add("/compta/paiement/cheque/list.php?leftmenu=checks_bis&amp;mainmenu=bank", $langs->trans("List"), 1, $user->hasRight('banque',  'cheque'));
2004
+				$newmenu->add("/compta/paiement/cheque/card.php?leftmenu=checks_bis&amp;action=new&amp;mainmenu=bank", $langs->trans("NewChequeDeposit"), 1, $user->hasRight('banque', 'cheque'));
2005
+				$newmenu->add("/compta/paiement/cheque/list.php?leftmenu=checks_bis&amp;mainmenu=bank", $langs->trans("List"), 1, $user->hasRight('banque', 'cheque'));
2006 2006
 			}
2007 2007
 		}
2008 2008
 
2009 2009
 		// Cash Control
2010 2010
 		if (isModEnabled('takepos') || isModEnabled('cashdesk')) {
2011
-			$permtomakecashfence = ($user->hasRight('cashdesk', 'run')|| $user->hasRight('takepos', 'run'));
2011
+			$permtomakecashfence = ($user->hasRight('cashdesk', 'run') || $user->hasRight('takepos', 'run'));
2012 2012
 			$newmenu->add("/compta/cashcontrol/cashcontrol_list.php?action=list", $langs->trans("POS"), 0, $permtomakecashfence, '', $mainmenu, 'cashcontrol', 0, '', '', '', img_picto('', 'pos', 'class="pictofixedwidth"'));
2013 2013
 			$newmenu->add("/compta/cashcontrol/cashcontrol_card.php?action=create", $langs->trans("NewCashFence"), 1, $permtomakecashfence);
2014 2014
 			$newmenu->add("/compta/cashcontrol/cashcontrol_list.php?action=list", $langs->trans("List"), 1, $permtomakecashfence);
@@ -2033,47 +2033,47 @@  discard block
 block discarded – undo
2033 2033
 	if ($mainmenu == 'products') {
2034 2034
 		// Products
2035 2035
 		if (isModEnabled('product')) {
2036
-			$newmenu->add("/product/index.php?leftmenu=product&amp;type=0", $langs->trans("Products"), 0, $user->hasRight('product',  'read'), '', $mainmenu, 'product', 0, '', '', '', img_picto('', 'product', 'class="pictofixedwidth"'));
2037
-			$newmenu->add("/product/card.php?leftmenu=product&amp;action=create&amp;type=0", $langs->trans("NewProduct"), 1, $user->hasRight('product',  'creer'));
2038
-			$newmenu->add("/product/list.php?leftmenu=product&amp;type=0", $langs->trans("List"), 1, $user->hasRight('product',  'read'));
2036
+			$newmenu->add("/product/index.php?leftmenu=product&amp;type=0", $langs->trans("Products"), 0, $user->hasRight('product', 'read'), '', $mainmenu, 'product', 0, '', '', '', img_picto('', 'product', 'class="pictofixedwidth"'));
2037
+			$newmenu->add("/product/card.php?leftmenu=product&amp;action=create&amp;type=0", $langs->trans("NewProduct"), 1, $user->hasRight('product', 'creer'));
2038
+			$newmenu->add("/product/list.php?leftmenu=product&amp;type=0", $langs->trans("List"), 1, $user->hasRight('product', 'read'));
2039 2039
 			if (isModEnabled('stock')) {
2040
-				$newmenu->add("/product/reassort.php?type=0", $langs->trans("MenuStocks"), 1, $user->hasRight('product',  'read') && $user->hasRight('stock',  'lire'));
2040
+				$newmenu->add("/product/reassort.php?type=0", $langs->trans("MenuStocks"), 1, $user->hasRight('product', 'read') && $user->hasRight('stock', 'lire'));
2041 2041
 			}
2042 2042
 			if (isModEnabled('productbatch')) {
2043 2043
 				$langs->load("stocks");
2044
-				$newmenu->add("/product/reassortlot.php?type=0&search_subjecttolotserial=1", $langs->trans("StocksByLotSerial"), 1, $user->hasRight('product',  'read') && $user->hasRight('stock',  'lire'));
2045
-				$newmenu->add("/product/stock/productlot_list.php", $langs->trans("LotSerial"), 1, $user->hasRight('product',  'read') && $user->hasRight('stock',  'lire'));
2044
+				$newmenu->add("/product/reassortlot.php?type=0&search_subjecttolotserial=1", $langs->trans("StocksByLotSerial"), 1, $user->hasRight('product', 'read') && $user->hasRight('stock', 'lire'));
2045
+				$newmenu->add("/product/stock/productlot_list.php", $langs->trans("LotSerial"), 1, $user->hasRight('product', 'read') && $user->hasRight('stock', 'lire'));
2046 2046
 			}
2047 2047
 			if (isModEnabled('variants')) {
2048
-				$newmenu->add("/variants/list.php", $langs->trans("VariantAttributes"), 1, $user->hasRight('product',  'read'));
2048
+				$newmenu->add("/variants/list.php", $langs->trans("VariantAttributes"), 1, $user->hasRight('product', 'read'));
2049 2049
 			}
2050 2050
 			if (isModEnabled('propal') || isModEnabled('commande') || isModEnabled('facture') || isModEnabled('supplier_proposal') || isModEnabled('supplier_order') || isModEnabled('supplier_invoice')) {
2051
-				$newmenu->add("/product/stats/card.php?id=all&leftmenu=stats&type=0", $langs->trans("Statistics"), 1, $user->hasRight('product',  'read'));
2051
+				$newmenu->add("/product/stats/card.php?id=all&leftmenu=stats&type=0", $langs->trans("Statistics"), 1, $user->hasRight('product', 'read'));
2052 2052
 			}
2053 2053
 
2054 2054
 			// Categories
2055 2055
 			if (isModEnabled('categorie')) {
2056 2056
 				$langs->load("categories");
2057
-				$newmenu->add("/categories/index.php?leftmenu=cat&amp;type=0", $langs->trans("Categories"), 1, $user->hasRight('categorie',  'lire'), '', $mainmenu, 'cat');
2057
+				$newmenu->add("/categories/index.php?leftmenu=cat&amp;type=0", $langs->trans("Categories"), 1, $user->hasRight('categorie', 'lire'), '', $mainmenu, 'cat');
2058 2058
 				//if ($usemenuhider || empty($leftmenu) || $leftmenu=="cat") $newmenu->add("/categories/list.php", $langs->trans("List"), 1, $user->hasRight('categorie',  'lire'));
2059 2059
 			}
2060 2060
 		}
2061 2061
 
2062 2062
 		// Services
2063 2063
 		if (isModEnabled('service')) {
2064
-			$newmenu->add("/product/index.php?leftmenu=service&amp;type=1", $langs->trans("Services"), 0, $user->hasRight('service',  'read'), '', $mainmenu, 'service', 0, '', '', '', img_picto('', 'service', 'class="pictofixedwidth"'));
2065
-			$newmenu->add("/product/card.php?leftmenu=service&amp;action=create&amp;type=1", $langs->trans("NewService"), 1, $user->hasRight('service',  'creer'));
2066
-			$newmenu->add("/product/list.php?leftmenu=service&amp;type=1", $langs->trans("List"), 1, $user->hasRight('service',  'read'));
2064
+			$newmenu->add("/product/index.php?leftmenu=service&amp;type=1", $langs->trans("Services"), 0, $user->hasRight('service', 'read'), '', $mainmenu, 'service', 0, '', '', '', img_picto('', 'service', 'class="pictofixedwidth"'));
2065
+			$newmenu->add("/product/card.php?leftmenu=service&amp;action=create&amp;type=1", $langs->trans("NewService"), 1, $user->hasRight('service', 'creer'));
2066
+			$newmenu->add("/product/list.php?leftmenu=service&amp;type=1", $langs->trans("List"), 1, $user->hasRight('service', 'read'));
2067 2067
 			if (isModEnabled('variants')) {
2068
-				$newmenu->add("/variants/list.php", $langs->trans("VariantAttributes"), 1, $user->hasRight('service',  'read'));
2068
+				$newmenu->add("/variants/list.php", $langs->trans("VariantAttributes"), 1, $user->hasRight('service', 'read'));
2069 2069
 			}
2070 2070
 			if (isModEnabled('propal') || isModEnabled('commande') || isModEnabled('facture') || isModEnabled('supplier_proposal') || isModEnabled('supplier_order') || isModEnabled('supplier_invoice')) {
2071
-				$newmenu->add("/product/stats/card.php?id=all&leftmenu=stats&type=1", $langs->trans("Statistics"), 1, $user->hasRight('service',  'read'));
2071
+				$newmenu->add("/product/stats/card.php?id=all&leftmenu=stats&type=1", $langs->trans("Statistics"), 1, $user->hasRight('service', 'read'));
2072 2072
 			}
2073 2073
 			// Categories
2074 2074
 			if (isModEnabled('categorie')) {
2075 2075
 				$langs->load("categories");
2076
-				$newmenu->add("/categories/index.php?leftmenu=cat&amp;type=0", $langs->trans("Categories"), 1, $user->hasRight('categorie',  'lire'), '', $mainmenu, 'cat');
2076
+				$newmenu->add("/categories/index.php?leftmenu=cat&amp;type=0", $langs->trans("Categories"), 1, $user->hasRight('categorie', 'lire'), '', $mainmenu, 'cat');
2077 2077
 				//if ($usemenuhider || empty($leftmenu) || $leftmenu=="cat") $newmenu->add("/categories/list.php", $langs->trans("List"), 1, $user->hasRight('categorie',  'lire'));
2078 2078
 			}
2079 2079
 		}
@@ -2083,41 +2083,41 @@  discard block
 block discarded – undo
2083 2083
 			$langs->load("stocks");
2084 2084
 			$newmenu->add("/product/stock/index.php?leftmenu=stock", $langs->trans("Warehouses"), 0, $user->hasRight('stock', 'lire'), '', $mainmenu, 'stock', 0, '', '', '', img_picto('', 'stock', 'class="pictofixedwidth"'));
2085 2085
 			$newmenu->add("/product/stock/card.php?action=create", $langs->trans("MenuNewWarehouse"), 1, $user->hasRight('stock', 'creer'));
2086
-			$newmenu->add("/product/stock/list.php", $langs->trans("List"), 1, $user->hasRight('stock',  'lire'));
2086
+			$newmenu->add("/product/stock/list.php", $langs->trans("List"), 1, $user->hasRight('stock', 'lire'));
2087 2087
 			$newmenu->add("/product/stock/movement_list.php", $langs->trans("Movements"), 1, $user->hasRight('stock', 'mouvement', 'lire'));
2088 2088
 
2089 2089
 			$newmenu->add("/product/stock/massstockmove.php?init=1", $langs->trans("MassStockTransferShort"), 1, $user->hasRight('stock', 'mouvement', 'creer'));
2090 2090
 			if (isModEnabled('supplier_order')) {
2091
-				$newmenu->add("/product/stock/replenish.php", $langs->trans("Replenishment"), 1, $user->hasRight('stock', 'mouvement', 'creer') && $user->hasRight('fournisseur',  'lire'));
2091
+				$newmenu->add("/product/stock/replenish.php", $langs->trans("Replenishment"), 1, $user->hasRight('stock', 'mouvement', 'creer') && $user->hasRight('fournisseur', 'lire'));
2092 2092
 			}
2093 2093
 			$newmenu->add("/product/stock/stockatdate.php", $langs->trans("StockAtDate"), 1, $user->hasRight('product', 'read') && $user->hasRight('stock', 'lire'));
2094 2094
 
2095 2095
 			// Categories for warehouses
2096 2096
 			if (isModEnabled('categorie')) {
2097
-				$newmenu->add("/categories/index.php?leftmenu=stock&amp;type=9", $langs->trans("Categories"), 1, $user->hasRight('categorie',  'lire'), '', $mainmenu, 'cat');
2097
+				$newmenu->add("/categories/index.php?leftmenu=stock&amp;type=9", $langs->trans("Categories"), 1, $user->hasRight('categorie', 'lire'), '', $mainmenu, 'cat');
2098 2098
 			}
2099 2099
 		}
2100 2100
 
2101 2101
 		if (isModEnabled('stocktransfer')) {
2102
-			$newmenu->add('/product/stock/stocktransfer/stocktransfer_list.php', $langs->trans("ModuleStockTransferName"), 0, $user->hasRight('stocktransfer',  'stocktransfer', 'read'), '', $mainmenu, 'stocktransfer', 0, '', '', '', img_picto('', 'stock', 'class="pictofixedwidth"'));
2103
-			$newmenu->add('/product/stock/stocktransfer/stocktransfer_card.php?action=create', $langs->trans('StockTransferNew'), 1, $user->hasRight('stocktransfer',  'stocktransfer', 'write'));
2104
-			$newmenu->add('/product/stock/stocktransfer/stocktransfer_list.php', $langs->trans('List'), 1, $user->hasRight('stocktransfer',  'stocktransfer', 'read'));
2102
+			$newmenu->add('/product/stock/stocktransfer/stocktransfer_list.php', $langs->trans("ModuleStockTransferName"), 0, $user->hasRight('stocktransfer', 'stocktransfer', 'read'), '', $mainmenu, 'stocktransfer', 0, '', '', '', img_picto('', 'stock', 'class="pictofixedwidth"'));
2103
+			$newmenu->add('/product/stock/stocktransfer/stocktransfer_card.php?action=create', $langs->trans('StockTransferNew'), 1, $user->hasRight('stocktransfer', 'stocktransfer', 'write'));
2104
+			$newmenu->add('/product/stock/stocktransfer/stocktransfer_list.php', $langs->trans('List'), 1, $user->hasRight('stocktransfer', 'stocktransfer', 'read'));
2105 2105
 		}
2106 2106
 
2107 2107
 		// Inventory
2108 2108
 		if (isModEnabled('stock')) {
2109 2109
 			$langs->load("stocks");
2110 2110
 			if (empty($conf->global->MAIN_USE_ADVANCED_PERMS)) {
2111
-				$newmenu->add("/product/inventory/list.php?leftmenu=stock_inventories", $langs->trans("Inventories"), 0, $user->hasRight('stock',  'lire'), '', $mainmenu, 'stock', 0, '', '', '', img_picto('', 'inventory', 'class="pictofixedwidth"'));
2111
+				$newmenu->add("/product/inventory/list.php?leftmenu=stock_inventories", $langs->trans("Inventories"), 0, $user->hasRight('stock', 'lire'), '', $mainmenu, 'stock', 0, '', '', '', img_picto('', 'inventory', 'class="pictofixedwidth"'));
2112 2112
 				if ($usemenuhider || empty($leftmenu) || $leftmenu == "stock_inventories") {
2113
-					$newmenu->add("/product/inventory/card.php?action=create&leftmenu=stock_inventories", $langs->trans("NewInventory"), 1, $user->hasRight('stock',  'creer'));
2114
-					$newmenu->add("/product/inventory/list.php?leftmenu=stock_inventories", $langs->trans("List"), 1, $user->hasRight('stock',  'lire'));
2113
+					$newmenu->add("/product/inventory/card.php?action=create&leftmenu=stock_inventories", $langs->trans("NewInventory"), 1, $user->hasRight('stock', 'creer'));
2114
+					$newmenu->add("/product/inventory/list.php?leftmenu=stock_inventories", $langs->trans("List"), 1, $user->hasRight('stock', 'lire'));
2115 2115
 				}
2116 2116
 			} else {
2117
-				$newmenu->add("/product/inventory/list.php?leftmenu=stock_inventories", $langs->trans("Inventories"), 0, $user->hasRight('stock',  'inventory_advance', 'read'), '', $mainmenu, 'stock', 0, '', '', '', img_picto('', 'inventory', 'class="pictofixedwidth"'));
2117
+				$newmenu->add("/product/inventory/list.php?leftmenu=stock_inventories", $langs->trans("Inventories"), 0, $user->hasRight('stock', 'inventory_advance', 'read'), '', $mainmenu, 'stock', 0, '', '', '', img_picto('', 'inventory', 'class="pictofixedwidth"'));
2118 2118
 				if ($usemenuhider || empty($leftmenu) || $leftmenu == "stock_inventories") {
2119
-					$newmenu->add("/product/inventory/card.php?action=create&leftmenu=stock_inventories", $langs->trans("NewInventory"), 1, $user->hasRight('stock',  'inventory_advance', 'write'));
2120
-					$newmenu->add("/product/inventory/list.php?leftmenu=stock_inventories", $langs->trans("List"), 1, $user->hasRight('stock',  'inventory_advance', 'read'));
2119
+					$newmenu->add("/product/inventory/card.php?action=create&leftmenu=stock_inventories", $langs->trans("NewInventory"), 1, $user->hasRight('stock', 'inventory_advance', 'write'));
2120
+					$newmenu->add("/product/inventory/list.php?leftmenu=stock_inventories", $langs->trans("List"), 1, $user->hasRight('stock', 'inventory_advance', 'read'));
2121 2121
 				}
2122 2122
 			}
2123 2123
 		}
@@ -2125,33 +2125,33 @@  discard block
 block discarded – undo
2125 2125
 		// Shipments
2126 2126
 		if (isModEnabled('expedition')) {
2127 2127
 			$langs->load("sendings");
2128
-			$newmenu->add("/expedition/index.php?leftmenu=sendings", $langs->trans("Shipments"), 0, $user->hasRight('expedition',  'lire'), '', $mainmenu, 'sendings', 0, '', '', '', img_picto('', 'shipment', 'class="pictofixedwidth"'));
2129
-			$newmenu->add("/expedition/card.php?action=create2&amp;leftmenu=sendings", $langs->trans("NewSending"), 1, $user->hasRight('expedition',  'creer'));
2130
-			$newmenu->add("/expedition/list.php?leftmenu=sendings", $langs->trans("List"), 1, $user->hasRight('expedition',  'lire'));
2128
+			$newmenu->add("/expedition/index.php?leftmenu=sendings", $langs->trans("Shipments"), 0, $user->hasRight('expedition', 'lire'), '', $mainmenu, 'sendings', 0, '', '', '', img_picto('', 'shipment', 'class="pictofixedwidth"'));
2129
+			$newmenu->add("/expedition/card.php?action=create2&amp;leftmenu=sendings", $langs->trans("NewSending"), 1, $user->hasRight('expedition', 'creer'));
2130
+			$newmenu->add("/expedition/list.php?leftmenu=sendings", $langs->trans("List"), 1, $user->hasRight('expedition', 'lire'));
2131 2131
 			if ($usemenuhider || empty($leftmenu) || $leftmenu == "sendings") {
2132
-				$newmenu->add("/expedition/list.php?leftmenu=sendings&search_status=0", $langs->trans("StatusSendingDraftShort"), 2, $user->hasRight('expedition',  'lire'));
2133
-				$newmenu->add("/expedition/list.php?leftmenu=sendings&search_status=1", $langs->trans("StatusSendingValidatedShort"), 2, $user->hasRight('expedition',  'lire'));
2134
-				$newmenu->add("/expedition/list.php?leftmenu=sendings&search_status=2", $langs->trans("StatusSendingProcessedShort"), 2, $user->hasRight('expedition',  'lire'));
2132
+				$newmenu->add("/expedition/list.php?leftmenu=sendings&search_status=0", $langs->trans("StatusSendingDraftShort"), 2, $user->hasRight('expedition', 'lire'));
2133
+				$newmenu->add("/expedition/list.php?leftmenu=sendings&search_status=1", $langs->trans("StatusSendingValidatedShort"), 2, $user->hasRight('expedition', 'lire'));
2134
+				$newmenu->add("/expedition/list.php?leftmenu=sendings&search_status=2", $langs->trans("StatusSendingProcessedShort"), 2, $user->hasRight('expedition', 'lire'));
2135 2135
 			}
2136
-			$newmenu->add("/expedition/stats/index.php?leftmenu=sendings", $langs->trans("Statistics"), 1, $user->hasRight('expedition',  'lire'));
2136
+			$newmenu->add("/expedition/stats/index.php?leftmenu=sendings", $langs->trans("Statistics"), 1, $user->hasRight('expedition', 'lire'));
2137 2137
 		}
2138 2138
 
2139 2139
 		// Receptions
2140 2140
 		if (isModEnabled('reception')) {
2141 2141
 			$langs->load("receptions");
2142
-			$newmenu->add("/reception/index.php?leftmenu=receptions", $langs->trans("Receptions"), 0, $user->hasRight('reception',  'lire'), '', $mainmenu, 'receptions', 0, '', '', '', img_picto('', 'dollyrevert', 'class="pictofixedwidth"'));
2143
-			$newmenu->add("/reception/card.php?action=create2&amp;leftmenu=receptions", $langs->trans("NewReception"), 1, $user->hasRight('reception',  'creer'));
2144
-			$newmenu->add("/reception/list.php?leftmenu=receptions", $langs->trans("List"), 1, $user->hasRight('reception',  'lire'));
2142
+			$newmenu->add("/reception/index.php?leftmenu=receptions", $langs->trans("Receptions"), 0, $user->hasRight('reception', 'lire'), '', $mainmenu, 'receptions', 0, '', '', '', img_picto('', 'dollyrevert', 'class="pictofixedwidth"'));
2143
+			$newmenu->add("/reception/card.php?action=create2&amp;leftmenu=receptions", $langs->trans("NewReception"), 1, $user->hasRight('reception', 'creer'));
2144
+			$newmenu->add("/reception/list.php?leftmenu=receptions", $langs->trans("List"), 1, $user->hasRight('reception', 'lire'));
2145 2145
 			if ($usemenuhider || empty($leftmenu) || $leftmenu == "receptions") {
2146
-				$newmenu->add("/reception/list.php?leftmenu=receptions&search_status=0", $langs->trans("StatusReceptionDraftShort"), 2, $user->hasRight('reception',  'lire'));
2146
+				$newmenu->add("/reception/list.php?leftmenu=receptions&search_status=0", $langs->trans("StatusReceptionDraftShort"), 2, $user->hasRight('reception', 'lire'));
2147 2147
 			}
2148 2148
 			if ($usemenuhider || empty($leftmenu) || $leftmenu == "receptions") {
2149
-				$newmenu->add("/reception/list.php?leftmenu=receptions&search_status=1", $langs->trans("StatusReceptionValidatedShort"), 2, $user->hasRight('reception',  'lire'));
2149
+				$newmenu->add("/reception/list.php?leftmenu=receptions&search_status=1", $langs->trans("StatusReceptionValidatedShort"), 2, $user->hasRight('reception', 'lire'));
2150 2150
 			}
2151 2151
 			if ($usemenuhider || empty($leftmenu) || $leftmenu == "receptions") {
2152
-				$newmenu->add("/reception/list.php?leftmenu=receptions&search_status=2", $langs->trans("StatusReceptionProcessedShort"), 2, $user->hasRight('reception',  'lire'));
2152
+				$newmenu->add("/reception/list.php?leftmenu=receptions&search_status=2", $langs->trans("StatusReceptionProcessedShort"), 2, $user->hasRight('reception', 'lire'));
2153 2153
 			}
2154
-			$newmenu->add("/reception/stats/index.php?leftmenu=receptions", $langs->trans("Statistics"), 1, $user->hasRight('reception',  'lire'));
2154
+			$newmenu->add("/reception/stats/index.php?leftmenu=receptions", $langs->trans("Statistics"), 1, $user->hasRight('reception', 'lire'));
2155 2155
 		}
2156 2156
 	}
2157 2157
 }
@@ -2175,17 +2175,17 @@  discard block
 block discarded – undo
2175 2175
 		if (isModEnabled('bom') || isModEnabled('mrp')) {
2176 2176
 			$langs->load("mrp");
2177 2177
 
2178
-			$newmenu->add("", $langs->trans("MenuBOM"), 0, $user->hasRight('bom',  'read'), '', $mainmenu, 'bom', 0, '', '', '', img_picto('', 'bom', 'class="paddingright pictofixedwidth"'));
2179
-			$newmenu->add("/bom/bom_card.php?leftmenu=bom&amp;action=create", $langs->trans("NewBOM"), 1, $user->hasRight('bom',  'write'), '', $mainmenu, 'bom');
2180
-			$newmenu->add("/bom/bom_list.php?leftmenu=bom", $langs->trans("List"), 1, $user->hasRight('bom',  'read'), '', $mainmenu, 'bom');
2178
+			$newmenu->add("", $langs->trans("MenuBOM"), 0, $user->hasRight('bom', 'read'), '', $mainmenu, 'bom', 0, '', '', '', img_picto('', 'bom', 'class="paddingright pictofixedwidth"'));
2179
+			$newmenu->add("/bom/bom_card.php?leftmenu=bom&amp;action=create", $langs->trans("NewBOM"), 1, $user->hasRight('bom', 'write'), '', $mainmenu, 'bom');
2180
+			$newmenu->add("/bom/bom_list.php?leftmenu=bom", $langs->trans("List"), 1, $user->hasRight('bom', 'read'), '', $mainmenu, 'bom');
2181 2181
 		}
2182 2182
 
2183 2183
 		if (isModEnabled('mrp')) {
2184 2184
 			$langs->load("mrp");
2185 2185
 
2186
-			$newmenu->add("", $langs->trans("MenuMRP"), 0, $user->hasRight('mrp',  'read'), '', $mainmenu, 'mrp', 0, '', '', '', img_picto('', 'mrp', 'class="paddingright pictofixedwidth"'));
2187
-			$newmenu->add("/mrp/mo_card.php?leftmenu=mo&amp;action=create", $langs->trans("NewMO"), 1, $user->hasRight('mrp',  'write'), '', $mainmenu, '');
2188
-			$newmenu->add("/mrp/mo_list.php?leftmenu=mo", $langs->trans("List"), 1, $user->hasRight('mrp',  'read'), '', $mainmenu, '');
2186
+			$newmenu->add("", $langs->trans("MenuMRP"), 0, $user->hasRight('mrp', 'read'), '', $mainmenu, 'mrp', 0, '', '', '', img_picto('', 'mrp', 'class="paddingright pictofixedwidth"'));
2187
+			$newmenu->add("/mrp/mo_card.php?leftmenu=mo&amp;action=create", $langs->trans("NewMO"), 1, $user->hasRight('mrp', 'write'), '', $mainmenu, '');
2188
+			$newmenu->add("/mrp/mo_list.php?leftmenu=mo", $langs->trans("List"), 1, $user->hasRight('mrp', 'read'), '', $mainmenu, '');
2189 2189
 		}
2190 2190
 	}
2191 2191
 }
@@ -2212,7 +2212,7 @@  discard block
 block discarded – undo
2212 2212
 
2213 2213
 			$tmpentry = array(
2214 2214
 				'enabled'=>isModEnabled('projet'),
2215
-				'perms'=>$user->hasRight('projet',  'lire'),
2215
+				'perms'=>$user->hasRight('projet', 'lire'),
2216 2216
 				'module'=>'projet'
2217 2217
 			);
2218 2218
 			$listofmodulesforexternal = explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL);
@@ -2230,8 +2230,8 @@  discard block
 block discarded – undo
2230 2230
 			}
2231 2231
 
2232 2232
 			// Project assigned to user
2233
-			$newmenu->add("/projet/index.php?leftmenu=projects".($search_project_user ? '&search_project_user='.$search_project_user : ''), $titleboth, 0, $user->hasRight('projet',  'lire'), '', $mainmenu, 'projects', 0, '', '', '', img_picto('', 'project', 'class="paddingright pictofixedwidth"'));
2234
-			$newmenu->add("/projet/card.php?leftmenu=projects&action=create".($search_project_user ? '&search_project_user='.$search_project_user : ''), $titlenew, 1, $user->hasRight('projet',  'creer'));
2233
+			$newmenu->add("/projet/index.php?leftmenu=projects".($search_project_user ? '&search_project_user='.$search_project_user : ''), $titleboth, 0, $user->hasRight('projet', 'lire'), '', $mainmenu, 'projects', 0, '', '', '', img_picto('', 'project', 'class="paddingright pictofixedwidth"'));
2234
+			$newmenu->add("/projet/card.php?leftmenu=projects&action=create".($search_project_user ? '&search_project_user='.$search_project_user : ''), $titlenew, 1, $user->hasRight('projet', 'creer'));
2235 2235
 
2236 2236
 			if (empty($conf->global->PROJECT_USE_OPPORTUNITIES)) {
2237 2237
 				$newmenu->add("/projet/list.php?leftmenu=projets".($search_project_user ? '&search_project_user='.$search_project_user : '').'&search_status=99', $langs->trans("List"), 1, $showmode, '', 'project', 'list');
@@ -2243,23 +2243,23 @@  discard block
 block discarded – undo
2243 2243
 				$newmenu->add('/projet/list.php?mainmenu=project&amp;leftmenu=list&search_usage_opportunity=1&search_status=99', $langs->trans("List"), 2, $showmode);
2244 2244
 			}
2245 2245
 
2246
-			$newmenu->add("/projet/stats/index.php?leftmenu=projects", $langs->trans("Statistics"), 1, $user->hasRight('projet',  'lire'));
2246
+			$newmenu->add("/projet/stats/index.php?leftmenu=projects", $langs->trans("Statistics"), 1, $user->hasRight('projet', 'lire'));
2247 2247
 
2248 2248
 			// Categories
2249 2249
 			if (isModEnabled('categorie')) {
2250 2250
 				$langs->load("categories");
2251
-				$newmenu->add("/categories/index.php?leftmenu=cat&amp;type=6", $langs->trans("Categories"), 1, $user->hasRight('categorie',  'lire'), '', $mainmenu, 'cat');
2251
+				$newmenu->add("/categories/index.php?leftmenu=cat&amp;type=6", $langs->trans("Categories"), 1, $user->hasRight('categorie', 'lire'), '', $mainmenu, 'cat');
2252 2252
 			}
2253 2253
 
2254 2254
 			if (empty($conf->global->PROJECT_HIDE_TASKS)) {
2255 2255
 				// Project affected to user
2256
-				$newmenu->add("/projet/activity/index.php?leftmenu=tasks".($search_project_user ? '&search_project_user='.$search_project_user : ''), $langs->trans("Activities"), 0, $user->hasRight('projet',  'lire'), '', 'project', 'tasks', 0, '', '', '', img_picto('', 'projecttask', 'class="paddingright pictofixedwidth"'));
2257
-				$newmenu->add("/projet/tasks.php?leftmenu=tasks&action=create", $langs->trans("NewTask"), 1, $user->hasRight('projet',  'creer'));
2258
-				$newmenu->add("/projet/tasks/list.php?leftmenu=tasks".($search_project_user ? '&search_project_user='.$search_project_user : ''), $langs->trans("List"), 1, $user->hasRight('projet',  'lire'));
2259
-				$newmenu->add("/projet/tasks/stats/index.php?leftmenu=projects", $langs->trans("Statistics"), 1, $user->hasRight('projet',  'lire'));
2256
+				$newmenu->add("/projet/activity/index.php?leftmenu=tasks".($search_project_user ? '&search_project_user='.$search_project_user : ''), $langs->trans("Activities"), 0, $user->hasRight('projet', 'lire'), '', 'project', 'tasks', 0, '', '', '', img_picto('', 'projecttask', 'class="paddingright pictofixedwidth"'));
2257
+				$newmenu->add("/projet/tasks.php?leftmenu=tasks&action=create", $langs->trans("NewTask"), 1, $user->hasRight('projet', 'creer'));
2258
+				$newmenu->add("/projet/tasks/list.php?leftmenu=tasks".($search_project_user ? '&search_project_user='.$search_project_user : ''), $langs->trans("List"), 1, $user->hasRight('projet', 'lire'));
2259
+				$newmenu->add("/projet/tasks/stats/index.php?leftmenu=projects", $langs->trans("Statistics"), 1, $user->hasRight('projet', 'lire'));
2260 2260
 
2261
-				$newmenu->add("/projet/activity/perweek.php?leftmenu=tasks".($search_project_user ? '&search_project_user='.$search_project_user : ''), $langs->trans("NewTimeSpent"), 0, $user->hasRight('projet',  'lire'), '', 'project', 'timespent', 0, '', '', '', img_picto('', 'timespent', 'class="paddingright pictofixedwidth"'));
2262
-				$newmenu->add("/projet/tasks/time.php?leftmenu=tasks".($search_project_user ? '&search_project_user='.$search_project_user : ''), $langs->trans("List"), 1, $user->hasRight('projet',  'lire'));
2261
+				$newmenu->add("/projet/activity/perweek.php?leftmenu=tasks".($search_project_user ? '&search_project_user='.$search_project_user : ''), $langs->trans("NewTimeSpent"), 0, $user->hasRight('projet', 'lire'), '', 'project', 'timespent', 0, '', '', '', img_picto('', 'timespent', 'class="paddingright pictofixedwidth"'));
2262
+				$newmenu->add("/projet/tasks/time.php?leftmenu=tasks".($search_project_user ? '&search_project_user='.$search_project_user : ''), $langs->trans("List"), 1, $user->hasRight('projet', 'lire'));
2263 2263
 			}
2264 2264
 		}
2265 2265
 	}
@@ -2317,47 +2317,47 @@  discard block
 block discarded – undo
2317 2317
 			// Load translation files required by the page
2318 2318
 			$langs->loadLangs(array("holiday", "trips"));
2319 2319
 
2320
-			$newmenu->add("/holiday/list.php?mainmenu=hrm&leftmenu=holiday", $langs->trans("CPTitreMenu"), 0, $user->hasRight('holiday',  'read'), '', $mainmenu, 'holiday', 0, '', '', '', img_picto('', 'holiday', 'class="paddingright pictofixedwidth"'));
2321
-			$newmenu->add("/holiday/card.php?mainmenu=hrm&leftmenu=holiday&action=create", $langs->trans("New"), 1, $user->hasRight('holiday',  'write'), '', $mainmenu);
2322
-			$newmenu->add("/holiday/card_group.php?mainmenu=hrm&leftmenu=holiday&action=create", $langs->trans("NewHolidayForGroup"), 1, ($user->hasRight('holiday',  'writeall') && $user->hasRight('holiday',  'readall')), '', $mainmenu, 'holiday_sm');
2323
-			$newmenu->add("/holiday/list.php?mainmenu=hrm&leftmenu=holiday", $langs->trans("List"), 1, $user->hasRight('holiday',  'read'), '', $mainmenu);
2320
+			$newmenu->add("/holiday/list.php?mainmenu=hrm&leftmenu=holiday", $langs->trans("CPTitreMenu"), 0, $user->hasRight('holiday', 'read'), '', $mainmenu, 'holiday', 0, '', '', '', img_picto('', 'holiday', 'class="paddingright pictofixedwidth"'));
2321
+			$newmenu->add("/holiday/card.php?mainmenu=hrm&leftmenu=holiday&action=create", $langs->trans("New"), 1, $user->hasRight('holiday', 'write'), '', $mainmenu);
2322
+			$newmenu->add("/holiday/card_group.php?mainmenu=hrm&leftmenu=holiday&action=create", $langs->trans("NewHolidayForGroup"), 1, ($user->hasRight('holiday', 'writeall') && $user->hasRight('holiday', 'readall')), '', $mainmenu, 'holiday_sm');
2323
+			$newmenu->add("/holiday/list.php?mainmenu=hrm&leftmenu=holiday", $langs->trans("List"), 1, $user->hasRight('holiday', 'read'), '', $mainmenu);
2324 2324
 			if ($usemenuhider || empty($leftmenu) || $leftmenu == "holiday") {
2325
-				$newmenu->add("/holiday/list.php?search_status=1&mainmenu=hrm&leftmenu=holiday", $langs->trans("DraftCP"), 2, $user->hasRight('holiday',  'read'), '', $mainmenu, 'holiday_sm');
2326
-				$newmenu->add("/holiday/list.php?search_status=2&mainmenu=hrm&leftmenu=holiday", $langs->trans("ToReviewCP"), 2, $user->hasRight('holiday',  'read'), '', $mainmenu, 'holiday_sm');
2327
-				$newmenu->add("/holiday/list.php?search_status=3&mainmenu=hrm&leftmenu=holiday", $langs->trans("ApprovedCP"), 2, $user->hasRight('holiday',  'read'), '', $mainmenu, 'holiday_sm');
2328
-				$newmenu->add("/holiday/list.php?search_status=4&mainmenu=hrm&leftmenu=holiday", $langs->trans("CancelCP"), 2, $user->hasRight('holiday',  'read'), '', $mainmenu, 'holiday_sm');
2329
-				$newmenu->add("/holiday/list.php?search_status=5&mainmenu=hrm&leftmenu=holiday", $langs->trans("RefuseCP"), 2, $user->hasRight('holiday',  'read'), '', $mainmenu, 'holiday_sm');
2325
+				$newmenu->add("/holiday/list.php?search_status=1&mainmenu=hrm&leftmenu=holiday", $langs->trans("DraftCP"), 2, $user->hasRight('holiday', 'read'), '', $mainmenu, 'holiday_sm');
2326
+				$newmenu->add("/holiday/list.php?search_status=2&mainmenu=hrm&leftmenu=holiday", $langs->trans("ToReviewCP"), 2, $user->hasRight('holiday', 'read'), '', $mainmenu, 'holiday_sm');
2327
+				$newmenu->add("/holiday/list.php?search_status=3&mainmenu=hrm&leftmenu=holiday", $langs->trans("ApprovedCP"), 2, $user->hasRight('holiday', 'read'), '', $mainmenu, 'holiday_sm');
2328
+				$newmenu->add("/holiday/list.php?search_status=4&mainmenu=hrm&leftmenu=holiday", $langs->trans("CancelCP"), 2, $user->hasRight('holiday', 'read'), '', $mainmenu, 'holiday_sm');
2329
+				$newmenu->add("/holiday/list.php?search_status=5&mainmenu=hrm&leftmenu=holiday", $langs->trans("RefuseCP"), 2, $user->hasRight('holiday', 'read'), '', $mainmenu, 'holiday_sm');
2330 2330
 			}
2331
-			$newmenu->add("/holiday/define_holiday.php?mainmenu=hrm", $langs->trans("MenuConfCP"), 1, $user->hasRight('holiday',  'read'), '', $mainmenu, 'holiday_sm');
2332
-			$newmenu->add("/holiday/month_report.php?mainmenu=hrm&leftmenu=holiday", $langs->trans("MenuReportMonth"), 1, $user->hasRight('holiday',  'readall'), '', $mainmenu, 'holiday_sm');
2333
-			$newmenu->add("/holiday/view_log.php?mainmenu=hrm&leftmenu=holiday", $langs->trans("MenuLogCP"), 1, $user->hasRight('holiday',  'define_holiday'), '', $mainmenu, 'holiday_sm');
2331
+			$newmenu->add("/holiday/define_holiday.php?mainmenu=hrm", $langs->trans("MenuConfCP"), 1, $user->hasRight('holiday', 'read'), '', $mainmenu, 'holiday_sm');
2332
+			$newmenu->add("/holiday/month_report.php?mainmenu=hrm&leftmenu=holiday", $langs->trans("MenuReportMonth"), 1, $user->hasRight('holiday', 'readall'), '', $mainmenu, 'holiday_sm');
2333
+			$newmenu->add("/holiday/view_log.php?mainmenu=hrm&leftmenu=holiday", $langs->trans("MenuLogCP"), 1, $user->hasRight('holiday', 'define_holiday'), '', $mainmenu, 'holiday_sm');
2334 2334
 		}
2335 2335
 
2336 2336
 		// Trips and expenses (old module)
2337 2337
 		if (isModEnabled('deplacement')) {
2338 2338
 			$langs->load("trips");
2339
-			$newmenu->add("/compta/deplacement/index.php?leftmenu=tripsandexpenses&amp;mainmenu=hrm", $langs->trans("TripsAndExpenses"), 0, $user->hasRight('deplacement',  'lire'), '', $mainmenu, 'tripsandexpenses', 0, '', '', '', img_picto('', 'trip', 'class="paddingright pictofixedwidth"'));
2340
-			$newmenu->add("/compta/deplacement/card.php?action=create&amp;leftmenu=tripsandexpenses&amp;mainmenu=hrm", $langs->trans("New"), 1, $user->hasRight('deplacement',  'creer'));
2341
-			$newmenu->add("/compta/deplacement/list.php?leftmenu=tripsandexpenses&amp;mainmenu=hrm", $langs->trans("List"), 1, $user->hasRight('deplacement',  'lire'));
2342
-			$newmenu->add("/compta/deplacement/stats/index.php?leftmenu=tripsandexpenses&amp;mainmenu=hrm", $langs->trans("Statistics"), 1, $user->hasRight('deplacement',  'lire'));
2339
+			$newmenu->add("/compta/deplacement/index.php?leftmenu=tripsandexpenses&amp;mainmenu=hrm", $langs->trans("TripsAndExpenses"), 0, $user->hasRight('deplacement', 'lire'), '', $mainmenu, 'tripsandexpenses', 0, '', '', '', img_picto('', 'trip', 'class="paddingright pictofixedwidth"'));
2340
+			$newmenu->add("/compta/deplacement/card.php?action=create&amp;leftmenu=tripsandexpenses&amp;mainmenu=hrm", $langs->trans("New"), 1, $user->hasRight('deplacement', 'creer'));
2341
+			$newmenu->add("/compta/deplacement/list.php?leftmenu=tripsandexpenses&amp;mainmenu=hrm", $langs->trans("List"), 1, $user->hasRight('deplacement', 'lire'));
2342
+			$newmenu->add("/compta/deplacement/stats/index.php?leftmenu=tripsandexpenses&amp;mainmenu=hrm", $langs->trans("Statistics"), 1, $user->hasRight('deplacement', 'lire'));
2343 2343
 		}
2344 2344
 
2345 2345
 		// Expense report
2346 2346
 		if (isModEnabled('expensereport')) {
2347 2347
 			$langs->loadLangs(array("trips", "bills"));
2348
-			$newmenu->add("/expensereport/index.php?leftmenu=expensereport&amp;mainmenu=hrm", $langs->trans("TripsAndExpenses"), 0, $user->hasRight('expensereport',  'lire'), '', $mainmenu, 'expensereport', 0, '', '', '', img_picto('', 'trip', 'class="paddingright pictofixedwidth"'));
2349
-			$newmenu->add("/expensereport/card.php?action=create&amp;leftmenu=expensereport&amp;mainmenu=hrm", $langs->trans("New"), 1, $user->hasRight('expensereport',  'creer'));
2350
-			$newmenu->add("/expensereport/list.php?leftmenu=expensereport&amp;mainmenu=hrm", $langs->trans("List"), 1, $user->hasRight('expensereport',  'lire'));
2348
+			$newmenu->add("/expensereport/index.php?leftmenu=expensereport&amp;mainmenu=hrm", $langs->trans("TripsAndExpenses"), 0, $user->hasRight('expensereport', 'lire'), '', $mainmenu, 'expensereport', 0, '', '', '', img_picto('', 'trip', 'class="paddingright pictofixedwidth"'));
2349
+			$newmenu->add("/expensereport/card.php?action=create&amp;leftmenu=expensereport&amp;mainmenu=hrm", $langs->trans("New"), 1, $user->hasRight('expensereport', 'creer'));
2350
+			$newmenu->add("/expensereport/list.php?leftmenu=expensereport&amp;mainmenu=hrm", $langs->trans("List"), 1, $user->hasRight('expensereport', 'lire'));
2351 2351
 			if ($usemenuhider || empty($leftmenu) || $leftmenu == "expensereport") {
2352
-				$newmenu->add("/expensereport/list.php?search_status=0&amp;leftmenu=expensereport&amp;mainmenu=hrm", $langs->trans("Draft"), 2, $user->hasRight('expensereport',  'lire'));
2353
-				$newmenu->add("/expensereport/list.php?search_status=2&amp;leftmenu=expensereport&amp;mainmenu=hrm", $langs->trans("Validated"), 2, $user->hasRight('expensereport',  'lire'));
2354
-				$newmenu->add("/expensereport/list.php?search_status=5&amp;leftmenu=expensereport&amp;mainmenu=hrm", $langs->trans("Approved"), 2, $user->hasRight('expensereport',  'lire'));
2355
-				$newmenu->add("/expensereport/list.php?search_status=6&amp;leftmenu=expensereport&amp;mainmenu=hrm", $langs->trans("Paid"), 2, $user->hasRight('expensereport',  'lire'));
2356
-				$newmenu->add("/expensereport/list.php?search_status=4&amp;leftmenu=expensereport&amp;mainmenu=hrm", $langs->trans("Canceled"), 2, $user->hasRight('expensereport',  'lire'));
2357
-				$newmenu->add("/expensereport/list.php?search_status=99&amp;leftmenu=expensereport&amp;mainmenu=hrm", $langs->trans("Refused"), 2, $user->hasRight('expensereport',  'lire'));
2352
+				$newmenu->add("/expensereport/list.php?search_status=0&amp;leftmenu=expensereport&amp;mainmenu=hrm", $langs->trans("Draft"), 2, $user->hasRight('expensereport', 'lire'));
2353
+				$newmenu->add("/expensereport/list.php?search_status=2&amp;leftmenu=expensereport&amp;mainmenu=hrm", $langs->trans("Validated"), 2, $user->hasRight('expensereport', 'lire'));
2354
+				$newmenu->add("/expensereport/list.php?search_status=5&amp;leftmenu=expensereport&amp;mainmenu=hrm", $langs->trans("Approved"), 2, $user->hasRight('expensereport', 'lire'));
2355
+				$newmenu->add("/expensereport/list.php?search_status=6&amp;leftmenu=expensereport&amp;mainmenu=hrm", $langs->trans("Paid"), 2, $user->hasRight('expensereport', 'lire'));
2356
+				$newmenu->add("/expensereport/list.php?search_status=4&amp;leftmenu=expensereport&amp;mainmenu=hrm", $langs->trans("Canceled"), 2, $user->hasRight('expensereport', 'lire'));
2357
+				$newmenu->add("/expensereport/list.php?search_status=99&amp;leftmenu=expensereport&amp;mainmenu=hrm", $langs->trans("Refused"), 2, $user->hasRight('expensereport', 'lire'));
2358 2358
 			}
2359
-			$newmenu->add("/expensereport/payment/list.php?leftmenu=expensereport_payments&amp;mainmenu=hrm", $langs->trans("Payments"), 1, $user->hasRight('expensereport',  'lire'));
2360
-			$newmenu->add("/expensereport/stats/index.php?leftmenu=expensereport&amp;mainmenu=hrm", $langs->trans("Statistics"), 1, $user->hasRight('expensereport',  'lire'));
2359
+			$newmenu->add("/expensereport/payment/list.php?leftmenu=expensereport_payments&amp;mainmenu=hrm", $langs->trans("Payments"), 1, $user->hasRight('expensereport', 'lire'));
2360
+			$newmenu->add("/expensereport/stats/index.php?leftmenu=expensereport&amp;mainmenu=hrm", $langs->trans("Statistics"), 1, $user->hasRight('expensereport', 'lire'));
2361 2361
 		}
2362 2362
 
2363 2363
 		if (isModEnabled('projet')) {
@@ -2366,7 +2366,7 @@  discard block
 block discarded – undo
2366 2366
 
2367 2367
 				$search_project_user = GETPOST('search_project_user', 'int');
2368 2368
 
2369
-				$newmenu->add("/projet/activity/perweek.php?leftmenu=tasks".($search_project_user ? '&search_project_user='.$search_project_user : ''), $langs->trans("NewTimeSpent"), 0, $user->hasRight('projet',  'lire'), '', $mainmenu, 'timespent', 0, '', '', '', img_picto('', 'timespent', 'class="paddingright pictofixedwidth"'));
2369
+				$newmenu->add("/projet/activity/perweek.php?leftmenu=tasks".($search_project_user ? '&search_project_user='.$search_project_user : ''), $langs->trans("NewTimeSpent"), 0, $user->hasRight('projet', 'lire'), '', $mainmenu, 'timespent', 0, '', '', '', img_picto('', 'timespent', 'class="paddingright pictofixedwidth"'));
2370 2370
 			}
2371 2371
 		}
2372 2372
 	}
@@ -2394,22 +2394,22 @@  discard block
 block discarded – undo
2394 2394
 		}
2395 2395
 
2396 2396
 		if (isModEnabled('mailing')) {
2397
-			$newmenu->add("/comm/mailing/index.php?leftmenu=mailing", $langs->trans("EMailings"), 0, $user->hasRight('mailing',  'lire'), '', $mainmenu, 'mailing', 0, '', '', '', img_picto('', 'email', 'class="paddingright pictofixedwidth"'));
2398
-			$newmenu->add("/comm/mailing/card.php?leftmenu=mailing&amp;action=create", $langs->trans("NewMailing"), 1, $user->hasRight('mailing',  'creer'));
2399
-			$newmenu->add("/comm/mailing/list.php?leftmenu=mailing", $langs->trans("List"), 1, $user->hasRight('mailing',  'lire'));
2397
+			$newmenu->add("/comm/mailing/index.php?leftmenu=mailing", $langs->trans("EMailings"), 0, $user->hasRight('mailing', 'lire'), '', $mainmenu, 'mailing', 0, '', '', '', img_picto('', 'email', 'class="paddingright pictofixedwidth"'));
2398
+			$newmenu->add("/comm/mailing/card.php?leftmenu=mailing&amp;action=create", $langs->trans("NewMailing"), 1, $user->hasRight('mailing', 'creer'));
2399
+			$newmenu->add("/comm/mailing/list.php?leftmenu=mailing", $langs->trans("List"), 1, $user->hasRight('mailing', 'lire'));
2400 2400
 		}
2401 2401
 
2402 2402
 		if (isModEnabled('export')) {
2403 2403
 			$langs->load("exports");
2404
-			$newmenu->add("/exports/index.php?leftmenu=export", $langs->trans("FormatedExport"), 0, $user->hasRight('export',  'lire'), '', $mainmenu, 'export', 0, '', '', '', img_picto('', 'technic', 'class="paddingright pictofixedwidth"'));
2405
-			$newmenu->add("/exports/export.php?leftmenu=export", $langs->trans("NewExport"), 1, $user->hasRight('export',  'creer'));
2404
+			$newmenu->add("/exports/index.php?leftmenu=export", $langs->trans("FormatedExport"), 0, $user->hasRight('export', 'lire'), '', $mainmenu, 'export', 0, '', '', '', img_picto('', 'technic', 'class="paddingright pictofixedwidth"'));
2405
+			$newmenu->add("/exports/export.php?leftmenu=export", $langs->trans("NewExport"), 1, $user->hasRight('export', 'creer'));
2406 2406
 			//$newmenu->add("/exports/export.php?leftmenu=export",$langs->trans("List"),1, $user->hasRight('export',  'lire'));
2407 2407
 		}
2408 2408
 
2409 2409
 		if (isModEnabled('import')) {
2410 2410
 			$langs->load("exports");
2411
-			$newmenu->add("/imports/index.php?leftmenu=import", $langs->trans("FormatedImport"), 0, $user->hasRight('import',  'run'), '', $mainmenu, 'import', 0, '', '', '', img_picto('', 'technic', 'class="paddingright pictofixedwidth"'));
2412
-			$newmenu->add("/imports/import.php?leftmenu=import", $langs->trans("NewImport"), 1, $user->hasRight('import',  'run'));
2411
+			$newmenu->add("/imports/index.php?leftmenu=import", $langs->trans("FormatedImport"), 0, $user->hasRight('import', 'run'), '', $mainmenu, 'import', 0, '', '', '', img_picto('', 'technic', 'class="paddingright pictofixedwidth"'));
2412
+			$newmenu->add("/imports/import.php?leftmenu=import", $langs->trans("NewImport"), 1, $user->hasRight('import', 'run'));
2413 2413
 		}
2414 2414
 	}
2415 2415
 }
@@ -2447,7 +2447,7 @@  discard block
 block discarded – undo
2447 2447
 
2448 2448
 			$newmenu->add("/adherents/cartes/carte.php?leftmenu=export", $langs->trans("MembersCards"), 1, $user->hasRight('adherent', 'export'));
2449 2449
 			if (!empty($conf->global->MEMBER_LINK_TO_HTPASSWDFILE) && ($usemenuhider || empty($leftmenu) || $leftmenu == 'none' || $leftmenu == "members" || $leftmenu == "export")) {
2450
-				$newmenu->add("/adherents/htpasswd.php?leftmenu=export", $langs->trans("Filehtpasswd"), 1, $user->hasRight('adherent',  'export'));
2450
+				$newmenu->add("/adherents/htpasswd.php?leftmenu=export", $langs->trans("Filehtpasswd"), 1, $user->hasRight('adherent', 'export'));
2451 2451
 			}
2452 2452
 
2453 2453
 			if (isModEnabled('categorie')) {
Please login to merge, or discard this patch.