Fix regression (bad name of function)
This commit is contained in:
parent
4b90f88793
commit
baf9b6f309
@ -330,15 +330,15 @@ if ($viewstatut != '' && $viewstatut != '-1')
|
|||||||
$sql.= ' AND p.fk_statut IN ('.$db->escape($viewstatut).')';
|
$sql.= ' AND p.fk_statut IN ('.$db->escape($viewstatut).')';
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql.= dol_sql_datefilter(
|
$sql.= dolSqlDateFilter(
|
||||||
"p.datep",
|
"p.datep",
|
||||||
$search_day, $search_month, $search_year
|
$search_day, $search_month, $search_year
|
||||||
);
|
);
|
||||||
$sql.= dol_sql_datefilter(
|
$sql.= dolSqlDateFilter(
|
||||||
"p.fin_validite",
|
"p.fin_validite",
|
||||||
$search_dayfin, $search_month_end, $search_yearfin
|
$search_dayfin, $search_month_end, $search_yearfin
|
||||||
);
|
);
|
||||||
$sql.= dol_sql_datefilter(
|
$sql.= dolSqlDateFilter(
|
||||||
"p.date_livraison",
|
"p.date_livraison",
|
||||||
$search_daydelivery, $search_monthdelivery, $search_yeardelivery
|
$search_daydelivery, $search_monthdelivery, $search_yeardelivery
|
||||||
);
|
);
|
||||||
|
|||||||
@ -304,12 +304,12 @@ if ($viewstatut <> '')
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql.= dol_sql_datefilter(
|
$sql.= dolSqlDateFilter(
|
||||||
"c.date_commande",
|
"c.date_commande",
|
||||||
$search_orderday, $search_ordermonth, $search_orderyear
|
$search_orderday, $search_ordermonth, $search_orderyear
|
||||||
);
|
);
|
||||||
|
|
||||||
$sql.= dol_sql_datefilter(
|
$sql.= dolSqlDateFilter(
|
||||||
"c.date_livraison",
|
"c.date_livraison",
|
||||||
$search_deliveryday, $search_deliverymonth, $search_deliveryyear
|
$search_deliveryday, $search_deliverymonth, $search_deliveryyear
|
||||||
);
|
);
|
||||||
|
|||||||
@ -107,7 +107,7 @@ if ($search_company)
|
|||||||
}
|
}
|
||||||
// if ($search_amount) $sql.=" AND d.km='".$db->escape(price2num(trim($search_amount)))."'";
|
// if ($search_amount) $sql.=" AND d.km='".$db->escape(price2num(trim($search_amount)))."'";
|
||||||
|
|
||||||
$sql.= dol_sql_datefilter(
|
$sql.= dolSqlDateFilter(
|
||||||
"d.dated", $day, $month, $year
|
"d.dated", $day, $month, $year
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -452,11 +452,11 @@ if ($search_status != '-1' && $search_status != '')
|
|||||||
}
|
}
|
||||||
if ($search_paymentmode > 0) $sql .= " AND f.fk_mode_reglement = ".$db->escape($search_paymentmode);
|
if ($search_paymentmode > 0) $sql .= " AND f.fk_mode_reglement = ".$db->escape($search_paymentmode);
|
||||||
|
|
||||||
$sql.= dol_sql_datefilter(
|
$sql.= dolSqlDateFilter(
|
||||||
"f.datef",
|
"f.datef",
|
||||||
$search_day, $search_month, $search_year
|
$search_day, $search_month, $search_year
|
||||||
);
|
);
|
||||||
$sql.= dol_sql_datefilter(
|
$sql.= dolSqlDateFilter(
|
||||||
"f.date_lim_reglement",
|
"f.date_lim_reglement",
|
||||||
$search_day_lim, $search_month_lim, $search_year_lim
|
$search_day_lim, $search_month_lim, $search_year_lim
|
||||||
);
|
);
|
||||||
|
|||||||
@ -164,7 +164,7 @@ else
|
|||||||
else $sql.= " AND f.fk_user_author = ".$userid;
|
else $sql.= " AND f.fk_user_author = ".$userid;
|
||||||
}
|
}
|
||||||
// Search criteria
|
// 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_ref) $sql .= natural_search('p.ref', $search_ref);
|
||||||
if ($search_account > 0) $sql .=" AND b.fk_account=".$search_account;
|
if ($search_account > 0) $sql .=" AND b.fk_account=".$search_account;
|
||||||
|
|||||||
@ -151,7 +151,7 @@ function dol_time_plus_duree($time, $duration_value, $duration_unit)
|
|||||||
* @return int Time into seconds
|
* @return int Time into seconds
|
||||||
* @see convertSecondToTime
|
* @see convertSecondToTime
|
||||||
*/
|
*/
|
||||||
function convertTime2Seconds($iHours=0,$iMinutes=0,$iSeconds=0)
|
function convertTime2Seconds($iHours=0, $iMinutes=0, $iSeconds=0)
|
||||||
{
|
{
|
||||||
$iResult=($iHours*3600)+($iMinutes*60)+$iSeconds;
|
$iResult=($iHours*3600)+($iMinutes*60)+$iSeconds;
|
||||||
return $iResult;
|
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 string $datefield Name of SQL field where apply sql date filter
|
||||||
* @param int $day_date day date
|
* @param int $day_date Day date
|
||||||
* @param int $month_date month date
|
* @param int $month_date Month date
|
||||||
* @param int $year_date year date
|
* @param int $year_date Year date
|
||||||
* @return string $sqldate sql part of 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;
|
global $db;
|
||||||
$sqldate="";
|
$sqldate="";
|
||||||
if ($month_date > 0) {
|
if ($month_date > 0) {
|
||||||
|
|||||||
@ -276,13 +276,13 @@ if (!empty($sall)) $sql.= natural_search(array_keys($fieldstosearchall), $sall);
|
|||||||
// Ref
|
// Ref
|
||||||
if (!empty($search_ref)) $sql.= natural_search('d.ref', $search_ref);
|
if (!empty($search_ref)) $sql.= natural_search('d.ref', $search_ref);
|
||||||
// Date Start
|
// Date Start
|
||||||
$sql.= dol_sql_datefilter(
|
$sql.= dolSqlDateFilter(
|
||||||
"d.date_debut",
|
"d.date_debut",
|
||||||
$day_start, $month_start, $year_start
|
$day_start, $month_start, $year_start
|
||||||
);
|
);
|
||||||
|
|
||||||
// Date End
|
// Date End
|
||||||
$sql.= dol_sql_datefilter(
|
$sql.= dolSqlDateFilter(
|
||||||
"d.date_fin",
|
"d.date_fin",
|
||||||
$day_end, $month_end, $year_end
|
$day_end, $month_end, $year_end
|
||||||
);
|
);
|
||||||
|
|||||||
@ -528,11 +528,11 @@ if (GETPOST('statut', 'intcomma') !== '')
|
|||||||
if ($search_status != '' && $search_status >= 0)
|
if ($search_status != '' && $search_status >= 0)
|
||||||
$sql.=" AND cf.fk_statut IN (".$db->escape($search_status).")";
|
$sql.=" AND cf.fk_statut IN (".$db->escape($search_status).")";
|
||||||
|
|
||||||
$sql.= dol_sql_datefilter(
|
$sql.= dolSqlDateFilter(
|
||||||
"cf.date_commande",
|
"cf.date_commande",
|
||||||
$search_orderday, $search_ordermonth, $search_orderyear
|
$search_orderday, $search_ordermonth, $search_orderyear
|
||||||
);
|
);
|
||||||
$sql.= dol_sql_datefilter(
|
$sql.= dolSqlDateFilter(
|
||||||
"cf.date_livraison",
|
"cf.date_livraison",
|
||||||
$search_deliveryday, $search_deliverymonth, $search_deliveryyear
|
$search_deliveryday, $search_deliverymonth, $search_deliveryyear
|
||||||
);
|
);
|
||||||
|
|||||||
@ -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_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."";
|
if ($search_paymentmode > 0) $sql .= " AND f.fk_mode_reglement = ".$search_paymentmode."";
|
||||||
|
|
||||||
$sql.= dol_sql_datefilter( "f.datef", $day, $month, $year);
|
$sql.= dolSqlDateFilter( "f.datef", $day, $month, $year);
|
||||||
$sql.= dol_sql_datefilter( "f.date_lim_reglement", $day_lim, $month_lim, $year_lim);
|
$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 ($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);
|
if ($search_label) $sql .= natural_search('f.libelle', $search_label);
|
||||||
|
|||||||
@ -191,19 +191,19 @@ if(!empty($search_ref))
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Start date
|
// Start date
|
||||||
$sql.= dol_sql_datefilter(
|
$sql.= dolSqlDateFilter(
|
||||||
"cp.date_debut",
|
"cp.date_debut",
|
||||||
$search_day_start, $search_month_start, $search_year_start
|
$search_day_start, $search_month_start, $search_year_start
|
||||||
);
|
);
|
||||||
|
|
||||||
// End date
|
// End date
|
||||||
$sql.= dol_sql_datefilter(
|
$sql.= dolSqlDateFilter(
|
||||||
"cp.date_fin",
|
"cp.date_fin",
|
||||||
$search_day_end, $search_month_end, $search_year_end
|
$search_day_end, $search_month_end, $search_year_end
|
||||||
);
|
);
|
||||||
|
|
||||||
// Create date
|
// Create date
|
||||||
$sql.= dol_sql_datefilter(
|
$sql.= dolSqlDateFilter(
|
||||||
"cp.date_create",
|
"cp.date_create",
|
||||||
$search_day_create, $search_month_create, $search_year_create
|
$search_day_create, $search_month_create, $search_year_create
|
||||||
);
|
);
|
||||||
|
|||||||
@ -290,8 +290,8 @@ if ($sall) $sql .= natural_search(array_keys($fieldstosearchall), $sall);
|
|||||||
if ($socid) $sql.= ' AND s.rowid = '.$socid;
|
if ($socid) $sql.= ' AND s.rowid = '.$socid;
|
||||||
if ($search_status >= 0 && $search_status != '') $sql.= ' AND sp.fk_statut IN ('.$db->escape($search_status).')';
|
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.= dolSqlDateFilter("sp.date_livraison", $day, $month, $year);
|
||||||
$sql.= dol_sql_datefilter("sp.date_valid", $dayvalid, $monthvalid, $yearvalid);
|
$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_sale > 0) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$search_sale;
|
||||||
if ($search_user > 0)
|
if ($search_user > 0)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user