Completed
Branch develop (896bab)
by
unknown
21:08
created
htdocs/accountancy/bookkeeping/card.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -547,7 +547,7 @@  discard block
 block discarded – undo
547 547
 		if ($mode != "_tmp") {
548 548
 			// Date document export
549 549
 			print '<tr>';
550
-			print '<td class="titlefield">' . $langs->trans("DateExport") . '</td>';
550
+			print '<td class="titlefield">'.$langs->trans("DateExport").'</td>';
551 551
 			print '<td>';
552 552
 			print $object->date_export ? dol_print_date($object->date_export, 'dayhour') : '&nbsp;';
553 553
 			print '</td>';
@@ -555,7 +555,7 @@  discard block
 block discarded – undo
555 555
 
556 556
 			// Date document validation
557 557
 			print '<tr>';
558
-			print '<td class="titlefield">' . $langs->trans("DateValidation") . '</td>';
558
+			print '<td class="titlefield">'.$langs->trans("DateValidation").'</td>';
559 559
 			print '<td>';
560 560
 			print $object->date_validation ? dol_print_date($object->date_validation, 'dayhour') : '&nbsp;';
561 561
 			print '</td>';
@@ -612,7 +612,7 @@  discard block
 block discarded – undo
612 612
 
613 613
 		print '<br>';
614 614
 
615
-		$result = $object->fetchAllPerMvt($piece_num, $mode);	// This load $object->linesmvt
615
+		$result = $object->fetchAllPerMvt($piece_num, $mode); // This load $object->linesmvt
616 616
 
617 617
 		if ($result < 0) {
618 618
 			setEventMessages($object->error, $object->errors, 'errors');
@@ -708,14 +708,14 @@  discard block
 block discarded – undo
708 708
 							if (!empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX)) {
709 709
 								print $formaccounting->select_auxaccount('', 'subledger_account', 1, 'maxwidth250', '', 'subledger_label');
710 710
 							} else {
711
-								print '<input type="text" class="maxwidth150" name="subledger_account" value="" placeholder="' . dol_escape_htmltag($langs->trans("SubledgerAccount")) . '">';
711
+								print '<input type="text" class="maxwidth150" name="subledger_account" value="" placeholder="'.dol_escape_htmltag($langs->trans("SubledgerAccount")).'">';
712 712
 							}
713
-							print '<br><input type="text" class="maxwidth150" name="subledger_label" value="" placeholder="' . dol_escape_htmltag($langs->trans("SubledgerAccountLabel")) . '">';
713
+							print '<br><input type="text" class="maxwidth150" name="subledger_label" value="" placeholder="'.dol_escape_htmltag($langs->trans("SubledgerAccountLabel")).'">';
714 714
 							print '</td>';
715
-							print '<td><input type="text" class="minwidth200" name="label_operation" value="' . $label_operation . '"/></td>';
715
+							print '<td><input type="text" class="minwidth200" name="label_operation" value="'.$label_operation.'"/></td>';
716 716
 							print '<td class="right"><input type="text" size="6" class="right" name="debit" value=""/></td>';
717 717
 							print '<td class="right"><input type="text" size="6" class="right" name="credit" value=""/></td>';
718
-							print '<td class="center"><input type="submit" class="button small" name="save" value="' . $langs->trans("Add") . '"></td>';
718
+							print '<td class="center"><input type="submit" class="button small" name="save" value="'.$langs->trans("Add").'"></td>';
719 719
 						}
720 720
 					} else {
721 721
 						print '<!-- td columns in display mode -->';
@@ -738,7 +738,7 @@  discard block
 block discarded – undo
738 738
 
739 739
 						print '<td class="center nowraponall">';
740 740
 						if (empty($line->date_export) && empty($line->date_validation)) {
741
-							print '<a class="editfielda reposition" href="' . $_SERVER["PHP_SELF"] . '?action=update&id=' . $line->id . '&piece_num=' . urlencode($line->piece_num) . '&mode=' . urlencode($mode) . '&token=' . urlencode(newToken()) . '">';
741
+							print '<a class="editfielda reposition" href="'.$_SERVER["PHP_SELF"].'?action=update&id='.$line->id.'&piece_num='.urlencode($line->piece_num).'&mode='.urlencode($mode).'&token='.urlencode(newToken()).'">';
742 742
 							print img_edit('', 0, 'class="marginrightonly"');
743 743
 							print '</a> &nbsp;';
744 744
 						} else {
@@ -753,7 +753,7 @@  discard block
 block discarded – undo
753 753
 								$actiontodelete = 'confirm_delete';
754 754
 							}
755 755
 
756
-							print '<a href="' . $_SERVER["PHP_SELF"] . '?action=' . $actiontodelete . '&id=' . $line->id . '&piece_num=' . urlencode($line->piece_num) . '&mode=' . urlencode($mode) . '&token=' . urlencode(newToken()) . '">';
756
+							print '<a href="'.$_SERVER["PHP_SELF"].'?action='.$actiontodelete.'&id='.$line->id.'&piece_num='.urlencode($line->piece_num).'&mode='.urlencode($mode).'&token='.urlencode(newToken()).'">';
757 757
 							print img_delete();
758 758
 							print '</a>';
759 759
 						} else {
Please login to merge, or discard this patch.
htdocs/accountancy/supplier/list.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 $search_date_endday = GETPOST('search_date_endday', 'int');
71 71
 $search_date_endmonth = GETPOST('search_date_endmonth', 'int');
72 72
 $search_date_endyear = GETPOST('search_date_endyear', 'int');
73
-$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear);	// Use tzserver
73
+$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver
74 74
 $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear);
75 75
 $search_country = GETPOST('search_country', 'alpha');
76 76
 $search_tvaintra = GETPOST('search_tvaintra', 'alpha');
@@ -261,20 +261,20 @@  discard block
 block discarded – undo
261 261
 $sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as f";
262 262
 $sql .= " INNER JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = f.fk_soc";
263 263
 if (!empty($conf->global->MAIN_COMPANY_PERENTITY_SHARED)) {
264
-	$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "societe_perentity as spe ON spe.fk_soc = s.rowid AND spe.entity = " . ((int) $conf->entity);
264
+	$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_perentity as spe ON spe.fk_soc = s.rowid AND spe.entity = ".((int) $conf->entity);
265 265
 }
266 266
 $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as co ON co.rowid = s.fk_pays ";
267 267
 $sql .= " INNER JOIN ".MAIN_DB_PREFIX."facture_fourn_det as l ON f.rowid = l.fk_facture_fourn";
268 268
 $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON p.rowid = l.fk_product";
269 269
 if (!empty($conf->global->MAIN_PRODUCT_PERENTITY_SHARED)) {
270
-	$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = " . ((int) $conf->entity);
270
+	$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = ".((int) $conf->entity);
271 271
 }
272 272
 $alias_societe_perentity = empty($conf->global->MAIN_COMPANY_PERENTITY_SHARED) ? "s" : "spe";
273 273
 $alias_product_perentity = empty($conf->global->MAIN_PRODUCT_PERENTITY_SHARED) ? "p" : "ppe";
274
-$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa  ON " . $alias_product_perentity . ".accountancy_code_buy = aa.account_number         AND aa.active = 1  AND aa.fk_pcg_version = '".$db->escape($chartaccountcode)."' AND aa.entity = ".$conf->entity;
275
-$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa2 ON " . $alias_product_perentity . ".accountancy_code_buy_intra = aa2.account_number  AND aa2.active = 1 AND aa2.fk_pcg_version = '".$db->escape($chartaccountcode)."' AND aa2.entity = ".$conf->entity;
276
-$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa3 ON " . $alias_product_perentity . ".accountancy_code_buy_export = aa3.account_number AND aa3.active = 1 AND aa3.fk_pcg_version = '".$db->escape($chartaccountcode)."' AND aa3.entity = ".$conf->entity;
277
-$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa4 ON " . $alias_societe_perentity . ".accountancy_code_buy = aa4.account_number        AND aa4.active = 1 AND aa4.fk_pcg_version = '".$db->escape($chartaccountcode)."' AND aa4.entity = ".$conf->entity;
274
+$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa  ON ".$alias_product_perentity.".accountancy_code_buy = aa.account_number         AND aa.active = 1  AND aa.fk_pcg_version = '".$db->escape($chartaccountcode)."' AND aa.entity = ".$conf->entity;
275
+$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa2 ON ".$alias_product_perentity.".accountancy_code_buy_intra = aa2.account_number  AND aa2.active = 1 AND aa2.fk_pcg_version = '".$db->escape($chartaccountcode)."' AND aa2.entity = ".$conf->entity;
276
+$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa3 ON ".$alias_product_perentity.".accountancy_code_buy_export = aa3.account_number AND aa3.active = 1 AND aa3.fk_pcg_version = '".$db->escape($chartaccountcode)."' AND aa3.entity = ".$conf->entity;
277
+$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa4 ON ".$alias_societe_perentity.".accountancy_code_buy = aa4.account_number        AND aa4.active = 1 AND aa4.fk_pcg_version = '".$db->escape($chartaccountcode)."' AND aa4.entity = ".$conf->entity;
278 278
 $sql .= " WHERE f.fk_statut > 0 AND l.fk_code_ventilation <= 0";
279 279
 $sql .= " AND l.product_type <= 2";
280 280
 // Define begin binding date
@@ -468,7 +468,7 @@  discard block
 block discarded – undo
468 468
 	print_barre_liste($langs->trans("InvoiceLines"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num_lines, $nbtotalofrecords, 'title_accountancy', 0, '', '', $limit);
469 469
 
470 470
 	if ($massaction == 'set_default_account') {
471
-		$formquestion[]=array('type' => 'other',
471
+		$formquestion[] = array('type' => 'other',
472 472
 				'name' => 'set_default_account',
473 473
 				'label' => $langs->trans("AccountancyCode"),
474 474
 				'value' => $formaccounting->select_account('', 'default_account', 1, array(), 0, 0, 'maxwidth200 maxwidthonsmartphone', 'cachewithshowemptyone'));
@@ -570,7 +570,7 @@  discard block
 block discarded – undo
570 570
 		$thirdpartystatic->email = $objp->email;
571 571
 		$thirdpartystatic->country_code = $objp->country_code;
572 572
 		$thirdpartystatic->tva_intra = $objp->tva_intra;
573
-		$thirdpartystatic->code_compta_product = $objp->company_code_buy;		// The accounting account for product stored on thirdparty object (for level3 suggestion)
573
+		$thirdpartystatic->code_compta_product = $objp->company_code_buy; // The accounting account for product stored on thirdparty object (for level3 suggestion)
574 574
 
575 575
 		$product_static->ref = $objp->product_ref;
576 576
 		$product_static->id = $objp->product_id;
@@ -612,16 +612,16 @@  discard block
 block discarded – undo
612 612
 
613 613
 		$suggestedid = 0;
614 614
 
615
-		$return=$accountingAccount->getAccountingCodeToBind($mysoc, $thirdpartystatic, $product_static, $facturefourn_static, $facturefourn_static_det, $accountingAccountArray, 'supplier');
616
-		if (!is_array($return) && $return<0) {
615
+		$return = $accountingAccount->getAccountingCodeToBind($mysoc, $thirdpartystatic, $product_static, $facturefourn_static, $facturefourn_static_det, $accountingAccountArray, 'supplier');
616
+		if (!is_array($return) && $return < 0) {
617 617
 			setEventMessage($accountingAccount->error, 'errors');
618 618
 		} else {
619
-			$suggestedid=$return['suggestedid'];
620
-			$suggestedaccountingaccountfor=$return['suggestedaccountingaccountfor'];
621
-			$suggestedaccountingaccountbydefaultfor=$return['suggestedaccountingaccountbydefaultfor'];
622
-			$code_buy_l=$return['code_l'];
623
-			$code_buy_p=$return['code_p'];
624
-			$code_buy_t=$return['code_t'];
619
+			$suggestedid = $return['suggestedid'];
620
+			$suggestedaccountingaccountfor = $return['suggestedaccountingaccountfor'];
621
+			$suggestedaccountingaccountbydefaultfor = $return['suggestedaccountingaccountbydefaultfor'];
622
+			$code_buy_l = $return['code_l'];
623
+			$code_buy_p = $return['code_p'];
624
+			$code_buy_t = $return['code_t'];
625 625
 		}
626 626
 		//var_dump($return);
627 627
 
@@ -693,7 +693,7 @@  discard block
 block discarded – undo
693 693
 		//if ($objp->vat_tx_l != $objp->vat_tx_p && price2num($objp->vat_tx_p) && price2num($objp->vat_tx_l)) {	// Note: having a vat rate of 0 is often the normal case when sells is intra b2b or to export
694 694
 		//	$code_vat_differ = 'warning bold';
695 695
 		//}
696
-		print '<td class="right'.($code_vat_differ?' '.$code_vat_differ:'').'">';
696
+		print '<td class="right'.($code_vat_differ ? ' '.$code_vat_differ : '').'">';
697 697
 		print vatrate($facturefourn_static_det->tva_tx.($facturefourn_static_det->vat_src_code ? ' ('.$facturefourn_static_det->vat_src_code.')' : ''), false, 0, 0, 1);
698 698
 		print '</td>';
699 699
 
@@ -767,7 +767,7 @@  discard block
 block discarded – undo
767 767
 		if (!empty($toselect)) {
768 768
 			$ischecked = 0;
769 769
 			if (in_array($objp->rowid."_".$i, $toselect)) {
770
-				$ischecked=1;
770
+				$ischecked = 1;
771 771
 			}
772 772
 		}
773 773
 
Please login to merge, or discard this patch.
htdocs/accountancy/expensereport/lines.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 $search_date_endday = GETPOST('search_date_endday', 'int');
56 56
 $search_date_endmonth = GETPOST('search_date_endmonth', 'int');
57 57
 $search_date_endyear = GETPOST('search_date_endyear', 'int');
58
-$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear);	// Use tzserver
58
+$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver
59 59
 $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear);
60 60
 
61 61
 // Load variable for pagination
@@ -428,7 +428,7 @@  discard block
 block discarded – undo
428 428
 		$i++;
429 429
 	}
430 430
 	if ($num_lines == 0) {
431
-		$colspan=10;
431
+		$colspan = 10;
432 432
 		if (!empty($conf->global->ACCOUNTANCY_USE_EXPENSE_REPORT_VALIDATION_DATE)) {
433 433
 			$colspan++;
434 434
 		}
Please login to merge, or discard this patch.
htdocs/fichinter/stats/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -288,7 +288,7 @@
 block discarded – undo
288 288
 	print '<tr class="oddeven" height="24">';
289 289
 	print '<td class="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&amp;mode='.$mode.($socid > 0 ? '&socid='.$socid : '').($userid > 0 ? '&userid='.$userid : '').'">'.$year.'</a></td>';
290 290
 	print '<td class="right">'.$val['nb'].'</td>';
291
-	print '<td class="right opacitylow" style="'.((!isset($val['nb_diff']) || $val['nb_diff'] >= 0) ? 'color: green;' : 'color: red;').'">'.(isset($val['nb_diff']) ? round($val['nb_diff']): "0").'%</td>';
291
+	print '<td class="right opacitylow" style="'.((!isset($val['nb_diff']) || $val['nb_diff'] >= 0) ? 'color: green;' : 'color: red;').'">'.(isset($val['nb_diff']) ? round($val['nb_diff']) : "0").'%</td>';
292 292
 	print '<td class="right">'.price(price2num($val['total'], 'MT'), 1).'</td>';
293 293
 	print '<td class="right opacitylow" style="'.((!isset($val['total_diff']) || $val['total_diff'] >= 0) ? 'color: green;' : 'color: red;').'">'.(isset($val['total_diff']) ? round($val['total_diff']) : "0").'%</td>';
294 294
 	print '<td class="right">'.price(price2num($val['avg'], 'MT'), 1).'</td>';
Please login to merge, or discard this patch.
htdocs/fichinter/card-rec.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -357,7 +357,7 @@
 block discarded – undo
357 357
 		if (isModEnabled('contrat')) {
358 358
 			$formcontract = new FormContract($db);
359 359
 			print "<tr><td>".$langs->trans("Contract")."</td><td>";
360
-			$contractid = GETPOST('contractid') ? GETPOST('contractid') : (!empty($object->fk_contract) ? $object->fk_contract : 0) ;
360
+			$contractid = GETPOST('contractid') ? GETPOST('contractid') : (!empty($object->fk_contract) ? $object->fk_contract : 0);
361 361
 			$numcontract = $formcontract->select_contract($object->thirdparty->id, $contractid, 'contracttid');
362 362
 			print "</td></tr>";
363 363
 		}
Please login to merge, or discard this patch.
htdocs/fourn/facture/card.php 2 patches
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -3640,9 +3640,12 @@
 block discarded – undo
3640 3640
 
3641 3641
 				$parameters = array();
3642 3642
 				$reshook = $hookmanager->executeHooks('formAddObjectLine', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
3643
-				if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
3644
-				if (empty($reshook))
3645
-					$object->formAddObjectLine(1, $societe, $mysoc);
3643
+				if ($reshook < 0) {
3644
+					setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
3645
+				}
3646
+				if (empty($reshook)) {
3647
+									$object->formAddObjectLine(1, $societe, $mysoc);
3648
+				}
3646 3649
 			}
3647 3650
 		}
3648 3651
 
Please login to merge, or discard this patch.
Spacing   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -751,7 +751,7 @@  discard block
 block discarded – undo
751 751
 			$error++;
752 752
 		}
753 753
 
754
-		$dateinvoice = dol_mktime(0, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int'), 'tzserver');	// If we enter the 02 january, we need to save the 02 january for server
754
+		$dateinvoice = dol_mktime(0, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int'), 'tzserver'); // If we enter the 02 january, we need to save the 02 january for server
755 755
 		$datedue = dol_mktime(0, 0, 0, GETPOST('echmonth', 'int'), GETPOST('echday', 'int'), GETPOST('echyear', 'int'), 'tzserver');
756 756
 		//var_dump($dateinvoice.' '.dol_print_date($dateinvoice, 'dayhour'));
757 757
 		//var_dump(dol_now('tzuserrel').' '.dol_get_last_hour(dol_now('tzuserrel')).' '.dol_print_date(dol_now('tzuserrel'),'dayhour').' '.dol_print_date(dol_get_last_hour(dol_now('tzuserrel')), 'dayhour'));
@@ -789,7 +789,7 @@  discard block
 block discarded – undo
789 789
 				$object->ref = GETPOST('ref', 'alphanohtml');
790 790
 				$object->ref_supplier = GETPOST('ref_supplier', 'alpha');
791 791
 				$object->socid = GETPOST('socid', 'int');
792
-				$object->libelle = GETPOST('label', 'alphanohtml');	// deprecated
792
+				$object->libelle = GETPOST('label', 'alphanohtml'); // deprecated
793 793
 				$object->label = GETPOST('label', 'alphanohtml');
794 794
 				$object->date = $dateinvoice;
795 795
 				$object->date_echeance = $datedue;
@@ -1027,28 +1027,28 @@  discard block
 block discarded – undo
1027 1027
 				$tmpproject = GETPOST('projectid', 'int');
1028 1028
 
1029 1029
 				// Creation invoice
1030
+				$object->socid = GETPOST('socid', 'int');
1031
+				$object->type = GETPOST('type', 'alphanohtml');
1032
+				$object->subtype = GETPOST('subtype', 'alphanohtml');
1033
+				$object->ref = GETPOST('ref', 'alphanohtml');
1034
+				$object->ref_supplier = GETPOST('ref_supplier', 'alphanohtml');
1030 1035
 				$object->socid				= GETPOST('socid', 'int');
1031
-				$object->type				= GETPOST('type', 'alphanohtml');
1032
-				$object->subtype            = GETPOST('subtype', 'alphanohtml');
1033
-				$object->ref				= GETPOST('ref', 'alphanohtml');
1034
-				$object->ref_supplier		= GETPOST('ref_supplier', 'alphanohtml');
1035
-				$object->socid				= GETPOST('socid', 'int');
1036
-				$object->libelle			= GETPOST('label', 'alphanohtml');	// deprecated
1036
+				$object->libelle = GETPOST('label', 'alphanohtml'); // deprecated
1037 1037
 				$object->label				= GETPOST('label', 'alphanohtml');
1038
-				$object->date				= $dateinvoice;
1039
-				$object->date_echeance		= $datedue;
1040
-				$object->note_public		= GETPOST('note_public', 'restricthtml');
1041
-				$object->note_private		= GETPOST('note_private', 'restricthtml');
1038
+				$object->date = $dateinvoice;
1039
+				$object->date_echeance = $datedue;
1040
+				$object->note_public = GETPOST('note_public', 'restricthtml');
1041
+				$object->note_private = GETPOST('note_private', 'restricthtml');
1042 1042
 				$object->cond_reglement_id	= GETPOST('cond_reglement_id');
1043 1043
 				$object->mode_reglement_id	= GETPOST('mode_reglement_id');
1044 1044
 				$object->fk_account			= GETPOST('fk_account', 'int');
1045 1045
 				$object->vat_reverse_charge	= GETPOST('vat_reverse_charge') == 'on' ? 1 : 0;
1046 1046
 				$object->fk_project			= ($tmpproject > 0) ? $tmpproject : null;
1047
-				$object->fk_incoterms		= GETPOST('incoterm_id', 'int');
1047
+				$object->fk_incoterms = GETPOST('incoterm_id', 'int');
1048 1048
 				$object->location_incoterms	= GETPOST('location_incoterms', 'alpha');
1049 1049
 				$object->multicurrency_code	= GETPOST('multicurrency_code', 'alpha');
1050
-				$object->multicurrency_tx	= GETPOST('originmulticurrency_tx', 'int');
1051
-				$object->transport_mode_id	= GETPOST('transport_mode_id');
1050
+				$object->multicurrency_tx = GETPOST('originmulticurrency_tx', 'int');
1051
+				$object->transport_mode_id = GETPOST('transport_mode_id');
1052 1052
 
1053 1053
 				// Auto calculation of date due if not filled by user
1054 1054
 				if (empty($object->date_echeance)) {
@@ -1387,7 +1387,7 @@  discard block
 block discarded – undo
1387 1387
 		// Edit line
1388 1388
 		$db->begin();
1389 1389
 
1390
-		if (! $object->fetch($id) > 0) {
1390
+		if (!$object->fetch($id) > 0) {
1391 1391
 			dol_print_error($db);
1392 1392
 		}
1393 1393
 		$object->fetch_thirdparty();
@@ -1531,7 +1531,7 @@  discard block
 block discarded – undo
1531 1531
 			$idprod = GETPOST('idprod', 'int');
1532 1532
 		}
1533 1533
 
1534
-		$tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0);		// Can be '1.2' or '1.2 (CODE)'
1534
+		$tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0); // Can be '1.2' or '1.2 (CODE)'
1535 1535
 
1536 1536
 		$price_ht = price2num(GETPOST('price_ht'), 'MU', 2);
1537 1537
 		$price_ht_devise = price2num(GETPOST('multicurrency_price_ht'), 'CU', 2);
@@ -2298,7 +2298,7 @@  discard block
 block discarded – undo
2298 2298
 
2299 2299
 		$sql = 'SELECT r.rowid, r.titre as title, r.total_ttc';
2300 2300
 		$sql .= ' FROM '.MAIN_DB_PREFIX.'facture_fourn_rec as r';
2301
-		$sql .= ' WHERE r.fk_soc = '. (int) $invoice_predefined->socid;
2301
+		$sql .= ' WHERE r.fk_soc = '.(int) $invoice_predefined->socid;
2302 2302
 
2303 2303
 		$resql = $db->query($sql);
2304 2304
 		if ($resql) {
@@ -2356,7 +2356,7 @@  discard block
 block discarded – undo
2356 2356
 
2357 2357
 	// Standard invoice
2358 2358
 	print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">';
2359
-	$tmp = '<input type="radio" id="radio_standard" name="type" value="0"'.(GETPOST('type', 'int')? '' : 'checked').'> ';
2359
+	$tmp = '<input type="radio" id="radio_standard" name="type" value="0"'.(GETPOST('type', 'int') ? '' : 'checked').'> ';
2360 2360
 	$desc = $form->textwithpicto($tmp.'<label for="radio_standard">'.$langs->trans("InvoiceStandardAsk").'</label>', $langs->transnoentities("InvoiceStandardDesc"), 1, 'help', '', 0, 3);
2361 2361
 	print $desc;
2362 2362
 	print '</div></div>';
@@ -2365,7 +2365,7 @@  discard block
 block discarded – undo
2365 2365
 		// Deposit - Down payment
2366 2366
 		if (empty($conf->global->INVOICE_DISABLE_DEPOSIT)) {
2367 2367
 			print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">';
2368
-			$tmp='<input type="radio" id="radio_deposit" name="type" value="3"' . (GETPOST('type') == 3 ? ' checked' : '') . '> ';
2368
+			$tmp = '<input type="radio" id="radio_deposit" name="type" value="3"'.(GETPOST('type') == 3 ? ' checked' : '').'> ';
2369 2369
 			print '<script type="text/javascript">
2370 2370
 			jQuery(document).ready(function() {
2371 2371
     			jQuery("#typestandardinvoice, #valuestandardinvoice").click(function() {
@@ -2411,7 +2411,7 @@  discard block
 block discarded – undo
2411 2411
 				print $form->selectarray('typedeposit', $arraylist, GETPOST('typedeposit', 'aZ09'), 0, 0, 0, '', 1);
2412 2412
 				print '</td>';
2413 2413
 				print '<td class="nowrap" style="padding-left: 5px">';
2414
-				print '<span class="opacitymedium paddingleft">'.$langs->trans("AmountOrPercent").'</span><input type="text" id="valuedeposit" name="valuedeposit" class="width75 right" value="' . GETPOST('valuedeposit', 'int') . '"/>';
2414
+				print '<span class="opacitymedium paddingleft">'.$langs->trans("AmountOrPercent").'</span><input type="text" id="valuedeposit" name="valuedeposit" class="width75 right" value="'.GETPOST('valuedeposit', 'int').'"/>';
2415 2415
 				print '</td>';
2416 2416
 			}
2417 2417
 			print '</tr></table>';
@@ -2566,7 +2566,7 @@  discard block
 block discarded – undo
2566 2566
 			if (empty($conf->global->INVOICE_CREDIT_NOTE_STANDALONE)) {
2567 2567
 				$tmp = '<input type="radio" name="type" id="radio_creditnote" value="0" disabled> ';
2568 2568
 			} else {
2569
-				$tmp='<input type="radio" name="type" id="radio_creditnote" value="2"> ';
2569
+				$tmp = '<input type="radio" name="type" id="radio_creditnote" value="2"> ';
2570 2570
 			}
2571 2571
 			$text = $tmp.$langs->trans("InvoiceAvoir").' ';
2572 2572
 			$text .= '<span class="opacitymedium">('.$langs->trans("YouMustCreateInvoiceFromSupplierThird").')</span> ';
@@ -2657,7 +2657,7 @@  discard block
 block discarded – undo
2657 2657
 
2658 2658
 	// Vat reverse-charge by default
2659 2659
 	if (!empty($conf->global->ACCOUNTING_FORCE_ENABLE_VAT_REVERSE_CHARGE)) {
2660
-		print '<tr><td>' . $langs->trans('VATReverseCharge') . '</td><td>';
2660
+		print '<tr><td>'.$langs->trans('VATReverseCharge').'</td><td>';
2661 2661
 		// Try to propose to use VAT reverse charge even if the VAT reverse charge is not activated in the supplier card, if this corresponds to the context of use, the activation is proposed
2662 2662
 		if ($vat_reverse_charge == 1 || $societe->vat_reverse_charge == 1 || ($societe->country_code != 'FR' && isInEEC($societe) && !empty($societe->tva_intra))) {
2663 2663
 			$vat_reverse_charge = 1;
@@ -2665,7 +2665,7 @@  discard block
 block discarded – undo
2665 2665
 			$vat_reverse_charge = 0;
2666 2666
 		}
2667 2667
 
2668
-		print '<input type="checkbox" name="vat_reverse_charge"'. (!empty($vat_reverse_charge) ? ' checked ' : '') . '>';
2668
+		print '<input type="checkbox" name="vat_reverse_charge"'.(!empty($vat_reverse_charge) ? ' checked ' : '').'>';
2669 2669
 		print '</td></tr>';
2670 2670
 	}
2671 2671
 
@@ -3220,7 +3220,7 @@  discard block
 block discarded – undo
3220 3220
 				$facavoir->fetch($id);
3221 3221
 				$invoicecredits[] = $facavoir->getNomUrl(1);
3222 3222
 			}
3223
-			print ' <span class="opacitymediumbycolor paddingleft">'.$langs->transnoentities("InvoiceHasAvoir") . (count($invoicecredits) ? ' ' : '') . implode(',', $invoicecredits);
3223
+			print ' <span class="opacitymediumbycolor paddingleft">'.$langs->transnoentities("InvoiceHasAvoir").(count($invoicecredits) ? ' ' : '').implode(',', $invoicecredits);
3224 3224
 			print '</span>';
3225 3225
 		}
3226 3226
 		if (isset($objectidnext) && $objectidnext > 0) {
@@ -3416,12 +3416,12 @@  discard block
 block discarded – undo
3416 3416
 				print '<input type="hidden" name="action" value="setvatreversecharge">';
3417 3417
 				print '<input type="hidden" name="token" value="'.newToken().'">';
3418 3418
 
3419
-				print '<input type="checkbox" name="vat_reverse_charge"' . ($object->vat_reverse_charge == '1' ? ' checked ' : '') . '>';
3419
+				print '<input type="checkbox" name="vat_reverse_charge"'.($object->vat_reverse_charge == '1' ? ' checked ' : '').'>';
3420 3420
 
3421 3421
 				print '<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">';
3422 3422
 				print '</form>';
3423 3423
 			} else {
3424
-				print '<input type="checkbox" name="vat_reverse_charge"'. ($object->vat_reverse_charge == '1' ? ' checked ' : '') . ' disabled>';
3424
+				print '<input type="checkbox" name="vat_reverse_charge"'.($object->vat_reverse_charge == '1' ? ' checked ' : '').' disabled>';
3425 3425
 			}
3426 3426
 			print '</td></tr>';
3427 3427
 		}
@@ -3482,15 +3482,15 @@  discard block
 block discarded – undo
3482 3482
 		print '<table class="border tableforfield centpercent">';
3483 3483
 
3484 3484
 		print '<tr>';
3485
-		print '<td class="titlefieldmiddle">' . $langs->trans('AmountHT') . '</td>';
3486
-		print '<td class="nowrap amountcard right">' . price($object->total_ht, '', $langs, 0, -1, -1, $conf->currency) . '</td>';
3485
+		print '<td class="titlefieldmiddle">'.$langs->trans('AmountHT').'</td>';
3486
+		print '<td class="nowrap amountcard right">'.price($object->total_ht, '', $langs, 0, -1, -1, $conf->currency).'</td>';
3487 3487
 		if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
3488
-			print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_ht, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
3488
+			print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_ht, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
3489 3489
 		}
3490 3490
 		print '</tr>';
3491 3491
 
3492 3492
 		print '<tr>';
3493
-		print '<td>' . $langs->trans('AmountVAT') . '</td>';
3493
+		print '<td>'.$langs->trans('AmountVAT').'</td>';
3494 3494
 		print '<td class="nowrap amountcard right">';
3495 3495
 		if (GETPOST('calculationrule')) {
3496 3496
 			$calculationrule = GETPOST('calculationrule', 'alpha');
@@ -3504,40 +3504,40 @@  discard block
 block discarded – undo
3504 3504
 		}
3505 3505
 		// Show link for "recalculate"
3506 3506
 		if ($object->getVentilExportCompta() == 0) {
3507
-			$s = '<span class="hideonsmartphone opacitymedium">' . $langs->trans("ReCalculate") . ' </span>';
3508
-			$s .= '<a href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=calculate&calculationrule=totalofround">' . $langs->trans("Mode1") . '</a>';
3507
+			$s = '<span class="hideonsmartphone opacitymedium">'.$langs->trans("ReCalculate").' </span>';
3508
+			$s .= '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=calculate&calculationrule=totalofround">'.$langs->trans("Mode1").'</a>';
3509 3509
 			$s .= ' / ';
3510
-			$s .= '<a href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=calculate&calculationrule=roundoftotal">' . $langs->trans("Mode2") . '</a>';
3510
+			$s .= '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=calculate&calculationrule=roundoftotal">'.$langs->trans("Mode2").'</a>';
3511 3511
 			print '<div class="inline-block">';
3512
-			print $form->textwithtooltip($s, $langs->trans("CalculationRuleDesc", $calculationrulenum) . '<br>' . $langs->trans("CalculationRuleDescSupplier"), 2, 1, img_picto('', 'help'), '', 3, '', 0, 'recalculate');
3512
+			print $form->textwithtooltip($s, $langs->trans("CalculationRuleDesc", $calculationrulenum).'<br>'.$langs->trans("CalculationRuleDescSupplier"), 2, 1, img_picto('', 'help'), '', 3, '', 0, 'recalculate');
3513 3513
 			print '&nbsp; &nbsp; &nbsp; &nbsp;';
3514 3514
 			print '</div>';
3515 3515
 		}
3516 3516
 		print price($object->total_tva, 1, $langs, 0, -1, -1, $conf->currency);
3517 3517
 		print '</td>';
3518 3518
 		if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
3519
-			print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_tva, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
3519
+			print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_tva, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
3520 3520
 		}
3521 3521
 		print '</tr>';
3522 3522
 
3523 3523
 		if ($societe->localtax1_assuj == "1") { //Localtax1
3524 3524
 			print '<tr>';
3525
-			print '<td>' . $langs->transcountry("AmountLT1", $societe->country_code) . '</td>';
3526
-			print '<td class="nowrap amountcard right">' . price($object->total_localtax1, 1, $langs, 0, -1, -1, $conf->currency) . '</td>';
3525
+			print '<td>'.$langs->transcountry("AmountLT1", $societe->country_code).'</td>';
3526
+			print '<td class="nowrap amountcard right">'.price($object->total_localtax1, 1, $langs, 0, -1, -1, $conf->currency).'</td>';
3527 3527
 			print '</tr>';
3528 3528
 		}
3529 3529
 		if ($societe->localtax2_assuj == "1") { //Localtax2
3530 3530
 			print '<tr>';
3531
-			print '<td>' . $langs->transcountry("AmountLT2", $societe->country_code) . '</td>';
3532
-			print '<td class="nowrap amountcard right">' . price($object->total_localtax2, 1, $langs, 0, -1, -1, $conf->currency) . '</td>';
3531
+			print '<td>'.$langs->transcountry("AmountLT2", $societe->country_code).'</td>';
3532
+			print '<td class="nowrap amountcard right">'.price($object->total_localtax2, 1, $langs, 0, -1, -1, $conf->currency).'</td>';
3533 3533
 			print '</tr>';
3534 3534
 		}
3535 3535
 
3536 3536
 		print '<tr>';
3537
-		print '<td>' . $langs->trans('AmountTTC') . '</td>';
3538
-		print '<td class="nowrap amountcard right">' . price($object->total_ttc, '', $langs, 0, -1, -1, $conf->currency) . '</td>';
3537
+		print '<td>'.$langs->trans('AmountTTC').'</td>';
3538
+		print '<td class="nowrap amountcard right">'.price($object->total_ttc, '', $langs, 0, -1, -1, $conf->currency).'</td>';
3539 3539
 		if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
3540
-			print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_ttc, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
3540
+			print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_ttc, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
3541 3541
 		}
3542 3542
 		print '</tr>';
3543 3543
 
@@ -3843,7 +3843,7 @@  discard block
 block discarded – undo
3843 3843
 				print '<tr><td colspan="'.$nbcols.'" class="right">';
3844 3844
 				print '<span class="opacitymedium">';
3845 3845
 				print $langs->trans('RemainderToPayBackMulticurrency');
3846
-				if ($resteapayeraffiche> 0) {
3846
+				if ($resteapayeraffiche > 0) {
3847 3847
 					print ' ('.$langs->trans('NegativeIfExcessRefunded').')';
3848 3848
 				}
3849 3849
 				print '</span>';
@@ -4072,7 +4072,7 @@  discard block
 block discarded – undo
4072 4072
 				}
4073 4073
 
4074 4074
 				// Clone as predefined / Create template
4075
-				if (($object->type ==  FactureFournisseur::TYPE_STANDARD || $object->type == FactureFournisseur::TYPE_DEPOSIT) && $object->statut == 0 && $usercancreate) {
4075
+				if (($object->type == FactureFournisseur::TYPE_STANDARD || $object->type == FactureFournisseur::TYPE_DEPOSIT) && $object->statut == 0 && $usercancreate) {
4076 4076
 					if (!$objectidnext && count($object->lines) > 0) {
4077 4077
 						print '<a class="butAction" href="'.DOL_URL_ROOT.'/fourn/facture/card-rec.php?facid='.$object->id.'&amp;action=create">'.$langs->trans("ChangeIntoRepeatableInvoice").'</a>';
4078 4078
 					}
Please login to merge, or discard this patch.
htdocs/fourn/paiement/document.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -126,7 +126,7 @@
 block discarded – undo
126 126
 	$morehtmlref .= '<br>'.$object->thirdparty->getNomUrl(1);
127 127
 
128 128
 	// Amount
129
-	$morehtmlref .= '<br>'.$langs->trans('Amount').' : '. price($object->amount, '', $langs, 0, 0, -1, $conf->currency);
129
+	$morehtmlref .= '<br>'.$langs->trans('Amount').' : '.price($object->amount, '', $langs, 0, 0, -1, $conf->currency);
130 130
 
131 131
 	$allow_delete = 1;
132 132
 	// Bank account
Please login to merge, or discard this patch.
htdocs/fourn/commande/card.php 2 patches
Braces   +9 added lines, -5 removed lines patch added patch discarded remove patch
@@ -687,8 +687,9 @@  discard block
 block discarded – undo
687 687
 				$newlang = '';
688 688
 				if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) {
689 689
 					$newlang = $object->thirdparty->default_lang;
690
-					if (GETPOST('lang_id', 'aZ09'))
691
-						$newlang = GETPOST('lang_id', 'aZ09');
690
+					if (GETPOST('lang_id', 'aZ09')) {
691
+											$newlang = GETPOST('lang_id', 'aZ09');
692
+					}
692 693
 				}
693 694
 				if (!empty($newlang)) {
694 695
 					$outputlangs = new Translate("", $conf);
@@ -2427,9 +2428,12 @@  discard block
 block discarded – undo
2427 2428
 
2428 2429
 			$parameters = array();
2429 2430
 			$reshook = $hookmanager->executeHooks('formAddObjectLine', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
2430
-			if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
2431
-			if (empty($reshook))
2432
-				$object->formAddObjectLine(1, $societe, $mysoc);
2431
+			if ($reshook < 0) {
2432
+				setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
2433
+			}
2434
+			if (empty($reshook)) {
2435
+							$object->formAddObjectLine(1, $societe, $mysoc);
2436
+			}
2433 2437
 		}
2434 2438
 	}
2435 2439
 	print '</table>';
Please login to merge, or discard this patch.
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
 $result = restrictedArea($user, 'fournisseur', $object, 'commande_fournisseur', 'commande', 'fk_soc', 'rowid', $isdraft);
138 138
 
139 139
 // Common permissions
140
-$usercanread	= ($user->hasRight("fournisseur", "commande", "lire") || $user->hasRight("supplier_order", "lire"));
140
+$usercanread = ($user->hasRight("fournisseur", "commande", "lire") || $user->hasRight("supplier_order", "lire"));
141 141
 $usercancreate	= ($user->hasRight("fournisseur", "commande", "creer") || $user->hasRight("supplier_order", "creer"));
142 142
 $usercandelete	= (($user->hasRight("fournisseur", "commande", "supprimer") || $user->hasRight("supplier_order", "supprimer")) || ($usercancreate && isset($object->statut) && $object->statut == $object::STATUS_DRAFT));
143 143
 
@@ -145,9 +145,9 @@  discard block
 block discarded – undo
145 145
 $usercanvalidate = ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($usercancreate)) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight("fournisseur", "supplier_order_advance", "validate")));
146 146
 
147 147
 // Additional area permissions
148
-$usercanapprove			= $user->hasRight("fournisseur", "commande", "approuver");
149
-$usercanapprovesecond	= $user->hasRight("fournisseur", "commande", "approve2");
150
-$usercanorder			= $user->hasRight("fournisseur", "commande", "commander");
148
+$usercanapprove = $user->hasRight("fournisseur", "commande", "approuver");
149
+$usercanapprovesecond = $user->hasRight("fournisseur", "commande", "approve2");
150
+$usercanorder = $user->hasRight("fournisseur", "commande", "commander");
151 151
 if (empty($conf->reception->enabled)) {
152 152
 	$usercanreceive = $user->hasRight("fournisseur", "commande", "receptionner");
153 153
 } else {
@@ -156,8 +156,8 @@  discard block
 block discarded – undo
156 156
 
157 157
 // Permissions for includes
158 158
 $permissionnote		= $usercancreate; // Used by the include of actions_setnotes.inc.php
159
-$permissiondellink	= $usercancreate; // Used by the include of actions_dellink.inc.php
160
-$permissiontoedit	= $usercancreate; // Used by the include of actions_lineupdown.inc.php
159
+$permissiondellink = $usercancreate; // Used by the include of actions_dellink.inc.php
160
+$permissiontoedit = $usercancreate; // Used by the include of actions_lineupdown.inc.php
161 161
 $permissiontoadd	= $usercancreate; // Used by the include of actions_addupdatedelete.inc.php
162 162
 
163 163
 // Project permission
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
 }
181 181
 
182 182
 if (empty($reshook)) {
183
-	$backurlforlist = DOL_URL_ROOT.'/fourn/commande/list.php'.($socid > 0 ? '?socid='.((int) $socid)  : '');
183
+	$backurlforlist = DOL_URL_ROOT.'/fourn/commande/list.php'.($socid > 0 ? '?socid='.((int) $socid) : '');
184 184
 
185 185
 	if (empty($backtopage) || ($cancel && empty($id))) {
186 186
 		if (empty($backtopage) || ($cancel && strpos($backtopage, '__ID__'))) {
@@ -435,7 +435,7 @@  discard block
 block discarded – undo
435 435
 			$idprod = GETPOST('idprod', 'int');
436 436
 		}
437 437
 
438
-		$tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0);		// Can be '1.2' or '1.2 (CODE)'
438
+		$tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0); // Can be '1.2' or '1.2 (CODE)'
439 439
 
440 440
 		$price_ht = price2num(GETPOST('price_ht'), 'MU', 2);
441 441
 		$price_ht_devise = price2num(GETPOST('multicurrency_price_ht'), 'CU', 2);
@@ -553,7 +553,7 @@  discard block
 block discarded – undo
553 553
 
554 554
 				//If text set in desc is the same as product descpription (as now it's preloaded) whe add it only one time
555 555
 				if (trim($product_desc) == trim($desc) && !empty($conf->global->PRODUIT_AUTOFILL_DESC)) {
556
-					$product_desc='';
556
+					$product_desc = '';
557 557
 				}
558 558
 
559 559
 				if (!empty($product_desc) && !empty($conf->global->MAIN_NO_CONCAT_DESCRIPTION)) {
@@ -1240,7 +1240,7 @@  discard block
 block discarded – undo
1240 1240
 			$object->mode_reglement_id = GETPOST('mode_reglement_id', 'int');
1241 1241
 			$object->fk_account        = GETPOST('fk_account', 'int');
1242 1242
 			$object->note_private = GETPOST('note_private', 'restricthtml');
1243
-			$object->note_public   	= GETPOST('note_public', 'restricthtml');
1243
+			$object->note_public = GETPOST('note_public', 'restricthtml');
1244 1244
 			$object->delivery_date = $datelivraison;
1245 1245
 			$object->fk_incoterms = GETPOST('incoterm_id', 'int');
1246 1246
 			$object->location_incoterms = GETPOST('location_incoterms', 'alpha');
@@ -1744,7 +1744,7 @@  discard block
 block discarded – undo
1744 1744
 	// Payment term
1745 1745
 	print '<tr><td class="nowrap">'.$langs->trans('PaymentConditionsShort').'</td><td>';
1746 1746
 	print img_picto('', 'payment', 'class="pictofixedwidth"');
1747
-	print $form->getSelectConditionsPaiements((GETPOSTISSET('cond_reglement_id') &&  GETPOST('cond_reglement_id') != 0) ? GETPOST('cond_reglement_id') : $cond_reglement_id, 'cond_reglement_id', -1, 1);
1747
+	print $form->getSelectConditionsPaiements((GETPOSTISSET('cond_reglement_id') && GETPOST('cond_reglement_id') != 0) ? GETPOST('cond_reglement_id') : $cond_reglement_id, 'cond_reglement_id', -1, 1);
1748 1748
 	print '</td></tr>';
1749 1749
 
1750 1750
 	// Payment mode
@@ -1994,7 +1994,7 @@  discard block
 block discarded – undo
1994 1994
 				'morecss' => 'minwidth300'
1995 1995
 			)
1996 1996
 		);
1997
-		$formconfirm  = $form->formconfirm($_SERVER['PHP_SELF']."?id=$object->id", $langs->trans("DenyingThisOrder"), $langs->trans("ConfirmDenyingThisOrder", $object->ref), "confirm_refuse", $formquestion, 0, 1);
1997
+		$formconfirm = $form->formconfirm($_SERVER['PHP_SELF']."?id=$object->id", $langs->trans("DenyingThisOrder"), $langs->trans("ConfirmDenyingThisOrder", $object->ref), "confirm_refuse", $formquestion, 0, 1);
1998 1998
 	}
1999 1999
 
2000 2000
 	// Confirmation of cancellation
@@ -2047,7 +2047,7 @@  discard block
 block discarded – undo
2047 2047
 	$morehtmlref = '<div class="refidno">';
2048 2048
 	// Ref supplier
2049 2049
 	$morehtmlref .= $form->editfieldkey("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $usercancreate, 'string', '', 0, 1);
2050
-	$morehtmlref .= $form->editfieldval("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $usercancreate, 'string'.(isset($conf->global->THIRDPARTY_REF_INPUT_SIZE) ? ':' . getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') : ''), '', null, null, '', 1);
2050
+	$morehtmlref .= $form->editfieldval("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $usercancreate, 'string'.(isset($conf->global->THIRDPARTY_REF_INPUT_SIZE) ? ':'.getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') : ''), '', null, null, '', 1);
2051 2051
 	// Thirdparty
2052 2052
 	$morehtmlref .= '<br>';
2053 2053
 	if (!empty($conf->global->MAIN_CAN_EDIT_SUPPLIER_ON_SUPPLIER_ORDER) && !empty($usercancreate) && $action == 'edit_thirdparty') {
@@ -2329,40 +2329,40 @@  discard block
 block discarded – undo
2329 2329
 
2330 2330
 	print '<tr>';
2331 2331
 	// Amount HT
2332
-	print '<td class="titlefieldmiddle">' . $langs->trans('AmountHT') . '</td>';
2333
-	print '<td class="nowrap amountcard right">' . price($object->total_ht, '', $langs, 0, -1, -1, $conf->currency) . '</td>';
2332
+	print '<td class="titlefieldmiddle">'.$langs->trans('AmountHT').'</td>';
2333
+	print '<td class="nowrap amountcard right">'.price($object->total_ht, '', $langs, 0, -1, -1, $conf->currency).'</td>';
2334 2334
 	if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
2335 2335
 		// Multicurrency Amount HT
2336
-		print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_ht, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
2336
+		print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_ht, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
2337 2337
 	}
2338 2338
 	print '</tr>';
2339 2339
 
2340 2340
 	print '<tr>';
2341 2341
 	// Amount VAT
2342
-	print '<td class="titlefieldmiddle">' . $langs->trans('AmountVAT') . '</td>';
2343
-	print '<td class="nowrap amountcard right">' . price($object->total_tva, '', $langs, 0, -1, -1, $conf->currency) . '</td>';
2342
+	print '<td class="titlefieldmiddle">'.$langs->trans('AmountVAT').'</td>';
2343
+	print '<td class="nowrap amountcard right">'.price($object->total_tva, '', $langs, 0, -1, -1, $conf->currency).'</td>';
2344 2344
 	if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
2345 2345
 		// Multicurrency Amount VAT
2346
-		print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_tva, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
2346
+		print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_tva, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
2347 2347
 	}
2348 2348
 	print '</tr>';
2349 2349
 
2350 2350
 	// Amount Local Taxes
2351 2351
 	if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0) {
2352 2352
 		print '<tr>';
2353
-		print '<td class="titlefieldmiddle">' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '</td>';
2354
-		print '<td class="nowrap amountcard right">' . price($object->total_localtax1, '', $langs, 0, -1, -1, $conf->currency) . '</td>';
2353
+		print '<td class="titlefieldmiddle">'.$langs->transcountry("AmountLT1", $mysoc->country_code).'</td>';
2354
+		print '<td class="nowrap amountcard right">'.price($object->total_localtax1, '', $langs, 0, -1, -1, $conf->currency).'</td>';
2355 2355
 		if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
2356
-			print '<td class="nowrap amountcard right">' . price($object->total_localtax1, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
2356
+			print '<td class="nowrap amountcard right">'.price($object->total_localtax1, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
2357 2357
 		}
2358 2358
 		print '</tr>';
2359 2359
 
2360 2360
 		if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0) {
2361 2361
 			print '<tr>';
2362
-			print '<td>' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '</td>';
2363
-			print '<td class="nowrap amountcard right">' . price($object->total_localtax2, '', $langs, 0, -1, -1, $conf->currency) . '</td>';
2362
+			print '<td>'.$langs->transcountry("AmountLT2", $mysoc->country_code).'</td>';
2363
+			print '<td class="nowrap amountcard right">'.price($object->total_localtax2, '', $langs, 0, -1, -1, $conf->currency).'</td>';
2364 2364
 			if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
2365
-				print '<td class="nowrap amountcard right">' . price($object->total_localtax2, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
2365
+				print '<td class="nowrap amountcard right">'.price($object->total_localtax2, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
2366 2366
 			}
2367 2367
 			print '</tr>';
2368 2368
 		}
@@ -2370,16 +2370,16 @@  discard block
 block discarded – undo
2370 2370
 
2371 2371
 	$alert = '';
2372 2372
 	if (!empty($conf->global->ORDER_MANAGE_MIN_AMOUNT) && $object->total_ht < $object->thirdparty->supplier_order_min_amount) {
2373
-		$alert = ' ' . img_warning($langs->trans('OrderMinAmount') . ': ' . price($object->thirdparty->supplier_order_min_amount));
2373
+		$alert = ' '.img_warning($langs->trans('OrderMinAmount').': '.price($object->thirdparty->supplier_order_min_amount));
2374 2374
 	}
2375 2375
 
2376 2376
 	print '<tr>';
2377 2377
 	// Amount TTC
2378
-	print '<td>' . $langs->trans('AmountTTC') . '</td>';
2379
-	print '<td class="nowrap amountcard right">' . price($object->total_ttc, '', $langs, 0, -1, -1, $conf->currency) . $alert . '</td>';
2378
+	print '<td>'.$langs->trans('AmountTTC').'</td>';
2379
+	print '<td class="nowrap amountcard right">'.price($object->total_ttc, '', $langs, 0, -1, -1, $conf->currency).$alert.'</td>';
2380 2380
 	if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
2381 2381
 		// Multicurrency Amount TTC
2382
-		print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_ttc, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
2382
+		print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_ttc, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
2383 2383
 	}
2384 2384
 	print '</tr>';
2385 2385
 
@@ -2705,7 +2705,7 @@  discard block
 block discarded – undo
2705 2705
 			$action = 'presend';
2706 2706
 		}
2707 2707
 
2708
-		if ($action != 'createorder' && $action != 'presend' ) {
2708
+		if ($action != 'createorder' && $action != 'presend') {
2709 2709
 			print '<div class="fichecenter"><div class="fichehalfleft">';
2710 2710
 
2711 2711
 			// Generated documents
Please login to merge, or discard this patch.
htdocs/supplier_proposal/list.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 $search_date_endday = GETPOST('search_date_endday', 'int');
75 75
 $search_date_endmonth = GETPOST('search_date_endmonth', 'int');
76 76
 $search_date_endyear = GETPOST('search_date_endyear', 'int');
77
-$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear);	// Use tzserver
77
+$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver
78 78
 $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear);
79 79
 $search_date_valid_startday = GETPOST('search_date_valid_startday', 'int');
80 80
 $search_date_valid_startmonth = GETPOST('search_date_valid_startmonth', 'int');
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 $search_date_valid_endday = GETPOST('search_date_valid_endday', 'int');
83 83
 $search_date_valid_endmonth = GETPOST('search_date_valid_endmonth', 'int');
84 84
 $search_date_valid_endyear = GETPOST('search_date_valid_endyear', 'int');
85
-$search_date_valid_start = dol_mktime(0, 0, 0, $search_date_valid_startmonth, $search_date_valid_startday, $search_date_valid_startyear);	// Use tzserver
85
+$search_date_valid_start = dol_mktime(0, 0, 0, $search_date_valid_startmonth, $search_date_valid_startday, $search_date_valid_startyear); // Use tzserver
86 86
 $search_date_valid_end = dol_mktime(23, 59, 59, $search_date_valid_endmonth, $search_date_valid_endday, $search_date_valid_endyear);
87 87
 $search_type_thirdparty = GETPOST("search_type_thirdparty", 'int');
88 88
 $search_montant_ht = GETPOST('search_montant_ht', 'alpha');
@@ -442,7 +442,7 @@  discard block
 block discarded – undo
442 442
 			if ($searchCategoryProductOperator == 0) {
443 443
 				$searchCategoryProductSqlList[] = " EXISTS (SELECT ck.fk_product FROM ".MAIN_DB_PREFIX."categorie_product as ck, ".MAIN_DB_PREFIX."supplier_proposaldet as sd WHERE sd.fk_supplier_proposal = sp.rowid AND sd.fk_product = ck.fk_product AND ck.fk_categorie = ".((int) $searchCategoryProduct).")";
444 444
 			} else {
445
-				$listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategoryProduct);
445
+				$listofcategoryid .= ($listofcategoryid ? ', ' : '').((int) $searchCategoryProduct);
446 446
 			}
447 447
 		}
448 448
 	}
Please login to merge, or discard this patch.