Completed
Branch develop (bd51fd)
by
unknown
16:36
created
htdocs/public/ticket/view.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -395,7 +395,7 @@  discard block
 block discarded – undo
395 395
 			$baseurl = getDolGlobalString('TICKET_URL_PUBLIC_INTERFACE', DOL_URL_ROOT.'/public/ticket/');
396 396
 
397 397
 			$formticket->param = array('track_id' => $object->dao->track_id, 'fk_user_create' => '-1',
398
-									   'returnurl' => $baseurl.'view.php'.(!empty($entity) && isModEnabled('multicompany')?'?entity='.$entity:''));
398
+									   'returnurl' => $baseurl.'view.php'.(!empty($entity) && isModEnabled('multicompany') ? '?entity='.$entity : ''));
399 399
 
400 400
 			$formticket->withfile = 2;
401 401
 			$formticket->withcancel = 1;
@@ -406,7 +406,7 @@  discard block
 block discarded – undo
406 406
 		if ($action != 'presend') {
407 407
 			$baseurl = getDolGlobalString('TICKET_URL_PUBLIC_INTERFACE', DOL_URL_ROOT.'/public/ticket/');
408 408
 
409
-			print '<form method="POST" id="form_view_ticket_list" name="form_view_ticket_list" action="'.$baseurl.'list.php'.(!empty($entity) && isModEnabled('multicompany')?'?entity='.$entity:'').'">';
409
+			print '<form method="POST" id="form_view_ticket_list" name="form_view_ticket_list" action="'.$baseurl.'list.php'.(!empty($entity) && isModEnabled('multicompany') ? '?entity='.$entity : '').'">';
410 410
 			print '<input type="hidden" name="token" value="'.newToken().'">';
411 411
 			print '<input type="hidden" name="action" value="view_ticketlist">';
412 412
 			print '<input type="hidden" name="track_id" value="'.$object->dao->track_id.'">';
Please login to merge, or discard this patch.
htdocs/public/ticket/create_ticket.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -405,7 +405,7 @@  discard block
 block discarded – undo
405 405
 
406 406
 						$sendto = GETPOST('email', 'alpha');
407 407
 
408
-						$from = getDolGlobalString('MAIN_INFO_SOCIETE_NOM') . ' <'.getDolGlobalString('TICKET_NOTIFICATION_EMAIL_FROM').'>';
408
+						$from = getDolGlobalString('MAIN_INFO_SOCIETE_NOM').' <'.getDolGlobalString('TICKET_NOTIFICATION_EMAIL_FROM').'>';
409 409
 						$replyto = $from;
410 410
 						$sendtocc = '';
411 411
 						$deliveryreceipt = 0;
@@ -450,7 +450,7 @@  discard block
 block discarded – undo
450 450
 							$message_admin .= '<p>'.$langs->trans('Message').' : <br>'.$object->message.'</p>';
451 451
 							$message_admin .= '<p><a href="'.dol_buildpath('/ticket/card.php', 2).'?track_id='.$object->track_id.'" rel="nofollow noopener">'.$langs->trans('SeeThisTicketIntomanagementInterface').'</a></p>';
452 452
 
453
-							$from = getDolGlobalString('MAIN_INFO_SOCIETE_NOM') . ' <' . getDolGlobalString('TICKET_NOTIFICATION_EMAIL_FROM').'>';
453
+							$from = getDolGlobalString('MAIN_INFO_SOCIETE_NOM').' <'.getDolGlobalString('TICKET_NOTIFICATION_EMAIL_FROM').'>';
454 454
 							$replyto = $from;
455 455
 
456 456
 							if (getDolGlobalString('TICKET_DISABLE_MAIL_AUTOCOPY_TO') !== '') {
Please login to merge, or discard this patch.
htdocs/public/ticket/list.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -384,9 +384,9 @@  discard block
 block discarded – undo
384 384
 		$sql .= " AND ((tc.source = 'external'";
385 385
 		$sql .= " AND tc.element='".$db->escape($object->element)."'";
386 386
 		$sql .= " AND tc.active=1";
387
-		$sql .= " AND sp.email='".$db->escape($_SESSION['email_customer'])."')";		// email found into an external contact
388
-		$sql .= " OR s.email='".$db->escape($_SESSION['email_customer'])."'";			// or email of the linked company
389
-		$sql .= " OR t.origin_email='".$db->escape($_SESSION['email_customer'])."')";	// or email of the requester
387
+		$sql .= " AND sp.email='".$db->escape($_SESSION['email_customer'])."')"; // email found into an external contact
388
+		$sql .= " OR s.email='".$db->escape($_SESSION['email_customer'])."'"; // or email of the linked company
389
+		$sql .= " OR t.origin_email='".$db->escape($_SESSION['email_customer'])."')"; // or email of the requester
390 390
 		// Manage filter
391 391
 		if (!empty($filter)) {
392 392
 			foreach ($filter as $key => $value) {
@@ -434,7 +434,7 @@  discard block
 block discarded – undo
434 434
 
435 435
 				// allow to display information before list
436 436
 				$parameters = array('arrayfields' => $arrayfields);
437
-				$reshook = $hookmanager->executeHooks('printFieldListHeader', $parameters, $object, $action);    // Note that $action and $object may have been modified by hook
437
+				$reshook = $hookmanager->executeHooks('printFieldListHeader', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
438 438
 				print $hookmanager->resPrint;
439 439
 
440 440
 				print '<div class="div-table-responsive">';
@@ -715,7 +715,7 @@  discard block
 block discarded – undo
715 715
 
716 716
 				$url_public_ticket = getDolGlobalString('TICKET_URL_PUBLIC_INTERFACE', dol_buildpath('/public/ticket/', 1));
717 717
 
718
-				print '<form method="POST" id="form_view_ticket" name="form_view_ticket" action="'.$url_public_ticket.'view.php'.(!empty($entity) && isModEnabled('multicompany')?'?entity='.$entity:'').'" style="display:none;">';
718
+				print '<form method="POST" id="form_view_ticket" name="form_view_ticket" action="'.$url_public_ticket.'view.php'.(!empty($entity) && isModEnabled('multicompany') ? '?entity='.$entity : '').'" style="display:none;">';
719 719
 				print '<input type="hidden" name="token" value="'.newToken().'">';
720 720
 				print '<input type="hidden" name="action" value="view_ticket">';
721 721
 				print '<input type="hidden" name="btn_view_ticket_list" value="1">';
Please login to merge, or discard this patch.
htdocs/compta/bank/card.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -129,9 +129,9 @@  discard block
 block discarded – undo
129 129
 		$object->ref = dol_string_nospecial(trim(GETPOST('ref', 'alpha')));
130 130
 		$object->label = trim(GETPOST("label", 'alphanohtml'));
131 131
 		$object->type = GETPOSTINT("type");
132
-		$object->courant = $object->type;	// deprecated
132
+		$object->courant = $object->type; // deprecated
133 133
 		$object->status = GETPOSTINT("clos");
134
-		$object->clos = $object->status;	// deprecated
134
+		$object->clos = $object->status; // deprecated
135 135
 		$object->rappro = (GETPOST("norappro", 'alpha') ? 0 : 1);
136 136
 		$object->url = trim(GETPOST("url", 'alpha'));
137 137
 
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
 		$object->pti_in_ctti = empty(GETPOST("pti_in_ctti")) ? 0 : 1;
146 146
 
147 147
 		$object->address = trim(GETPOST("account_address", "alphanohtml"));
148
-		$object->domiciliation = $object->address;	// deprecated
148
+		$object->domiciliation = $object->address; // deprecated
149 149
 
150 150
 		$object->proprio = trim(GETPOST("proprio", 'alphanohtml'));
151 151
 		$object->owner_address = trim(GETPOST("owner_address", 'alphanohtml'));
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 		}
171 171
 
172 172
 		$object->balance = GETPOSTFLOAT("solde");
173
-		$object->solde = $object->balance;	// deprecated
173
+		$object->solde = $object->balance; // deprecated
174 174
 		$object->date_solde = dol_mktime(12, 0, 0, GETPOSTINT("remonth"), GETPOSTINT('reday'), GETPOSTINT("reyear"));
175 175
 
176 176
 		$object->currency_code = trim(GETPOST("account_currency_code"));
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
 			$urltogo = preg_replace('/--IDFORBACKTOPAGE--/', (string) $object->id, $urltogo); // New method to autoselect project after a New on another form object creation
229 229
 
230 230
 			if (empty($noback)) {
231
-				header("Location: " . $urltogo);
231
+				header("Location: ".$urltogo);
232 232
 				exit;
233 233
 			}
234 234
 		} else {
@@ -346,7 +346,7 @@  discard block
 block discarded – undo
346 346
 
347 347
 		if ($result > 0) {
348 348
 			setEventMessages($langs->trans("RecordDeleted"), null, 'mesgs');
349
-			header("Location: " . DOL_URL_ROOT . "/compta/bank/list.php");
349
+			header("Location: ".DOL_URL_ROOT."/compta/bank/list.php");
350 350
 			exit;
351 351
 		} else {
352 352
 			setEventMessages($object->error, $object->errors, 'errors');
@@ -592,7 +592,7 @@  discard block
 block discarded – undo
592 592
 		if (isModEnabled('paymentbybanktransfer')) {
593 593
 			if ($mysoc->isInEEC()) {
594 594
 				print '<tr><td>'.$form->textwithpicto($langs->trans("SEPAXMLPlacePaymentTypeInformationInCreditTransfertransactionInformation"), $langs->trans("SEPAXMLPlacePaymentTypeInformationInCreditTransfertransactionInformationHelp")).'</td>';
595
-				print '<td><input type="checkbox" class="flat" name="pti_in_ctti"'. (empty(GETPOST('pti_in_ctti')) ? '' : ' checked ') . '>';
595
+				print '<td><input type="checkbox" class="flat" name="pti_in_ctti"'.(empty(GETPOST('pti_in_ctti')) ? '' : ' checked ').'>';
596 596
 				print '</td></tr>';
597 597
 			}
598 598
 		}
@@ -1184,7 +1184,7 @@  discard block
 block discarded – undo
1184 1184
 				}
1185 1185
 				if ($mysoc->isInEEC()) {
1186 1186
 					print '<tr><td>'.$form->textwithpicto($langs->trans("SEPAXMLPlacePaymentTypeInformationInCreditTransfertransactionInformation"), $langs->trans("SEPAXMLPlacePaymentTypeInformationInCreditTransfertransactionInformationHelp")).'</td>';
1187
-					print '<td><input type="checkbox" class="flat" name="pti_in_ctti"'. ($object->pti_in_ctti ? ' checked ' : '') . '>';
1187
+					print '<td><input type="checkbox" class="flat" name="pti_in_ctti"'.($object->pti_in_ctti ? ' checked ' : '').'>';
1188 1188
 					print '</td></tr>';
1189 1189
 				}
1190 1190
 			}
Please login to merge, or discard this patch.
htdocs/compta/bank/class/account.class.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -503,13 +503,13 @@  discard block
 block discarded – undo
503 503
 		$sql = "INSERT INTO ".MAIN_DB_PREFIX."bank_url (";
504 504
 		$sql .= "fk_bank";
505 505
 		$sql .= ", url_id";
506
-		$sql .= ", url";		// deprecated
506
+		$sql .= ", url"; // deprecated
507 507
 		$sql .= ", label";
508 508
 		$sql .= ", type";
509 509
 		$sql .= ") VALUES (";
510 510
 		$sql .= ((int) $line_id);
511 511
 		$sql .= ", ".((int) $url_id);
512
-		$sql .= ", '".$this->db->escape($url)."'";		// deprecated
512
+		$sql .= ", '".$this->db->escape($url)."'"; // deprecated
513 513
 		$sql .= ", '".$this->db->escape($label)."'";
514 514
 		$sql .= ", '".$this->db->escape($type)."'";
515 515
 		$sql .= ")";
@@ -1364,7 +1364,7 @@  discard block
 block discarded – undo
1364 1364
 		$sql .= " WHERE b.rappro=0";
1365 1365
 		$sql .= " AND b.fk_account = ba.rowid";
1366 1366
 		$sql .= " AND ba.entity IN (".getEntity('bank_account').")";
1367
-		$sql .= " AND (ba.rappro = 1 AND ba.courant != " . Account::TYPE_CASH . ")"; // Compte rapprochable
1367
+		$sql .= " AND (ba.rappro = 1 AND ba.courant != ".Account::TYPE_CASH.")"; // Compte rapprochable
1368 1368
 		$sql .= " AND clos = 0";
1369 1369
 		if ($filteraccountid) {
1370 1370
 			$sql .= " AND ba.rowid = ".((int) $filteraccountid);
@@ -1460,7 +1460,7 @@  discard block
 block discarded – undo
1460 1460
 		$sql .= " WHERE ba.rappro > 0 and ba.clos = 0";
1461 1461
 		$sql .= " AND ba.entity IN (".getEntity('bank_account').")";
1462 1462
 		if (!getDolGlobalString('BANK_CAN_RECONCILIATE_CASHACCOUNT')) {
1463
-			$sql .= " AND ba.courant != " . Account::TYPE_CASH;
1463
+			$sql .= " AND ba.courant != ".Account::TYPE_CASH;
1464 1464
 		}
1465 1465
 		$resql = $this->db->query($sql);
1466 1466
 		if ($resql) {
@@ -1508,9 +1508,9 @@  discard block
 block discarded – undo
1508 1508
 		}
1509 1509
 		// show categories for this record only in ajax to not overload lists
1510 1510
 		if (isModEnabled('category') && !$nofetch) {
1511
-			require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
1511
+			require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
1512 1512
 			$form = new Form($this->db);
1513
-			$datas['categories'] = '<br>' . $form->showCategories($this->id, Categorie::TYPE_ACCOUNT, 1);
1513
+			$datas['categories'] = '<br>'.$form->showCategories($this->id, Categorie::TYPE_ACCOUNT, 1);
1514 1514
 		}
1515 1515
 
1516 1516
 		return $datas;
@@ -1634,7 +1634,7 @@  discard block
 block discarded – undo
1634 1634
 			$this->error = 'SwiftNotValid';
1635 1635
 		}
1636 1636
 
1637
-		if (! $error) {
1637
+		if (!$error) {
1638 1638
 			return 1;
1639 1639
 		} else {
1640 1640
 			return 0;
@@ -2491,7 +2491,7 @@  discard block
 block discarded – undo
2491 2491
 
2492 2492
 		// Check statement field
2493 2493
 		if (getDolGlobalString('BANK_STATEMENT_REGEX_RULE')) {
2494
-			if (!preg_match('/' . getDolGlobalString('BANK_STATEMENT_REGEX_RULE').'/', $this->num_releve)) {
2494
+			if (!preg_match('/'.getDolGlobalString('BANK_STATEMENT_REGEX_RULE').'/', $this->num_releve)) {
2495 2495
 				$this->errors[] = $langs->trans("ErrorBankStatementNameMustFollowRegex", getDolGlobalString('BANK_STATEMENT_REGEX_RULE'));
2496 2496
 				return -1;
2497 2497
 			}
Please login to merge, or discard this patch.
htdocs/accountancy/journal/bankjournal.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
 $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."bank_url as bu4 ON bu4.fk_bank = b.rowid AND bu4.type='payment_supplier'";
155 155
 $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as soc on bu1.url_id=soc.rowid";
156 156
 if (getDolGlobalString('MAIN_COMPANY_PERENTITY_SHARED')) {
157
-	$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "societe_perentity as spe ON spe.fk_soc = soc.rowid AND spe.entity = " . ((int) $conf->entity);
157
+	$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_perentity as spe ON spe.fk_soc = soc.rowid AND spe.entity = ".((int) $conf->entity);
158 158
 }
159 159
 $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."user as u on bu2.url_id=u.rowid";
160 160
 $sql .= " WHERE ba.fk_accountancy_journal=".((int) $id_journal);
@@ -667,7 +667,7 @@  discard block
 block discarded – undo
667 667
 			// Line into bank account
668 668
 			foreach ($tabbq[$key] as $k => $mt) {
669 669
 				if ($mt) {
670
-					$accountingaccount->fetch(null, $k, true);	// $k is accounting bank account. TODO We should use a cache here to avoid this fetch
670
+					$accountingaccount->fetch(null, $k, true); // $k is accounting bank account. TODO We should use a cache here to avoid this fetch
671 671
 					$account_label = $accountingaccount->label;
672 672
 
673 673
 					$reflabel = '';
@@ -783,43 +783,43 @@  discard block
 block discarded – undo
783 783
 						} elseif (in_array($tabtype[$key], array('sc', 'payment_sc'))) {   // If payment is payment of social contribution
784 784
 							$bookkeeping->subledger_account = '';
785 785
 							$bookkeeping->subledger_label = '';
786
-							$accountingaccount->fetch(null, $k, true);	// TODO Use a cache
786
+							$accountingaccount->fetch(null, $k, true); // TODO Use a cache
787 787
 							$bookkeeping->numero_compte = $k;
788 788
 							$bookkeeping->label_compte = $accountingaccount->label;
789 789
 						} elseif ($tabtype[$key] == 'payment_vat') {
790 790
 							$bookkeeping->subledger_account = '';
791 791
 							$bookkeeping->subledger_label = '';
792
-							$accountingaccount->fetch(null, $k, true);		// TODO Use a cache
792
+							$accountingaccount->fetch(null, $k, true); // TODO Use a cache
793 793
 							$bookkeeping->numero_compte = $k;
794 794
 							$bookkeeping->label_compte = $accountingaccount->label;
795 795
 						} elseif ($tabtype[$key] == 'payment_donation') {
796 796
 							$bookkeeping->subledger_account = '';
797 797
 							$bookkeeping->subledger_label = '';
798
-							$accountingaccount->fetch(null, $k, true);		// TODO Use a cache
798
+							$accountingaccount->fetch(null, $k, true); // TODO Use a cache
799 799
 							$bookkeeping->numero_compte = $k;
800 800
 							$bookkeeping->label_compte = $accountingaccount->label;
801 801
 						} elseif ($tabtype[$key] == 'member') {
802 802
 							$bookkeeping->subledger_account = '';
803 803
 							$bookkeeping->subledger_label = '';
804
-							$accountingaccount->fetch(null, $k, true);		// TODO Use a cache
804
+							$accountingaccount->fetch(null, $k, true); // TODO Use a cache
805 805
 							$bookkeeping->numero_compte = $k;
806 806
 							$bookkeeping->label_compte = $accountingaccount->label;
807 807
 						} elseif ($tabtype[$key] == 'payment_loan') {
808 808
 							$bookkeeping->subledger_account = '';
809 809
 							$bookkeeping->subledger_label = '';
810
-							$accountingaccount->fetch(null, $k, true);		// TODO Use a cache
810
+							$accountingaccount->fetch(null, $k, true); // TODO Use a cache
811 811
 							$bookkeeping->numero_compte = $k;
812 812
 							$bookkeeping->label_compte = $accountingaccount->label;
813 813
 						} elseif ($tabtype[$key] == 'payment_various') {
814 814
 							$bookkeeping->subledger_account = $k;
815 815
 							$bookkeeping->subledger_label = $tabcompany[$key]['name'];
816
-							$accountingaccount->fetch(null, $tabpay[$key]["account_various"], true);	// TODO Use a cache
816
+							$accountingaccount->fetch(null, $tabpay[$key]["account_various"], true); // TODO Use a cache
817 817
 							$bookkeeping->numero_compte = $tabpay[$key]["account_various"];
818 818
 							$bookkeeping->label_compte = $accountingaccount->label;
819 819
 						} elseif ($tabtype[$key] == 'banktransfert') {
820 820
 							$bookkeeping->subledger_account = '';
821 821
 							$bookkeeping->subledger_label = '';
822
-							$accountingaccount->fetch(null, $k, true);		// TODO Use a cache
822
+							$accountingaccount->fetch(null, $k, true); // TODO Use a cache
823 823
 							$bookkeeping->numero_compte = $k;
824 824
 							$bookkeeping->label_compte = $accountingaccount->label;
825 825
 						} else {
@@ -850,7 +850,7 @@  discard block
 block discarded – undo
850 850
 							}
851 851
 						} else {
852 852
 							if ($lettering && getDolGlobalInt('ACCOUNTING_ENABLE_LETTERING') && getDolGlobalInt('ACCOUNTING_ENABLE_AUTOLETTERING')) {
853
-								require_once DOL_DOCUMENT_ROOT . '/accountancy/class/lettering.class.php';
853
+								require_once DOL_DOCUMENT_ROOT.'/accountancy/class/lettering.class.php';
854 854
 								$lettering_static = new Lettering($db);
855 855
 								$nb_lettering = $lettering_static->bookkeepingLetteringAll(array($bookkeeping->id));
856 856
 							}
@@ -1112,7 +1112,7 @@  discard block
 block discarded – undo
1112 1112
 		1 => $langs->trans("TransfertAllBankLines"),
1113 1113
 		2 => $langs->trans("TransfertOnlyConciliatedBankLine")
1114 1114
 	);
1115
-	$moreoptions = [ "BankLineConciliated" => $form->selectarray('only_rappro', $listofchoices, $only_rappro)];
1115
+	$moreoptions = ["BankLineConciliated" => $form->selectarray('only_rappro', $listofchoices, $only_rappro)];
1116 1116
 
1117 1117
 	journalHead($nom, '', $period, $periodlink, $description, $builddate, $exportlink, array('action' => ''), '', $varlink, $moreoptions);
1118 1118
 
@@ -1274,7 +1274,7 @@  discard block
 block discarded – undo
1274 1274
 
1275 1275
 				// Label operation
1276 1276
 				print '<td>';
1277
-				print $reflabel;	// This is already html escaped content
1277
+				print $reflabel; // This is already html escaped content
1278 1278
 				print "</td>";
1279 1279
 
1280 1280
 				print '<td class="center">'.$val["type_payment"]."</td>";
@@ -1367,7 +1367,7 @@  discard block
 block discarded – undo
1367 1367
 						}
1368 1368
 					}
1369 1369
 					print '<td class="maxwidth300" title="'.dol_escape_htmltag(dol_string_nohtmltag($accounttoshow)).'">';
1370
-					print $accounttoshow;	// This is a HTML string
1370
+					print $accounttoshow; // This is a HTML string
1371 1371
 					print "</td>";
1372 1372
 
1373 1373
 					// Subledger account
@@ -1396,7 +1396,7 @@  discard block
 block discarded – undo
1396 1396
 						}
1397 1397
 					}
1398 1398
 					print '<td class="maxwidth300">';
1399
-					print $accounttoshowsubledger;	// This is a html string
1399
+					print $accounttoshowsubledger; // This is a html string
1400 1400
 					print "</td>";
1401 1401
 
1402 1402
 					print "<td>".$reflabel."</td>";
Please login to merge, or discard this patch.
htdocs/accountancy/journal/sellsjournal.php 1 patch
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -140,13 +140,13 @@  discard block
 block discarded – undo
140 140
 $sql .= " FROM ".MAIN_DB_PREFIX."facturedet as fd";
141 141
 $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON p.rowid = fd.fk_product";
142 142
 if (getDolGlobalString('MAIN_PRODUCT_PERENTITY_SHARED')) {
143
-	$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = " . ((int) $conf->entity);
143
+	$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = ".((int) $conf->entity);
144 144
 }
145 145
 $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa ON aa.rowid = fd.fk_code_ventilation";
146 146
 $sql .= " JOIN ".MAIN_DB_PREFIX."facture as f ON f.rowid = fd.fk_facture";
147 147
 $sql .= " JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = f.fk_soc";
148 148
 if (getDolGlobalString('MAIN_COMPANY_PERENTITY_SHARED')) {
149
-	$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "societe_perentity as spe ON spe.fk_soc = s.rowid AND spe.entity = " . ((int) $conf->entity);
149
+	$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_perentity as spe ON spe.fk_soc = s.rowid AND spe.entity = ".((int) $conf->entity);
150 150
 }
151 151
 $parameters = array();
152 152
 $reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters); // Note that $action and $object may have been modified by hook
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
 
222 222
 		//$compta_revenuestamp = getDolGlobalString('ACCOUNTING_REVENUESTAMP_SOLD_ACCOUNT', 'NotDefined');
223 223
 
224
-		$tax_id = $obj->tva_tx . ($obj->vat_src_code ? ' (' . $obj->vat_src_code . ')' : '');
224
+		$tax_id = $obj->tva_tx.($obj->vat_src_code ? ' ('.$obj->vat_src_code.')' : '');
225 225
 		if (array_key_exists($tax_id, $vatdata_cache)) {
226 226
 			$vatdata = $vatdata_cache[$tax_id];
227 227
 		} else {
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
 
299 299
 		// Move a part of the retained warrenty into the account of warranty
300 300
 		if (getDolGlobalString('INVOICE_USE_RETAINED_WARRANTY') && $obj->retained_warranty > 0) {
301
-			$retained_warranty = (float) price2num($total_ttc * $obj->retained_warranty / 100, 'MT');	// Calculate the amount of warrenty for this line (using the percent value)
301
+			$retained_warranty = (float) price2num($total_ttc * $obj->retained_warranty / 100, 'MT'); // Calculate the amount of warrenty for this line (using the percent value)
302 302
 			$tabwarranty[$obj->rowid][$compta_soc] += $retained_warranty;
303 303
 			$total_ttc -= $retained_warranty;
304 304
 		}
@@ -489,7 +489,7 @@  discard block
 block discarded – undo
489 489
 					$bookkeeping->numero_compte = getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER_RETAINED_WARRANTY');
490 490
 					$bookkeeping->label_compte = $accountingaccountcustomerwarranty->label;
491 491
 
492
-					$bookkeeping->label_operation = dol_trunc($companystatic->name, 16) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("Retainedwarranty");
492
+					$bookkeeping->label_operation = dol_trunc($companystatic->name, 16).' - '.$invoicestatic->ref.' - '.$langs->trans("Retainedwarranty");
493 493
 					$bookkeeping->montant = $mt;
494 494
 					$bookkeeping->sens = ($mt >= 0) ? 'D' : 'C';
495 495
 					$bookkeeping->debit = ($mt >= 0) ? $mt : 0;
@@ -567,7 +567,7 @@  discard block
 block discarded – undo
567 567
 					}
568 568
 				} else {
569 569
 					if (getDolGlobalInt('ACCOUNTING_ENABLE_LETTERING') && getDolGlobalInt('ACCOUNTING_ENABLE_AUTOLETTERING')) {
570
-						require_once DOL_DOCUMENT_ROOT . '/accountancy/class/lettering.class.php';
570
+						require_once DOL_DOCUMENT_ROOT.'/accountancy/class/lettering.class.php';
571 571
 						$lettering_static = new Lettering($db);
572 572
 
573 573
 						$nb_lettering = $lettering_static->bookkeepingLettering(array($bookkeeping->id));
@@ -579,7 +579,7 @@  discard block
 block discarded – undo
579 579
 		// Product / Service
580 580
 		if (!$errorforline) {
581 581
 			foreach ($tabht[$key] as $k => $mt) {
582
-				$resultfetch = $accountingaccount->fetch(null, $k, true);	// TODO Use a cache
582
+				$resultfetch = $accountingaccount->fetch(null, $k, true); // TODO Use a cache
583 583
 				$label_account = $accountingaccount->label;
584 584
 
585 585
 				// get compte id and label
@@ -655,7 +655,7 @@  discard block
 block discarded – undo
655 655
 
656 656
 				foreach ($arrayofvat[$key] as $k => $mt) {
657 657
 					if ($mt) {
658
-						$accountingaccount->fetch(null, $k, true);	// TODO Use a cache for label
658
+						$accountingaccount->fetch(null, $k, true); // TODO Use a cache for label
659 659
 						$label_account = $accountingaccount->label;
660 660
 
661 661
 						$bookkeeping = new BookKeeping($db);
@@ -716,7 +716,7 @@  discard block
 block discarded – undo
716 716
 			if (isset($tabrevenuestamp[$key]) && is_array($tabrevenuestamp[$key])) {
717 717
 				foreach ($tabrevenuestamp[$key] as $k => $mt) {
718 718
 					if ($mt) {
719
-						$accountingaccount->fetch(null, $k, true);    // TODO Use a cache for label
719
+						$accountingaccount->fetch(null, $k, true); // TODO Use a cache for label
720 720
 						$label_account = $accountingaccount->label;
721 721
 
722 722
 						$bookkeeping = new BookKeeping($db);
@@ -735,7 +735,7 @@  discard block
 block discarded – undo
735 735
 						$bookkeeping->numero_compte = $k;
736 736
 						$bookkeeping->label_compte = $label_account;
737 737
 
738
-						$bookkeeping->label_operation = dol_trunc($companystatic->name, 16) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("RevenueStamp");
738
+						$bookkeeping->label_operation = dol_trunc($companystatic->name, 16).' - '.$invoicestatic->ref.' - '.$langs->trans("RevenueStamp");
739 739
 						$bookkeeping->montant = $mt;
740 740
 						$bookkeeping->sens = ($mt < 0) ? 'D' : 'C';
741 741
 						$bookkeeping->debit = ($mt < 0) ? -$mt : 0;
@@ -837,7 +837,7 @@  discard block
 block discarded – undo
837 837
 	foreach ($tabfac as $key => $val) {
838 838
 		$companystatic->id = $tabcompany[$key]['id'];
839 839
 		$companystatic->name = $tabcompany[$key]['name'];
840
-		$companystatic->code_compta = $tabcompany[$key]['code_compta'];				// deprecated
840
+		$companystatic->code_compta = $tabcompany[$key]['code_compta']; // deprecated
841 841
 		$companystatic->code_compta_client = $tabcompany[$key]['code_compta'];
842 842
 		$companystatic->code_client = $tabcompany[$key]['code_client'];
843 843
 		$companystatic->client = 3;
@@ -1021,7 +1021,7 @@  discard block
 block discarded – undo
1021 1021
 	}
1022 1022
 
1023 1023
 	// Button to write into Ledger
1024
-	$acctCustomerNotConfigured = in_array(getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER'), ['','-1']);
1024
+	$acctCustomerNotConfigured = in_array(getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER'), ['', '-1']);
1025 1025
 	if ($acctCustomerNotConfigured) {
1026 1026
 		print '<br><div class="warning">'.img_warning().' '.$langs->trans("SomeMandatoryStepsOfSetupWereNotDone");
1027 1027
 		$desc = ' : '.$langs->trans("AccountancyAreaDescMisc", 4, '{link}');
@@ -1155,13 +1155,13 @@  discard block
 block discarded – undo
1155 1155
 			foreach ($tabwarranty[$key] as $k => $mt) {
1156 1156
 				print '<tr class="oddeven">';
1157 1157
 				print "<!-- Thirdparty warranty -->";
1158
-				print "<td>" . $date . "</td>";
1159
-				print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
1158
+				print "<td>".$date."</td>";
1159
+				print "<td>".$invoicestatic->getNomUrl(1)."</td>";
1160 1160
 				// Account
1161 1161
 				print "<td>";
1162 1162
 				$accountoshow = length_accountg(getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER_RETAINED_WARRANTY'));
1163 1163
 				if (($accountoshow == "") || $accountoshow == 'NotDefined') {
1164
-					print '<span class="error">' . $langs->trans("MainAccountForRetainedWarrantyNotDefined") . '</span>';
1164
+					print '<span class="error">'.$langs->trans("MainAccountForRetainedWarrantyNotDefined").'</span>';
1165 1165
 				} else {
1166 1166
 					print $accountoshow;
1167 1167
 				}
@@ -1170,14 +1170,14 @@  discard block
 block discarded – undo
1170 1170
 				print "<td>";
1171 1171
 				$accountoshow = length_accounta($k);
1172 1172
 				if (($accountoshow == "") || $accountoshow == 'NotDefined') {
1173
-					print '<span class="error">' . $langs->trans("ThirdpartyAccountNotDefined") . '</span>';
1173
+					print '<span class="error">'.$langs->trans("ThirdpartyAccountNotDefined").'</span>';
1174 1174
 				} else {
1175 1175
 					print $accountoshow;
1176 1176
 				}
1177 1177
 				print '</td>';
1178
-				print "<td>" . $companystatic->getNomUrl(0, 'customer', 16) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("Retainedwarranty") . "</td>";
1179
-				print '<td class="right nowraponall amount">' . ($mt >= 0 ? price($mt) : '') . "</td>";
1180
-				print '<td class="right nowraponall amount">' . ($mt < 0 ? price(-$mt) : '') . "</td>";
1178
+				print "<td>".$companystatic->getNomUrl(0, 'customer', 16).' - '.$invoicestatic->ref.' - '.$langs->trans("Retainedwarranty")."</td>";
1179
+				print '<td class="right nowraponall amount">'.($mt >= 0 ? price($mt) : '')."</td>";
1180
+				print '<td class="right nowraponall amount">'.($mt < 0 ? price(-$mt) : '')."</td>";
1181 1181
 				print "</tr>";
1182 1182
 			}
1183 1183
 		}
@@ -1239,7 +1239,7 @@  discard block
 block discarded – undo
1239 1239
 					print length_accounta($tabcompany[$key]['code_compta']);
1240 1240
 				}
1241 1241
 			} elseif (($accountoshow == "") || $accountoshow == 'NotDefined') {
1242
-				print '<span class="error">' . $langs->trans("ThirdpartyAccountNotDefined") . '</span>';
1242
+				print '<span class="error">'.$langs->trans("ThirdpartyAccountNotDefined").'</span>';
1243 1243
 			}
1244 1244
 			print '</td>';
1245 1245
 			$companystatic->id = $tabcompany[$key]['id'];
@@ -1303,13 +1303,13 @@  discard block
 block discarded – undo
1303 1303
 			foreach ($tabrevenuestamp[$key] as $k => $mt) {
1304 1304
 				print '<tr class="oddeven">';
1305 1305
 				print "<!-- Thirdparty revenuestamp -->";
1306
-				print "<td>" . $date . "</td>";
1307
-				print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
1306
+				print "<td>".$date."</td>";
1307
+				print "<td>".$invoicestatic->getNomUrl(1)."</td>";
1308 1308
 				// Account
1309 1309
 				print "<td>";
1310 1310
 				$accountoshow = length_accountg($k);
1311 1311
 				if (($accountoshow == "") || $accountoshow == 'NotDefined') {
1312
-					print '<span class="error">' . $langs->trans("MainAccountForRevenueStampSaleNotDefined") . '</span>';
1312
+					print '<span class="error">'.$langs->trans("MainAccountForRevenueStampSaleNotDefined").'</span>';
1313 1313
 				} else {
1314 1314
 					print $accountoshow;
1315 1315
 				}
@@ -1317,9 +1317,9 @@  discard block
 block discarded – undo
1317 1317
 				// Subledger account
1318 1318
 				print "<td>";
1319 1319
 				print '</td>';
1320
-				print "<td>" . $companystatic->getNomUrl(0, 'customer', 16) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("RevenueStamp") . "</td>";
1321
-				print '<td class="right nowraponall amount">' . ($mt < 0 ? price(-$mt) : '') . "</td>";
1322
-				print '<td class="right nowraponall amount">' . ($mt >= 0 ? price($mt) : '') . "</td>";
1320
+				print "<td>".$companystatic->getNomUrl(0, 'customer', 16).' - '.$invoicestatic->ref.' - '.$langs->trans("RevenueStamp")."</td>";
1321
+				print '<td class="right nowraponall amount">'.($mt < 0 ? price(-$mt) : '')."</td>";
1322
+				print '<td class="right nowraponall amount">'.($mt >= 0 ? price($mt) : '')."</td>";
1323 1323
 				print "</tr>";
1324 1324
 			}
1325 1325
 		}
Please login to merge, or discard this patch.
htdocs/core/class/html.formactions.class.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
 
244 244
 			$error = 0;
245 245
 			if (empty($reshook)) {
246
-				print '<!-- formactions->showactions -->' . "\n";
246
+				print '<!-- formactions->showactions -->'."\n";
247 247
 				print load_fiche_titre($title, $morehtmlright, '', 0, 0, '', $morehtmlcenter);
248 248
 			}
249 249
 
@@ -388,7 +388,7 @@  discard block
 block discarded – undo
388 388
 		$caction = new CActionComm($this->db);
389 389
 
390 390
 		// Suggest a list with manual events or all auto events
391
-		$arraylist = $caction->liste_array(1, 'code', $excludetype, $onlyautoornot, '', 0);		// If we use param 'all' instead of 'code', there is no group by include in answer but the key 'type' of answer array contains the key for the group by.
391
+		$arraylist = $caction->liste_array(1, 'code', $excludetype, $onlyautoornot, '', 0); // If we use param 'all' instead of 'code', there is no group by include in answer but the key 'type' of answer array contains the key for the group by.
392 392
 		if (empty($multiselect)) {
393 393
 			// Add empty line at start only if no multiselect
394 394
 			array_unshift($arraylist, '&nbsp;');
Please login to merge, or discard this patch.
htdocs/core/lib/functions_fi.lib.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -46,15 +46,15 @@  discard block
 block discarded – undo
46 46
 			$sum += (int) $invoice_number[$i] * $coefficients[$i % 5];
47 47
 		}
48 48
 		$check_digit = (10 - ($sum % 10)) % 10; // Calculate the check digit
49
-		$bank_reference_fi = strrev($invoice_number) . $check_digit; // Concatenate the Reversed reference number and the check digit
49
+		$bank_reference_fi = strrev($invoice_number).$check_digit; // Concatenate the Reversed reference number and the check digit
50 50
 		if ($use_rf) { // SEPA RF creditor reference
51
-			$reference_with_suffix = $bank_reference_fi . "271500"; // Append "271500" to the end of the payment reference number
51
+			$reference_with_suffix = $bank_reference_fi."271500"; // Append "271500" to the end of the payment reference number
52 52
 			$remainder = (int) bcmod($reference_with_suffix, '97'); // Calculate the remainder when dividing by 97
53 53
 			$check_digit = 98 - $remainder; // Subtract the remainder from 98
54 54
 			if ($check_digit < 10) { // If below 10 -> add leading zero
55
-				$check_digit = '0' . $check_digit;
55
+				$check_digit = '0'.$check_digit;
56 56
 			}
57
-			$bank_reference = "RF" . $check_digit . $bank_reference_fi; // Add "RF" and the check digit in front of the payment reference number
57
+			$bank_reference = "RF".$check_digit.$bank_reference_fi; // Add "RF" and the check digit in front of the payment reference number
58 58
 		} else { // FI payment reference number
59 59
 			$bank_reference = $bank_reference_fi;
60 60
 		}
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 			$recipient_account = preg_replace('/[^0-9]/', '', $recipient_account); // Remove non-numeric characters from account number
82 82
 			$recipient_account = str_pad($recipient_account, 16, '0', STR_PAD_LEFT); // Add leading zeros if necessary
83 83
 			$referencetobarcode = preg_replace('/[^0-9]/', '', $bank_reference); // Remove non-numeric characters (spaces)
84
-			$referencetobarcode = substr($referencetobarcode, 0, 2) . str_pad(substr($referencetobarcode, 2), 21, '0', STR_PAD_LEFT);
84
+			$referencetobarcode = substr($referencetobarcode, 0, 2).str_pad(substr($referencetobarcode, 2), 21, '0', STR_PAD_LEFT);
85 85
 			$euros = floor(floatval($amount)); // Separate euros and cents
86 86
 			$cents = round((floatval($amount) - $euros) * 100);
87 87
 			$due_date = date('ymd', (int) $due_date); // Format the due date to YYMMDD
Please login to merge, or discard this patch.