Fix: Too long string
This commit is contained in:
parent
2c2aa05171
commit
1268198f66
@ -3,7 +3,7 @@ $langs->load("main");
|
|||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
$langs->load("@cashdesk");
|
$langs->load("@cashdesk");
|
||||||
?>
|
?>
|
||||||
<!--
|
<!--
|
||||||
Copyright (C) 2007-2008 Jeremie Ollivier <jeremie.o@laposte.net>
|
Copyright (C) 2007-2008 Jeremie Ollivier <jeremie.o@laposte.net>
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
@ -59,19 +59,9 @@ $Id$
|
|||||||
else
|
else
|
||||||
$selected = '';
|
$selected = '';
|
||||||
|
|
||||||
// On coupe la ligne si elle contient plus de $conf_nbr_car_listes caracteres
|
$label = $tab_designations[$i]['label'];
|
||||||
if ( strlen ($tab_designations[$i]['label']) > $conf_nbr_car_listes ) {
|
|
||||||
|
|
||||||
$label = substr ($tab_designations[$i]['label'], 0, $conf_nbr_car_listes - 3);
|
print '<option '.$selected.' value="'.$tab_designations[$i]['rowid'].'">'.$tab_designations[$i]['ref'].' - '.dol_trunc($label,28,'middle');
|
||||||
$label .= '...';
|
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
$label = $tab_designations[$i]['label'];
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
print '<option '.$selected.' value="'.$tab_designations[$i]['rowid'].'">'.$tab_designations[$i]['ref'].' - '.$label;
|
|
||||||
if ($conf->stock->enabled && !empty($conf_fkentrepot)) print ' ('.$langs->trans("Warehouse").': '.$tab_designations[$i]['reel'].')';
|
if ($conf->stock->enabled && !empty($conf_fkentrepot)) print ' ('.$langs->trans("Warehouse").': '.$tab_designations[$i]['reel'].')';
|
||||||
print '</option>'."\n ";
|
print '</option>'."\n ";
|
||||||
|
|
||||||
@ -87,19 +77,9 @@ $Id$
|
|||||||
else
|
else
|
||||||
$selected = '';
|
$selected = '';
|
||||||
|
|
||||||
// On coupe la ligne si elle contient plus de $conf_nbr_car_listes caracteres
|
$label = $tab_designations[$i]['label'];
|
||||||
if ( strlen ($tab_designations[$i]['label']) > $conf_nbr_car_listes ) {
|
|
||||||
|
|
||||||
$label = substr ($tab_designations[$i]['label'], 0, $conf_nbr_car_listes - 3);
|
print '<option '.$selected.' value="'.$tab_designations[$i]['rowid'].'">'.$tab_designations[$i]['ref'].' - '.dol_trunc($label,28,'middle');
|
||||||
$label .= '...';
|
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
$label = $tab_designations[$i]['label'];
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
print '<option '.$selected.' value="'.$tab_designations[$i]['rowid'].'">'.$tab_designations[$i]['ref'].' - '.$label;
|
|
||||||
if ($conf->stock->enabled && !empty($conf_fkentrepot)) print ' ('.$langs->trans("Warehouse").': '.(empty($tab_designations[$i]['reel'])?0:$tab_designations[$i]['reel']).')';
|
if ($conf->stock->enabled && !empty($conf_fkentrepot)) print ' ('.$langs->trans("Warehouse").': '.(empty($tab_designations[$i]['reel'])?0:$tab_designations[$i]['reel']).')';
|
||||||
print '</option>'."\n ";
|
print '</option>'."\n ";
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user