Use a font awesome icon to show "shippable" flag on orders.
This commit is contained in:
parent
db651a607d
commit
072a0a26d6
@ -814,10 +814,7 @@ if ($resql)
|
||||
$generic_commande->lines=array();
|
||||
$generic_commande->getLinesArray();
|
||||
|
||||
print '<table class="nobordernopadding"><tr class="nocellnopadd">';
|
||||
print '<td class="nobordernopadding nowrap">';
|
||||
print $generic_commande->getNomUrl(1, ($viewstatut != 2?0:$obj->fk_statut), 0, 0, 0, 1);
|
||||
print '</td>';
|
||||
|
||||
// Show shippable Icon (create subloop, so may be slow)
|
||||
if ($conf->stock->enabled)
|
||||
@ -903,16 +900,15 @@ if ($resql)
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($notshippable==0) {
|
||||
$text_icon = img_picto('', 'object_sending');
|
||||
if ($notshippable == 0) {
|
||||
$text_icon = img_picto('', 'dolly', '', false, 0, 0, '', 'green paddingleft');
|
||||
$text_info = $langs->trans('Shippable').'<br>'.$text_info;
|
||||
} else {
|
||||
$text_icon = img_picto('', 'error');
|
||||
$text_icon = img_picto('', 'dolly', '', false, 0, 0, '', 'error paddingleft');
|
||||
$text_info = $langs->trans('NonShippable').'<br>'.$text_info;
|
||||
}
|
||||
}
|
||||
|
||||
print '<td>';
|
||||
if ($nbprod)
|
||||
{
|
||||
print $form->textwithtooltip('', $text_info, 2, 1, $text_icon, '', 2);
|
||||
@ -920,11 +916,9 @@ if ($resql)
|
||||
if ($warning) { // Always false in default mode
|
||||
print $form->textwithtooltip('', $langs->trans('NotEnoughForAllOrders').'<br>'.$text_warning, 2, 1, img_picto('', 'error'), '', 2);
|
||||
}
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
// Warning late icon and note
|
||||
print '<td class="nobordernopadding nowrap">';
|
||||
if ($generic_commande->hasDelay()) {
|
||||
print img_picto($langs->trans("Late").' : '.$generic_commande->showDelay(), "warning");
|
||||
}
|
||||
@ -934,15 +928,11 @@ if ($resql)
|
||||
print '<a href="'.DOL_URL_ROOT.'/commande/note.php?id='.$obj->rowid.'">'.img_picto($langs->trans("ViewPrivateNote"), 'object_generic').'</a>';
|
||||
print '</span>';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
print '<td width="16" class="nobordernopadding hideonsmartphone right">';
|
||||
$filename=dol_sanitizeFileName($obj->ref);
|
||||
$filedir=$conf->commande->multidir_output[$conf->entity] . '/' . dol_sanitizeFileName($obj->ref);
|
||||
$urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid;
|
||||
print $formfile->getDocumentsLink($generic_commande->element, $filename, $filedir);
|
||||
print '</td>';
|
||||
print '</tr></table>';
|
||||
|
||||
print '</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
|
||||
@ -3029,14 +3029,14 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
||||
//if (in_array($picto, array('switch_off', 'switch_on', 'off', 'on')))
|
||||
if (empty($srconly) && in_array($pictowithouttext, array(
|
||||
'1downarrow', '1uparrow', '1leftarrow', '1rightarrow', '1uparrow_selected', '1downarrow_selected', '1leftarrow_selected', '1rightarrow_selected',
|
||||
'address', 'bank', 'building', 'cash-register', 'close_title', 'cubes', 'delete', 'edit', 'ellipsis-h', 'bookmark', 'filter', 'grip', 'grip_title', 'list', 'listlight', 'note',
|
||||
'address', 'bank', 'building', 'cash-register', 'close_title', 'cubes', 'delete', 'dolly', 'edit', 'ellipsis-h', 'bookmark', 'filter', 'grip', 'grip_title', 'list', 'listlight', 'note',
|
||||
'object_list','object_calendar', 'object_calendarweek', 'object_calendarmonth', 'object_calendarday', 'object_calendarperuser',
|
||||
'off', 'on', 'play', 'playdisabled', 'printer', 'resize',
|
||||
'note', 'setup', 'sign-out', 'split', 'switch_off', 'switch_on', 'tools', 'unlink', 'uparrow', 'user', 'wrench',
|
||||
'jabber','skype','twitter','facebook','linkedin',
|
||||
'chevron-left','chevron-right','chevron-down','chevron-top',
|
||||
'home', 'companies', 'products', 'commercial', 'invoicing', 'accountancy', 'project', 'hrm', 'members', 'ticket', 'generic',
|
||||
'warning',
|
||||
'error','warning',
|
||||
'title_setup', 'title_accountancy', 'title_bank', 'title_hrm', 'title_agenda'
|
||||
)
|
||||
)) {
|
||||
@ -3049,13 +3049,14 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
||||
'switch_off'=>'toggle-off', 'switch_on'=>'toggle-on', 'bookmark'=>'star',
|
||||
'bank'=>'university', 'close_title'=>'window-close', 'delete'=>'trash', 'edit'=>'pencil', 'filter'=>'filter', 'split'=>'code-fork',
|
||||
'object_list'=>'list-alt','object_calendar'=>'calendar-alt', 'object_calendarweek'=>'calendar-week', 'object_calendarmonth'=>'calendar-alt', 'object_calendarday'=>'calendar-day', 'object_calendarperuser'=>'table',
|
||||
'warning'=>'exclamation-triangle',
|
||||
'error'=>'exclamation-triangle', 'warning'=>'exclamation-triangle',
|
||||
'title_setup'=>'tools', 'title_accountancy'=>'money-check-alt', 'title_bank'=>'university', 'title_hrm'=>'umbrella-beach', 'title_agenda'=>'calendar-alt'
|
||||
);
|
||||
if ($pictowithouttext == 'warning') {
|
||||
if ($pictowithouttext == 'error' || $pictowithouttext == 'warning') {
|
||||
$facolor = '';
|
||||
$fakey = 'fa-'.$arrayconvpictotofa[$pictowithouttext];
|
||||
$marginleftonlyshort = 0;
|
||||
$morecss .= ($morecss ? ' ' : '').('picto'.$pictowithouttext);
|
||||
} elseif ($pictowithouttext == 'switch_off') {
|
||||
$facolor = '#999';
|
||||
$fasize = '2em';
|
||||
@ -3156,12 +3157,12 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
||||
elseif (! empty($arrayconvpictotofa[$pictowithouttext]))
|
||||
{
|
||||
$fakey = 'fa-'.$arrayconvpictotofa[$pictowithouttext];
|
||||
$facolor = '#444';
|
||||
//$facolor = '#444';
|
||||
$marginleftonlyshort=0;
|
||||
}
|
||||
else {
|
||||
$fakey = 'fa-'.$pictowithouttext;
|
||||
$facolor = '#444';
|
||||
//$facolor = '#444';
|
||||
$marginleftonlyshort=0;
|
||||
}
|
||||
//this snippet only needed since function img_edit accepts only one additional parameter: no separate one for css only.
|
||||
|
||||
@ -484,13 +484,13 @@ $help_url='';
|
||||
|
||||
$sql = 'SELECT';
|
||||
if ($sall || $search_product_category > 0) $sql = 'SELECT DISTINCT';
|
||||
$sql.= ' s.rowid as socid, s.nom as name, s.town, s.zip, s.fk_pays, s.client, s.code_client,';
|
||||
$sql.= ' s.rowid as socid, s.nom as name, s.town, s.zip, s.fk_pays, s.client, s.code_client, s.email,';
|
||||
$sql.= " typent.code as typent_code,";
|
||||
$sql.= " state.code_departement as state_code, state.nom as state_name,";
|
||||
$sql.= " cf.rowid, cf.ref, cf.ref_supplier, cf.fk_statut, cf.billed, cf.total_ht, cf.tva as total_tva, cf.total_ttc, cf.fk_user_author, cf.date_commande as date_commande, cf.date_livraison as date_delivery,";
|
||||
$sql.= ' cf.date_creation as date_creation, cf.tms as date_update,';
|
||||
$sql.= " p.rowid as project_id, p.ref as project_ref, p.title as project_title,";
|
||||
$sql.= " u.firstname, u.lastname, u.photo, u.login";
|
||||
$sql.= " u.firstname, u.lastname, u.photo, u.login, u.email as user_email";
|
||||
// Add fields from extrafields
|
||||
foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key.' as options_'.$key : '');
|
||||
// Add fields from hooks
|
||||
@ -946,20 +946,12 @@ if ($resql)
|
||||
{
|
||||
print '<td class="nowrap">';
|
||||
|
||||
print '<table class="nobordernopadding"><tr class="nocellnopadd">';
|
||||
// Picto + Ref
|
||||
print '<td class="nobordernopadding nowrap">';
|
||||
print $objectstatic->getNomUrl(1);
|
||||
print '</td>';
|
||||
// Warning
|
||||
//print '<td style="min-width: 20px" class="nobordernopadding nowrap">';
|
||||
//print '</td>';
|
||||
// Other picto tool
|
||||
print '<td width="16" class="right nobordernopadding hideonsmartphone">';
|
||||
$filename=dol_sanitizeFileName($obj->ref);
|
||||
$filedir=$conf->fournisseur->commande->dir_output.'/' . dol_sanitizeFileName($obj->ref);
|
||||
print $formfile->getDocumentsLink($objectstatic->element, $filename, $filedir);
|
||||
print '</td></tr></table>';
|
||||
|
||||
print '</td>'."\n";
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
@ -987,20 +979,21 @@ if ($resql)
|
||||
$userstatic->firstname = $obj->firstname;
|
||||
$userstatic->login = $obj->login;
|
||||
$userstatic->photo = $obj->photo;
|
||||
$userstatic->email = $obj->user_email;
|
||||
if (! empty($arrayfields['u.login']['checked']))
|
||||
{
|
||||
print "<td>";
|
||||
print '<td class="tdoverflowmax150">';
|
||||
if ($userstatic->id) print $userstatic->getNomUrl(1);
|
||||
else print " ";
|
||||
print "</td>";
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
// Thirdparty
|
||||
if (! empty($arrayfields['s.nom']['checked']))
|
||||
{
|
||||
print '<td>';
|
||||
print '<td class="tdoverflowmax150">';
|
||||
$thirdpartytmp->id = $obj->socid;
|
||||
$thirdpartytmp->name = $obj->name;
|
||||
$thirdpartytmp->email = $obj->email;
|
||||
print $thirdpartytmp->getNomUrl(1, 'supplier');
|
||||
print '</td>'."\n";
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
|
||||
@ -3430,6 +3430,7 @@ img.boxhandle, img.boxclose {
|
||||
.ok { color: #114466; }
|
||||
.warning { color: #887711 !important; }
|
||||
.error { color: #550000 !important; font-weight: bold; }
|
||||
.green { color: #118822; }
|
||||
|
||||
div.ok {
|
||||
color: #114466;
|
||||
|
||||
@ -3461,6 +3461,7 @@ img.boxhandle, img.boxclose {
|
||||
.ok { color: #114466; }
|
||||
.warning { color: #887711 !important; }
|
||||
.error { color: #550000 !important; font-weight: bold; }
|
||||
.green { color: #118822; }
|
||||
|
||||
div.ok {
|
||||
color: #114466;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user