Completed
Branch develop (a31803)
by Laurent
21:16
created
htdocs/compta/paiement/rapport.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -118,7 +118,9 @@
 block discarded – undo
118 118
 
119 119
 if ($year) {
120 120
 	if (is_dir($dir.'/'.$year)) {
121
-		if (!empty($year_dirs)) print '<br>';
121
+		if (!empty($year_dirs)) {
122
+			print '<br>';
123
+		}
122 124
 		print '<br>';
123 125
 		print '<table width="100%" class="noborder">';
124 126
 		print '<tr class="liste_titre">';
Please login to merge, or discard this patch.
htdocs/compta/facture/card-rec.php 2 patches
Braces   +7 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1623,9 +1623,13 @@
 block discarded – undo
1623 1623
 
1624 1624
 				$parameters = array();
1625 1625
 				$reshook = $hookmanager->executeHooks('formAddObjectLine', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
1626
-				if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
1627
-				if (empty($reshook))
1628
-					$object->formAddObjectLine(0, $mysoc, $object->thirdparty); // No date selector for template invoice
1626
+				if ($reshook < 0) {
1627
+					setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
1628
+				}
1629
+				if (empty($reshook)) {
1630
+									$object->formAddObjectLine(0, $mysoc, $object->thirdparty);
1631
+				}
1632
+				// No date selector for template invoice
1629 1633
 			}
1630 1634
 		}
1631 1635
 
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -779,7 +779,7 @@  discard block
 block discarded – undo
779 779
 		// Define special_code for special lines
780 780
 		$special_code = GETPOST('special_code', 'int');
781 781
 		if ($special_code == 3) {
782
-			$special_code = 0;	// Options should not exists on invoices
782
+			$special_code = 0; // Options should not exists on invoices
783 783
 		}
784 784
 
785 785
 		/*$line = new FactureLigne($db);
@@ -1626,10 +1626,10 @@  discard block
 block discarded – undo
1626 1626
 
1627 1627
 		// Lines
1628 1628
 		print '<form name="addproduct" id="addproduct" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.(($action != 'editline') ? '#add' : '#line_'.GETPOST('lineid', 'int')).'" method="POST">';
1629
-		print '<input type="hidden" name="token" value="' . newToken().'">';
1630
-		print '<input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateline').'">';
1629
+		print '<input type="hidden" name="token" value="'.newToken().'">';
1630
+		print '<input type="hidden" name="action" value="'.(($action != 'editline') ? 'addline' : 'updateline').'">';
1631 1631
 		print '<input type="hidden" name="mode" value="">';
1632
-		print '<input type="hidden" name="id" value="' . $object->id.'">';
1632
+		print '<input type="hidden" name="id" value="'.$object->id.'">';
1633 1633
 		print '<input type="hidden" name="page_y" value="">';
1634 1634
 
1635 1635
 		if (!empty($conf->use_javascript_ajax) && $object->statut == 0) {
@@ -1681,16 +1681,16 @@  discard block
 block discarded – undo
1681 1681
 			if (empty($object->suspended)) {
1682 1682
 				if ($user->hasRight('facture', 'creer')) {
1683 1683
 					if (!empty($object->frequency) && $object->nb_gen_max > 0 && ($object->nb_gen_done >= $object->nb_gen_max)) {
1684
-						print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="' . dol_escape_htmltag($langs->trans("MaxGenerationReached")) . '">' . $langs->trans("CreateBill") . '</a></div>';
1684
+						print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("MaxGenerationReached")).'">'.$langs->trans("CreateBill").'</a></div>';
1685 1685
 					} else {
1686 1686
 						if (empty($object->frequency) || $object->date_when <= $nowlasthour) {
1687
-							print '<div class="inline-block divButAction"><a class="butAction" href="' . DOL_URL_ROOT . '/compta/facture/card.php?action=create&socid=' . $object->thirdparty->id . '&fac_rec=' . $object->id . '">' . $langs->trans("CreateBill") . '</a></div>';
1687
+							print '<div class="inline-block divButAction"><a class="butAction" href="'.DOL_URL_ROOT.'/compta/facture/card.php?action=create&socid='.$object->thirdparty->id.'&fac_rec='.$object->id.'">'.$langs->trans("CreateBill").'</a></div>';
1688 1688
 						} else {
1689
-							print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="' . dol_escape_htmltag($langs->trans("DateIsNotEnough")) . '">' . $langs->trans("CreateBill") . '</a></div>';
1689
+							print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("DateIsNotEnough")).'">'.$langs->trans("CreateBill").'</a></div>';
1690 1690
 						}
1691 1691
 					}
1692 1692
 				} else {
1693
-					print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#">' . $langs->trans("CreateBill") . '</a></div>';
1693
+					print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#">'.$langs->trans("CreateBill").'</a></div>';
1694 1694
 				}
1695 1695
 			}
1696 1696
 
@@ -1703,7 +1703,7 @@  discard block
 block discarded – undo
1703 1703
 			}
1704 1704
 
1705 1705
 			// Delete
1706
-			print dolGetButtonAction($langs->trans("Delete"), '', 'delete', $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=delete&token=' . newToken(), 'delete', $user->hasRight('facture', 'supprimer'));
1706
+			print dolGetButtonAction($langs->trans("Delete"), '', 'delete', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken(), 'delete', $user->hasRight('facture', 'supprimer'));
1707 1707
 		}
1708 1708
 		print '</div>';
1709 1709
 
Please login to merge, or discard this patch.
htdocs/supplier_proposal/card.php 2 patches
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1776,9 +1776,12 @@
 block discarded – undo
1776 1776
 
1777 1777
 			$parameters = array();
1778 1778
 			$reshook = $hookmanager->executeHooks('formAddObjectLine', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
1779
-			if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
1780
-			if (empty($reshook))
1781
-				$object->formAddObjectLine($dateSelector, $soc, $mysoc);
1779
+			if ($reshook < 0) {
1780
+				setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
1781
+			}
1782
+			if (empty($reshook)) {
1783
+							$object->formAddObjectLine($dateSelector, $soc, $mysoc);
1784
+			}
1782 1785
 		}
1783 1786
 	}
1784 1787
 
Please login to merge, or discard this patch.
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -599,7 +599,7 @@  discard block
 block discarded – undo
599 599
 			$idprod = GETPOST('idprod', 'int');
600 600
 		}
601 601
 
602
-		$tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0);		// Can be '1.2' or '1.2 (CODE)'
602
+		$tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0); // Can be '1.2' or '1.2 (CODE)'
603 603
 
604 604
 		$price_ht = price2num(GETPOST('price_ht'), 'MU', 2);
605 605
 		$price_ht_devise = price2num(GETPOST('multicurrency_price_ht'), 'CU', 2);
@@ -708,7 +708,7 @@  discard block
 block discarded – undo
708 708
 
709 709
 					//If text set in desc is the same as product descpription (as now it's preloaded) whe add it only one time
710 710
 					if (trim($product_desc) == trim($desc) && !empty($conf->global->PRODUIT_AUTOFILL_DESC)) {
711
-						$product_desc='';
711
+						$product_desc = '';
712 712
 					}
713 713
 
714 714
 					if (!empty($product_desc) && !empty($conf->global->MAIN_NO_CONCAT_DESCRIPTION)) {
@@ -1820,40 +1820,40 @@  discard block
 block discarded – undo
1820 1820
 
1821 1821
 	print '<tr>';
1822 1822
 	// Amount HT
1823
-	print '<td class="titlefieldmiddle">' . $langs->trans('AmountHT') . '</td>';
1824
-	print '<td class="nowrap amountcard right">' . price($object->total_ht, '', $langs, 0, -1, -1, $conf->currency) . '</td>';
1823
+	print '<td class="titlefieldmiddle">'.$langs->trans('AmountHT').'</td>';
1824
+	print '<td class="nowrap amountcard right">'.price($object->total_ht, '', $langs, 0, -1, -1, $conf->currency).'</td>';
1825 1825
 	if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
1826 1826
 		// Multicurrency Amount HT
1827
-		print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_ht, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
1827
+		print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_ht, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
1828 1828
 	}
1829 1829
 	print '</tr>';
1830 1830
 
1831 1831
 	print '<tr>';
1832 1832
 	// Amount VAT
1833
-	print '<td class="titlefieldmiddle">' . $langs->trans('AmountVAT') . '</td>';
1834
-	print '<td class="nowrap amountcard right">' . price($object->total_tva, '', $langs, 0, -1, -1, $conf->currency) . '</td>';
1833
+	print '<td class="titlefieldmiddle">'.$langs->trans('AmountVAT').'</td>';
1834
+	print '<td class="nowrap amountcard right">'.price($object->total_tva, '', $langs, 0, -1, -1, $conf->currency).'</td>';
1835 1835
 	if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
1836 1836
 		// Multicurrency Amount VAT
1837
-		print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_tva, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
1837
+		print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_tva, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
1838 1838
 	}
1839 1839
 	print '</tr>';
1840 1840
 
1841 1841
 	// Amount Local Taxes
1842 1842
 	if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0) {
1843 1843
 		print '<tr>';
1844
-		print '<td class="titlefieldmiddle">' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '</td>';
1845
-		print '<td class="nowrap amountcard right">' . price($object->total_localtax1, '', $langs, 0, -1, -1, $conf->currency) . '</td>';
1844
+		print '<td class="titlefieldmiddle">'.$langs->transcountry("AmountLT1", $mysoc->country_code).'</td>';
1845
+		print '<td class="nowrap amountcard right">'.price($object->total_localtax1, '', $langs, 0, -1, -1, $conf->currency).'</td>';
1846 1846
 		if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
1847
-			print '<td class="nowrap amountcard right">' . price($object->total_localtax1, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
1847
+			print '<td class="nowrap amountcard right">'.price($object->total_localtax1, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
1848 1848
 		}
1849 1849
 		print '</tr>';
1850 1850
 
1851 1851
 		if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0) {
1852 1852
 			print '<tr>';
1853
-			print '<td>' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '</td>';
1854
-			print '<td class="nowrap amountcard right">' . price($object->total_localtax2, '', $langs, 0, -1, -1, $conf->currency) . '</td>';
1853
+			print '<td>'.$langs->transcountry("AmountLT2", $mysoc->country_code).'</td>';
1854
+			print '<td class="nowrap amountcard right">'.price($object->total_localtax2, '', $langs, 0, -1, -1, $conf->currency).'</td>';
1855 1855
 			if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
1856
-				print '<td class="nowrap amountcard right">' . price($object->total_localtax2, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
1856
+				print '<td class="nowrap amountcard right">'.price($object->total_localtax2, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
1857 1857
 			}
1858 1858
 			print '</tr>';
1859 1859
 		}
@@ -1861,11 +1861,11 @@  discard block
 block discarded – undo
1861 1861
 
1862 1862
 	print '<tr>';
1863 1863
 	// Amount TTC
1864
-	print '<td>' . $langs->trans('AmountTTC') . '</td>';
1865
-	print '<td class="nowrap amountcard right">' . price($object->total_ttc, '', $langs, 0, -1, -1, $conf->currency) . '</td>';
1864
+	print '<td>'.$langs->trans('AmountTTC').'</td>';
1865
+	print '<td class="nowrap amountcard right">'.price($object->total_ttc, '', $langs, 0, -1, -1, $conf->currency).'</td>';
1866 1866
 	if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
1867 1867
 		// Multicurrency Amount TTC
1868
-		print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_ttc, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
1868
+		print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_ttc, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
1869 1869
 	}
1870 1870
 	print '</tr>';
1871 1871
 
Please login to merge, or discard this patch.
htdocs/modulebuilder/template/myobject_card.php 2 patches
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -598,9 +598,12 @@
 block discarded – undo
598 598
 
599 599
 				$parameters = array();
600 600
 				$reshook = $hookmanager->executeHooks('formAddObjectLine', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
601
-				if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
602
-				if (empty($reshook))
603
-					$object->formAddObjectLine(1, $mysoc, $soc);
601
+				if ($reshook < 0) {
602
+					setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
603
+				}
604
+				if (empty($reshook)) {
605
+									$object->formAddObjectLine(1, $mysoc, $soc);
606
+				}
604 607
 			}
605 608
 		}
606 609
 
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -85,14 +85,14 @@  discard block
 block discarded – undo
85 85
 // Get parameters
86 86
 $id = GETPOST('id', 'int');
87 87
 $ref = GETPOST('ref', 'alpha');
88
-$lineid   = GETPOST('lineid', 'int');
88
+$lineid = GETPOST('lineid', 'int');
89 89
 
90 90
 $action = GETPOST('action', 'aZ09');
91 91
 $confirm = GETPOST('confirm', 'alpha');
92 92
 $cancel = GETPOST('cancel', 'aZ09');
93 93
 $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : str_replace('_', '', basename(dirname(__FILE__)).basename(__FILE__, '.php')); // To manage different context of search
94
-$backtopage = GETPOST('backtopage', 'alpha');					// if not set, a default page will be used
95
-$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha');	// if not set, $backtopage will be used
94
+$backtopage = GETPOST('backtopage', 'alpha'); // if not set, a default page will be used
95
+$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); // if not set, $backtopage will be used
96 96
 $backtopagejsfields = GETPOST('backtopagejsfields', 'alpha');
97 97
 $dol_openinpopup = GETPOST('dol_openinpopup', 'aZ09');
98 98
 
@@ -543,7 +543,7 @@  discard block
 block discarded – undo
543 543
 
544 544
 			// Clone
545 545
 			if ($permissiontoadd) {
546
-				print dolGetButtonAction('', $langs->trans('ToClone'), 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.(!empty($object->socid)?'&socid='.$object->socid:'').'&action=clone&token='.newToken(), '', $permissiontoadd);
546
+				print dolGetButtonAction('', $langs->trans('ToClone'), 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.(!empty($object->socid) ? '&socid='.$object->socid : '').'&action=clone&token='.newToken(), '', $permissiontoadd);
547 547
 			}
548 548
 
549 549
 			/*
Please login to merge, or discard this patch.
htdocs/core/modules/facture/doc/pdf_crabe.modules.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1615,7 +1615,9 @@
 block discarded – undo
1615 1615
 		global $conf, $langs;
1616 1616
 
1617 1617
 		$ltrdirection = 'L';
1618
-		if ($outputlangs->trans("DIRECTION") == 'rtl') $ltrdirection = 'R';
1618
+		if ($outputlangs->trans("DIRECTION") == 'rtl') {
1619
+			$ltrdirection = 'R';
1620
+		}
1619 1621
 
1620 1622
 		// Load traductions files required by page
1621 1623
 		$outputlangs->loadLangs(array("main", "bills", "propal", "companies"));
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -328,7 +328,7 @@  discard block
 block discarded – undo
328 328
 					if (!empty($conf->mycompany->multidir_output[$object->entity])) {
329 329
 						$logodir = $conf->mycompany->multidir_output[$object->entity];
330 330
 					}
331
-					$pagecount = $pdf->setSourceFile($logodir.'/' . getDolGlobalString('MAIN_ADD_PDF_BACKGROUND'));
331
+					$pagecount = $pdf->setSourceFile($logodir.'/'.getDolGlobalString('MAIN_ADD_PDF_BACKGROUND'));
332 332
 					$tplidx = $pdf->importPage(1);
333 333
 				}
334 334
 
@@ -441,7 +441,7 @@  discard block
 block discarded – undo
441 441
 				// $pdf->GetY() here can't be used. It is bottom of the second addresse box but first one may be higher
442 442
 
443 443
 				// $tab_top is y where we must continue content (90 = 42 + 48: 42 is height of logo and ref, 48 is address blocks)
444
-				$tab_top = 90 + $top_shift;		// top_shift is an addition for linked objects or addons (0 in most cases)
444
+				$tab_top = 90 + $top_shift; // top_shift is an addition for linked objects or addons (0 in most cases)
445 445
 				$tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift : 10);
446 446
 
447 447
 				// You can add more thing under header here, if you increase $extra_under_address_shift too.
@@ -770,7 +770,7 @@  discard block
 block discarded – undo
770 770
 					if (!isset($this->tva[$vatrate])) {
771 771
 						$this->tva[$vatrate] = 0;
772 772
 					}
773
-					$this->tva[$vatrate] += $tvaligne;	// ->tva is abandonned, we use now ->tva_array that is more complete
773
+					$this->tva[$vatrate] += $tvaligne; // ->tva is abandonned, we use now ->tva_array that is more complete
774 774
 					$vatcode = $object->lines[$i]->vat_src_code;
775 775
 					if (empty($this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'])) {
776 776
 						$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] = 0;
@@ -1131,7 +1131,7 @@  discard block
 block discarded – undo
1131 1131
 		}
1132 1132
 
1133 1133
 		$posxval = 52;
1134
-		$posxend = 110;	// End of x for text on left side
1134
+		$posxend = 110; // End of x for text on left side
1135 1135
 		if ($this->page_largeur < 210) { // To work with US executive format
1136 1136
 			$posxend -= 10;
1137 1137
 		}
@@ -1149,7 +1149,7 @@  discard block
 block discarded – undo
1149 1149
 			$lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement);
1150 1150
 			$pdf->MultiCell(67, 4, $lib_condition_paiement, 0, 'L');
1151 1151
 
1152
-			$posy = $pdf->GetY() + 3;	// We need spaces for 2 lines payment conditions
1152
+			$posy = $pdf->GetY() + 3; // We need spaces for 2 lines payment conditions
1153 1153
 		}
1154 1154
 
1155 1155
 		// Show category of operations
@@ -1161,7 +1161,7 @@  discard block
 block discarded – undo
1161 1161
 
1162 1162
 			$pdf->SetFont('', '', $default_font_size - 2);
1163 1163
 			$pdf->SetXY($posxval, $posy);
1164
-			$categoryOfOperationLabel = $outputlangs->transnoentities("MentionCategoryOfOperations" . $this->categoryOfOperation);
1164
+			$categoryOfOperationLabel = $outputlangs->transnoentities("MentionCategoryOfOperations".$this->categoryOfOperation);
1165 1165
 			$pdf->MultiCell($posxend - $posxval, 4, $categoryOfOperationLabel, 0, 'L');
1166 1166
 
1167 1167
 			$posy = $pdf->GetY() + 3; // for 2 lines
@@ -1205,7 +1205,7 @@  discard block
 block discarded – undo
1205 1205
 					require_once DOL_DOCUMENT_ROOT.'/societe/class/companybankaccount.class.php';
1206 1206
 					$bac = new CompanyBankAccount($this->db);
1207 1207
 					$bac->fetch(0, $object->thirdparty->id);
1208
-					$iban= $bac->iban.(($bac->iban && $bac->bic) ? ' / ' : '').$bac->bic;
1208
+					$iban = $bac->iban.(($bac->iban && $bac->bic) ? ' / ' : '').$bac->bic;
1209 1209
 					$lib_mode_reg .= ' '.$outputlangs->trans("PaymentTypePREdetails", dol_trunc($iban, 6, 'right', 'UTF-8', 1));
1210 1210
 				}
1211 1211
 				$pdf->MultiCell(80, 5, $lib_mode_reg, 0, 'L');
@@ -1683,7 +1683,7 @@  discard block
 block discarded – undo
1683 1683
 		if (empty($hidetop)) {
1684 1684
 			// Show category of operations
1685 1685
 			if (getDolGlobalInt('INVOICE_CATEGORY_OF_OPERATION') == 1 && $this->categoryOfOperation >= 0) {
1686
-				$categoryOfOperations = $outputlangs->transnoentities("MentionCategoryOfOperations") . ' : ' . $outputlangs->transnoentities("MentionCategoryOfOperations" . $this->categoryOfOperation);
1686
+				$categoryOfOperations = $outputlangs->transnoentities("MentionCategoryOfOperations").' : '.$outputlangs->transnoentities("MentionCategoryOfOperations".$this->categoryOfOperation);
1687 1687
 				$pdf->SetXY($this->marge_gauche, $tab_top - 4);
1688 1688
 				$pdf->MultiCell(($pdf->GetStringWidth($categoryOfOperations)) + 4, 2, $categoryOfOperations);
1689 1689
 			}
@@ -1851,7 +1851,7 @@  discard block
 block discarded – undo
1851 1851
 		}
1852 1852
 		if ($this->situationinvoice) {
1853 1853
 			$langs->loadLangs(array("other"));
1854
-			$title = $outputlangs->transnoentities("PDFInvoiceSituation") . " " . $outputlangs->transnoentities("NumberingShort") . $object->situation_counter . " -";
1854
+			$title = $outputlangs->transnoentities("PDFInvoiceSituation")." ".$outputlangs->transnoentities("NumberingShort").$object->situation_counter." -";
1855 1855
 		}
1856 1856
 		if (!empty($conf->global->PDF_USE_ALSO_LANGUAGE_CODE) && is_object($outputlangsbis)) {
1857 1857
 			$title .= ' - ';
@@ -2077,7 +2077,7 @@  discard block
 block discarded – undo
2077 2077
 
2078 2078
 			$carac_client_name = pdfBuildThirdpartyName($thirdparty, $outputlangs);
2079 2079
 
2080
-			$mode =  'target';
2080
+			$mode = 'target';
2081 2081
 			$carac_client = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, ($usecontact ? $object->contact : ''), $usecontact, $mode, $object);
2082 2082
 
2083 2083
 			// Show recipient
@@ -2121,11 +2121,11 @@  discard block
 block discarded – undo
2121 2121
 					$contactshipping = $object->fetch_Contact($idaddressshipping[0]);
2122 2122
 					$companystatic = new Societe($this->db);
2123 2123
 					$companystatic->fetch($object->contact->fk_soc);
2124
-					$carac_client_name_shipping=pdfBuildThirdpartyName($object->contact, $outputlangs);
2124
+					$carac_client_name_shipping = pdfBuildThirdpartyName($object->contact, $outputlangs);
2125 2125
 					$carac_client_shipping = pdf_build_address($outputlangs, $this->emetteur, $companystatic, $object->contact, $usecontact, 'target', $object);
2126 2126
 				} else {
2127
-					$carac_client_name_shipping=pdfBuildThirdpartyName($object->thirdparty, $outputlangs);
2128
-					$carac_client_shipping=pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, '', 0, 'target', $object);
2127
+					$carac_client_name_shipping = pdfBuildThirdpartyName($object->thirdparty, $outputlangs);
2128
+					$carac_client_shipping = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, '', 0, 'target', $object);
2129 2129
 				}
2130 2130
 				if (!empty($carac_client_shipping)) {
2131 2131
 					$posy += $hautcadre;
@@ -2144,7 +2144,7 @@  discard block
 block discarded – undo
2144 2144
 					$posy = $pdf->getY();
2145 2145
 
2146 2146
 					// Show shipping information
2147
-					$pdf->SetXY($posx+2, $posy);
2147
+					$pdf->SetXY($posx + 2, $posy);
2148 2148
 					$pdf->SetFont('', '', $default_font_size - 1);
2149 2149
 					$pdf->MultiCell($widthrecbox - 2, 2, $carac_client_shipping, '', 'L');
2150 2150
 					$top_shift += $hautcadre;
Please login to merge, or discard this patch.
htdocs/datapolicy/class/datapolicycron.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -469,7 +469,7 @@
 block discarded – undo
469 469
 						$object->fetch($obj->rowid);
470 470
 						$object->id = $obj->rowid;
471 471
 
472
-						$action = 'anonymize';	// TODO Offer also action "delete" in setup of module
472
+						$action = 'anonymize'; // TODO Offer also action "delete" in setup of module
473 473
 
474 474
 						if ($action == 'anonymize') {
475 475
 							if ($object->isObjectUsed($obj->rowid) == 0) {			// If object to clean is used
Please login to merge, or discard this patch.
htdocs/core/modules/facture/doc/pdf_sponge.modules.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1615,7 +1615,9 @@
 block discarded – undo
1615 1615
 		global $conf, $langs;
1616 1616
 
1617 1617
 		$ltrdirection = 'L';
1618
-		if ($outputlangs->trans("DIRECTION") == 'rtl') $ltrdirection = 'R';
1618
+		if ($outputlangs->trans("DIRECTION") == 'rtl') {
1619
+			$ltrdirection = 'R';
1620
+		}
1619 1621
 
1620 1622
 		// Load traductions files required by page
1621 1623
 		$outputlangs->loadLangs(array("main", "bills", "propal", "companies"));
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -354,7 +354,7 @@  discard block
 block discarded – undo
354 354
 					if (!empty($conf->mycompany->multidir_output[$object->entity])) {
355 355
 						$logodir = $conf->mycompany->multidir_output[$object->entity];
356 356
 					}
357
-					$pagecount = $pdf->setSourceFile($logodir.'/' . getDolGlobalString('MAIN_ADD_PDF_BACKGROUND'));
357
+					$pagecount = $pdf->setSourceFile($logodir.'/'.getDolGlobalString('MAIN_ADD_PDF_BACKGROUND'));
358 358
 					$tplidx = $pdf->importPage(1);
359 359
 				}
360 360
 
@@ -450,7 +450,7 @@  discard block
 block discarded – undo
450 450
 				// $pdf->GetY() here can't be used. It is bottom of the second addresse box but first one may be higher
451 451
 
452 452
 				// $this->tab_top is y where we must continue content (90 = 42 + 48: 42 is height of logo and ref, 48 is address blocks)
453
-				$this->tab_top = 90 + $top_shift + $shipp_shift;		// top_shift is an addition for linked objects or addons (0 in most cases)
453
+				$this->tab_top = 90 + $top_shift + $shipp_shift; // top_shift is an addition for linked objects or addons (0 in most cases)
454 454
 				$this->tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift : 10);
455 455
 
456 456
 				// You can add more thing under header here, if you increase $extra_under_address_shift too.
@@ -687,7 +687,7 @@  discard block
 block discarded – undo
687 687
 					}
688 688
 
689 689
 					$pdf->setTopMargin($this->tab_top_newpage);
690
-					$page_bottom_margin =  $this->heightforfooter + $this->heightforfreetext + $this->heightforinfotot + $this->getHeightForQRInvoice($pdf->getPage(), $object, $langs);
690
+					$page_bottom_margin = $this->heightforfooter + $this->heightforfreetext + $this->heightforinfotot + $this->getHeightForQRInvoice($pdf->getPage(), $object, $langs);
691 691
 					$pdf->setPageOrientation('', 1, $page_bottom_margin);
692 692
 					$pageposbefore = $pdf->getPage();
693 693
 
@@ -930,7 +930,7 @@  discard block
 block discarded – undo
930 930
 					if (!isset($this->tva[$vatrate])) {
931 931
 						$this->tva[$vatrate] = 0;
932 932
 					}
933
-					$this->tva[$vatrate] += $tvaligne;	// ->tva is abandonned, we use now ->tva_array that is more complete
933
+					$this->tva[$vatrate] += $tvaligne; // ->tva is abandonned, we use now ->tva_array that is more complete
934 934
 					$vatcode = $object->lines[$i]->vat_src_code;
935 935
 					if (empty($this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'])) {
936 936
 						$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] = 0;
@@ -1224,8 +1224,8 @@  discard block
 block discarded – undo
1224 1224
 			$posy = $pdf->GetY() + 4;
1225 1225
 		}
1226 1226
 
1227
-		$posxval = 52;	// Position of values of properties shown on left side
1228
-		$posxend = 110;	// End of x for text on left side
1227
+		$posxval = 52; // Position of values of properties shown on left side
1228
+		$posxend = 110; // End of x for text on left side
1229 1229
 		if ($this->page_largeur < 210) { // To work with US executive format
1230 1230
 			$posxend -= 10;
1231 1231
 		}
@@ -1255,7 +1255,7 @@  discard block
 block discarded – undo
1255 1255
 
1256 1256
 			$pdf->SetFont('', '', $default_font_size - 2);
1257 1257
 			$pdf->SetXY($posxval, $posy);
1258
-			$categoryOfOperationLabel = $outputlangs->transnoentities("MentionCategoryOfOperations" . $this->categoryOfOperation);
1258
+			$categoryOfOperationLabel = $outputlangs->transnoentities("MentionCategoryOfOperations".$this->categoryOfOperation);
1259 1259
 			$pdf->MultiCell($posxend - $posxval, 4, $categoryOfOperationLabel, 0, 'L');
1260 1260
 
1261 1261
 			$posy = $pdf->GetY() + 3; // for 2 lines
@@ -1300,7 +1300,7 @@  discard block
 block discarded – undo
1300 1300
 					require_once DOL_DOCUMENT_ROOT.'/societe/class/companybankaccount.class.php';
1301 1301
 					$bac = new CompanyBankAccount($this->db);
1302 1302
 					$bac->fetch(0, $object->thirdparty->id);
1303
-					$iban= $bac->iban.(($bac->iban && $bac->bic) ? ' / ' : '').$bac->bic;
1303
+					$iban = $bac->iban.(($bac->iban && $bac->bic) ? ' / ' : '').$bac->bic;
1304 1304
 					$lib_mode_reg .= ' '.$outputlangs->trans("PaymentTypePREdetails", dol_trunc($iban, 6, 'right', 'UTF-8', 1));
1305 1305
 				}
1306 1306
 
@@ -1989,7 +1989,7 @@  discard block
 block discarded – undo
1989 1989
 		if (empty($hidetop)) {
1990 1990
 			// Show category of operations
1991 1991
 			if (getDolGlobalInt('INVOICE_CATEGORY_OF_OPERATION') == 1 && $this->categoryOfOperation >= 0) {
1992
-				$categoryOfOperations = $outputlangs->transnoentities("MentionCategoryOfOperations") . ' : ' . $outputlangs->transnoentities("MentionCategoryOfOperations" . $this->categoryOfOperation);
1992
+				$categoryOfOperations = $outputlangs->transnoentities("MentionCategoryOfOperations").' : '.$outputlangs->transnoentities("MentionCategoryOfOperations".$this->categoryOfOperation);
1993 1993
 				$pdf->SetXY($this->marge_gauche, $tab_top - 4);
1994 1994
 				$pdf->MultiCell(($pdf->GetStringWidth($categoryOfOperations)) + 4, 2, $categoryOfOperations);
1995 1995
 			}
@@ -2103,7 +2103,7 @@  discard block
 block discarded – undo
2103 2103
 		}
2104 2104
 		if ($this->situationinvoice) {
2105 2105
 			$langs->loadLangs(array("other"));
2106
-			$title = $outputlangs->transnoentities("PDFInvoiceSituation") . " " . $outputlangs->transnoentities("NumberingShort") . $object->situation_counter . " -";
2106
+			$title = $outputlangs->transnoentities("PDFInvoiceSituation")." ".$outputlangs->transnoentities("NumberingShort").$object->situation_counter." -";
2107 2107
 		}
2108 2108
 		if (!empty($conf->global->PDF_USE_ALSO_LANGUAGE_CODE) && is_object($outputlangsbis)) {
2109 2109
 			$title .= ' - ';
@@ -2373,11 +2373,11 @@  discard block
 block discarded – undo
2373 2373
 					$contactshipping = $object->fetch_Contact($idaddressshipping[0]);
2374 2374
 					$companystatic = new Societe($this->db);
2375 2375
 					$companystatic->fetch($object->contact->fk_soc);
2376
-					$carac_client_name_shipping=pdfBuildThirdpartyName($object->contact, $outputlangs);
2376
+					$carac_client_name_shipping = pdfBuildThirdpartyName($object->contact, $outputlangs);
2377 2377
 					$carac_client_shipping = pdf_build_address($outputlangs, $this->emetteur, $companystatic, $object->contact, $usecontact, 'target', $object);
2378 2378
 				} else {
2379
-					$carac_client_name_shipping=pdfBuildThirdpartyName($object->thirdparty, $outputlangs);
2380
-					$carac_client_shipping=pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, '', 0, 'target', $object);
2379
+					$carac_client_name_shipping = pdfBuildThirdpartyName($object->thirdparty, $outputlangs);
2380
+					$carac_client_shipping = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, '', 0, 'target', $object);
2381 2381
 				}
2382 2382
 				if (!empty($carac_client_shipping)) {
2383 2383
 					$posy += $hautcadre;
@@ -2396,7 +2396,7 @@  discard block
 block discarded – undo
2396 2396
 					$posy = $pdf->getY();
2397 2397
 
2398 2398
 					// Show shipping information
2399
-					$pdf->SetXY($posx+2, $posy);
2399
+					$pdf->SetXY($posx + 2, $posy);
2400 2400
 					$pdf->SetFont('', '', $default_font_size - 1);
2401 2401
 					$pdf->MultiCell($widthrecbox - 2, 2, $carac_client_shipping, '', 'L');
2402 2402
 					$shipp_shift += $hautcadre;
Please login to merge, or discard this patch.
htdocs/api/class/api.class.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -129,11 +129,11 @@
 block discarded – undo
129 129
 		unset($object->barcode_type_code);
130 130
 		unset($object->barcode_type_label);
131 131
 
132
-		unset($object->mode_reglement);		// We use mode_reglement_id now
133
-		unset($object->cond_reglement);		// We use cond_reglement_id now
134
-		unset($object->note);				// We use note_public or note_private now
135
-		unset($object->contact);			// We use contact_id now
136
-		unset($object->thirdparty);			// We use thirdparty_id or fk_soc or socid now
132
+		unset($object->mode_reglement); // We use mode_reglement_id now
133
+		unset($object->cond_reglement); // We use cond_reglement_id now
134
+		unset($object->note); // We use note_public or note_private now
135
+		unset($object->contact); // We use contact_id now
136
+		unset($object->thirdparty); // We use thirdparty_id or fk_soc or socid now
137 137
 
138 138
 		unset($object->projet); // Should be fk_project
139 139
 		unset($object->project); // Should be fk_project
Please login to merge, or discard this patch.
htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1120,7 +1120,9 @@
 block discarded – undo
1120 1120
 		global $langs, $conf, $mysoc;
1121 1121
 
1122 1122
 		$ltrdirection = 'L';
1123
-		if ($outputlangs->trans("DIRECTION") == 'rtl') $ltrdirection = 'R';
1123
+		if ($outputlangs->trans("DIRECTION") == 'rtl') {
1124
+			$ltrdirection = 'R';
1125
+		}
1124 1126
 
1125 1127
 		// Load translation files required by the page
1126 1128
 		$outputlangs->loadLangs(array("main", "orders", "companies", "bills", "sendings"));
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 		$this->db = $db;
89 89
 		$this->name = "cornas";
90 90
 		$this->description = $langs->trans('SuppliersCommandModel');
91
-		$this->update_main_doc_field = 1;		// Save the name of generated file as the main doc when generating a doc with this template
91
+		$this->update_main_doc_field = 1; // Save the name of generated file as the main doc when generating a doc with this template
92 92
 
93 93
 		// Page size for A4 format
94 94
 		$this->type = 'pdf';
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
 				$pdf->SetFont(pdf_getPDFFont($outputlangs));
278 278
 				// Set path to the background PDF File
279 279
 				if (!empty($conf->global->MAIN_ADD_PDF_BACKGROUND)) {
280
-					$pagecount = $pdf->setSourceFile($conf->mycompany->dir_output.'/' . getDolGlobalString('MAIN_ADD_PDF_BACKGROUND'));
280
+					$pagecount = $pdf->setSourceFile($conf->mycompany->dir_output.'/'.getDolGlobalString('MAIN_ADD_PDF_BACKGROUND'));
281 281
 					$tplidx = $pdf->importPage(1);
282 282
 				}
283 283
 
Please login to merge, or discard this patch.