mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Debug reporting
This commit is contained in:
parent
35bc818fe8
commit
68afbc0d1e
|
|
@ -50,21 +50,21 @@ if (empty($year))
|
|||
$year_current = $year;
|
||||
$year_start = $year;
|
||||
}
|
||||
$date_start=dol_mktime($_REQUEST["date_starthour"],$_REQUEST["date_startmin"],$_REQUEST["date_startsec"],$_REQUEST["date_startmonth"],$_REQUEST["date_startday"],$_REQUEST["date_startyear"],1);
|
||||
$date_end=dol_mktime($_REQUEST["date_endhour"],$_REQUEST["date_endmin"],$_REQUEST["date_endsec"],$_REQUEST["date_endmonth"],$_REQUEST["date_endday"],$_REQUEST["date_endyear"],1);
|
||||
$date_start=dol_mktime(0,0,0,$_REQUEST["date_startmonth"],$_REQUEST["date_startday"],$_REQUEST["date_startyear"]); // Date for local PHP server
|
||||
$date_end=dol_mktime(23,59,59,$_REQUEST["date_endmonth"],$_REQUEST["date_endday"],$_REQUEST["date_endyear"]); // Date for local PHP server
|
||||
// Quarter
|
||||
if (empty($date_start) || empty($date_end)) // We define date_start and date_end
|
||||
{
|
||||
$q=(! empty($_REQUEST["q"]))?$_REQUEST["q"]:0;
|
||||
if ($q==0)
|
||||
{
|
||||
if (isset($_REQUEST["month"])) { $date_start=dol_get_first_day($year_start,$_REQUEST["month"]); $date_end=dol_get_last_day($year_start,$_REQUEST["month"]); }
|
||||
else { $date_start=dol_get_first_day($year_start,1); $date_end=dol_get_last_day($year_start,12); }
|
||||
if (isset($_REQUEST["month"])) { $date_start=dol_get_first_day($year_start,$_REQUEST["month"],false); $date_end=dol_get_last_day($year_start,$_REQUEST["month"],false); }
|
||||
else { $date_start=dol_get_first_day($year_start,1,false); $date_end=dol_get_last_day($year_start,12,false); }
|
||||
}
|
||||
if ($q==1) { $date_start=dol_get_first_day($year_start,1); $date_end=dol_get_last_day($year_start,3); }
|
||||
if ($q==2) { $date_start=dol_get_first_day($year_start,4); $date_end=dol_get_last_day($year_start,6); }
|
||||
if ($q==3) { $date_start=dol_get_first_day($year_start,7); $date_end=dol_get_last_day($year_start,9); }
|
||||
if ($q==4) { $date_start=dol_get_first_day($year_start,10); $date_end=dol_get_last_day($year_start,12); }
|
||||
if ($q==1) { $date_start=dol_get_first_day($year_start,1,false); $date_end=dol_get_last_day($year_start,3,false); }
|
||||
if ($q==2) { $date_start=dol_get_first_day($year_start,4,false); $date_end=dol_get_last_day($year_start,6,false); }
|
||||
if ($q==3) { $date_start=dol_get_first_day($year_start,7,false); $date_end=dol_get_last_day($year_start,9,false); }
|
||||
if ($q==4) { $date_start=dol_get_first_day($year_start,10,false); $date_end=dol_get_last_day($year_start,12,false); }
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -91,7 +91,6 @@ if ($modecompta=="CREANCES-DETTES")
|
|||
{
|
||||
$nom=$langs->trans("AnnualByCompaniesDueDebtMode");
|
||||
$nom.='<br>('.$langs->trans("SeeReportInInputOutputMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&modecompta=RECETTES-DEPENSES">','</a>').')';
|
||||
//$period=$langs->trans("Year")." ".$year;
|
||||
$period=$html->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$html->select_date($date_end,'date_end',0,0,0,'',1,0,1);
|
||||
//$periodlink='<a href="'.$_SERVER["PHP_SELF"].'?year='.($year-1).'&modecompta='.$modecompta.'">'.img_previous().'</a> <a href="'.$_SERVER["PHP_SELF"].'?year='.($year+1).'&modecompta='.$modecompta.'">'.img_next().'</a>';
|
||||
$description=$langs->trans("RulesResultDue");
|
||||
|
|
@ -101,7 +100,7 @@ if ($modecompta=="CREANCES-DETTES")
|
|||
else {
|
||||
$nom=$langs->trans("AnnualByCompaniesInputOutputMode");
|
||||
$nom.='<br>('.$langs->trans("SeeReportInDueDebtMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&modecompta=CREANCES-DETTES">','</a>').')';
|
||||
//$period=$langs->trans("Year")." ".$year;
|
||||
//$period=$html->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$html->select_date($date_end,'date_end',1,1,0,'',1,0,1);
|
||||
$period=$html->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$html->select_date($date_end,'date_end',0,0,0,'',1,0,1);
|
||||
//$periodlink='<a href="'.$_SERVER["PHP_SELF"].'?year='.($year-1).'&modecompta='.$modecompta.'">'.img_previous().'</a> <a href="'.$_SERVER["PHP_SELF"].'?year='.($year+1).'&modecompta='.$modecompta.'">'.img_next().'</a>';
|
||||
$description=$langs->trans("RulesResultInOut");
|
||||
|
|
@ -150,6 +149,21 @@ if ($socid) $sql.= " AND f.fk_soc = ".$socid;
|
|||
$sql.= " GROUP BY nom";
|
||||
$sql.= " ORDER BY nom";
|
||||
|
||||
/*
|
||||
print dol_print_date($date_end,'dayhour',true).'<br>';
|
||||
print $db->idate($date_end).'<br>';
|
||||
|
||||
print adodb_get_gmt_diff();
|
||||
print adodb_date('Y-d-m H:i',$date_end,true).'<br>';
|
||||
print adodb_date('Y-d-m H:i',$date_end,false).'<br>';
|
||||
|
||||
$date_end=0;
|
||||
print dol_print_date($date_end,'dayhour',true).'<br>';
|
||||
print $db->idate($date_end).'<br>';
|
||||
print adodb_gmstrftime('%Y-%d-%m %H:%M',$date_end).'<br>';
|
||||
print $sql;
|
||||
*/
|
||||
|
||||
$result = $db->query($sql);
|
||||
if ($result) {
|
||||
$num = $db->num_rows($result);
|
||||
|
|
|
|||
|
|
@ -54,21 +54,21 @@ if (empty($year))
|
|||
$year_current = $year;
|
||||
$year_start = $year;
|
||||
}
|
||||
$date_start=dol_mktime($_REQUEST["date_starthour"],$_REQUEST["date_startmin"],$_REQUEST["date_startsec"],$_REQUEST["date_startmonth"],$_REQUEST["date_startday"],$_REQUEST["date_startyear"],1);
|
||||
$date_end=dol_mktime($_REQUEST["date_endhour"],$_REQUEST["date_endmin"],$_REQUEST["date_endsec"],$_REQUEST["date_endmonth"],$_REQUEST["date_endday"],$_REQUEST["date_endyear"],1);
|
||||
$date_start=dol_mktime(0,0,0,$_REQUEST["date_startmonth"],$_REQUEST["date_startday"],$_REQUEST["date_startyear"]);
|
||||
$date_end=dol_mktime(23,59,59,$_REQUEST["date_endmonth"],$_REQUEST["date_endday"],$_REQUEST["date_endyear"]);
|
||||
// Quarter
|
||||
if (empty($date_start) || empty($date_end)) // We define date_start and date_end
|
||||
{
|
||||
$q=(! empty($_REQUEST["q"]))?$_REQUEST["q"]:0;
|
||||
if ($q==0)
|
||||
{
|
||||
if (isset($_REQUEST["month"])) { $date_start=dol_get_first_day($year_start,$_REQUEST["month"]); $date_end=dol_get_last_day($year_start,$_REQUEST["month"]); }
|
||||
else { $date_start=dol_get_first_day($year_start,1); $date_end=dol_get_last_day($year_start,12); }
|
||||
if (isset($_REQUEST["month"])) { $date_start=dol_get_first_day($year_start,$_REQUEST["month"],false); $date_end=dol_get_last_day($year_start,$_REQUEST["month"],false); }
|
||||
else { $date_start=dol_get_first_day($year_start,1,false); $date_end=dol_get_last_day($year_start,12,false); }
|
||||
}
|
||||
if ($q==1) { $date_start=dol_get_first_day($year_start,1); $date_end=dol_get_last_day($year_start,3); }
|
||||
if ($q==2) { $date_start=dol_get_first_day($year_start,4); $date_end=dol_get_last_day($year_start,6); }
|
||||
if ($q==3) { $date_start=dol_get_first_day($year_start,7); $date_end=dol_get_last_day($year_start,9); }
|
||||
if ($q==4) { $date_start=dol_get_first_day($year_start,10); $date_end=dol_get_last_day($year_start,12); }
|
||||
if ($q==1) { $date_start=dol_get_first_day($year_start,1,false); $date_end=dol_get_last_day($year_start,3,false); }
|
||||
if ($q==2) { $date_start=dol_get_first_day($year_start,4,false); $date_end=dol_get_last_day($year_start,6,false); }
|
||||
if ($q==3) { $date_start=dol_get_first_day($year_start,7,false); $date_end=dol_get_last_day($year_start,9,false); }
|
||||
if ($q==4) { $date_start=dol_get_first_day($year_start,10,false); $date_end=dol_get_last_day($year_start,12,false); }
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -91,7 +91,6 @@ if ($modecompta=="CREANCES-DETTES")
|
|||
{
|
||||
$nom=$langs->trans("SalesTurnover").', '.$langs->trans("ByUserAuthorOfInvoice");
|
||||
$nom.='<br>('.$langs->trans("SeeReportInInputOutputMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&modecompta=RECETTES-DEPENSES">','</a>').')';
|
||||
//$period=$langs->trans("Year")." $year";
|
||||
$period=$html->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$html->select_date($date_end,'date_end',0,0,0,'',1,0,1);
|
||||
//$periodlink="<a href='".$_SERVER["PHP_SELF"]."?year=".($year-1)."&modecompta=".$modecompta."'>".img_previous()."</a> <a href='".$_SERVER["PHP_SELF"]."?year=".($year+1)."&modecompta=".$modecompta."'>".img_next()."</a>";
|
||||
$description=$langs->trans("RulesCADue");
|
||||
|
|
@ -101,7 +100,6 @@ if ($modecompta=="CREANCES-DETTES")
|
|||
else {
|
||||
$nom=$langs->trans("SalesTurnover").', '.$langs->trans("ByUserAuthorOfInvoice");
|
||||
$nom.='<br>('.$langs->trans("SeeReportInDueDebtMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&modecompta=CREANCES-DETTES">','</a>').')';
|
||||
//$period=$langs->trans("Year")." $year";
|
||||
$period=$html->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$html->select_date($date_end,'date_end',0,0,0,'',1,0,1);
|
||||
//$periodlink="<a href='".$_SERVER["PHP_SELF"]."?year=".($year-1)."&modecompta=".$modecompta."'>".img_previous()."</a> <a href='".$_SERVER["PHP_SELF"]."?year=".($year+1)."&modecompta=".$modecompta."'>".img_next()."</a>";
|
||||
$description=$langs->trans("RulesCAIn");
|
||||
|
|
|
|||
|
|
@ -57,21 +57,21 @@ if (empty($year))
|
|||
$year_current = $year;
|
||||
$year_start = $year;
|
||||
}
|
||||
$date_start=dol_mktime($_REQUEST["date_starthour"],$_REQUEST["date_startmin"],$_REQUEST["date_startsec"],$_REQUEST["date_startmonth"],$_REQUEST["date_startday"],$_REQUEST["date_startyear"],1);
|
||||
$date_end=dol_mktime($_REQUEST["date_endhour"],$_REQUEST["date_endmin"],$_REQUEST["date_endsec"],$_REQUEST["date_endmonth"],$_REQUEST["date_endday"],$_REQUEST["date_endyear"],1);
|
||||
$date_start=dol_mktime(0,0,0,$_REQUEST["date_startmonth"],$_REQUEST["date_startday"],$_REQUEST["date_startyear"]);
|
||||
$date_end=dol_mktime(23,59,59,$_REQUEST["date_endmonth"],$_REQUEST["date_endday"],$_REQUEST["date_endyear"]);
|
||||
// Quarter
|
||||
if (empty($date_start) || empty($date_end)) // We define date_start and date_end
|
||||
{
|
||||
$q=(! empty($_REQUEST["q"]))?$_REQUEST["q"]:0;
|
||||
if ($q==0)
|
||||
{
|
||||
if (isset($_REQUEST["month"])) { $date_start=dol_get_first_day($year_start,$_REQUEST["month"]); $date_end=dol_get_last_day($year_start,$_REQUEST["month"]); }
|
||||
else { $date_start=dol_get_first_day($year_start,1); $date_end=dol_get_last_day($year_start,12); }
|
||||
if (isset($_REQUEST["month"])) { $date_start=dol_get_first_day($year_start,$_REQUEST["month"],false); $date_end=dol_get_last_day($year_start,$_REQUEST["month"],false); }
|
||||
else { $date_start=dol_get_first_day($year_start,1,false); $date_end=dol_get_last_day($year_start,12,false); }
|
||||
}
|
||||
if ($q==1) { $date_start=dol_get_first_day($year_start,1); $date_end=dol_get_last_day($year_start,3); }
|
||||
if ($q==2) { $date_start=dol_get_first_day($year_start,4); $date_end=dol_get_last_day($year_start,6); }
|
||||
if ($q==3) { $date_start=dol_get_first_day($year_start,7); $date_end=dol_get_last_day($year_start,9); }
|
||||
if ($q==4) { $date_start=dol_get_first_day($year_start,10); $date_end=dol_get_last_day($year_start,12); }
|
||||
if ($q==1) { $date_start=dol_get_first_day($year_start,1,false); $date_end=dol_get_last_day($year_start,3,false); }
|
||||
if ($q==2) { $date_start=dol_get_first_day($year_start,4,false); $date_end=dol_get_last_day($year_start,6,false); }
|
||||
if ($q==3) { $date_start=dol_get_first_day($year_start,7,false); $date_end=dol_get_last_day($year_start,9,false); }
|
||||
if ($q==4) { $date_start=dol_get_first_day($year_start,10,false); $date_end=dol_get_last_day($year_start,12,false); }
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -94,7 +94,6 @@ if ($modecompta=="CREANCES-DETTES")
|
|||
{
|
||||
$nom=$langs->trans("SalesTurnover").', '.$langs->trans("ByThirdParties");
|
||||
$nom.='<br>('.$langs->trans("SeeReportInInputOutputMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&modecompta=RECETTES-DEPENSES">','</a>').')';
|
||||
//$period=$langs->trans("Year")." ".$year;
|
||||
$period=$html->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$html->select_date($date_end,'date_end',0,0,0,'',1,0,1);
|
||||
//$periodlink='<a href="'.$_SERVER["PHP_SELF"].'?year='.($year-1).'&modecompta='.$modecompta.'">'.img_previous().'</a> <a href="'.$_SERVER["PHP_SELF"].'?year='.($year+1).'&modecompta='.$modecompta.'">'.img_next().'</a>';
|
||||
$description=$langs->trans("RulesCADue");
|
||||
|
|
@ -104,7 +103,6 @@ if ($modecompta=="CREANCES-DETTES")
|
|||
else {
|
||||
$nom=$langs->trans("SalesTurnover").', '.$langs->trans("ByThirdParties");
|
||||
$nom.='<br>('.$langs->trans("SeeReportInDueDebtMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&modecompta=CREANCES-DETTES">','</a>').')';
|
||||
//$period=$langs->trans("Year")." ".$year;
|
||||
$period=$html->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$html->select_date($date_end,'date_end',0,0,0,'',1,0,1);
|
||||
//$periodlink='<a href="'.$_SERVER["PHP_SELF"].'?year='.($year-1).'&modecompta='.$modecompta.'">'.img_previous().'</a> <a href="'.$_SERVER["PHP_SELF"].'?year='.($year+1).'&modecompta='.$modecompta.'">'.img_next().'</a>';
|
||||
$description=$langs->trans("RulesCAIn");
|
||||
|
|
|
|||
|
|
@ -47,21 +47,21 @@ if (empty($year))
|
|||
$year_current = $year;
|
||||
$year_start = $year;
|
||||
}
|
||||
$date_start=dol_mktime($_REQUEST["date_starthour"],$_REQUEST["date_startmin"],$_REQUEST["date_startsec"],$_REQUEST["date_startmonth"],$_REQUEST["date_startday"],$_REQUEST["date_startyear"],1);
|
||||
$date_end=dol_mktime($_REQUEST["date_endhour"],$_REQUEST["date_endmin"],$_REQUEST["date_endsec"],$_REQUEST["date_endmonth"],$_REQUEST["date_endday"],$_REQUEST["date_endyear"],1);
|
||||
$date_start=dol_mktime(0,0,0,$_REQUEST["date_startmonth"],$_REQUEST["date_startday"],$_REQUEST["date_startyear"]);
|
||||
$date_end=dol_mktime(23,59,59,$_REQUEST["date_endmonth"],$_REQUEST["date_endday"],$_REQUEST["date_endyear"]);
|
||||
// Quarter
|
||||
if (empty($date_start) || empty($date_end)) // We define date_start and date_end
|
||||
{
|
||||
$q=(! empty($_REQUEST["q"]))?$_REQUEST["q"]:0;
|
||||
if ($q==0)
|
||||
{
|
||||
if (isset($_REQUEST["month"])) { $date_start=dol_get_first_day($year_start,$_REQUEST["month"]); $date_end=dol_get_last_day($year_start,$_REQUEST["month"]); }
|
||||
if (isset($_REQUEST["month"])) { $date_start=dol_get_first_day($year_start,$_REQUEST["month"],false); $date_end=dol_get_last_day($year_start,$_REQUEST["month"],false); }
|
||||
else $q=1;
|
||||
}
|
||||
if ($q==1) { $date_start=dol_get_first_day($year_start,1); $date_end=dol_get_last_day($year_start,3); }
|
||||
if ($q==2) { $date_start=dol_get_first_day($year_start,4); $date_end=dol_get_last_day($year_start,6); }
|
||||
if ($q==3) { $date_start=dol_get_first_day($year_start,7); $date_end=dol_get_last_day($year_start,9); }
|
||||
if ($q==4) { $date_start=dol_get_first_day($year_start,10); $date_end=dol_get_last_day($year_start,12); }
|
||||
if ($q==1) { $date_start=dol_get_first_day($year_start,1,false); $date_end=dol_get_last_day($year_start,3,false); }
|
||||
if ($q==2) { $date_start=dol_get_first_day($year_start,4,false); $date_end=dol_get_last_day($year_start,6,false); }
|
||||
if ($q==3) { $date_start=dol_get_first_day($year_start,7,false); $date_end=dol_get_last_day($year_start,9,false); }
|
||||
if ($q==4) { $date_start=dol_get_first_day($year_start,10,false); $date_end=dol_get_last_day($year_start,12,false); }
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -53,21 +53,21 @@ if (empty($year))
|
|||
$year_current = $year;
|
||||
$year_start = $year;
|
||||
}
|
||||
$date_start=dol_mktime($_REQUEST["date_starthour"],$_REQUEST["date_startmin"],$_REQUEST["date_startsec"],$_REQUEST["date_startmonth"],$_REQUEST["date_startday"],$_REQUEST["date_startyear"],1);
|
||||
$date_end=dol_mktime($_REQUEST["date_endhour"],$_REQUEST["date_endmin"],$_REQUEST["date_endsec"],$_REQUEST["date_endmonth"],$_REQUEST["date_endday"],$_REQUEST["date_endyear"],1);
|
||||
$date_start=dol_mktime(0,0,0,$_REQUEST["date_startmonth"],$_REQUEST["date_startday"],$_REQUEST["date_startyear"]);
|
||||
$date_end=dol_mktime(23,59,59,$_REQUEST["date_endmonth"],$_REQUEST["date_endday"],$_REQUEST["date_endyear"]);
|
||||
// Quarter
|
||||
if (empty($date_start) || empty($date_end)) // We define date_start and date_end
|
||||
{
|
||||
$q=(! empty($_REQUEST["q"]))?$_REQUEST["q"]:0;
|
||||
if ($q==0)
|
||||
{
|
||||
if (isset($_REQUEST["month"])) { $date_start=dol_get_first_day($year_start,$_REQUEST["month"]); $date_end=dol_get_last_day($year_start,$_REQUEST["month"]); }
|
||||
if (isset($_REQUEST["month"])) { $date_start=dol_get_first_day($year_start,$_REQUEST["month"],false); $date_end=dol_get_last_day($year_start,$_REQUEST["month"],false); }
|
||||
else $q=1;
|
||||
}
|
||||
if ($q==1) { $date_start=dol_get_first_day($year_start,1); $date_end=dol_get_last_day($year_start,3); }
|
||||
if ($q==2) { $date_start=dol_get_first_day($year_start,4); $date_end=dol_get_last_day($year_start,6); }
|
||||
if ($q==3) { $date_start=dol_get_first_day($year_start,7); $date_end=dol_get_last_day($year_start,9); }
|
||||
if ($q==4) { $date_start=dol_get_first_day($year_start,10); $date_end=dol_get_last_day($year_start,12); }
|
||||
if ($q==1) { $date_start=dol_get_first_day($year_start,1,false); $date_end=dol_get_last_day($year_start,3,false); }
|
||||
if ($q==2) { $date_start=dol_get_first_day($year_start,4,false); $date_end=dol_get_last_day($year_start,6,false); }
|
||||
if ($q==3) { $date_start=dol_get_first_day($year_start,7,false); $date_end=dol_get_last_day($year_start,9,false); }
|
||||
if ($q==4) { $date_start=dol_get_first_day($year_start,10,false); $date_end=dol_get_last_day($year_start,12,false); }
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -118,8 +118,6 @@ $fsearch.=' <input type="hidden" name="modetax" value="'.$modetax.'">';
|
|||
if ($modetax==1) // Calculate on invoice for goods and services
|
||||
{
|
||||
$nom=$langs->trans("VATReportByQuartersInDueDebtMode");
|
||||
//$nom.='<br>('.$langs->trans("SeeVATReportInInputOutputMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year_start.'&q='.$q.'&modetax=0">','</a>').')';
|
||||
//$period=$year_start.' - '.$langs->trans("Quadri")." $q (".dol_print_date(dol_mktime(12,0,0,(($q-1)*3)+1,1,$year_start),"%b %Y").' - '.dol_print_date(dol_mktime(12,0,0,($q*3),1,$year_start),"%b %Y").")";
|
||||
$period=$html->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$html->select_date($date_end,'date_end',0,0,0,'',1,0,1);
|
||||
$prevyear=$year_start; $prevquarter=$q;
|
||||
if ($prevquarter > 1) $prevquarter--;
|
||||
|
|
@ -149,8 +147,6 @@ if ($modetax==1) // Calculate on invoice for goods and services
|
|||
if ($modetax==0) // Invoice for goods, payment for services
|
||||
{
|
||||
$nom=$langs->trans("VATReportByQuartersInInputOutputMode");
|
||||
//$nom.='<br>('.$langs->trans("SeeVATReportInDueDebtMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year_start.'&q='.$q.'&modetax=1">','</a>').')';
|
||||
//$period=$year_start.' - '.$langs->trans("Quadri")." $q (".dol_print_date(dol_mktime(12,0,0,(($q-1)*3)+1,1,$year_start),"%b %Y").' - '.dol_print_date(dol_mktime(12,0,0,($q*3),1,$year_start),"%b %Y").")";
|
||||
$period=$html->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$html->select_date($date_end,'date_end',0,0,0,'',1,0,1);
|
||||
$prevyear=$year_start; $prevquarter=$q;
|
||||
if ($prevquarter > 1) $prevquarter--;
|
||||
|
|
|
|||
|
|
@ -2251,10 +2251,10 @@ class Form
|
|||
* Affiche zone de selection de date
|
||||
* Liste deroulante pour les jours, mois, annee et eventuellement heurs et minutes
|
||||
* Les champs sont pre-selectionnes avec:
|
||||
* - La date set_time (timestamps ou date au format YYYY-MM-DD ou YYYY-MM-DD HH:MM)
|
||||
* - La date du jour si set_time vaut ''
|
||||
* - La date set_time (Local PHP server timestamps ou date au format YYYY-MM-DD ou YYYY-MM-DD HH:MM)
|
||||
* - La date local du server PHP si set_time vaut ''
|
||||
* - Aucune date (champs vides) si set_time vaut -1 (dans ce cas empty doit valoir 1)
|
||||
* @param set_time Date de pre-selection
|
||||
* @param set_time Pre-selected date (must be a local PHP server timestamp)
|
||||
* @param prefix Prefix pour nom champ
|
||||
* @param h 1=Affiche aussi les heures
|
||||
* @param m 1=Affiche aussi les minutes
|
||||
|
|
@ -2291,11 +2291,11 @@ class Form
|
|||
elseif (strval($set_time) != '' && $set_time != -1)
|
||||
{
|
||||
// set_time est un timestamps (0 possible)
|
||||
$syear = dol_print_date($set_time, "%Y", true);
|
||||
$smonth = dol_print_date($set_time, "%m", true);
|
||||
$sday = dol_print_date($set_time, "%d", true);
|
||||
$shour = dol_print_date($set_time, "%H", true);
|
||||
$smin = dol_print_date($set_time, "%m", true);
|
||||
$syear = dol_print_date($set_time, "%Y");
|
||||
$smonth = dol_print_date($set_time, "%m");
|
||||
$sday = dol_print_date($set_time, "%d");
|
||||
$shour = dol_print_date($set_time, "%H");
|
||||
$smin = dol_print_date($set_time, "%M");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -2402,16 +2402,16 @@ class Form
|
|||
$retstring.='<option value="0" selected="true"> </option>';
|
||||
}
|
||||
|
||||
// Mois
|
||||
// Month
|
||||
for ($month = 1 ; $month <= 12 ; $month++)
|
||||
{
|
||||
$retstring.='<option value="'.$month.'"'.($month == $smonth?' selected="true"':'').'>';
|
||||
$retstring.=dol_print_date(mktime(1,1,1,$month,1,2000),"%b");
|
||||
$retstring.=dol_print_date(mktime(12,0,0,$month,1,2000),"%b");
|
||||
$retstring.="</option>";
|
||||
}
|
||||
$retstring.="</select>";
|
||||
|
||||
// Ann<EFBFBD>e
|
||||
// Year
|
||||
if ($empty || $set_time == -1)
|
||||
{
|
||||
$retstring.='<input class="flat" type="text" size="3" maxlength="4" name="'.$prefix.'year" value="'.$syear.'">';
|
||||
|
|
|
|||
|
|
@ -711,13 +711,13 @@ class DoliDb
|
|||
function encrypt($fieldorvalue, $withQuotes=0)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
|
||||
// Type of encryption (2: AES (recommended), 1: DES , 0: no encryption)
|
||||
$cryptType = ($conf->db->dolibarr_main_db_encryption?$conf->db->dolibarr_main_db_encryption:0);
|
||||
|
||||
|
||||
//Encryption key
|
||||
$cryptKey = (!empty($conf->db->dolibarr_main_db_cryptkey)?$conf->db->dolibarr_main_db_cryptkey:'');
|
||||
|
||||
|
||||
$return = $fieldorvalue;
|
||||
return ($withQuotes?"'":"").$return.($withQuotes?"'":"");
|
||||
}
|
||||
|
|
@ -730,13 +730,13 @@ class DoliDb
|
|||
function decrypt($value)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
|
||||
// Type of encryption (2: AES (recommended), 1: DES , 0: no encryption)
|
||||
$cryptType = ($conf->db->dolibarr_main_db_encryption?$conf->db->dolibarr_main_db_encryption:0);
|
||||
|
||||
|
||||
//Encryption key
|
||||
$cryptKey = (!empty($conf->db->dolibarr_main_db_cryptkey)?$conf->db->dolibarr_main_db_cryptkey:'');
|
||||
|
||||
|
||||
$return = $value;
|
||||
return $return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -805,13 +805,13 @@ class DoliDb
|
|||
function encrypt($fieldorvalue, $withQuotes=0)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
|
||||
// Type of encryption (2: AES (recommended), 1: DES , 0: no encryption)
|
||||
$cryptType = ($conf->db->dolibarr_main_db_encryption?$conf->db->dolibarr_main_db_encryption:0);
|
||||
|
||||
|
||||
//Encryption key
|
||||
$cryptKey = (!empty($conf->db->dolibarr_main_db_cryptkey)?$conf->db->dolibarr_main_db_cryptkey:'');
|
||||
|
||||
|
||||
$return = $fieldorvalue;
|
||||
return ($withQuotes?"'":"").$return.($withQuotes?"'":"");
|
||||
}
|
||||
|
|
@ -825,13 +825,13 @@ class DoliDb
|
|||
function decrypt($value)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
|
||||
// Type of encryption (2: AES (recommended), 1: DES , 0: no encryption)
|
||||
$cryptType = ($conf->db->dolibarr_main_db_encryption?$conf->db->dolibarr_main_db_encryption:0);
|
||||
|
||||
|
||||
//Encryption key
|
||||
$cryptKey = (!empty($conf->db->dolibarr_main_db_cryptkey)?$conf->db->dolibarr_main_db_cryptkey:'');
|
||||
|
||||
|
||||
$return = $value;
|
||||
return $return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -125,23 +125,23 @@ function dol_get_next_month($month, $year)
|
|||
}
|
||||
|
||||
|
||||
/** \brief Return GMT time with international string format for first day of a month or year
|
||||
/** \brief Return GMT time for first day of a month or year
|
||||
* \param year Year
|
||||
* \param month Month
|
||||
* \return Timestamp Date for first day
|
||||
*/
|
||||
function dol_get_first_day($year,$month=1)
|
||||
function dol_get_first_day($year,$month=1,$gm=true)
|
||||
{
|
||||
return dol_mktime(0,0,0,$month,1,$year,1);
|
||||
return dol_mktime(0,0,0,$month,1,$year,$gm);
|
||||
}
|
||||
|
||||
|
||||
/** \brief Return GMT time with international string format for last day of a month or year
|
||||
/** \brief Return GMT time for last day of a month or year
|
||||
* \param year Year
|
||||
* \param month Month
|
||||
* \return Timestamp Date for first day
|
||||
*/
|
||||
function dol_get_last_day($year,$month=12)
|
||||
function dol_get_last_day($year,$month=12,$gm=true)
|
||||
{
|
||||
if ($month == 12)
|
||||
{
|
||||
|
|
@ -154,7 +154,7 @@ function dol_get_last_day($year,$month=12)
|
|||
}
|
||||
|
||||
// On se deplace au debut du mois suivant, et on retire un jour
|
||||
$datelim=dol_mktime(23,59,59,$month,1,$year,1);
|
||||
$datelim=dol_mktime(23,59,59,$month,1,$year,$gm);
|
||||
$datelim -= (3600 * 24);
|
||||
|
||||
return $datelim;
|
||||
|
|
|
|||
|
|
@ -405,7 +405,7 @@ function dolibarr_print_date($time,$format='',$to_gmt=false,$outputlangs='',$enc
|
|||
/**
|
||||
* \brief Output date in a string format according to outputlangs (or langs if not defined).
|
||||
* Return charset is always UTF-8, except if encodetoouput is defined. In this cas charset is output charset.
|
||||
* \param time GM Timestamps date (or 'YYYY-MM-DD' or 'YYYY-MM-DD HH:MM:SS' in server TZ)
|
||||
* \param time GM Timestamps date (or 'YYYY-MM-DD' or 'YYYY-MM-DD HH:MM:SS')
|
||||
* \param format Output date format
|
||||
* "%d %b %Y",
|
||||
* "%d/%m/%Y %H:%M",
|
||||
|
|
@ -466,7 +466,7 @@ function dol_print_date($time,$format='',$to_gmt=false,$outputlangs='',$encodeto
|
|||
$smin = $reg[5];
|
||||
$ssec = $reg[6];
|
||||
|
||||
$time=dol_mktime($shour,$smin,$ssec,$smonth,$sday,$syear);
|
||||
$time=dol_mktime($shour,$smin,$ssec,$smonth,$sday,$syear,true);
|
||||
$ret=adodb_strftime($format,$time,$to_gmt);
|
||||
}
|
||||
else
|
||||
|
|
@ -598,13 +598,13 @@ function dol_getdate($timestamp,$fast=false)
|
|||
}
|
||||
|
||||
/* For backward compatibility */
|
||||
function dolibarr_mktime($hour,$minute,$second,$month,$day,$year,$gm=0,$check=1)
|
||||
function dolibarr_mktime($hour,$minute,$second,$month,$day,$year,$gm=false,$check=1)
|
||||
{
|
||||
return dol_mktime($hour,$minute,$second,$month,$day,$year,$gm,$check);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a GMT date built from detailed informations
|
||||
* Return a timestamp date built from detailed informations (by default a local PHP server timestamp)
|
||||
* Replace function mktime not available under Windows if year < 1970
|
||||
* PHP mktime is restricted to the years 1901-2038 on Unix and 1970-2038 on Windows
|
||||
* @param hour Hour (can be -1 for undefined)
|
||||
|
|
@ -613,12 +613,12 @@ function dolibarr_mktime($hour,$minute,$second,$month,$day,$year,$gm=0,$check=1)
|
|||
* @param month Month
|
||||
* @param day Day
|
||||
* @param year Year
|
||||
* @param gm 1=Input informations are GMT values, otherwise local to user
|
||||
* @param gm 1=Input informations are GMT values, otherwise local to server TZ
|
||||
* @param check 0=No check on parameters (Can use day 32, etc...)
|
||||
* @return timestamp Date en timestamp, '' if error
|
||||
* @see dol_date, dol_stringtotime
|
||||
*/
|
||||
function dol_mktime($hour,$minute,$second,$month,$day,$year,$gm=0,$check=1)
|
||||
function dol_mktime($hour,$minute,$second,$month,$day,$year,$gm=false,$check=1)
|
||||
{
|
||||
//print "- ".$hour.",".$minute.",".$second.",".$month.",".$day.",".$year.",".$_SERVER["WINDIR"]." -";
|
||||
|
||||
|
|
@ -664,7 +664,7 @@ function dol_mktime($hour,$minute,$second,$month,$day,$year,$gm=0,$check=1)
|
|||
|
||||
|
||||
/* For backward compatibility */
|
||||
function dolibarr_date($fmt, $timestamp, $gm=0)
|
||||
function dolibarr_date($fmt, $timestamp, $gm=false)
|
||||
{
|
||||
return dol_date($fmt, $timestamp, $gm);
|
||||
}
|
||||
|
|
@ -677,7 +677,7 @@ function dolibarr_date($fmt, $timestamp, $gm=0)
|
|||
* \return string Formated date
|
||||
* \see dol_mktime, dol_stringtotime
|
||||
*/
|
||||
function dol_date($fmt, $timestamp, $gm=0)
|
||||
function dol_date($fmt, $timestamp, $gm=false)
|
||||
{
|
||||
$usealternatemethod=false;
|
||||
if ($timestamp <= 0) $usealternatemethod=true;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user