Completed
Branch develop (342ab8)
by
unknown
18:32
created
htdocs/stripe/class/stripe.class.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -472,7 +472,7 @@  discard block
 block discarded – undo
472 472
 				"confirmation_method" => $mode,
473 473
 				"amount" => $stripeamount,
474 474
 				"currency" => $currency_code,
475
-				"payment_method_types" => $paymentmethodtypes,	// When payment_method_types is set, return_url is not required but payment mode can't be managed from dashboard
475
+				"payment_method_types" => $paymentmethodtypes, // When payment_method_types is set, return_url is not required but payment mode can't be managed from dashboard
476 476
 				/*
477 477
 				'return_url' => $dolibarr_main_url_root.'/public/payment/paymentok.php',
478 478
 				'automatic_payment_methods' => array(
@@ -487,7 +487,7 @@  discard block
 block discarded – undo
487 487
 			);
488 488
 			if ($descriptor) {
489 489
 				$dataforintent["statement_descriptor_suffix"] = $descriptor; // For card payment, 22 chars that appears on bank receipt (prefix into stripe setup + this suffix)
490
-				$dataforintent["statement_descriptor"] = $descriptor; 	// For SEPA, it will take only statement_descriptor, not statement_descriptor_suffix
490
+				$dataforintent["statement_descriptor"] = $descriptor; // For SEPA, it will take only statement_descriptor, not statement_descriptor_suffix
491 491
 			}
492 492
 			if (!is_null($customer)) {
493 493
 				$dataforintent["customer"] = $customer;
@@ -696,7 +696,7 @@  discard block
 block discarded – undo
696 696
 
697 697
 			$dataforintent = array(
698 698
 				"confirm" => $confirmnow, // Do not confirm immediately during creation of intent
699
-				"payment_method_types" => $paymentmethodtypes,	// When payment_method_types is set, return_url is not required but payment mode can't be managed from dashboard
699
+				"payment_method_types" => $paymentmethodtypes, // When payment_method_types is set, return_url is not required but payment mode can't be managed from dashboard
700 700
 				/*
701 701
 				 'return_url' => $dolibarr_main_url_root.'/public/payment/paymentok.php',
702 702
 				 'automatic_payment_methods' => array(
@@ -1028,19 +1028,19 @@  discard block
 block discarded – undo
1028 1028
 					);
1029 1029
 					// Complete owner name
1030 1030
 					if (!empty($soc->town)) {
1031
-						$dataforcard['billing_details']['address']['city']=$soc->town;
1031
+						$dataforcard['billing_details']['address']['city'] = $soc->town;
1032 1032
 					}
1033 1033
 					if (!empty($soc->country_code)) {
1034
-						$dataforcard['billing_details']['address']['country']=$soc->country_code;
1034
+						$dataforcard['billing_details']['address']['country'] = $soc->country_code;
1035 1035
 					}
1036 1036
 					if (!empty($soc->address)) {
1037
-						$dataforcard['billing_details']['address']['line1']=$soc->address;
1037
+						$dataforcard['billing_details']['address']['line1'] = $soc->address;
1038 1038
 					}
1039 1039
 					if (!empty($soc->zip)) {
1040
-						$dataforcard['billing_details']['address']['postal_code']=$soc->zip;
1040
+						$dataforcard['billing_details']['address']['postal_code'] = $soc->zip;
1041 1041
 					}
1042 1042
 					if (!empty($soc->state)) {
1043
-						$dataforcard['billing_details']['address']['state']=$soc->state;
1043
+						$dataforcard['billing_details']['address']['state'] = $soc->state;
1044 1044
 					}
1045 1045
 
1046 1046
 					//$a = \Stripe\Stripe::getApiKey();
@@ -1088,7 +1088,7 @@  discard block
 block discarded – undo
1088 1088
 								$sql = "UPDATE ".MAIN_DB_PREFIX."societe_rib";
1089 1089
 								$sql .= " SET stripe_card_ref = '".$this->db->escape($sepa->id)."',";
1090 1090
 								$sql .= " card_type = 'sepa_debit',";
1091
-								$sql .= " stripe_account= '" . $this->db->escape($cu->id . "@" . $stripeacc) . "',";
1091
+								$sql .= " stripe_account= '".$this->db->escape($cu->id."@".$stripeacc)."',";
1092 1092
 								$sql .= " ext_payment_site = '".$this->db->escape($service)."'";
1093 1093
 								if (!empty($cs->mandate)) {
1094 1094
 									$mandateservice = new \Stripe\Mandate($stripeacc);
@@ -1112,7 +1112,7 @@  discard block
 block discarded – undo
1112 1112
 					} catch (Exception $e) {
1113 1113
 						$sepa = null;
1114 1114
 						$this->error = 'Stripe error: '.$e->getMessage().'. Check the BAN information.';
1115
-						dol_syslog($this->error, LOG_WARNING);	// Error from Stripe, so a warning on Dolibarr
1115
+						dol_syslog($this->error, LOG_WARNING); // Error from Stripe, so a warning on Dolibarr
1116 1116
 					}
1117 1117
 				}
1118 1118
 			}
Please login to merge, or discard this patch.
htdocs/supplier_proposal/card.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -595,7 +595,7 @@  discard block
 block discarded – undo
595 595
 			$idprod = GETPOST('idprod', 'int');
596 596
 		}
597 597
 
598
-		$tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0);		// Can be '1.2' or '1.2 (CODE)'
598
+		$tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0); // Can be '1.2' or '1.2 (CODE)'
599 599
 
600 600
 		$price_ht = price2num(GETPOST('price_ht'), 'MU', 2);
601 601
 		$price_ht_devise = price2num(GETPOST('multicurrency_price_ht'), 'CU', 2);
@@ -704,7 +704,7 @@  discard block
 block discarded – undo
704 704
 
705 705
 					//If text set in desc is the same as product descpription (as now it's preloaded) we add it only one time
706 706
 					if (trim($product_desc) == trim($desc) && getDolGlobalString('PRODUIT_AUTOFILL_DESC')) {
707
-						$product_desc='';
707
+						$product_desc = '';
708 708
 					}
709 709
 
710 710
 					if (!empty($product_desc) && getDolGlobalString('MAIN_NO_CONCAT_DESCRIPTION')) {
@@ -1824,40 +1824,40 @@  discard block
 block discarded – undo
1824 1824
 
1825 1825
 		print '<tr>';
1826 1826
 		// Amount HT
1827
-		print '<td class="titlefieldmiddle">' . $langs->trans('AmountHT') . '</td>';
1828
-		print '<td class="nowrap amountcard right">' . price($object->total_ht, '', $langs, 0, -1, -1, $conf->currency) . '</td>';
1827
+		print '<td class="titlefieldmiddle">'.$langs->trans('AmountHT').'</td>';
1828
+		print '<td class="nowrap amountcard right">'.price($object->total_ht, '', $langs, 0, -1, -1, $conf->currency).'</td>';
1829 1829
 		if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
1830 1830
 			// Multicurrency Amount HT
1831
-			print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_ht, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
1831
+			print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_ht, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
1832 1832
 		}
1833 1833
 		print '</tr>';
1834 1834
 
1835 1835
 		print '<tr>';
1836 1836
 		// Amount VAT
1837
-		print '<td class="titlefieldmiddle">' . $langs->trans('AmountVAT') . '</td>';
1838
-		print '<td class="nowrap amountcard right">' . price($object->total_tva, '', $langs, 0, -1, -1, $conf->currency) . '</td>';
1837
+		print '<td class="titlefieldmiddle">'.$langs->trans('AmountVAT').'</td>';
1838
+		print '<td class="nowrap amountcard right">'.price($object->total_tva, '', $langs, 0, -1, -1, $conf->currency).'</td>';
1839 1839
 		if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
1840 1840
 			// Multicurrency Amount VAT
1841
-			print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_tva, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
1841
+			print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_tva, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
1842 1842
 		}
1843 1843
 		print '</tr>';
1844 1844
 
1845 1845
 		// Amount Local Taxes
1846 1846
 		if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0) {
1847 1847
 			print '<tr>';
1848
-			print '<td class="titlefieldmiddle">' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '</td>';
1849
-			print '<td class="nowrap amountcard right">' . price($object->total_localtax1, '', $langs, 0, -1, -1, $conf->currency) . '</td>';
1848
+			print '<td class="titlefieldmiddle">'.$langs->transcountry("AmountLT1", $mysoc->country_code).'</td>';
1849
+			print '<td class="nowrap amountcard right">'.price($object->total_localtax1, '', $langs, 0, -1, -1, $conf->currency).'</td>';
1850 1850
 			if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
1851
-				print '<td class="nowrap amountcard right">' . price($object->total_localtax1, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
1851
+				print '<td class="nowrap amountcard right">'.price($object->total_localtax1, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
1852 1852
 			}
1853 1853
 			print '</tr>';
1854 1854
 
1855 1855
 			if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0) {
1856 1856
 				print '<tr>';
1857
-				print '<td>' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '</td>';
1858
-				print '<td class="nowrap amountcard right">' . price($object->total_localtax2, '', $langs, 0, -1, -1, $conf->currency) . '</td>';
1857
+				print '<td>'.$langs->transcountry("AmountLT2", $mysoc->country_code).'</td>';
1858
+				print '<td class="nowrap amountcard right">'.price($object->total_localtax2, '', $langs, 0, -1, -1, $conf->currency).'</td>';
1859 1859
 				if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
1860
-					print '<td class="nowrap amountcard right">' . price($object->total_localtax2, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
1860
+					print '<td class="nowrap amountcard right">'.price($object->total_localtax2, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
1861 1861
 				}
1862 1862
 				print '</tr>';
1863 1863
 			}
@@ -1865,11 +1865,11 @@  discard block
 block discarded – undo
1865 1865
 
1866 1866
 		print '<tr>';
1867 1867
 		// Amount TTC
1868
-		print '<td>' . $langs->trans('AmountTTC') . '</td>';
1869
-		print '<td class="nowrap amountcard right">' . price($object->total_ttc, '', $langs, 0, -1, -1, $conf->currency) . '</td>';
1868
+		print '<td>'.$langs->trans('AmountTTC').'</td>';
1869
+		print '<td class="nowrap amountcard right">'.price($object->total_ttc, '', $langs, 0, -1, -1, $conf->currency).'</td>';
1870 1870
 		if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
1871 1871
 			// Multicurrency Amount TTC
1872
-			print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_ttc, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
1872
+			print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_ttc, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
1873 1873
 		}
1874 1874
 		print '</tr>';
1875 1875
 
Please login to merge, or discard this patch.
htdocs/supplier_proposal/class/supplier_proposal.class.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 	public $total;
164 164
 
165 165
 	public $cond_reglement_code;
166
-	public $cond_reglement_doc;		// label doc
166
+	public $cond_reglement_doc; // label doc
167 167
 
168 168
 	public $mode_reglement_code;
169 169
 	/**
@@ -1137,7 +1137,7 @@  discard block
 block discarded – undo
1137 1137
 		$this->id = 0;
1138 1138
 		$this->statut = 0;
1139 1139
 
1140
-		if (!getDolGlobalString('SUPPLIER_PROPOSAL_ADDON') || !is_readable(DOL_DOCUMENT_ROOT."/core/modules/supplier_proposal/" . getDolGlobalString('SUPPLIER_PROPOSAL_ADDON').".php")) {
1140
+		if (!getDolGlobalString('SUPPLIER_PROPOSAL_ADDON') || !is_readable(DOL_DOCUMENT_ROOT."/core/modules/supplier_proposal/".getDolGlobalString('SUPPLIER_PROPOSAL_ADDON').".php")) {
1141 1141
 			$this->error = 'ErrorSetupNotComplete';
1142 1142
 			return -1;
1143 1143
 		}
@@ -1148,7 +1148,7 @@  discard block
 block discarded – undo
1148 1148
 		$this->date = $now;
1149 1149
 
1150 1150
 		// Set ref
1151
-		require_once DOL_DOCUMENT_ROOT."/core/modules/supplier_proposal/" . getDolGlobalString('SUPPLIER_PROPOSAL_ADDON').'.php';
1151
+		require_once DOL_DOCUMENT_ROOT."/core/modules/supplier_proposal/".getDolGlobalString('SUPPLIER_PROPOSAL_ADDON').'.php';
1152 1152
 		$obj = getDolGlobalString('SUPPLIER_PROPOSAL_ADDON');
1153 1153
 		$modSupplierProposal = new $obj();
1154 1154
 		$this->ref = $modSupplierProposal->getNextValue($objsoc, $this);
@@ -1249,7 +1249,7 @@  discard block
 block discarded – undo
1249 1249
 				$this->status               = (int) $obj->fk_statut;
1250 1250
 				$this->datec                = $this->db->jdate($obj->datec); // TODO deprecated
1251 1251
 				$this->datev                = $this->db->jdate($obj->datev); // TODO deprecated
1252
-				$this->date_creation = $this->db->jdate($obj->datec);	// Creation date
1252
+				$this->date_creation = $this->db->jdate($obj->datec); // Creation date
1253 1253
 				$this->date                 = $this->date_creation;
1254 1254
 				$this->date_validation = $this->db->jdate($obj->datev); // Validation date
1255 1255
 				$this->delivery_date        = $this->db->jdate($obj->delivery_date);
@@ -1328,7 +1328,7 @@  discard block
 block discarded – undo
1328 1328
 						$line->total_localtax1	= $objp->total_localtax1;
1329 1329
 						$line->total_localtax2	= $objp->total_localtax2;
1330 1330
 						$line->total_ttc        = $objp->total_ttc;
1331
-						$line->fk_fournprice 	= $objp->fk_fournprice;
1331
+						$line->fk_fournprice = $objp->fk_fournprice;
1332 1332
 						$marginInfos = getMarginInfos($objp->subprice, $objp->remise_percent, $objp->tva_tx, $objp->localtax1_tx, $objp->localtax2_tx, $line->fk_fournprice, $objp->pa_ht);
1333 1333
 						$line->pa_ht = $marginInfos[0];
1334 1334
 						$line->marge_tx			= $marginInfos[1];
@@ -1911,7 +1911,7 @@  discard block
 block discarded – undo
1911 1911
 
1912 1912
 			if (!$error) {
1913 1913
 				$this->status = self::STATUS_DRAFT;
1914
-				$this->statut = self::STATUS_DRAFT;	// deprecated
1914
+				$this->statut = self::STATUS_DRAFT; // deprecated
1915 1915
 				$this->db->commit();
1916 1916
 				return 1;
1917 1917
 			} else {
@@ -2418,7 +2418,7 @@  discard block
 block discarded – undo
2418 2418
 		if (getDolGlobalString('SUPPLIER_PROPOSAL_ADDON')) {
2419 2419
 			$mybool = false;
2420 2420
 
2421
-			$file = getDolGlobalString('SUPPLIER_PROPOSAL_ADDON') . ".php";
2421
+			$file = getDolGlobalString('SUPPLIER_PROPOSAL_ADDON').".php";
2422 2422
 			$classname = getDolGlobalString('SUPPLIER_PROPOSAL_ADDON');
2423 2423
 
2424 2424
 			// Include file with class
@@ -2586,7 +2586,7 @@  discard block
 block discarded – undo
2586 2586
 			}
2587 2587
 		}
2588 2588
 		global $action;
2589
-		$hookmanager->initHooks(array($this->element . 'dao'));
2589
+		$hookmanager->initHooks(array($this->element.'dao'));
2590 2590
 		$parameters = array('id'=>$this->id, 'getnomurl' => &$result);
2591 2591
 		$reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
2592 2592
 		if ($reshook > 0) {
@@ -2780,7 +2780,7 @@  discard block
 block discarded – undo
2780 2780
 			$return .= '<br><span class="opacitymedium">'.$langs->trans("DateEnd").'</span> : <span class="info-box-label">'.dol_print_date($this->delivery_date).'</span>';
2781 2781
 		}
2782 2782
 		if (property_exists($this, 'total_ttc')) {
2783
-			$return .='<br><span class="opacitymedium" >'.$langs->trans("AmountHT").' : </span><span class="info-box-label amount">'.price($this->total_ttc).'</span>';
2783
+			$return .= '<br><span class="opacitymedium" >'.$langs->trans("AmountHT").' : </span><span class="info-box-label amount">'.price($this->total_ttc).'</span>';
2784 2784
 		}
2785 2785
 		if (method_exists($this, 'getLibStatut')) {
2786 2786
 			$return .= '<br><div class="info-box-status">'.$this->getLibStatut(3).'</div>';
@@ -3154,7 +3154,7 @@  discard block
 block discarded – undo
3154 3154
 		$sql .= " ".price2num($this->localtax2_tx).",";
3155 3155
 		$sql .= " '".$this->db->escape($this->localtax1_type)."',";
3156 3156
 		$sql .= " '".$this->db->escape($this->localtax2_type)."',";
3157
-		$sql .= " ".price2num($this->subprice, 'MU') .",";
3157
+		$sql .= " ".price2num($this->subprice, 'MU').",";
3158 3158
 		$sql .= " ".((float) $this->remise_percent).",";
3159 3159
 		$sql .= " ".(isset($this->info_bits) ? ((int) $this->info_bits) : "null").",";
3160 3160
 		$sql .= " ".price2num($this->total_ht, 'MT').",";
Please login to merge, or discard this patch.
htdocs/website/index.php 1 patch
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -346,7 +346,7 @@  discard block
 block discarded – undo
346 346
 }
347 347
 
348 348
 $usercanedit = $user->rights->website->write;
349
-$permissiontoadd = $user->rights->website->write;	// Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles
349
+$permissiontoadd = $user->rights->website->write; // Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles
350 350
 $permissiontodelete = $user->hasRight('website', 'delete');
351 351
 
352 352
 
@@ -413,7 +413,7 @@  discard block
 block discarded – undo
413 413
 if ($sortorder) {
414 414
 	$backtopage .= '&sortorder='.urlencode($sortorder);
415 415
 }
416
-include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php';	// This manage 'sendit', 'confirm_deletefile', 'renamefile' action when submitting new file.
416
+include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; // This manage 'sendit', 'confirm_deletefile', 'renamefile' action when submitting new file.
417 417
 
418 418
 $backtopage = $savbacktopage;
419 419
 //var_dump($backtopage);
@@ -1526,7 +1526,7 @@  discard block
 block discarded – undo
1526 1526
 					$error++;
1527 1527
 					setEventMessages($langs->trans('ErrorFaviconMustBeASquaredImage'), array(), 'errors');
1528 1528
 				}
1529
-				if (! $error && ($filesize[0] != 16 && $filesize[0] != 32 && $filesize[0] != 64)) {
1529
+				if (!$error && ($filesize[0] != 16 && $filesize[0] != 32 && $filesize[0] != 64)) {
1530 1530
 					$error++;
1531 1531
 					setEventMessages($langs->trans('ErrorFaviconSize'), array(), 'errors');
1532 1532
 				}
@@ -1538,7 +1538,7 @@  discard block
 block discarded – undo
1538 1538
 				if (!GETPOSTISSET('updateandstay')) {	// If we click on "Save And Stay", we don not make the redirect
1539 1539
 					$action = 'preview';
1540 1540
 					if ($backtopage) {
1541
-						$backtopage = preg_replace('/searchstring=[^&]*/', '', $backtopage);	// Clean backtopage url
1541
+						$backtopage = preg_replace('/searchstring=[^&]*/', '', $backtopage); // Clean backtopage url
1542 1542
 						header("Location: ".$backtopage);
1543 1543
 						exit;
1544 1544
 					}
@@ -1571,7 +1571,7 @@  discard block
 block discarded – undo
1571 1571
 			$phpfullcodestring = dolKeepOnlyPhpCode($dataposted);
1572 1572
 
1573 1573
 			// Security analysis
1574
-			$errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring);	// Contains the setEventMessages
1574
+			$errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages
1575 1575
 
1576 1576
 			if (!$errorphpcheck) {
1577 1577
 				$htmlheadercontent = '';
@@ -1609,7 +1609,7 @@  discard block
 block discarded – undo
1609 1609
 			$phpfullcodestring = dolKeepOnlyPhpCode($dataposted);
1610 1610
 
1611 1611
 			// Security analysis
1612
-			$errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring);	// Contains the setEventMessages
1612
+			$errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages
1613 1613
 
1614 1614
 			if (!$errorphpcheck) {
1615 1615
 				$csscontent = '';
@@ -1652,7 +1652,7 @@  discard block
 block discarded – undo
1652 1652
 			$phpfullcodestring = dolKeepOnlyPhpCode($dataposted);
1653 1653
 
1654 1654
 			// Security analysis
1655
-			$errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring);	// Contains the setEventMessages
1655
+			$errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages
1656 1656
 
1657 1657
 			if (!$errorphpcheck) {
1658 1658
 				$jscontent = '';
@@ -1690,7 +1690,7 @@  discard block
 block discarded – undo
1690 1690
 			$phpfullcodestring = dolKeepOnlyPhpCode($dataposted);
1691 1691
 
1692 1692
 			// Security analysis
1693
-			$errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring);	// Contains the setEventMessages
1693
+			$errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages
1694 1694
 
1695 1695
 			if (!$errorphpcheck) {
1696 1696
 				$robotcontent = '';
@@ -1728,7 +1728,7 @@  discard block
 block discarded – undo
1728 1728
 			$phpfullcodestring = dolKeepOnlyPhpCode($dataposted);
1729 1729
 
1730 1730
 			// Security analysis
1731
-			$errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring);	// Contains the setEventMessages
1731
+			$errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages
1732 1732
 
1733 1733
 			if (!$errorphpcheck) {
1734 1734
 				$htaccesscontent = '';
@@ -1752,7 +1752,7 @@  discard block
 block discarded – undo
1752 1752
 			$phpfullcodestring = dolKeepOnlyPhpCode($dataposted);
1753 1753
 
1754 1754
 			// Security analysis
1755
-			$errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring);	// Contains the setEventMessages
1755
+			$errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages
1756 1756
 
1757 1757
 			if (!$errorphpcheck) {
1758 1758
 				$manifestjsoncontent = '';
@@ -1790,7 +1790,7 @@  discard block
 block discarded – undo
1790 1790
 			$phpfullcodestring = dolKeepOnlyPhpCode($dataposted);
1791 1791
 
1792 1792
 			// Security analysis
1793
-			$errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring);	// Contains the setEventMessages
1793
+			$errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages
1794 1794
 
1795 1795
 			if (!$errorphpcheck) {
1796 1796
 				$readmecontent = '';
@@ -1828,7 +1828,7 @@  discard block
 block discarded – undo
1828 1828
 			$phpfullcodestring = dolKeepOnlyPhpCode($dataposted);
1829 1829
 
1830 1830
 			// Security analysis
1831
-			$errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring);	// Contains the setEventMessages
1831
+			$errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages
1832 1832
 
1833 1833
 			if (!$errorphpcheck) {
1834 1834
 				$licensecontent = '';
@@ -1870,7 +1870,7 @@  discard block
 block discarded – undo
1870 1870
 			if (!GETPOSTISSET('updateandstay')) {	// If we click on "Save And Stay", we don not make the redirect
1871 1871
 				$action = 'preview';
1872 1872
 				if ($backtopage) {
1873
-					$backtopage = preg_replace('/searchstring=[^&]*/', '', $backtopage);	// Clean backtopage url
1873
+					$backtopage = preg_replace('/searchstring=[^&]*/', '', $backtopage); // Clean backtopage url
1874 1874
 					header("Location: ".$backtopage);
1875 1875
 					exit;
1876 1876
 				}
@@ -1889,7 +1889,7 @@  discard block
 block discarded – undo
1889 1889
 
1890 1890
 	$object->fk_default_home = $pageid;
1891 1891
 	$res = $object->update($user);
1892
-	if (! ($res > 0)) {
1892
+	if (!($res > 0)) {
1893 1893
 		$error++;
1894 1894
 		setEventMessages($object->error, $object->errors, 'errors');
1895 1895
 	}
@@ -2280,7 +2280,7 @@  discard block
 block discarded – undo
2280 2280
 
2281 2281
 			$phpfullcodestringold = dolKeepOnlyPhpCode($objectpage->content);
2282 2282
 
2283
-			$objectpage->content = GETPOST('PAGE_CONTENT', 'none');	// any HTML content allowed
2283
+			$objectpage->content = GETPOST('PAGE_CONTENT', 'none'); // any HTML content allowed
2284 2284
 
2285 2285
 			$phpfullcodestring = dolKeepOnlyPhpCode($objectpage->content);
2286 2286
 
@@ -2474,7 +2474,7 @@  discard block
 block discarded – undo
2474 2474
 				$fileofzip = '';
2475 2475
 				if (GETPOSTISSET('templateuserfile')) {
2476 2476
 					// Case we selected one template
2477
-					$fileofzip = DOL_DATA_ROOT.'/doctemplates/websites/'.GETPOST('templateuserfile', 'alpha');	// $fileofzip will be sanitized later into the importWebSite()
2477
+					$fileofzip = DOL_DATA_ROOT.'/doctemplates/websites/'.GETPOST('templateuserfile', 'alpha'); // $fileofzip will be sanitized later into the importWebSite()
2478 2478
 				} elseif (!empty($_FILES) && is_array($_FILES['userfile'])) {
2479 2479
 					// Case we upload a new template
2480 2480
 					if (is_array($_FILES['userfile']['tmp_name'])) {
@@ -2553,7 +2553,7 @@  discard block
 block discarded – undo
2553 2553
 	if ($website->virtualhost) {
2554 2554
 		$domainname = $website->virtualhost;
2555 2555
 	}
2556
-	if (! preg_match('/^http/i', $domainname)) {
2556
+	if (!preg_match('/^http/i', $domainname)) {
2557 2557
 		$domainname = 'https://'.$domainname;
2558 2558
 	}
2559 2559
 
@@ -2619,7 +2619,7 @@  discard block
 block discarded – undo
2619 2619
 				$url->appendChild($lastmod);
2620 2620
 				// Add suggested frequency for refresh
2621 2621
 				if (getDolGlobalString('WEBSITE_SITEMAPS_ADD_WEEKLY_FREQ')) {
2622
-					$changefreq = $domtree->createElement('changefreq', 'weekly');	// TODO Manage other values
2622
+					$changefreq = $domtree->createElement('changefreq', 'weekly'); // TODO Manage other values
2623 2623
 					$url->appendChild($changefreq);
2624 2624
 				}
2625 2625
 				// Add higher priority for home page
@@ -2724,7 +2724,7 @@  discard block
 block discarded – undo
2724 2724
 				$url->appendChild($lastmod);
2725 2725
 				// Add suggested frequency for refresh
2726 2726
 				if (getDolGlobalString('WEBSITE_SITEMAPS_ADD_WEEKLY_FREQ')) {
2727
-					$changefreq = $domtree->createElement('changefreq', 'weekly');	// TODO Manage other values
2727
+					$changefreq = $domtree->createElement('changefreq', 'weekly'); // TODO Manage other values
2728 2728
 					$url->appendChild($changefreq);
2729 2729
 				}
2730 2730
 
@@ -3314,7 +3314,7 @@  discard block
 block discarded – undo
3314 3314
 						$formquestion[] = array('type' => 'checkbox', 'tdclass'=>'maxwidth200', 'name' => 'is_a_translation', 'label' => $langs->trans("PageIsANewTranslation"), 'value' => 0, 'morecss'=>'margintoponly');
3315 3315
 					}
3316 3316
 
3317
-					$value= $formadmin->select_language($preselectedlanguage, 'newlang', 0, null, $textifempty, 0, 0, 'minwidth200', 1, 0, 0, $onlylang, 1);
3317
+					$value = $formadmin->select_language($preselectedlanguage, 'newlang', 0, null, $textifempty, 0, 0, 'minwidth200', 1, 0, 0, $onlylang, 1);
3318 3318
 					$formquestion[] = array('type' => 'other', 'name' => 'newlang', 'label' => $form->textwithpicto($langs->trans("Language"), $langs->trans("DefineListOfAltLanguagesInWebsiteProperties")), 'value' => $value);
3319 3319
 
3320 3320
 					$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?website='.$object->ref.'&pageid='.$pageid, $langs->trans('ClonePage'), '', 'confirm_createpagefromclone', $formquestion, 0, 1, 300, 550);
@@ -3342,7 +3342,7 @@  discard block
 block discarded – undo
3342 3342
 				print '<!-- button EditInLine and ShowSubcontainers -->'."\n";
3343 3343
 				print '<div class="websiteselectionsection inline-block">';
3344 3344
 
3345
-				print '<div class="inline-block marginrightonly">';	// Button includes dynamic content
3345
+				print '<div class="inline-block marginrightonly">'; // Button includes dynamic content
3346 3346
 				print $langs->trans("ShowSubcontainers");
3347 3347
 				if (!getDolGlobalString('WEBSITE_SUBCONTAINERSINLINE')) {
3348 3348
 					print '<a class="nobordertransp nohoverborder marginleftonlyshort valignmiddle"'.$disabled.' href="'.$_SERVER["PHP_SELF"].'?website='.$object->ref.'&pageid='.$websitepage->id.'&action=setshowsubcontainers&token='.newToken().'">'.img_picto($langs->trans("ShowSubContainersOnOff", $langs->transnoentitiesnoconv("Off")), 'switch_off', '', false, 0, 0, '', 'nomarginleft').'</a>';
@@ -3351,7 +3351,7 @@  discard block
 block discarded – undo
3351 3351
 				}
3352 3352
 				print '</div>';
3353 3353
 
3354
-				print '<div class="inline-block marginrightonly">';	// Button edit inline
3354
+				print '<div class="inline-block marginrightonly">'; // Button edit inline
3355 3355
 
3356 3356
 				print '<span id="switchckeditorinline">'."\n";
3357 3357
 				// Enable CKEditor inline with js on section and div with conteneditable=true
@@ -3469,7 +3469,7 @@  discard block
 block discarded – undo
3469 3469
 				} else {
3470 3470
 					$disabled = '';
3471 3471
 					$title = '';
3472
-					$url = $_SERVER["PHP_SELF"].'?action=delete&token='.newToken().'&pageid='.((int) $websitepage->id).'&website='.urlencode($website->ref);	// action=delete for webpage, deletesite for website
3472
+					$url = $_SERVER["PHP_SELF"].'?action=delete&token='.newToken().'&pageid='.((int) $websitepage->id).'&website='.urlencode($website->ref); // action=delete for webpage, deletesite for website
3473 3473
 				}
3474 3474
 				print '<a href="'.$url.'" class="button buttonDelete bordertransp'.($disabled ? ' disabled' : '').'"'.$disabled.' title="'.dol_escape_htmltag($title).'">'.img_picto('', 'delete', 'class=""').'<span class="hideonsmartphone paddingleft">'.$langs->trans("Delete").'</span></a>';
3475 3475
 				print '</span>';
@@ -3678,7 +3678,7 @@  discard block
 block discarded – undo
3678 3678
 		// Clean the php htaccesscontent file to remove php code and get only html part
3679 3679
 		$htaccesscontent = preg_replace('/<\?php \/\/ BEGIN PHP[^\?]*END PHP \?>\n*/ims', '', $htaccesscontent);
3680 3680
 	} else {
3681
-		$htaccesscontent = GETPOST('WEBSITE_HTACCESS', 'nohtml');	// We must use 'nohtml' and not 'alphanohtml' because we must accept "
3681
+		$htaccesscontent = GETPOST('WEBSITE_HTACCESS', 'nohtml'); // We must use 'nohtml' and not 'alphanohtml' because we must accept "
3682 3682
 	}
3683 3683
 	if (!trim($htaccesscontent)) {
3684 3684
 		$htaccesscontent .= "# Order allow,deny\n";
@@ -3780,7 +3780,7 @@  discard block
 block discarded – undo
3780 3780
 	$maxfilesizearray = getMaxFileSizeArray();
3781 3781
 	$maxmin = $maxfilesizearray['maxmin'];
3782 3782
 	if ($maxmin > 0) {
3783
-		print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">';	// MAX_FILE_SIZE must precede the field type=file
3783
+		print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
3784 3784
 	}
3785 3785
 	print '<input type="file" class="flat minwidth300" name="addedfile" id="addedfile"/>';
3786 3786
 
@@ -4036,7 +4036,7 @@  discard block
 block discarded – undo
4036 4036
 		$maxfilesizearray = getMaxFileSizeArray();
4037 4037
 		$maxmin = $maxfilesizearray['maxmin'];
4038 4038
 		if ($maxmin > 0) {
4039
-			print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">';	// MAX_FILE_SIZE must precede the field type=file
4039
+			print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
4040 4040
 		}
4041 4041
 		print '<input class="flat minwidth400" type="file" name="userfile[]" accept=".zip">';
4042 4042
 		print '<input type="submit" class="button small" name="buttonsubmitimportfile" value="'.dol_escape_htmltag($langs->trans("Upload")).'">';
@@ -4555,7 +4555,7 @@  discard block
 block discarded – undo
4555 4555
 
4556 4556
 
4557 4557
 	$module = 'medias';
4558
-	$formalreadyopen = 2;	// So the form to submit a new file will not be opened another time inside the core/tpl/filemanager.tpl.php
4558
+	$formalreadyopen = 2; // So the form to submit a new file will not be opened another time inside the core/tpl/filemanager.tpl.php
4559 4559
 	if (empty($url)) {
4560 4560
 		$url = DOL_URL_ROOT.'/website/index.php'; // Must be an url without param
4561 4561
 	}
@@ -4608,7 +4608,7 @@  discard block
 block discarded – undo
4608 4608
 
4609 4609
 	require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
4610 4610
 	$poscursor = array('x'=>GETPOST('PAGE_CONTENT_x'), 'y'=>GETPOST('PAGE_CONTENT_y'));
4611
-	$doleditor=new DolEditor('PAGE_CONTENT', $contentforedit, '', 500, 'Full', '', true, true, true, ROWS_5, '90%', 0, $poscursor);
4611
+	$doleditor = new DolEditor('PAGE_CONTENT', $contentforedit, '', 500, 'Full', '', true, true, true, ROWS_5, '90%', 0, $poscursor);
4612 4612
 	$doleditor->Create(0, '', false);
4613 4613
 }
4614 4614
 
@@ -4786,7 +4786,7 @@  discard block
 block discarded – undo
4786 4786
 			print getTitleFieldOfList("Categories", 0, $_SERVER['PHP_SELF']);
4787 4787
 			print getTitleFieldOfList("Language", 0, $_SERVER['PHP_SELF'], 'lang', '', $param, '', $sortfield, $sortorder, 'center ')."\n";
4788 4788
 			print getTitleFieldOfList("", 0, $_SERVER['PHP_SELF']);
4789
-			print getTitleFieldOfList("DateLastModification", 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center ')."\n";		// Date last modif
4789
+			print getTitleFieldOfList("DateLastModification", 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center ')."\n"; // Date last modif
4790 4790
 			print getTitleFieldOfList("", 0, $_SERVER['PHP_SELF']);
4791 4791
 			print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n";
4792 4792
 			print '</tr>';
Please login to merge, or discard this patch.
htdocs/societe/card.php 1 patch
Spacing   +52 added lines, -52 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 $backtopage = GETPOST('backtopage', 'alpha');
103 103
 $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha');
104 104
 $backtopagejsfields = GETPOST('backtopagejsfields', 'alpha');
105
-$confirm 	= GETPOST('confirm', 'alpha');
105
+$confirm = GETPOST('confirm', 'alpha');
106 106
 
107 107
 $dol_openinpopup = '';
108 108
 if (!empty($backtopagejsfields)) {
@@ -151,12 +151,12 @@  discard block
 block discarded – undo
151 151
 }
152 152
 
153 153
 // Permissions
154
-$permissiontoread 	= $user->hasRight('societe', 'lire');
155
-$permissiontoadd 	= $user->hasRight('societe', 'creer'); // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
154
+$permissiontoread = $user->hasRight('societe', 'lire');
155
+$permissiontoadd = $user->hasRight('societe', 'creer'); // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
156 156
 $permissiontodelete = $user->hasRight('societe', 'supprimer') || ($permissiontoadd && isset($object->status) && $object->status == 0);
157
-$permissionnote 	= $user->hasRight('societe', 'creer'); // Used by the include of actions_setnotes.inc.php
157
+$permissionnote = $user->hasRight('societe', 'creer'); // Used by the include of actions_setnotes.inc.php
158 158
 $permissiondellink 	= $user->hasRight('societe', 'creer'); // Used by the include of actions_dellink.inc.php
159
-$upload_dir 		= $conf->societe->multidir_output[isset($object->entity) ? $object->entity : 1];
159
+$upload_dir = $conf->societe->multidir_output[isset($object->entity) ? $object->entity : 1];
160 160
 
161 161
 // Security check
162 162
 $result = restrictedArea($user, 'societe', $socid, '&societe', '', 'fk_soc', 'rowid', 0);
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
 
200 200
 	if ($action == 'confirm_merge' && $confirm == 'yes' && $user->hasRight('societe', 'creer')) {
201 201
 		$soc_origin_id = GETPOST('soc_origin', 'int');
202
-		$soc_origin = new Societe($db);		// The thirdparty that we will delete
202
+		$soc_origin = new Societe($db); // The thirdparty that we will delete
203 203
 
204 204
 		if ($soc_origin_id <= 0) {
205 205
 			$langs->load('errors');
@@ -288,12 +288,12 @@  discard block
 block discarded – undo
288 288
 			$error++;
289 289
 		}
290 290
 
291
-		if (isModEnabled('mailing') && getDolGlobalInt('MAILING_CONTACT_DEFAULT_BULK_STATUS') == 2 && GETPOST('contact_no_email', 'int')==-1 && !empty(GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL))) {
291
+		if (isModEnabled('mailing') && getDolGlobalInt('MAILING_CONTACT_DEFAULT_BULK_STATUS') == 2 && GETPOST('contact_no_email', 'int') == -1 && !empty(GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL))) {
292 292
 			$error++;
293 293
 			setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("No_Email")), null, 'errors');
294 294
 		}
295 295
 
296
-		if (isModEnabled('mailing') && GETPOST("private", 'int') == 1 && getDolGlobalInt('MAILING_CONTACT_DEFAULT_BULK_STATUS') == 2 && GETPOST('contact_no_email', 'int')==-1 && !empty(GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL))) {
296
+		if (isModEnabled('mailing') && GETPOST("private", 'int') == 1 && getDolGlobalInt('MAILING_CONTACT_DEFAULT_BULK_STATUS') == 2 && GETPOST('contact_no_email', 'int') == -1 && !empty(GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL))) {
297 297
 			$error++;
298 298
 			setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("No_Email")), null, 'errors');
299 299
 		}
@@ -312,19 +312,19 @@  discard block
 block discarded – undo
312 312
 				$object->name = dolGetFirstLastname(GETPOST('firstname', 'alphanohtml'), GETPOST('name', 'alphanohtml'));
313 313
 				$object->civility_id		= GETPOST('civility_id', 'alphanohtml'); // Note: civility id is a code, not an int
314 314
 				// Add non official properties
315
-				$object->name_bis			= GETPOST('name', 'alphanohtml');
316
-				$object->firstname			= GETPOST('firstname', 'alphanohtml');
315
+				$object->name_bis = GETPOST('name', 'alphanohtml');
316
+				$object->firstname = GETPOST('firstname', 'alphanohtml');
317 317
 			} else {
318
-				$object->name				= GETPOST('name', 'alphanohtml');
318
+				$object->name = GETPOST('name', 'alphanohtml');
319 319
 			}
320 320
 			$object->entity					= (GETPOSTISSET('entity') ? GETPOST('entity', 'int') : $conf->entity);
321
-			$object->name_alias				= GETPOST('name_alias', 'alphanohtml');
321
+			$object->name_alias = GETPOST('name_alias', 'alphanohtml');
322 322
 			$object->parent					= GETPOST('parent_company_id', 'int');
323 323
 			$object->address				= GETPOST('address', 'alphanohtml');
324
-			$object->zip					= GETPOST('zipcode', 'alphanohtml');
325
-			$object->town					= GETPOST('town', 'alphanohtml');
326
-			$object->country_id				= GETPOST('country_id', 'int');
327
-			$object->state_id				= GETPOST('state_id', 'int');
324
+			$object->zip = GETPOST('zipcode', 'alphanohtml');
325
+			$object->town = GETPOST('town', 'alphanohtml');
326
+			$object->country_id = GETPOST('country_id', 'int');
327
+			$object->state_id = GETPOST('state_id', 'int');
328 328
 
329 329
 			$object->socialnetworks = array();
330 330
 			if (isModEnabled('socialnetworks')) {
@@ -338,7 +338,7 @@  discard block
 block discarded – undo
338 338
 			$object->phone					= GETPOST('phone', 'alpha');
339 339
 			$object->fax					= GETPOST('fax', 'alpha');
340 340
 			$object->email					= trim(GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL));
341
-			$object->no_email 				= GETPOST("no_email", "int");
341
+			$object->no_email = GETPOST("no_email", "int");
342 342
 			$object->url					= trim(GETPOST('url', 'custom', 0, FILTER_SANITIZE_URL));
343 343
 			$object->idprof1				= trim(GETPOST('idprof1', 'alphanohtml'));
344 344
 			$object->idprof2				= trim(GETPOST('idprof2', 'alphanohtml'));
@@ -348,13 +348,13 @@  discard block
 block discarded – undo
348 348
 			$object->idprof6				= trim(GETPOST('idprof6', 'alphanohtml'));
349 349
 			$object->prefix_comm			= GETPOST('prefix_comm', 'alphanohtml');
350 350
 			$object->code_client			= GETPOSTISSET('customer_code') ? GETPOST('customer_code', 'alpha') : GETPOST('code_client', 'alpha');
351
-			$object->code_fournisseur		= GETPOSTISSET('supplier_code') ? GETPOST('supplier_code', 'alpha') : GETPOST('code_fournisseur', 'alpha');
351
+			$object->code_fournisseur = GETPOSTISSET('supplier_code') ? GETPOST('supplier_code', 'alpha') : GETPOST('code_fournisseur', 'alpha');
352 352
 			$object->capital				= GETPOST('capital', 'alphanohtml');
353 353
 			$object->barcode				= GETPOST('barcode', 'alphanohtml');
354 354
 
355 355
 			$object->tva_intra				= GETPOST('tva_intra', 'alphanohtml');
356 356
 			$object->tva_assuj				= GETPOST('assujtva_value', 'alpha');
357
-			$object->vat_reverse_charge		= GETPOST('vat_reverse_charge') == 'on' ? 1 : 0;
357
+			$object->vat_reverse_charge = GETPOST('vat_reverse_charge') == 'on' ? 1 : 0;
358 358
 			$object->status = GETPOST('status', 'alpha');
359 359
 
360 360
 			// Local Taxes
@@ -364,24 +364,24 @@  discard block
 block discarded – undo
364 364
 			$object->localtax1_value		= GETPOST('lt1', 'alpha');
365 365
 			$object->localtax2_value		= GETPOST('lt2', 'alpha');
366 366
 
367
-			$object->forme_juridique_code	= GETPOST('forme_juridique_code', 'int');
367
+			$object->forme_juridique_code = GETPOST('forme_juridique_code', 'int');
368 368
 			$object->effectif_id			= GETPOST('effectif_id', 'int');
369
-			$object->typent_id				= GETPOST('typent_id', 'int');
369
+			$object->typent_id = GETPOST('typent_id', 'int');
370 370
 
371 371
 			$object->typent_code			= dol_getIdFromCode($db, $object->typent_id, 'c_typent', 'id', 'code'); // Force typent_code too so check in verify() will be done on new type
372 372
 
373
-			$object->client					= GETPOST('client', 'int');
373
+			$object->client = GETPOST('client', 'int');
374 374
 			$object->fournisseur			= GETPOST('fournisseur', 'int');
375 375
 
376
-			$object->commercial_id			= GETPOST('commercial_id', 'int');
377
-			$object->default_lang			= GETPOST('default_lang');
376
+			$object->commercial_id = GETPOST('commercial_id', 'int');
377
+			$object->default_lang = GETPOST('default_lang');
378 378
 
379 379
 			// Webservices url/key
380 380
 			$object->webservices_url		= GETPOST('webservices_url', 'custom', 0, FILTER_SANITIZE_URL);
381 381
 			$object->webservices_key		= GETPOST('webservices_key', 'san_alpha');
382 382
 
383 383
 			if (GETPOSTISSET('accountancy_code_sell')) {
384
-				$accountancy_code_sell		= GETPOST('accountancy_code_sell', 'alpha');
384
+				$accountancy_code_sell = GETPOST('accountancy_code_sell', 'alpha');
385 385
 
386 386
 				if (empty($accountancy_code_sell) || $accountancy_code_sell == '-1') {
387 387
 					$object->accountancy_code_sell = '';
@@ -390,7 +390,7 @@  discard block
 block discarded – undo
390 390
 				}
391 391
 			}
392 392
 			if (GETPOSTISSET('accountancy_code_buy')) {
393
-				$accountancy_code_buy		= GETPOST('accountancy_code_buy', 'alpha');
393
+				$accountancy_code_buy = GETPOST('accountancy_code_buy', 'alpha');
394 394
 
395 395
 				if (empty($accountancy_code_buy) || $accountancy_code_buy == '-1') {
396 396
 					$object->accountancy_code_buy = '';
@@ -1004,7 +1004,7 @@  discard block
 block discarded – undo
1004 1004
 		$object->civility_id		= GETPOST('civility_id', 'alpha');
1005 1005
 
1006 1006
 		$object->tva_assuj = GETPOST('assujtva_value', 'int');
1007
-		$object->vat_reverse_charge	= GETPOST('vat_reverse_charge') == 'on' ? 1 : 0;
1007
+		$object->vat_reverse_charge = GETPOST('vat_reverse_charge') == 'on' ? 1 : 0;
1008 1008
 		$object->status = GETPOST('status', 'int');
1009 1009
 
1010 1010
 		//Local Taxes
@@ -1020,7 +1020,7 @@  discard block
 block discarded – undo
1020 1020
 		$object->default_lang = GETPOST('default_lang');
1021 1021
 
1022 1022
 		if (GETPOSTISSET('accountancy_code_sell')) {
1023
-			$accountancy_code_sell  = GETPOST('accountancy_code_sell', 'alpha');
1023
+			$accountancy_code_sell = GETPOST('accountancy_code_sell', 'alpha');
1024 1024
 
1025 1025
 			if (empty($accountancy_code_sell) || $accountancy_code_sell == '-1') {
1026 1026
 				$object->accountancy_code_sell = '';
@@ -1029,7 +1029,7 @@  discard block
 block discarded – undo
1029 1029
 			}
1030 1030
 		}
1031 1031
 		if (GETPOSTISSET('accountancy_code_buy')) {
1032
-			$accountancy_code_buy   = GETPOST('accountancy_code_buy', 'alpha');
1032
+			$accountancy_code_buy = GETPOST('accountancy_code_buy', 'alpha');
1033 1033
 
1034 1034
 			if (empty($accountancy_code_buy) || $accountancy_code_buy == '-1') {
1035 1035
 				$object->accountancy_code_buy = '';
@@ -1154,7 +1154,7 @@  discard block
 block discarded – undo
1154 1154
 
1155 1155
 			print '<script type="text/javascript">';
1156 1156
 			print '$(document).ready(function () {
1157
-					var canHaveCategoryIfNotCustomerProspectSupplier = ' . (!getDolGlobalString('THIRDPARTY_CAN_HAVE_CATEGORY_EVEN_IF_NOT_CUSTOMER_PROSPECT') ? '0' : '1') . ';
1157
+					var canHaveCategoryIfNotCustomerProspectSupplier = ' . (!getDolGlobalString('THIRDPARTY_CAN_HAVE_CATEGORY_EVEN_IF_NOT_CUSTOMER_PROSPECT') ? '0' : '1').';
1158 1158
 
1159 1159
 					init_customer_categ();
1160 1160
 			  		$("#customerprospect").change(function() {
@@ -1226,7 +1226,7 @@  discard block
 block discarded – undo
1226 1226
 			print '</td><td'.(!getDolGlobalString('SOCIETE_USEPREFIX') ? ' colspan="3"' : '').'>';
1227 1227
 
1228 1228
 			print '<input type="text" class="minwidth300" maxlength="128" name="name" id="name" value="'.dol_escape_htmltag($object->name).'" autofocus="autofocus">';
1229
-			print $form->widgetForTranslation("name", $object, $permissiontoadd, 'string', 'alpahnohtml', 'minwidth300');	// For some countries that need the company name in 2 languages
1229
+			print $form->widgetForTranslation("name", $object, $permissiontoadd, 'string', 'alpahnohtml', 'minwidth300'); // For some countries that need the company name in 2 languages
1230 1230
 			// This implementation of the feature to search already existing company has been disabled. It must be implemented by keeping the "input text" and we must call the search ajax societe/ajax/ajaxcompanies.php
1231 1231
 			// on a keydown of the input. We should show data about a duplicate found if we found less than 5 answers into a div under the input.
1232 1232
 			/*
@@ -1484,7 +1484,7 @@  discard block
 block discarded – undo
1484 1484
 				if ($conf->browser->layout == 'phone') {
1485 1485
 					print '</tr><tr>';
1486 1486
 				}
1487
-				print '<td class="individualline noemail">'.$form->editfieldkey($langs->trans('No_Email') .' ('.$langs->trans('Contact').')', 'contact_no_email', '', $object, 0).'</td>';
1487
+				print '<td class="individualline noemail">'.$form->editfieldkey($langs->trans('No_Email').' ('.$langs->trans('Contact').')', 'contact_no_email', '', $object, 0).'</td>';
1488 1488
 				print '<td class="individualline" '.(($conf->browser->layout == 'phone') || !isModEnabled('mailing') ? ' colspan="3"' : '').'>'.$form->selectyesno('contact_no_email', (GETPOSTISSET("contact_no_email") ? GETPOST("contact_no_email", 'alpha') : (empty($object->no_email) ? 0 : 1)), 1, false, 1).'</td>';
1489 1489
 			}
1490 1490
 			print '</tr>';
@@ -1557,7 +1557,7 @@  discard block
 block discarded – undo
1557 1557
 			// Vat is used
1558 1558
 			print '<tr><td>'.$form->editfieldkey('VATIsUsed', 'assujtva_value', '', $object, 0).'</td>';
1559 1559
 			print '<td>';
1560
-			print '<input id="assujtva_value" name="assujtva_value" type="checkbox" ' . (GETPOSTISSET('assujtva_value') ? 'checked="checked"' : 'checked="checked"') . ' value="1">'; // Assujeti par default en creation
1560
+			print '<input id="assujtva_value" name="assujtva_value" type="checkbox" '.(GETPOSTISSET('assujtva_value') ? 'checked="checked"' : 'checked="checked"').' value="1">'; // Assujeti par default en creation
1561 1561
 			print '</td>';
1562 1562
 			if ($conf->browser->layout == 'phone') {
1563 1563
 				print '</tr><tr>';
@@ -1598,7 +1598,7 @@  discard block
 block discarded – undo
1598 1598
 
1599 1599
 			// VAT reverse charge by default
1600 1600
 			if (getDolGlobalString('ACCOUNTING_FORCE_ENABLE_VAT_REVERSE_CHARGE')) {
1601
-				print '<tr><td>' . $form->editfieldkey('VATReverseChargeByDefault', 'vat_reverse_charge', '', $object, 0) . '</td><td colspan="3">';
1601
+				print '<tr><td>'.$form->editfieldkey('VATReverseChargeByDefault', 'vat_reverse_charge', '', $object, 0).'</td><td colspan="3">';
1602 1602
 				print '<input type="checkbox" name="vat_reverse_charge" '.($object->vat_reverse_charge == '1' ? ' checked' : '').'>';
1603 1603
 				print '</td></tr>';
1604 1604
 			}
@@ -1607,21 +1607,21 @@  discard block
 block discarded – undo
1607 1607
 			//TODO: Place into a function to control showing by country or study better option
1608 1608
 			if ($mysoc->localtax1_assuj == "1" && $mysoc->localtax2_assuj == "1") {
1609 1609
 				print '<tr><td>'.$langs->transcountry("LocalTax1IsUsed", $mysoc->country_code).'</td><td>';
1610
-				print '<input id="localtax1assuj_value" name="localtax1assuj_value" type="checkbox" ' . (isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX1) ? 'checked="checked"' : '') . ' value="1">';
1610
+				print '<input id="localtax1assuj_value" name="localtax1assuj_value" type="checkbox" '.(isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX1) ? 'checked="checked"' : '').' value="1">';
1611 1611
 				print '</td>';
1612 1612
 				if ($conf->browser->layout == 'phone') {
1613 1613
 					print '</tr><tr>';
1614 1614
 				}
1615 1615
 				print '<td>'.$langs->transcountry("LocalTax2IsUsed", $mysoc->country_code).'</td><td>';
1616
-				print '<input id="localtax2assuj_value" name="localtax2assuj_value" type="checkbox" ' . (isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX2) ? 'checked="checked"' : '') . ' value="1">';
1616
+				print '<input id="localtax2assuj_value" name="localtax2assuj_value" type="checkbox" '.(isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX2) ? 'checked="checked"' : '').' value="1">';
1617 1617
 				print '</td></tr>';
1618 1618
 			} elseif ($mysoc->localtax1_assuj == "1") {
1619 1619
 				print '<tr><td>'.$langs->transcountry("LocalTax1IsUsed", $mysoc->country_code).'</td><td colspan="3">';
1620
-				print '<input id="localtax1assuj_value" name="localtax1assuj_value" type="checkbox" ' . (isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX1) ? 'checked="checked"' : '') . ' value="1">';
1620
+				print '<input id="localtax1assuj_value" name="localtax1assuj_value" type="checkbox" '.(isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX1) ? 'checked="checked"' : '').' value="1">';
1621 1621
 				print '</td></tr>';
1622 1622
 			} elseif ($mysoc->localtax2_assuj == "1") {
1623 1623
 				print '<tr><td>'.$langs->transcountry("LocalTax2IsUsed", $mysoc->country_code).'</td><td colspan="3">';
1624
-				print '<input id="localtax2assuj_value" name="localtax2assuj_value" type="checkbox" ' . (isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX2) ? 'checked="checked"' : '') . ' value="1">';
1624
+				print '<input id="localtax2assuj_value" name="localtax2assuj_value" type="checkbox" '.(isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX2) ? 'checked="checked"' : '').' value="1">';
1625 1625
 				print '</td></tr>';
1626 1626
 			}
1627 1627
 
@@ -1863,7 +1863,7 @@  discard block
 block discarded – undo
1863 1863
 				$object->phone					= GETPOST('phone', 'alpha');
1864 1864
 				$object->fax					= GETPOST('fax', 'alpha');
1865 1865
 				$object->email					= GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL);
1866
-				$object->no_email				= GETPOST("no_email", "int");
1866
+				$object->no_email = GETPOST("no_email", "int");
1867 1867
 				$object->url					= GETPOST('url', 'custom', 0, FILTER_SANITIZE_URL);
1868 1868
 				$object->capital				= GETPOST('capital', 'alphanohtml');
1869 1869
 				$object->idprof1				= GETPOST('idprof1', 'alphanohtml');
@@ -1879,16 +1879,16 @@  discard block
 block discarded – undo
1879 1879
 				$object->default_lang = GETPOST('default_lang', 'alpha');
1880 1880
 
1881 1881
 				$object->tva_assuj				= GETPOST('assujtva_value', 'int');
1882
-				$object->vat_reverse_charge		= GETPOST('vat_reverse_charge') == 'on' ? 1 : 0;
1882
+				$object->vat_reverse_charge = GETPOST('vat_reverse_charge') == 'on' ? 1 : 0;
1883 1883
 				$object->tva_intra				= GETPOST('tva_intra', 'alphanohtml');
1884
-				$object->status =				GETPOST('status', 'int');
1884
+				$object->status = GETPOST('status', 'int');
1885 1885
 
1886 1886
 				// Webservices url/key
1887 1887
 				$object->webservices_url        = GETPOST('webservices_url', 'custom', 0, FILTER_SANITIZE_URL);
1888 1888
 				$object->webservices_key        = GETPOST('webservices_key', 'san_alpha');
1889 1889
 
1890 1890
 				if (GETPOSTISSET('accountancy_code_sell')) {
1891
-					$accountancy_code_sell  = GETPOST('accountancy_code_sell', 'alpha');
1891
+					$accountancy_code_sell = GETPOST('accountancy_code_sell', 'alpha');
1892 1892
 
1893 1893
 					if (empty($accountancy_code_sell) || $accountancy_code_sell == '-1') {
1894 1894
 						$object->accountancy_code_sell = '';
@@ -1897,7 +1897,7 @@  discard block
 block discarded – undo
1897 1897
 					}
1898 1898
 				}
1899 1899
 				if (GETPOSTISSET('accountancy_code_buy')) {
1900
-					$accountancy_code_buy   = GETPOST('accountancy_code_buy', 'alpha');
1900
+					$accountancy_code_buy = GETPOST('accountancy_code_buy', 'alpha');
1901 1901
 
1902 1902
 					if (empty($accountancy_code_buy) || $accountancy_code_buy == '-1') {
1903 1903
 						$object->accountancy_code_buy = '';
@@ -1979,7 +1979,7 @@  discard block
 block discarded – undo
1979 1979
     				}
1980 1980
     			});
1981 1981
 
1982
-				var canHaveCategoryIfNotCustomerProspectSupplier = ' . (!getDolGlobalString('THIRDPARTY_CAN_HAVE_CUSTOMER_CATEGORY_EVEN_IF_NOT_CUSTOMER_PROSPECT') ? '0' : '1') . ';
1982
+				var canHaveCategoryIfNotCustomerProspectSupplier = ' . (!getDolGlobalString('THIRDPARTY_CAN_HAVE_CUSTOMER_CATEGORY_EVEN_IF_NOT_CUSTOMER_PROSPECT') ? '0' : '1').';
1983 1983
 
1984 1984
 				init_customer_categ();
1985 1985
 	  			$("#customerprospect").change(function() {
@@ -2293,14 +2293,14 @@  discard block
 block discarded – undo
2293 2293
 
2294 2294
 				// VAT is used
2295 2295
 				print '<tr><td>'.$form->editfieldkey('VATIsUsed', 'assujtva_value', '', $object, 0).'</td><td colspan="3">';
2296
-				print '<input id="assujtva_value" name="assujtva_value" type="checkbox" ' . ($object->tva_assuj ? 'checked="checked"' : '') . ' value="1">';
2296
+				print '<input id="assujtva_value" name="assujtva_value" type="checkbox" '.($object->tva_assuj ? 'checked="checked"' : '').' value="1">';
2297 2297
 				print '</td></tr>';
2298 2298
 
2299 2299
 				// Local Taxes
2300 2300
 				//TODO: Place into a function to control showing by country or study better option
2301 2301
 				if ($mysoc->localtax1_assuj == "1" && $mysoc->localtax2_assuj == "1") {
2302 2302
 					print '<tr><td>'.$form->editfieldkey($langs->transcountry("LocalTax1IsUsed", $mysoc->country_code), 'localtax1assuj_value', '', $object, 0).'</td><td>';
2303
-					print '<input id="localtax1assuj_value" name="localtax1assuj_value" type="checkbox" ' . ($object->localtax1_assuj ? 'checked="checked"' : '') . ' value="1">';
2303
+					print '<input id="localtax1assuj_value" name="localtax1assuj_value" type="checkbox" '.($object->localtax1_assuj ? 'checked="checked"' : '').' value="1">';
2304 2304
 					if (!isOnlyOneLocalTax(1)) {
2305 2305
 						print '<span class="cblt1">     '.$langs->transcountry("Type", $mysoc->country_code).': ';
2306 2306
 						$formcompany->select_localtax(1, $object->localtax1_value, "lt1");
@@ -2309,7 +2309,7 @@  discard block
 block discarded – undo
2309 2309
 					print '</td>';
2310 2310
 					print '</tr><tr>';
2311 2311
 					print '<td>'.$form->editfieldkey($langs->transcountry("LocalTax2IsUsed", $mysoc->country_code), 'localtax2assuj_value', '', $object, 0).'</td><td>';
2312
-					print '<input id="localtax2assuj_value" name="localtax2assuj_value" type="checkbox" ' . ($object->localtax2_assuj ? 'checked="checked"' : '') . ' value="1"></td></tr>';
2312
+					print '<input id="localtax2assuj_value" name="localtax2assuj_value" type="checkbox" '.($object->localtax2_assuj ? 'checked="checked"' : '').' value="1"></td></tr>';
2313 2313
 					if (!isOnlyOneLocalTax(2)) {
2314 2314
 						print '<span class="cblt2">     '.$langs->transcountry("Type", $mysoc->country_code).': ';
2315 2315
 						$formcompany->select_localtax(2, $object->localtax2_value, "lt2");
@@ -2318,7 +2318,7 @@  discard block
 block discarded – undo
2318 2318
 					print '</td></tr>';
2319 2319
 				} elseif ($mysoc->localtax1_assuj == "1" && $mysoc->localtax2_assuj != "1") {
2320 2320
 					print '<tr><td>'.$form->editfieldkey($langs->transcountry("LocalTax1IsUsed", $mysoc->country_code), 'localtax1assuj_value', '', $object, 0).'</td><td colspan="3">';
2321
-					print '<input id="localtax1assuj_value" name="localtax1assuj_value" type="checkbox" ' . ($object->localtax1_assuj ? 'checked="checked"' : '') . ' value="1">';
2321
+					print '<input id="localtax1assuj_value" name="localtax1assuj_value" type="checkbox" '.($object->localtax1_assuj ? 'checked="checked"' : '').' value="1">';
2322 2322
 					if (!isOnlyOneLocalTax(1)) {
2323 2323
 						print '<span class="cblt1">     '.$langs->transcountry("Type", $mysoc->country_code).': ';
2324 2324
 						$formcompany->select_localtax(1, $object->localtax1_value, "lt1");
@@ -2327,7 +2327,7 @@  discard block
 block discarded – undo
2327 2327
 					print '</td></tr>';
2328 2328
 				} elseif ($mysoc->localtax2_assuj == "1" && $mysoc->localtax1_assuj != "1") {
2329 2329
 					print '<tr><td>'.$form->editfieldkey($langs->transcountry("LocalTax2IsUsed", $mysoc->country_code), 'localtax2assuj_value', '', $object, 0).'</td><td colspan="3">';
2330
-					print '<input id="localtax2assuj_value" name="localtax2assuj_value" type="checkbox" ' . ($object->localtax2_assuj ? 'checked="checked"' : '') . ' value="1">';
2330
+					print '<input id="localtax2assuj_value" name="localtax2assuj_value" type="checkbox" '.($object->localtax2_assuj ? 'checked="checked"' : '').' value="1">';
2331 2331
 					if (!isOnlyOneLocalTax(2)) {
2332 2332
 						print '<span class="cblt2">     '.$langs->transcountry("Type", $mysoc->country_code).': ';
2333 2333
 						$formcompany->select_localtax(2, $object->localtax2_value, "lt2");
@@ -2338,7 +2338,7 @@  discard block
 block discarded – undo
2338 2338
 
2339 2339
 				// VAT reverse charge by default
2340 2340
 				if (getDolGlobalString('ACCOUNTING_FORCE_ENABLE_VAT_REVERSE_CHARGE')) {
2341
-					print '<tr><td>' . $form->editfieldkey('VATReverseChargeByDefault', 'vat_reverse_charge', '', $object, 0) . '</td><td colspan="3">';
2341
+					print '<tr><td>'.$form->editfieldkey('VATReverseChargeByDefault', 'vat_reverse_charge', '', $object, 0).'</td><td colspan="3">';
2342 2342
 					print '<input type="checkbox" name="vat_reverse_charge" '.($object->vat_reverse_charge == '1' ? ' checked' : '').'>';
2343 2343
 					print '</td></tr>';
2344 2344
 				}
@@ -2515,7 +2515,7 @@  discard block
 block discarded – undo
2515 2515
 					$maxfilesizearray = getMaxFileSizeArray();
2516 2516
 					$maxmin = $maxfilesizearray['maxmin'];
2517 2517
 					if ($maxmin > 0) {
2518
-						print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">';	// MAX_FILE_SIZE must precede the field type=file
2518
+						print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
2519 2519
 					}
2520 2520
 					print '<input type="file" class="flat" name="photo" id="photoinput">';
2521 2521
 					print '</td></tr>';
@@ -2736,7 +2736,7 @@  discard block
 block discarded – undo
2736 2736
 					print '<tr><td>';
2737 2737
 					print $form->textwithpicto($langs->trans('VATReverseChargeByDefault'), $langs->trans('VATReverseChargeByDefaultDesc'));
2738 2738
 					print '</td><td>';
2739
-					print '<input type="checkbox" name="vat_reverse_charge" ' . ($object->vat_reverse_charge == '1' ? ' checked' : '') . ' disabled>';
2739
+					print '<input type="checkbox" name="vat_reverse_charge" '.($object->vat_reverse_charge == '1' ? ' checked' : '').' disabled>';
2740 2740
 					print '</td>';
2741 2741
 					print '</tr>';
2742 2742
 				}
Please login to merge, or discard this patch.
htdocs/reception/card.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 $line_id = GETPOST('lineid', 'int') ? GETPOST('lineid', 'int') : '';
87 87
 $facid = GETPOST('facid', 'int');
88 88
 
89
-$action	= GETPOST('action', 'alpha');
89
+$action = GETPOST('action', 'alpha');
90 90
 //Select mail models is same action as presend
91 91
 if (GETPOST('modelselected')) {
92 92
 	$action = 'presend';
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
 
343 343
 		// Loop lines to calculate $totalqty
344 344
 		for ($i = 1; $i <= $num; $i++) {
345
-			$idl = "idl".$i;	// id line source
345
+			$idl = "idl".$i; // id line source
346 346
 
347 347
 			//$sub_qty = array();
348 348
 			//$subtotalqty = 0;
@@ -350,7 +350,7 @@  discard block
 block discarded – undo
350 350
 			//$j = 0;
351 351
 			//$batch = "batchl".$i."_0";
352 352
 			//$stockLocation = "ent1".$i."_0";
353
-			$qty = "qtyl".$i;	// qty
353
+			$qty = "qtyl".$i; // qty
354 354
 
355 355
 			//reception line for product with no batch management and no multiple stock location
356 356
 			if (GETPOST($qty, 'alpha') > 0) {
@@ -364,7 +364,7 @@  discard block
 block discarded – undo
364 364
 
365 365
 		if ($totalqty > 0) {  // There is at least one thing to ship
366 366
 			for ($i = 1; $i <= $num; $i++) {
367
-				$idl = "idl".$i;	// id line source
367
+				$idl = "idl".$i; // id line source
368 368
 				$lineToTest = '';
369 369
 				$lineId = GETPOST($idl, 'int');
370 370
 				foreach ($objectsrc->lines as $linesrc) {
@@ -973,35 +973,35 @@  discard block
 block discarded – undo
973 973
 				$reg = array();
974 974
 				if (preg_match('/^product_([0-9]+)_([0-9]+)$/i', $key, $reg)) {
975 975
 					$numAsked++;
976
-					$paramSuffix = $reg[1] . '_' . $reg[2];
976
+					$paramSuffix = $reg[1].'_'.$reg[2];
977 977
 					$suffix2numAsked[$paramSuffix] = $numAsked;
978 978
 
979 979
 					// $numline=$reg[2] + 1; // line of product
980 980
 					$numline = $numAsked;
981 981
 
982
-					$prod = "product_" . $paramSuffix;
983
-					$qty = "qty_" . $paramSuffix;
984
-					$ent = "entrepot_" . $paramSuffix;
985
-					$pu = "pu_" . $paramSuffix; // This is unit price including discount
986
-					$fk_commandefourndet = "fk_commandefourndet_" . $paramSuffix;
982
+					$prod = "product_".$paramSuffix;
983
+					$qty = "qty_".$paramSuffix;
984
+					$ent = "entrepot_".$paramSuffix;
985
+					$pu = "pu_".$paramSuffix; // This is unit price including discount
986
+					$fk_commandefourndet = "fk_commandefourndet_".$paramSuffix;
987 987
 					$dispatchLines[$numAsked] = array('paramSuffix'=>$paramSuffix, 'prod' => GETPOST($prod, 'int'), 'qty' => price2num(GETPOST($qty), 'MS'), 'ent' => GETPOST($ent, 'int'), 'pu' => price2num(GETPOST($pu), 'MU'), 'comment' => GETPOST('comment'), 'fk_commandefourndet' => GETPOST($fk_commandefourndet, 'int'));
988 988
 				}
989 989
 
990 990
 				// with batch module enabled and product with lot/serial
991 991
 				if (preg_match('/^product_batch_([0-9]+)_([0-9]+)$/i', $key, $reg)) {
992 992
 					$numAsked++;
993
-					$paramSuffix = $reg[1] . '_' . $reg[2];
993
+					$paramSuffix = $reg[1].'_'.$reg[2];
994 994
 					$suffix2numAsked[$paramSuffix] = $numAsked;
995 995
 
996 996
 					// eat-by date dispatch
997 997
 					// $numline=$reg[2] + 1; // line of product
998 998
 					$numline = $numAsked;
999 999
 
1000
-					$prod = 'product_batch_' . $paramSuffix;
1001
-					$qty = 'qty_' . $paramSuffix;
1002
-					$ent = 'entrepot_' . $paramSuffix;
1003
-					$pu = 'pu_' . $paramSuffix;
1004
-					$lot = 'lot_number_' . $paramSuffix;
1000
+					$prod = 'product_batch_'.$paramSuffix;
1001
+					$qty = 'qty_'.$paramSuffix;
1002
+					$ent = 'entrepot_'.$paramSuffix;
1003
+					$pu = 'pu_'.$paramSuffix;
1004
+					$lot = 'lot_number_'.$paramSuffix;
1005 1005
 					$dDLUO = dol_mktime(12, 0, 0, GETPOST('dluo_'.$paramSuffix.'month', 'int'), GETPOST('dluo_'.$paramSuffix.'day', 'int'), GETPOST('dluo_'.$paramSuffix.'year', 'int'));
1006 1006
 					$dDLC = dol_mktime(12, 0, 0, GETPOST('dlc_'.$paramSuffix.'month', 'int'), GETPOST('dlc_'.$paramSuffix.'day', 'int'), GETPOST('dlc_'.$paramSuffix.'year', 'int'));
1007 1007
 					$fk_commandefourndet = 'fk_commandefourndet_'.$paramSuffix;
@@ -1035,7 +1035,7 @@  discard block
 block discarded – undo
1035 1035
 			// Note that if an extrafield with the same name exists in the origin supplier order line, the value
1036 1036
 			// from the HTTP query will be ignored
1037 1037
 			foreach ($suffix2numAsked as $suffix => $n) {
1038
-				$dispatchLines[$n]['array_options'] = $extrafields->getOptionalsFromPost('commande_fournisseur_dispatch', '_' . $suffix, '');
1038
+				$dispatchLines[$n]['array_options'] = $extrafields->getOptionalsFromPost('commande_fournisseur_dispatch', '_'.$suffix, '');
1039 1039
 			}
1040 1040
 
1041 1041
 			print '<script type="text/javascript">
@@ -1099,7 +1099,7 @@  discard block
 block discarded – undo
1099 1099
 			// $objectsrc->lines contains the line of the purchase order
1100 1100
 			// $dispatchLines is list of lines with dispatching detail (with product, qty and warehouse). One purchase order line may have n of this dispatch lines.
1101 1101
 
1102
-			$arrayofpurchaselinealreadyoutput= array();
1102
+			$arrayofpurchaselinealreadyoutput = array();
1103 1103
 
1104 1104
 			// $_POST contains fk_commandefourndet_X_Y    where Y is num of product line and X is number of split lines
1105 1105
 			$indiceAsked = 1;
@@ -1140,7 +1140,7 @@  discard block
 block discarded – undo
1140 1140
 
1141 1141
 					print '<input type="hidden" name="productl'.$indiceAsked.'" value="'.$line->fk_product.'">';
1142 1142
 
1143
-					if (! array_key_exists($line->id, $arrayofpurchaselinealreadyoutput)) {	// Add test to avoid to show qty twice
1143
+					if (!array_key_exists($line->id, $arrayofpurchaselinealreadyoutput)) {	// Add test to avoid to show qty twice
1144 1144
 						print '<input type="hidden" name="productid'.$indiceAsked.'" value="'.$line->fk_product.'">';
1145 1145
 
1146 1146
 						// Show product and description
@@ -1162,7 +1162,7 @@  discard block
 block discarded – undo
1162 1162
 					print '</td>';
1163 1163
 				} else {
1164 1164
 					print "<td>";
1165
-					if (! array_key_exists($line->id, $arrayofpurchaselinealreadyoutput)) {	// Add test to avoid to show qty twice
1165
+					if (!array_key_exists($line->id, $arrayofpurchaselinealreadyoutput)) {	// Add test to avoid to show qty twice
1166 1166
 						if ($type == 1) {
1167 1167
 							$text = img_object($langs->trans('Service'), 'service');
1168 1168
 						} else {
@@ -1191,7 +1191,7 @@  discard block
 block discarded – undo
1191 1191
 
1192 1192
 				// Qty in source purchase order line
1193 1193
 				print '<td class="center">';
1194
-				if (! array_key_exists($line->id, $arrayofpurchaselinealreadyoutput)) {	// Add test to avoid to show qty twice
1194
+				if (!array_key_exists($line->id, $arrayofpurchaselinealreadyoutput)) {	// Add test to avoid to show qty twice
1195 1195
 					print $line->qty;
1196 1196
 				}
1197 1197
 				print '<input type="hidden" name="fk_commandefournisseurdet'.$indiceAsked.'" value="'.$line->id.'">';
@@ -1203,7 +1203,7 @@  discard block
 block discarded – undo
1203 1203
 				// Qty already received
1204 1204
 				print '<td class="center">';
1205 1205
 				$quantityDelivered = $objectsrc->receptions[$line->id];
1206
-				if (! array_key_exists($line->id, $arrayofpurchaselinealreadyoutput)) {	// Add test to avoid to show qty twice
1206
+				if (!array_key_exists($line->id, $arrayofpurchaselinealreadyoutput)) {	// Add test to avoid to show qty twice
1207 1207
 					print $quantityDelivered;
1208 1208
 				}
1209 1209
 				print '<input name="qtydelivered'.$indiceAsked.'" id="qtydelivered'.$indiceAsked.'" type="hidden" value="'.$quantityDelivered.'">';
@@ -2039,7 +2039,7 @@  discard block
 block discarded – undo
2039 2039
 							$detail = $form->textwithtooltip(img_picto('', 'object_barcode').' '.$langs->trans("DetailBatchNumber"), $batchinfo);
2040 2040
 						}
2041 2041
 					}
2042
-					print $detail . '</td>';
2042
+					print $detail.'</td>';
2043 2043
 				} else {
2044 2044
 					print '<td></td>';
2045 2045
 				}
Please login to merge, or discard this patch.
htdocs/user/document.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
65 65
 	|| (($user->id != $id) && $user->hasRight("user", "user", "password")));
66 66
 }
67 67
 
68
-$permissiontoadd = $caneditfield;	// Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles
68
+$permissiontoadd = $caneditfield; // Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles
69 69
 $permtoedit = $caneditfield;
70 70
 
71 71
 // Security check
Please login to merge, or discard this patch.
htdocs/core/lib/website.lib.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 {
78 78
 	$str = str_replace('<?=', '<?php', $str);
79 79
 	$str = str_replace('<?php', '__LTINTPHP__', $str);
80
-	$str = str_replace('<?', '<?php', $str);			// replace the short_open_tag. It is recommended to set this is Off in php.ini
80
+	$str = str_replace('<?', '<?php', $str); // replace the short_open_tag. It is recommended to set this is Off in php.ini
81 81
 	$str = str_replace('__LTINTPHP__', '<?php', $str);
82 82
 
83 83
 	$newstr = '';
@@ -425,7 +425,7 @@  discard block
 block discarded – undo
425 425
 	}
426 426
 
427 427
 	if (getDolGlobalString('WEBSITE_ADD_CSS_TO_BODY')) {
428
-		$content = str_replace('<body id="bodywebsite" class="bodywebsite', '<body id="bodywebsite" class="bodywebsite ' . getDolGlobalString('WEBSITE_ADD_CSS_TO_BODY'), $content);
428
+		$content = str_replace('<body id="bodywebsite" class="bodywebsite', '<body id="bodywebsite" class="bodywebsite '.getDolGlobalString('WEBSITE_ADD_CSS_TO_BODY'), $content);
429 429
 	}
430 430
 
431 431
 	$content = dolReplaceSmileyCodeWithUTF8($content);
@@ -460,7 +460,7 @@  discard block
 block discarded – undo
460 460
 			$sql .= " lastaccess = '".$db->idate(dol_now('gmt'), 'gmt')."'";
461 461
 			$sql .= " WHERE rowid = ".((int) $websiteid);
462 462
 			$resql = $db->query($sql);
463
-			if (! $resql) {
463
+			if (!$resql) {
464 464
 				return -1;
465 465
 			}
466 466
 		}
@@ -872,7 +872,7 @@  discard block
 block discarded – undo
872 872
 		$hashtags = trim(join(' #', array_map('trim', explode(',', $websitepage->keywords))));
873 873
 
874 874
 		// Open Graph
875
-		$out .= '<meta name="og:type" content="website">'."\n";	// TODO If blogpost, use type article
875
+		$out .= '<meta name="og:type" content="website">'."\n"; // TODO If blogpost, use type article
876 876
 		$out .= '<meta name="og:title" content="'.$websitepage->title.'">'."\n";
877 877
 		if ($websitepage->image) {
878 878
 			$out .= '<meta name="og:image" content="'.$website->virtualhost.$image.'">'."\n";
@@ -989,9 +989,9 @@  discard block
 block discarded – undo
989 989
 	$sql = "SELECT COUNT(rowid) as nb";
990 990
 	$sql .= " FROM ".MAIN_DB_PREFIX."ecm_files";
991 991
 	$sql .= " WHERE entity IN (".getEntity($object->element).")";
992
-	$sql .= " AND src_object_type = '".$db->escape($object->element)."' AND src_object_id = ".((int) $object->id);	// Filter on object
992
+	$sql .= " AND src_object_type = '".$db->escape($object->element)."' AND src_object_id = ".((int) $object->id); // Filter on object
993 993
 	$sql .= " AND ".$db->regexpsql('filename', $regexforimg, 1);
994
-	$sql .= " AND share IS NOT NULL";	// Only image that are public
994
+	$sql .= " AND share IS NOT NULL"; // Only image that are public
995 995
 
996 996
 	$resql = $db->query($sql);
997 997
 	if ($resql) {
@@ -1026,7 +1026,7 @@  discard block
 block discarded – undo
1026 1026
 	$sql = "SELECT rowid, ref, share, filename, cover, position";
1027 1027
 	$sql .= " FROM ".MAIN_DB_PREFIX."ecm_files";
1028 1028
 	$sql .= " WHERE entity IN (".getEntity($object->element).")";
1029
-	$sql .= " AND src_object_type = '".$db->escape($object->element)."' AND src_object_id = ".((int) $object->id);	// Filter on object
1029
+	$sql .= " AND src_object_type = '".$db->escape($object->element)."' AND src_object_id = ".((int) $object->id); // Filter on object
1030 1030
 	$sql .= " AND ".$db->regexpsql('filename', $regexforimg, 1);
1031 1031
 	$sql .= $db->order("cover,position,rowid", "ASC,ASC,ASC");
1032 1032
 
Please login to merge, or discard this patch.
htdocs/core/db/DoliDB.class.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -122,10 +122,10 @@
 block discarded – undo
122 122
 	public function regexpsql($subject, $pattern, $sqlstring = 0)
123 123
 	{
124 124
 		if ($sqlstring) {
125
-			return "(". $subject ." REGEXP '" . $this->escape($pattern) . "')";
125
+			return "(".$subject." REGEXP '".$this->escape($pattern)."')";
126 126
 		}
127 127
 
128
-		return "('". $this->escape($subject) ."' REGEXP '" . $this->escape($pattern) . "')";
128
+		return "('".$this->escape($subject)."' REGEXP '".$this->escape($pattern)."')";
129 129
 	}
130 130
 
131 131
 
Please login to merge, or discard this patch.