Completed
Branch develop (a38af6)
by
unknown
23:55
created
htdocs/bookcal/class/calendar.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -974,7 +974,7 @@
 block discarded – undo
974 974
 		} else {
975 975
 			$this->lines = $result;
976 976
 			// @phpstan-ignore-next-line
977
-			return $result;  // @phan-suppress-current-line PhanTypeMismatchReturn
977
+			return $result; // @phan-suppress-current-line PhanTypeMismatchReturn
978 978
 		}
979 979
 	}
980 980
 
Please login to merge, or discard this patch.
htdocs/societe/class/societe.class.php 1 patch
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -1066,8 +1066,8 @@  discard block
 block discarded – undo
1066 1066
 			$sql .= ", '".$this->db->escape($this->ip)."'";
1067 1067
 			if (!getDolGlobalString('MAIN_COMPANY_PERENTITY_SHARED')) {
1068 1068
 				$sql .= ", ".(empty($this->vat_reverse_charge) ? '0' : '1');
1069
-				$sql .= ", '" . $this->db->escape($this->accountancy_code_buy) . "'";
1070
-				$sql .= ", '" . $this->db->escape($this->accountancy_code_sell) . "'";
1069
+				$sql .= ", '".$this->db->escape($this->accountancy_code_buy)."'";
1070
+				$sql .= ", '".$this->db->escape($this->accountancy_code_sell)."'";
1071 1071
 			}
1072 1072
 			$sql .= ")";
1073 1073
 
@@ -1118,7 +1118,7 @@  discard block
 block discarded – undo
1118 1118
 				}
1119 1119
 
1120 1120
 				if ($ret >= 0) {
1121
-					if (! $notrigger) {
1121
+					if (!$notrigger) {
1122 1122
 						// Call trigger
1123 1123
 						$result = $this->call_trigger('COMPANY_CREATE', $user);
1124 1124
 						if ($result < 0) {
@@ -1196,7 +1196,7 @@  discard block
 block discarded – undo
1196 1196
 		$this->setUpperOrLowerCase();
1197 1197
 		$contact->phone_pro         = $this->phone;
1198 1198
 		if (getDolGlobalString('CONTACTS_DEFAULT_ROLES')) {
1199
-			$contact->roles			= explode(',', getDolGlobalString('CONTACTS_DEFAULT_ROLES'));
1199
+			$contact->roles = explode(',', getDolGlobalString('CONTACTS_DEFAULT_ROLES'));
1200 1200
 		}
1201 1201
 
1202 1202
 		$contactId = $contact->create($user, $notrigger);
@@ -1364,7 +1364,7 @@  discard block
 block discarded – undo
1364 1364
 						if ($this->id_prof_exists($keymin, $vallabel, ($this->id > 0 ? $this->id : 0))) {
1365 1365
 							$langs->loadLangs(array("errors", 'compta'));
1366 1366
 							$error++;
1367
-							$this->errors[] = $langs->trans('CustomerAccountancyCodeShort') . " " . $langs->trans("ErrorProdIdAlreadyExist", $vallabel) . ' (' . $langs->trans("ForbiddenBySetupRules") . ')';
1367
+							$this->errors[] = $langs->trans('CustomerAccountancyCodeShort')." ".$langs->trans("ErrorProdIdAlreadyExist", $vallabel).' ('.$langs->trans("ForbiddenBySetupRules").')';
1368 1368
 						}
1369 1369
 					}
1370 1370
 
@@ -1372,7 +1372,7 @@  discard block
 block discarded – undo
1372 1372
 					if (getDolGlobalString('SOCIETE_ACCOUNTANCY_CODE_CUSTOMER_MANDATORY') && (!isset($vallabel) || trim($vallabel) === '')) {
1373 1373
 						$langs->loadLangs(array("errors", 'compta'));
1374 1374
 						$error++;
1375
-						$this->errors[] = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv('CustomerAccountancyCodeShort')) . ' (' . $langs->trans("ForbiddenBySetupRules") . ')';
1375
+						$this->errors[] = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv('CustomerAccountancyCodeShort')).' ('.$langs->trans("ForbiddenBySetupRules").')';
1376 1376
 					}
1377 1377
 				} elseif ($key == 'ACCOUNTANCY_CODE_SUPPLIER' && !empty($this->fournisseur)) {
1378 1378
 					// Check for unicity
@@ -1380,7 +1380,7 @@  discard block
 block discarded – undo
1380 1380
 						if ($this->id_prof_exists($keymin, $vallabel, ($this->id > 0 ? $this->id : 0))) {
1381 1381
 							$langs->loadLangs(array("errors", 'compta'));
1382 1382
 							$error++;
1383
-							$this->errors[] = $langs->trans('SupplierAccountancyCodeShort') . " " . $langs->trans("ErrorProdIdAlreadyExist", $vallabel) . ' (' . $langs->trans("ForbiddenBySetupRules") . ')';
1383
+							$this->errors[] = $langs->trans('SupplierAccountancyCodeShort')." ".$langs->trans("ErrorProdIdAlreadyExist", $vallabel).' ('.$langs->trans("ForbiddenBySetupRules").')';
1384 1384
 						}
1385 1385
 					}
1386 1386
 
@@ -1388,7 +1388,7 @@  discard block
 block discarded – undo
1388 1388
 					if (getDolGlobalString('SOCIETE_ACCOUNTANCY_CODE_SUPPLIER_MANDATORY') && (!isset($vallabel) || trim($vallabel) === '')) {
1389 1389
 						$langs->loadLangs(array("errors", 'compta'));
1390 1390
 						$error++;
1391
-						$this->errors[] = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv('SupplierAccountancyCodeShort')) . ' (' . $langs->trans("ForbiddenBySetupRules") . ')';
1391
+						$this->errors[] = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv('SupplierAccountancyCodeShort')).' ('.$langs->trans("ForbiddenBySetupRules").')';
1392 1392
 					}
1393 1393
 				}
1394 1394
 			}
@@ -1430,17 +1430,17 @@  discard block
 block discarded – undo
1430 1430
 		$now = dol_now();
1431 1431
 
1432 1432
 		// Clean parameters
1433
-		$this->id 			= $id;
1434
-		$this->entity 		= ((isset($this->entity) && is_numeric($this->entity)) ? $this->entity : $conf->entity);
1433
+		$this->id = $id;
1434
+		$this->entity = ((isset($this->entity) && is_numeric($this->entity)) ? $this->entity : $conf->entity);
1435 1435
 		$this->name 		= $this->name ? trim($this->name) : trim((string) $this->nom);
1436 1436
 		$this->nom 			= $this->name; // For backward compatibility
1437
-		$this->name_alias 	= trim((string) $this->name_alias);
1437
+		$this->name_alias = trim((string) $this->name_alias);
1438 1438
 		$this->ref_ext		= (empty($this->ref_ext) ? '' : trim($this->ref_ext));
1439 1439
 		$this->address		= trim((string) $this->address);
1440 1440
 		$this->zip 			= trim((string) $this->zip);
1441 1441
 		$this->town 		= trim((string) $this->town);
1442
-		$this->state_id 	= (is_numeric($this->state_id)) ? (int) trim((string) $this->state_id) : 0;
1443
-		$this->country_id 	= ($this->country_id > 0) ? $this->country_id : 0;
1442
+		$this->state_id = (is_numeric($this->state_id)) ? (int) trim((string) $this->state_id) : 0;
1443
+		$this->country_id = ($this->country_id > 0) ? $this->country_id : 0;
1444 1444
 		$this->phone		= trim((string) $this->phone);
1445 1445
 		$this->phone		= preg_replace("/\s/", "", $this->phone);
1446 1446
 		$this->phone		= preg_replace("/\./", "", $this->phone);
@@ -1450,7 +1450,7 @@  discard block
 block discarded – undo
1450 1450
 		$this->fax			= trim((string) $this->fax);
1451 1451
 		$this->fax			= preg_replace("/\s/", "", $this->fax);
1452 1452
 		$this->fax			= preg_replace("/\./", "", $this->fax);
1453
-		$this->email		= trim((string) $this->email);
1453
+		$this->email = trim((string) $this->email);
1454 1454
 		$this->url			= $this->url ? clean_url($this->url, 0) : '';
1455 1455
 		$this->note_private = (empty($this->note_private) ? '' : trim($this->note_private));
1456 1456
 		$this->note_public  = (empty($this->note_public) ? '' : trim($this->note_public));
@@ -1460,14 +1460,14 @@  discard block
 block discarded – undo
1460 1460
 		$this->idprof4		= trim((string) $this->idprof4);
1461 1461
 		$this->idprof5		= (!empty($this->idprof5) ? trim($this->idprof5) : '');
1462 1462
 		$this->idprof6		= (!empty($this->idprof6) ? trim($this->idprof6) : '');
1463
-		$this->prefix_comm 	= trim((string) $this->prefix_comm);
1463
+		$this->prefix_comm = trim((string) $this->prefix_comm);
1464 1464
 		$this->outstanding_limit = price2num($this->outstanding_limit);
1465 1465
 		$this->order_min_amount = price2num($this->order_min_amount);
1466 1466
 		$this->supplier_order_min_amount = price2num($this->supplier_order_min_amount);
1467 1467
 
1468 1468
 		$this->tva_assuj			= (is_numeric($this->tva_assuj)) ? (int) trim((string) $this->tva_assuj) : 0;
1469 1469
 		$this->tva_intra			= dol_sanitizeFileName($this->tva_intra, '');
1470
-		$this->vat_reverse_charge	= empty($this->vat_reverse_charge) ? 0 : 1;
1470
+		$this->vat_reverse_charge = empty($this->vat_reverse_charge) ? 0 : 1;
1471 1471
 		if (empty($this->status)) {
1472 1472
 			$this->status = 0;
1473 1473
 		}
@@ -1617,7 +1617,7 @@  discard block
 block discarded – undo
1617 1617
 			$sql .= ",tva_assuj = ".($this->tva_assuj != '' ? "'".$this->db->escape($this->tva_assuj)."'" : "null");
1618 1618
 			$sql .= ",tva_intra = '".$this->db->escape($this->tva_intra)."'";
1619 1619
 			if (!getDolGlobalString('MAIN_COMPANY_PERENTITY_SHARED')) {
1620
-				$sql .= ",vat_reverse_charge = " . ($this->vat_reverse_charge != '' ? "'" . $this->db->escape($this->vat_reverse_charge) . "'" : 0);
1620
+				$sql .= ",vat_reverse_charge = ".($this->vat_reverse_charge != '' ? "'".$this->db->escape($this->vat_reverse_charge)."'" : 0);
1621 1621
 			}
1622 1622
 			$sql .= ",status = ".((int) $this->status);
1623 1623
 
@@ -1678,8 +1678,8 @@  discard block
 block discarded – undo
1678 1678
 			$sql .= ",supplier_order_min_amount= ".($this->supplier_order_min_amount != '' ? $this->supplier_order_min_amount : 'null');
1679 1679
 			$sql .= ",fk_prospectlevel='".$this->db->escape($this->fk_prospectlevel)."'";
1680 1680
 			if (!getDolGlobalString('MAIN_COMPANY_PERENTITY_SHARED')) {
1681
-				$sql .= ", accountancy_code_buy = '" . $this->db->escape($this->accountancy_code_buy) . "'";
1682
-				$sql .= ", accountancy_code_sell= '" . $this->db->escape($this->accountancy_code_sell) . "'";
1681
+				$sql .= ", accountancy_code_buy = '".$this->db->escape($this->accountancy_code_buy)."'";
1682
+				$sql .= ", accountancy_code_sell= '".$this->db->escape($this->accountancy_code_sell)."'";
1683 1683
 				if ($customer) {
1684 1684
 					$sql .= ", accountancy_code_customer_general = ".(!empty($this->accountancy_code_customer_general) ? "'".$this->db->escape($this->accountancy_code_customer_general)."'" : "null");
1685 1685
 					$sql .= ", code_compta = ".(!empty($this->code_compta_client) ? "'".$this->db->escape($this->code_compta_client)."'" : "null");
@@ -2073,7 +2073,7 @@  discard block
 block discarded – undo
2073 2073
 					$this->vat_reverse_charge = 0;
2074 2074
 				}
2075 2075
 
2076
-				$this->status				= $obj->status;
2076
+				$this->status = $obj->status;
2077 2077
 
2078 2078
 				// Local Taxes
2079 2079
 				$this->localtax1_assuj      = $obj->localtax1_assuj;
@@ -2100,7 +2100,7 @@  discard block
 block discarded – undo
2100 2100
 
2101 2101
 				$this->mode_reglement_id 	= $obj->mode_reglement;
2102 2102
 				$this->cond_reglement_id 	= $obj->cond_reglement;
2103
-				$this->deposit_percent		= $obj->deposit_percent;
2103
+				$this->deposit_percent = $obj->deposit_percent;
2104 2104
 				$this->transport_mode_id 	= $obj->transport_mode;
2105 2105
 				$this->mode_reglement_supplier_id 	= $obj->mode_reglement_supplier;
2106 2106
 				$this->cond_reglement_supplier_id 	= $obj->cond_reglement_supplier;
@@ -2671,10 +2671,10 @@  discard block
 block discarded – undo
2671 2671
 					$reparray[$i]['firstname'] = $obj->firstname;
2672 2672
 					$reparray[$i]['email'] = $obj->email;
2673 2673
 					$reparray[$i]['phone'] = $obj->office_phone;
2674
-					$reparray[$i]['office_phone'] = $obj->office_phone;			// Pro phone
2674
+					$reparray[$i]['office_phone'] = $obj->office_phone; // Pro phone
2675 2675
 					$reparray[$i]['office_fax'] = $obj->office_fax;
2676
-					$reparray[$i]['user_mobile'] = $obj->user_mobile;			// Pro mobile
2677
-					$reparray[$i]['personal_mobile'] = $obj->personal_mobile;	// Personal mobile
2676
+					$reparray[$i]['user_mobile'] = $obj->user_mobile; // Pro mobile
2677
+					$reparray[$i]['personal_mobile'] = $obj->personal_mobile; // Personal mobile
2678 2678
 					$reparray[$i]['job'] = $obj->job;
2679 2679
 					$reparray[$i]['statut'] = $obj->status; // deprecated
2680 2680
 					$reparray[$i]['status'] = $obj->status;
@@ -2887,7 +2887,7 @@  discard block
 block discarded – undo
2887 2887
 			$datas['status'] = ' '.$this->getLibStatut(5);
2888 2888
 		}
2889 2889
 		if (isset($this->client) && isset($this->fournisseur)) {
2890
-			$datas['type'] = ' &nbsp; ' . $this->getTypeUrl(1);
2890
+			$datas['type'] = ' &nbsp; '.$this->getTypeUrl(1);
2891 2891
 		}
2892 2892
 		$datas['name'] = '<br><b>'.$langs->trans('Name').':</b> '.dol_escape_htmltag(dol_string_nohtmltag($this->name));
2893 2893
 		if (!empty($this->name_alias) && empty($noaliasinname)) {
@@ -2955,9 +2955,9 @@  discard block
 block discarded – undo
2955 2955
 		}
2956 2956
 		// show categories for this record only in ajax to not overload lists
2957 2957
 		if (!$nofetch && isModEnabled('category') && $this->client) {
2958
-			require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
2958
+			require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
2959 2959
 			$form = new Form($this->db);
2960
-			$datas['categories_customer'] = '<br>' . $form->showCategories($this->id, Categorie::TYPE_CUSTOMER, 1, 1);
2960
+			$datas['categories_customer'] = '<br>'.$form->showCategories($this->id, Categorie::TYPE_CUSTOMER, 1, 1);
2961 2961
 		}
2962 2962
 		if (!empty($this->code_fournisseur) && $this->fournisseur) {
2963 2963
 			$datas['suppliercode'] = '<br><b>'.$langs->trans('SupplierCode').':</b> '.$this->code_fournisseur;
@@ -2968,9 +2968,9 @@  discard block
 block discarded – undo
2968 2968
 		}
2969 2969
 		// show categories for this record only in ajax to not overload lists
2970 2970
 		if (!$nofetch && isModEnabled('category') && $this->fournisseur) {
2971
-			require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
2971
+			require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
2972 2972
 			$form = new Form($this->db);
2973
-			$datas['categories_supplier'] = '<br>' . $form->showCategories($this->id, Categorie::TYPE_SUPPLIER, 1, 1);
2973
+			$datas['categories_supplier'] = '<br>'.$form->showCategories($this->id, Categorie::TYPE_SUPPLIER, 1, 1);
2974 2974
 		}
2975 2975
 
2976 2976
 		$datas['divclose'] = '</div>';
@@ -3874,7 +3874,7 @@  discard block
 block discarded – undo
3874 3874
 		global $langs;
3875 3875
 
3876 3876
 		if ($company_id > 0) {
3877
-			$sql = "SELECT parent FROM " . MAIN_DB_PREFIX . "societe WHERE rowid = ".((int) $company_id);
3877
+			$sql = "SELECT parent FROM ".MAIN_DB_PREFIX."societe WHERE rowid = ".((int) $company_id);
3878 3878
 			$resql = $this->db->query($sql);
3879 3879
 			if ($resql) {
3880 3880
 				if ($obj = $this->db->fetch_object($resql)) {
@@ -4490,7 +4490,7 @@  discard block
 block discarded – undo
4490 4490
 		$country_code = $country_label = '';
4491 4491
 		if (getDolGlobalString('MAIN_INFO_SOCIETE_COUNTRY')) {
4492 4492
 			$tmp = explode(':', getDolGlobalString('MAIN_INFO_SOCIETE_COUNTRY'));
4493
-			$country_id =  (is_numeric($tmp[0])) ? (int) $tmp[0] : 0;
4493
+			$country_id = (is_numeric($tmp[0])) ? (int) $tmp[0] : 0;
4494 4494
 			if (!empty($tmp[1])) {   // If $conf->global->MAIN_INFO_SOCIETE_COUNTRY is "id:code:label"
4495 4495
 				$country_code = $tmp[1];
4496 4496
 				$country_label = $tmp[2];
@@ -5365,7 +5365,7 @@  discard block
 block discarded – undo
5365 5365
 		if (method_exists($this, 'getLibStatut')) {
5366 5366
 			$return .= '<br><div class="info-box-status">'.$this->getLibStatut(3).'</div>';
5367 5367
 		}
5368
-		$return .= '</div>';	// end info-box-content
5368
+		$return .= '</div>'; // end info-box-content
5369 5369
 		$return .= '</div>';
5370 5370
 		$return .= '</div>';
5371 5371
 
@@ -5469,7 +5469,7 @@  discard block
 block discarded – undo
5469 5469
 		global $conf, $langs, $hookmanager, $user, $action;
5470 5470
 
5471 5471
 		$error = 0;
5472
-		$soc_origin = new Societe($this->db);		// The thirdparty that we will delete
5472
+		$soc_origin = new Societe($this->db); // The thirdparty that we will delete
5473 5473
 
5474 5474
 		dol_syslog("mergeCompany merge thirdparty id=".$soc_origin_id." (will be deleted) into the thirdparty id=".$this->id);
5475 5475
 
Please login to merge, or discard this patch.
htdocs/knowledgemanagement/class/knowledgerecord.class.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -778,12 +778,12 @@  discard block
 block discarded – undo
778 778
 		$datas['label'] = '<br><b>'.$langs->trans('Ref').':</b> '.$this->ref;
779 779
 		$datas['question'] = '<br><b>'.$langs->trans('Question').':</b> '.$this->question;
780 780
 		$labellang = ($this->lang ? $langs->trans('Language_'.$this->lang) : '');
781
-		$datas['lang'] = '<br><b>'.$langs->trans('Language').':</b> ' . picto_from_langcode($this->lang, 'class="paddingrightonly saturatemedium opacitylow"') . $labellang;
781
+		$datas['lang'] = '<br><b>'.$langs->trans('Language').':</b> '.picto_from_langcode($this->lang, 'class="paddingrightonly saturatemedium opacitylow"').$labellang;
782 782
 		// show categories for this record only in ajax to not overload lists
783 783
 		if (isModEnabled('category') && !$nofetch) {
784
-			require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
784
+			require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
785 785
 			$form = new Form($this->db);
786
-			$datas['categories'] = '<br>' . $form->showCategories($this->id, Categorie::TYPE_KNOWLEDGEMANAGEMENT, 1);
786
+			$datas['categories'] = '<br>'.$form->showCategories($this->id, Categorie::TYPE_KNOWLEDGEMANAGEMENT, 1);
787 787
 		}
788 788
 
789 789
 		return $datas;
@@ -1020,7 +1020,7 @@  discard block
 block discarded – undo
1020 1020
 		} else {
1021 1021
 			$this->lines = $result;
1022 1022
 			// @phpstan-ignore-next-line
1023
-			return $result;  // @phan-suppress-current-line PhanTypeMismatchReturn
1023
+			return $result; // @phan-suppress-current-line PhanTypeMismatchReturn
1024 1024
 		}
1025 1025
 	}
1026 1026
 
@@ -1041,7 +1041,7 @@  discard block
 block discarded – undo
1041 1041
 		if (getDolGlobalString('KNOWLEDGEMANAGEMENT_KNOWLEDGERECORD_ADDON')) {
1042 1042
 			$mybool = false;
1043 1043
 
1044
-			$file = getDolGlobalString('KNOWLEDGEMANAGEMENT_KNOWLEDGERECORD_ADDON') . ".php";
1044
+			$file = getDolGlobalString('KNOWLEDGEMANAGEMENT_KNOWLEDGERECORD_ADDON').".php";
1045 1045
 			$classname = getDolGlobalString('KNOWLEDGEMANAGEMENT_KNOWLEDGERECORD_ADDON');
1046 1046
 
1047 1047
 			// Include file with class
Please login to merge, or discard this patch.
htdocs/compta/prelevement/create.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -245,11 +245,11 @@  discard block
 block discarded – undo
245 245
 
246 246
 
247 247
 if ($sourcetype != 'salary') {
248
-	$nb = $bprev->nbOfInvoiceToPay($type);  // @phan-suppress-current-line PhanPluginSuspiciousParamPosition
249
-	$pricetowithdraw = $bprev->SommeAPrelever($type);  // @phan-suppress-current-line PhanPluginSuspiciousParamPosition
248
+	$nb = $bprev->nbOfInvoiceToPay($type); // @phan-suppress-current-line PhanPluginSuspiciousParamPosition
249
+	$pricetowithdraw = $bprev->SommeAPrelever($type); // @phan-suppress-current-line PhanPluginSuspiciousParamPosition
250 250
 } else {
251
-	$nb = $bprev->nbOfInvoiceToPay($type, 'salary');  // @phan-suppress-current-line PhanPluginSuspiciousParamPosition
252
-	$pricetowithdraw = $bprev->SommeAPrelever($type, 'salary');  // @phan-suppress-current-line PhanPluginSuspiciousParamPosition
251
+	$nb = $bprev->nbOfInvoiceToPay($type, 'salary'); // @phan-suppress-current-line PhanPluginSuspiciousParamPosition
252
+	$pricetowithdraw = $bprev->SommeAPrelever($type, 'salary'); // @phan-suppress-current-line PhanPluginSuspiciousParamPosition
253 253
 }
254 254
 if ($nb < 0) {
255 255
 	dol_print_error($db, $bprev->error);
@@ -453,7 +453,7 @@  discard block
 block discarded – undo
453 453
 
454 454
 	$param = '';
455 455
 	if ($type) {
456
-		$param .= '&type=' . urlencode((string) $type);
456
+		$param .= '&type='.urlencode((string) $type);
457 457
 	}
458 458
 	if ($limit > 0 && $limit != $conf->liste_limit) {
459 459
 		$param .= '&limit='.((int) $limit);
@@ -550,7 +550,7 @@  discard block
 block discarded – undo
550 550
 		while ($i < $num && $i < $limit) {
551 551
 			$obj = $db->fetch_object($resql);
552 552
 			if ($sourcetype != 'salary') {
553
-				$bac = new CompanyBankAccount($db);	// Must include the new in loop so the fetch is clean
553
+				$bac = new CompanyBankAccount($db); // Must include the new in loop so the fetch is clean
554 554
 				$bac->fetch(0, '', $obj->socid);
555 555
 
556 556
 				$invoicestatic->id = $obj->rowid;
Please login to merge, or discard this patch.
htdocs/compta/tva/quadri_detail.php 1 patch
Spacing   +89 added lines, -89 removed lines patch added patch discarded remove patch
@@ -31,18 +31,18 @@  discard block
 block discarded – undo
31 31
 
32 32
 // Load Dolibarr environment
33 33
 require '../../main.inc.php';
34
-require_once DOL_DOCUMENT_ROOT . '/core/lib/report.lib.php';
35
-require_once DOL_DOCUMENT_ROOT . '/core/lib/tax.lib.php';
36
-require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
37
-require_once DOL_DOCUMENT_ROOT . '/compta/tva/class/tva.class.php';
38
-require_once DOL_DOCUMENT_ROOT . '/compta/localtax/class/localtax.class.php';
39
-require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
40
-require_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php';
41
-require_once DOL_DOCUMENT_ROOT . '/compta/paiement/class/paiement.class.php';
42
-require_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.facture.class.php';
43
-require_once DOL_DOCUMENT_ROOT . '/fourn/class/paiementfourn.class.php';
44
-require_once DOL_DOCUMENT_ROOT . '/expensereport/class/expensereport.class.php';
45
-require_once DOL_DOCUMENT_ROOT . '/expensereport/class/paymentexpensereport.class.php';
34
+require_once DOL_DOCUMENT_ROOT.'/core/lib/report.lib.php';
35
+require_once DOL_DOCUMENT_ROOT.'/core/lib/tax.lib.php';
36
+require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
37
+require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php';
38
+require_once DOL_DOCUMENT_ROOT.'/compta/localtax/class/localtax.class.php';
39
+require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
40
+require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
41
+require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
42
+require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
43
+require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php';
44
+require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php';
45
+require_once DOL_DOCUMENT_ROOT.'/expensereport/class/paymentexpensereport.class.php';
46 46
 
47 47
 // Load translation files required by the page
48 48
 $langs->loadLangs(array("other", "compta", "banks", "bills", "companies", "product", "trips", "admin"));
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 $invoice_type = GETPOSTISSET('invoice_type') ? GETPOST('invoice_type', 'alpha') : '';
52 52
 $vat_rate_show = GETPOSTISSET('vat_rate_show') ? GETPOST('vat_rate_show', 'alphanohtml') : -1;
53 53
 
54
-include DOL_DOCUMENT_ROOT . '/compta/tva/initdatesforvat.inc.php';
54
+include DOL_DOCUMENT_ROOT.'/compta/tva/initdatesforvat.inc.php';
55 55
 // Variables provided by include:
56 56
 '
57 57
 @phan-var-force int $date_start
@@ -107,11 +107,11 @@  discard block
 block discarded – undo
107 107
 $listofparams = array('date_startmonth', 'date_startyear', 'date_startday', 'date_endmonth', 'date_endyear', 'date_endday');
108 108
 foreach ($listofparams as $param) {
109 109
 	if (GETPOST($param) != '') {
110
-		$morequerystring .= ($morequerystring ? '&' : '') . $param . '=' . GETPOST($param);
110
+		$morequerystring .= ($morequerystring ? '&' : '').$param.'='.GETPOST($param);
111 111
 	}
112 112
 }
113 113
 
114
-$title = $langs->trans("VATReport") . " " . dol_print_date($date_start, '', 'tzserver') . " -> " . dol_print_date($date_end, '', 'tzserver');
114
+$title = $langs->trans("VATReport")." ".dol_print_date($date_start, '', 'tzserver')." -> ".dol_print_date($date_end, '', 'tzserver');
115 115
 llxHeader('', $title, '', '', 0, 0, '', '', $morequerystring);
116 116
 
117 117
 
@@ -119,8 +119,8 @@  discard block
 block discarded – undo
119 119
 
120 120
 //$fsearch.='<br>';
121 121
 $fsearch = '<!-- hidden fields for form -->';
122
-$fsearch .= '<input type="hidden" name="token" value="' . newToken() . '">';
123
-$fsearch .= '<input type="hidden" name="modetax" value="' . $modetax . '">';
122
+$fsearch .= '<input type="hidden" name="token" value="'.newToken().'">';
123
+$fsearch .= '<input type="hidden" name="modetax" value="'.$modetax.'">';
124 124
 //$fsearch.='  '.$langs->trans("SalesTurnoverMinimum").': ';
125 125
 //$fsearch.='  <input type="text" name="min" value="'.$min.'">';
126 126
 
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
 if ($modetax == 2) {
138 138
 	$calcmode = $langs->trans('OptionPaymentForProductAndServices');
139 139
 }
140
-$calcmode .= ' <span class="opacitymedium">(' . $langs->trans("TaxModuleSetupToModifyRules", DOL_URL_ROOT . '/admin/taxes.php') . ')</span>';
140
+$calcmode .= ' <span class="opacitymedium">('.$langs->trans("TaxModuleSetupToModifyRules", DOL_URL_ROOT.'/admin/taxes.php').')</span>';
141 141
 // Set period
142 142
 $period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0, 0, '', '', '', '', 1, '', '', 'tzserver');
143 143
 $period .= ' - ';
@@ -169,19 +169,19 @@  discard block
 block discarded – undo
169 169
 	$description .= $langs->trans("RulesVATInProducts");
170 170
 }
171 171
 if (getDolGlobalString('TAX_MODE_SELL_SERVICE') == 'invoice') {
172
-	$description .= '<br>' . $langs->trans("RulesVATDueServices");
172
+	$description .= '<br>'.$langs->trans("RulesVATDueServices");
173 173
 }
174 174
 if (getDolGlobalString('TAX_MODE_SELL_SERVICE') == 'payment') {
175
-	$description .= '<br>' . $langs->trans("RulesVATInServices");
175
+	$description .= '<br>'.$langs->trans("RulesVATInServices");
176 176
 }
177 177
 if (getDolGlobalString('FACTURE_DEPOSITS_ARE_JUST_PAYMENTS')) {
178
-	$description .= '<br>' . $langs->trans("DepositsAreNotIncluded");
178
+	$description .= '<br>'.$langs->trans("DepositsAreNotIncluded");
179 179
 }
180 180
 if (getDolGlobalString('FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS')) {
181 181
 	$description .= $langs->trans("SupplierDepositsAreNotIncluded");
182 182
 }
183 183
 if (isModEnabled('accounting')) {
184
-	$description .= '<br>' . $langs->trans("ThisIsAnEstimatedValue");
184
+	$description .= '<br>'.$langs->trans("ThisIsAnEstimatedValue");
185 185
 }
186 186
 
187 187
 // Customers invoices
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
 $vatcust = $langs->trans("VATReceived");
192 192
 $namecust = $langs->trans("Name");
193 193
 if ($mysoc->tva_assuj) {
194
-	$vatcust .= ' (' . $langs->trans("VATToPay") . ')';
194
+	$vatcust .= ' ('.$langs->trans("VATToPay").')';
195 195
 }
196 196
 
197 197
 // Suppliers invoices
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
 $vatsup = $langs->trans("VATPaid");
202 202
 $namesup = $namecust;
203 203
 if ($mysoc->tva_assuj) {
204
-	$vatsup .= ' (' . $langs->trans("ToGetBack") . ')';
204
+	$vatsup .= ' ('.$langs->trans("ToGetBack").')';
205 205
 }
206 206
 
207 207
 $optioncss = GETPOST('optioncss', 'alpha');
@@ -237,11 +237,11 @@  discard block
 block discarded – undo
237 237
 if (!is_array($x_coll) || !is_array($x_paye)) {
238 238
 	$langs->load("errors");
239 239
 	if ($x_coll == -1) {
240
-		print '<tr><td colspan="' . $columns . '">' . $langs->trans("ErrorNoAccountancyModuleLoaded") . '</td></tr>';
240
+		print '<tr><td colspan="'.$columns.'">'.$langs->trans("ErrorNoAccountancyModuleLoaded").'</td></tr>';
241 241
 	} elseif ($x_coll == -2) {
242
-		print '<tr><td colspan="' . $columns . '">' . $langs->trans("FeatureNotYetAvailable") . '</td></tr>';
242
+		print '<tr><td colspan="'.$columns.'">'.$langs->trans("FeatureNotYetAvailable").'</td></tr>';
243 243
 	} else {
244
-		print '<tr><td colspan="' . $columns . '">' . $langs->trans("Error") . '</td></tr>';
244
+		print '<tr><td colspan="'.$columns.'">'.$langs->trans("Error").'</td></tr>';
245 245
 	}
246 246
 } else {
247 247
 	$x_both = array();
@@ -391,21 +391,21 @@  discard block
 block discarded – undo
391 391
 
392 392
 	// Customers invoices
393 393
 	print '<tr class="liste_titre">';
394
-	print '<td class="left">' . $elementcust . '</td>';
395
-	print '<td class="left">' . $langs->trans("DateInvoice") . '</td>';
394
+	print '<td class="left">'.$elementcust.'</td>';
395
+	print '<td class="left">'.$langs->trans("DateInvoice").'</td>';
396 396
 	if (getDolGlobalString('TAX_MODE_SELL_PRODUCT') == 'payment' || getDolGlobalString('TAX_MODE_SELL_SERVICE') == 'payment') {
397
-		print '<td class="left">' . $langs->trans("DatePayment") . '</td>';
397
+		print '<td class="left">'.$langs->trans("DatePayment").'</td>';
398 398
 	} else {
399 399
 		print '<td></td>';
400 400
 	}
401
-	print '<td class="left">' . $namecust . '</td>';
402
-	print '<td class="left">' . $productcust . '</td>';
401
+	print '<td class="left">'.$namecust.'</td>';
402
+	print '<td class="left">'.$productcust.'</td>';
403 403
 	if ($modetax != 1) {
404
-		print '<td class="right">' . $amountcust . '</td>';
405
-		print '<td class="right">' . $langs->trans("Payment") . ' (' . $langs->trans("PercentOfInvoice") . ')</td>';
404
+		print '<td class="right">'.$amountcust.'</td>';
405
+		print '<td class="right">'.$langs->trans("Payment").' ('.$langs->trans("PercentOfInvoice").')</td>';
406 406
 	}
407
-	print '<td class="right">' . $langs->trans("AmountHTVATRealReceived") . '</td>';
408
-	print '<td class="right">' . $vatcust . '</td>';
407
+	print '<td class="right">'.$langs->trans("AmountHTVATRealReceived").'</td>';
408
+	print '<td class="right">'.$vatcust.'</td>';
409 409
 	print '</tr>';
410 410
 
411 411
 	$action = "tvadetail";
@@ -426,15 +426,15 @@  discard block
 block discarded – undo
426 426
 		if (is_array($x_both[$rate]['coll']['detail'])) {
427 427
 			// VAT Rate
428 428
 			print "<tr>";
429
-			print '<td class="tax_rate" colspan="' . ($span + 1) . '">';
430
-			print $langs->trans('Rate') . ' : ' . vatrate($rate) . '%';
431
-			print ' - <a href="' . DOL_URL_ROOT . '/compta/tva/quadri_detail.php?invoice_type=customer';
429
+			print '<td class="tax_rate" colspan="'.($span + 1).'">';
430
+			print $langs->trans('Rate').' : '.vatrate($rate).'%';
431
+			print ' - <a href="'.DOL_URL_ROOT.'/compta/tva/quadri_detail.php?invoice_type=customer';
432 432
 			if ($invoice_type != 'customer' || !GETPOSTISSET('vat_rate_show') || GETPOST('vat_rate_show') != $rate) {
433
-				print '&amp;vat_rate_show=' . urlencode($rate);
433
+				print '&amp;vat_rate_show='.urlencode($rate);
434 434
 			}
435
-			print '&amp;date_startyear=' . urlencode($date_start_year) . '&amp;date_startmonth=' . urlencode($date_start_month) . '&amp;date_startday=' . urlencode($date_start_day) . '&amp;date_endyear=' . urlencode($date_end_year) . '&amp;date_endmonth=' . urlencode($date_end_month) . '&amp;date_endday=' . urlencode($date_end_day) . '">' . img_picto('', 'chevron-down', 'class="paddingrightonly"') . $langs->trans('VATReportShowByRateDetails') . '</a>';
435
+			print '&amp;date_startyear='.urlencode($date_start_year).'&amp;date_startmonth='.urlencode($date_start_month).'&amp;date_startday='.urlencode($date_start_day).'&amp;date_endyear='.urlencode($date_end_year).'&amp;date_endmonth='.urlencode($date_end_month).'&amp;date_endday='.urlencode($date_end_day).'">'.img_picto('', 'chevron-down', 'class="paddingrightonly"').$langs->trans('VATReportShowByRateDetails').'</a>';
436 436
 			print '</td>';
437
-			print '</tr>' . "\n";
437
+			print '</tr>'."\n";
438 438
 
439 439
 			foreach ($x_both[$rate]['coll']['detail'] as $index => $fields) {
440 440
 				// Define type
@@ -505,14 +505,14 @@  discard block
 block discarded – undo
505 505
 					print '<tr class="oddeven">';
506 506
 
507 507
 					// Ref
508
-					print '<td class="nowrap left">' . $fields['link'] . '</td>';
508
+					print '<td class="nowrap left">'.$fields['link'].'</td>';
509 509
 
510 510
 					// Invoice date
511
-					print '<td class="left">' . dol_print_date($fields['datef'], 'day') . '</td>';
511
+					print '<td class="left">'.dol_print_date($fields['datef'], 'day').'</td>';
512 512
 
513 513
 					// Payment date
514 514
 					if (getDolGlobalString('TAX_MODE_SELL_PRODUCT') == 'payment' || getDolGlobalString('TAX_MODE_SELL_SERVICE') == 'payment') {
515
-						print '<td class="left">' . dol_print_date($fields['datep'], 'day') . '</td>';
515
+						print '<td class="left">'.dol_print_date($fields['datep'], 'day').'</td>';
516 516
 					} else {
517 517
 						print '<td></td>';
518 518
 					}
@@ -528,10 +528,10 @@  discard block
 block discarded – undo
528 528
 					if ($fields['pid']) {
529 529
 						$product_static->id = $fields['pid'];
530 530
 						$product_static->ref = $fields['pref'];
531
-						$product_static->type = $fields['dtype'];        // We force with the type of line to have type how line is registered
531
+						$product_static->type = $fields['dtype']; // We force with the type of line to have type how line is registered
532 532
 						print $product_static->getNomUrl(1);
533 533
 						if (dol_string_nohtmltag($fields['descr'])) {
534
-							print ' - ' . dol_trunc(dol_string_nohtmltag($fields['descr']), 24);
534
+							print ' - '.dol_trunc(dol_string_nohtmltag($fields['descr']), 24);
535 535
 						}
536 536
 					} else {
537 537
 						if ($type) {
@@ -548,7 +548,7 @@  discard block
 block discarded – undo
548 548
 								$fields['descr'] = $langs->transnoentitiesnoconv($reg[1]);
549 549
 							}
550 550
 						}
551
-						print $text . ' ' . dol_trunc(dol_string_nohtmltag($fields['descr']), 24);
551
+						print $text.' '.dol_trunc(dol_string_nohtmltag($fields['descr']), 24);
552 552
 
553 553
 						// Show range
554 554
 						print_date_range($fields['ddate_start'], $fields['ddate_end']);
@@ -575,7 +575,7 @@  discard block
 block discarded – undo
575 575
 						if ($fields['payment_amount'] && $fields['ftotal_ttc']) {
576 576
 							$payment_static->id = $fields['payment_id'];
577 577
 							$payment_static->ref = $fields['payment_ref'];
578
-							print $payment_static->getNomUrl(2, '', '', 0) . ' ';
578
+							print $payment_static->getNomUrl(2, '', '', 0).' ';
579 579
 						}
580 580
 						if (($type == 0 && getDolGlobalString('TAX_MODE_SELL_PRODUCT') == 'invoice')
581 581
 							|| ($type == 1 && getDolGlobalString('TAX_MODE_SELL_SERVICE') == 'invoice')) {
@@ -586,7 +586,7 @@  discard block
 block discarded – undo
586 586
 							}
587 587
 							print price(price2num($fields['payment_amount'], 'MT'));
588 588
 							if (isset($fields['payment_amount'])) {
589
-								print ' (' . round($ratiopaymentinvoice * 100, 2) . '%)';
589
+								print ' ('.round($ratiopaymentinvoice * 100, 2).'%)';
590 590
 							}
591 591
 						}
592 592
 						print '</td>';
@@ -615,50 +615,50 @@  discard block
 block discarded – undo
615 615
 		// Total customers for this vat rate
616 616
 		print '<tr class="liste_total">';
617 617
 		print '<td colspan="4"></td>';
618
-		print '<td class="right">' . $langs->trans("Total") . ':</td>';
618
+		print '<td class="right">'.$langs->trans("Total").':</td>';
619 619
 		if ($modetax != 1) {
620 620
 			print '<td class="nowrap right">&nbsp;</td>';
621 621
 			print '<td class="right">&nbsp;</td>';
622 622
 		}
623
-		print '<td class="right"><span class="amount">' . price(price2num($subtot_coll_total_ht, 'MT')) . '</span></td>';
624
-		print '<td class="nowrap right"><span class="amount">' . price(price2num($subtot_coll_vat, 'MT')) . '</span></td>';
623
+		print '<td class="right"><span class="amount">'.price(price2num($subtot_coll_total_ht, 'MT')).'</span></td>';
624
+		print '<td class="nowrap right"><span class="amount">'.price(price2num($subtot_coll_vat, 'MT')).'</span></td>';
625 625
 		print '</tr>';
626 626
 	}
627 627
 
628 628
 	if (count($x_coll) == 0) {   // Show a total line if nothing shown
629 629
 		print '<tr class="liste_total">';
630 630
 		print '<td colspan="4"></td>';
631
-		print '<td class="right">' . $langs->trans("Total") . ':</td>';
631
+		print '<td class="right">'.$langs->trans("Total").':</td>';
632 632
 		if ($modetax != 1) {
633 633
 			print '<td class="nowrap right">&nbsp;</td>';
634 634
 			print '<td class="right">&nbsp;</td>';
635 635
 		}
636
-		print '<td class="right">' . price(price2num(0, 'MT')) . '</td>';
637
-		print '<td class="nowrap right">' . price(price2num(0, 'MT')) . '</td>';
636
+		print '<td class="right">'.price(price2num(0, 'MT')).'</td>';
637
+		print '<td class="nowrap right">'.price(price2num(0, 'MT')).'</td>';
638 638
 		print '</tr>';
639 639
 	}
640 640
 
641 641
 	// Blank line
642
-	print '<tr><td colspan="' . ($span + 2) . '">&nbsp;</td></tr>';
642
+	print '<tr><td colspan="'.($span + 2).'">&nbsp;</td></tr>';
643 643
 
644 644
 	// Print table headers for this quadri - expenses
645 645
 	print '<tr class="liste_titre liste_titre_topborder">';
646
-	print '<td class="left">' . $elementsup . '</td>';
647
-	print '<td class="left">' . $langs->trans("DateInvoice") . '</td>';
646
+	print '<td class="left">'.$elementsup.'</td>';
647
+	print '<td class="left">'.$langs->trans("DateInvoice").'</td>';
648 648
 	if (getDolGlobalString('TAX_MODE_BUY_PRODUCT') == 'payment' || getDolGlobalString('TAX_MODE_BUY_SERVICE') == 'payment') {
649
-		print '<td class="left">' . $langs->trans("DatePayment") . '</td>';
649
+		print '<td class="left">'.$langs->trans("DatePayment").'</td>';
650 650
 	} else {
651 651
 		print '<td></td>';
652 652
 	}
653
-	print '<td class="left">' . $namesup . '</td>';
654
-	print '<td class="left">' . $productsup . '</td>';
653
+	print '<td class="left">'.$namesup.'</td>';
654
+	print '<td class="left">'.$productsup.'</td>';
655 655
 	if ($modetax != 1) {
656
-		print '<td class="right">' . $amountsup . '</td>';
657
-		print '<td class="right">' . $langs->trans("Payment") . ' (' . $langs->trans("PercentOfInvoice") . ')</td>';
656
+		print '<td class="right">'.$amountsup.'</td>';
657
+		print '<td class="right">'.$langs->trans("Payment").' ('.$langs->trans("PercentOfInvoice").')</td>';
658 658
 	}
659
-	print '<td class="right">' . $langs->trans("AmountHTVATRealPaid") . '</td>';
660
-	print '<td class="right">' . $vatsup . '</td>';
661
-	print '</tr>' . "\n";
659
+	print '<td class="right">'.$langs->trans("AmountHTVATRealPaid").'</td>';
660
+	print '<td class="right">'.$vatsup.'</td>';
661
+	print '</tr>'."\n";
662 662
 
663 663
 	foreach (array_keys($x_paye) as $rate) {
664 664
 		$subtot_paye_total_ht = 0;
@@ -666,15 +666,15 @@  discard block
 block discarded – undo
666 666
 
667 667
 		if (is_array($x_both[$rate]['paye']['detail'])) {
668 668
 			print "<tr>";
669
-			print '<td class="tax_rate" colspan="' . ($span + 1) . '">';
670
-			print $langs->trans('Rate') . ' : ' . vatrate($rate) . '%';
671
-			print ' - <a href="' . DOL_URL_ROOT . '/compta/tva/quadri_detail.php?invoice_type=supplier';
669
+			print '<td class="tax_rate" colspan="'.($span + 1).'">';
670
+			print $langs->trans('Rate').' : '.vatrate($rate).'%';
671
+			print ' - <a href="'.DOL_URL_ROOT.'/compta/tva/quadri_detail.php?invoice_type=supplier';
672 672
 			if ($invoice_type != 'supplier' || !GETPOSTISSET('vat_rate_show') || GETPOST('vat_rate_show') != $rate) {
673
-				print '&amp;vat_rate_show=' . urlencode($rate);
673
+				print '&amp;vat_rate_show='.urlencode($rate);
674 674
 			}
675
-			print '&amp;date_startyear=' . urlencode($date_start_year) . '&amp;date_startmonth=' . urlencode($date_start_month) . '&amp;date_startday=' . urlencode($date_start_day) . '&amp;date_endyear=' . urlencode($date_end_year) . '&amp;date_endmonth=' . urlencode($date_end_month) . '&amp;date_endday=' . urlencode($date_end_day) . '">' . img_picto('', 'chevron-down', 'class="paddingrightonly"') . $langs->trans('VATReportShowByRateDetails') . '</a>';
675
+			print '&amp;date_startyear='.urlencode($date_start_year).'&amp;date_startmonth='.urlencode($date_start_month).'&amp;date_startday='.urlencode($date_start_day).'&amp;date_endyear='.urlencode($date_end_year).'&amp;date_endmonth='.urlencode($date_end_month).'&amp;date_endday='.urlencode($date_end_day).'">'.img_picto('', 'chevron-down', 'class="paddingrightonly"').$langs->trans('VATReportShowByRateDetails').'</a>';
676 676
 			print '</td>';
677
-			print '</tr>' . "\n";
677
+			print '</tr>'."\n";
678 678
 
679 679
 			foreach ($x_both[$rate]['paye']['detail'] as $index => $fields) {
680 680
 				// Define type
@@ -743,14 +743,14 @@  discard block
 block discarded – undo
743 743
 					print '<tr class="oddeven">';
744 744
 
745 745
 					// Ref
746
-					print '<td class="nowrap left">' . $fields['link'] . '</td>';
746
+					print '<td class="nowrap left">'.$fields['link'].'</td>';
747 747
 
748 748
 					// Invoice date
749
-					print '<td class="left">' . dol_print_date($fields['datef'], 'day') . '</td>';
749
+					print '<td class="left">'.dol_print_date($fields['datef'], 'day').'</td>';
750 750
 
751 751
 					// Payment date
752 752
 					if (getDolGlobalString('TAX_MODE_BUY_PRODUCT') == 'payment' || getDolGlobalString('TAX_MODE_BUY_SERVICE') == 'payment') {
753
-						print '<td class="left">' . dol_print_date($fields['datep'], 'day') . '</td>';
753
+						print '<td class="left">'.dol_print_date($fields['datep'], 'day').'</td>';
754 754
 					} else {
755 755
 						print '<td></td>';
756 756
 					}
@@ -766,10 +766,10 @@  discard block
 block discarded – undo
766 766
 					if ($fields['pid']) {
767 767
 						$product_static->id = $fields['pid'];
768 768
 						$product_static->ref = $fields['pref'];
769
-						$product_static->type = $fields['dtype'];        // We force with the type of line to have type how line is registered
769
+						$product_static->type = $fields['dtype']; // We force with the type of line to have type how line is registered
770 770
 						print $product_static->getNomUrl(1);
771 771
 						if (dol_string_nohtmltag($fields['descr'])) {
772
-							print ' - ' . dol_trunc(dol_string_nohtmltag($fields['descr']), 24);
772
+							print ' - '.dol_trunc(dol_string_nohtmltag($fields['descr']), 24);
773 773
 						}
774 774
 					} else {
775 775
 						if ($type) {
@@ -786,7 +786,7 @@  discard block
 block discarded – undo
786 786
 								$fields['descr'] = $langs->transnoentitiesnoconv($reg[1]);
787 787
 							}
788 788
 						}
789
-						print $text . ' ' . dol_trunc(dol_string_nohtmltag($fields['descr']), 24);
789
+						print $text.' '.dol_trunc(dol_string_nohtmltag($fields['descr']), 24);
790 790
 
791 791
 						// Show range
792 792
 						print_date_range($fields['ddate_start'], $fields['ddate_end']);
@@ -812,7 +812,7 @@  discard block
 block discarded – undo
812 812
 						if ($fields['payment_amount'] && $fields['ftotal_ttc']) {
813 813
 							$paymentfourn_static->id = $fields['payment_id'];
814 814
 							$paymentfourn_static->ref = $fields['payment_ref'];
815
-							print $paymentfourn_static->getNomUrl(2, '', '', 0) . ' ';
815
+							print $paymentfourn_static->getNomUrl(2, '', '', 0).' ';
816 816
 						}
817 817
 
818 818
 						if (($type == 0 && getDolGlobalString('TAX_MODE_BUY_PRODUCT') == 'invoice')
@@ -824,7 +824,7 @@  discard block
 block discarded – undo
824 824
 							}
825 825
 							print price(price2num($fields['payment_amount'], 'MT'));
826 826
 							if (isset($fields['payment_amount'])) {
827
-								print ' (' . round($ratiopaymentinvoice * 100, 2) . '%)';
827
+								print ' ('.round($ratiopaymentinvoice * 100, 2).'%)';
828 828
 							}
829 829
 						}
830 830
 						print '</td>';
@@ -854,26 +854,26 @@  discard block
 block discarded – undo
854 854
 		// Total suppliers for this vat rate
855 855
 		print '<tr class="liste_total">';
856 856
 		print '<td colspan="4"></td>';
857
-		print '<td class="right">' . $langs->trans("Total") . ':</td>';
857
+		print '<td class="right">'.$langs->trans("Total").':</td>';
858 858
 		if ($modetax != 1) {
859 859
 			print '<td class="nowrap right">&nbsp;</td>';
860 860
 			print '<td class="right">&nbsp;</td>';
861 861
 		}
862
-		print '<td class="right"><span class="amount">' . price(price2num($subtot_paye_total_ht, 'MT')) . '</span></td>';
863
-		print '<td class="nowrap right"><span class="amount">' . price(price2num($subtot_paye_vat, 'MT')) . '</span></td>';
862
+		print '<td class="right"><span class="amount">'.price(price2num($subtot_paye_total_ht, 'MT')).'</span></td>';
863
+		print '<td class="nowrap right"><span class="amount">'.price(price2num($subtot_paye_vat, 'MT')).'</span></td>';
864 864
 		print '</tr>';
865 865
 	}
866 866
 
867 867
 	if (count($x_paye) == 0) {  // Show a total line if nothing shown
868 868
 		print '<tr class="liste_total">';
869 869
 		print '<td colspan="4"></td>';
870
-		print '<td class="right">' . $langs->trans("Total") . ':</td>';
870
+		print '<td class="right">'.$langs->trans("Total").':</td>';
871 871
 		if ($modetax != 1) {
872 872
 			print '<td class="nowrap right">&nbsp;</td>';
873 873
 			print '<td class="right">&nbsp;</td>';
874 874
 		}
875
-		print '<td class="right"><span class="amount">' . price(price2num(0, 'MT')) . '</span></td>';
876
-		print '<td class="nowrap right"><span class="amount">' . price(price2num(0, 'MT')) . '</span></td>';
875
+		print '<td class="right"><span class="amount">'.price(price2num(0, 'MT')).'</span></td>';
876
+		print '<td class="nowrap right"><span class="amount">'.price(price2num(0, 'MT')).'</span></td>';
877 877
 		print '</tr>';
878 878
 	}
879 879
 
@@ -885,8 +885,8 @@  discard block
 block discarded – undo
885 885
 	print '<table class="noborder centpercent">';
886 886
 	$diff = $x_coll_sum - $x_paye_sum;
887 887
 	print '<tr class="liste_total">';
888
-	print '<td class="liste_total" colspan="' . $span . '">' . $langs->trans("TotalToPay") . ($q ? ', ' . $langs->trans("Quadri") . ' ' . $q : '') . '</td>';
889
-	print '<td class="liste_total nowrap right"><b>' . price(price2num($diff, 'MT')) . "</b></td>\n";
888
+	print '<td class="liste_total" colspan="'.$span.'">'.$langs->trans("TotalToPay").($q ? ', '.$langs->trans("Quadri").' '.$q : '').'</td>';
889
+	print '<td class="liste_total nowrap right"><b>'.price(price2num($diff, 'MT'))."</b></td>\n";
890 890
 	print "</tr>\n";
891 891
 
892 892
 	$i++;
Please login to merge, or discard this patch.
htdocs/recruitment/class/recruitmentcandidature.class.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -981,7 +981,7 @@  discard block
 block discarded – undo
981 981
 		} else {
982 982
 			$this->lines = $result;
983 983
 			// @phpstan-ignore-next-line
984
-			return $result;  // @phan-suppress-current-line PhanTypeMismatchReturn
984
+			return $result; // @phan-suppress-current-line PhanTypeMismatchReturn
985 985
 		}
986 986
 	}
987 987
 
@@ -1002,7 +1002,7 @@  discard block
 block discarded – undo
1002 1002
 		if (getDolGlobalString('RECRUITMENT_RECRUITMENTCANDIDATURE_ADDON')) {
1003 1003
 			$mybool = false;
1004 1004
 
1005
-			$file = getDolGlobalString('RECRUITMENT_RECRUITMENTCANDIDATURE_ADDON') . ".php";
1005
+			$file = getDolGlobalString('RECRUITMENT_RECRUITMENTCANDIDATURE_ADDON').".php";
1006 1006
 			$classname = getDolGlobalString('RECRUITMENT_RECRUITMENTCANDIDATURE_ADDON');
1007 1007
 
1008 1008
 			// Include file with class
Please login to merge, or discard this patch.
htdocs/main.inc.php 1 patch
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -62,15 +62,15 @@  discard block
 block discarded – undo
62 62
 function getArrayOfEmoji()
63 63
 {
64 64
 	$arrayofcommonemoji = array(
65
-		'misc' => array('2600', '26FF'),		// Miscellaneous Symbols
66
-		'ding' => array('2700', '27BF'),		// Dingbats
67
-		'????' => array('9989', '9989'),		// Variation Selectors
68
-		'vars' => array('FE00', 'FE0F'),		// Variation Selectors
69
-		'pict' => array('1F300', '1F5FF'),		// Miscellaneous Symbols and Pictographs
70
-		'emot' => array('1F600', '1F64F'),		// Emoticons
71
-		'tran' => array('1F680', '1F6FF'),		// Transport and Map Symbols
72
-		'flag' => array('1F1E0', '1F1FF'),		// Flags (note: may be 1F1E6 instead of 1F1E0)
73
-		'supp' => array('1F900', '1F9FF'),		// Supplemental Symbols and Pictographs
65
+		'misc' => array('2600', '26FF'), // Miscellaneous Symbols
66
+		'ding' => array('2700', '27BF'), // Dingbats
67
+		'????' => array('9989', '9989'), // Variation Selectors
68
+		'vars' => array('FE00', 'FE0F'), // Variation Selectors
69
+		'pict' => array('1F300', '1F5FF'), // Miscellaneous Symbols and Pictographs
70
+		'emot' => array('1F600', '1F64F'), // Emoticons
71
+		'tran' => array('1F680', '1F6FF'), // Transport and Map Symbols
72
+		'flag' => array('1F1E0', '1F1FF'), // Flags (note: may be 1F1E6 instead of 1F1E0)
73
+		'supp' => array('1F900', '1F9FF'), // Supplemental Symbols and Pictographs
74 74
 	);
75 75
 
76 76
 	return $arrayofcommonemoji;
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 	//print "before decoding $val\n";
133 133
 	do {
134 134
 		$oldval = $val;
135
-		$val = html_entity_decode($val, ENT_QUOTES | ENT_HTML5);	// Decode '&colon;', '&apos;', '&Tab;', '&NewLine', ...
135
+		$val = html_entity_decode($val, ENT_QUOTES | ENT_HTML5); // Decode '&colon;', '&apos;', '&Tab;', '&NewLine', ...
136 136
 		// Sometimes we have entities without the ; at end so html_entity_decode does not work but entities is still interpreted by browser.
137 137
 		$val = preg_replace_callback(
138 138
 			'/&#(x?[0-9][0-9a-f]+;?)/i',
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 			 * @param string[] $m
141 141
 			 * @return string
142 142
 			 */
143
-			static function ($m) {
143
+			static function($m) {
144 144
 				// Decode '&#110;', ...
145 145
 				return realCharForNumericEntities($m);
146 146
 			},
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
 		$inj += preg_match('/user\s*\(/i', $val); // avoid to use function user() or mysql_user() that return current database login
182 182
 		$inj += preg_match('/information_schema/i', $val); // avoid to use request that read information_schema database
183 183
 		$inj += preg_match('/<svg/i', $val); // <svg can be allowed in POST
184
-		$inj += preg_match('/update[^&=\w].*set.+=/i', $val);	// the [^&=\w] test is to avoid error when request is like action=update&...set... or &updatemodule=...set...
184
+		$inj += preg_match('/update[^&=\w].*set.+=/i', $val); // the [^&=\w] test is to avoid error when request is like action=update&...set... or &updatemodule=...set...
185 185
 		$inj += preg_match('/union.+select/i', $val);
186 186
 	}
187 187
 	if ($type == 3) {
@@ -430,7 +430,7 @@  discard block
 block discarded – undo
430 430
 		session_set_cookie_params($sessioncookieparams);
431 431
 	}
432 432
 	session_name($sessionname);
433
-	dol_session_start();	// This call the open and read of session handler
433
+	dol_session_start(); // This call the open and read of session handler
434 434
 	//exit;	// this exist generates a call to write and close
435 435
 }
436 436
 
@@ -458,11 +458,11 @@  discard block
 block discarded – undo
458 458
 	if (!$ok) {
459 459
 		if (session_id() && isset($_SESSION["dol_login"]) && !in_array($_SESSION["dol_login"], explode(';', getDolGlobalString('MAIN_ONLY_LOGIN_ALLOWED')))) {
460 460
 			print 'Sorry, your application is offline.'."\n";
461
-			print 'You are logged with user "'.$_SESSION["dol_login"].'" and only administrator users (' . str_replace(';', ', ', getDolGlobalString('MAIN_ONLY_LOGIN_ALLOWED')).') is allowed to connect for the moment.'."\n";
461
+			print 'You are logged with user "'.$_SESSION["dol_login"].'" and only administrator users ('.str_replace(';', ', ', getDolGlobalString('MAIN_ONLY_LOGIN_ALLOWED')).') is allowed to connect for the moment.'."\n";
462 462
 			$nexturl = DOL_URL_ROOT.'/user/logout.php?token='.newToken();
463 463
 			print 'Please try later or <a href="'.$nexturl.'">click here to disconnect and change login user</a>...'."\n";
464 464
 		} else {
465
-			print 'Sorry, your application is offline. Only administrator users (' . str_replace(';', ', ', getDolGlobalString('MAIN_ONLY_LOGIN_ALLOWED')).') is allowed to connect for the moment.'."\n";
465
+			print 'Sorry, your application is offline. Only administrator users ('.str_replace(';', ', ', getDolGlobalString('MAIN_ONLY_LOGIN_ALLOWED')).') is allowed to connect for the moment.'."\n";
466 466
 			$nexturl = DOL_URL_ROOT.'/';
467 467
 			print 'Please try later or <a href="'.$nexturl.'">click here to change login user</a>...'."\n";
468 468
 		}
@@ -676,7 +676,7 @@  discard block
 block discarded – undo
676 676
 					print "Access to this page this way (POST method or GET with a sensible value for 'action' parameter) is refused by CSRF protection in main.inc.php. Token not provided.\n";
677 677
 					print "If you access your server behind a proxy using url rewriting and the parameter is provided by caller, you might check that all HTTP header are propagated (or add the line \$dolibarr_nocsrfcheck=1 into your conf.php file or MAIN_SECURITY_CSRF_WITH_TOKEN to 0";
678 678
 					if (getDolGlobalString('MAIN_SECURITY_CSRF_WITH_TOKEN')) {
679
-						print " instead of " . getDolGlobalString('MAIN_SECURITY_CSRF_WITH_TOKEN');
679
+						print " instead of ".getDolGlobalString('MAIN_SECURITY_CSRF_WITH_TOKEN');
680 680
 					}
681 681
 					print " into setup).\n";
682 682
 				}
@@ -704,7 +704,7 @@  discard block
 block discarded – undo
704 704
 		unset($_GET['action']);
705 705
 		unset($_GET['confirmmassaction']);
706 706
 		unset($_GET['massaction']);
707
-		unset($_GET['token']);			// TODO Make a redirect if we have a token in url to remove it ?
707
+		unset($_GET['token']); // TODO Make a redirect if we have a token in url to remove it ?
708 708
 		if (isset($savid)) {
709 709
 			$_POST['id'] = ((int) $savid);
710 710
 		}
@@ -874,7 +874,7 @@  discard block
 block discarded – undo
874 874
 
875 875
 		$allowedmethodtopostusername = 3;
876 876
 		if (defined('MAIN_AUTHENTICATION_POST_METHOD')) {
877
-			$allowedmethodtopostusername = constant('MAIN_AUTHENTICATION_POST_METHOD');	// Note a value of 2 is not compatible with some authentication methods that put username as GET parameter
877
+			$allowedmethodtopostusername = constant('MAIN_AUTHENTICATION_POST_METHOD'); // Note a value of 2 is not compatible with some authentication methods that put username as GET parameter
878 878
 		}
879 879
 		// TODO Remove use of $_COOKIE['login_dolibarr'] ? Replace $usertotest = with $usertotest = GETPOST("username", "alpha", $allowedmethodtopostusername);
880 880
 		$usertotest = (!empty($_COOKIE['login_dolibarr']) ? preg_replace('/[^a-zA-Z0-9_@\-\.]/', '', $_COOKIE['login_dolibarr']) : GETPOST("username", "alpha", $allowedmethodtopostusername));
@@ -1015,7 +1015,7 @@  discard block
 block discarded – undo
1015 1015
 				if (!empty($_SERVER["HTTP_USER_AGENT"]) && $_SERVER["HTTP_USER_AGENT"] == 'securitytest') {
1016 1016
 					http_response_code(401); // It makes easier to understand if session was broken during security tests
1017 1017
 				}
1018
-				dol_loginfunction($langs, $conf, (!empty($mysoc) ? $mysoc : ''));	// This include http headers
1018
+				dol_loginfunction($langs, $conf, (!empty($mysoc) ? $mysoc : '')); // This include http headers
1019 1019
 			}
1020 1020
 			exit;
1021 1021
 		}
@@ -1371,7 +1371,7 @@  discard block
 block discarded – undo
1371 1371
 } else {
1372 1372
 	// We may have NOLOGIN set, but NOREQUIREUSER not
1373 1373
 	if (!empty($user) && method_exists($user, 'loadDefaultValues') && !defined('NODEFAULTVALUES')) {
1374
-		$user->loadDefaultValues();		// Load default values for everybody (works even if $user->id = 0
1374
+		$user->loadDefaultValues(); // Load default values for everybody (works even if $user->id = 0
1375 1375
 	}
1376 1376
 }
1377 1377
 
@@ -1563,7 +1563,7 @@  discard block
 block discarded – undo
1563 1563
 
1564 1564
 if (!empty(GETPOST('seteventmessages', 'alpha'))) {
1565 1565
 	$message = GETPOST('seteventmessages', 'alpha');
1566
-	$messages  = explode(',', $message);
1566
+	$messages = explode(',', $message);
1567 1567
 	foreach ($messages as $key => $msg) {
1568 1568
 		$tmp = explode(':', $msg);
1569 1569
 		setEventMessages($tmp[0], null, !empty($tmp[1]) ? $tmp[1] : 'mesgs');
@@ -1873,7 +1873,7 @@  discard block
 block discarded – undo
1873 1873
 
1874 1874
 		if (getDolGlobalString('THEME_ELDY_TOPMENU_BACK1')) {
1875 1875
 			// TODO: use auto theme color switch
1876
-			print '<meta name="theme-color" content="rgb(' . getDolGlobalString('THEME_ELDY_TOPMENU_BACK1').')">'."\n";
1876
+			print '<meta name="theme-color" content="rgb('.getDolGlobalString('THEME_ELDY_TOPMENU_BACK1').')">'."\n";
1877 1877
 		}
1878 1878
 
1879 1879
 		// Auto refresh page
@@ -2204,7 +2204,7 @@  discard block
 block discarded – undo
2204 2204
 			print $head."\n";
2205 2205
 		}
2206 2206
 		if (getDolGlobalString('MAIN_HTML_HEADER')) {
2207
-			print getDolGlobalString('MAIN_HTML_HEADER') . "\n";
2207
+			print getDolGlobalString('MAIN_HTML_HEADER')."\n";
2208 2208
 		}
2209 2209
 
2210 2210
 		$parameters = array();
@@ -2347,7 +2347,7 @@  discard block
 block discarded – undo
2347 2347
 
2348 2348
 		$toprightmenu .= '</div>';
2349 2349
 
2350
-		$toprightmenu .= '</div>'."\n";		 // end div class="login_block_tools"
2350
+		$toprightmenu .= '</div>'."\n"; // end div class="login_block_tools"
2351 2351
 
2352 2352
 
2353 2353
 		// Add block for other tools
@@ -3089,7 +3089,7 @@  discard block
 block discarded – undo
3089 3089
 		$langs->load(explode('@', $item['name'])[1]);
3090 3090
 		$dropDownQuickAddHtml .= '
3091 3091
 			<a class="dropdown-item quickadd-item" href="'.DOL_URL_ROOT.$item['url'].'" title="'.$langs->trans(explode('@', $item['title'])[0]).'">
3092
-			'. img_picto('', $item['picto'], 'style="width:18px;"') . ' ' . $langs->trans(explode('@', $item['name'])[0]) . '</a>
3092
+			'. img_picto('', $item['picto'], 'style="width:18px;"').' '.$langs->trans(explode('@', $item['name'])[0]).'</a>
3093 3093
 		';
3094 3094
 	}
3095 3095
 
@@ -3206,7 +3206,7 @@  discard block
 block discarded – undo
3206 3206
  */
3207 3207
 function top_menu_search()
3208 3208
 {
3209
-	global $langs, $conf, $db, $user, $hookmanager;	// used by htdocs/core/ajax/selectsearchbox.php
3209
+	global $langs, $conf, $db, $user, $hookmanager; // used by htdocs/core/ajax/selectsearchbox.php
3210 3210
 
3211 3211
 	$html = '';
3212 3212
 
@@ -3970,7 +3970,7 @@  discard block
 block discarded – undo
3970 3970
 		$forceping = GETPOST('forceping', 'alpha');
3971 3971
 		if (($_SERVER["PHP_SELF"] == DOL_URL_ROOT.'/index.php') || $forceping) {
3972 3972
 			//print '<!-- instance_unique_id='.$conf->file->instance_unique_id.' MAIN_FIRST_PING_OK_ID='.$conf->global->MAIN_FIRST_PING_OK_ID.' -->';
3973
-			$hash_unique_id = dol_hash('dolibarr'.$conf->file->instance_unique_id, 'sha256');	// Note: if the global salt changes, this hash changes too so ping may be counted twice. We don't mind. It is for statistics purpose only.
3973
+			$hash_unique_id = dol_hash('dolibarr'.$conf->file->instance_unique_id, 'sha256'); // Note: if the global salt changes, this hash changes too so ping may be counted twice. We don't mind. It is for statistics purpose only.
3974 3974
 
3975 3975
 			if (!getDolGlobalString('MAIN_FIRST_PING_OK_DATE')
3976 3976
 				|| (!empty($conf->file->instance_unique_id) && ($hash_unique_id != $conf->global->MAIN_FIRST_PING_OK_ID) && (getDolGlobalString('MAIN_FIRST_PING_OK_ID') != 'disabled'))
Please login to merge, or discard this patch.
htdocs/commande/list.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
 	'typent.code' => array('label' => "ThirdPartyType", 'checked' => $checkedtypetiers, 'position' => 55),
205 205
 	'c.date_commande' => array('label' => "OrderDateShort", 'checked' => 1, 'position' => 60, 'csslist' => 'nowraponall'),
206 206
 	'c.date_delivery' => array('label' => "DateDeliveryPlanned", 'checked' => 1, 'enabled' => !getDolGlobalString('ORDER_DISABLE_DELIVERY_DATE'), 'position' => 65, 'csslist' => 'nowraponall'),
207
-	'c.fk_shipping_method' => array('label' => "SendingMethod", 'checked' => -1, 'position' => 66 , 'enabled' => isModEnabled("shipping")),
207
+	'c.fk_shipping_method' => array('label' => "SendingMethod", 'checked' => -1, 'position' => 66, 'enabled' => isModEnabled("shipping")),
208 208
 	'c.fk_cond_reglement' => array('label' => "PaymentConditionsShort", 'checked' => -1, 'position' => 67),
209 209
 	'c.fk_mode_reglement' => array('label' => "PaymentMode", 'checked' => -1, 'position' => 68),
210 210
 	'c.fk_input_reason' => array('label' => "Origin", 'checked' => -1, 'position' => 69),
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
 	'c.date_cloture' => array('label' => "DateClosing", 'checked' => 0, 'position' => 130),
228 228
 	'c.note_public' => array('label' => 'NotePublic', 'checked' => 0, 'enabled' => (!getDolGlobalInt('MAIN_LIST_HIDE_PUBLIC_NOTES')), 'position' => 135, 'searchall' => 1),
229 229
 	'c.note_private' => array('label' => 'NotePrivate', 'checked' => 0, 'enabled' => (!getDolGlobalInt('MAIN_LIST_HIDE_PRIVATE_NOTES')), 'position' => 140),
230
-	'shippable' => array('label' => "Shippable", 'checked' => 1,'enabled' => (isModEnabled("shipping")), 'position' => 990),
230
+	'shippable' => array('label' => "Shippable", 'checked' => 1, 'enabled' => (isModEnabled("shipping")), 'position' => 990),
231 231
 	'c.facture' => array('label' => "Billed", 'checked' => 1, 'enabled' => (!getDolGlobalString('WORKFLOW_BILL_ON_SHIPMENT')), 'position' => 995),
232 232
 	'c.import_key' => array('type' => 'varchar(14)', 'label' => 'ImportId', 'enabled' => 1, 'visible' => -2, 'position' => 999),
233 233
 	'c.fk_statut' => array('label' => "Status", 'checked' => 1, 'position' => 1000)
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
 $object->fields = dol_sort_array($object->fields, 'position');
248 248
 //$arrayfields['anotherfield'] = array('type'=>'integer', 'label'=>'AnotherField', 'checked'=>1, 'enabled'=>1, 'position'=>90, 'csslist'=>'right');
249 249
 $arrayfields = dol_sort_array($arrayfields, 'position');
250
-'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields';  // dol_sort_array looses type for Phan
250
+'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan
251 251
 
252 252
 
253 253
 // Security check
@@ -414,7 +414,7 @@  discard block
 block discarded – undo
414 414
 				}
415 415
 
416 416
 				if (empty($objecttmp->note_public)) {
417
-					$objecttmp->note_public =  $langs->transnoentities("Orders");
417
+					$objecttmp->note_public = $langs->transnoentities("Orders");
418 418
 				}
419 419
 
420 420
 				$datefacture = dol_mktime(12, 0, 0, GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear'));
@@ -736,7 +736,7 @@  discard block
 block discarded – undo
736 736
 			$db->rollback();
737 737
 
738 738
 			$action = 'create';
739
-			$_GET["origin"] = $_POST["origin"];		// Keep GET and POST here ?
739
+			$_GET["origin"] = $_POST["origin"]; // Keep GET and POST here ?
740 740
 			$_GET["originid"] = $_POST["originid"]; // Keep GET and POST here ?
741 741
 			if (!empty($errors)) {
742 742
 				setEventMessages(null, $errors, 'errors');
@@ -1102,7 +1102,7 @@  discard block
 block discarded – undo
1102 1102
 			if ($searchCategoryCustomerOperator == 0) {
1103 1103
 				$searchCategoryCustomerSqlList[] = " EXISTS (SELECT cs.fk_soc FROM ".MAIN_DB_PREFIX."categorie_societe as cs WHERE s.rowid = cs.fk_soc AND cs.fk_categorie = ".((int) $searchCategoryCustomer).")";
1104 1104
 			} else {
1105
-				$listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategoryCustomer);
1105
+				$listofcategoryid .= ($listofcategoryid ? ', ' : '').((int) $searchCategoryCustomer);
1106 1106
 			}
1107 1107
 		}
1108 1108
 	}
@@ -1132,7 +1132,7 @@  discard block
 block discarded – undo
1132 1132
 			if ($searchCategoryProductOperator == 0) {
1133 1133
 				$searchCategoryProductSqlList[] = " EXISTS (SELECT ck.fk_product FROM ".MAIN_DB_PREFIX."categorie_product as ck, ".MAIN_DB_PREFIX."commandedet as cd WHERE cd.fk_commande = c.rowid AND cd.fk_product = ck.fk_product AND ck.fk_categorie = ".((int) $searchCategoryProduct).")";
1134 1134
 			} else {
1135
-				$listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategoryProduct);
1135
+				$listofcategoryid .= ($listofcategoryid ? ', ' : '').((int) $searchCategoryProduct);
1136 1136
 			}
1137 1137
 		}
1138 1138
 	}
@@ -1587,7 +1587,7 @@  discard block
 block discarded – undo
1587 1587
 }
1588 1588
 
1589 1589
 $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
1590
-$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN'));  // This also change content of $arrayfields with user setup
1590
+$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup
1591 1591
 $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : '');
1592 1592
 $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
1593 1593
 
@@ -2727,13 +2727,13 @@  discard block
 block discarded – undo
2727 2727
 			if (!empty($show_shippable_command) && isModEnabled('stock')) {
2728 2728
 				$text_icon = '';
2729 2729
 				if (($obj->fk_statut > $generic_commande::STATUS_DRAFT) && ($obj->fk_statut < $generic_commande::STATUS_CLOSED)) {
2730
-					$generic_commande->getLinesArray(); 	// Load array ->lines
2731
-					$generic_commande->loadExpeditions();	// Load array ->expeditions
2730
+					$generic_commande->getLinesArray(); // Load array ->lines
2731
+					$generic_commande->loadExpeditions(); // Load array ->expeditions
2732 2732
 
2733 2733
 					$numlines = count($generic_commande->lines); // Loop on each line of order
2734 2734
 					for ($lig = 0; $lig < $numlines; $lig++) {
2735 2735
 						if (isset($generic_commande->expeditions[$generic_commande->lines[$lig]->id])) {
2736
-							$reliquat =  $generic_commande->lines[$lig]->qty - $generic_commande->expeditions[$generic_commande->lines[$lig]->id];
2736
+							$reliquat = $generic_commande->lines[$lig]->qty - $generic_commande->expeditions[$generic_commande->lines[$lig]->id];
2737 2737
 						} else {
2738 2738
 							$reliquat = $generic_commande->lines[$lig]->qty;
2739 2739
 						}
Please login to merge, or discard this patch.
htdocs/partnership/class/partnership.class.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -65,9 +65,9 @@  discard block
 block discarded – undo
65 65
 
66 66
 
67 67
 	const STATUS_DRAFT = 0;
68
-	const STATUS_VALIDATED = 1;		// Validate (no more draft)
69
-	const STATUS_APPROVED = 2;		// Approved
70
-	const STATUS_REFUSED = 3;		// Refused
68
+	const STATUS_VALIDATED = 1; // Validate (no more draft)
69
+	const STATUS_APPROVED = 2; // Approved
70
+	const STATUS_REFUSED = 3; // Refused
71 71
 	const STATUS_CANCELED = 9;
72 72
 
73 73
 
@@ -425,32 +425,32 @@  discard block
 block discarded – undo
425 425
 		if ($result) {
426 426
 			$obj = $this->db->fetch_object($result);
427 427
 			if ($obj) {
428
-				$this->id 							= $obj->rowid;
428
+				$this->id = $obj->rowid;
429 429
 				$this->entity 						= $obj->entity;
430
-				$this->ref 							= $obj->ref;
430
+				$this->ref = $obj->ref;
431 431
 
432 432
 				$this->fk_type						= $obj->fk_type;
433
-				$this->type_code					= $obj->type_code;
433
+				$this->type_code = $obj->type_code;
434 434
 				$this->type_label					= $obj->type_label;
435 435
 
436 436
 				$this->fk_soc 						= $obj->fk_soc;
437 437
 				$this->fk_member 					= $obj->fk_member;
438 438
 				$this->status 						= $obj->status;
439
-				$this->date_partnership_start		= $this->db->jdate($obj->date_partnership_start);
440
-				$this->date_partnership_end			= $this->db->jdate($obj->date_partnership_end);
439
+				$this->date_partnership_start = $this->db->jdate($obj->date_partnership_start);
440
+				$this->date_partnership_end = $this->db->jdate($obj->date_partnership_end);
441 441
 				$this->date_creation 				= $this->db->jdate($obj->date_creation);
442 442
 				$this->fk_user_creat 				= $obj->fk_user_creat;
443
-				$this->tms 							= $obj->tms;
443
+				$this->tms = $obj->tms;
444 444
 				$this->fk_user_modif 				= $obj->fk_user_modif;
445 445
 				$this->note_private 				= $obj->note_private;
446 446
 				$this->note_public 					= $obj->note_public;
447 447
 				$this->last_main_doc 				= $obj->last_main_doc;
448
-				$this->count_last_url_check_error	= $obj->count_last_url_check_error;
449
-				$this->last_check_backlink			= $this->db->jdate($obj->last_check_backlink);
450
-				$this->reason_decline_or_cancel 	= $obj->reason_decline_or_cancel;
451
-				$this->import_key 					= $obj->import_key;
452
-				$this->model_pdf 					= $obj->model_pdf;
453
-				$this->url_to_check 				= $obj->url_to_check;
448
+				$this->count_last_url_check_error = $obj->count_last_url_check_error;
449
+				$this->last_check_backlink = $this->db->jdate($obj->last_check_backlink);
450
+				$this->reason_decline_or_cancel = $obj->reason_decline_or_cancel;
451
+				$this->import_key = $obj->import_key;
452
+				$this->model_pdf = $obj->model_pdf;
453
+				$this->url_to_check = $obj->url_to_check;
454 454
 
455 455
 				// Retrieve all extrafield
456 456
 				// fetch optionals attributes and labels
@@ -930,7 +930,7 @@  discard block
 block discarded – undo
930 930
 			return 0;
931 931
 		}
932 932
 
933
-		$this->status 					= self::STATUS_REFUSED;
933
+		$this->status = self::STATUS_REFUSED;
934 934
 		$this->reason_decline_or_cancel = $reasondeclinenote;
935 935
 
936 936
 		$result = $this->update($user);
@@ -1262,7 +1262,7 @@  discard block
 block discarded – undo
1262 1262
 		} else {
1263 1263
 			$this->lines = $result;
1264 1264
 			// @phpstan-ignore-next-line
1265
-			return $result;  // @phan-suppress-current-line PhanTypeMismatchReturn
1265
+			return $result; // @phan-suppress-current-line PhanTypeMismatchReturn
1266 1266
 		}
1267 1267
 	}
1268 1268
 
@@ -1283,7 +1283,7 @@  discard block
 block discarded – undo
1283 1283
 		if (getDolGlobalString('PARTNERSHIP_ADDON')) {
1284 1284
 			$mybool = false;
1285 1285
 
1286
-			$file = getDolGlobalString('PARTNERSHIP_ADDON') . ".php";
1286
+			$file = getDolGlobalString('PARTNERSHIP_ADDON').".php";
1287 1287
 			$classname = getDolGlobalString('PARTNERSHIP_ADDON');
1288 1288
 
1289 1289
 			// Include file with class
Please login to merge, or discard this patch.