Ajout select_weight_units
This commit is contained in:
parent
5acbce2d89
commit
1e18704d0a
@ -2060,6 +2060,37 @@ class Form
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Selection des unites de poids
|
||||||
|
* \param name Nom champ html
|
||||||
|
* \param default Forçage de l'unite
|
||||||
|
* \remarks pour l'instant on ne definit pas les unites dans la base
|
||||||
|
*/
|
||||||
|
function select_weight_units($name='weight_units', $default='0', $adddefault=0)
|
||||||
|
{
|
||||||
|
global $langs,$conf,$mysoc;
|
||||||
|
|
||||||
|
$units[3] = "Tonne";
|
||||||
|
$units[0] = "kg";
|
||||||
|
$units[-3] = "g";
|
||||||
|
|
||||||
|
print '<select class="flat" name="'.$name.'">';
|
||||||
|
if ($adddefault) print '<option value="0">'.$langs->trans("Default").'</option>';
|
||||||
|
|
||||||
|
foreach ($units as $key => $value)
|
||||||
|
{
|
||||||
|
print '<option value="'.$key.'"';
|
||||||
|
if ($key == $default)
|
||||||
|
{
|
||||||
|
print ' selected="true"';
|
||||||
|
}
|
||||||
|
print '>'.$value.'</option>';
|
||||||
|
}
|
||||||
|
print '</select>';
|
||||||
|
}
|
||||||
|
|
||||||
function load_tva($name='tauxtva', $defaulttx='', $societe_vendeuse='', $societe_acheteuse='', $taux_produit='')
|
function load_tva($name='tauxtva', $defaulttx='', $societe_vendeuse='', $societe_acheteuse='', $taux_produit='')
|
||||||
{
|
{
|
||||||
global $langs,$conf,$mysoc;
|
global $langs,$conf,$mysoc;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user