Completed
Branch develop (8b51aa)
by
unknown
16:02
created
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 = '';
@@ -413,7 +413,7 @@  discard block
 block discarded – undo
413 413
 					$exportFileFullName = $completefilename;
414 414
 					$exportFileBaseName = basename($exportFileFullName);
415 415
 					$exportFileName = pathinfo($exportFileBaseName, PATHINFO_FILENAME);
416
-					$exportFilePath = $outputDir . '/' . $exportFileFullName;
416
+					$exportFilePath = $outputDir.'/'.$exportFileFullName;
417 417
 					$exportFile = fopen($exportFilePath, 'w');
418 418
 					if (!$exportFile) {
419 419
 						$this->errors[] = $langs->trans('ErrorFileNotFound', $exportFilePath);
@@ -427,8 +427,8 @@  discard block
 block discarded – undo
427 427
 						);
428 428
 
429 429
 						// archive name and path
430
-						$archiveFullName = $exportFileName . '.zip';
431
-						$archivePath = $outputDir . '/' . $archiveFullName;
430
+						$archiveFullName = $exportFileName.'.zip';
431
+						$archivePath = $outputDir.'/'.$archiveFullName;
432 432
 					}
433 433
 				}
434 434
 			}
@@ -563,11 +563,11 @@  discard block
 block discarded – undo
563 563
 
564 564
 					// download export file or archive
565 565
 					if (!empty($downloadFileMimeType) && !empty($downloadFileFullName) && !empty($downloadFilePath)) {
566
-						header('Content-Type: ' . $downloadFileMimeType);
567
-						header('Content-Disposition: attachment; filename=' . $downloadFileFullName);
566
+						header('Content-Type: '.$downloadFileMimeType);
567
+						header('Content-Disposition: attachment; filename='.$downloadFileFullName);
568 568
 						header('Cache-Control: Public, must-revalidate');
569 569
 						header('Pragma: public');
570
-						header('Content-Length: ' . dol_filesize($downloadFilePath));
570
+						header('Content-Length: '.dol_filesize($downloadFilePath));
571 571
 						readfileLowMemory($downloadFilePath);
572 572
 					}
573 573
 				}
@@ -636,14 +636,14 @@  discard block
 block discarded – undo
636 636
 			$refInvoice = '';
637 637
 			if ($line->doc_type == 'customer_invoice') {
638 638
 				// Customer invoice
639
-				require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
639
+				require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
640 640
 				$invoice = new Facture($this->db);
641 641
 				$invoice->fetch($line->fk_doc);
642 642
 
643 643
 				$refInvoice = $invoice->ref;
644 644
 			} elseif ($line->doc_type == 'supplier_invoice') {
645 645
 				// Supplier invoice
646
-				require_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.facture.class.php';
646
+				require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
647 647
 				$invoice = new FactureFournisseur($this->db);
648 648
 				$invoice->fetch($line->fk_doc);
649 649
 
@@ -994,7 +994,7 @@  discard block
 block discarded – undo
994 994
 						$invoice = new FactureFournisseur($this->db);
995 995
 						$invoice->fetch($line->fk_doc);
996 996
 						$objectDirPath = !empty($conf->fournisseur->facture->multidir_output[$conf->entity]) ? $conf->fournisseur->facture->multidir_output[$conf->entity] : $conf->fournisseur->facture->dir_output;
997
-						$objectDirPath.= '/'.rtrim(get_exdir($invoice->id, 2, 0, 0, $invoice, 'invoice_supplier'), '/');
997
+						$objectDirPath .= '/'.rtrim(get_exdir($invoice->id, 2, 0, 0, $invoice, 'invoice_supplier'), '/');
998 998
 					}
999 999
 					$arrayofinclusion = array();
1000 1000
 					// If it is a supplier invoice, we want to use last uploaded file
@@ -1463,7 +1463,7 @@  discard block
 block discarded – undo
1463 1463
 							$objectDirPath = !empty($conf->expensereport->multidir_output[$conf->entity]) ? $conf->expensereport->multidir_output[$conf->entity] : $conf->expensereport->dir_output;
1464 1464
 						} elseif ($line->doc_type == 'supplier_invoice') {
1465 1465
 							$objectDirPath = !empty($conf->fournisseur->facture->multidir_output[$conf->entity]) ? $conf->fournisseur->facture->multidir_output[$conf->entity] : $conf->fournisseur->facture->dir_output;
1466
-							$objectDirPath.= '/'.rtrim(get_exdir($invoice->id, 2, 0, 0, $invoice, 'invoice_supplier'), '/');
1466
+							$objectDirPath .= '/'.rtrim(get_exdir($invoice->id, 2, 0, 0, $invoice, 'invoice_supplier'), '/');
1467 1467
 						}
1468 1468
 						$arrayofinclusion = array();
1469 1469
 						// If it is a supplier invoice, we want to use last uploaded file
@@ -1672,7 +1672,7 @@  discard block
 block discarded – undo
1672 1672
 							$objectDirPath = !empty($conf->expensereport->multidir_output[$conf->entity]) ? $conf->expensereport->multidir_output[$conf->entity] : $conf->expensereport->dir_output;
1673 1673
 						} elseif ($line->doc_type == 'supplier_invoice') {
1674 1674
 							$objectDirPath = !empty($conf->fournisseur->facture->multidir_output[$conf->entity]) ? $conf->fournisseur->facture->multidir_output[$conf->entity] : $conf->fournisseur->facture->dir_output;
1675
-							$objectDirPath.= '/'.rtrim(get_exdir($invoice->id, 2, 0, 0, $invoice, 'invoice_supplier'), '/');
1675
+							$objectDirPath .= '/'.rtrim(get_exdir($invoice->id, 2, 0, 0, $invoice, 'invoice_supplier'), '/');
1676 1676
 						}
1677 1677
 						$arrayofinclusion = array();
1678 1678
 						// If it is a supplier invoice, we want to use last uploaded file
@@ -1993,7 +1993,7 @@  discard block
 block discarded – undo
1993 1993
 			// MOPM
1994 1994
 			$tab[] = "";
1995 1995
 			// BONP
1996
-			$tab[] =  "";
1996
+			$tab[] = "";
1997 1997
 			// BQAF
1998 1998
 			$tab[] = "";
1999 1999
 			// ECES
@@ -2199,7 +2199,7 @@  discard block
 block discarded – undo
2199 2199
 				}
2200 2200
 			} elseif ($line->doc_type == 'customer_invoice') {
2201 2201
 				if (($line->amount) < 0) {
2202
-					$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.
2202
+					$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.
2203 2203
 				} else {
2204 2204
 					$nature_piece = 'FC';
2205 2205
 				}
@@ -2408,8 +2408,8 @@  discard block
 block discarded – undo
2408 2408
 						($line->doc_type == 'supplier_invoice' && !isset($supplier_invoices_infos[$line->fk_doc]))) {
2409 2409
 						if ($line->doc_type == 'customer_invoice') {
2410 2410
 							// Get new customer invoice ref and company name
2411
-							$sql = 'SELECT f.ref, s.nom FROM ' . MAIN_DB_PREFIX . 'facture as f';
2412
-							$sql .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'societe AS s ON f.fk_soc = s.rowid';
2411
+							$sql = 'SELECT f.ref, s.nom FROM '.MAIN_DB_PREFIX.'facture as f';
2412
+							$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe AS s ON f.fk_soc = s.rowid';
2413 2413
 							$sql .= ' WHERE f.rowid = '.((int) $line->fk_doc);
2414 2414
 							$resql = $this->db->query($sql);
2415 2415
 							if ($resql) {
@@ -2422,8 +2422,8 @@  discard block
 block discarded – undo
2422 2422
 							}
2423 2423
 						} else {
2424 2424
 							// Get new supplier invoice ref and company name
2425
-							$sql = 'SELECT ff.ref, s.nom FROM ' . MAIN_DB_PREFIX . 'facture_fourn as ff';
2426
-							$sql .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'societe AS s ON ff.fk_soc = s.rowid';
2425
+							$sql = 'SELECT ff.ref, s.nom FROM '.MAIN_DB_PREFIX.'facture_fourn as ff';
2426
+							$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe AS s ON ff.fk_soc = s.rowid';
2427 2427
 							$sql .= ' WHERE ff.rowid = '.((int) $line->fk_doc);
2428 2428
 							$resql = $this->db->query($sql);
2429 2429
 							if ($resql) {
@@ -2461,7 +2461,7 @@  discard block
 block discarded – undo
2461 2461
 				$tab[] = "";
2462 2462
 				//print '"'.dol_trunc(str_replace('"', '', $line->label_operation),40,'right','UTF-8',1).'"';
2463 2463
 				//Libellé manuel
2464
-				$tab[] = dol_trunc(str_replace('"', '', $invoice_ref . (!empty($company_name) ? ' - ' : '') . $company_name), 40, 'right', 'UTF-8', 1);
2464
+				$tab[] = dol_trunc(str_replace('"', '', $invoice_ref.(!empty($company_name) ? ' - ' : '').$company_name), 40, 'right', 'UTF-8', 1);
2465 2465
 				//Numéro de pièce
2466 2466
 				$tab[] = dol_trunc(str_replace('"', '', $line->piece_num), 10, 'right', 'UTF-8', 1);
2467 2467
 				//Devise
@@ -2516,8 +2516,8 @@  discard block
 block discarded – undo
2516 2516
 				}
2517 2517
 				$tab[] = "";
2518 2518
 				$tab[] = '"'.dol_trunc(str_replace('"', '', $line->label_operation), 40, 'right', 'UTF-8', 1).'"';
2519
-				$tab[] = '"' . dol_trunc(str_replace('"', '', $line->doc_ref), 40, 'right', 'UTF-8', 1) . '"';
2520
-				$tab[] = '"' . dol_trunc(str_replace('"', '', $line->piece_num), 10, 'right', 'UTF-8', 1) . '"';
2519
+				$tab[] = '"'.dol_trunc(str_replace('"', '', $line->doc_ref), 40, 'right', 'UTF-8', 1).'"';
2520
+				$tab[] = '"'.dol_trunc(str_replace('"', '', $line->piece_num), 10, 'right', 'UTF-8', 1).'"';
2521 2521
 				$tab[] = price2num(abs($line->debit - $line->credit));
2522 2522
 				$tab[] = $line->sens;
2523 2523
 				$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.
htdocs/accountancy/admin/card.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -76,9 +76,9 @@  discard block
 block discarded – undo
76 76
 			setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Label")), null, 'errors');
77 77
 			$action = 'create';
78 78
 		} else {
79
-			$sql = "SELECT pcg_version FROM " . MAIN_DB_PREFIX . "accounting_system WHERE rowid = ".((int) getDolGlobalInt('CHARTOFACCOUNTS'));
79
+			$sql = "SELECT pcg_version FROM ".MAIN_DB_PREFIX."accounting_system WHERE rowid = ".((int) getDolGlobalInt('CHARTOFACCOUNTS'));
80 80
 
81
-			dol_syslog('accountancy/admin/card.php:: $sql=' . $sql);
81
+			dol_syslog('accountancy/admin/card.php:: $sql='.$sql);
82 82
 			$result = $db->query($sql);
83 83
 			$obj = $db->fetch_object($result);
84 84
 
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
 			if (!$error) {
124 124
 				setEventMessages("RecordCreatedSuccessfully", null, 'mesgs');
125 125
 				$urltogo = $backtopage ? $backtopage : DOL_URL_ROOT.'/accountancy/admin/account.php';
126
-				header("Location: " . $urltogo);
126
+				header("Location: ".$urltogo);
127 127
 				exit;
128 128
 			}
129 129
 		}
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 
142 142
 			$sql = "SELECT pcg_version FROM ".MAIN_DB_PREFIX."accounting_system WHERE rowid=".((int) getDolGlobalInt('CHARTOFACCOUNTS'));
143 143
 
144
-			dol_syslog('accountancy/admin/card.php:: $sql=' . $sql);
144
+			dol_syslog('accountancy/admin/card.php:: $sql='.$sql);
145 145
 			$result2 = $db->query($sql);
146 146
 			$obj = $db->fetch_object($result2);
147 147
 
@@ -171,8 +171,8 @@  discard block
 block discarded – undo
171 171
 			$result = $object->update($user);
172 172
 
173 173
 			if ($result > 0) {
174
-				$urltogo = $backtopage ? $backtopage : ($_SERVER["PHP_SELF"] . "?id=" . $id);
175
-				header("Location: " . $urltogo);
174
+				$urltogo = $backtopage ? $backtopage : ($_SERVER["PHP_SELF"]."?id=".$id);
175
+				header("Location: ".$urltogo);
176 176
 				exit();
177 177
 			} elseif ($result == -2) {
178 178
 				setEventMessages($langs->trans("ErrorAccountNumberAlreadyExists", $object->account_number), null, 'errors');
@@ -264,14 +264,14 @@  discard block
 block discarded – undo
264 264
 	print '<input type="text" name="pcg_type" list="pcg_type_datalist" value="'.dol_escape_htmltag(GETPOSTISSET('pcg_type') ? GETPOST('pcg_type', 'alpha') : $object->pcg_type).'">';
265 265
 	// autosuggest from existing account types if found
266 266
 	print '<datalist id="pcg_type_datalist">';
267
-	$sql = "SELECT DISTINCT pcg_type FROM " . MAIN_DB_PREFIX . "accounting_account";
268
-	$sql .= " WHERE fk_pcg_version = '" . $db->escape($accountsystem->ref) . "'";
269
-	$sql .= ' AND entity in ('.getEntity('accounting_account', 0).')';		// Always limit to current entity. No sharing in accountancy.
267
+	$sql = "SELECT DISTINCT pcg_type FROM ".MAIN_DB_PREFIX."accounting_account";
268
+	$sql .= " WHERE fk_pcg_version = '".$db->escape($accountsystem->ref)."'";
269
+	$sql .= ' AND entity in ('.getEntity('accounting_account', 0).')'; // Always limit to current entity. No sharing in accountancy.
270 270
 	$sql .= ' LIMIT 50000'; // just as a sanity check
271 271
 	$resql = $db->query($sql);
272 272
 	if ($resql) {
273 273
 		while ($obj = $db->fetch_object($resql)) {
274
-			print '<option value="' . dol_escape_htmltag($obj->pcg_type) . '">';
274
+			print '<option value="'.dol_escape_htmltag($obj->pcg_type).'">';
275 275
 		}
276 276
 	}
277 277
 	print '</datalist>';
@@ -341,14 +341,14 @@  discard block
 block discarded – undo
341 341
 			print '<input type="text" name="pcg_type" list="pcg_type_datalist" value="'.dol_escape_htmltag(GETPOSTISSET('pcg_type') ? GETPOST('pcg_type', 'alpha') : $object->pcg_type).'">';
342 342
 			// autosuggest from existing account types if found
343 343
 			print '<datalist id="pcg_type_datalist">';
344
-			$sql = 'SELECT DISTINCT pcg_type FROM ' . MAIN_DB_PREFIX . 'accounting_account';
345
-			$sql .= " WHERE fk_pcg_version = '" . $db->escape($accountsystem->ref) . "'";
346
-			$sql .= ' AND entity in ('.getEntity('accounting_account', 0).')';		// Always limit to current entity. No sharing in accountancy.
344
+			$sql = 'SELECT DISTINCT pcg_type FROM '.MAIN_DB_PREFIX.'accounting_account';
345
+			$sql .= " WHERE fk_pcg_version = '".$db->escape($accountsystem->ref)."'";
346
+			$sql .= ' AND entity in ('.getEntity('accounting_account', 0).')'; // Always limit to current entity. No sharing in accountancy.
347 347
 			$sql .= ' LIMIT 50000'; // just as a sanity check
348 348
 			$resql = $db->query($sql);
349 349
 			if ($resql) {
350 350
 				while ($obj = $db->fetch_object($resql)) {
351
-					print '<option value="' . dol_escape_htmltag($obj->pcg_type) . '">';
351
+					print '<option value="'.dol_escape_htmltag($obj->pcg_type).'">';
352 352
 				}
353 353
 			}
354 354
 			print '</datalist>';
Please login to merge, or discard this patch.
htdocs/compta/accounting-files.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 	'selectsocialcontributions'=>array('label'=>'SocialContributions', 'picto'=>'bill', 'enabled' => isModEnabled('tax'), 'perms' => !empty($user->rights->tax->charges->lire)),
143 143
 	'selectpaymentsofsalaries'=>array('label'=>'SalariesPayments', 'picto'=>'salary', 'lang'=>'salaries', 'enabled' => isModEnabled('salaries'), 'perms' => !empty($user->rights->salaries->read)),
144 144
 	'selectvariouspayment'=>array('label'=>'VariousPayment', 'picto'=>'payment', 'enabled' => isModEnabled('banque'), 'perms' => !empty($user->rights->banque->lire)),
145
-	'selectloanspayment'=>array('label'=>'PaymentLoan','picto'=>'loan', 'enabled' => isModEnabled('don'), 'perms' => !empty($user->rights->loan->read)),
145
+	'selectloanspayment'=>array('label'=>'PaymentLoan', 'picto'=>'loan', 'enabled' => isModEnabled('don'), 'perms' => !empty($user->rights->loan->read)),
146 146
 );
147 147
 
148 148
 
@@ -510,7 +510,7 @@  discard block
 block discarded – undo
510 510
 				$zipname .= '_'.$project->ref;
511 511
 			}
512 512
 		}
513
-		$zipname .='_export.zip';
513
+		$zipname .= '_export.zip';
514 514
 
515 515
 		dol_delete_file($zipname);
516 516
 
Please login to merge, or discard this patch.
htdocs/compta/facture/card-rec.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -779,7 +779,7 @@  discard block
 block discarded – undo
779 779
 		// Define special_code for special lines
780 780
 		$special_code = GETPOST('special_code', 'int');
781 781
 		if ($special_code == 3) {
782
-			$special_code = 0;	// Options should not exists on invoices
782
+			$special_code = 0; // Options should not exists on invoices
783 783
 		}
784 784
 
785 785
 		/*$line = new FactureLigne($db);
@@ -1626,10 +1626,10 @@  discard block
 block discarded – undo
1626 1626
 
1627 1627
 		// Lines
1628 1628
 		print '<form name="addproduct" id="addproduct" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.(($action != 'editline') ? '#add' : '#line_'.GETPOST('lineid', 'int')).'" method="POST">';
1629
-		print '<input type="hidden" name="token" value="' . newToken().'">';
1630
-		print '<input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateline').'">';
1629
+		print '<input type="hidden" name="token" value="'.newToken().'">';
1630
+		print '<input type="hidden" name="action" value="'.(($action != 'editline') ? 'addline' : 'updateline').'">';
1631 1631
 		print '<input type="hidden" name="mode" value="">';
1632
-		print '<input type="hidden" name="id" value="' . $object->id.'">';
1632
+		print '<input type="hidden" name="id" value="'.$object->id.'">';
1633 1633
 		print '<input type="hidden" name="page_y" value="">';
1634 1634
 
1635 1635
 		if (!empty($conf->use_javascript_ajax) && $object->statut == 0) {
@@ -1681,16 +1681,16 @@  discard block
 block discarded – undo
1681 1681
 			if (empty($object->suspended)) {
1682 1682
 				if ($user->hasRight('facture', 'creer')) {
1683 1683
 					if (!empty($object->frequency) && $object->nb_gen_max > 0 && ($object->nb_gen_done >= $object->nb_gen_max)) {
1684
-						print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="' . dol_escape_htmltag($langs->trans("MaxGenerationReached")) . '">' . $langs->trans("CreateBill") . '</a></div>';
1684
+						print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("MaxGenerationReached")).'">'.$langs->trans("CreateBill").'</a></div>';
1685 1685
 					} else {
1686 1686
 						if (empty($object->frequency) || $object->date_when <= $nowlasthour) {
1687
-							print '<div class="inline-block divButAction"><a class="butAction" href="' . DOL_URL_ROOT . '/compta/facture/card.php?action=create&socid=' . $object->thirdparty->id . '&fac_rec=' . $object->id . '">' . $langs->trans("CreateBill") . '</a></div>';
1687
+							print '<div class="inline-block divButAction"><a class="butAction" href="'.DOL_URL_ROOT.'/compta/facture/card.php?action=create&socid='.$object->thirdparty->id.'&fac_rec='.$object->id.'">'.$langs->trans("CreateBill").'</a></div>';
1688 1688
 						} else {
1689
-							print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="' . dol_escape_htmltag($langs->trans("DateIsNotEnough")) . '">' . $langs->trans("CreateBill") . '</a></div>';
1689
+							print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("DateIsNotEnough")).'">'.$langs->trans("CreateBill").'</a></div>';
1690 1690
 						}
1691 1691
 					}
1692 1692
 				} else {
1693
-					print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#">' . $langs->trans("CreateBill") . '</a></div>';
1693
+					print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#">'.$langs->trans("CreateBill").'</a></div>';
1694 1694
 				}
1695 1695
 			}
1696 1696
 
@@ -1703,7 +1703,7 @@  discard block
 block discarded – undo
1703 1703
 			}
1704 1704
 
1705 1705
 			// Delete
1706
-			print dolGetButtonAction($langs->trans("Delete"), '', 'delete', $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=delete&token=' . newToken(), 'delete', $user->hasRight('facture', 'supprimer'));
1706
+			print dolGetButtonAction($langs->trans("Delete"), '', 'delete', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken(), 'delete', $user->hasRight('facture', 'supprimer'));
1707 1707
 		}
1708 1708
 		print '</div>';
1709 1709
 
Please login to merge, or discard this patch.
htdocs/compta/tva/list.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -45,13 +45,13 @@  discard block
 block discarded – undo
45 45
 $confirm    = GETPOST('confirm', 'alpha'); // Result of a confirmation
46 46
 $cancel     = GETPOST('cancel', 'alpha'); // We click on a Cancel button
47 47
 $toselect   = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list
48
-$contextpage				= GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'salestaxeslist';
48
+$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'salestaxeslist';
49 49
 $backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page
50 50
 $optioncss = GETPOST('optioncss', 'alpha');
51 51
 $optioncss  = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
52 52
 $mode       = GETPOST('mode', 'aZ'); // The output mode ('list', 'kanban', 'hierarchy', 'calendar', ...)
53 53
 
54
-$search_ref					= GETPOST('search_ref', 'alpha');
54
+$search_ref = GETPOST('search_ref', 'alpha');
55 55
 $search_label = GETPOST('search_label', 'alpha');
56 56
 $search_dateend_start = dol_mktime(0, 0, 0, GETPOST('search_dateend_startmonth', 'int'), GETPOST('search_dateend_startday', 'int'), GETPOST('search_dateend_startyear', 'int'));
57 57
 $search_dateend_end = dol_mktime(23, 59, 59, GETPOST('search_dateend_endmonth', 'int'), GETPOST('search_dateend_endday', 'int'), GETPOST('search_dateend_endyear', 'int'));
@@ -172,8 +172,8 @@  discard block
 block discarded – undo
172 172
 // Build and execute select
173 173
 // --------------------------------------------------------------------
174 174
 $sql = 'SELECT t.rowid, t.amount, t.label, t.datev, t.datep, t.paye as status, t.fk_typepayment as type, t.fk_account,';
175
-$sql.= ' ba.label as blabel, ba.ref as bref, ba.number as bnumber, ba.account_number, ba.iban_prefix as iban, ba.bic, ba.currency_code, ba.clos,';
176
-$sql.= ' t.num_payment, pst.code as payment_code,';
175
+$sql .= ' ba.label as blabel, ba.ref as bref, ba.number as bnumber, ba.account_number, ba.iban_prefix as iban, ba.bic, ba.currency_code, ba.clos,';
176
+$sql .= ' t.num_payment, pst.code as payment_code,';
177 177
 $sql .= ' SUM(ptva.amount) as alreadypayed';
178 178
 
179 179
 $sqlfields = $sql; // $sql fields to remove for count total
@@ -706,7 +706,7 @@  discard block
 block discarded – undo
706 706
 
707 707
 		// Amount
708 708
 		if (!empty($arrayfields['t.amount']['checked'])) {
709
-			print '<td class="nowrap right"><span class="amount">' . price($obj->amount) . '</span></td>';
709
+			print '<td class="nowrap right"><span class="amount">'.price($obj->amount).'</span></td>';
710 710
 			if (!$i) {
711 711
 				$totalarray['nbfield']++;
712 712
 			}
@@ -719,7 +719,7 @@  discard block
 block discarded – undo
719 719
 		}
720 720
 
721 721
 		if (!empty($arrayfields['t.status']['checked'])) {
722
-			print '<td class="nowrap right">' . $tva_static->getLibStatut(5, $obj->alreadypayed) . '</td>';
722
+			print '<td class="nowrap right">'.$tva_static->getLibStatut(5, $obj->alreadypayed).'</td>';
723 723
 			if (!$i) {
724 724
 				$totalarray['nbfield']++;
725 725
 			}
Please login to merge, or discard this patch.
htdocs/compta/tva/card.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
 				}
253 253
 			}
254 254
 			if (empty($error)) {
255
-				header("Location: card.php?id=" . $object->id);
255
+				header("Location: card.php?id=".$object->id);
256 256
 				exit;
257 257
 			}
258 258
 		}
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
 		} else {
308 308
 			$result = $object->fetch($id);
309 309
 
310
-			$object->amount	= $amount;
310
+			$object->amount = $amount;
311 311
 
312 312
 			$result = $object->update($user);
313 313
 			if ($result <= 0) {
@@ -469,7 +469,7 @@  discard block
 block discarded – undo
469 469
 
470 470
 	// Auto create payment
471 471
 	print '<tr><td><label for="auto_create_paiement">'.$langs->trans('AutomaticCreationPayment').'</label></td>';
472
-	print '<td><input id="auto_create_paiement" name="auto_create_paiement" type="checkbox" ' . (empty($auto_create_payment) ? '' : 'checked="checked"') . ' value="1"></td></tr>'."\n";
472
+	print '<td><input id="auto_create_paiement" name="auto_create_paiement" type="checkbox" '.(empty($auto_create_payment) ? '' : 'checked="checked"').' value="1"></td></tr>'."\n";
473 473
 
474 474
 	print '<tr class="hide_if_no_auto_create_payment">';
475 475
 	print '<td class="fieldrequired">'.$langs->trans("DatePayment").'</td><td>';
@@ -609,9 +609,9 @@  discard block
 block discarded – undo
609 609
 	print '</td></tr>';
610 610
 
611 611
 	if ($action == 'edit') {
612
-		print '<tr><td class="fieldrequired">' . $langs->trans("Amount") . '</td><td><input name="amount" size="10" value="' . price($object->amount) . '"></td></tr>';
612
+		print '<tr><td class="fieldrequired">'.$langs->trans("Amount").'</td><td><input name="amount" size="10" value="'.price($object->amount).'"></td></tr>';
613 613
 	} else {
614
-		print '<tr><td>' . $langs->trans("Amount") . '</td><td>' . price($object->amount) . '</td></tr>';
614
+		print '<tr><td>'.$langs->trans("Amount").'</td><td>'.price($object->amount).'</td></tr>';
615 615
 	}
616 616
 
617 617
 	// Mode of payment
Please login to merge, or discard this patch.
htdocs/compta/stats/index.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -52,8 +52,8 @@  discard block
 block discarded – undo
52 52
 	$month_current = dol_print_date(dol_now(), "%m");
53 53
 	$year_start = $year - $nbofyear + (getDolGlobalInt('SOCIETE_FISCAL_MONTH_START') > 1 ? 0 : 1);
54 54
 }
55
-$date_start = dol_mktime(0, 0, 0, $date_startmonth, $date_startday, $date_startyear, 'tzserver');	// We use timezone of server so report is same from everywhere
56
-$date_end = dol_mktime(23, 59, 59, $date_endmonth, $date_endday, $date_endyear, 'tzserver');		// We use timezone of server so report is same from everywhere
55
+$date_start = dol_mktime(0, 0, 0, $date_startmonth, $date_startday, $date_startyear, 'tzserver'); // We use timezone of server so report is same from everywhere
56
+$date_end = dol_mktime(23, 59, 59, $date_endmonth, $date_endday, $date_endyear, 'tzserver'); // We use timezone of server so report is same from everywhere
57 57
 
58 58
 // We define date_start and date_end
59 59
 if (empty($date_start) || empty($date_end)) { // We define date_start and date_end
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
 	$sql .= " AND b.doc_type = 'customer_invoice'";
256 256
 	$sql .= " AND aa.entity = ".$conf->entity;
257 257
 	$sql .= " AND aa.fk_pcg_version = '".$db->escape($pcgvercode)."'";
258
-	$sql .= " AND aa.pcg_type = 'INCOME'";		// TODO Be able to use a custom group
258
+	$sql .= " AND aa.pcg_type = 'INCOME'"; // TODO Be able to use a custom group
259 259
 }
260 260
 $sql .= " GROUP BY dm";
261 261
 $sql .= " ORDER BY dm";
Please login to merge, or discard this patch.