Completed
Branch develop (b66a18)
by
unknown
14:24
created
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   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -504,7 +504,7 @@  discard block
 block discarded – undo
504 504
 			$this->mode_reglement_id = 0;
505 505
 		}
506 506
 		$this->status = self::STATUS_DRAFT;
507
-		$this->statut = self::STATUS_DRAFT;	// deprecated
507
+		$this->statut = self::STATUS_DRAFT; // deprecated
508 508
 
509 509
 		if (!empty($this->multicurrency_code)) {
510 510
 			// Multicurrency (test on $this->multicurrency_tx because we should take the default rate of multicurrency_code only if not using original rate)
@@ -585,7 +585,7 @@  discard block
 block discarded – undo
585 585
 
586 586
 			// Fields always coming from template
587 587
 			$this->remise_absolue    = $_facrec->remise_absolue;
588
-			$this->remise_percent    = $_facrec->remise_percent;	// TODO deprecated
588
+			$this->remise_percent    = $_facrec->remise_percent; // TODO deprecated
589 589
 			$this->fk_incoterms = $_facrec->fk_incoterms;
590 590
 			$this->location_incoterms = $_facrec->location_incoterms;
591 591
 
@@ -605,7 +605,7 @@  discard block
 block discarded – undo
605 605
 				$this->mode_reglement_id = 0;
606 606
 			}
607 607
 			$this->status = self::STATUS_DRAFT;
608
-			$this->statut = self::STATUS_DRAFT;	// deprecated
608
+			$this->statut = self::STATUS_DRAFT; // deprecated
609 609
 
610 610
 			$this->linked_objects = $_facrec->linkedObjectsIds;
611 611
 			// We do not add link to template invoice or next invoice will be linked to all generated invoices
@@ -687,7 +687,7 @@  discard block
 block discarded – undo
687 687
 		$sql .= ", fk_soc";
688 688
 		$sql .= ", datec";
689 689
 		$sql .= ", remise_absolue";
690
-		$sql .= ", remise_percent";	// TODO deprecated
690
+		$sql .= ", remise_percent"; // TODO deprecated
691 691
 		$sql .= ", datef";
692 692
 		$sql .= ", date_pointoftax";
693 693
 		$sql .= ", note_private";
@@ -713,7 +713,7 @@  discard block
 block discarded – undo
713 713
 		$sql .= ", ".((int) $socid);
714 714
 		$sql .= ", '".$this->db->idate($now)."'";
715 715
 		$sql .= ", ".($this->remise_absolue > 0 ? $this->remise_absolue : 'NULL');
716
-		$sql .= ", ".($this->remise_percent > 0 ? $this->remise_percent : 'NULL');	// TODO deprecated
716
+		$sql .= ", ".($this->remise_percent > 0 ? $this->remise_percent : 'NULL'); // TODO deprecated
717 717
 		$sql .= ", '".$this->db->idate($this->date)."'";
718 718
 		$sql .= ", ".(empty($this->date_pointoftax) ? "null" : "'".$this->db->idate($this->date_pointoftax)."'");
719 719
 		$sql .= ", ".($this->note_private ? "'".$this->db->escape($this->note_private)."'" : "null");
@@ -852,7 +852,7 @@  discard block
 block discarded – undo
852 852
 
853 853
 						// Complete vat rate with code
854 854
 						$vatrate = $newinvoiceline->tva_tx;
855
-						if ($newinvoiceline->vat_src_code && ! preg_match('/\(.*\)/', $vatrate)) $vatrate.=' ('.$newinvoiceline->vat_src_code.')';
855
+						if ($newinvoiceline->vat_src_code && !preg_match('/\(.*\)/', $vatrate)) $vatrate .= ' ('.$newinvoiceline->vat_src_code.')';
856 856
 
857 857
 						$newinvoiceline->fk_parent_line = $fk_parent_line;
858 858
 
@@ -1074,7 +1074,7 @@  discard block
 block discarded – undo
1074 1074
 						$buyprice,
1075 1075
 						$_facrec->lines[$i]->label,
1076 1076
 						empty($_facrec->lines[$i]->array_options) ?null:$_facrec->lines[$i]->array_options,
1077
-						100,	// situation percent is undefined on recurring invoice lines
1077
+						100, // situation percent is undefined on recurring invoice lines
1078 1078
 						'',
1079 1079
 						$_facrec->lines[$i]->fk_unit,
1080 1080
 						$_facrec->lines[$i]->multicurrency_subprice,
@@ -1177,7 +1177,7 @@  discard block
 block discarded – undo
1177 1177
 		$facture->cond_reglement_id = $this->cond_reglement_id;
1178 1178
 		$facture->mode_reglement_id = $this->mode_reglement_id;
1179 1179
 		$facture->remise_absolue    = $this->remise_absolue;
1180
-		$facture->remise_percent    = $this->remise_percent;	// TODO deprecated
1180
+		$facture->remise_percent    = $this->remise_percent; // TODO deprecated
1181 1181
 
1182 1182
 		$facture->origin            = $this->origin;
1183 1183
 		$facture->origin_id         = $this->origin_id;
@@ -1653,7 +1653,7 @@  discard block
 block discarded – undo
1653 1653
 	{
1654 1654
 		global $conf, $langs, $hookmanager, $action;
1655 1655
 
1656
-		if (! in_array($origin->element, array('propal', 'commande'))) {
1656
+		if (!in_array($origin->element, array('propal', 'commande'))) {
1657 1657
 			$origin->error = 'ErrorCanOnlyAutomaticallyGenerateADepositFromProposalOrOrder';
1658 1658
 			return null;
1659 1659
 		}
@@ -1663,7 +1663,7 @@  discard block
 block discarded – undo
1663 1663
 			return null;
1664 1664
 		}
1665 1665
 
1666
-		require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
1666
+		require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
1667 1667
 
1668 1668
 		if ($date > (dol_get_last_hour(dol_now('tzuserrel')) + (empty($conf->global->INVOICE_MAX_FUTURE_DELAY) ? 0 : $conf->global->INVOICE_MAX_FUTURE_DELAY))) {
1669 1669
 			$origin->error = 'ErrorDateIsInFuture';
@@ -1707,7 +1707,7 @@  discard block
 block discarded – undo
1707 1707
 		$deposit->pos_source = $origin->pos_source;
1708 1708
 		$deposit->model_pdf = 'crabe';
1709 1709
 
1710
-		$modelByTypeConfName = 'FACTURE_ADDON_PDF_' . $deposit->type;
1710
+		$modelByTypeConfName = 'FACTURE_ADDON_PDF_'.$deposit->type;
1711 1711
 
1712 1712
 		if (!empty($conf->global->$modelByTypeConfName)) {
1713 1713
 			$deposit->model_pdf = $conf->global->$modelByTypeConfName;
@@ -1762,10 +1762,10 @@  discard block
 block discarded – undo
1762 1762
 					continue;
1763 1763
 				}
1764 1764
 				$TTotalByTva[$line->tva_tx] += $line->total_ttc;
1765
-				$descriptions[$line->tva_tx] .= '<li>' . (!empty($line->product_ref) ? $line->product_ref . ' - ' :  '');
1766
-				$descriptions[$line->tva_tx] .= (!empty($line->product_label) ? $line->product_label . ' - ' : '');
1767
-				$descriptions[$line->tva_tx] .= $langs->trans('Qty') . ' : ' . $line->qty;
1768
-				$descriptions[$line->tva_tx] .= ' - ' . $langs->trans('TotalHT') . ' : ' . price($line->total_ht) . '</li>';
1765
+				$descriptions[$line->tva_tx] .= '<li>'.(!empty($line->product_ref) ? $line->product_ref.' - ' : '');
1766
+				$descriptions[$line->tva_tx] .= (!empty($line->product_label) ? $line->product_label.' - ' : '');
1767
+				$descriptions[$line->tva_tx] .= $langs->trans('Qty').' : '.$line->qty;
1768
+				$descriptions[$line->tva_tx] .= ' - '.$langs->trans('TotalHT').' : '.price($line->total_ht).'</li>';
1769 1769
 			}
1770 1770
 
1771 1771
 			foreach ($TTotalByTva as $tva => &$total) {
@@ -1789,10 +1789,10 @@  discard block
 block discarded – undo
1789 1789
 				$totalamount += $lines[$i]->total_ht; // Fixme : is it not for the customer ? Shouldn't we take total_ttc ?
1790 1790
 				$tva_tx = $lines[$i]->tva_tx;
1791 1791
 				$amountdeposit[$tva_tx] += ($lines[$i]->total_ht * $origin->deposit_percent) / 100;
1792
-				$descriptions[$tva_tx] .= '<li>' . (!empty($lines[$i]->product_ref) ? $lines[$i]->product_ref . ' - ' :  '');
1793
-				$descriptions[$tva_tx] .= (!empty($lines[$i]->product_label) ? $lines[$i]->product_label . ' - ' : '');
1794
-				$descriptions[$tva_tx] .= $langs->trans('Qty') . ' : ' . $lines[$i]->qty;
1795
-				$descriptions[$tva_tx] .= ' - ' . $langs->trans('TotalHT') . ' : ' . price($lines[$i]->total_ht) . '</li>';
1792
+				$descriptions[$tva_tx] .= '<li>'.(!empty($lines[$i]->product_ref) ? $lines[$i]->product_ref.' - ' : '');
1793
+				$descriptions[$tva_tx] .= (!empty($lines[$i]->product_label) ? $lines[$i]->product_label.' - ' : '');
1794
+				$descriptions[$tva_tx] .= $langs->trans('Qty').' : '.$lines[$i]->qty;
1795
+				$descriptions[$tva_tx] .= ' - '.$langs->trans('TotalHT').' : '.price($lines[$i]->total_ht).'</li>';
1796 1796
 			}
1797 1797
 
1798 1798
 			if ($totalamount == 0) {
@@ -1807,11 +1807,11 @@  discard block
 block discarded – undo
1807 1807
 				continue;
1808 1808
 			}
1809 1809
 
1810
-			$descline = '(DEPOSIT) ('. $origin->deposit_percent .'%) - '.$origin->ref;
1810
+			$descline = '(DEPOSIT) ('.$origin->deposit_percent.'%) - '.$origin->ref;
1811 1811
 
1812 1812
 			// Hidden conf
1813 1813
 			if (!empty($conf->global->INVOICE_DEPOSIT_VARIABLE_MODE_DETAIL_LINES_IN_DESCRIPTION) && !empty($descriptions[$tva])) {
1814
-				$descline .= '<ul>' . $descriptions[$tva] . '</ul>';
1814
+				$descline .= '<ul>'.$descriptions[$tva].'</ul>';
1815 1815
 			}
1816 1816
 
1817 1817
 			$addlineResult = $deposit->addline(
@@ -2073,7 +2073,7 @@  discard block
 block discarded – undo
2073 2073
 				$label = $langs->trans("Invoice");
2074 2074
 				$linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"';
2075 2075
 			}
2076
-			$linkclose .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' :  ' title="tocomplete"');
2076
+			$linkclose .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' : ' title="tocomplete"');
2077 2077
 			$linkclose .= $dataparams.' class="'.$classfortooltip.'"';
2078 2078
 		}
2079 2079
 
@@ -2185,10 +2185,10 @@  discard block
 block discarded – undo
2185 2185
 				$this->id = $obj->rowid;
2186 2186
 				$this->entity = $obj->entity;
2187 2187
 
2188
-				$this->ref					= $obj->ref;
2189
-				$this->ref_client			= $obj->ref_client;
2190
-				$this->ref_customer			= $obj->ref_client;
2191
-				$this->ref_ext				= $obj->ref_ext;
2188
+				$this->ref = $obj->ref;
2189
+				$this->ref_client = $obj->ref_client;
2190
+				$this->ref_customer = $obj->ref_client;
2191
+				$this->ref_ext = $obj->ref_ext;
2192 2192
 				$this->type					= $obj->type;
2193 2193
 				$this->date					= $this->db->jdate($obj->df);
2194 2194
 				$this->date_pointoftax		= $this->db->jdate($obj->date_pointoftax);
@@ -2196,7 +2196,7 @@  discard block
 block discarded – undo
2196 2196
 				$this->date_validation		= $this->db->jdate($obj->datev);
2197 2197
 				$this->date_modification = $this->db->jdate($obj->datem);
2198 2198
 				$this->datem = $this->db->jdate($obj->datem);
2199
-				$this->remise_percent		= $obj->remise_percent;	// TODO deprecated
2199
+				$this->remise_percent		= $obj->remise_percent; // TODO deprecated
2200 2200
 				$this->remise_absolue		= $obj->remise_absolue;
2201 2201
 				$this->total_ht				= $obj->total_ht;
2202 2202
 				$this->total_tva			= $obj->total_tva;
@@ -2214,7 +2214,7 @@  discard block
 block discarded – undo
2214 2214
 				$this->fk_project = $obj->fk_project;
2215 2215
 				$this->project = null; // Clear if another value was already set by fetch_projet
2216 2216
 
2217
-				$this->statut = $obj->status;	// deprecated
2217
+				$this->statut = $obj->status; // deprecated
2218 2218
 				$this->status = $obj->status;
2219 2219
 
2220 2220
 				$this->date_lim_reglement = $this->db->jdate($obj->dlr);
@@ -2347,7 +2347,7 @@  discard block
 block discarded – undo
2347 2347
 				$line->ref              = $objp->product_ref; // Ref product
2348 2348
 				$line->product_ref      = $objp->product_ref; // Ref product
2349 2349
 				$line->libelle          = $objp->product_label; // deprecated
2350
-				$line->product_label 	= $objp->product_label; // Label product
2350
+				$line->product_label = $objp->product_label; // Label product
2351 2351
 				$line->product_desc     = $objp->product_desc; // Description product
2352 2352
 				$line->fk_product_type  = $objp->fk_product_type; // Type of product
2353 2353
 				$line->qty              = $objp->qty;
@@ -2526,7 +2526,7 @@  discard block
 block discarded – undo
2526 2526
 		$sql .= " date_pointoftax=".(strval($this->date_pointoftax) != '' ? "'".$this->db->idate($this->date_pointoftax)."'" : 'null').",";
2527 2527
 		$sql .= " date_valid=".(strval($this->date_validation) != '' ? "'".$this->db->idate($this->date_validation)."'" : 'null').",";
2528 2528
 		$sql .= " paye=".(isset($this->paye) ? $this->db->escape($this->paye) : 0).",";
2529
-		$sql .= " remise_percent=".(isset($this->remise_percent) ? $this->db->escape($this->remise_percent) : "null").",";	// TODO deprecated
2529
+		$sql .= " remise_percent=".(isset($this->remise_percent) ? $this->db->escape($this->remise_percent) : "null").","; // TODO deprecated
2530 2530
 		$sql .= " remise_absolue=".(isset($this->remise_absolue) ? $this->db->escape($this->remise_absolue) : "null").",";
2531 2531
 		$sql .= " close_code=".(isset($this->close_code) ? "'".$this->db->escape($this->close_code)."'" : "null").",";
2532 2532
 		$sql .= " close_note=".(isset($this->close_note) ? "'".$this->db->escape($this->close_note)."'" : "null").",";
@@ -2640,7 +2640,7 @@  discard block
 block discarded – undo
2640 2640
 				$facligne->rang = 1;
2641 2641
 				$linecount = count($this->lines);
2642 2642
 				for ($ii = 1; $ii <= $linecount; $ii++) {
2643
-					$this->updateRangOfLine($this->lines[$ii - 1]->id, $ii+1);
2643
+					$this->updateRangOfLine($this->lines[$ii - 1]->id, $ii + 1);
2644 2644
 				}
2645 2645
 			}
2646 2646
 
@@ -3555,7 +3555,7 @@  discard block
 block discarded – undo
3555 3555
 			// Set new ref and define current status
3556 3556
 			if (!$error) {
3557 3557
 				$this->ref = $num;
3558
-				$this->statut = self::STATUS_VALIDATED;	// deprecated
3558
+				$this->statut = self::STATUS_VALIDATED; // deprecated
3559 3559
 				$this->status = self::STATUS_VALIDATED;
3560 3560
 				$this->date_validation = $now;
3561 3561
 				$i = 0;
@@ -3700,7 +3700,7 @@  discard block
 block discarded – undo
3700 3700
 
3701 3701
 			if ($error == 0) {
3702 3702
 				$old_statut = $this->status;
3703
-				$this->statut = self::STATUS_DRAFT;	// deprecated
3703
+				$this->statut = self::STATUS_DRAFT; // deprecated
3704 3704
 				$this->status = self::STATUS_DRAFT;
3705 3705
 
3706 3706
 				// Call trigger
@@ -4031,7 +4031,7 @@  discard block
 block discarded – undo
4031 4031
 				return -2;
4032 4032
 			}
4033 4033
 		} else {
4034
-			$this->errors[]='status of invoice must be Draft to allow use of ->addline()';
4034
+			$this->errors[] = 'status of invoice must be Draft to allow use of ->addline()';
4035 4035
 			dol_syslog(get_class($this)."::addline status of invoice must be Draft to allow use of ->addline()", LOG_ERR);
4036 4036
 			return -3;
4037 4037
 		}
@@ -5678,14 +5678,14 @@  discard block
 block discarded – undo
5678 5678
 		if (!empty($paymentmode) && $paymentmode != 'all') {
5679 5679
 			$sql .= ", ".MAIN_DB_PREFIX."c_paiement as cp";
5680 5680
 		}
5681
-		$sql .= " WHERE f.paye = 0";	// Only unpaid
5682
-		$sql .= " AND f.fk_statut = ".self::STATUS_VALIDATED;	// Only validated status
5681
+		$sql .= " WHERE f.paye = 0"; // Only unpaid
5682
+		$sql .= " AND f.fk_statut = ".self::STATUS_VALIDATED; // Only validated status
5683 5683
 		if ($datetouse == 'invoicedate') {
5684 5684
 			$sql .= " AND f.datef = '".$this->db->idate($tmpidate, 'gmt')."'";
5685 5685
 		} else {
5686 5686
 			$sql .= " AND f.date_lim_reglement = '".$this->db->idate($tmpidate, 'gmt')."'";
5687 5687
 		}
5688
-		$sql .= " AND f.entity IN (".getEntity('facture', 0).")";	// One batch process only one company (no sharing)
5688
+		$sql .= " AND f.entity IN (".getEntity('facture', 0).")"; // One batch process only one company (no sharing)
5689 5689
 		if (!empty($paymentmode) && $paymentmode != 'all') {
5690 5690
 			$sql .= " AND f.fk_mode_reglement = cp.id AND cp.code = '".$this->db->escape($paymentmode)."'";
5691 5691
 		}
@@ -5893,7 +5893,7 @@  discard block
 block discarded – undo
5893 5893
 								$actioncomm->create($user);
5894 5894
 							}
5895 5895
 
5896
-							$this->db->commit();	// We always commit
5896
+							$this->db->commit(); // We always commit
5897 5897
 						}
5898 5898
 
5899 5899
 						if ($errormesg) {
@@ -5929,7 +5929,7 @@  discard block
 block discarded – undo
5929 5929
 		// get date of last validated invoices of same type
5930 5930
 		$sql  = "SELECT datef";
5931 5931
 		$sql .= " FROM ".MAIN_DB_PREFIX."facture";
5932
-		$sql .= " WHERE type = " . (int) $this->type ;
5932
+		$sql .= " WHERE type = ".(int) $this->type;
5933 5933
 		$sql .= " AND date_valid IS NOT NULL";
5934 5934
 		$sql .= " AND entity IN (".getEntity('invoice').")";
5935 5935
 		$sql .= " ORDER BY datef DESC LIMIT 1";
@@ -6110,7 +6110,7 @@  discard block
 block discarded – undo
6110 6110
 			$objp = $this->db->fetch_object($result);
6111 6111
 
6112 6112
 			if (!$objp) {
6113
-				$this->error = 'InvoiceLine with id '. $rowid .' not found sql='.$sql;
6113
+				$this->error = 'InvoiceLine with id '.$rowid.' not found sql='.$sql;
6114 6114
 				return 0;
6115 6115
 			}
6116 6116
 
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/takepos/admin/setup.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
 print '<tr class="oddeven"><td>';
260 260
 print $langs->trans("NumberOfTerminals");
261 261
 print '<td colspan="2">';
262
-print '<input type="number" name="TAKEPOS_NUM_TERMINALS" min="1" value="' . (empty($conf->global->TAKEPOS_NUM_TERMINALS) ? '1' : $conf->global->TAKEPOS_NUM_TERMINALS)  . '">';
262
+print '<input type="number" name="TAKEPOS_NUM_TERMINALS" min="1" value="'.(empty($conf->global->TAKEPOS_NUM_TERMINALS) ? '1' : $conf->global->TAKEPOS_NUM_TERMINALS).'">';
263 263
 print "</td></tr>\n";
264 264
 
265 265
 // Services
@@ -392,7 +392,7 @@  discard block
 block discarded – undo
392 392
 	print '<tr class="oddeven"><td>';
393 393
 	print $form->textwithpicto($langs->trans("TakeposBarcodeRuleToInsertProduct"), $langs->trans("TakeposBarcodeRuleToInsertProductDesc"));
394 394
 	print '<td colspan="2">';
395
-	print '<input type="text" name="TAKEPOS_BARCODE_RULE_TO_INSERT_PRODUCT" value="' . (getDolGlobalString('TAKEPOS_BARCODE_RULE_TO_INSERT_PRODUCT')) . '">';
395
+	print '<input type="text" name="TAKEPOS_BARCODE_RULE_TO_INSERT_PRODUCT" value="'.(getDolGlobalString('TAKEPOS_BARCODE_RULE_TO_INSERT_PRODUCT')).'">';
396 396
 	print "</td></tr>\n";
397 397
 }
398 398
 
Please login to merge, or discard this patch.
htdocs/core/modules/stock/doc/pdf_standard.modules.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -685,7 +685,7 @@  discard block
 block discarded – undo
685 685
 		$pdf->SetFont('', 'B', $default_font_size - 3);
686 686
 
687 687
 		// Output Rect
688
-		$this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $tab_height, $hidetop, $hidebottom);	// Rect takes a length in 3rd parameter and 4th parameter
688
+		$this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect takes a length in 3rd parameter and 4th parameter
689 689
 
690 690
 		$pdf->SetLineStyle(array('dash'=>'0', 'color'=>array(200, 200, 200)));
691 691
 		$pdf->SetDrawColor(200, 200, 200);
@@ -696,24 +696,24 @@  discard block
 block discarded – undo
696 696
 
697 697
 
698 698
 		if (empty($hidetop)) {
699
-			$pdf->line($this->marge_gauche, $tab_top+11, $this->page_largeur-$this->marge_droite, $tab_top+11);	// line takes a position y in 2nd parameter and 4th parameter
699
+			$pdf->line($this->marge_gauche, $tab_top + 11, $this->page_largeur - $this->marge_droite, $tab_top + 11); // line takes a position y in 2nd parameter and 4th parameter
700 700
 			$pdf->SetXY($this->posxdesc - 1, $tab_top + 1);
701 701
 			$pdf->MultiCell($this->wref, 3, $outputlangs->transnoentities("Ref"), '', 'L');
702 702
 		}
703 703
 
704
-		$pdf->line($this->posxlabel-1, $tab_top, $this->posxlabel-1, $tab_top + $tab_height);
704
+		$pdf->line($this->posxlabel - 1, $tab_top, $this->posxlabel - 1, $tab_top + $tab_height);
705 705
 		if (empty($hidetop)) {
706 706
 			$pdf->SetXY($this->posxlabel - 1, $tab_top + 1);
707 707
 			$pdf->MultiCell($this->posxqty - $this->posxlabel - 1, 2, $outputlangs->transnoentities("Label"), '', 'C');
708 708
 		}
709 709
 
710
-		$pdf->line($this->posxqty-1, $tab_top, $this->posxqty-1, $tab_top + $tab_height);
710
+		$pdf->line($this->posxqty - 1, $tab_top, $this->posxqty - 1, $tab_top + $tab_height);
711 711
 		if (empty($hidetop)) {
712 712
 			$pdf->SetXY($this->posxqty - 1, $tab_top + 1);
713 713
 			$pdf->MultiCell($this->posxup - $this->posxqty - 1, 2, $outputlangs->transnoentities("Units"), '', 'C');
714 714
 		}
715 715
 
716
-		$pdf->line($this->posxup-1, $tab_top, $this->posxup-1, $tab_top + $tab_height);
716
+		$pdf->line($this->posxup - 1, $tab_top, $this->posxup - 1, $tab_top + $tab_height);
717 717
 		if (empty($hidetop)) {
718 718
 			$pdf->SetXY($this->posxup - 1, $tab_top + 1);
719 719
 			$pdf->MultiCell($this->posxunit - $this->posxup - 1, 2, $outputlangs->transnoentities("AverageUnitPricePMPShort"), '', 'C');
@@ -725,7 +725,7 @@  discard block
 block discarded – undo
725 725
 			$pdf->MultiCell($this->posxdiscount - $this->posxunit - 1, 2, $outputlangs->transnoentities("EstimatedStockValueShort"), '', 'C');
726 726
 		}
727 727
 
728
-		$pdf->line($this->posxdiscount-1, $tab_top, $this->posxdiscount-1, $tab_top + $tab_height);
728
+		$pdf->line($this->posxdiscount - 1, $tab_top, $this->posxdiscount - 1, $tab_top + $tab_height);
729 729
 		if (empty($hidetop)) {
730 730
 			$pdf->SetXY($this->posxdiscount - 1, $tab_top + 1);
731 731
 			$pdf->MultiCell($this->postotalht - $this->posxdiscount + 1, 2, $outputlangs->transnoentities("SellPriceMin"), '', 'C');
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/theme/md/dropdown.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -201,7 +201,7 @@
 block discarded – undo
201 201
 }
202 202
 
203 203
 div#topmenu-global-search-dropdown, div#topmenu-quickadd-dropdown, div#topmenu-bookmark-dropdown {
204
-	line-height: <?php echo (getDolGlobalInt('THEME_TOPMENU_DISABLE_IMAGE') == 1 ? '35' : '46' ); ?>px;
204
+	line-height: <?php echo (getDolGlobalInt('THEME_TOPMENU_DISABLE_IMAGE') == 1 ? '35' : '46'); ?>px;
205 205
 }
206 206
 a.top-menu-dropdown-link {
207 207
 	padding: 8px;
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.