Completed
Branch develop (b5f2d2)
by
unknown
20:52
created
htdocs/compta/stats/casoc.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,9 @@
 block discarded – undo
57 57
 
58 58
 // Category
59 59
 $selected_cat = (int) GETPOST('search_categ', 'int');
60
-if ($selected_cat == -1) $selected_cat = '';
60
+if ($selected_cat == -1) {
61
+	$selected_cat = '';
62
+}
61 63
 $subcat = false;
62 64
 if (GETPOST('subcat', 'alpha') === 'yes') {
63 65
 	$subcat = true;
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -99,8 +99,8 @@  discard block
 block discarded – undo
99 99
 	$month_current = dol_print_date(dol_now(), '%m');
100 100
 	$year_start = $year;
101 101
 }
102
-$date_start = dol_mktime(0, 0, 0, GETPOST("date_startmonth"), GETPOST("date_startday"), GETPOST("date_startyear"), 'tzserver');	// We use timezone of server so report is same from everywhere
103
-$date_end = dol_mktime(23, 59, 59, GETPOST("date_endmonth"), GETPOST("date_endday"), GETPOST("date_endyear"), 'tzserver');		// We use timezone of server so report is same from everywhere
102
+$date_start = dol_mktime(0, 0, 0, GETPOST("date_startmonth"), GETPOST("date_startday"), GETPOST("date_startyear"), 'tzserver'); // We use timezone of server so report is same from everywhere
103
+$date_end = dol_mktime(23, 59, 59, GETPOST("date_endmonth"), GETPOST("date_endday"), GETPOST("date_endyear"), 'tzserver'); // We use timezone of server so report is same from everywhere
104 104
 // Quarter
105 105
 if (empty($date_start) || empty($date_end)) { // We define date_start and date_end
106 106
 	$q = GETPOST("q", "int") ?GETPOST("q", "int") : 0;
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
 $headerparams = array_merge($commonparams, $headerparams);
180 180
 $tableparams = array_merge($commonparams, $tableparams);
181 181
 
182
-$paramslink="";
182
+$paramslink = "";
183 183
 foreach ($allparams as $key => $value) {
184 184
 	$paramslink .= '&'.$key.'='.$value;
185 185
 }
@@ -203,8 +203,8 @@  discard block
 block discarded – undo
203 203
 	$modecompta = "RECETTES-DEPENSES";
204 204
 }
205 205
 
206
-$exportlink="";
207
-$namelink="";
206
+$exportlink = "";
207
+$namelink = "";
208 208
 
209 209
 // Show report header
210 210
 if ($modecompta == "CREANCES-DETTES") {
Please login to merge, or discard this patch.
htdocs/core/class/commonstickergenerator.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -289,7 +289,7 @@
 block discarded – undo
289 289
 		// phpcs:enable
290 290
 		$this->_Metric = $format['metric'];
291 291
 		$this->_Avery_Name = $format['name'];
292
-		$this->_Avery_Code = empty($format['code'])?'':$format['code'];
292
+		$this->_Avery_Code = empty($format['code']) ? '' : $format['code'];
293 293
 		$this->_Margin_Left = $this->convertMetric($format['marginLeft'], $this->_Metric, $this->_Metric_Doc);
294 294
 		$this->_Margin_Top = $this->convertMetric($format['marginTop'], $this->_Metric, $this->_Metric_Doc);
295 295
 		$this->_X_Space = $this->convertMetric($format['SpaceX'], $this->_Metric, $this->_Metric_Doc);
Please login to merge, or discard this patch.
htdocs/compta/facture/class/facture.class.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -813,7 +813,9 @@
 block discarded – undo
813 813
 
814 814
 						// Complete vat rate with code
815 815
 						$vatrate = $newinvoiceline->tva_tx;
816
-						if ($newinvoiceline->vat_src_code && ! preg_match('/\(.*\)/', $vatrate)) $vatrate.=' ('.$newinvoiceline->vat_src_code.')';
816
+						if ($newinvoiceline->vat_src_code && ! preg_match('/\(.*\)/', $vatrate)) {
817
+							$vatrate.=' ('.$newinvoiceline->vat_src_code.')';
818
+						}
817 819
 
818 820
 						$newinvoiceline->fk_parent_line = $fk_parent_line;
819 821
 
Please login to merge, or discard this patch.
Spacing   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -473,7 +473,7 @@  discard block
 block discarded – undo
473 473
 			$this->mode_reglement_id = 0;
474 474
 		}
475 475
 		$this->status = self::STATUS_DRAFT;
476
-		$this->statut = self::STATUS_DRAFT;	// deprecated
476
+		$this->statut = self::STATUS_DRAFT; // deprecated
477 477
 
478 478
 		if (!empty($this->multicurrency_code)) {
479 479
 			// Multicurrency (test on $this->multicurrency_tx because we should take the default rate of multicurrency_code only if not using original rate)
@@ -574,7 +574,7 @@  discard block
 block discarded – undo
574 574
 				$this->mode_reglement_id = 0;
575 575
 			}
576 576
 			$this->status = self::STATUS_DRAFT;
577
-			$this->statut = self::STATUS_DRAFT;	// deprecated
577
+			$this->statut = self::STATUS_DRAFT; // deprecated
578 578
 
579 579
 			$this->linked_objects = $_facrec->linkedObjectsIds;
580 580
 			// We do not add link to template invoice or next invoice will be linked to all generated invoices
@@ -819,7 +819,7 @@  discard block
 block discarded – undo
819 819
 
820 820
 						// Complete vat rate with code
821 821
 						$vatrate = $newinvoiceline->tva_tx;
822
-						if ($newinvoiceline->vat_src_code && ! preg_match('/\(.*\)/', $vatrate)) $vatrate.=' ('.$newinvoiceline->vat_src_code.')';
822
+						if ($newinvoiceline->vat_src_code && !preg_match('/\(.*\)/', $vatrate)) $vatrate .= ' ('.$newinvoiceline->vat_src_code.')';
823 823
 
824 824
 						$newinvoiceline->fk_parent_line = $fk_parent_line;
825 825
 
@@ -1049,7 +1049,7 @@  discard block
 block discarded – undo
1049 1049
 						$buyprice,
1050 1050
 						$_facrec->lines[$i]->label,
1051 1051
 						empty($_facrec->lines[$i]->array_options) ?null:$_facrec->lines[$i]->array_options,
1052
-						100,	// situation percent is undefined on recurring invoice lines
1052
+						100, // situation percent is undefined on recurring invoice lines
1053 1053
 						'',
1054 1054
 						$_facrec->lines[$i]->fk_unit,
1055 1055
 						$_facrec->lines[$i]->multicurrency_subprice,
@@ -1145,7 +1145,7 @@  discard block
 block discarded – undo
1145 1145
 
1146 1146
 		$facture->fk_facture_source = $this->fk_facture_source;
1147 1147
 		$facture->type 			    = $this->type;
1148
-		$facture->subtype 			= $this->subtype;
1148
+		$facture->subtype = $this->subtype;
1149 1149
 		$facture->socid 		    = $this->socid;
1150 1150
 		$facture->date              = $this->date;
1151 1151
 		$facture->date_pointoftax   = $this->date_pointoftax;
@@ -1161,7 +1161,7 @@  discard block
 block discarded – undo
1161 1161
 
1162 1162
 		$facture->origin            = $this->origin;
1163 1163
 		$facture->origin_id         = $this->origin_id;
1164
-		$facture->fk_account         = $this->fk_account;
1164
+		$facture->fk_account = $this->fk_account;
1165 1165
 
1166 1166
 		$facture->lines = $this->lines; // Array of lines of invoice
1167 1167
 		$facture->situation_counter = $this->situation_counter;
@@ -1632,7 +1632,7 @@  discard block
 block discarded – undo
1632 1632
 	{
1633 1633
 		global $conf, $langs, $hookmanager, $action;
1634 1634
 
1635
-		if (! in_array($origin->element, array('propal', 'commande'))) {
1635
+		if (!in_array($origin->element, array('propal', 'commande'))) {
1636 1636
 			$origin->error = 'ErrorCanOnlyAutomaticallyGenerateADepositFromProposalOrOrder';
1637 1637
 			return null;
1638 1638
 		}
@@ -1642,7 +1642,7 @@  discard block
 block discarded – undo
1642 1642
 			return null;
1643 1643
 		}
1644 1644
 
1645
-		require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
1645
+		require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
1646 1646
 
1647 1647
 		if ($date > (dol_get_last_hour(dol_now('tzuserrel')) + (!getDolGlobalString('INVOICE_MAX_FUTURE_DELAY') ? 0 : $conf->global->INVOICE_MAX_FUTURE_DELAY))) {
1648 1648
 			$origin->error = 'ErrorDateIsInFuture';
@@ -1686,7 +1686,7 @@  discard block
 block discarded – undo
1686 1686
 		$deposit->pos_source = $origin->pos_source;
1687 1687
 		$deposit->model_pdf = 'crabe';
1688 1688
 
1689
-		$modelByTypeConfName = 'FACTURE_ADDON_PDF_' . $deposit->type;
1689
+		$modelByTypeConfName = 'FACTURE_ADDON_PDF_'.$deposit->type;
1690 1690
 
1691 1691
 		if (!empty($conf->global->$modelByTypeConfName)) {
1692 1692
 			$deposit->model_pdf = $conf->global->$modelByTypeConfName;
@@ -1741,10 +1741,10 @@  discard block
 block discarded – undo
1741 1741
 					continue;
1742 1742
 				}
1743 1743
 				$TTotalByTva[$line->tva_tx] += $line->total_ttc;
1744
-				$descriptions[$line->tva_tx] .= '<li>' . (!empty($line->product_ref) ? $line->product_ref . ' - ' :  '');
1745
-				$descriptions[$line->tva_tx] .= (!empty($line->product_label) ? $line->product_label . ' - ' : '');
1746
-				$descriptions[$line->tva_tx] .= $langs->trans('Qty') . ' : ' . $line->qty;
1747
-				$descriptions[$line->tva_tx] .= ' - ' . $langs->trans('TotalHT') . ' : ' . price($line->total_ht) . '</li>';
1744
+				$descriptions[$line->tva_tx] .= '<li>'.(!empty($line->product_ref) ? $line->product_ref.' - ' : '');
1745
+				$descriptions[$line->tva_tx] .= (!empty($line->product_label) ? $line->product_label.' - ' : '');
1746
+				$descriptions[$line->tva_tx] .= $langs->trans('Qty').' : '.$line->qty;
1747
+				$descriptions[$line->tva_tx] .= ' - '.$langs->trans('TotalHT').' : '.price($line->total_ht).'</li>';
1748 1748
 			}
1749 1749
 
1750 1750
 			foreach ($TTotalByTva as $tva => &$total) {
@@ -1768,10 +1768,10 @@  discard block
 block discarded – undo
1768 1768
 				$totalamount += $lines[$i]->total_ht; // Fixme : is it not for the customer ? Shouldn't we take total_ttc ?
1769 1769
 				$tva_tx = $lines[$i]->tva_tx;
1770 1770
 				$amountdeposit[$tva_tx] += ($lines[$i]->total_ht * $origin->deposit_percent) / 100;
1771
-				$descriptions[$tva_tx] .= '<li>' . (!empty($lines[$i]->product_ref) ? $lines[$i]->product_ref . ' - ' :  '');
1772
-				$descriptions[$tva_tx] .= (!empty($lines[$i]->product_label) ? $lines[$i]->product_label . ' - ' : '');
1773
-				$descriptions[$tva_tx] .= $langs->trans('Qty') . ' : ' . $lines[$i]->qty;
1774
-				$descriptions[$tva_tx] .= ' - ' . $langs->trans('TotalHT') . ' : ' . price($lines[$i]->total_ht) . '</li>';
1771
+				$descriptions[$tva_tx] .= '<li>'.(!empty($lines[$i]->product_ref) ? $lines[$i]->product_ref.' - ' : '');
1772
+				$descriptions[$tva_tx] .= (!empty($lines[$i]->product_label) ? $lines[$i]->product_label.' - ' : '');
1773
+				$descriptions[$tva_tx] .= $langs->trans('Qty').' : '.$lines[$i]->qty;
1774
+				$descriptions[$tva_tx] .= ' - '.$langs->trans('TotalHT').' : '.price($lines[$i]->total_ht).'</li>';
1775 1775
 			}
1776 1776
 
1777 1777
 			if ($totalamount == 0) {
@@ -1786,11 +1786,11 @@  discard block
 block discarded – undo
1786 1786
 				continue;
1787 1787
 			}
1788 1788
 
1789
-			$descline = '(DEPOSIT) ('. $origin->deposit_percent .'%) - '.$origin->ref;
1789
+			$descline = '(DEPOSIT) ('.$origin->deposit_percent.'%) - '.$origin->ref;
1790 1790
 
1791 1791
 			// Hidden conf
1792 1792
 			if (getDolGlobalString('INVOICE_DEPOSIT_VARIABLE_MODE_DETAIL_LINES_IN_DESCRIPTION') && !empty($descriptions[$tva])) {
1793
-				$descline .= '<ul>' . $descriptions[$tva] . '</ul>';
1793
+				$descline .= '<ul>'.$descriptions[$tva].'</ul>';
1794 1794
 			}
1795 1795
 
1796 1796
 			$addlineResult = $deposit->addline(
@@ -2052,7 +2052,7 @@  discard block
 block discarded – undo
2052 2052
 				$label = $langs->trans("Invoice");
2053 2053
 				$linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"';
2054 2054
 			}
2055
-			$linkclose .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' :  ' title="tocomplete"');
2055
+			$linkclose .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' : ' title="tocomplete"');
2056 2056
 			$linkclose .= $dataparams.' class="'.$classfortooltip.'"';
2057 2057
 		}
2058 2058
 
@@ -2163,9 +2163,9 @@  discard block
 block discarded – undo
2163 2163
 				$this->id = $obj->rowid;
2164 2164
 				$this->entity = $obj->entity;
2165 2165
 
2166
-				$this->ref					= $obj->ref;
2167
-				$this->ref_client			= $obj->ref_client;
2168
-				$this->ref_customer			= $obj->ref_client;
2166
+				$this->ref = $obj->ref;
2167
+				$this->ref_client = $obj->ref_client;
2168
+				$this->ref_customer = $obj->ref_client;
2169 2169
 				$this->ref_ext				= $obj->ref_ext;
2170 2170
 				$this->type					= $obj->type;
2171 2171
 				$this->subtype				= $obj->subtype;
@@ -2191,7 +2191,7 @@  discard block
 block discarded – undo
2191 2191
 				$this->fk_project = $obj->fk_project;
2192 2192
 				$this->project = null; // Clear if another value was already set by fetch_projet
2193 2193
 
2194
-				$this->statut = $obj->status;	// deprecated
2194
+				$this->statut = $obj->status; // deprecated
2195 2195
 				$this->status = $obj->status;
2196 2196
 
2197 2197
 				$this->date_lim_reglement = $this->db->jdate($obj->dlr);
@@ -2207,7 +2207,7 @@  discard block
 block discarded – undo
2207 2207
 				$this->fk_fac_rec_source	= $obj->fk_fac_rec_source;
2208 2208
 				$this->note = $obj->note_private; // deprecated
2209 2209
 				$this->note_private = $obj->note_private;
2210
-				$this->note_public			= $obj->note_public;
2210
+				$this->note_public = $obj->note_public;
2211 2211
 				$this->user_creation_id     = $obj->fk_user_author;
2212 2212
 				$this->user_validation_id   = $obj->fk_user_valid;
2213 2213
 				$this->user_modification_id = $obj->fk_user_modif;
@@ -2321,7 +2321,7 @@  discard block
 block discarded – undo
2321 2321
 				$line->ref              = $objp->product_ref; // Ref product
2322 2322
 				$line->product_ref      = $objp->product_ref; // Ref product
2323 2323
 				$line->libelle          = $objp->product_label; // deprecated
2324
-				$line->product_label 	= $objp->product_label; // Label product
2324
+				$line->product_label = $objp->product_label; // Label product
2325 2325
 				$line->product_barcode  = $objp->product_barcode; // Barcode number product
2326 2326
 				$line->product_desc     = $objp->product_desc; // Description product
2327 2327
 				$line->fk_product_type  = $objp->fk_product_type; // Type of product
@@ -2620,7 +2620,7 @@  discard block
 block discarded – undo
2620 2620
 				$facligne->rang = 1;
2621 2621
 				$linecount = count($this->lines);
2622 2622
 				for ($ii = 1; $ii <= $linecount; $ii++) {
2623
-					$this->updateRangOfLine($this->lines[$ii - 1]->id, $ii+1);
2623
+					$this->updateRangOfLine($this->lines[$ii - 1]->id, $ii + 1);
2624 2624
 				}
2625 2625
 			}
2626 2626
 
@@ -3197,7 +3197,7 @@  discard block
 block discarded – undo
3197 3197
 		if ((!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && !$user->hasRight('facture', 'creer'))
3198 3198
 		|| (getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && !$user->hasRight('facture', 'invoice_advance', 'validate'))) {
3199 3199
 			$this->error = 'Permission denied';
3200
-			dol_syslog(get_class($this)."::validate ".$this->error.' MAIN_USE_ADVANCED_PERMS=' . getDolGlobalString('MAIN_USE_ADVANCED_PERMS'), LOG_ERR);
3200
+			dol_syslog(get_class($this)."::validate ".$this->error.' MAIN_USE_ADVANCED_PERMS='.getDolGlobalString('MAIN_USE_ADVANCED_PERMS'), LOG_ERR);
3201 3201
 			return -1;
3202 3202
 		}
3203 3203
 		if (getDolGlobalString('INVOICE_CHECK_POSTERIOR_DATE')) {
@@ -3547,7 +3547,7 @@  discard block
 block discarded – undo
3547 3547
 			// Set new ref and define current status
3548 3548
 			if (!$error) {
3549 3549
 				$this->ref = $num;
3550
-				$this->statut = self::STATUS_VALIDATED;	// deprecated
3550
+				$this->statut = self::STATUS_VALIDATED; // deprecated
3551 3551
 				$this->status = self::STATUS_VALIDATED;
3552 3552
 				$this->date_validation = $now;
3553 3553
 				$i = 0;
@@ -3692,7 +3692,7 @@  discard block
 block discarded – undo
3692 3692
 
3693 3693
 			if ($error == 0) {
3694 3694
 				$old_statut = $this->status;
3695
-				$this->statut = self::STATUS_DRAFT;	// deprecated
3695
+				$this->statut = self::STATUS_DRAFT; // deprecated
3696 3696
 				$this->status = self::STATUS_DRAFT;
3697 3697
 
3698 3698
 				// Call trigger
@@ -4023,7 +4023,7 @@  discard block
 block discarded – undo
4023 4023
 				return -2;
4024 4024
 			}
4025 4025
 		} else {
4026
-			$this->errors[]='status of invoice must be Draft to allow use of ->addline()';
4026
+			$this->errors[] = 'status of invoice must be Draft to allow use of ->addline()';
4027 4027
 			dol_syslog(get_class($this)."::addline status of invoice must be Draft to allow use of ->addline()", LOG_ERR);
4028 4028
 			return -3;
4029 4029
 		}
@@ -4589,7 +4589,7 @@  discard block
 block discarded – undo
4589 4589
 		}
4590 4590
 
4591 4591
 		if (!empty($addon)) {
4592
-			dol_syslog("Call getNextNumRef with ".$addonConstName." = " . getDolGlobalString('FACTURE_ADDON').", thirdparty=".$soc->name.", type=".$soc->typent_code.", mode=".$mode, LOG_DEBUG);
4592
+			dol_syslog("Call getNextNumRef with ".$addonConstName." = ".getDolGlobalString('FACTURE_ADDON').", thirdparty=".$soc->name.", type=".$soc->typent_code.", mode=".$mode, LOG_DEBUG);
4593 4593
 
4594 4594
 			$mybool = false;
4595 4595
 
@@ -5659,14 +5659,14 @@  discard block
 block discarded – undo
5659 5659
 		if (!empty($paymentmode) && $paymentmode != 'all') {
5660 5660
 			$sql .= ", ".MAIN_DB_PREFIX."c_paiement as cp";
5661 5661
 		}
5662
-		$sql .= " WHERE f.paye = 0";	// Only unpaid
5663
-		$sql .= " AND f.fk_statut = ".self::STATUS_VALIDATED;	// Only validated status
5662
+		$sql .= " WHERE f.paye = 0"; // Only unpaid
5663
+		$sql .= " AND f.fk_statut = ".self::STATUS_VALIDATED; // Only validated status
5664 5664
 		if ($datetouse == 'invoicedate') {
5665 5665
 			$sql .= " AND f.datef = '".$this->db->idate($tmpidate, 'gmt')."'";
5666 5666
 		} else {
5667 5667
 			$sql .= " AND f.date_lim_reglement = '".$this->db->idate($tmpidate, 'gmt')."'";
5668 5668
 		}
5669
-		$sql .= " AND f.entity IN (".getEntity('facture', 0).")";	// One batch process only one company (no sharing)
5669
+		$sql .= " AND f.entity IN (".getEntity('facture', 0).")"; // One batch process only one company (no sharing)
5670 5670
 		if (!empty($paymentmode) && $paymentmode != 'all') {
5671 5671
 			$sql .= " AND f.fk_mode_reglement = cp.id AND cp.code = '".$this->db->escape($paymentmode)."'";
5672 5672
 		}
@@ -5874,7 +5874,7 @@  discard block
 block discarded – undo
5874 5874
 								$actioncomm->create($user);
5875 5875
 							}
5876 5876
 
5877
-							$this->db->commit();	// We always commit
5877
+							$this->db->commit(); // We always commit
5878 5878
 						}
5879 5879
 
5880 5880
 						if ($errormesg) {
@@ -5916,7 +5916,7 @@  discard block
 block discarded – undo
5916 5916
 		// get date of last validated invoices of same type
5917 5917
 		$sql  = "SELECT datef";
5918 5918
 		$sql .= " FROM ".MAIN_DB_PREFIX."facture";
5919
-		$sql .= " WHERE type = " . (int) $this->type ;
5919
+		$sql .= " WHERE type = ".(int) $this->type;
5920 5920
 		$sql .= " AND date_valid IS NOT NULL";
5921 5921
 		$sql .= " AND entity IN (".getEntity('invoice').")";
5922 5922
 		$sql .= " ORDER BY datef DESC LIMIT 1";
@@ -6121,7 +6121,7 @@  discard block
 block discarded – undo
6121 6121
 			$objp = $this->db->fetch_object($result);
6122 6122
 
6123 6123
 			if (!$objp) {
6124
-				$this->error = 'InvoiceLine with id '. $rowid .' not found sql='.$sql;
6124
+				$this->error = 'InvoiceLine with id '.$rowid.' not found sql='.$sql;
6125 6125
 				return 0;
6126 6126
 			}
6127 6127
 
Please login to merge, or discard this patch.
htdocs/projet/activity/perday.php 1 patch
Braces   +8 added lines, -2 removed lines patch added patch discarded remove patch
@@ -96,8 +96,14 @@
 block discarded – undo
96 96
 }
97 97
 
98 98
 $daytoparsegmt = dol_now('gmt');
99
-if ($yearofday && $monthofday && $dayofday) $daytoparsegmt = dol_mktime(0, 0, 0, $monthofday, $dayofday, $yearofday, 'gmt'); // xxxofday is value of day after submit action 'addtime'
100
-elseif ($year && $month && $day) $daytoparsegmt = dol_mktime(0, 0, 0, $month, $day, $year, 'gmt'); // this are value submited after submit of action 'submitdateselect'
99
+if ($yearofday && $monthofday && $dayofday) {
100
+	$daytoparsegmt = dol_mktime(0, 0, 0, $monthofday, $dayofday, $yearofday, 'gmt');
101
+}
102
+// xxxofday is value of day after submit action 'addtime'
103
+elseif ($year && $month && $day) {
104
+	$daytoparsegmt = dol_mktime(0, 0, 0, $month, $day, $year, 'gmt');
105
+}
106
+// this are value submited after submit of action 'submitdateselect'
101 107
 
102 108
 if (empty($search_usertoprocessid) || $search_usertoprocessid == $user->id) {
103 109
 	$usertoprocess = $user;
Please login to merge, or discard this patch.
htdocs/expensereport/payment/list.php 2 patches
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -53,20 +53,20 @@  discard block
 block discarded – undo
53 53
 // Security check
54 54
 if ($user->socid) $socid = $user->socid;
55 55
 
56
-$search_ref				= GETPOST('search_ref', 'alpha');
57
-$search_date_startday	= GETPOST('search_date_startday', 'int');
58
-$search_date_startmonth	= GETPOST('search_date_startmonth', 'int');
59
-$search_date_startyear	= GETPOST('search_date_startyear', 'int');
56
+$search_ref = GETPOST('search_ref', 'alpha');
57
+$search_date_startday = GETPOST('search_date_startday', 'int');
58
+$search_date_startmonth = GETPOST('search_date_startmonth', 'int');
59
+$search_date_startyear = GETPOST('search_date_startyear', 'int');
60 60
 $search_date_endday		= GETPOST('search_date_endday', 'int');
61
-$search_date_endmonth	= GETPOST('search_date_endmonth', 'int');
61
+$search_date_endmonth = GETPOST('search_date_endmonth', 'int');
62 62
 $search_date_endyear	= GETPOST('search_date_endyear', 'int');
63
-$search_date_start		= dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear);	// Use tzserver
64
-$search_date_end		= dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear);
65
-$search_user			= GETPOST('search_user', 'alpha');
63
+$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver
64
+$search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear);
65
+$search_user = GETPOST('search_user', 'alpha');
66 66
 $search_payment_type	= GETPOST('search_payment_type');
67
-$search_cheque_num		= GETPOST('search_cheque_num', 'alpha');
67
+$search_cheque_num = GETPOST('search_cheque_num', 'alpha');
68 68
 $search_bank_account	= GETPOST('search_bank_account', 'int');
69
-$search_amount			= GETPOST('search_amount', 'alpha'); // alpha because we must be able to search on '< x'
69
+$search_amount = GETPOST('search_amount', 'alpha'); // alpha because we must be able to search on '< x'
70 70
 
71 71
 $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
72 72
 $sortfield				= GETPOST('sortfield', 'aZ09comma');
@@ -198,10 +198,10 @@  discard block
 block discarded – undo
198 198
 	$sql .= natural_search('pndf.rowid', $search_ref);
199 199
 }
200 200
 if ($search_date_start) {
201
-	$sql .= " AND pndf.datep >= '" . $db->idate($search_date_start) . "'";
201
+	$sql .= " AND pndf.datep >= '".$db->idate($search_date_start)."'";
202 202
 }
203 203
 if ($search_date_end) {
204
-	$sql .=" AND pndf.datep <= '" . $db->idate($search_date_end) . "'";
204
+	$sql .= " AND pndf.datep <= '".$db->idate($search_date_end)."'";
205 205
 }
206 206
 
207 207
 if ($search_user) {
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,9 @@
 block discarded – undo
49 49
 $socid = GETPOST('socid', 'int');
50 50
 
51 51
 // Security check
52
-if ($user->socid) $socid = $user->socid;
52
+if ($user->socid) {
53
+	$socid = $user->socid;
54
+}
53 55
 
54 56
 $search_ref				= GETPOST('search_ref', 'alpha');
55 57
 $search_date_startday	= GETPOST('search_date_startday', 'int');
Please login to merge, or discard this patch.
htdocs/recruitment/recruitmentjobposition_list.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -303,7 +303,7 @@
 block discarded – undo
303 303
 					$sql .= " AND t.".$db->escape($columnName)." >= '".$db->idate($search[$key])."'";
304 304
 				}
305 305
 				if (preg_match('/_dtend$/', $key)) {
306
-					$sql .= " AND t.".$db->escape($columnName)." <= '" . $db->idate($search[$key])."'";
306
+					$sql .= " AND t.".$db->escape($columnName)." <= '".$db->idate($search[$key])."'";
307 307
 				}
308 308
 			}
309 309
 		}
Please login to merge, or discard this patch.
htdocs/debugbar/class/DataCollector/DolLogsCollector.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@
 block discarded – undo
73 73
 	{
74 74
 		global $conf;
75 75
 
76
-		$uselogfile =  getDolGlobalInt('DEBUGBAR_USE_LOG_FILE');
76
+		$uselogfile = getDolGlobalInt('DEBUGBAR_USE_LOG_FILE');
77 77
 
78 78
 		if ($uselogfile) {
79 79
 			$this->getStorageLogs($this->path);
Please login to merge, or discard this patch.
htdocs/admin/emailcollector_list.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -507,7 +507,7 @@
 block discarded – undo
507 507
 	} elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) {
508 508
 		$cssforfield .= ($cssforfield ? ' ' : '').'right';
509 509
 	}
510
-	$cssforfield = preg_replace('/small\s*/', '', $cssforfield);	// the 'small' css must not be used for the title label
510
+	$cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label
511 511
 	if (!empty($arrayfields['t.'.$key]['checked'])) {
512 512
 		print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($cssforfield ? 'class="'.$cssforfield.'"' : ''), $sortfield, $sortorder, ($cssforfield ? $cssforfield.' ' : ''))."\n";
513 513
 		$totalarray['nbfield']++;
Please login to merge, or discard this patch.
htdocs/admin/dolistore/class/PSWebServiceLibrary.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -235,7 +235,7 @@
 block discarded – undo
235 235
 			if (!function_exists('simplexml_load_string')) {
236 236
 				throw new PrestaShopWebserviceException('Method simplexml_load_string not available. Your PHP does not support xml.');
237 237
 			}
238
-			$xml = simplexml_load_string($response, 'SimpleXMLElement', LIBXML_NOCDATA|LIBXML_NONET);
238
+			$xml = simplexml_load_string($response, 'SimpleXMLElement', LIBXML_NOCDATA | LIBXML_NONET);
239 239
 			if (libxml_get_errors()) {
240 240
 				$msg = var_export(libxml_get_errors(), true);
241 241
 				libxml_clear_errors();
Please login to merge, or discard this patch.