Completed
Branch develop (582a6f)
by
unknown
19:18
created
htdocs/cron/card.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -550,7 +550,7 @@
 block discarded – undo
550 550
 		$langs->load($reg[1]);
551 551
 	}
552 552
 
553
-	$labeltoshow =  preg_replace('/:.*$/', '', $object->label);
553
+	$labeltoshow = preg_replace('/:.*$/', '', $object->label);
554 554
 
555 555
 	$morehtmlref = '<div class="refidno">';
556 556
 	$morehtmlref .= $langs->trans($labeltoshow);
Please login to merge, or discard this patch.
htdocs/accountancy/admin/defaultaccounts.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
 print '<tr class="oddeven value">';
279 279
 // Param
280 280
 print '<td>';
281
-print img_picto('', 'bill', 'class="pictofixedwidth"') . $langs->trans('ACCOUNTING_ACCOUNT_CUSTOMER_DEPOSIT');
281
+print img_picto('', 'bill', 'class="pictofixedwidth"').$langs->trans('ACCOUNTING_ACCOUNT_CUSTOMER_DEPOSIT');
282 282
 print '</td>';
283 283
 // Value
284 284
 print '<td class="right">'; // Do not force class=right, or it align also the content of the select box
@@ -288,13 +288,13 @@  discard block
 block discarded – undo
288 288
 
289 289
 if (isModEnabled('societe') && getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER_DEPOSIT') && getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER_DEPOSIT') != '-1') {
290 290
 	print '<tr class="oddeven">';
291
-	print '<td>' . img_picto('', 'bill', 'class="pictofixedwidth"') . $langs->trans("UseAuxiliaryAccountOnCustomerDeposit") . '</td>';
291
+	print '<td>'.img_picto('', 'bill', 'class="pictofixedwidth"').$langs->trans("UseAuxiliaryAccountOnCustomerDeposit").'</td>';
292 292
 	if (getDolGlobalInt('ACCOUNTING_ACCOUNT_CUSTOMER_USE_AUXILIARY_ON_DEPOSIT')) {
293
-		print '<td class="right"><a class="reposition" href="' . $_SERVER['PHP_SELF'] . '?token=' . newToken() . '&action=setACCOUNTING_ACCOUNT_CUSTOMER_USE_AUXILIARY_ON_DEPOSIT&value=0">';
293
+		print '<td class="right"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?token='.newToken().'&action=setACCOUNTING_ACCOUNT_CUSTOMER_USE_AUXILIARY_ON_DEPOSIT&value=0">';
294 294
 		print img_picto($langs->trans("Activated"), 'switch_on', '', false, 0, 0, '', 'warning');
295 295
 		print '</a></td>';
296 296
 	} else {
297
-		print '<td class="right"><a class="reposition" href="' . $_SERVER['PHP_SELF'] . '?token=' . newToken() . '&action=setACCOUNTING_ACCOUNT_CUSTOMER_USE_AUXILIARY_ON_DEPOSIT&value=1">';
297
+		print '<td class="right"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?token='.newToken().'&action=setACCOUNTING_ACCOUNT_CUSTOMER_USE_AUXILIARY_ON_DEPOSIT&value=1">';
298 298
 		print img_picto($langs->trans("Disabled"), 'switch_off');
299 299
 		print '</a></td>';
300 300
 	}
@@ -305,7 +305,7 @@  discard block
 block discarded – undo
305 305
 print '<tr class="oddeven value">';
306 306
 // Param
307 307
 print '<td>';
308
-print img_picto('', 'supplier_invoice', 'class="pictofixedwidth"') . $langs->trans('ACCOUNTING_ACCOUNT_SUPPLIER_DEPOSIT');
308
+print img_picto('', 'supplier_invoice', 'class="pictofixedwidth"').$langs->trans('ACCOUNTING_ACCOUNT_SUPPLIER_DEPOSIT');
309 309
 print '</td>';
310 310
 // Value
311 311
 print '<td class="right">'; // Do not force class=right, or it align also the content of the select box
@@ -315,13 +315,13 @@  discard block
 block discarded – undo
315 315
 
316 316
 if (isModEnabled('societe') && getDolGlobalString('ACCOUNTING_ACCOUNT_SUPPLIER_DEPOSIT') && getDolGlobalString('ACCOUNTING_ACCOUNT_SUPPLIER_DEPOSIT') != '-1') {
317 317
 	print '<tr class="oddeven">';
318
-	print '<td>' . img_picto('', 'supplier_invoice', 'class="pictofixedwidth"') . $langs->trans("UseAuxiliaryAccountOnSupplierDeposit") . '</td>';
318
+	print '<td>'.img_picto('', 'supplier_invoice', 'class="pictofixedwidth"').$langs->trans("UseAuxiliaryAccountOnSupplierDeposit").'</td>';
319 319
 	if (getDolGlobalInt('ACCOUNTING_ACCOUNT_SUPPLIER_USE_AUXILIARY_ON_DEPOSIT')) {
320
-		print '<td class="right"><a class="reposition" href="' . $_SERVER['PHP_SELF'] . '?token=' . newToken() . '&action=setACCOUNTING_ACCOUNT_SUPPLIER_USE_AUXILIARY_ON_DEPOSIT&value=0">';
320
+		print '<td class="right"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?token='.newToken().'&action=setACCOUNTING_ACCOUNT_SUPPLIER_USE_AUXILIARY_ON_DEPOSIT&value=0">';
321 321
 		print img_picto($langs->trans("Activated"), 'switch_on', '', false, 0, 0, '', 'warning');
322 322
 		print '</a></td>';
323 323
 	} else {
324
-		print '<td class="right"><a class="reposition" href="' . $_SERVER['PHP_SELF'] . '?token=' . newToken() . '&action=setACCOUNTING_ACCOUNT_SUPPLIER_USE_AUXILIARY_ON_DEPOSIT&value=1">';
324
+		print '<td class="right"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?token='.newToken().'&action=setACCOUNTING_ACCOUNT_SUPPLIER_USE_AUXILIARY_ON_DEPOSIT&value=1">';
325 325
 		print img_picto($langs->trans("Disabled"), 'switch_off');
326 326
 		print '</a></td>';
327 327
 	}
Please login to merge, or discard this patch.
htdocs/contrat/class/contrat.class.php 2 patches
Braces   +7 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2637,7 +2637,9 @@  discard block
 block discarded – undo
2637 2637
 		$sql.= ' WHERE cd.fk_contrat = c.rowid';
2638 2638
 		$sql.= " AND date_format(cd.date_fin_validite, '%Y-%m-%d') <= date_format('".$this->db->idate($enddatetoscan)."', '%Y-%m-%d')";
2639 2639
 		$sql.= " AND cd.statut = 4";
2640
-		if ($thirdparty_id > 0) $sql.=" AND c.fk_soc = ".((int) $thirdparty_id);
2640
+		if ($thirdparty_id > 0) {
2641
+			$sql.=" AND c.fk_soc = ".((int) $thirdparty_id);
2642
+		}
2641 2643
 		//print $sql;
2642 2644
 
2643 2645
 		$resql = $this->db->query($sql);
@@ -2682,7 +2684,10 @@  discard block
 block discarded – undo
2682 2684
 						//dol_sort_array($contract->linkedObjects['facture'], 'date');
2683 2685
 						$someinvoicenotpaid=0;
2684 2686
 						foreach ($object->linkedObjects['facture'] as $idinvoice => $invoice) {
2685
-							if ($invoice->statut == Facture::STATUS_DRAFT) continue;	// Draft invoice are not invoice not paid
2687
+							if ($invoice->statut == Facture::STATUS_DRAFT) {
2688
+								continue;
2689
+							}
2690
+							// Draft invoice are not invoice not paid
2686 2691
 
2687 2692
 							if (empty($invoice->paye)) {
2688 2693
 								$someinvoicenotpaid++;
Please login to merge, or discard this patch.
Spacing   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
 		if (!empty($conf->global->CONTRACT_ADDON)) {
296 296
 			$mybool = false;
297 297
 
298
-			$file = getDolGlobalString('CONTRACT_ADDON') . ".php";
298
+			$file = getDolGlobalString('CONTRACT_ADDON').".php";
299 299
 			$classname = $conf->global->CONTRACT_ADDON;
300 300
 
301 301
 			// Include file with class
@@ -404,7 +404,7 @@  discard block
 block discarded – undo
404 404
 			if ($contratline->statut != ContratLigne::STATUS_OPEN) {
405 405
 				$contratline->context = $this->context;
406 406
 
407
-				$result = $contratline->active_line($user, $date_start, !empty($date_end) ? $date_end : -1, $comment);	// This call trigger LINECONTRACT_ACTIVATE
407
+				$result = $contratline->active_line($user, $date_start, !empty($date_end) ? $date_end : -1, $comment); // This call trigger LINECONTRACT_ACTIVATE
408 408
 				if ($result < 0) {
409 409
 					$error++;
410 410
 					$this->error = $contratline->error;
@@ -454,7 +454,7 @@  discard block
 block discarded – undo
454 454
 			// Close lines not already closed
455 455
 			if ($contratline->statut != ContratLigne::STATUS_CLOSED) {
456 456
 				$contratline->date_end_real = $now;
457
-				$contratline->date_cloture = $now;	// For backward compatibility
457
+				$contratline->date_cloture = $now; // For backward compatibility
458 458
 				$contratline->user_closing_id = $user->id;
459 459
 				$contratline->statut = ContratLigne::STATUS_CLOSED;
460 460
 				$result = $contratline->close_line($user, $now, $comment, $notrigger);
@@ -585,7 +585,7 @@  discard block
 block discarded – undo
585 585
 			if (!$error) {
586 586
 				$this->ref = $num;
587 587
 				$this->status = self::STATUS_VALIDATED;
588
-				$this->statut = self::STATUS_VALIDATED;	// deprecated
588
+				$this->statut = self::STATUS_VALIDATED; // deprecated
589 589
 				$this->date_validation = $now;
590 590
 			}
591 591
 		} else {
@@ -855,10 +855,10 @@  discard block
 block discarded – undo
855 855
 				$line->localtax2_tx		= $objp->localtax2_tx;
856 856
 				$line->localtax1_type	= $objp->localtax1_type;
857 857
 				$line->localtax2_type	= $objp->localtax2_type;
858
-				$line->subprice			= $objp->subprice;
858
+				$line->subprice = $objp->subprice;
859 859
 				$line->statut = $objp->status;
860 860
 				$line->status = $objp->status;
861
-				$line->remise_percent	= $objp->remise_percent;
861
+				$line->remise_percent = $objp->remise_percent;
862 862
 				$line->price_ht			= $objp->price_ht;
863 863
 				$line->price = $objp->price_ht; // For backward compatibility
864 864
 				$line->total_ht			= $objp->total_ht;
@@ -901,7 +901,7 @@  discard block
 block discarded – undo
901 901
 				//$line->date_fin_prevue   = $this->db->jdate($objp->date_fin_validite);
902 902
 				//$line->date_fin_reel     = $this->db->jdate($objp->date_cloture);
903 903
 
904
-				$line->rang     = $objp->rang;
904
+				$line->rang = $objp->rang;
905 905
 
906 906
 				// Retrieve all extrafields for contract line
907 907
 				// fetch optionals attributes and labels
@@ -1412,7 +1412,7 @@  discard block
 block discarded – undo
1412 1412
 		}
1413 1413
 
1414 1414
 		if (!$error) {
1415
-			$result = $this->insertExtraFields();	// This delete and reinsert extrafields
1415
+			$result = $this->insertExtraFields(); // This delete and reinsert extrafields
1416 1416
 			if ($result < 0) {
1417 1417
 				$error++;
1418 1418
 			}
@@ -2048,7 +2048,7 @@  discard block
 block discarded – undo
2048 2048
 				}
2049 2049
 				$datas['customer'] = '<br><b>'.$langs->trans('Customer').':</b> '.$this->thirdparty->getNomUrl(1, '', 0, 1);
2050 2050
 			}
2051
-			$datas['refcustomer'] = '<br><b>'.$langs->trans('RefCustomer').':</b> '. $this->ref_customer;
2051
+			$datas['refcustomer'] = '<br><b>'.$langs->trans('RefCustomer').':</b> '.$this->ref_customer;
2052 2052
 			if (!$nofetch) {
2053 2053
 				$langs->load('project');
2054 2054
 				if (empty($this->project)) {
@@ -2121,7 +2121,7 @@  discard block
 block discarded – undo
2121 2121
 				$label = $langs->trans("ShowContract");
2122 2122
 				$linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"';
2123 2123
 			}
2124
-			$linkclose .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' :  ' title="tocomplete"');
2124
+			$linkclose .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' : ' title="tocomplete"');
2125 2125
 			$linkclose .= $dataparams.' class="'.$classfortooltip.'"';
2126 2126
 		}
2127 2127
 		$linkstart = '<a href="'.$url.'"';
@@ -2517,7 +2517,7 @@  discard block
 block discarded – undo
2517 2517
 		global $user;
2518 2518
 
2519 2519
 		$ticket = new Ticket($this->db);
2520
-		$nbTicket =  $ticket->fetchAll($user,  'ASC', 't.datec',  '', 0, '', array('t.fk_contract' => $this->id));
2520
+		$nbTicket = $ticket->fetchAll($user, 'ASC', 't.datec', '', 0, '', array('t.fk_contract' => $this->id));
2521 2521
 
2522 2522
 		return ($nbTicket < 0 ? $nbTicket : $ticket->lines);
2523 2523
 	}
@@ -2539,7 +2539,7 @@  discard block
 block discarded – undo
2539 2539
 		global $conf, $langs;
2540 2540
 
2541 2541
 		if (!dol_strlen($modele)) {
2542
-			$modele = '';	// No doc template/generation by default
2542
+			$modele = ''; // No doc template/generation by default
2543 2543
 
2544 2544
 			if (!empty($this->model_pdf)) {
2545 2545
 				$modele = $this->model_pdf;
@@ -2636,14 +2636,14 @@  discard block
 block discarded – undo
2636 2636
 			}
2637 2637
 		}
2638 2638
 
2639
-		if (empty($conf->global->CONTRACT_ADDON) || !is_readable(DOL_DOCUMENT_ROOT."/core/modules/contract/" . getDolGlobalString('CONTRACT_ADDON').".php")) {
2639
+		if (empty($conf->global->CONTRACT_ADDON) || !is_readable(DOL_DOCUMENT_ROOT."/core/modules/contract/".getDolGlobalString('CONTRACT_ADDON').".php")) {
2640 2640
 			$this->error = 'ErrorSetupNotComplete';
2641 2641
 			dol_syslog($this->error);
2642 2642
 			return -1;
2643 2643
 		}
2644 2644
 
2645 2645
 		// Set ref
2646
-		require_once DOL_DOCUMENT_ROOT."/core/modules/contract/" . getDolGlobalString('CONTRACT_ADDON').'.php';
2646
+		require_once DOL_DOCUMENT_ROOT."/core/modules/contract/".getDolGlobalString('CONTRACT_ADDON').'.php';
2647 2647
 		$obj = $conf->global->CONTRACT_ADDON;
2648 2648
 		$modContract = new $obj();
2649 2649
 		$clonedObj->ref = $modContract->getNextValue($objsoc, $clonedObj);
@@ -2730,7 +2730,7 @@  discard block
 block discarded – undo
2730 2730
 
2731 2731
 		$error = 0;
2732 2732
 		$this->output = '';
2733
-		$this->error='';
2733
+		$this->error = '';
2734 2734
 
2735 2735
 		$contractlineprocessed = array();
2736 2736
 		$contractignored = array();
@@ -2739,12 +2739,12 @@  discard block
 block discarded – undo
2739 2739
 		dol_syslog(__METHOD__, LOG_DEBUG);
2740 2740
 
2741 2741
 		$sql = 'SELECT c.rowid, c.ref_customer, cd.rowid as lid, cd.date_fin_validite, p.duration';
2742
-		$sql.= ' FROM '.MAIN_DB_PREFIX.'contrat as c, '.MAIN_DB_PREFIX.'contratdet as cd';
2743
-		$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON p.rowid = cd.fk_product';
2744
-		$sql.= ' WHERE cd.fk_contrat = c.rowid';
2745
-		$sql.= " AND date_format(cd.date_fin_validite, '%Y-%m-%d') <= date_format('".$this->db->idate($enddatetoscan)."', '%Y-%m-%d')";
2746
-		$sql.= " AND cd.statut = 4";
2747
-		if ($thirdparty_id > 0) $sql.=" AND c.fk_soc = ".((int) $thirdparty_id);
2742
+		$sql .= ' FROM '.MAIN_DB_PREFIX.'contrat as c, '.MAIN_DB_PREFIX.'contratdet as cd';
2743
+		$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON p.rowid = cd.fk_product';
2744
+		$sql .= ' WHERE cd.fk_contrat = c.rowid';
2745
+		$sql .= " AND date_format(cd.date_fin_validite, '%Y-%m-%d') <= date_format('".$this->db->idate($enddatetoscan)."', '%Y-%m-%d')";
2746
+		$sql .= " AND cd.statut = 4";
2747
+		if ($thirdparty_id > 0) $sql .= " AND c.fk_soc = ".((int) $thirdparty_id);
2748 2748
 		//print $sql;
2749 2749
 
2750 2750
 		$resql = $this->db->query($sql);
@@ -2753,7 +2753,7 @@  discard block
 block discarded – undo
2753 2753
 
2754 2754
 			include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
2755 2755
 
2756
-			$i=0;
2756
+			$i = 0;
2757 2757
 			while ($i < $num) {
2758 2758
 				$obj = $this->db->fetch_object($resql);
2759 2759
 				if ($obj) {
@@ -2763,7 +2763,7 @@  discard block
 block discarded – undo
2763 2763
 
2764 2764
 					// Load contract
2765 2765
 					$object = new Contrat($this->db);
2766
-					$object->fetch($obj->rowid);		// fetch also lines
2766
+					$object->fetch($obj->rowid); // fetch also lines
2767 2767
 					$object->fetch_thirdparty();
2768 2768
 
2769 2769
 					if ($object->id <= 0) {
@@ -2787,9 +2787,9 @@  discard block
 block discarded – undo
2787 2787
 						usort($object->linkedObjects['facture'], "cmp");
2788 2788
 
2789 2789
 						//dol_sort_array($contract->linkedObjects['facture'], 'date');
2790
-						$someinvoicenotpaid=0;
2790
+						$someinvoicenotpaid = 0;
2791 2791
 						foreach ($object->linkedObjects['facture'] as $idinvoice => $invoice) {
2792
-							if ($invoice->statut == Facture::STATUS_DRAFT) continue;	// Draft invoice are not invoice not paid
2792
+							if ($invoice->statut == Facture::STATUS_DRAFT) continue; // Draft invoice are not invoice not paid
2793 2793
 
2794 2794
 							if (empty($invoice->paye)) {
2795 2795
 								$someinvoicenotpaid++;
@@ -2797,7 +2797,7 @@  discard block
 block discarded – undo
2797 2797
 						}
2798 2798
 						if ($someinvoicenotpaid) {
2799 2799
 							$this->output .= 'Contract '.$object->ref.' is qualified for renewal but there is '.$someinvoicenotpaid.' invoice(s) unpayed so we cancel renewal'."\n";
2800
-							$contractignored[$object->id]=$object->ref;
2800
+							$contractignored[$object->id] = $object->ref;
2801 2801
 							continue;
2802 2802
 						}
2803 2803
 					}
@@ -2805,7 +2805,7 @@  discard block
 block discarded – undo
2805 2805
 					if ($expirationdate && $expirationdate < $enddatetoscan) {
2806 2806
 						dol_syslog("Define the newdate of end of services from expirationdate=".$expirationdate);
2807 2807
 						$newdate = $expirationdate;
2808
-						$protecti=0;	//$protecti is to avoid infinite loop
2808
+						$protecti = 0; //$protecti is to avoid infinite loop
2809 2809
 						while ($newdate < $enddatetoscan && $protecti < 1000) {
2810 2810
 							$newdate = dol_time_plus_duree($newdate, $duration_value, $duration_unit);
2811 2811
 							$protecti++;
@@ -2823,39 +2823,39 @@  discard block
 block discarded – undo
2823 2823
 							$comment = 'Renew date of contract '.$object->ref.' line '.$obj->lid.' by doAutoRenewContracts';
2824 2824
 
2825 2825
 							$sqlupdate = 'UPDATE '.MAIN_DB_PREFIX."contratdet SET date_fin_validite = '".$this->db->idate($newdate)."'";
2826
-							$sqlupdate.= ' WHERE rowid = '.((int) $obj->lid);
2826
+							$sqlupdate .= ' WHERE rowid = '.((int) $obj->lid);
2827 2827
 							$resqlupdate = $this->db->query($sqlupdate);
2828 2828
 							if ($resqlupdate) {
2829
-								$contractlineprocessed[$obj->lid]=$object->ref;
2829
+								$contractlineprocessed[$obj->lid] = $object->ref;
2830 2830
 
2831 2831
 								$actioncode = 'RENEW_CONTRACT';
2832 2832
 								$now = dol_now();
2833 2833
 
2834 2834
 								// Create an event
2835 2835
 								$actioncomm = new ActionComm($this->db);
2836
-								$actioncomm->type_code    = 'AC_OTH_AUTO';		// Type of event ('AC_OTH', 'AC_OTH_AUTO', 'AC_XXX'...)
2836
+								$actioncomm->type_code    = 'AC_OTH_AUTO'; // Type of event ('AC_OTH', 'AC_OTH_AUTO', 'AC_XXX'...)
2837 2837
 								$actioncomm->code         = 'AC_'.$actioncode;
2838 2838
 								$actioncomm->label        = $label;
2839 2839
 								$actioncomm->datep        = $now;
2840 2840
 								$actioncomm->datef        = $now;
2841
-								$actioncomm->percentage   = -1;   // Not applicable
2841
+								$actioncomm->percentage   = -1; // Not applicable
2842 2842
 								$actioncomm->socid        = $object->thirdparty->id;
2843
-								$actioncomm->authorid     = $user->id;   // User saving action
2844
-								$actioncomm->userownerid  = $user->id;	// Owner of action
2843
+								$actioncomm->authorid     = $user->id; // User saving action
2844
+								$actioncomm->userownerid  = $user->id; // Owner of action
2845 2845
 								$actioncomm->fk_element   = $object->id;
2846 2846
 								$actioncomm->elementtype  = 'contract';
2847 2847
 								$actioncomm->note_private = $comment;
2848 2848
 
2849
-								$ret = $actioncomm->create($user);       // User creating action
2849
+								$ret = $actioncomm->create($user); // User creating action
2850 2850
 							} else {
2851
-								$contracterror[$object->id]=$object->ref;
2851
+								$contracterror[$object->id] = $object->ref;
2852 2852
 
2853 2853
 								$error++;
2854 2854
 								$errorforlocaltransaction++;
2855 2855
 								$this->error = $this->db->lasterror();
2856 2856
 							}
2857 2857
 
2858
-							if (! $errorforlocaltransaction) {
2858
+							if (!$errorforlocaltransaction) {
2859 2859
 								$this->db->commit();
2860 2860
 							} else {
2861 2861
 								$this->db->rollback();
@@ -2874,9 +2874,9 @@  discard block
 block discarded – undo
2874 2874
 			$this->error = $this->db->lasterror();
2875 2875
 		}
2876 2876
 
2877
-		$this->output .= count($contractlineprocessed).' contract line(s) with end date before '.dol_print_date($enddatetoscan, 'day').' were renewed'.(count($contractlineprocessed)>0 ? ' : '.join(',', $contractlineprocessed) : '');
2877
+		$this->output .= count($contractlineprocessed).' contract line(s) with end date before '.dol_print_date($enddatetoscan, 'day').' were renewed'.(count($contractlineprocessed) > 0 ? ' : '.join(',', $contractlineprocessed) : '');
2878 2878
 
2879
-		return ($error ? 1: 0);
2879
+		return ($error ? 1 : 0);
2880 2880
 	}
2881 2881
 
2882 2882
 	/**
@@ -3212,7 +3212,7 @@  discard block
 block discarded – undo
3212 3212
 		}
3213 3213
 
3214 3214
 		$link = '<a href="'.DOL_URL_ROOT.'/contrat/card.php?id='.$this->fk_contrat.'"';
3215
-		$link .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' :  ' title="tocomplete"');
3215
+		$link .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' : ' title="tocomplete"');
3216 3216
 		$link .= $dataparams.' class="'.$classfortooltip.'">';
3217 3217
 		$linkend = '</a>';
3218 3218
 
Please login to merge, or discard this patch.
htdocs/takepos/pay.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 $disablejs = 0;
70 70
 $disablehead = 0;
71 71
 
72
-$head='<link rel="stylesheet" href="css/pos.css.php">';
72
+$head = '<link rel="stylesheet" href="css/pos.css.php">';
73 73
 if (getDolGlobalInt('TAKEPOS_COLOR_THEME') == 1) {
74 74
 	$head .= '<link rel="stylesheet" href="css/colorful.css">';
75 75
 }
@@ -677,7 +677,7 @@  discard block
 block discarded – undo
677 677
 
678 678
 <?php
679 679
 // Add code from hooks
680
-$parameters=array();
680
+$parameters = array();
681 681
 $hookmanager->executeHooks('completePayment', $parameters, $invoice);
682 682
 print $hookmanager->resPrint;
683 683
 ?>
Please login to merge, or discard this patch.
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -231,7 +231,9 @@  discard block
 block discarded – undo
231 231
 			$arrayOfValidPaymentModes[] = $obj;
232 232
 		}
233 233
 		if (!isModEnabled('banque')) {
234
-			if ($paycode == 'CASH' || $paycode == 'CB') $arrayOfValidPaymentModes[] = $obj;
234
+			if ($paycode == 'CASH' || $paycode == 'CB') {
235
+				$arrayOfValidPaymentModes[] = $obj;
236
+			}
235 237
 		}
236 238
 	}
237 239
 }
@@ -338,7 +340,9 @@  discard block
 block discarded – undo
338 340
 	  const bodyContent = JSON.stringify({ amount : amount, invoiceid : invoiceid });
339 341
   <?php
340 342
 	$urlpaymentintent = DOL_URL_ROOT.'/stripe/ajax/ajax.php?action=createPaymentIntent&token='.newToken().'&servicestatus='.$servicestatus;
341
-	if (!empty($stripeacc)) $urlpaymentintent .= '&stripeacc='.$stripeacc;
343
+	if (!empty($stripeacc)) {
344
+		$urlpaymentintent .= '&stripeacc='.$stripeacc;
345
+	}
342 346
 	?>
343 347
   return fetch('<?php echo $urlpaymentintent; ?>', {
344 348
 	method: "POST",
@@ -668,7 +672,9 @@  discard block
 block discarded – undo
668 672
 
669 673
 $parameters = array();
670 674
 $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $invoice, $action); // Note that $action and $object may have been modified by hook
671
-if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
675
+if ($reshook < 0) {
676
+	setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
677
+}
672 678
 
673 679
 $class = ($i == 3) ? "calcbutton3" : "calcbutton2";
674 680
 foreach ($action_buttons as $button) {
Please login to merge, or discard this patch.
htdocs/admin/ldap.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -161,21 +161,21 @@
 block discarded – undo
161 161
 if (isModEnabled('societe')) {
162 162
 	print '<tr class="oddeven"><td>'.$langs->trans("LDAPDnContactActive").'</td><td>';
163 163
 	print $formldap->selectLdapDnSynchroActive(getDolGlobalInt('LDAP_CONTACT_ACTIVE'), 'activecontact', array(Ldap::SYNCHRO_LDAP_TO_DOLIBARR));
164
-	print '</td><td><span class="opacitymedium">' . $langs->trans("LDAPDnContactActiveExample") . '</span></td></tr>';
164
+	print '</td><td><span class="opacitymedium">'.$langs->trans("LDAPDnContactActiveExample").'</span></td></tr>';
165 165
 }
166 166
 
167 167
 // Synchro member active
168 168
 if (isModEnabled('adherent')) {
169
-	print '<tr class="oddeven"><td>' . $langs->trans("LDAPDnMemberActive") . '</td><td>';
169
+	print '<tr class="oddeven"><td>'.$langs->trans("LDAPDnMemberActive").'</td><td>';
170 170
 	print $formldap->selectLdapDnSynchroActive(getDolGlobalInt('LDAP_MEMBER_ACTIVE'), 'activemembers', array(), 2);
171
-	print '</td><td><span class="opacitymedium">' . $langs->trans("LDAPDnMemberActiveExample") . '</span></td></tr>';
171
+	print '</td><td><span class="opacitymedium">'.$langs->trans("LDAPDnMemberActiveExample").'</span></td></tr>';
172 172
 }
173 173
 
174 174
 // Synchro member type active
175 175
 if (isModEnabled('adherent')) {
176
-	print '<tr class="oddeven"><td>' . $langs->trans("LDAPDnMemberTypeActive") . '</td><td>';
176
+	print '<tr class="oddeven"><td>'.$langs->trans("LDAPDnMemberTypeActive").'</td><td>';
177 177
 	print $formldap->selectLdapDnSynchroActive(getDolGlobalInt('LDAP_MEMBER_TYPE_ACTIVE'), 'activememberstypes', array(), 2);
178
-	print '</td><td><span class="opacitymedium">' . $langs->trans("LDAPDnMemberTypeActiveExample") . '</span></td></tr>';
178
+	print '</td><td><span class="opacitymedium">'.$langs->trans("LDAPDnMemberTypeActiveExample").'</span></td></tr>';
179 179
 }
180 180
 
181 181
 // Fields from hook
Please login to merge, or discard this patch.
htdocs/admin/loan.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -100,14 +100,14 @@
 block discarded – undo
100 100
 
101 101
 	// Param
102 102
 	$label = $langs->trans($key);
103
-	print '<td><label for="' . $key . '">' . $label . '</label></td>';
103
+	print '<td><label for="'.$key.'">'.$label.'</label></td>';
104 104
 
105 105
 	// Value
106 106
 	print '<td>';
107 107
 	if (isModEnabled('accounting')) {
108 108
 		print $formaccounting->select_account(getDolGlobalString($key), $key, 1, '', 1, 1);
109 109
 	} else {
110
-		print '<input type="text" size="20" id="' . $key . '" name="' . $key . '" value="' . getDolGlobalString($key) . '">';
110
+		print '<input type="text" size="20" id="'.$key.'" name="'.$key.'" value="'.getDolGlobalString($key).'">';
111 111
 	}
112 112
 	print '</td></tr>';
113 113
 }
Please login to merge, or discard this patch.
htdocs/eventorganization/conferenceorbooth_contact.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 	accessforbidden();
74 74
 }
75 75
 
76
-$isdraft = (($object->status== $object::STATUS_DRAFT) ? 1 : 0);
76
+$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
77 77
 $result = restrictedArea($user, 'eventorganization', $object->id, '', '', 'fk_soc', 'rowid', $isdraft);
78 78
 
79 79
 $permissiontoread = $user->rights->eventorganization->read;
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 if ($user->socid > 0) {
88 88
 	accessforbidden();
89 89
 }
90
-$isdraft = (($object->status== $object::STATUS_DRAFT) ? 1 : 0);
90
+$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
91 91
 $result = restrictedArea($user, 'eventorganization', $object->id, '', '', 'fk_soc', 'rowid', $isdraft);
92 92
 
93 93
 if (!$permissiontoread) {
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 	$result = $object->add_contact($contactid, $typeid, GETPOST("source", 'aZ09'));
112 112
 
113 113
 	if ($result >= 0) {
114
-		header("Location: ".$_SERVER['PHP_SELF']."?id=".((int) $object->id).(!empty($withproject)?'&withproject=1':''));
114
+		header("Location: ".$_SERVER['PHP_SELF']."?id=".((int) $object->id).(!empty($withproject) ? '&withproject=1' : ''));
115 115
 		exit;
116 116
 	} else {
117 117
 		if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') {
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
 	$result = $object->delete_contact($lineid);
130 130
 
131 131
 	if ($result >= 0) {
132
-		header("Location: ".$_SERVER['PHP_SELF']."?id=".((int) $object->id).(!empty($withproject)?'&withproject=1':''));
132
+		header("Location: ".$_SERVER['PHP_SELF']."?id=".((int) $object->id).(!empty($withproject) ? '&withproject=1' : ''));
133 133
 		exit;
134 134
 	} else {
135 135
 		dol_print_error($db);
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 if (!empty($projectstatic->socid)) {
166 166
 	$projectstatic->fetch_thirdparty();
167 167
 }
168
-$withProjectUrl='';
168
+$withProjectUrl = '';
169 169
 $object->project = clone $projectstatic;
170 170
 
171 171
 if (!empty($withproject)) {
Please login to merge, or discard this patch.
htdocs/asset/depreciation.php 2 patches
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -53,11 +53,17 @@
 block discarded – undo
53 53
 }
54 54
 
55 55
 // Security check (enable the most restrictive one)
56
-if ($user->socid > 0) accessforbidden();
56
+if ($user->socid > 0) {
57
+	accessforbidden();
58
+}
57 59
 $isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
58 60
 restrictedArea($user, $object->element, $object->id, $object->table_element, '', 'fk_soc', 'rowid', $isdraft);
59
-if (!isModEnabled('asset')) accessforbidden();
60
-if (!empty($object->not_depreciated)) accessforbidden();
61
+if (!isModEnabled('asset')) {
62
+	accessforbidden();
63
+}
64
+if (!empty($object->not_depreciated)) {
65
+	accessforbidden();
66
+}
61 67
 
62 68
 $object->asset_depreciation_options = &$assetdepreciationoptions;
63 69
 $result = $assetdepreciationoptions->fetchDeprecationOptions($object->id);
Please login to merge, or discard this patch.
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -24,9 +24,9 @@  discard block
 block discarded – undo
24 24
 
25 25
 // Load Dolibarr environment
26 26
 require '../main.inc.php';
27
-require_once DOL_DOCUMENT_ROOT . '/core/lib/asset.lib.php';
28
-require_once DOL_DOCUMENT_ROOT . '/asset/class/asset.class.php';
29
-require_once DOL_DOCUMENT_ROOT . '/asset/class/assetdepreciationoptions.class.php';
27
+require_once DOL_DOCUMENT_ROOT.'/core/lib/asset.lib.php';
28
+require_once DOL_DOCUMENT_ROOT.'/asset/class/asset.class.php';
29
+require_once DOL_DOCUMENT_ROOT.'/asset/class/assetdepreciationoptions.class.php';
30 30
 
31 31
 // Load translation files required by the page
32 32
 $langs->loadLangs(array("assets", "companies"));
@@ -48,9 +48,9 @@  discard block
 block discarded – undo
48 48
 $extrafields->fetch_name_optionals_label($object->table_element);
49 49
 
50 50
 // Load object
51
-include DOL_DOCUMENT_ROOT . '/core/actions_fetchobject.inc.php'; // Must be include, not include_once  // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals
51
+include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once  // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals
52 52
 if ($id > 0 || !empty($ref)) {
53
-	$upload_dir = $conf->asset->multidir_output[$object->entity] . "/" . $object->id;
53
+	$upload_dir = $conf->asset->multidir_output[$object->entity]."/".$object->id;
54 54
 }
55 55
 
56 56
 // Security check (enable the most restrictive one)
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 
99 99
 	// Object card
100 100
 	// ------------------------------------------------------------
101
-	$linkback = '<a href="' . DOL_URL_ROOT . '/asset/list.php?restore_lastsearch_values=1' . (!empty($socid) ? '&socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
101
+	$linkback = '<a href="'.DOL_URL_ROOT.'/asset/list.php?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>';
102 102
 
103 103
 	$morehtmlref = '<div class="refidno">';
104 104
 	$morehtmlref .= '</div>';
@@ -134,9 +134,9 @@  discard block
 block discarded – undo
134 134
 				print '<div class="fichecenter">';
135 135
 				print '<div class="fichehalfleft">';
136 136
 				print '<div class="underbanner clearboth"></div>';
137
-				print '<table class="border centpercent tableforfield">' . "\n";
138
-				print '<tr><td class="titlefield">' . $langs->trans('AssetBaseDepreciationHT') . '</td><td>' . price($depreciation_info['base_depreciation_ht']) . '</td></tr>';
139
-				print '<tr><td class="titlefield">' . $langs->trans('AssetDepreciationBeginDate') . '</td><td>' . dol_print_date($object->date_start > $object->date_acquisition ? $object->date_start : $object->date_acquisition, 'day') . '</td></tr>';
137
+				print '<table class="border centpercent tableforfield">'."\n";
138
+				print '<tr><td class="titlefield">'.$langs->trans('AssetBaseDepreciationHT').'</td><td>'.price($depreciation_info['base_depreciation_ht']).'</td></tr>';
139
+				print '<tr><td class="titlefield">'.$langs->trans('AssetDepreciationBeginDate').'</td><td>'.dol_print_date($object->date_start > $object->date_acquisition ? $object->date_start : $object->date_acquisition, 'day').'</td></tr>';
140 140
 				print '</table>';
141 141
 
142 142
 				// We close div and reopen for second column
@@ -145,8 +145,8 @@  discard block
 block discarded – undo
145 145
 
146 146
 				print '<div class="underbanner clearboth"></div>';
147 147
 				print '<table class="border centpercent tableforfield">';
148
-				print '<tr><td class="titlefield">' . $langs->trans('AssetDepreciationDuration') . '</td><td>' . $depreciation_info['duration'] . ' ( ' . $depreciation_info['duration_type'] . ' )</td></tr>';
149
-				print '<tr><td class="titlefield">' . $langs->trans('AssetDepreciationRate') . '</td><td>' . $depreciation_info['rate'] . '</td></tr>';
148
+				print '<tr><td class="titlefield">'.$langs->trans('AssetDepreciationDuration').'</td><td>'.$depreciation_info['duration'].' ( '.$depreciation_info['duration_type'].' )</td></tr>';
149
+				print '<tr><td class="titlefield">'.$langs->trans('AssetDepreciationRate').'</td><td>'.$depreciation_info['rate'].'</td></tr>';
150 150
 				print '</table>';
151 151
 				print '</div>';
152 152
 				print '</div>';
@@ -160,21 +160,21 @@  discard block
 block discarded – undo
160 160
 
161 161
 				print '<tr class="liste_titre">';
162 162
 				print '<td class="width20"></td>';
163
-				print '<td>' . $langs->trans("Ref") . '</td>';
164
-				print '<td class="center">' . $langs->trans("AssetDepreciationDate") . '</td>';
165
-				print '<td class="right">' . $langs->trans("AssetDepreciationHT") . '</td>';
166
-				print '<td class="right">' . $langs->trans("AssetCumulativeDepreciationHT") . '</td>';
167
-				print '<td class="right">' . $langs->trans("AssetResidualHT") . '</td>';
163
+				print '<td>'.$langs->trans("Ref").'</td>';
164
+				print '<td class="center">'.$langs->trans("AssetDepreciationDate").'</td>';
165
+				print '<td class="right">'.$langs->trans("AssetDepreciationHT").'</td>';
166
+				print '<td class="right">'.$langs->trans("AssetCumulativeDepreciationHT").'</td>';
167
+				print '<td class="right">'.$langs->trans("AssetResidualHT").'</td>';
168 168
 				print '</tr>';
169 169
 
170 170
 				if (empty($lines)) {
171
-					print '<tr><td class="impair center" colspan="6"><span class="opacitymedium">' . $langs->trans("None") . '</span></td></tr>';
171
+					print '<tr><td class="impair center" colspan="6"><span class="opacitymedium">'.$langs->trans("None").'</span></td></tr>';
172 172
 				} else {
173 173
 					foreach ($lines as $line) {
174 174
 						print '<tr class="oddeven">';
175
-						print '<td>' . ($line['bookkeeping'] ? $bookkeeping_icon : ($line['depreciation_date'] > $now ? $future_icon : '')) . '</td>';
176
-						print '<td >' . (empty($line['ref']) ? $langs->trans('AssetDepreciationReversal') : $line['ref']) . '</td>';
177
-						print '<td class="center">' . dol_print_date($line['depreciation_date'], 'day') . '</td>';
175
+						print '<td>'.($line['bookkeeping'] ? $bookkeeping_icon : ($line['depreciation_date'] > $now ? $future_icon : '')).'</td>';
176
+						print '<td >'.(empty($line['ref']) ? $langs->trans('AssetDepreciationReversal') : $line['ref']).'</td>';
177
+						print '<td class="center">'.dol_print_date($line['depreciation_date'], 'day').'</td>';
178 178
 						print '<td class="right">';
179 179
 						print price($line['depreciation_ht']);
180 180
 						print '</td>';
Please login to merge, or discard this patch.
htdocs/asset/card.php 2 patches
Braces   +12 added lines, -4 removed lines patch added patch discarded remove patch
@@ -76,12 +76,20 @@
 block discarded – undo
76 76
 $upload_dir = $conf->asset->multidir_output[isset($object->entity) ? $object->entity : 1];
77 77
 
78 78
 // Security check (enable the most restrictive one)
79
-if ($user->socid > 0) accessforbidden();
80
-if ($user->socid > 0) $socid = $user->socid;
79
+if ($user->socid > 0) {
80
+	accessforbidden();
81
+}
82
+if ($user->socid > 0) {
83
+	$socid = $user->socid;
84
+}
81 85
 $isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
82 86
 restrictedArea($user, $object->element, $object->id, $object->table_element, '', 'fk_soc', 'rowid', $isdraft);
83
-if (!isModEnabled('asset')) accessforbidden();
84
-if (!$permissiontoread) accessforbidden();
87
+if (!isModEnabled('asset')) {
88
+	accessforbidden();
89
+}
90
+if (!$permissiontoread) {
91
+	accessforbidden();
92
+}
85 93
 
86 94
 
87 95
 /*
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
 	}
182 182
 	if (GETPOSTISSET('supplier_invoice_id')) {
183 183
 		$object->fields['supplier_invoice_id'] = array('type' => 'integer:FactureFournisseur:fourn/class/fournisseur.facture.class.php:1:entity IN (__SHARED_ENTITIES__)', 'label' => 'SupplierInvoice', 'enabled' => '1', 'noteditable' => '1', 'position' => 280, 'notnull' => 0, 'visible' => 1, 'index' => 1, 'validate' => '1',);
184
-		print '<input type="hidden" name="supplier_invoice_id" value="' . GETPOST('supplier_invoice_id', 'int') . '">';
184
+		print '<input type="hidden" name="supplier_invoice_id" value="'.GETPOST('supplier_invoice_id', 'int').'">';
185 185
 	}
186 186
 
187 187
 	print dol_get_fiche_head(array(), '');
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
 			array('type' => 'checkbox', 'name' => 'disposal_depreciated', 'label' => $langs->trans("AssetDisposalDepreciated"), 'value' => $disposal_depreciated),
285 285
 			array('type' => 'checkbox', 'name' => 'disposal_subject_to_vat', 'label' => $langs->trans("AssetDisposalSubjectToVat"), 'value' => $disposal_subject_to_vat),
286 286
 		);
287
-		$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('AssetDisposal'), $langs->trans('AssetConfirmDisposalAsk', $object->ref . ' - ' . $object->label), 'confirm_disposal', $formquestion, 'yes', 1);
287
+		$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('AssetDisposal'), $langs->trans('AssetConfirmDisposalAsk', $object->ref.' - '.$object->label), 'confirm_disposal', $formquestion, 'yes', 1);
288 288
 	} elseif ($action == 'reopen') {
289 289
 		// Re-open
290 290
 		// Create an array for form
@@ -328,7 +328,7 @@  discard block
 block discarded – undo
328 328
 	print '<table class="border centpercent tableforfield">'."\n";
329 329
 
330 330
 	// Common attributes
331
-	$keyforbreak='date_acquisition';	// We change column just before this field
331
+	$keyforbreak = 'date_acquisition'; // We change column just before this field
332 332
 	//unset($object->fields['fk_project']);				// Hide field already shown in banner
333 333
 	//unset($object->fields['fk_soc']);					// Hide field already shown in banner
334 334
 	include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_view.tpl.php';
@@ -346,7 +346,7 @@  discard block
 block discarded – undo
346 346
 
347 347
 	// Buttons for actions
348 348
 	if ($action != 'presend' && $action != 'editline') {
349
-		print '<div class="tabsAction">' . "\n";
349
+		print '<div class="tabsAction">'."\n";
350 350
 		$parameters = array();
351 351
 		$reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
352 352
 		if ($reshook < 0) {
@@ -356,26 +356,26 @@  discard block
 block discarded – undo
356 356
 		if (empty($reshook)) {
357 357
 			// Send
358 358
 			if (empty($user->socid)) {
359
-				print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=presend&mode=init&token=' . newToken() . '#formmailbeforetitle');
359
+				print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=presend&mode=init&token='.newToken().'#formmailbeforetitle');
360 360
 			}
361 361
 
362 362
 			if ($object->status == $object::STATUS_DRAFT) {
363
-				print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=edit&token=' . newToken(), '', $permissiontoadd);
363
+				print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit&token='.newToken(), '', $permissiontoadd);
364 364
 			}
365 365
 
366 366
 			// Clone
367 367
 			//print dolGetButtonAction($langs->trans('ToClone'), '', 'default', $_SERVER['PHP_SELF'] . '?id=' . $object->id . '&action=clone&token=' . newToken(), '', false && $permissiontoadd);
368 368
 
369 369
 			if ($object->status == $object::STATUS_DRAFT) {
370
-				print dolGetButtonAction($langs->trans('AssetDisposal'), '', 'default', $_SERVER['PHP_SELF'] . '?id=' . $object->id . '&action=disposal&token=' . newToken(), '', $permissiontoadd);
370
+				print dolGetButtonAction($langs->trans('AssetDisposal'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=disposal&token='.newToken(), '', $permissiontoadd);
371 371
 			} else {
372
-				print dolGetButtonAction($langs->trans('ReOpen'), '', 'default', $_SERVER['PHP_SELF'] . '?id=' . $object->id . '&action=reopen&token=' . newToken(), '', $permissiontoadd);
372
+				print dolGetButtonAction($langs->trans('ReOpen'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=reopen&token='.newToken(), '', $permissiontoadd);
373 373
 			}
374 374
 
375 375
 			// Delete (need delete permission, or if draft, just need create/modify permission)
376
-			print dolGetButtonAction($langs->trans('Delete'), '', 'delete', $_SERVER['PHP_SELF'] . '?id=' . $object->id . '&action=delete&token=' . newToken(), '', $permissiontodelete || ($object->status == $object::STATUS_DRAFT && $permissiontoadd));
376
+			print dolGetButtonAction($langs->trans('Delete'), '', 'delete', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=delete&token='.newToken(), '', $permissiontodelete || ($object->status == $object::STATUS_DRAFT && $permissiontoadd));
377 377
 		}
378
-		print '</div>' . "\n";
378
+		print '</div>'."\n";
379 379
 	}
380 380
 
381 381
 	// Select mail models is same action as presend
Please login to merge, or discard this patch.