Add hidden option PROJECT_LIST_SHOW_STARTDATE to show start date of
project. Increase visible length of fields.
This commit is contained in:
parent
39e4f52497
commit
f323e89919
@ -74,6 +74,9 @@ $search_sale=GETPOST('search_sale','int');
|
|||||||
$day = GETPOST('day','int');
|
$day = GETPOST('day','int');
|
||||||
$month = GETPOST('month','int');
|
$month = GETPOST('month','int');
|
||||||
$year = GETPOST('year','int');
|
$year = GETPOST('year','int');
|
||||||
|
$sday = GETPOST('sday','int');
|
||||||
|
$smonth = GETPOST('smonth','int');
|
||||||
|
$syear = GETPOST('syear','int');
|
||||||
|
|
||||||
if ($search_status == '') $search_status=-1; // -1 or 1
|
if ($search_status == '') $search_status=-1; // -1 or 1
|
||||||
|
|
||||||
@ -92,6 +95,9 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both
|
|||||||
$day="";
|
$day="";
|
||||||
$month="";
|
$month="";
|
||||||
$year="";
|
$year="";
|
||||||
|
$sday="";
|
||||||
|
$smonth="";
|
||||||
|
$syear="";
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -139,6 +145,19 @@ if ($search_societe)
|
|||||||
{
|
{
|
||||||
$sql .= natural_search('s.nom', $search_societe);
|
$sql .= natural_search('s.nom', $search_societe);
|
||||||
}
|
}
|
||||||
|
if ($smonth > 0)
|
||||||
|
{
|
||||||
|
if ($syear > 0 && empty($sday))
|
||||||
|
$sql.= " AND p.datee BETWEEN '".$db->idate(dol_get_first_day($syear,$smonth,false))."' AND '".$db->idate(dol_get_last_day($syear,$smonth,false))."'";
|
||||||
|
else if ($syear > 0 && ! empty($sday))
|
||||||
|
$sql.= " AND p.datee BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $smonth, $sday, $syear))."' AND '".$db->idate(dol_mktime(23, 59, 59, $smonth, $sday, $syear))."'";
|
||||||
|
else
|
||||||
|
$sql.= " AND date_format(p.datee, '%m') = '".$smonth."'";
|
||||||
|
}
|
||||||
|
else if ($syear > 0)
|
||||||
|
{
|
||||||
|
$sql.= " AND p.datee BETWEEN '".$db->idate(dol_get_first_day($syear,1,false))."' AND '".$db->idate(dol_get_last_day($syear,12,false))."'";
|
||||||
|
}
|
||||||
if ($month > 0)
|
if ($month > 0)
|
||||||
{
|
{
|
||||||
if ($year > 0 && empty($day))
|
if ($year > 0 && empty($day))
|
||||||
@ -235,7 +254,8 @@ if ($resql)
|
|||||||
print_liste_field_titre($langs->trans("Label"),$_SERVER["PHP_SELF"],"p.title","",$param,"",$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Label"),$_SERVER["PHP_SELF"],"p.title","",$param,"",$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("ThirdParty"),$_SERVER["PHP_SELF"],"s.nom","",$param,"",$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("ThirdParty"),$_SERVER["PHP_SELF"],"s.nom","",$param,"",$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("SalesRepresentative"),$_SERVER["PHP_SELF"],"","",$param,"",$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("SalesRepresentative"),$_SERVER["PHP_SELF"],"","",$param,"",$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("DateEnd"),$_SERVER["PHP_SELF"],"p.datee","",$param,"",$sortfield,$sortorder);
|
if (! empty($conf->global->PROJECT_LIST_SHOW_STARTDATE)) print_liste_field_titre($langs->trans("DateStart"),$_SERVER["PHP_SELF"],"p.dateo","",$param,'align="center"',$sortfield,$sortorder);
|
||||||
|
print_liste_field_titre($langs->trans("DateEnd"),$_SERVER["PHP_SELF"],"p.datee","",$param,'align="center"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Visibility"),$_SERVER["PHP_SELF"],"p.public","",$param,"",$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Visibility"),$_SERVER["PHP_SELF"],"p.public","",$param,"",$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],'p.fk_statut',"",$param,'align="right"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],'p.fk_statut',"",$param,'align="right"',$sortfield,$sortorder);
|
||||||
print '<td class="liste_titre"> </td>';
|
print '<td class="liste_titre"> </td>';
|
||||||
@ -251,9 +271,19 @@ if ($resql)
|
|||||||
print '<td class="liste_titre">';
|
print '<td class="liste_titre">';
|
||||||
print '<input type="text" class="flat" name="search_societe" value="'.$search_societe.'">';
|
print '<input type="text" class="flat" name="search_societe" value="'.$search_societe.'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
// Sale representative
|
||||||
print '<td class="liste_titre"> </td>';
|
print '<td class="liste_titre"> </td>';
|
||||||
|
// Start date
|
||||||
print '<td class="liste_titre">';
|
if (! empty($conf->global->PROJECT_LIST_SHOW_STARTDATE))
|
||||||
|
{
|
||||||
|
print '<td class="liste_titre center">';
|
||||||
|
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat" type="text" size="1" maxlength="2" name="sday" value="'.$sday.'">';
|
||||||
|
print '<input class="flat" type="text" size="1" maxlength="2" name="smonth" value="'.$smonth.'">';
|
||||||
|
$formother->select_year($syear?$syear:-1,'syear',1, 20, 5);
|
||||||
|
print '</td>';
|
||||||
|
}
|
||||||
|
// End date
|
||||||
|
print '<td class="liste_titre center">';
|
||||||
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat" type="text" size="1" maxlength="2" name="day" value="'.$day.'">';
|
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat" type="text" size="1" maxlength="2" name="day" value="'.$day.'">';
|
||||||
print '<input class="flat" type="text" size="1" maxlength="2" name="month" value="'.$month.'">';
|
print '<input class="flat" type="text" size="1" maxlength="2" name="month" value="'.$month.'">';
|
||||||
$formother->select_year($year?$year:-1,'year',1, 20, 5);
|
$formother->select_year($year?$year:-1,'year',1, 20, 5);
|
||||||
@ -294,7 +324,7 @@ if ($resql)
|
|||||||
|
|
||||||
// Title
|
// Title
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print dol_trunc($objp->title,24);
|
print dol_trunc($objp->title,80);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Company
|
// Company
|
||||||
@ -338,7 +368,7 @@ if ($resql)
|
|||||||
if ($j < $nbofsalesrepresentative) print ', ';
|
if ($j < $nbofsalesrepresentative) print ', ';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else print $langs->trans("NoSalesRepresentativeAffected");
|
//else print $langs->trans("NoSalesRepresentativeAffected");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -346,8 +376,13 @@ if ($resql)
|
|||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
|
// Date start
|
||||||
|
print '<td class="center">';
|
||||||
|
print dol_print_date($db->jdate($objp->date_start),'day');
|
||||||
|
print '</td>';
|
||||||
|
|
||||||
// Date end
|
// Date end
|
||||||
print '<td align="left">';
|
print '<td class="center">';
|
||||||
print dol_print_date($db->jdate($objp->date_end),'day');
|
print dol_print_date($db->jdate($objp->date_end),'day');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user