Completed
Branch develop (4b5c76)
by
unknown
14:39
created
htdocs/accountancy/journal/sellsjournal.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 	$pastmonth = $dates['pastmonth'];
104 104
 }
105 105
 if (getDolGlobalString('ACCOUNTANCY_JOURNAL_USE_CURRENT_MONTH')) {
106
-	$pastmonth+=1;
106
+	$pastmonth += 1;
107 107
 }
108 108
 
109 109
 if (!GETPOSTISSET('date_startmonth') && (empty($date_start) || empty($date_end))) { // We define date_start and date_end, only if we did not submit the form
@@ -133,13 +133,13 @@  discard block
 block discarded – undo
133 133
 $sql .= " FROM ".MAIN_DB_PREFIX."facturedet as fd";
134 134
 $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON p.rowid = fd.fk_product";
135 135
 if (getDolGlobalString('MAIN_PRODUCT_PERENTITY_SHARED')) {
136
-	$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = " . ((int) $conf->entity);
136
+	$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = ".((int) $conf->entity);
137 137
 }
138 138
 $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa ON aa.rowid = fd.fk_code_ventilation";
139 139
 $sql .= " JOIN ".MAIN_DB_PREFIX."facture as f ON f.rowid = fd.fk_facture";
140 140
 $sql .= " JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = f.fk_soc";
141 141
 if (getDolGlobalString('MAIN_COMPANY_PERENTITY_SHARED')) {
142
-	$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "societe_perentity as spe ON spe.fk_soc = s.rowid AND spe.entity = " . ((int) $conf->entity);
142
+	$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_perentity as spe ON spe.fk_soc = s.rowid AND spe.entity = ".((int) $conf->entity);
143 143
 }
144 144
 $parameters = array();
145 145
 $reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters); // Note that $action and $object may have been modified by hook
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
 
215 215
 		//$compta_revenuestamp = getDolGlobalString('ACCOUNTING_REVENUESTAMP_SOLD_ACCOUNT', 'NotDefined');
216 216
 
217
-		$tax_id = $obj->tva_tx . ($obj->vat_src_code ? ' (' . $obj->vat_src_code . ')' : '');
217
+		$tax_id = $obj->tva_tx.($obj->vat_src_code ? ' ('.$obj->vat_src_code.')' : '');
218 218
 		if (array_key_exists($tax_id, $vatdata_cache)) {
219 219
 			$vatdata = $vatdata_cache[$tax_id];
220 220
 		} else {
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
 
292 292
 		// Move a part of the retained warrenty into the account of warranty
293 293
 		if (getDolGlobalString('INVOICE_USE_RETAINED_WARRANTY') && $obj->retained_warranty > 0) {
294
-			$retained_warranty = (double) price2num($total_ttc * $obj->retained_warranty / 100, 'MT');	// Calculate the amount of warrenty for this line (using the percent value)
294
+			$retained_warranty = (double) price2num($total_ttc * $obj->retained_warranty / 100, 'MT'); // Calculate the amount of warrenty for this line (using the percent value)
295 295
 			$tabwarranty[$obj->rowid][$compta_soc] += $retained_warranty;
296 296
 			$total_ttc -= $retained_warranty;
297 297
 		}
@@ -558,7 +558,7 @@  discard block
 block discarded – undo
558 558
 					}
559 559
 				} else {
560 560
 					if (getDolGlobalInt('ACCOUNTING_ENABLE_LETTERING') && getDolGlobalInt('ACCOUNTING_ENABLE_AUTOLETTERING')) {
561
-						require_once DOL_DOCUMENT_ROOT . '/accountancy/class/lettering.class.php';
561
+						require_once DOL_DOCUMENT_ROOT.'/accountancy/class/lettering.class.php';
562 562
 						$lettering_static = new Lettering($db);
563 563
 
564 564
 						$nb_lettering = $lettering_static->bookkeepingLettering(array($bookkeeping->id));
@@ -570,7 +570,7 @@  discard block
 block discarded – undo
570 570
 		// Product / Service
571 571
 		if (!$errorforline) {
572 572
 			foreach ($tabht[$key] as $k => $mt) {
573
-				$resultfetch = $accountingaccount->fetch(null, $k, true);	// TODO Use a cache
573
+				$resultfetch = $accountingaccount->fetch(null, $k, true); // TODO Use a cache
574 574
 				$label_account = $accountingaccount->label;
575 575
 
576 576
 				// get compte id and label
@@ -646,7 +646,7 @@  discard block
 block discarded – undo
646 646
 
647 647
 				foreach ($arrayofvat[$key] as $k => $mt) {
648 648
 					if ($mt) {
649
-						$accountingaccount->fetch(null, $k, true);	// TODO Use a cache for label
649
+						$accountingaccount->fetch(null, $k, true); // TODO Use a cache for label
650 650
 						$label_account = $accountingaccount->label;
651 651
 
652 652
 						$bookkeeping = new BookKeeping($db);
@@ -701,7 +701,7 @@  discard block
 block discarded – undo
701 701
 		if (!$errorforline) {
702 702
 			foreach ($tabrevenuestamp[$key] as $k => $mt) {
703 703
 				if ($mt) {
704
-					$accountingaccount->fetch(null, $k, true);	// TODO Use a cache for label
704
+					$accountingaccount->fetch(null, $k, true); // TODO Use a cache for label
705 705
 					$label_account = $accountingaccount->label;
706 706
 
707 707
 					$bookkeeping = new BookKeeping($db);
@@ -821,7 +821,7 @@  discard block
 block discarded – undo
821 821
 	foreach ($tabfac as $key => $val) {
822 822
 		$companystatic->id = $tabcompany[$key]['id'];
823 823
 		$companystatic->name = $tabcompany[$key]['name'];
824
-		$companystatic->code_compta = $tabcompany[$key]['code_compta'];				// deprecated
824
+		$companystatic->code_compta = $tabcompany[$key]['code_compta']; // deprecated
825 825
 		$companystatic->code_compta_client = $tabcompany[$key]['code_compta'];
826 826
 		$companystatic->code_client = $tabcompany[$key]['code_client'];
827 827
 		$companystatic->client = 3;
@@ -986,7 +986,7 @@  discard block
 block discarded – undo
986 986
 	journalHead($nom, $nomlink, $period, $periodlink, $description, $builddate, $exportlink, array('action' => ''), '', $varlink);
987 987
 
988 988
 	// Button to write into Ledger
989
-	$acctCustomerNotConfigured = in_array(getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER'), ['','-1']);
989
+	$acctCustomerNotConfigured = in_array(getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER'), ['', '-1']);
990 990
 	if ($acctCustomerNotConfigured) {
991 991
 		print '<br><div class="warning">'.img_warning().' '.$langs->trans("SomeMandatoryStepsOfSetupWereNotDone");
992 992
 		$desc = ' : '.$langs->trans("AccountancyAreaDescMisc", 4, '{link}');
@@ -1202,7 +1202,7 @@  discard block
 block discarded – undo
1202 1202
 					print length_accounta($tabcompany[$key]['code_compta']);
1203 1203
 				}
1204 1204
 			} elseif (($accountoshow == "") || $accountoshow == 'NotDefined') {
1205
-				print '<span class="error">' . $langs->trans("ThirdpartyAccountNotDefined") . '</span>';
1205
+				print '<span class="error">'.$langs->trans("ThirdpartyAccountNotDefined").'</span>';
1206 1206
 			}
1207 1207
 			print '</td>';
1208 1208
 			$companystatic->id = $tabcompany[$key]['id'];
Please login to merge, or discard this patch.
htdocs/accountancy/journal/purchasesjournal.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -130,14 +130,14 @@  discard block
 block discarded – undo
130 130
 $sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn_det as fd";
131 131
 $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON p.rowid = fd.fk_product";
132 132
 if (getDolGlobalString('MAIN_PRODUCT_PERENTITY_SHARED')) {
133
-	$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = " . ((int) $conf->entity);
133
+	$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = ".((int) $conf->entity);
134 134
 }
135 135
 $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa ON aa.rowid = fd.fk_code_ventilation";
136 136
 $sql .= " JOIN ".MAIN_DB_PREFIX."facture_fourn as f ON f.rowid = fd.fk_facture_fourn";
137 137
 $sql .= " JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = f.fk_soc";
138 138
 $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as co ON co.rowid = s.fk_pays ";
139 139
 if (getDolGlobalString('MAIN_COMPANY_PERENTITY_SHARED')) {
140
-	$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "societe_perentity as spe ON spe.fk_soc = s.rowid AND spe.entity = " . ((int) $conf->entity);
140
+	$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_perentity as spe ON spe.fk_soc = s.rowid AND spe.entity = ".((int) $conf->entity);
141 141
 }
142 142
 $parameters = array();
143 143
 $reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters); // Note that $action and $object may have been modified by hook
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
 	$cpttva = getDolGlobalString('ACCOUNTING_VAT_BUY_ACCOUNT', 'NotDefined');
194 194
 	$rcctva = getDolGlobalString('ACCOUNTING_VAT_BUY_REVERSE_CHARGES_CREDIT', 'NotDefined');
195 195
 	$rcdtva = getDolGlobalString('ACCOUNTING_VAT_BUY_REVERSE_CHARGES_DEBIT', 'NotDefined');
196
-	$country_code_in_EEC = getCountriesInEEC();		// This make a database call but there is a cache done into $conf->cache['country_code_in_EEC']
196
+	$country_code_in_EEC = getCountriesInEEC(); // This make a database call but there is a cache done into $conf->cache['country_code_in_EEC']
197 197
 
198 198
 	$i = 0;
199 199
 	while ($i < $num) {
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
 			}
212 212
 		}
213 213
 
214
-		$tax_id = $obj->tva_tx . ($obj->vat_src_code ? ' (' . $obj->vat_src_code . ')' : '');
214
+		$tax_id = $obj->tva_tx.($obj->vat_src_code ? ' ('.$obj->vat_src_code.')' : '');
215 215
 		if (array_key_exists($tax_id, $vatdata_cache)) {
216 216
 			$vatdata = $vatdata_cache[$tax_id];
217 217
 		} else {
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
 
261 261
 		// VAT Reverse charge
262 262
 		if (($mysoc->country_code == 'FR' || getDolGlobalString('ACCOUNTING_FORCE_ENABLE_VAT_REVERSE_CHARGE')) && $obj->vat_reverse_charge == 1 && in_array($obj->country_code, $country_code_in_EEC)) {
263
-			$rcvatdata = getTaxesFromId($obj->product_buy_vat . ($obj->product_buy_default_vat_code ? ' (' . $obj->product_buy_default_vat_code . ')' : ''), $mysoc, $mysoc, 0);
263
+			$rcvatdata = getTaxesFromId($obj->product_buy_vat.($obj->product_buy_default_vat_code ? ' ('.$obj->product_buy_default_vat_code.')' : ''), $mysoc, $mysoc, 0);
264 264
 			$rcc_compta_tva = (!empty($vatdata['accountancy_code_vat_reverse_charge_credit']) ? $vatdata['accountancy_code_vat_reverse_charge_credit'] : $rcctva);
265 265
 			$rcd_compta_tva = (!empty($vatdata['accountancy_code_vat_reverse_charge_debit']) ? $vatdata['accountancy_code_vat_reverse_charge_debit'] : $rcdtva);
266 266
 			$rcc_compta_localtax1 = (!empty($vatdata['accountancy_code_vat_reverse_charge_credit']) ? $vatdata['accountancy_code_vat_reverse_charge_credit'] : $rcctva);
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
 			$rcc_compta_localtax2 = (!empty($vatdata['accountancy_code_vat_reverse_charge_credit']) ? $vatdata['accountancy_code_vat_reverse_charge_credit'] : $rcctva);
269 269
 			$rcd_compta_localtax2 = (!empty($vatdata['accountancy_code_vat_reverse_charge_debit']) ? $vatdata['accountancy_code_vat_reverse_charge_debit'] : $rcdtva);
270 270
 			if (price2num($obj->product_buy_vat) || !empty($obj->product_buy_default_vat_code)) {
271
-				$vat_key = vatrate($obj->product_buy_vat) . ($obj->product_buy_default_vat_code ? ' (' . $obj->product_buy_default_vat_code . ')' : '');
271
+				$vat_key = vatrate($obj->product_buy_vat).($obj->product_buy_default_vat_code ? ' ('.$obj->product_buy_default_vat_code.')' : '');
272 272
 				$val_value = $vat_key;
273 273
 				$def_tva[$obj->rowid][$rcc_compta_tva][$vat_key] = $val_value;
274 274
 				$def_tva[$obj->rowid][$rcd_compta_tva][$vat_key] = $val_value;
@@ -487,7 +487,7 @@  discard block
 block discarded – undo
487 487
 					}
488 488
 				} else {
489 489
 					if (getDolGlobalInt('ACCOUNTING_ENABLE_LETTERING') && getDolGlobalInt('ACCOUNTING_ENABLE_AUTOLETTERING')) {
490
-						require_once DOL_DOCUMENT_ROOT . '/accountancy/class/lettering.class.php';
490
+						require_once DOL_DOCUMENT_ROOT.'/accountancy/class/lettering.class.php';
491 491
 						$lettering_static = new Lettering($db);
492 492
 
493 493
 						$nb_lettering = $lettering_static->bookkeepingLettering(array($bookkeeping->id));
@@ -499,7 +499,7 @@  discard block
 block discarded – undo
499 499
 		// Product / Service
500 500
 		if (!$errorforline) {
501 501
 			foreach ($tabht[$key] as $k => $mt) {
502
-				$resultfetch = $accountingaccount->fetch(null, $k, true);	// TODO Use a cache
502
+				$resultfetch = $accountingaccount->fetch(null, $k, true); // TODO Use a cache
503 503
 				$label_account = $accountingaccount->label;
504 504
 
505 505
 				// get compte id and label
@@ -599,7 +599,7 @@  discard block
 block discarded – undo
599 599
 
600 600
 				foreach ($arrayofvat[$key] as $k => $mt) {
601 601
 					if ($mt) {
602
-						$accountingaccount->fetch(null, $k, true);		// TODO Use a cache for label
602
+						$accountingaccount->fetch(null, $k, true); // TODO Use a cache for label
603 603
 						$label_account = $accountingaccount->label;
604 604
 
605 605
 						$bookkeeping = new BookKeeping($db);
@@ -938,7 +938,7 @@  discard block
 block discarded – undo
938 938
 	journalHead($nom, $nomlink, $period, $periodlink, $description, $builddate, $exportlink, array('action' => ''), '', $varlink);
939 939
 
940 940
 	// Button to write into Ledger
941
-	$acctSupplierNotConfigured = in_array(getDolGlobalString('ACCOUNTING_ACCOUNT_SUPPLIER'), ['','-1']);
941
+	$acctSupplierNotConfigured = in_array(getDolGlobalString('ACCOUNTING_ACCOUNT_SUPPLIER'), ['', '-1']);
942 942
 	if ($acctSupplierNotConfigured) {
943 943
 		print '<br><div class="warning">'.img_warning().' '.$langs->trans("SomeMandatoryStepsOfSetupWereNotDone");
944 944
 		$desc = ' : '.$langs->trans("AccountancyAreaDescMisc", 4, '{link}');
@@ -1125,7 +1125,7 @@  discard block
 block discarded – undo
1125 1125
 					print length_accounta($tabcompany[$key]['code_compta']);
1126 1126
 				}
1127 1127
 			} elseif (($accountoshow == "") || $accountoshow == 'NotDefined') {
1128
-				print '<span class="error">' . $langs->trans("ThirdpartyAccountNotDefined") . '</span>';
1128
+				print '<span class="error">'.$langs->trans("ThirdpartyAccountNotDefined").'</span>';
1129 1129
 			}
1130 1130
 			print '</td>';
1131 1131
 			$companystatic->id = $tabcompany[$key]['id'];
Please login to merge, or discard this patch.
htdocs/core/lib/bank.lib.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -303,7 +303,7 @@  discard block
 block discarded – undo
303 303
 	if ($account == null && $ibantocheck == null) {
304 304
 		return false;
305 305
 	} elseif ($ibantocheck == null) {
306
-		$ibantocheck = ($account->iban ? $account->iban : $account->iban_prefix);		// iban or iban_prefix for backward compatibility
306
+		$ibantocheck = ($account->iban ? $account->iban : $account->iban_prefix); // iban or iban_prefix for backward compatibility
307 307
 	}
308 308
 	require_once DOL_DOCUMENT_ROOT.'/includes/php-iban/oophp-iban.php';
309 309
 
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
 {
328 328
 	if ($account->getCountryCode() == 'FR') {
329 329
 		require_once DOL_DOCUMENT_ROOT.'/includes/php-iban/oophp-iban.php';
330
-		$ibantoprint = preg_replace('/[^a-zA-Z0-9]/', '', empty($account->iban)?'':$account->iban);
330
+		$ibantoprint = preg_replace('/[^a-zA-Z0-9]/', '', empty($account->iban) ? '' : $account->iban);
331 331
 		$iban = new PHP_IBAN\IBAN($ibantoprint);
332 332
 		return $iban->HumanFormat();
333 333
 	}
Please login to merge, or discard this patch.
htdocs/expedition/card.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
 			$stockLocation = "ent1".$i."_0";
274 274
 			$qty = "qtyl".$i;
275 275
 
276
-			$is_batch_or_serial=0;
276
+			$is_batch_or_serial = 0;
277 277
 			if (!empty($objectsrc->lines[$i]->fk_product)) {
278 278
 				$resultFetch = $product->fetch($objectsrc->lines[$i]->fk_product, '', '', '', 1, 1, 1);
279 279
 				if ($resultFetch < 0) {
@@ -299,9 +299,9 @@  discard block
 block discarded – undo
299 299
 						//var_dump($sub_qty[$j]['id_batch']);
300 300
 
301 301
 						//var_dump($qty);var_dump($batch);var_dump($sub_qty[$j]['q']);var_dump($sub_qty[$j]['id_batch']);
302
-						if ($is_batch_or_serial==2 && $sub_qty[$j]['q']>1) {
302
+						if ($is_batch_or_serial == 2 && $sub_qty[$j]['q'] > 1) {
303 303
 							setEventMessages($langs->trans("TooManyQtyForSerialNumber", $product->ref, ''), null, 'errors');
304
-							$totalqty=0;
304
+							$totalqty = 0;
305 305
 							break 2;
306 306
 						}
307 307
 						$j++;
@@ -350,7 +350,7 @@  discard block
 block discarded – undo
350 350
 
351 351
 			// check qty shipped not greater than ordered
352 352
 			if (getDolGlobalInt("MAIN_DONT_SHIP_MORE_THAN_ORDERED") && $subtotalqty > $objectsrc->lines[$i]->qty) {
353
-				setEventMessages($langs->trans("ErrorTooMuchShipped", $i+1), null, 'errors');
353
+				setEventMessages($langs->trans("ErrorTooMuchShipped", $i + 1), null, 'errors');
354 354
 				$error++;
355 355
 				continue;
356 356
 			}
@@ -678,7 +678,7 @@  discard block
 block discarded – undo
678 678
 									setEventMessages($line->error, $line->errors, 'errors');
679 679
 									$error++;
680 680
 								} else {
681
-									$update_done=true;
681
+									$update_done = true;
682 682
 								}
683 683
 							} else {
684 684
 								setEventMessages($lotStock->error, $lotStock->errors, 'errors');
@@ -722,7 +722,7 @@  discard block
 block discarded – undo
722 722
 										setEventMessages($line->error, $line->errors, 'errors');
723 723
 										$error++;
724 724
 									} else {
725
-										$update_done=true;
725
+										$update_done = true;
726 726
 									}
727 727
 								} else {
728 728
 									setEventMessages($line->error, $line->errors, 'errors');
@@ -741,7 +741,7 @@  discard block
 block discarded – undo
741 741
 									setEventMessages($object->error, $object->errors, 'errors');
742 742
 									$error++;
743 743
 								} else {
744
-									$update_done=true;
744
+									$update_done = true;
745 745
 								}
746 746
 							}
747 747
 						} else {
@@ -780,7 +780,7 @@  discard block
 block discarded – undo
780 780
 											setEventMessages($line->error, $line->errors, 'errors');
781 781
 											$error++;
782 782
 										} else {
783
-											$update_done=true;
783
+											$update_done = true;
784 784
 										}
785 785
 									}
786 786
 									unset($_POST[$stockLocation]);
@@ -796,7 +796,7 @@  discard block
 block discarded – undo
796 796
 								setEventMessages($line->error, $line->errors, 'errors');
797 797
 								$error++;
798 798
 							} else {
799
-								$update_done=true;
799
+								$update_done = true;
800 800
 							}
801 801
 							unset($_POST[$qty]);
802 802
 						}
@@ -810,7 +810,7 @@  discard block
 block discarded – undo
810 810
 							setEventMessages($line->error, $line->errors, 'errors');
811 811
 							$error++;
812 812
 						} else {
813
-							$update_done=true;
813
+							$update_done = true;
814 814
 						}
815 815
 						unset($_POST[$qty]);
816 816
 					}
@@ -1546,7 +1546,7 @@  discard block
 block discarded – undo
1546 1546
 							$nbofsuggested = 0;
1547 1547
 							foreach ($product->stock_warehouse as $warehouse_id => $stock_warehouse) {
1548 1548
 								if (($stock_warehouse->real > 0) && (count($stock_warehouse->detail_batch))) {
1549
-									$nbofsuggested+=count($stock_warehouse->detail_batch);
1549
+									$nbofsuggested += count($stock_warehouse->detail_batch);
1550 1550
 								}
1551 1551
 							}
1552 1552
 
@@ -1587,7 +1587,7 @@  discard block
 block discarded – undo
1587 1587
 											$tooltipClass = ' classfortooltip';
1588 1588
 											$tooltipTitle = $langs->trans('StockQuantitiesAlreadyAllocatedOnPreviousLines').' : '.$alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)];
1589 1589
 										} else {
1590
-											$alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)] = 0 ;
1590
+											$alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)] = 0;
1591 1591
 										}
1592 1592
 										$alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)] = $deliverableQty + $alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)];
1593 1593
 
@@ -2351,7 +2351,7 @@  discard block
 block discarded – undo
2351 2351
 							// only show lot numbers from src warehouse when shipping from multiple warehouses
2352 2352
 							$line->fetch($detail_batch->fk_expeditiondet);
2353 2353
 						}
2354
-						$entrepot_id = !empty($detail_batch->entrepot_id)?$detail_batch->entrepot_id:$lines[$i]->entrepot_id;
2354
+						$entrepot_id = !empty($detail_batch->entrepot_id) ? $detail_batch->entrepot_id : $lines[$i]->entrepot_id;
2355 2355
 						print '<td>'.$formproduct->selectLotStock($detail_batch->fk_origin_stock, 'batchl'.$detail_batch->fk_expeditiondet.'_'.$detail_batch->fk_origin_stock, '', 1, 0, $lines[$i]->fk_product, $entrepot_id).'</td>';
2356 2356
 						print '</tr>';
2357 2357
 					}
@@ -2568,7 +2568,7 @@  discard block
 block discarded – undo
2568 2568
 				 || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->expedition->shipping_advance->validate))) {
2569 2569
 					print dolGetButtonAction('', $langs->trans('Validate'), 'default', $_SERVER["PHP_SELF"].'?action=valid&token='.newToken().'&id='.$object->id, '');
2570 2570
 				} else {
2571
-					print dolGetButtonAction($langs->trans('NotAllowed'), $langs->trans('Validate'), 'default', $_SERVER['PHP_SELF']. '#', '', false);
2571
+					print dolGetButtonAction($langs->trans('NotAllowed'), $langs->trans('Validate'), 'default', $_SERVER['PHP_SELF'].'#', '', false);
2572 2572
 				}
2573 2573
 			}
2574 2574
 
@@ -2590,7 +2590,7 @@  discard block
 block discarded – undo
2590 2590
 					if (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->rights->expedition->shipping_advance->send) {
2591 2591
 						print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER["PHP_SELF"].'?action=presend&token='.newToken().'&id='.$object->id.'&mode=init#formmailbeforetitle', '');
2592 2592
 					} else {
2593
-						print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER['PHP_SELF']. '#', '', false);
2593
+						print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER['PHP_SELF'].'#', '', false);
2594 2594
 					}
2595 2595
 				}
2596 2596
 			}
@@ -2616,7 +2616,7 @@  discard block
 block discarded – undo
2616 2616
 					if (!$object->billed && getDolGlobalString('WORKFLOW_BILL_ON_SHIPMENT') !== '0') {
2617 2617
 						print dolGetButtonAction('', $langs->trans('ClassifyBilled'), 'default', $_SERVER["PHP_SELF"].'?action=classifybilled&token='.newToken().'&id='.$object->id, '');
2618 2618
 					}
2619
-					print dolGetButtonAction('', $langs->trans("Close"), 'default', $_SERVER["PHP_SELF"].'?action='. $paramaction .'&token='.newToken().'&id='.$object->id, '');
2619
+					print dolGetButtonAction('', $langs->trans("Close"), 'default', $_SERVER["PHP_SELF"].'?action='.$paramaction.'&token='.newToken().'&id='.$object->id, '');
2620 2620
 				}
2621 2621
 			}
2622 2622
 
Please login to merge, or discard this patch.
htdocs/bom/bom_card.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
 		}
195 195
 
196 196
 		// We check if we're allowed to add this bom
197
-		$TParentBom=array();
197
+		$TParentBom = array();
198 198
 		$object->getParentBomTreeRecursive($TParentBom);
199 199
 		if ($bom_child_id > 0 && !empty($TParentBom) && in_array($bom_child_id, $TParentBom)) {
200 200
 			$n_child = new BOM($db);
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
 			$bomline->fetch($lineid);
268 268
 
269 269
 			$fk_default_workstation = $bomline->fk_default_workstation;
270
-			if (isModEnabled('workstation') &&  GETPOSTISSET('idworkstations')) {
270
+			if (isModEnabled('workstation') && GETPOSTISSET('idworkstations')) {
271 271
 				$fk_default_workstation = GETPOSTINT('idworkstations');
272 272
 			}
273 273
 
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
 
302 302
 
303 303
 $title = $langs->trans('BOM');
304
-$help_url ='EN:Module_BOM';
304
+$help_url = 'EN:Module_BOM';
305 305
 llxHeader('', $title, $help_url);
306 306
 
307 307
 // Part to create
@@ -580,17 +580,17 @@  discard block
 block discarded – undo
580 580
 
581 581
 	if (!empty($object->table_element_line)) {
582 582
 		// Products
583
-		$res = $object->fetchLinesbytypeproduct(0);		// Load all lines products into ->lines
583
+		$res = $object->fetchLinesbytypeproduct(0); // Load all lines products into ->lines
584 584
 		$object->calculateCosts();
585 585
 
586 586
 		print ($res == 0 && $object->status >= $object::STATUS_VALIDATED) ? '' : load_fiche_titre($langs->trans('BOMProductsList'), '', 'product');
587 587
 
588
-		print '	<form name="addproduct" id="addproduct" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . (($action != 'editline') ? '' : '') . '" method="POST">
589
-    	<input type="hidden" name="token" value="' . newToken() . '">
590
-    	<input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateline') . '">
588
+		print '	<form name="addproduct" id="addproduct" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.(($action != 'editline') ? '' : '').'" method="POST">
589
+    	<input type="hidden" name="token" value="' . newToken().'">
590
+    	<input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateline').'">
591 591
     	<input type="hidden" name="mode" value="">
592 592
 		<input type="hidden" name="page_y" value="">
593
-    	<input type="hidden" name="id" value="' . $object->id . '">
593
+    	<input type="hidden" name="id" value="' . $object->id.'">
594 594
     	';
595 595
 
596 596
 		if (!empty($conf->use_javascript_ajax) && $object->status == 0) {
@@ -629,21 +629,21 @@  discard block
 block discarded – undo
629 629
 
630 630
 		// Services
631 631
 		$filtertype = 1;
632
-		$res = $object->fetchLinesbytypeproduct(1);		// Load all lines services into ->lines
632
+		$res = $object->fetchLinesbytypeproduct(1); // Load all lines services into ->lines
633 633
 		$object->calculateCosts();
634 634
 
635 635
 		print ($res == 0 && $object->status >= $object::STATUS_VALIDATED) ? '' : load_fiche_titre($langs->trans('BOMServicesList'), '', 'service');
636 636
 
637
-		print '	<form name="addservice" id="addservice" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . (($action != 'editline') ? '' : '') . '" method="POST">
638
-    	<input type="hidden" name="token" value="' . newToken() . '">
639
-    	<input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateline') . '">
637
+		print '	<form name="addservice" id="addservice" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.(($action != 'editline') ? '' : '').'" method="POST">
638
+    	<input type="hidden" name="token" value="' . newToken().'">
639
+    	<input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateline').'">
640 640
     	<input type="hidden" name="mode" value="">
641
-		<input type="hidden" name="page_y" value="">    		<input type="hidden" name="id" value="' . $object->id . '">
641
+		<input type="hidden" name="page_y" value="">    		<input type="hidden" name="id" value="' . $object->id.'">
642 642
     	';
643 643
 
644 644
 		if (!empty($conf->use_javascript_ajax) && $object->status == 0) {
645 645
 			$tagidfortablednd = 'tablelinesservice';
646
-			include DOL_DOCUMENT_ROOT . '/core/tpl/ajaxrow.tpl.php';
646
+			include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php';
647 647
 		}
648 648
 
649 649
 		print '<div class="div-table-responsive-no-min">';
Please login to merge, or discard this patch.
htdocs/compta/prelevement/class/bonprelevement.class.php 1 patch
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -90,8 +90,8 @@  discard block
 block discarded – undo
90 90
 
91 91
 	const STATUS_DRAFT = 0;
92 92
 	const STATUS_TRANSFERED = 1;
93
-	const STATUS_CREDITED = 2;		// STATUS_CREDITED and STATUS_DEBITED is same. Difference is in ->type
94
-	const STATUS_DEBITED = 2;		// STATUS_CREDITED and STATUS_DEBITED is same. Difference is in ->type
93
+	const STATUS_CREDITED = 2; // STATUS_CREDITED and STATUS_DEBITED is same. Difference is in ->type
94
+	const STATUS_DEBITED = 2; // STATUS_CREDITED and STATUS_DEBITED is same. Difference is in ->type
95 95
 
96 96
 
97 97
 	/**
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
 	/**
138 138
 	 * @var array  Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
139 139
 	 */
140
-	public $fields=array(
140
+	public $fields = array(
141 141
 		'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>10, 'notnull'=>1, 'visible'=>0,),
142 142
 		'ref' => array('type'=>'varchar(12)', 'label'=>'Ref', 'enabled'=>'1', 'position'=>15, 'notnull'=>0, 'visible'=>-1, 'csslist'=>'tdoverflowmax150', 'showoncombobox'=>'1',),
143 143
 		'datec' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>'1', 'position'=>25, 'notnull'=>0, 'visible'=>-1,),
@@ -545,7 +545,7 @@  discard block
 block discarded – undo
545 545
 						} else {
546 546
 							$modeforaddpayment = 'payment';
547 547
 							$labelforaddpayment = '(CustomerInvoicePayment)';
548
-							$addbankurl = 'direct-debit';	// = 'directdebit'
548
+							$addbankurl = 'direct-debit'; // = 'directdebit'
549 549
 						}
550 550
 
551 551
 						$result = $paiement->addPaymentToBank($user, $modeforaddpayment, $labelforaddpayment, $fk_bank_account, '', '', 0, '', $addbankurl);
@@ -898,13 +898,13 @@  discard block
 block discarded – undo
898 898
 			$sql .= ", f.ref, sr.bic, sr.iban_prefix, sr.frstrecur";
899 899
 			if ($type != 'bank-transfer') {
900 900
 				$sql .= " FROM ".MAIN_DB_PREFIX."facture as f";
901
-				$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "prelevement_demande as pd ON f.rowid = pd.fk_facture";
901
+				$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."prelevement_demande as pd ON f.rowid = pd.fk_facture";
902 902
 			} else {
903 903
 				$sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as f";
904
-				$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "prelevement_demande as pd ON f.rowid = pd.fk_facture_fourn";
904
+				$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."prelevement_demande as pd ON f.rowid = pd.fk_facture_fourn";
905 905
 			}
906
-			$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "societe as s ON s.rowid = f.fk_soc";
907
-			$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "societe_rib as sr ON s.rowid = sr.fk_soc AND sr.default_rib = 1";
906
+			$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = f.fk_soc";
907
+			$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_rib as sr ON s.rowid = sr.fk_soc AND sr.default_rib = 1";
908 908
 			$sql .= " WHERE f.entity IN (".getEntity('invoice').')';
909 909
 			$sql .= " AND f.fk_statut = 1"; // Invoice validated
910 910
 			$sql .= " AND f.paye = 0";
@@ -992,12 +992,12 @@  discard block
 block discarded – undo
992 992
 							} else {
993 993
 								$invoice_url = "<a href='".DOL_URL_ROOT.'/fourn/facture/card.php?facid='.$fac[0]."'>".$fac[9]."</a>";
994 994
 							}
995
-							dol_syslog(__METHOD__ . " Check BAN Error on default bank number IBAN/BIC for thirdparty reported by verif() " . $fac->fk_soc . " " . $soc->name, LOG_WARNING);
996
-							$this->invoice_in_error[$fac[0]] = "Error on default bank number IBAN/BIC for invoice " . $invoice_url . " for thirdparty " . $soc->getNomUrl(0);
997
-							$this->thirdparty_in_error[$soc->id] = "Error on default bank number IBAN/BIC for invoice " . $invoice_url . " for thirdparty " . $soc->getNomUrl(0);
995
+							dol_syslog(__METHOD__." Check BAN Error on default bank number IBAN/BIC for thirdparty reported by verif() ".$fac->fk_soc." ".$soc->name, LOG_WARNING);
996
+							$this->invoice_in_error[$fac[0]] = "Error on default bank number IBAN/BIC for invoice ".$invoice_url." for thirdparty ".$soc->getNomUrl(0);
997
+							$this->thirdparty_in_error[$soc->id] = "Error on default bank number IBAN/BIC for invoice ".$invoice_url." for thirdparty ".$soc->getNomUrl(0);
998 998
 						}
999 999
 					} else {
1000
-						dol_syslog(__METHOD__ . " Check BAN Failed to read company", LOG_WARNING);
1000
+						dol_syslog(__METHOD__." Check BAN Failed to read company", LOG_WARNING);
1001 1001
 					}
1002 1002
 					/*
1003 1003
 					} else {
@@ -1051,7 +1051,7 @@  discard block
 block discarded – undo
1051 1051
 				$ref = substr($year, -2).$month;
1052 1052
 
1053 1053
 				// Get next free nuber for the ref of bon
1054
-				$sql = "SELECT substring(ref from char_length(ref) - 1)";	// To extract "YYMMXX" from "TYYMMXX"
1054
+				$sql = "SELECT substring(ref from char_length(ref) - 1)"; // To extract "YYMMXX" from "TYYMMXX"
1055 1055
 				$sql .= " FROM ".MAIN_DB_PREFIX."prelevement_bons";
1056 1056
 				$sql .= " WHERE ref LIKE '_".$this->db->escape($ref)."%'";
1057 1057
 				$sql .= " AND entity = ".((int) $conf->entity);
@@ -2041,7 +2041,7 @@  discard block
 block discarded – undo
2041 2041
 			$XML_CREDITOR .= '					<EndToEndId>'.(($conf->global->PRELEVEMENT_END_TO_END != "") ? $conf->global->PRELEVEMENT_END_TO_END : ('CT-'.dol_trunc($row_idfac.'-'.$row_ref, 20, 'right', 'UTF-8', 1)).'-'.$Rowing).'</EndToEndId>'.$CrLf; // ISO20022 states that EndToEndId has a MaxLength of 35 characters
2042 2042
 			$XML_CREDITOR .= '				</PmtId>'.$CrLf;
2043 2043
 			if (!empty($this->sepa_xml_pti_in_ctti)) {
2044
-				$XML_CREDITOR .= '				<PmtTpInf>' . $CrLf;
2044
+				$XML_CREDITOR .= '				<PmtTpInf>'.$CrLf;
2045 2045
 
2046 2046
 				// Can be 'NORM' for normal or 'HIGH' for high priority level
2047 2047
 				if (!empty($conf->global->PAYMENTBYBANKTRANSFER_FORCE_HIGH_PRIORITY)) {
@@ -2049,14 +2049,14 @@  discard block
 block discarded – undo
2049 2049
 				} else {
2050 2050
 					$instrprty = 'NORM';
2051 2051
 				}
2052
-				$XML_CREDITOR .= '					<InstrPrty>'.$instrprty.'</InstrPrty>' . $CrLf;
2053
-				$XML_CREDITOR .= '					<SvcLvl>' . $CrLf;
2054
-				$XML_CREDITOR .= '						<Cd>SEPA</Cd>' . $CrLf;
2055
-				$XML_CREDITOR .= '					</SvcLvl>' . $CrLf;
2056
-				$XML_CREDITOR .= '					<CtgyPurp>' . $CrLf;
2057
-				$XML_CREDITOR .= '						<Cd>CORE</Cd>' . $CrLf;
2058
-				$XML_CREDITOR .= '					</CtgyPurp>' . $CrLf;
2059
-				$XML_CREDITOR .= '				</PmtTpInf>' . $CrLf;
2052
+				$XML_CREDITOR .= '					<InstrPrty>'.$instrprty.'</InstrPrty>'.$CrLf;
2053
+				$XML_CREDITOR .= '					<SvcLvl>'.$CrLf;
2054
+				$XML_CREDITOR .= '						<Cd>SEPA</Cd>'.$CrLf;
2055
+				$XML_CREDITOR .= '					</SvcLvl>'.$CrLf;
2056
+				$XML_CREDITOR .= '					<CtgyPurp>'.$CrLf;
2057
+				$XML_CREDITOR .= '						<Cd>CORE</Cd>'.$CrLf;
2058
+				$XML_CREDITOR .= '					</CtgyPurp>'.$CrLf;
2059
+				$XML_CREDITOR .= '				</PmtTpInf>'.$CrLf;
2060 2060
 			}
2061 2061
 			$XML_CREDITOR .= '				<Amt>'.$CrLf;
2062 2062
 			$XML_CREDITOR .= '					<InstdAmt Ccy="EUR">'.round($row_somme, 2).'</InstdAmt>'.$CrLf;
@@ -2217,7 +2217,7 @@  discard block
 block discarded – undo
2217 2217
 			$this->emetteur_iban = $account->iban;
2218 2218
 			$this->emetteur_bic = $account->bic;
2219 2219
 
2220
-			$this->emetteur_ics = ($type == 'bank-transfer' ? $account->ics_transfer : $account->ics);  // Ex: PRELEVEMENT_ICS = "FR78ZZZ123456";
2220
+			$this->emetteur_ics = ($type == 'bank-transfer' ? $account->ics_transfer : $account->ics); // Ex: PRELEVEMENT_ICS = "FR78ZZZ123456";
2221 2221
 
2222 2222
 			$this->raison_sociale = $account->proprio;
2223 2223
 		}
@@ -2308,15 +2308,15 @@  discard block
 block discarded – undo
2308 2308
 				$XML_SEPA_INFO .= '			<NbOfTxs>'.$nombre.'</NbOfTxs>'.$CrLf;
2309 2309
 				$XML_SEPA_INFO .= '			<CtrlSum>'.$total.'</CtrlSum>'.$CrLf;
2310 2310
 				if (!empty($this->sepa_xml_pti_in_ctti) && !empty($format)) {	// @TODO Using $format (FRST ou RCUR) in a section for a Credit Transfer looks strange.
2311
-					$XML_SEPA_INFO .= '			<PmtTpInf>' . $CrLf;
2312
-					$XML_SEPA_INFO .= '				<SvcLvl>' . $CrLf;
2313
-					$XML_SEPA_INFO .= '					<Cd>SEPA</Cd>' . $CrLf;
2314
-					$XML_SEPA_INFO .= '				</SvcLvl>' . $CrLf;
2315
-					$XML_SEPA_INFO .= '				<LclInstrm>' . $CrLf;
2316
-					$XML_SEPA_INFO .= '					<Cd>CORE</Cd>' . $CrLf;
2317
-					$XML_SEPA_INFO .= '				</LclInstrm>' . $CrLf;
2318
-					$XML_SEPA_INFO .= '				<SeqTp>' . $format . '</SeqTp>' . $CrLf;
2319
-					$XML_SEPA_INFO .= '			</PmtTpInf>' . $CrLf;
2311
+					$XML_SEPA_INFO .= '			<PmtTpInf>'.$CrLf;
2312
+					$XML_SEPA_INFO .= '				<SvcLvl>'.$CrLf;
2313
+					$XML_SEPA_INFO .= '					<Cd>SEPA</Cd>'.$CrLf;
2314
+					$XML_SEPA_INFO .= '				</SvcLvl>'.$CrLf;
2315
+					$XML_SEPA_INFO .= '				<LclInstrm>'.$CrLf;
2316
+					$XML_SEPA_INFO .= '					<Cd>CORE</Cd>'.$CrLf;
2317
+					$XML_SEPA_INFO .= '				</LclInstrm>'.$CrLf;
2318
+					$XML_SEPA_INFO .= '				<SeqTp>'.$format.'</SeqTp>'.$CrLf;
2319
+					$XML_SEPA_INFO .= '			</PmtTpInf>'.$CrLf;
2320 2320
 				}
2321 2321
 				$XML_SEPA_INFO .= '			<ReqdExctnDt>'.dol_print_date($dateTime_ETAD, 'dayrfc').'</ReqdExctnDt>'.$CrLf;
2322 2322
 				$XML_SEPA_INFO .= '			<Dbtr>'.$CrLf;
Please login to merge, or discard this patch.
htdocs/commande/list.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
 	'typent.code'=>array('label'=>"ThirdPartyType", 'checked'=>$checkedtypetiers, 'position'=>55),
183 183
 	'c.date_commande'=>array('label'=>"OrderDateShort", 'checked'=>1, 'position'=>60),
184 184
 	'c.date_delivery'=>array('label'=>"DateDeliveryPlanned", 'checked'=>1, 'enabled'=>empty($conf->global->ORDER_DISABLE_DELIVERY_DATE), 'position'=>65),
185
-	'c.fk_shipping_method'=>array('label'=>"SendingMethod", 'checked'=>-1, 'position'=>66 , 'enabled'=>isModEnabled("expedition")),
185
+	'c.fk_shipping_method'=>array('label'=>"SendingMethod", 'checked'=>-1, 'position'=>66, 'enabled'=>isModEnabled("expedition")),
186 186
 	'c.fk_cond_reglement'=>array('label'=>"PaymentConditionsShort", 'checked'=>-1, 'position'=>67),
187 187
 	'c.fk_mode_reglement'=>array('label'=>"PaymentMode", 'checked'=>-1, 'position'=>68),
188 188
 	'c.fk_input_reason'=>array('label'=>"Channel", 'checked'=>-1, 'position'=>69),
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
 	'c.date_cloture'=>array('label'=>"DateClosing", 'checked'=>0, 'position'=>130),
206 206
 	'c.note_public'=>array('label'=>'NotePublic', 'checked'=>0, 'enabled'=>(!getDolGlobalInt('MAIN_LIST_HIDE_PUBLIC_NOTES')), 'position'=>135),
207 207
 	'c.note_private'=>array('label'=>'NotePrivate', 'checked'=>0, 'enabled'=>(!getDolGlobalInt('MAIN_LIST_HIDE_PRIVATE_NOTES')), 'position'=>140),
208
-	'shippable'=>array('label'=>"Shippable", 'checked'=>1,'enabled'=>(isModEnabled("expedition")), 'position'=>990),
208
+	'shippable'=>array('label'=>"Shippable", 'checked'=>1, 'enabled'=>(isModEnabled("expedition")), 'position'=>990),
209 209
 	'c.facture'=>array('label'=>"Billed", 'checked'=>1, 'enabled'=>(!getDolGlobalString('WORKFLOW_BILL_ON_SHIPMENT')), 'position'=>995),
210 210
 	'c.import_key' =>array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-2, 'position'=>999),
211 211
 	'c.fk_statut'=>array('label'=>"Status", 'checked'=>1, 'position'=>1000)
@@ -332,7 +332,7 @@  discard block
 block discarded – undo
332 332
 		$TFactThirdNbLines = array();
333 333
 
334 334
 		$nb_bills_created = 0;
335
-		$lastid= 0;
335
+		$lastid = 0;
336 336
 		$lastref = '';
337 337
 
338 338
 		$db->begin();
@@ -1032,7 +1032,7 @@  discard block
 block discarded – undo
1032 1032
 			if ($searchCategoryProductOperator == 0) {
1033 1033
 				$searchCategoryProductSqlList[] = " EXISTS (SELECT ck.fk_product FROM ".MAIN_DB_PREFIX."categorie_product as ck, ".MAIN_DB_PREFIX."commandedet as cd WHERE cd.fk_commande = c.rowid AND cd.fk_product = ck.fk_product AND ck.fk_categorie = ".((int) $searchCategoryProduct).")";
1034 1034
 			} else {
1035
-				$listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategoryProduct);
1035
+				$listofcategoryid .= ($listofcategoryid ? ', ' : '').((int) $searchCategoryProduct);
1036 1036
 			}
1037 1037
 		}
1038 1038
 	}
@@ -2596,13 +2596,13 @@  discard block
 block discarded – undo
2596 2596
 			print '<td class="center">';
2597 2597
 			if (!empty($show_shippable_command) && isModEnabled('stock')) {
2598 2598
 				if (($obj->fk_statut > $generic_commande::STATUS_DRAFT) && ($obj->fk_statut < $generic_commande::STATUS_CLOSED)) {
2599
-					$generic_commande->getLinesArray(); 	// Load array ->lines
2600
-					$generic_commande->loadExpeditions();	// Load array ->expeditions
2599
+					$generic_commande->getLinesArray(); // Load array ->lines
2600
+					$generic_commande->loadExpeditions(); // Load array ->expeditions
2601 2601
 
2602 2602
 					$numlines = count($generic_commande->lines); // Loop on each line of order
2603 2603
 					for ($lig = 0; $lig < $numlines; $lig++) {
2604 2604
 						if (isset($generic_commande->expeditions[$generic_commande->lines[$lig]->id])) {
2605
-							$reliquat =  $generic_commande->lines[$lig]->qty - $generic_commande->expeditions[$generic_commande->lines[$lig]->id];
2605
+							$reliquat = $generic_commande->lines[$lig]->qty - $generic_commande->expeditions[$generic_commande->lines[$lig]->id];
2606 2606
 						} else {
2607 2607
 							$reliquat = $generic_commande->lines[$lig]->qty;
2608 2608
 						}
Please login to merge, or discard this patch.
htdocs/commande/list_det.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
 	'typent.code'=>array('label'=>"ThirdPartyType", 'checked'=>$checkedtypetiers, 'position'=>55),
189 189
 	'c.date_commande'=>array('label'=>"OrderDateShort", 'checked'=>1, 'position'=>60),
190 190
 	'c.date_delivery'=>array('label'=>"DateDeliveryPlanned", 'checked'=>1, 'enabled'=>empty($conf->global->ORDER_DISABLE_DELIVERY_DATE), 'position'=>65),
191
-	'c.fk_shipping_method'=>array('label'=>"SendingMethod", 'checked'=>-1, 'position'=>66 , 'enabled'=>isModEnabled('expedition')),
191
+	'c.fk_shipping_method'=>array('label'=>"SendingMethod", 'checked'=>-1, 'position'=>66, 'enabled'=>isModEnabled('expedition')),
192 192
 	'c.fk_cond_reglement'=>array('label'=>"PaymentConditionsShort", 'checked'=>-1, 'position'=>67),
193 193
 	'c.fk_mode_reglement'=>array('label'=>"PaymentMode", 'checked'=>-1, 'position'=>68),
194 194
 	'c.fk_input_reason'=>array('label'=>"Channel", 'checked'=>-1, 'position'=>69),
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
 	'c.date_cloture'=>array('label'=>"DateClosing", 'checked'=>0, 'position'=>130),
213 213
 	'c.note_public'=>array('label'=>'NotePublic', 'checked'=>0, 'enabled'=>(empty($conf->global->MAIN_LIST_ALLOW_PUBLIC_NOTES)), 'position'=>135),
214 214
 	'c.note_private'=>array('label'=>'NotePrivate', 'checked'=>0, 'enabled'=>(empty($conf->global->MAIN_LIST_ALLOW_PRIVATE_NOTES)), 'position'=>140),
215
-	'shippable'=>array('label'=>"Shippable", 'checked'=>1,'enabled'=>(isModEnabled('expedition')), 'position'=>990),
215
+	'shippable'=>array('label'=>"Shippable", 'checked'=>1, 'enabled'=>(isModEnabled('expedition')), 'position'=>990),
216 216
 	'c.facture'=>array('label'=>"Billed", 'checked'=>1, 'enabled'=>(!getDolGlobalString('WORKFLOW_BILL_ON_SHIPMENT')), 'position'=>995),
217 217
 	'c.import_key' =>array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-2, 'position'=>999),
218 218
 	'c.fk_statut'=>array('label'=>"Status", 'checked'=>1, 'position'=>1000)
@@ -821,7 +821,7 @@  discard block
 block discarded – undo
821 821
 	if (!empty($socid)) {
822 822
 		$url .= '&socid='.$socid;
823 823
 	}
824
-	$newcardbutton = '';//dolGetButtonTitle($langs->trans('NewOrder'), '', 'fa fa-plus-circle', $url, '', $contextpage == 'orderlistdet' && $permissiontoadd);
824
+	$newcardbutton = ''; //dolGetButtonTitle($langs->trans('NewOrder'), '', 'fa fa-plus-circle', $url, '', $contextpage == 'orderlistdet' && $permissiontoadd);
825 825
 
826 826
 	// Lines of title fields
827 827
 	print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
@@ -854,9 +854,9 @@  discard block
 block discarded – undo
854 854
 
855 855
 	$moreforfilter = '';
856 856
 
857
-	$moreforfilter .= '<input type="checkbox" name="productobuy"'.(!empty($productobuy)?'value="productobuychecked" checked':'' ).'><label for="productobuy">'.$langs->trans("productobuy").'</label>';
858
-	$moreforfilter .= '<input type="checkbox" name="productonly"'.(!empty($productonly)?'value="productonlychecked" checked':'' ).'><label for="productonly">'.$langs->trans("productonly").'</label>';
859
-	$moreforfilter .= '<input type="checkbox" name="disablelinefree"'.(!empty($disablelinefree)?'value="disablelinefreechecked" checked':'' ).'><label for="disablelinefree">'.$langs->trans("disablelinefree").'</label>';
857
+	$moreforfilter .= '<input type="checkbox" name="productobuy"'.(!empty($productobuy) ? 'value="productobuychecked" checked' : '').'><label for="productobuy">'.$langs->trans("productobuy").'</label>';
858
+	$moreforfilter .= '<input type="checkbox" name="productonly"'.(!empty($productonly) ? 'value="productonlychecked" checked' : '').'><label for="productonly">'.$langs->trans("productonly").'</label>';
859
+	$moreforfilter .= '<input type="checkbox" name="disablelinefree"'.(!empty($disablelinefree) ? 'value="disablelinefreechecked" checked' : '').'><label for="disablelinefree">'.$langs->trans("disablelinefree").'</label>';
860 860
 	$moreforfilter .= '<br>';
861 861
 
862 862
 	// If the user can view prospects other than his'
@@ -1996,10 +1996,10 @@  discard block
 block discarded – undo
1996 1996
 			print '<td class="center">';
1997 1997
 			if (!empty($show_shippable_command) && isModEnabled('stock')) {
1998 1998
 				if (($obj->fk_statut > $generic_commande::STATUS_DRAFT) && ($obj->fk_statut < $generic_commande::STATUS_CLOSED)) {
1999
-					$generic_commande->loadExpeditions();	// Load array ->expeditions
1999
+					$generic_commande->loadExpeditions(); // Load array ->expeditions
2000 2000
 
2001 2001
 					if (isset($generic_commande->expeditions[$obj->rowid])) {
2002
-						$reliquat =  $obj->qty - $generic_commande->expeditions[$obj->rowid];
2002
+						$reliquat = $obj->qty - $generic_commande->expeditions[$obj->rowid];
2003 2003
 					} else {
2004 2004
 						$reliquat = $obj->qty;
2005 2005
 					}
Please login to merge, or discard this patch.