Browse Source

Fix regression (bad name of function)

Laurent Destailleur 6 years ago
parent
commit
baf9b6f309

+ 3 - 3
htdocs/comm/propal/list.php

@@ -330,15 +330,15 @@ if ($viewstatut != '' && $viewstatut != '-1')
 	$sql.= ' AND p.fk_statut IN ('.$db->escape($viewstatut).')';
 }
 
-$sql.= dol_sql_datefilter(
+$sql.= dolSqlDateFilter(
 				"p.datep", 
 				$search_day, $search_month, $search_year
 );
-$sql.= dol_sql_datefilter(
+$sql.= dolSqlDateFilter(
 				"p.fin_validite", 
 				$search_dayfin, $search_month_end, $search_yearfin
 );
-$sql.= dol_sql_datefilter(
+$sql.= dolSqlDateFilter(
 				"p.date_livraison", 
 				$search_daydelivery, $search_monthdelivery, $search_yeardelivery
 );

+ 2 - 2
htdocs/commande/list.php

@@ -304,12 +304,12 @@ if ($viewstatut <> '')
 	}
 }
 
-$sql.= dol_sql_datefilter(
+$sql.= dolSqlDateFilter(
 				"c.date_commande", 
 				$search_orderday, $search_ordermonth, $search_orderyear
 );
 
-$sql.= dol_sql_datefilter(
+$sql.= dolSqlDateFilter(
 				"c.date_livraison", 
 				$search_deliveryday, $search_deliverymonth, $search_deliveryyear
 );

+ 1 - 1
htdocs/compta/deplacement/list.php

@@ -107,7 +107,7 @@ if ($search_company)
 }
 // if ($search_amount)		$sql.=" AND d.km='".$db->escape(price2num(trim($search_amount)))."'";
 
-$sql.= dol_sql_datefilter(
+$sql.= dolSqlDateFilter(
 				"d.dated", $day, $month, $year
 );
 

+ 2 - 2
htdocs/compta/facture/list.php

@@ -452,11 +452,11 @@ if ($search_status != '-1' && $search_status != '')
 }
 if ($search_paymentmode > 0) $sql .= " AND f.fk_mode_reglement = ".$db->escape($search_paymentmode);
 
-$sql.= dol_sql_datefilter(
+$sql.= dolSqlDateFilter(
 				"f.datef", 
 				$search_day, $search_month, $search_year
 );
-$sql.= dol_sql_datefilter(
+$sql.= dolSqlDateFilter(
 				"f.date_lim_reglement", 
 				$search_day_lim, $search_month_lim, $search_year_lim
 );

+ 1 - 1
htdocs/compta/paiement/list.php

@@ -164,7 +164,7 @@ else
         else  $sql.= " AND f.fk_user_author = ".$userid;
     }
     // Search criteria
-    $sql.= dol_sql_datefilter("p.datep", $day, $month, $year);
+    $sql.= dolSqlDateFilter("p.datep", $day, $month, $year);
 
     if ($search_ref)       		    $sql .= natural_search('p.ref', $search_ref);
     if ($search_account > 0)      	$sql .=" AND b.fk_account=".$search_account;

+ 9 - 9
htdocs/core/lib/date.lib.php

@@ -151,7 +151,7 @@ function dol_time_plus_duree($time, $duration_value, $duration_unit)
  * @return     int						Time into seconds
  * @see convertSecondToTime
  */
-function convertTime2Seconds($iHours=0,$iMinutes=0,$iSeconds=0)
+function convertTime2Seconds($iHours=0, $iMinutes=0, $iSeconds=0)
 {
 	$iResult=($iHours*3600)+($iMinutes*60)+$iSeconds;
 	return $iResult;
@@ -276,16 +276,16 @@ function convertSecondToTime($iSecond, $format='all', $lengthOfDay=86400, $lengt
 
 
 /**
- * générate standard filter date
+ * Generate a SQL string to make a filter into a range (for second of date until last second of date)
  *
- * @param      string	$datefield		fields where apply sql date filter
- * @param      int		$day_date		day date
- * @param      int		$month_date		month date
- * @param      int		$year_date		year date
- * @return     string	$sqldate		sql part of date
+ * @param      string	$datefield		Name of SQL field where apply sql date filter
+ * @param      int		$day_date		Day date
+ * @param      int		$month_date		Month date
+ * @param      int		$year_date		Year date
+ * @return     string	$sqldate		String with SQL filter
  */
-
-function dolSqlDatefilter($datefield, $day_date, $month_date, $year_date) {
+function dolSqlDateFilter($datefield, $day_date, $month_date, $year_date)
+{
 	global $db;
 	$sqldate="";
 	if ($month_date > 0) {

+ 2 - 2
htdocs/expensereport/list.php

@@ -276,13 +276,13 @@ if (!empty($sall)) $sql.= natural_search(array_keys($fieldstosearchall), $sall);
 // Ref
 if (!empty($search_ref)) $sql.= natural_search('d.ref', $search_ref);
 // Date Start
-$sql.= dol_sql_datefilter(
+$sql.= dolSqlDateFilter(
 				"d.date_debut", 
 				$day_start, $month_start, $year_start
 );
 
 // Date End
-$sql.= dol_sql_datefilter(
+$sql.= dolSqlDateFilter(
 				"d.date_fin", 
 				$day_end, $month_end, $year_end
 );

+ 2 - 2
htdocs/fourn/commande/list.php

@@ -528,11 +528,11 @@ if (GETPOST('statut', 'intcomma') !== '')
 if ($search_status != '' && $search_status >= 0)
 	$sql.=" AND cf.fk_statut IN (".$db->escape($search_status).")";
 
-$sql.= dol_sql_datefilter(
+$sql.= dolSqlDateFilter(
 				"cf.date_commande", 
 				$search_orderday, $search_ordermonth, $search_orderyear
 );
-$sql.= dol_sql_datefilter(
+$sql.= dolSqlDateFilter(
 				"cf.date_livraison", 
 				$search_deliveryday, $search_deliverymonth, $search_deliveryyear
 );

+ 2 - 2
htdocs/fourn/facture/list.php

@@ -331,8 +331,8 @@ if ($search_montant_ttc != '') $sql.= natural_search('f.total_ttc', $search_mont
 if ($search_status != '' && $search_status >= 0) $sql.= " AND f.fk_statut = ".$db->escape($search_status);
 if ($search_paymentmode > 0) $sql .= " AND f.fk_mode_reglement = ".$search_paymentmode."";
 
-$sql.= dol_sql_datefilter( "f.datef", $day, $month, $year);
-$sql.= dol_sql_datefilter( "f.date_lim_reglement", $day_lim, $month_lim, $year_lim);
+$sql.= dolSqlDateFilter( "f.datef", $day, $month, $year);
+$sql.= dolSqlDateFilter( "f.date_lim_reglement", $day_lim, $month_lim, $year_lim);
 
 if ($option == 'late') $sql.=" AND f.date_lim_reglement < '".$db->idate(dol_now() - $conf->facture->fournisseur->warning_delay)."'";
 if ($search_label) $sql .= natural_search('f.libelle', $search_label);

+ 3 - 3
htdocs/holiday/list.php

@@ -191,19 +191,19 @@ if(!empty($search_ref))
 }
 
 // Start date
-$sql.= dol_sql_datefilter(
+$sql.= dolSqlDateFilter(
 				"cp.date_debut", 
 				$search_day_start, $search_month_start, $search_year_start
 );
 
 // End date
-$sql.= dol_sql_datefilter(
+$sql.= dolSqlDateFilter(
 				"cp.date_fin", 
 				$search_day_end, $search_month_end, $search_year_end
 );
 
 // Create date
-$sql.= dol_sql_datefilter(
+$sql.= dolSqlDateFilter(
 				"cp.date_create", 
 				$search_day_create, $search_month_create, $search_year_create
 );

+ 2 - 2
htdocs/supplier_proposal/list.php

@@ -290,8 +290,8 @@ if ($sall) $sql .= natural_search(array_keys($fieldstosearchall), $sall);
 if ($socid) $sql.= ' AND s.rowid = '.$socid;
 if ($search_status >= 0 && $search_status != '') $sql.= ' AND sp.fk_statut IN ('.$db->escape($search_status).')';
 
-$sql.= dol_sql_datefilter("sp.date_livraison", $day, $month, $year);
-$sql.= dol_sql_datefilter("sp.date_valid", $dayvalid, $monthvalid, $yearvalid);
+$sql.= dolSqlDateFilter("sp.date_livraison", $day, $month, $year);
+$sql.= dolSqlDateFilter("sp.date_valid", $dayvalid, $monthvalid, $yearvalid);
 
 if ($search_sale > 0) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$search_sale;
 if ($search_user > 0)