From ff1b3db54b1cfb66f8bda1067495bf4a88118d7c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 6 Apr 2020 23:38:30 +0200 Subject: [PATCH] Fix regression on hamburger picto --- htdocs/comm/action/card.php | 2 +- htdocs/compta/facture/list.php | 45 ++++++++++++++++++++++++++++--- htdocs/core/lib/functions.lib.php | 6 ++--- 3 files changed, 45 insertions(+), 8 deletions(-) diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index 07cd885698e..15980f9a19e 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -1580,7 +1580,7 @@ if ($id > 0) $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.=''.$langs->trans("BackToList").''; $linkback.=''; $linkback.='
  • '; diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 93d47ae584f..11bcab0386d 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -107,6 +107,8 @@ $search_user = GETPOST('search_user', 'int'); $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')); @@ -168,6 +170,7 @@ $arrayfields = array( '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), @@ -269,6 +272,8 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter', $search_type_thirdparty = ''; $search_date_start = ''; $search_date_end = ''; + $search_date_valid_start = ''; + $search_date_valid_end = ''; $search_datelimit_start = ''; $search_datelimit_end = ''; $option = ''; @@ -405,7 +410,7 @@ $sql .= ' f.rowid as id, f.ref, f.ref_client, f.type, f.note_private, f.note_pub $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,'; @@ -512,6 +517,8 @@ if ($search_module_source) $sql .= natural_search("f.module_source", $search_ 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)."'"; @@ -531,7 +538,7 @@ if (!$sall) { $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,'; @@ -603,6 +610,8 @@ if ($resql) 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); @@ -797,6 +806,20 @@ if ($resql) print ''; print ''; } + // Date valid + if (!empty($arrayfields['f.date_valid']['checked'])) + { + print ''; + print '
    '; + print $langs->trans('From').' '; + print $form->selectDate($search_date_valid_start ? $search_date_valid_start : -1, 'search_date_valid_start', 0, 0, 1); + print '
    '; + print '
    '; + print $langs->trans('to').' '; + print $form->selectDate($search_date_valid_end ? $search_date_valid_end : -1, 'search_date_valid_end', 0, 0, 1); + print '
    '; + print ''; + } // Date due if (!empty($arrayfields['f.date_lim_reglement']['checked'])) { @@ -1026,6 +1049,7 @@ if ($resql) 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); @@ -1099,8 +1123,12 @@ if ($resql) $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) { @@ -1213,6 +1241,15 @@ if ($resql) if (!$i) $totalarray['nbfield']++; } + // Date + if (!empty($arrayfields['f.date_valid']['checked'])) + { + print ''; + print dol_print_date($db->jdate($obj->date_valid), 'day'); + print ''; + if (!$i) $totalarray['nbfield']++; + } + // Date limit if (!empty($arrayfields['f.date_lim_reglement']['checked'])) { diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index f6279cc992e..44c823a4f4a 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -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', @@ -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', @@ -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; }