Skip to content

Commit

Permalink
Fix regression on hamburger picto
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Apr 6, 2020
1 parent abe6e97 commit ff1b3db
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 8 deletions.
2 changes: 1 addition & 1 deletion htdocs/comm/action/card.php
Expand Up @@ -1580,7 +1580,7 @@ function init_repeat()

$linkback='';
// Link to other agenda views
$linkback.=img_picto($langs->trans("BackToList"), 'object_list', 'class="hideonsmartphone pictoactionview"');
$linkback.=img_picto($langs->trans("BackToList"), 'object_list-alt', 'class="hideonsmartphone pictoactionview"');
$linkback.='<a href="'.DOL_URL_ROOT.'/comm/action/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
$linkback.='</li>';
$linkback.='<li class="noborder litext">';
Expand Down
45 changes: 41 additions & 4 deletions htdocs/compta/facture/list.php
Expand Up @@ -107,6 +107,8 @@
$search_sale = GETPOST('search_sale', 'int');
$search_date_start = dol_mktime(0, 0, 0, GETPOST('search_date_startmonth', 'int'), GETPOST('search_date_startday', 'int'), GETPOST('search_date_startyear', 'int'));
$search_date_end = dol_mktime(23, 59, 59, GETPOST('search_date_endmonth', 'int'), GETPOST('search_date_endday', 'int'), GETPOST('search_date_endyear', 'int'));
$search_date_valid_start = dol_mktime(0, 0, 0, GETPOST('search_date_valid_startmonth', 'int'), GETPOST('search_date_valid_startday', 'int'), GETPOST('search_date_valid_startyear', 'int'));
$search_date_valid_end = dol_mktime(23, 59, 59, GETPOST('search_date_valid_endmonth', 'int'), GETPOST('search_date_valid_endday', 'int'), GETPOST('search_date_valid_endyear', 'int'));
$search_datelimit_start = dol_mktime(0, 0, 0, GETPOST('search_datelimit_startmonth', 'int'), GETPOST('search_datelimit_startday', 'int'), GETPOST('search_datelimit_startyear', 'int'));
$search_datelimit_end = dol_mktime(23, 59, 59, GETPOST('search_datelimit_endmonth', 'int'), GETPOST('search_datelimit_endday', 'int'), GETPOST('search_datelimit_endyear', 'int'));
$search_categ_cus = trim(GETPOST("search_categ_cus", 'int'));
Expand Down Expand Up @@ -168,6 +170,7 @@
'f.ref_client'=>array('label'=>"RefCustomer", 'checked'=>1, 'position'=>10),
'f.type'=>array('label'=>"Type", 'checked'=>0, 'position'=>15),
'f.date'=>array('label'=>"DateInvoice", 'checked'=>1, 'position'=>20),
'f.date_valid'=>array('label'=>"DateValidation", 'checked'=>0, 'position'=>22),
'f.date_lim_reglement'=>array('label'=>"DateDue", 'checked'=>1, 'position'=>25),
'f.date_closing'=>array('label'=>"DateClosing", 'checked'=>0, 'position'=>30),
'p.ref'=>array('label'=>"ProjectRef", 'checked'=>1, 'enabled'=>(empty($conf->projet->enabled) ? 0 : 1), 'position'=>40),
Expand Down Expand Up @@ -269,6 +272,8 @@
$search_type_thirdparty = '';
$search_date_start = '';
$search_date_end = '';
$search_date_valid_start = '';
$search_date_valid_end = '';
$search_datelimit_start = '';
$search_datelimit_end = '';
$option = '';
Expand Down Expand Up @@ -405,7 +410,7 @@
$sql .= ' f.localtax1 as total_localtax1, f.localtax2 as total_localtax2,';
$sql .= ' f.fk_user_author,';
$sql .= ' f.fk_multicurrency, f.multicurrency_code, f.multicurrency_tx, f.multicurrency_total_ht, f.multicurrency_total_tva as multicurrency_total_vat, f.multicurrency_total_ttc,';
$sql .= ' f.datef as df, f.date_lim_reglement as datelimite, f.module_source, f.pos_source,';
$sql .= ' f.datef as df, f.date_valid, f.date_lim_reglement as datelimite, f.module_source, f.pos_source,';
$sql .= ' f.paye as paye, f.fk_statut, f.close_code,';
$sql .= ' f.datec as date_creation, f.tms as date_update, f.date_closing as date_closing,';
$sql .= ' f.retained_warranty, f.retained_warranty_date_limit, f.situation_final, f.situation_cycle_ref, f.situation_counter,';
Expand Down Expand Up @@ -512,6 +517,8 @@
if ($search_pos_source) $sql .= natural_search("f.pos_source", $search_pos_source);
if ($search_date_start) $sql .= " AND f.datef >= '".$db->idate($search_date_start)."'";
if ($search_date_end) $sql .= " AND f.datef <= '".$db->idate($search_date_end)."'";
if ($search_date_valid_start) $sql .= " AND f.date_valid >= '".$db->idate($search_date_valid_start)."'";
if ($search_date_valid_end) $sql .= " AND f.date_valid <= '".$db->idate($search_date_valid_end)."'";
if ($search_datelimit_start) $sql .= " AND f.date_lim_reglement >= '".$db->idate($search_datelimit_start)."'";
if ($search_datelimit_end) $sql .= " AND f.date_lim_reglement <= '".$db->idate($search_datelimit_end)."'";
if ($option == 'late') $sql .= " AND f.date_lim_reglement < '".$db->idate(dol_now() - $conf->facture->client->warning_delay)."'";
Expand All @@ -531,7 +538,7 @@
{
$sql .= ' GROUP BY f.rowid, f.ref, ref_client, f.type, f.note_private, f.note_public, f.increment, f.fk_mode_reglement, f.fk_cond_reglement, f.total, f.tva, f.total_ttc,';
$sql .= ' f.localtax1, f.localtax2,';
$sql .= ' f.datef, f.date_lim_reglement, f.module_source, f.pos_source,';
$sql .= ' f.datef, f.date_valid, f.date_lim_reglement, f.module_source, f.pos_source,';
$sql .= ' f.paye, f.fk_statut, f.close_code,';
$sql .= ' f.datec, f.tms, f.date_closing,';
$sql .= ' f.retained_warranty, f.retained_warranty_date_limit, f.situation_final, f.situation_cycle_ref, f.situation_counter,';
Expand Down Expand Up @@ -603,6 +610,8 @@
if ($sall) $param .= '&sall='.urlencode($sall);
if ($search_date_start) $param .= '&search_date_start='.urlencode($search_date_start);
if ($search_date_end) $param .= '&search_date_end='.urlencode($search_date_end);
if ($search_date_valid_start) $param .= '&search_date_valid_start='.urlencode($search_date_valid_start);
if ($search_date_valid_end) $param .= '&search_date_valid_end='.urlencode($search_date_valid_end);
if ($search_datelimit_start) $param .= '&search_datelimit_start='.urlencode($search_datelimit_start);
if ($search_datelimit_end) $param .= '&search_datelimit_end='.urlencode($search_datelimit_end);
if ($search_ref) $param .= '&search_ref='.urlencode($search_ref);
Expand Down Expand Up @@ -797,6 +806,20 @@
print '</div>';
print '</td>';
}
// Date valid
if (!empty($arrayfields['f.date_valid']['checked']))
{
print '<td class="liste_titre center">';
print '<div class="nowrap">';
print $langs->trans('From').' ';
print $form->selectDate($search_date_valid_start ? $search_date_valid_start : -1, 'search_date_valid_start', 0, 0, 1);
print '</div>';
print '<div class="nowrap">';
print $langs->trans('to').' ';
print $form->selectDate($search_date_valid_end ? $search_date_valid_end : -1, 'search_date_valid_end', 0, 0, 1);
print '</div>';
print '</td>';
}
// Date due
if (!empty($arrayfields['f.date_lim_reglement']['checked']))
{
Expand Down Expand Up @@ -1026,6 +1049,7 @@
if (!empty($arrayfields['f.ref_client']['checked'])) print_liste_field_titre($arrayfields['f.ref_client']['label'], $_SERVER["PHP_SELF"], 'f.ref_client', '', $param, '', $sortfield, $sortorder);
if (!empty($arrayfields['f.type']['checked'])) print_liste_field_titre($arrayfields['f.type']['label'], $_SERVER["PHP_SELF"], 'f.type', '', $param, '', $sortfield, $sortorder);
if (!empty($arrayfields['f.date']['checked'])) print_liste_field_titre($arrayfields['f.date']['label'], $_SERVER['PHP_SELF'], 'f.datef', '', $param, 'align="center"', $sortfield, $sortorder);
if (!empty($arrayfields['f.date_valid']['checked'])) print_liste_field_titre($arrayfields['f.date_valid']['label'], $_SERVER['PHP_SELF'], 'f.date_valid', '', $param, 'align="center"', $sortfield, $sortorder);
if (!empty($arrayfields['f.date_lim_reglement']['checked'])) print_liste_field_titre($arrayfields['f.date_lim_reglement']['label'], $_SERVER['PHP_SELF'], "f.date_lim_reglement", '', $param, 'align="center"', $sortfield, $sortorder);
if (!empty($arrayfields['p.ref']['checked'])) print_liste_field_titre($arrayfields['p.ref']['label'], $_SERVER['PHP_SELF'], "p.ref", '', $param, '', $sortfield, $sortorder);
if (!empty($arrayfields['p.title']['checked'])) print_liste_field_titre($arrayfields['p.title']['label'], $_SERVER['PHP_SELF'], "p.title", '', $param, '', $sortfield, $sortorder);
Expand Down Expand Up @@ -1099,8 +1123,12 @@
$facturestatic->total_ttc = $obj->total_ttc;
$facturestatic->paye = $obj->paye;
$facturestatic->fk_soc = $obj->fk_soc;
$facturestatic->date_lim_reglement = $db->jdate($obj->datelimite);
$facturestatic->note_public = $obj->note_public;

$facturestatic->date = $db->jdate($obj->df);
$facturestatic->date_valid = $db->jdate($obj->date_valid);
$facturestatic->date_lim_reglement = $db->jdate($obj->datelimite);

$facturestatic->note_public = $obj->note_public;
$facturestatic->note_private = $obj->note_private;
if ($conf->global->INVOICE_USE_SITUATION && $conf->global->INVOICE_USE_SITUATION_RETAINED_WARRANTY)
{
Expand Down Expand Up @@ -1213,6 +1241,15 @@
if (!$i) $totalarray['nbfield']++;
}

// Date
if (!empty($arrayfields['f.date_valid']['checked']))
{
print '<td align="center" class="nowrap">';
print dol_print_date($db->jdate($obj->date_valid), 'day');
print '</td>';
if (!$i) $totalarray['nbfield']++;
}

// Date limit
if (!empty($arrayfields['f.date_lim_reglement']['checked']))
{
Expand Down
6 changes: 3 additions & 3 deletions htdocs/core/lib/functions.lib.php
Expand Up @@ -3135,7 +3135,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
'object_accounting', 'object_category', 'address', 'barcode', 'bank', 'bookmark', 'building', 'cash-register', 'check', 'close_title', 'cubes', 'delete', 'dolly', 'edit', 'ellipsis-h',
'filter', 'file-code', 'folder', 'folder-open', 'grip', 'grip_title', 'language', 'list', 'listlight', 'note',
'object_barcode', 'object_phoning', 'object_phoning_fax', 'object_email',
'object_bookmark', 'object_generic', 'object_list', 'object_calendar', 'object_calendarweek', 'object_calendarmonth', 'object_calendarday', 'object_calendarperuser',
'object_bookmark', 'object_generic', 'object_list-alt', 'object_calendar', 'object_calendarweek', 'object_calendarmonth', 'object_calendarday', 'object_calendarperuser',
'object_cash-register', 'object_printer', 'object_technic',
'off', 'on', 'play', 'playdisabled', 'printer', 'resize', 'stats',
'note', 'setup', 'sign-out', 'split', 'switch_off', 'switch_on', 'tools', 'unlink', 'uparrow', 'user', 'wrench', 'globe',
Expand Down Expand Up @@ -3165,7 +3165,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
'generic'=>'file',
'switch_off'=>'toggle-off', 'switch_on'=>'toggle-on', 'check'=>'check', 'bookmark'=>'star', 'bookmark'=>'star', 'stats' => 'chart-bar',
'bank'=>'university', 'close_title'=>'window-close', 'delete'=>'trash', 'edit'=>'pencil', 'filter'=>'filter', 'split'=>'code-branch',
'list'=>'list-alt', 'calendar'=>'calendar-alt', 'calendarweek'=>'calendar-week', 'calendarmonth'=>'calendar-alt', 'calendarday'=>'calendar-day', 'calendarperuser'=>'table',
'list-alt'=>'list-alt', 'calendar'=>'calendar-alt', 'calendarweek'=>'calendar-week', 'calendarmonth'=>'calendar-alt', 'calendarday'=>'calendar-day', 'calendarperuser'=>'table',
'error'=>'exclamation-triangle', 'warning'=>'exclamation-triangle',
'printer'=>'print', 'technic'=>'cogs',
'title_setup'=>'tools', 'title_accountancy'=>'money-check-alt', 'title_bank'=>'university', 'title_hrm'=>'umbrella-beach', 'title_agenda'=>'calendar-alt',
Expand Down Expand Up @@ -3259,7 +3259,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
$fakey = 'fa-comment-o';
}
// Img for type of views
elseif (in_array($pictowithouttext, array('list', 'calendar', 'calendarweek', 'calendarmonth', 'calendarday', 'calendarperuser'))) {
elseif (in_array($pictowithouttext, array('list-alt', 'calendar', 'calendarweek', 'calendarmonth', 'calendarday', 'calendarperuser'))) {
$fakey = 'imgforviewmode fa-'.$arrayconvpictotofa[$pictowithouttext];
$marginleftonlyshort = 0;
}
Expand Down

0 comments on commit ff1b3db

Please sign in to comment.