Completed
Branch develop (936be1)
by
unknown
15:34
created
htdocs/categories/viewcat.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -679,7 +679,7 @@  discard block
 block discarded – undo
679 679
 				print '<table class="noborder centpercent">';
680 680
 				print '<tr class="liste_titre"><td>';
681 681
 				print $langs->trans("AddSupplierIntoCategory").' &nbsp;';
682
-				$filter ='(s.fournisseur:=:1)';
682
+				$filter = '(s.fournisseur:=:1)';
683 683
 				print $form->select_company('', 'elemid', $filter);
684 684
 				print '<input type="submit" class="button buttongen" value="'.$langs->trans("ClassifyInCategory").'"></td>';
685 685
 				print '</tr>';
@@ -1114,7 +1114,7 @@  discard block
 block discarded – undo
1114 1114
 				print '<input type="hidden" name="action" value="addintocategory">';
1115 1115
 				print '<table class="noborder centpercent">';
1116 1116
 				print '<tr class="liste_titre"><td>';
1117
-				$force_entity = getEntity($object->element);	// So we will get same filter than the getObjectsInCateg()
1117
+				$force_entity = getEntity($object->element); // So we will get same filter than the getObjectsInCateg()
1118 1118
 				print img_picto('', $type, 'class="pictofixedwidth"');
1119 1119
 				print $form->select_dolusers('', 'elemid', 1, null, 0, '', '', $force_entity);
1120 1120
 				print '<input type="submit" class="button buttongen" value="'.$langs->trans("ClassifyInCategory").'"></td>';
Please login to merge, or discard this patch.
htdocs/societe/class/companypaymentmode.class.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -179,9 +179,9 @@
 block discarded – undo
179 179
 	public $max_total_amount_of_all_payments;
180 180
 	public $preapproval_key;
181 181
 	public $total_amount_of_all_payments;
182
-	public $stripe_card_ref;	// External system payment mode ID
183
-	public $stripe_account;		// External system customer ID
184
-	public $ext_payment_site;	// External system 'StripeLive', 'StripeTest', 'StancerLive', 'StancerTest', ...
182
+	public $stripe_card_ref; // External system payment mode ID
183
+	public $stripe_account; // External system customer ID
184
+	public $ext_payment_site; // External system 'StripeLive', 'StripeTest', 'StancerLive', 'StancerTest', ...
185 185
 
186 186
 	/**
187 187
 	 * @var int Status
Please login to merge, or discard this patch.
htdocs/societe/societecontact.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -280,7 +280,7 @@
 block discarded – undo
280 280
 
281 281
 						// Type
282 282
 						$membertypestatic->id = $objp->type_id;
283
-						$membertypestatic->libelle = $objp->type_label;	// deprecated
283
+						$membertypestatic->libelle = $objp->type_label; // deprecated
284 284
 						$membertypestatic->label = $objp->type_label;
285 285
 
286 286
 						print '<td class="nowrap">';
Please login to merge, or discard this patch.
htdocs/societe/ajax/ajaxcompanies.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@
 block discarded – undo
82 82
 }
83 83
 
84 84
 // Generate list of companies
85
-if (! $socid) {
85
+if (!$socid) {
86 86
 	echo json_encode(array('nom'=>'ErrorBadParameter', 'label'=>'ErrorBadParameter', 'key'=>'ErrorBadParameter', 'value'=>'ErrorBadParameter'));
87 87
 	exit;
88 88
 }
Please login to merge, or discard this patch.
htdocs/societe/admin/societe.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
 
36 36
 $action = GETPOST('action', 'aZ09');
37 37
 $value = GETPOST('value', 'alpha');
38
-$modulepart = GETPOST('modulepart', 'aZ09');	// Used by actions_setmoduleoptions.inc.php
38
+$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php
39 39
 
40 40
 if (!$user->admin) {
41 41
 	accessforbidden();
Please login to merge, or discard this patch.
htdocs/don/payment/card.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -216,7 +216,7 @@
 block discarded – undo
216 216
 		if (!$disable_delete) {
217 217
 			print dolGetButtonAction($langs->trans('Delete'), '', 'delete', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken(), '', 1);
218 218
 		} else {
219
-			print dolGetButtonAction($langs->trans("CantRemovePaymentWithOneInvoicePaid"), $langs->trans('Delete'), '', $_SERVER["PHP_SELF"].'?id='.$object->id.'#', '', 1, [ 'attr' => ['classOverride' => 'butActionRefused']]);
219
+			print dolGetButtonAction($langs->trans("CantRemovePaymentWithOneInvoicePaid"), $langs->trans('Delete'), '', $_SERVER["PHP_SELF"].'?id='.$object->id.'#', '', 1, ['attr' => ['classOverride' => 'butActionRefused']]);
220 220
 		}
221 221
 	}
222 222
 }
Please login to merge, or discard this patch.
htdocs/accountancy/class/api_accountancy.class.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
 		// set filter for each period available
138 138
 		$filter = array();
139 139
 		$doc_date_start = null;
140
-		$doc_date_end= null;
140
+		$doc_date_end = null;
141 141
 		$now = dol_now();
142 142
 		$now_arr = dol_getdate($now);
143 143
 		$now_month = $now_arr['mon'];
@@ -173,9 +173,9 @@  discard block
 block discarded – undo
173 173
 			$prev_month_date_list = array();
174 174
 			$prev_month_date_list[] = dol_get_prev_month($now_month, $now_year); // get previous month for index = 0
175 175
 			for ($i = 1; $i < $nb_prev_month; $i++) {
176
-				$prev_month_date_list[] = dol_get_prev_month($prev_month_date_list[$i-1]['month'], $prev_month_date_list[$i-1]['year']); // get i+1 previous month for index=i
176
+				$prev_month_date_list[] = dol_get_prev_month($prev_month_date_list[$i - 1]['month'], $prev_month_date_list[$i - 1]['year']); // get i+1 previous month for index=i
177 177
 			}
178
-			$doc_date_start = dol_mktime(0, 0, 0, $prev_month_date_list[$nb_prev_month-1]['month'], 1, $prev_month_date_list[$nb_prev_month-1]['year']); // first day of n previous month for index=n-1
178
+			$doc_date_start = dol_mktime(0, 0, 0, $prev_month_date_list[$nb_prev_month - 1]['month'], 1, $prev_month_date_list[$nb_prev_month - 1]['year']); // first day of n previous month for index=n-1
179 179
 			$doc_date_end = dol_get_last_day($prev_month_date_list[0]['year'], $prev_month_date_list[0]['month']); // last day of previous month for index = 0
180 180
 		} elseif ($period == 'currentyear' || $period == 'lastyear') {
181 181
 			$period_year = $now_year;
@@ -242,9 +242,9 @@  discard block
 block discarded – undo
242 242
 					foreach ($bookkeeping->lines as $movement) {
243 243
 						$now = dol_now();
244 244
 
245
-						$sql = " UPDATE " . MAIN_DB_PREFIX . "accounting_bookkeeping";
246
-						$sql .= " SET date_export = '" . $this->db->idate($now) . "'";
247
-						$sql .= " WHERE rowid = " . ((int) $movement->id);
245
+						$sql = " UPDATE ".MAIN_DB_PREFIX."accounting_bookkeeping";
246
+						$sql .= " SET date_export = '".$this->db->idate($now)."'";
247
+						$sql .= " WHERE rowid = ".((int) $movement->id);
248 248
 
249 249
 						$result = $this->db->query($sql);
250 250
 						if (!$result) {
Please login to merge, or discard this patch.
htdocs/accountancy/class/accountancyexport.class.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -2387,14 +2387,14 @@
 block discarded – undo
2387 2387
 	}
2388 2388
 
2389 2389
 	/**
2390
-	* Export format : iSuite Expert
2391
-	*
2392
-	* by OpenSolus [https://opensolus.fr]
2393
-	*
2390
+	 * Export format : iSuite Expert
2391
+	 *
2392
+	 * by OpenSolus [https://opensolus.fr]
2393
+	 *
2394 2394
 	 * @param 	array 		$objectLines 			data
2395 2395
 	 * @param 	resource	$exportFile				[=null] File resource to export or print if null
2396 2396
 	 * @return 	void
2397
-	*/
2397
+	 */
2398 2398
 	public function exportiSuiteExpert($objectLines, $exportFile = null)
2399 2399
 	{
2400 2400
 		$separator = ';';
Please login to merge, or discard this patch.
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -341,7 +341,7 @@  discard block
 block discarded – undo
341 341
 		$exportFile = null;
342 342
 		$exportFileName = '';
343 343
 		$exportFilePath = '';
344
-		$exportFileFullName ='';
344
+		$exportFileFullName = '';
345 345
 		$downloadFileMimeType = '';
346 346
 		$downloadFileFullName = '';
347 347
 		$downloadFilePath = '';
@@ -409,7 +409,7 @@  discard block
 block discarded – undo
409 409
 					$exportFileFullName = $completefilename;
410 410
 					$exportFileBaseName = basename($exportFileFullName);
411 411
 					$exportFileName = pathinfo($exportFileBaseName, PATHINFO_FILENAME);
412
-					$exportFilePath = $outputDir . '/' . $exportFileFullName;
412
+					$exportFilePath = $outputDir.'/'.$exportFileFullName;
413 413
 					$exportFile = fopen($exportFilePath, 'w');
414 414
 					if (!$exportFile) {
415 415
 						$this->errors[] = $langs->trans('ErrorFileNotFound', $exportFilePath);
@@ -423,8 +423,8 @@  discard block
 block discarded – undo
423 423
 						);
424 424
 
425 425
 						// archive name and path
426
-						$archiveFullName = $exportFileName . '.zip';
427
-						$archivePath = $outputDir . '/' . $archiveFullName;
426
+						$archiveFullName = $exportFileName.'.zip';
427
+						$archivePath = $outputDir.'/'.$archiveFullName;
428 428
 					}
429 429
 				}
430 430
 			}
@@ -559,11 +559,11 @@  discard block
 block discarded – undo
559 559
 
560 560
 					// download export file or archive
561 561
 					if (!empty($downloadFileMimeType) && !empty($downloadFileFullName) && !empty($downloadFilePath)) {
562
-						header('Content-Type: ' . $downloadFileMimeType);
563
-						header('Content-Disposition: attachment; filename=' . $downloadFileFullName);
562
+						header('Content-Type: '.$downloadFileMimeType);
563
+						header('Content-Disposition: attachment; filename='.$downloadFileFullName);
564 564
 						header('Cache-Control: Public, must-revalidate');
565 565
 						header('Pragma: public');
566
-						header('Content-Length: ' . dol_filesize($downloadFilePath));
566
+						header('Content-Length: '.dol_filesize($downloadFilePath));
567 567
 						readfileLowMemory($downloadFilePath);
568 568
 					}
569 569
 				}
@@ -632,14 +632,14 @@  discard block
 block discarded – undo
632 632
 			$refInvoice = '';
633 633
 			if ($line->doc_type == 'customer_invoice') {
634 634
 				// Customer invoice
635
-				require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
635
+				require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
636 636
 				$invoice = new Facture($this->db);
637 637
 				$invoice->fetch($line->fk_doc);
638 638
 
639 639
 				$refInvoice = $invoice->ref;
640 640
 			} elseif ($line->doc_type == 'supplier_invoice') {
641 641
 				// Supplier invoice
642
-				require_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.facture.class.php';
642
+				require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
643 643
 				$invoice = new FactureFournisseur($this->db);
644 644
 				$invoice->fetch($line->fk_doc);
645 645
 
@@ -987,7 +987,7 @@  discard block
 block discarded – undo
987 987
 						$invoice = new FactureFournisseur($this->db);
988 988
 						$invoice->fetch($line->fk_doc);
989 989
 						$objectDirPath = !empty($conf->fournisseur->facture->multidir_output[$conf->entity]) ? $conf->fournisseur->facture->multidir_output[$conf->entity] : $conf->fournisseur->facture->dir_output;
990
-						$objectDirPath.= '/'.rtrim(get_exdir($invoice->id, 2, 0, 0, $invoice, 'invoice_supplier'), '/');
990
+						$objectDirPath .= '/'.rtrim(get_exdir($invoice->id, 2, 0, 0, $invoice, 'invoice_supplier'), '/');
991 991
 					}
992 992
 					$arrayofinclusion = array();
993 993
 					// If it is a supplier invoice, we want to use last uploaded file
@@ -1452,7 +1452,7 @@  discard block
 block discarded – undo
1452 1452
 							$objectDirPath = !empty($conf->expensereport->multidir_output[$conf->entity]) ? $conf->expensereport->multidir_output[$conf->entity] : $conf->expensereport->dir_output;
1453 1453
 						} elseif ($line->doc_type == 'supplier_invoice') {
1454 1454
 							$objectDirPath = !empty($conf->fournisseur->facture->multidir_output[$conf->entity]) ? $conf->fournisseur->facture->multidir_output[$conf->entity] : $conf->fournisseur->facture->dir_output;
1455
-							$objectDirPath.= '/'.rtrim(get_exdir($invoice->id, 2, 0, 0, $invoice, 'invoice_supplier'), '/');
1455
+							$objectDirPath .= '/'.rtrim(get_exdir($invoice->id, 2, 0, 0, $invoice, 'invoice_supplier'), '/');
1456 1456
 						}
1457 1457
 						$arrayofinclusion = array();
1458 1458
 						// If it is a supplier invoice, we want to use last uploaded file
@@ -1663,7 +1663,7 @@  discard block
 block discarded – undo
1663 1663
 							$objectDirPath = !empty($conf->expensereport->multidir_output[$conf->entity]) ? $conf->expensereport->multidir_output[$conf->entity] : $conf->expensereport->dir_output;
1664 1664
 						} elseif ($line->doc_type == 'supplier_invoice') {
1665 1665
 							$objectDirPath = !empty($conf->fournisseur->facture->multidir_output[$conf->entity]) ? $conf->fournisseur->facture->multidir_output[$conf->entity] : $conf->fournisseur->facture->dir_output;
1666
-							$objectDirPath.= '/'.rtrim(get_exdir($invoice->id, 2, 0, 0, $invoice, 'invoice_supplier'), '/');
1666
+							$objectDirPath .= '/'.rtrim(get_exdir($invoice->id, 2, 0, 0, $invoice, 'invoice_supplier'), '/');
1667 1667
 						}
1668 1668
 						$arrayofinclusion = array();
1669 1669
 						// If it is a supplier invoice, we want to use last uploaded file
@@ -1985,7 +1985,7 @@  discard block
 block discarded – undo
1985 1985
 			// MOPM
1986 1986
 			$tab[] = "";
1987 1987
 			// BONP
1988
-			$tab[] =  "";
1988
+			$tab[] = "";
1989 1989
 			// BQAF
1990 1990
 			$tab[] = "";
1991 1991
 			// ECES
@@ -2191,7 +2191,7 @@  discard block
 block discarded – undo
2191 2191
 				}
2192 2192
 			} elseif ($line->doc_type == 'customer_invoice') {
2193 2193
 				if (($line->amount) < 0) {
2194
-					$nature_piece = 'AC';		// Currently, only the sign of amount allows to know the type of invoice (standard or credit note). Other solution is to analyse debit/credit/role of account. TODO Add column doc_type_long or make amount mandatory with rule on sign.
2194
+					$nature_piece = 'AC'; // Currently, only the sign of amount allows to know the type of invoice (standard or credit note). Other solution is to analyse debit/credit/role of account. TODO Add column doc_type_long or make amount mandatory with rule on sign.
2195 2195
 				} else {
2196 2196
 					$nature_piece = 'FC';
2197 2197
 				}
@@ -2400,8 +2400,8 @@  discard block
 block discarded – undo
2400 2400
 						($line->doc_type == 'supplier_invoice' && !isset($supplier_invoices_infos[$line->fk_doc]))) {
2401 2401
 						if ($line->doc_type == 'customer_invoice') {
2402 2402
 							// Get new customer invoice ref and company name
2403
-							$sql = 'SELECT f.ref, s.nom FROM ' . MAIN_DB_PREFIX . 'facture as f';
2404
-							$sql .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'societe AS s ON f.fk_soc = s.rowid';
2403
+							$sql = 'SELECT f.ref, s.nom FROM '.MAIN_DB_PREFIX.'facture as f';
2404
+							$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe AS s ON f.fk_soc = s.rowid';
2405 2405
 							$sql .= ' WHERE f.rowid = '.((int) $line->fk_doc);
2406 2406
 							$resql = $this->db->query($sql);
2407 2407
 							if ($resql) {
@@ -2414,8 +2414,8 @@  discard block
 block discarded – undo
2414 2414
 							}
2415 2415
 						} else {
2416 2416
 							// Get new supplier invoice ref and company name
2417
-							$sql = 'SELECT ff.ref, s.nom FROM ' . MAIN_DB_PREFIX . 'facture_fourn as ff';
2418
-							$sql .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'societe AS s ON ff.fk_soc = s.rowid';
2417
+							$sql = 'SELECT ff.ref, s.nom FROM '.MAIN_DB_PREFIX.'facture_fourn as ff';
2418
+							$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe AS s ON ff.fk_soc = s.rowid';
2419 2419
 							$sql .= ' WHERE ff.rowid = '.((int) $line->fk_doc);
2420 2420
 							$resql = $this->db->query($sql);
2421 2421
 							if ($resql) {
@@ -2453,7 +2453,7 @@  discard block
 block discarded – undo
2453 2453
 				$tab[] = "";
2454 2454
 				//print '"'.dol_trunc(str_replace('"', '', $line->label_operation),40,'right','UTF-8',1).'"';
2455 2455
 				//Libellé manual
2456
-				$tab[] = dol_trunc(str_replace('"', '', $invoice_ref . (!empty($company_name) ? ' - ' : '') . $company_name), 40, 'right', 'UTF-8', 1);
2456
+				$tab[] = dol_trunc(str_replace('"', '', $invoice_ref.(!empty($company_name) ? ' - ' : '').$company_name), 40, 'right', 'UTF-8', 1);
2457 2457
 				//Numéro de pièce
2458 2458
 				$tab[] = dol_trunc(str_replace('"', '', $line->piece_num), 10, 'right', 'UTF-8', 1);
2459 2459
 				//Devise
@@ -2507,8 +2507,8 @@  discard block
 block discarded – undo
2507 2507
 				}
2508 2508
 				$tab[] = "";
2509 2509
 				$tab[] = '"'.dol_trunc(str_replace('"', '', $line->label_operation), 40, 'right', 'UTF-8', 1).'"';
2510
-				$tab[] = '"' . dol_trunc(str_replace('"', '', $line->doc_ref), 40, 'right', 'UTF-8', 1) . '"';
2511
-				$tab[] = '"' . dol_trunc(str_replace('"', '', $line->piece_num), 10, 'right', 'UTF-8', 1) . '"';
2510
+				$tab[] = '"'.dol_trunc(str_replace('"', '', $line->doc_ref), 40, 'right', 'UTF-8', 1).'"';
2511
+				$tab[] = '"'.dol_trunc(str_replace('"', '', $line->piece_num), 10, 'right', 'UTF-8', 1).'"';
2512 2512
 				$tab[] = price2num(abs($line->debit - $line->credit));
2513 2513
 				$tab[] = $line->sens;
2514 2514
 				$tab[] = $date_document;
Please login to merge, or discard this patch.
htdocs/accountancy/tpl/export_journal.tpl.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,5 +72,5 @@
 block discarded – undo
72 72
 }
73 73
 
74 74
 if (empty($downloadMode)) {
75
-	header('Content-Disposition: attachment;filename=' . $completefilename);
75
+	header('Content-Disposition: attachment;filename='.$completefilename);
76 76
 }
Please login to merge, or discard this patch.