Skip to content
Snippets Groups Projects
Commit bdead24e authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Fix bad var get

parent 081d3f08
No related branches found
No related tags found
No related merge requests found
......@@ -106,6 +106,8 @@ $arrayfields=array(
'user'=>array('label'=>$langs->trans("User"), 'checked'=>1),
'd.date_debut'=>array('label'=>$langs->trans("DateStart"), 'checked'=>1),
'd.date_fin'=>array('label'=>$langs->trans("DateEnd"), 'checked'=>1),
'd.date_valid'=>array('label'=>$langs->trans("DateValidation"), 'checked'=>1),
'd.date_approve'=>array('label'=>$langs->trans("DateApprove"), 'checked'=>1),
'd.total_ht'=>array('label'=>$langs->trans("AmountHT"), 'checked'=>1),
'd.total_vat'=>array('label'=>$langs->trans("AmountVAT"), 'checked'=>1),
'd.total_ttc'=>array('label'=>$langs->trans("AmountTTC"), 'checked'=>1),
......@@ -344,13 +346,15 @@ if ($resql)
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
print "<tr class=\"liste_titre\">";
if (! empty($arrayfields['d.ref']['checked'])) print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"d.ref","",$param,'',$sortfield,$sortorder);
if (! empty($arrayfields['user']['checked'])) print_liste_field_titre($langs->trans("User"),$_SERVER["PHP_SELF"],"u.lastname","",$param,'',$sortfield,$sortorder);
if (! empty($arrayfields['d.date_debut']['checked'])) print_liste_field_titre($langs->trans("DateStart"),$_SERVER["PHP_SELF"],"d.date_debut","",$param,'align="center"',$sortfield,$sortorder);
if (! empty($arrayfields['d.date_fin']['checked'])) print_liste_field_titre($langs->trans("DateEnd"),$_SERVER["PHP_SELF"],"d.date_fin","",$param,'align="center"',$sortfield,$sortorder);
if (! empty($arrayfields['d.total_ht']['checked'])) print_liste_field_titre($langs->trans("TotalHT"),$_SERVER["PHP_SELF"],"d.total_ht","",$param,'align="right"',$sortfield,$sortorder);
if (! empty($arrayfields['d.total_vat']['checked'])) print_liste_field_titre($langs->trans("TotalVAT"),$_SERVER["PHP_SELF"],"d.total_tva","",$param,'align="right"',$sortfield,$sortorder);
if (! empty($arrayfields['d.total_ttc']['checked'])) print_liste_field_titre($langs->trans("TotalTTC"),$_SERVER["PHP_SELF"],"d.total_ttc","",$param,'align="right"',$sortfield,$sortorder);
if (! empty($arrayfields['d.ref']['checked'])) print_liste_field_titre($arrayfields['d.ref']['label'],$_SERVER["PHP_SELF"],"d.ref","",$param,'',$sortfield,$sortorder);
if (! empty($arrayfields['user']['checked'])) print_liste_field_titre($arrayfields['user']['label'],$_SERVER["PHP_SELF"],"u.lastname","",$param,'',$sortfield,$sortorder);
if (! empty($arrayfields['d.date_debut']['checked'])) print_liste_field_titre($arrayfields['d.date_debut']['label'],$_SERVER["PHP_SELF"],"d.date_debut","",$param,'align="center"',$sortfield,$sortorder);
if (! empty($arrayfields['d.date_fin']['checked'])) print_liste_field_titre($arrayfields['d.date_fin']['label'],$_SERVER["PHP_SELF"],"d.date_fin","",$param,'align="center"',$sortfield,$sortorder);
if (! empty($arrayfields['d.date_valid']['checked'])) print_liste_field_titre($arrayfields['d.date_valid']['label'],$_SERVER["PHP_SELF"],"d.date_valid","",$param,'align="center"',$sortfield,$sortorder);
if (! empty($arrayfields['d.date_approve']['checked'])) print_liste_field_titre($arrayfields['d.date_approve']['label'],$_SERVER["PHP_SELF"],"d.date_approve","",$param,'align="center"',$sortfield,$sortorder);
if (! empty($arrayfields['d.total_ht']['checked'])) print_liste_field_titre($arrayfields['d.total_ht']['label'],$_SERVER["PHP_SELF"],"d.total_ht","",$param,'align="right"',$sortfield,$sortorder);
if (! empty($arrayfields['d.total_vat']['checked'])) print_liste_field_titre($arrayfields['d.total_vat']['label'],$_SERVER["PHP_SELF"],"d.total_tva","",$param,'align="right"',$sortfield,$sortorder);
if (! empty($arrayfields['d.total_ttc']['checked'])) print_liste_field_titre($arrayfields['d.total_ttc']['label'],$_SERVER["PHP_SELF"],"d.total_ttc","",$param,'align="right"',$sortfield,$sortorder);
// Extra fields
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
{
......@@ -409,7 +413,23 @@ if ($resql)
$formother->select_year($year_end,'year_end',1, $min_year, $max_year);
print '</td>';
}
// Amount with no tax
// Date valid
if (! empty($arrayfields['d.date_valid']['checked']))
{
print '<td class="liste_titre" align="center">';
//print '<input class="flat" type="text" size="1" maxlength="2" name="month_end" value="'.$month_end.'">';
//$formother->select_year($year_end,'year_end',1, $min_year, $max_year);
print '</td>';
}
// Date approve
if (! empty($arrayfields['d.date_approve']['checked']))
{
print '<td class="liste_titre" align="center">';
//print '<input class="flat" type="text" size="1" maxlength="2" name="month_end" value="'.$month_end.'">';
//$formother->select_year($year_end,'year_end',1, $min_year, $max_year);
print '</td>';
}
// Amount with no tax
if (! empty($arrayfields['d.total_ht']['checked']))
{
print '<td class="liste_titre" align="right"><input class="flat" type="text" size="5" name="search_amount_ht" value="'.$search_amount_ht.'"></td>';
......@@ -498,13 +518,12 @@ if ($resql)
$expensereportstatic->id=$obj->rowid;
$expensereportstatic->ref=$obj->ref;
$expensereportstatic->status=$obj->status;
$expensereportstatic->valid=$obj->date_valid;
$expensereportstatic->date_debut=$db->jdate($obj->date_debut);
$expensereportstatic->date_fin=$db->jdate($obj->date_fin);
$expensereportstatic->date_create=$db->jdate($obj->date_create);
$expensereportstatic->date_modif=$db->jdate($obj->date_modif);
$expensereportstatic->date_valid=$db->jdate($objp->date_valid);
$expensereportstatic->date_approve=$db->jdate($objp->date_approve);
$expensereportstatic->date_valid=$db->jdate($obj->date_valid);
$expensereportstatic->date_approve=$db->jdate($obj->date_approve);
$var=!$var;
print "<tr ".$bc[$var].">";
......@@ -536,7 +555,15 @@ if ($resql)
print '<td align="center">'.($obj->date_fin > 0 ? dol_print_date($obj->date_fin, 'day') : '').'</td>';
if (! $i) $totalarray['nbfield']++;
}
// Amount HT
if (! empty($arrayfields['d.date_valid']['checked'])) {
print '<td align="center">'.($obj->date_valid > 0 ? dol_print_date($obj->date_valid, 'day') : '').'</td>';
if (! $i) $totalarray['nbfield']++;
}
if (! empty($arrayfields['d.date_approve']['checked'])) {
print '<td align="center">'.($obj->date_approve > 0 ? dol_print_date($obj->date_approve, 'day') : '').'</td>';
if (! $i) $totalarray['nbfield']++;
}
// Amount HT
if (! empty($arrayfields['d.total_ht']['checked']))
{
print '<td align="right">'.price($obj->total_ht)."</td>\n";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment