Completed
Branch develop (5a8427)
by
unknown
27:33
created
htdocs/api/class/api_documents.class.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
 				throw new RestException(500, 'Error generating document');
212 212
 			}
213 213
 		} elseif ($modulepart == 'facture_fournisseur' || $modulepart == 'invoice_supplier') {
214
-			require_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.facture.class.php';
214
+			require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
215 215
 			$tmpobject = new FactureFournisseur($this->db);
216 216
 			$result = $tmpobject->fetch(0, preg_replace('/\.[^\.]+$/', '', basename($original_file)));
217 217
 			if (!$result) {
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
 				throw new RestException(500, 'Error generating document');
249 249
 			}
250 250
 		} elseif ($modulepart == 'contrat' || $modulepart == 'contract') {
251
-			require_once DOL_DOCUMENT_ROOT . '/contrat/class/contrat.class.php';
251
+			require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
252 252
 
253 253
 			$tmpobject = new Contrat($this->db);
254 254
 			$result = $tmpobject->fetch(0, preg_replace('/\.[^\.]+$/', '', basename($original_file)));
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
 				throw new RestException(500, 'Error generating document missing doctemplate parameter');
265 265
 			}
266 266
 		} elseif ($modulepart == 'expedition' || $modulepart == 'shipment') {
267
-			require_once DOL_DOCUMENT_ROOT . '/expedition/class/expedition.class.php';
267
+			require_once DOL_DOCUMENT_ROOT.'/expedition/class/expedition.class.php';
268 268
 
269 269
 			$tmpobject = new Expedition($this->db);
270 270
 			$result = $tmpobject->fetch(0, preg_replace('/\.[^\.]+$/', '', basename($original_file)));
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
 				throw new RestException(500, 'Error generating document missing doctemplate parameter');
281 281
 			}
282 282
 		} elseif ($modulepart == 'mrp') {
283
-			require_once DOL_DOCUMENT_ROOT . '/mrp/class/mo.class.php';
283
+			require_once DOL_DOCUMENT_ROOT.'/mrp/class/mo.class.php';
284 284
 
285 285
 			$tmpobject = new Mo($this->db);
286 286
 			$result = $tmpobject->fetch(0, preg_replace('/\.[^\.]+$/', '', basename($original_file)));
@@ -591,7 +591,7 @@  discard block
 block discarded – undo
591 591
 			// $recursive = 0;
592 592
 		} elseif ($modulepart == 'contrat' || $modulepart == 'contract') {
593 593
 			$modulepart = 'contrat';
594
-			require_once DOL_DOCUMENT_ROOT . '/contrat/class/contrat.class.php';
594
+			require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
595 595
 
596 596
 			$object = new Contrat($this->db);
597 597
 			$result = $object->fetch($id, $ref);
@@ -599,10 +599,10 @@  discard block
 block discarded – undo
599 599
 				throw new RestException(404, 'Contract not found');
600 600
 			}
601 601
 
602
-			$upload_dir = $conf->contract->dir_output . "/" . get_exdir(0, 0, 0, 1, $object, 'contract');
602
+			$upload_dir = $conf->contract->dir_output."/".get_exdir(0, 0, 0, 1, $object, 'contract');
603 603
 		} elseif ($modulepart == 'intervention' || $modulepart == 'ficheinter') {
604 604
 			$modulepart = 'ficheinter';
605
-			require_once DOL_DOCUMENT_ROOT . '/fichinter/class/fichinter.class.php';
605
+			require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php';
606 606
 
607 607
 			$object = new Fichinter($this->db);
608 608
 			$result = $object->fetch($id, $ref);
@@ -610,10 +610,10 @@  discard block
 block discarded – undo
610 610
 				throw new RestException(404, 'Interventional not found');
611 611
 			}
612 612
 
613
-			$upload_dir = $conf->ficheinter->dir_output . "/" . get_exdir(0, 0, 0, 1, $object, 'ficheinter');
613
+			$upload_dir = $conf->ficheinter->dir_output."/".get_exdir(0, 0, 0, 1, $object, 'ficheinter');
614 614
 		} elseif ($modulepart == 'projet' || $modulepart == 'project') {
615 615
 			$modulepart = 'project';
616
-			require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php';
616
+			require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
617 617
 
618 618
 			$object = new Project($this->db);
619 619
 			$result = $object->fetch($id, $ref);
@@ -621,10 +621,10 @@  discard block
 block discarded – undo
621 621
 				throw new RestException(404, 'Project not found');
622 622
 			}
623 623
 
624
-			$upload_dir = $conf->project->dir_output . "/" . get_exdir(0, 0, 0, 1, $object, 'project');
624
+			$upload_dir = $conf->project->dir_output."/".get_exdir(0, 0, 0, 1, $object, 'project');
625 625
 		} elseif ($modulepart == 'mrp') {
626 626
 			$modulepart = 'mrp';
627
-			require_once DOL_DOCUMENT_ROOT . '/mrp/class/mo.class.php';
627
+			require_once DOL_DOCUMENT_ROOT.'/mrp/class/mo.class.php';
628 628
 
629 629
 			$object = new Mo($this->db);
630 630
 			$result = $object->fetch($id, $ref);
@@ -632,13 +632,13 @@  discard block
 block discarded – undo
632 632
 				throw new RestException(404, 'MO not found');
633 633
 			}
634 634
 
635
-			$upload_dir = $conf->mrp->dir_output . "/" . get_exdir(0, 0, 0, 1, $object, 'mrp');
635
+			$upload_dir = $conf->mrp->dir_output."/".get_exdir(0, 0, 0, 1, $object, 'mrp');
636 636
 		} else {
637 637
 			throw new RestException(500, 'Modulepart '.$modulepart.' not implemented yet.');
638 638
 		}
639 639
 
640 640
 		$objectType = $modulepart;
641
-		if (! empty($object->id) && ! empty($object->table_element)) {
641
+		if (!empty($object->id) && !empty($object->table_element)) {
642 642
 			$objectType = $object->table_element;
643 643
 		}
644 644
 
@@ -656,7 +656,7 @@  discard block
 block discarded – undo
656 656
 					throw new RestException(503, 'Error when retrieve ecm list : '.$this->db->lasterror());
657 657
 				} elseif (is_array($ecmfile->lines) && count($ecmfile->lines) > 0) {
658 658
 					$count = count($filearray);
659
-					for ($i = 0 ; $i < $count ; $i++) {
659
+					for ($i = 0; $i < $count; $i++) {
660 660
 						foreach ($ecmfile->lines as $line) {
661 661
 							unset($line->db);
662 662
 							if ($filearray[$i]['name'] == $line->filename) {
@@ -833,7 +833,7 @@  discard block
 block discarded – undo
833 833
 				$object = new Propal($this->db);
834 834
 			} elseif ($modulepart == 'agenda' || $modulepart == 'action' || $modulepart == 'event') {
835 835
 				$modulepart = 'agenda';
836
-				require_once DOL_DOCUMENT_ROOT . '/comm/action/class/actioncomm.class.php';
836
+				require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
837 837
 				$object = new ActionComm($this->db);
838 838
 			} elseif ($modulepart == 'contact' || $modulepart == 'socpeople') {
839 839
 				$modulepart = 'contact';
@@ -842,11 +842,11 @@  discard block
 block discarded – undo
842 842
 				$fetchbyid = true;
843 843
 			} elseif ($modulepart == 'contrat' || $modulepart == 'contract') {
844 844
 				$modulepart = 'contrat';
845
-				require_once DOL_DOCUMENT_ROOT . '/contrat/class/contrat.class.php';
845
+				require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
846 846
 				$object = new Contrat($this->db);
847 847
 			} elseif ($modulepart == 'mrp') {
848 848
 				$modulepart = 'mrp';
849
-				require_once DOL_DOCUMENT_ROOT . '/mrp/class/mo.class.php';
849
+				require_once DOL_DOCUMENT_ROOT.'/mrp/class/mo.class.php';
850 850
 				$object = new Mo($this->db);
851 851
 			} elseif ($modulepart == 'ecm') {
852 852
 				throw new RestException(500, 'Using a non empty "ref" is not compatible with using modulepart = '.$modulepart);
Please login to merge, or discard this patch.
htdocs/compta/sociales/list.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 $search_date_endday = GETPOSTINT('search_date_endday');
70 70
 $search_date_endmonth = GETPOSTINT('search_date_endmonth');
71 71
 $search_date_endyear = GETPOSTINT('search_date_endyear');
72
-$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear);	// Use tzserver
72
+$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver
73 73
 $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear);
74 74
 $search_date_limit_startday = GETPOSTINT('search_date_limit_startday');
75 75
 $search_date_limit_startmonth = GETPOSTINT('search_date_limit_startmonth');
@@ -661,8 +661,8 @@  discard block
 block discarded – undo
661 661
 	$chargesociale_static->type_label = $obj->type_label;
662 662
 	$chargesociale_static->amount = $obj->amount;
663 663
 	$chargesociale_static->paye = $obj->paye;
664
-	$chargesociale_static->date_ech = $db->idate($obj->date_ech);		// Date of contribution
665
-	$chargesociale_static->period = $db->idate($obj->period, 'gmt');	// End date of period
664
+	$chargesociale_static->date_ech = $db->idate($obj->date_ech); // Date of contribution
665
+	$chargesociale_static->period = $db->idate($obj->period, 'gmt'); // End date of period
666 666
 	$chargesociale_static->type_accountancy_code = $obj->type_accountancy_code;
667 667
 	$chargesociale_static->note_private = $obj->note_private;
668 668
 	$chargesociale_static->note_public = $obj->note_public;
Please login to merge, or discard this patch.
htdocs/compta/sociales/class/chargesociales.class.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
 				$this->label				= $obj->label;
227 227
 				$this->type					= $obj->fk_type;
228 228
 				$this->type_label			= $obj->type_label;
229
-				$this->type_code			= $obj->type_code;
229
+				$this->type_code = $obj->type_code;
230 230
 				$this->type_accountancy_code = $obj->type_accountancy_code;
231 231
 				$this->fk_account			= $obj->fk_account;
232 232
 				$this->mode_reglement_id = $obj->fk_mode_reglement;
@@ -722,7 +722,7 @@  discard block
 block discarded – undo
722 722
 		}
723 723
 
724 724
 		global $action;
725
-		$hookmanager->initHooks(array($this->element . 'dao'));
725
+		$hookmanager->initHooks(array($this->element.'dao'));
726 726
 		$parameters = array('id' => $this->id, 'getnomurl' => &$result);
727 727
 		$reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
728 728
 		if ($reshook > 0) {
Please login to merge, or discard this patch.
htdocs/compta/bank/bankentries_list.php 1 patch
Spacing   +18 added lines, -19 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 $search_type = GETPOST("search_type", 'alpha');
87 87
 $search_account = GETPOST("search_account", 'int') ? GETPOST("search_account", 'int') : GETPOST("account", 'int');
88 88
 $search_accountancy_code = GETPOST('search_accountancy_code', 'alpha') ? GETPOST('search_accountancy_code', 'alpha') : GETPOST('accountancy_code', 'alpha');
89
-$search_bid = GETPOST("search_bid", 'int') ? GETPOST("search_bid", 'int') : GETPOST("bid", 'int');		// Category id
89
+$search_bid = GETPOST("search_bid", 'int') ? GETPOST("search_bid", 'int') : GETPOST("bid", 'int'); // Category id
90 90
 $search_ref = GETPOST('search_ref', 'alpha');
91 91
 $search_description = GETPOST("search_description", 'alpha');
92 92
 $search_dt_start = dol_mktime(0, 0, 0, GETPOSTINT('search_start_dtmonth'), GETPOSTINT('search_start_dtday'), GETPOSTINT('search_start_dtyear'));
@@ -149,19 +149,19 @@  discard block
 block discarded – undo
149 149
 $hookmanager->initHooks(array('banktransactionlist', $contextpage));
150 150
 $extrafields = new ExtraFields($db);
151 151
 
152
-$extrafieldsobjectkey = 'bank';	// Used by extrafields_..._tpl.php
152
+$extrafieldsobjectkey = 'bank'; // Used by extrafields_..._tpl.php
153 153
 
154 154
 // fetch optionals attributes and labels
155 155
 $extrafields->fetch_name_optionals_label($extrafieldsobjectkey);
156 156
 $search_array_options = $extrafields->getOptionalsFromPost($extrafieldsobjectkey, '', 'search_');
157 157
 
158 158
 $arrayfields = array(
159
-	'b.rowid' => array('label' => $langs->trans("Ref"), 'checked' => '1','position' => 10),
160
-	'b.label' => array('label' => $langs->trans("Description"), 'checked' => '1','position' => 20),
161
-	'b.dateo' => array('label' => $langs->trans("DateOperationShort"), 'checked' => '-1','position' => 30),
162
-	'b.datev' => array('label' => $langs->trans("DateValueShort"), 'checked' => '1','position' => 40),
163
-	'type' => array('label' => $langs->trans("Type"), 'checked' => '1','position' => 50),
164
-	'b.num_chq' => array('label' => $langs->trans("Numero"), 'checked' => '0','position' => 60),
159
+	'b.rowid' => array('label' => $langs->trans("Ref"), 'checked' => '1', 'position' => 10),
160
+	'b.label' => array('label' => $langs->trans("Description"), 'checked' => '1', 'position' => 20),
161
+	'b.dateo' => array('label' => $langs->trans("DateOperationShort"), 'checked' => '-1', 'position' => 30),
162
+	'b.datev' => array('label' => $langs->trans("DateValueShort"), 'checked' => '1', 'position' => 40),
163
+	'type' => array('label' => $langs->trans("Type"), 'checked' => '1', 'position' => 50),
164
+	'b.num_chq' => array('label' => $langs->trans("Numero"), 'checked' => '0', 'position' => 60),
165 165
 	'b.fk_bordereau' => array('label' => $langs->trans("ChequeNumber"), 'checked' => '0', 'position' => 65),
166 166
 	'bu.label' => array('label' => $langs->trans("ThirdParty").'/'.$langs->trans("User"), 'checked' => '1', 'position' => 70),
167 167
 	'ba.ref' => array('label' => $langs->trans("BankAccount"), 'checked' => (($id > 0 || !empty($ref)) ? '0' : '1'), 'position' => 80),
@@ -639,20 +639,20 @@  discard block
 block discarded – undo
639 639
 	$sql .= " AND b.rappro = ".((int) $search_conciliated);
640 640
 }
641 641
 if ($search_fk_bordereau > 0) {
642
-	$sql .= " AND b.fk_bordereau = " . ((int) $search_fk_bordereau);
642
+	$sql .= " AND b.fk_bordereau = ".((int) $search_fk_bordereau);
643 643
 }
644 644
 if ($search_thirdparty_user) {
645 645
 	$sql .= " AND (b.rowid IN ";
646 646
 	$sql .= " 	( SELECT bu.fk_bank FROM ".MAIN_DB_PREFIX."bank_url AS bu";
647 647
 	$sql .= "	 JOIN ".MAIN_DB_PREFIX."bank AS b2 ON b2.rowid = bu.fk_bank";
648 648
 	$sql .= "	 JOIN ".MAIN_DB_PREFIX."user AS subUser ON (bu.type = 'user' AND bu.url_id = subUser.rowid)";
649
-	$sql .= "	  WHERE ". natural_search(array("subUser.firstname", "subUser.lastname"), $search_thirdparty_user, 0, 1).")";
649
+	$sql .= "	  WHERE ".natural_search(array("subUser.firstname", "subUser.lastname"), $search_thirdparty_user, 0, 1).")";
650 650
 
651 651
 	$sql .= " OR b.rowid IN ";
652 652
 	$sql .= " 	( SELECT bu.fk_bank FROM ".MAIN_DB_PREFIX."bank_url AS bu";
653 653
 	$sql .= "	 JOIN ".MAIN_DB_PREFIX."bank AS b2 ON b2.rowid = bu.fk_bank";
654 654
 	$sql .= "	 JOIN ".MAIN_DB_PREFIX."societe AS subSoc ON (bu.type = 'company' AND bu.url_id = subSoc.rowid)";
655
-	$sql .= "	  WHERE ". natural_search(array("subSoc.nom"), $search_thirdparty_user, 0, 1);
655
+	$sql .= "	  WHERE ".natural_search(array("subSoc.nom"), $search_thirdparty_user, 0, 1);
656 656
 	$sql .= "))";
657 657
 }
658 658
 if ($search_description) {
@@ -991,7 +991,7 @@  discard block
 block discarded – undo
991 991
 		if (!empty($last_receipts)) {
992 992
 			print '<datalist id="num_releve_list">';
993 993
 			foreach ($last_receipts as $num_releve) {
994
-				print '<option value="'.$num_releve.'"></option>';	// TODO We can add some info into option
994
+				print '<option value="'.$num_releve.'"></option>'; // TODO We can add some info into option
995 995
 			}
996 996
 			print '</datalist>';
997 997
 		}
@@ -1096,7 +1096,7 @@  discard block
 block discarded – undo
1096 1096
 	}
1097 1097
 
1098 1098
 	$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
1099
-	$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN'));  // This also change content of $arrayfields with user setup
1099
+	$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup
1100 1100
 	$selectedfields = ($mode != 'kanban' ? $htmlofselectarray : '');
1101 1101
 	$selectedfields .= (($action == 'reconcile' || $action == 'confirm_deleteonreconcile') ? $form->showCheckAddButtons('checkforselect', 1) : '');
1102 1102
 
@@ -1468,10 +1468,10 @@  discard block
 block discarded – undo
1468 1468
 			$backgroundcolor = "class='oddeven'";
1469 1469
 		} else {
1470 1470
 			if ($objp->amount < 0) {
1471
-				$color = '#' . getDolGlobalString('BANK_COLORIZE_MOVEMENT_COLOR1', 'fca955');
1471
+				$color = '#'.getDolGlobalString('BANK_COLORIZE_MOVEMENT_COLOR1', 'fca955');
1472 1472
 				$backgroundcolor = 'style="background: '.$color.';"';
1473 1473
 			} else {
1474
-				$color = '#' . getDolGlobalString('BANK_COLORIZE_MOVEMENT_COLOR2', '7fdb86');
1474
+				$color = '#'.getDolGlobalString('BANK_COLORIZE_MOVEMENT_COLOR2', '7fdb86');
1475 1475
 				$backgroundcolor = 'style="background: '.$color.';"';
1476 1476
 			}
1477 1477
 		}
@@ -1620,7 +1620,7 @@  discard block
 block discarded – undo
1620 1620
 				}
1621 1621
 			}
1622 1622
 
1623
-			print $labeltoshow;	// Already escaped
1623
+			print $labeltoshow; // Already escaped
1624 1624
 
1625 1625
 			print '</td>';
1626 1626
 			if (!$i) {
@@ -1726,8 +1726,7 @@  discard block
 block discarded – undo
1726 1726
 					$companylinked_id = $donstatic->socid;
1727 1727
 					if (!$companylinked_id) {
1728 1728
 						$thirdstr = ($donstatic->societe !== "" ?
1729
-									$donstatic->societe :
1730
-									$donstatic->firstname." ".$donstatic->lastname);
1729
+									$donstatic->societe : $donstatic->firstname." ".$donstatic->lastname);
1731 1730
 					}
1732 1731
 				}
1733 1732
 				if ($links[$key]['type'] == 'payment_expensereport') {
@@ -1886,7 +1885,7 @@  discard block
 block discarded – undo
1886 1885
 		include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
1887 1886
 		// Fields from hook
1888 1887
 		$parameters = array('arrayfields' => $arrayfields, 'object' => $object, 'obj' => $objp, 'i' => $i, 'totalarray' => &$totalarray);
1889
-		$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object, $action);    // Note that $action and $objecttmpect may have been modified by hook
1888
+		$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object, $action); // Note that $action and $objecttmpect may have been modified by hook
1890 1889
 		print $hookmanager->resPrint;
1891 1890
 
1892 1891
 		// Action edit/delete and select
Please login to merge, or discard this patch.