Completed
Branch develop (d8116b)
by
unknown
20:02
created
htdocs/bom/class/bom.class.php 4 patches
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -671,11 +671,11 @@
 block discarded – undo
671 671
 			$rankToUse = (int) $position;
672 672
 			if ($rankToUse != $line->oldcopy->position) { // check if position have a new value
673 673
 				foreach ($this->lines as $bl) {
674
-					if ($bl->position >= $rankToUse AND $bl->position < ($line->oldcopy->position + 1)) { // move rank up
674
+					if ($bl->position >= $rankToUse and $bl->position < ($line->oldcopy->position + 1)) { // move rank up
675 675
 						$bl->position++;
676 676
 						$bl->update($user);
677 677
 					}
678
-					if ($bl->position <= $rankToUse AND $bl->position > ($line->oldcopy->position)) { // move rank down
678
+					if ($bl->position <= $rankToUse and $bl->position > ($line->oldcopy->position)) { // move rank down
679 679
 						$bl->position--;
680 680
 						$bl->update($user);
681 681
 					}
Please login to merge, or discard this patch.
Indentation   -1 removed lines patch added patch discarded remove patch
@@ -405,7 +405,6 @@
 block discarded – undo
405 405
 	 * Load object lines in memory from the database by type of product
406 406
 	 *
407 407
 	 * 	@param int    $typeproduct   0 type product, 1 type service
408
-
409 408
 	 * @return int         <0 if KO, 0 if not found, >0 if OK
410 409
 	 */
411 410
 	public function fetchLinesbytypeproduct($typeproduct = 0)
Please login to merge, or discard this patch.
Braces   +9 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1460,8 +1460,9 @@  discard block
 block discarded – undo
1460 1460
 						$workstation = new Workstation($this->db);
1461 1461
 						$res = $workstation->fetch($tmpproduct->fk_default_workstation);
1462 1462
 
1463
-						if ($res > 0) $line->total_cost = price2num($qtyhourforline * ($workstation->thm_operator_estimated + $workstation->thm_machine_estimated), 'MT');
1464
-						else {
1463
+						if ($res > 0) {
1464
+							$line->total_cost = price2num($qtyhourforline * ($workstation->thm_operator_estimated + $workstation->thm_machine_estimated), 'MT');
1465
+						} else {
1465 1466
 							$this->error = $workstation->error;
1466 1467
 								return -3;
1467 1468
 						}
@@ -1525,7 +1526,9 @@  discard block
 block discarded – undo
1525 1526
 		if (!empty($this->lines)) {
1526 1527
 			foreach ($this->lines as $line) {
1527 1528
 				if (!empty($line->childBom)) {
1528
-					foreach ($line->childBom as $childBom) $childBom->getNetNeeds($TNetNeeds, $line->qty*$qty);
1529
+					foreach ($line->childBom as $childBom) {
1530
+						$childBom->getNetNeeds($TNetNeeds, $line->qty*$qty);
1531
+					}
1529 1532
 				} else {
1530 1533
 					if (empty($TNetNeeds[$line->fk_product])) {
1531 1534
 						$TNetNeeds[$line->fk_product] = 0;
@@ -1580,7 +1583,9 @@  discard block
 block discarded – undo
1580 1583
 			return;
1581 1584
 		}
1582 1585
 
1583
-		if (empty($bom_id)) $bom_id=$this->id;
1586
+		if (empty($bom_id)) {
1587
+			$bom_id=$this->id;
1588
+		}
1584 1589
 
1585 1590
 		$sql = 'SELECT l.fk_bom, b.label
1586 1591
 				FROM '.MAIN_DB_PREFIX.'bom_bomline l
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -455,7 +455,7 @@  discard block
 block discarded – undo
455 455
 		$sql .= " FROM ".$this->db->prefix().$objectline->table_element." as l";
456 456
 		$sql .= " LEFT JOIN ".$this->db->prefix()."product as p ON p.rowid = l.fk_product";
457 457
 		$sql .= " WHERE l.fk_".$this->db->escape($this->element)." = ".((int) $this->id);
458
-		$sql .= " AND p.fk_product_type = ". ((int) $typeproduct);
458
+		$sql .= " AND p.fk_product_type = ".((int) $typeproduct);
459 459
 		if (isset($objectline->fields['position'])) {
460 460
 			$sql .= $this->db->order('position', 'ASC');
461 461
 		}
@@ -875,7 +875,7 @@  discard block
 block discarded – undo
875 875
 		if (!empty($conf->global->BOM_ADDON)) {
876 876
 			$mybool = false;
877 877
 
878
-			$file = getDolGlobalString('BOM_ADDON') . ".php";
878
+			$file = getDolGlobalString('BOM_ADDON').".php";
879 879
 			$classname = $conf->global->BOM_ADDON;
880 880
 
881 881
 			// Include file with class
@@ -1190,7 +1190,7 @@  discard block
 block discarded – undo
1190 1190
 				$label = $langs->trans("ShowBillOfMaterials");
1191 1191
 				$linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"';
1192 1192
 			}
1193
-			$linkclose .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' :  ' title="tocomplete"');
1193
+			$linkclose .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' : ' title="tocomplete"');
1194 1194
 			$linkclose .= $dataparams.' class="'.$classfortooltip.($morecss ? ' '.$morecss : '').'"';
1195 1195
 		} else {
1196 1196
 			$linkclose = ($morecss ? ' class="'.$morecss.'"' : '');
@@ -1409,7 +1409,7 @@  discard block
 block discarded – undo
1409 1409
 		$this->unit_cost = 0;
1410 1410
 		$this->total_cost = 0;
1411 1411
 
1412
-		$parameters=array();
1412
+		$parameters = array();
1413 1413
 		$reshook = $hookmanager->executeHooks('calculateCostsBom', $parameters, $this); // Note that $action and $object may have been modified by hook
1414 1414
 
1415 1415
 		if ($reshook > 0) {
@@ -1424,7 +1424,7 @@  discard block
 block discarded – undo
1424 1424
 			foreach ($this->lines as &$line) {
1425 1425
 				$tmpproduct->cost_price = 0;
1426 1426
 				$tmpproduct->pmp = 0;
1427
-				$result = $tmpproduct->fetch($line->fk_product, '', '', '', 0, 1, 1);	// We discard selling price and language loading
1427
+				$result = $tmpproduct->fetch($line->fk_product, '', '', '', 0, 1, 1); // We discard selling price and language loading
1428 1428
 
1429 1429
 				if ($tmpproduct->type == $tmpproduct::TYPE_PRODUCT) {
1430 1430
 					if (empty($line->fk_bom_child)) {
@@ -1533,12 +1533,12 @@  discard block
 block discarded – undo
1533 1533
 		if (!empty($this->lines)) {
1534 1534
 			foreach ($this->lines as $line) {
1535 1535
 				if (!empty($line->childBom)) {
1536
-					foreach ($line->childBom as $childBom) $childBom->getNetNeeds($TNetNeeds, $line->qty*$qty);
1536
+					foreach ($line->childBom as $childBom) $childBom->getNetNeeds($TNetNeeds, $line->qty * $qty);
1537 1537
 				} else {
1538 1538
 					if (empty($TNetNeeds[$line->fk_product])) {
1539 1539
 						$TNetNeeds[$line->fk_product] = 0;
1540 1540
 					}
1541
-					$TNetNeeds[$line->fk_product] += $line->qty*$qty;
1541
+					$TNetNeeds[$line->fk_product] += $line->qty * $qty;
1542 1542
 				}
1543 1543
 			}
1544 1544
 		}
@@ -1560,9 +1560,9 @@  discard block
 block discarded – undo
1560 1560
 					foreach ($line->childBom as $childBom) {
1561 1561
 						$TNetNeeds[$childBom->id]['bom'] = $childBom;
1562 1562
 						$TNetNeeds[$childBom->id]['parentid'] = $this->id;
1563
-						$TNetNeeds[$childBom->id]['qty'] = $line->qty*$qty;
1563
+						$TNetNeeds[$childBom->id]['qty'] = $line->qty * $qty;
1564 1564
 						$TNetNeeds[$childBom->id]['level'] = $level;
1565
-						$childBom->getNetNeedsTree($TNetNeeds, $line->qty*$qty, $level+1);
1565
+						$childBom->getNetNeedsTree($TNetNeeds, $line->qty * $qty, $level + 1);
1566 1566
 					}
1567 1567
 				} else {
1568 1568
 					$TNetNeeds[$this->id]['product'][$line->fk_product]['qty'] += $line->qty * $qty;
@@ -1588,7 +1588,7 @@  discard block
 block discarded – undo
1588 1588
 			return;
1589 1589
 		}
1590 1590
 
1591
-		if (empty($bom_id)) $bom_id=$this->id;
1591
+		if (empty($bom_id)) $bom_id = $this->id;
1592 1592
 
1593 1593
 		$sql = 'SELECT l.fk_bom, b.label
1594 1594
 				FROM '.MAIN_DB_PREFIX.'bom_bomline l
@@ -1599,7 +1599,7 @@  discard block
 block discarded – undo
1599 1599
 		if (!empty($resql)) {
1600 1600
 			while ($res = $this->db->fetch_object($resql)) {
1601 1601
 				$TParentBom[$res->fk_bom] = $res->fk_bom;
1602
-				$this->getParentBomTreeRecursive($TParentBom, $res->fk_bom, $level+1);
1602
+				$this->getParentBomTreeRecursive($TParentBom, $res->fk_bom, $level + 1);
1603 1603
 			}
1604 1604
 		}
1605 1605
 	}
@@ -1613,7 +1613,7 @@  discard block
 block discarded – undo
1613 1613
 	 */
1614 1614
 	public function getKanbanView($option = '', $arraydata = null)
1615 1615
 	{
1616
-		global $db,$langs;
1616
+		global $db, $langs;
1617 1617
 
1618 1618
 		$selected = (empty($arraydata['selected']) ? 0 : $arraydata['selected']);
1619 1619
 
Please login to merge, or discard this patch.
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
@@ -294,7 +294,7 @@  discard block
 block discarded – undo
294 294
 		if (!empty($conf->global->CONTRACT_ADDON)) {
295 295
 			$mybool = false;
296 296
 
297
-			$file = getDolGlobalString('CONTRACT_ADDON') . ".php";
297
+			$file = getDolGlobalString('CONTRACT_ADDON').".php";
298 298
 			$classname = $conf->global->CONTRACT_ADDON;
299 299
 
300 300
 			// Include file with class
@@ -403,7 +403,7 @@  discard block
 block discarded – undo
403 403
 			if ($contratline->statut != ContratLigne::STATUS_OPEN) {
404 404
 				$contratline->context = $this->context;
405 405
 
406
-				$result = $contratline->active_line($user, $date_start, !empty($date_end) ? $date_end : -1, $comment);	// This call trigger LINECONTRACT_ACTIVATE
406
+				$result = $contratline->active_line($user, $date_start, !empty($date_end) ? $date_end : -1, $comment); // This call trigger LINECONTRACT_ACTIVATE
407 407
 				if ($result < 0) {
408 408
 					$error++;
409 409
 					$this->error = $contratline->error;
@@ -453,7 +453,7 @@  discard block
 block discarded – undo
453 453
 			// Close lines not already closed
454 454
 			if ($contratline->statut != ContratLigne::STATUS_CLOSED) {
455 455
 				$contratline->date_end_real = $now;
456
-				$contratline->date_cloture = $now;	// For backward compatibility
456
+				$contratline->date_cloture = $now; // For backward compatibility
457 457
 				$contratline->fk_user_cloture = $user->id;
458 458
 				$contratline->statut = ContratLigne::STATUS_CLOSED;
459 459
 				$result = $contratline->close_line($user, $now, $comment, $notrigger);
@@ -584,7 +584,7 @@  discard block
 block discarded – undo
584 584
 			if (!$error) {
585 585
 				$this->ref = $num;
586 586
 				$this->status = self::STATUS_VALIDATED;
587
-				$this->statut = self::STATUS_VALIDATED;	// deprecated
587
+				$this->statut = self::STATUS_VALIDATED; // deprecated
588 588
 				$this->date_validation = $now;
589 589
 			}
590 590
 		} else {
@@ -844,10 +844,10 @@  discard block
 block discarded – undo
844 844
 				$line->localtax2_tx		= $objp->localtax2_tx;
845 845
 				$line->localtax1_type	= $objp->localtax1_type;
846 846
 				$line->localtax2_type	= $objp->localtax2_type;
847
-				$line->subprice			= $objp->subprice;
847
+				$line->subprice = $objp->subprice;
848 848
 				$line->statut = $objp->status;
849 849
 				$line->status = $objp->status;
850
-				$line->remise_percent	= $objp->remise_percent;
850
+				$line->remise_percent = $objp->remise_percent;
851 851
 				$line->price_ht			= $objp->price_ht;
852 852
 				$line->price = $objp->price_ht; // For backward compatibility
853 853
 				$line->total_ht			= $objp->total_ht;
@@ -890,7 +890,7 @@  discard block
 block discarded – undo
890 890
 				//$line->date_fin_prevue   = $this->db->jdate($objp->date_fin_validite);
891 891
 				//$line->date_fin_reel     = $this->db->jdate($objp->date_cloture);
892 892
 
893
-				$line->rang     = $objp->rang;
893
+				$line->rang = $objp->rang;
894 894
 
895 895
 				// Retrieve all extrafields for contract line
896 896
 				// fetch optionals attributes and labels
@@ -1399,7 +1399,7 @@  discard block
 block discarded – undo
1399 1399
 		}
1400 1400
 
1401 1401
 		if (!$error) {
1402
-			$result = $this->insertExtraFields();	// This delete and reinsert extrafields
1402
+			$result = $this->insertExtraFields(); // This delete and reinsert extrafields
1403 1403
 			if ($result < 0) {
1404 1404
 				$error++;
1405 1405
 			}
@@ -2035,7 +2035,7 @@  discard block
 block discarded – undo
2035 2035
 				}
2036 2036
 				$datas['customer'] = '<br><b>'.$langs->trans('Customer').':</b> '.$this->thirdparty->getNomUrl(1, '', 0, 1);
2037 2037
 			}
2038
-			$datas['refcustomer'] = '<br><b>'.$langs->trans('RefCustomer').':</b> '. $this->ref_customer;
2038
+			$datas['refcustomer'] = '<br><b>'.$langs->trans('RefCustomer').':</b> '.$this->ref_customer;
2039 2039
 			if (!$nofetch) {
2040 2040
 				$langs->load('project');
2041 2041
 				if (empty($this->project)) {
@@ -2108,7 +2108,7 @@  discard block
 block discarded – undo
2108 2108
 				$label = $langs->trans("ShowContract");
2109 2109
 				$linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"';
2110 2110
 			}
2111
-			$linkclose .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' :  ' title="tocomplete"');
2111
+			$linkclose .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' : ' title="tocomplete"');
2112 2112
 			$linkclose .= $dataparams.' class="'.$classfortooltip.'"';
2113 2113
 		}
2114 2114
 		$linkstart = '<a href="'.$url.'"';
@@ -2509,7 +2509,7 @@  discard block
 block discarded – undo
2509 2509
 		global $user;
2510 2510
 
2511 2511
 		$ticket = new Ticket($this->db);
2512
-		$nbTicket =  $ticket->fetchAll($user,  'ASC', 't.datec',  '', 0, '', array('t.fk_contract' => $this->id));
2512
+		$nbTicket = $ticket->fetchAll($user, 'ASC', 't.datec', '', 0, '', array('t.fk_contract' => $this->id));
2513 2513
 
2514 2514
 		return ($nbTicket < 0 ? $nbTicket : $ticket->lines);
2515 2515
 	}
@@ -2531,7 +2531,7 @@  discard block
 block discarded – undo
2531 2531
 		global $conf, $langs;
2532 2532
 
2533 2533
 		if (!dol_strlen($modele)) {
2534
-			$modele = '';	// No doc template/generation by default
2534
+			$modele = ''; // No doc template/generation by default
2535 2535
 
2536 2536
 			if (!empty($this->model_pdf)) {
2537 2537
 				$modele = $this->model_pdf;
@@ -2628,14 +2628,14 @@  discard block
 block discarded – undo
2628 2628
 			}
2629 2629
 		}
2630 2630
 
2631
-		if (empty($conf->global->CONTRACT_ADDON) || !is_readable(DOL_DOCUMENT_ROOT."/core/modules/contract/" . getDolGlobalString('CONTRACT_ADDON').".php")) {
2631
+		if (empty($conf->global->CONTRACT_ADDON) || !is_readable(DOL_DOCUMENT_ROOT."/core/modules/contract/".getDolGlobalString('CONTRACT_ADDON').".php")) {
2632 2632
 			$this->error = 'ErrorSetupNotComplete';
2633 2633
 			dol_syslog($this->error);
2634 2634
 			return -1;
2635 2635
 		}
2636 2636
 
2637 2637
 		// Set ref
2638
-		require_once DOL_DOCUMENT_ROOT."/core/modules/contract/" . getDolGlobalString('CONTRACT_ADDON').'.php';
2638
+		require_once DOL_DOCUMENT_ROOT."/core/modules/contract/".getDolGlobalString('CONTRACT_ADDON').'.php';
2639 2639
 		$obj = $conf->global->CONTRACT_ADDON;
2640 2640
 		$modContract = new $obj();
2641 2641
 		$clonedObj->ref = $modContract->getNextValue($objsoc, $clonedObj);
@@ -2722,7 +2722,7 @@  discard block
 block discarded – undo
2722 2722
 
2723 2723
 		$error = 0;
2724 2724
 		$this->output = '';
2725
-		$this->error='';
2725
+		$this->error = '';
2726 2726
 
2727 2727
 		$contractlineprocessed = array();
2728 2728
 		$contractignored = array();
@@ -2731,12 +2731,12 @@  discard block
 block discarded – undo
2731 2731
 		dol_syslog(__METHOD__, LOG_DEBUG);
2732 2732
 
2733 2733
 		$sql = 'SELECT c.rowid, c.ref_customer, cd.rowid as lid, cd.date_fin_validite, p.duration';
2734
-		$sql.= ' FROM '.MAIN_DB_PREFIX.'contrat as c, '.MAIN_DB_PREFIX.'contratdet as cd';
2735
-		$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON p.rowid = cd.fk_product';
2736
-		$sql.= ' WHERE cd.fk_contrat = c.rowid';
2737
-		$sql.= " AND date_format(cd.date_fin_validite, '%Y-%m-%d') <= date_format('".$this->db->idate($enddatetoscan)."', '%Y-%m-%d')";
2738
-		$sql.= " AND cd.statut = 4";
2739
-		if ($thirdparty_id > 0) $sql.=" AND c.fk_soc = ".((int) $thirdparty_id);
2734
+		$sql .= ' FROM '.MAIN_DB_PREFIX.'contrat as c, '.MAIN_DB_PREFIX.'contratdet as cd';
2735
+		$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON p.rowid = cd.fk_product';
2736
+		$sql .= ' WHERE cd.fk_contrat = c.rowid';
2737
+		$sql .= " AND date_format(cd.date_fin_validite, '%Y-%m-%d') <= date_format('".$this->db->idate($enddatetoscan)."', '%Y-%m-%d')";
2738
+		$sql .= " AND cd.statut = 4";
2739
+		if ($thirdparty_id > 0) $sql .= " AND c.fk_soc = ".((int) $thirdparty_id);
2740 2740
 		//print $sql;
2741 2741
 
2742 2742
 		$resql = $this->db->query($sql);
@@ -2745,7 +2745,7 @@  discard block
 block discarded – undo
2745 2745
 
2746 2746
 			include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
2747 2747
 
2748
-			$i=0;
2748
+			$i = 0;
2749 2749
 			while ($i < $num) {
2750 2750
 				$obj = $this->db->fetch_object($resql);
2751 2751
 				if ($obj) {
@@ -2755,7 +2755,7 @@  discard block
 block discarded – undo
2755 2755
 
2756 2756
 					// Load contract
2757 2757
 					$object = new Contrat($this->db);
2758
-					$object->fetch($obj->rowid);		// fetch also lines
2758
+					$object->fetch($obj->rowid); // fetch also lines
2759 2759
 					$object->fetch_thirdparty();
2760 2760
 
2761 2761
 					if ($object->id <= 0) {
@@ -2779,9 +2779,9 @@  discard block
 block discarded – undo
2779 2779
 						usort($object->linkedObjects['facture'], "cmp");
2780 2780
 
2781 2781
 						//dol_sort_array($contract->linkedObjects['facture'], 'date');
2782
-						$someinvoicenotpaid=0;
2782
+						$someinvoicenotpaid = 0;
2783 2783
 						foreach ($object->linkedObjects['facture'] as $idinvoice => $invoice) {
2784
-							if ($invoice->statut == Facture::STATUS_DRAFT) continue;	// Draft invoice are not invoice not paid
2784
+							if ($invoice->statut == Facture::STATUS_DRAFT) continue; // Draft invoice are not invoice not paid
2785 2785
 
2786 2786
 							if (empty($invoice->paye)) {
2787 2787
 								$someinvoicenotpaid++;
@@ -2789,7 +2789,7 @@  discard block
 block discarded – undo
2789 2789
 						}
2790 2790
 						if ($someinvoicenotpaid) {
2791 2791
 							$this->output .= 'Contract '.$object->ref.' is qualified for renewal but there is '.$someinvoicenotpaid.' invoice(s) unpayed so we cancel renewal'."\n";
2792
-							$contractignored[$object->id]=$object->ref;
2792
+							$contractignored[$object->id] = $object->ref;
2793 2793
 							continue;
2794 2794
 						}
2795 2795
 					}
@@ -2797,7 +2797,7 @@  discard block
 block discarded – undo
2797 2797
 					if ($expirationdate && $expirationdate < $enddatetoscan) {
2798 2798
 						dol_syslog("Define the newdate of end of services from expirationdate=".$expirationdate);
2799 2799
 						$newdate = $expirationdate;
2800
-						$protecti=0;	//$protecti is to avoid infinite loop
2800
+						$protecti = 0; //$protecti is to avoid infinite loop
2801 2801
 						while ($newdate < $enddatetoscan && $protecti < 1000) {
2802 2802
 							$newdate = dol_time_plus_duree($newdate, $duration_value, $duration_unit);
2803 2803
 							$protecti++;
@@ -2815,39 +2815,39 @@  discard block
 block discarded – undo
2815 2815
 							$comment = 'Renew date of contract '.$object->ref.' line '.$obj->lid.' by doAutoRenewContracts';
2816 2816
 
2817 2817
 							$sqlupdate = 'UPDATE '.MAIN_DB_PREFIX."contratdet SET date_fin_validite = '".$this->db->idate($newdate)."'";
2818
-							$sqlupdate.= ' WHERE rowid = '.((int) $obj->lid);
2818
+							$sqlupdate .= ' WHERE rowid = '.((int) $obj->lid);
2819 2819
 							$resqlupdate = $this->db->query($sqlupdate);
2820 2820
 							if ($resqlupdate) {
2821
-								$contractlineprocessed[$obj->lid]=$object->ref;
2821
+								$contractlineprocessed[$obj->lid] = $object->ref;
2822 2822
 
2823 2823
 								$actioncode = 'RENEW_CONTRACT';
2824 2824
 								$now = dol_now();
2825 2825
 
2826 2826
 								// Create an event
2827 2827
 								$actioncomm = new ActionComm($this->db);
2828
-								$actioncomm->type_code    = 'AC_OTH_AUTO';		// Type of event ('AC_OTH', 'AC_OTH_AUTO', 'AC_XXX'...)
2828
+								$actioncomm->type_code    = 'AC_OTH_AUTO'; // Type of event ('AC_OTH', 'AC_OTH_AUTO', 'AC_XXX'...)
2829 2829
 								$actioncomm->code         = 'AC_'.$actioncode;
2830 2830
 								$actioncomm->label        = $label;
2831 2831
 								$actioncomm->datep        = $now;
2832 2832
 								$actioncomm->datef        = $now;
2833
-								$actioncomm->percentage   = -1;   // Not applicable
2833
+								$actioncomm->percentage   = -1; // Not applicable
2834 2834
 								$actioncomm->socid        = $object->thirdparty->id;
2835
-								$actioncomm->authorid     = $user->id;   // User saving action
2836
-								$actioncomm->userownerid  = $user->id;	// Owner of action
2835
+								$actioncomm->authorid     = $user->id; // User saving action
2836
+								$actioncomm->userownerid  = $user->id; // Owner of action
2837 2837
 								$actioncomm->fk_element   = $object->id;
2838 2838
 								$actioncomm->elementtype  = 'contract';
2839 2839
 								$actioncomm->note_private = $comment;
2840 2840
 
2841
-								$ret = $actioncomm->create($user);       // User creating action
2841
+								$ret = $actioncomm->create($user); // User creating action
2842 2842
 							} else {
2843
-								$contracterror[$object->id]=$object->ref;
2843
+								$contracterror[$object->id] = $object->ref;
2844 2844
 
2845 2845
 								$error++;
2846 2846
 								$errorforlocaltransaction++;
2847 2847
 								$this->error = $this->db->lasterror();
2848 2848
 							}
2849 2849
 
2850
-							if (! $errorforlocaltransaction) {
2850
+							if (!$errorforlocaltransaction) {
2851 2851
 								$this->db->commit();
2852 2852
 							} else {
2853 2853
 								$this->db->rollback();
@@ -2866,9 +2866,9 @@  discard block
 block discarded – undo
2866 2866
 			$this->error = $this->db->lasterror();
2867 2867
 		}
2868 2868
 
2869
-		$this->output .= count($contractlineprocessed).' contract line(s) with end date before '.dol_print_date($enddatetoscan, 'day').' were renewed'.(count($contractlineprocessed)>0 ? ' : '.join(',', $contractlineprocessed) : '');
2869
+		$this->output .= count($contractlineprocessed).' contract line(s) with end date before '.dol_print_date($enddatetoscan, 'day').' were renewed'.(count($contractlineprocessed) > 0 ? ' : '.join(',', $contractlineprocessed) : '');
2870 2870
 
2871
-		return ($error ? 1: 0);
2871
+		return ($error ? 1 : 0);
2872 2872
 	}
2873 2873
 
2874 2874
 	/**
@@ -3202,7 +3202,7 @@  discard block
 block discarded – undo
3202 3202
 		}
3203 3203
 
3204 3204
 		$link = '<a href="'.DOL_URL_ROOT.'/contrat/card.php?id='.$this->fk_contrat.'"';
3205
-		$link .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' :  ' title="tocomplete"');
3205
+		$link .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' : ' title="tocomplete"');
3206 3206
 		$link .= $dataparams.' class="'.$classfortooltip.'">';
3207 3207
 		$linkend = '</a>';
3208 3208
 
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.