Fix: Creation of social contribution
This commit is contained in:
parent
54683f3f18
commit
3502975687
@ -207,12 +207,12 @@ if ($_GET["action"] == 'create')
|
|||||||
print '<tr '.$bc[$var].' valign="top">';
|
print '<tr '.$bc[$var].' valign="top">';
|
||||||
print '<td> </td>';
|
print '<td> </td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print $html->select_date('-1', 'ech', 0, 0, 0, 'charge', 1);
|
print $html->select_date('-1', 'ech', 0, 0, 0, 'charge', 1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td><input type="text" size="8" name="period"><br>YYYYMMDD</td>';
|
print '<td><input type="text" size="8" name="period"><br>YYYYMMDD</td>';
|
||||||
|
|
||||||
print '<td align="left"><select class="flat" name="type">';
|
print '<td align="left">';
|
||||||
$html->select_type_socialcontrib();
|
$html->select_type_socialcontrib();
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '<td align="left"><input type="text" size="34" name="label" class="flat"></td>';
|
print '<td align="left"><input type="text" size="34" name="label" class="flat"></td>';
|
||||||
|
|||||||
@ -586,16 +586,20 @@ class Form
|
|||||||
{
|
{
|
||||||
global $db,$langs,$user;
|
global $db,$langs,$user;
|
||||||
|
|
||||||
print '<select class="flat" name="'.$htmlname.'">';
|
$sql = "SELECT c.id, c.libelle as type";
|
||||||
$sql = "SELECT c.id, c.libelle as type FROM ".MAIN_DB_PREFIX."c_chargesociales as c";
|
$sql.= " FROM ".MAIN_DB_PREFIX."c_chargesociales as c";
|
||||||
$sql .= " ORDER BY lower(c.libelle) ASC";
|
$sql.= " WHERE active = 1";
|
||||||
$resql=$db->query($sql);
|
$sql.= " ORDER BY c.libelle ASC";
|
||||||
|
|
||||||
|
dolibarr_syslog("Form::select_type_socialcontrib sql=".$sql, LOG_DEBUG);
|
||||||
|
$resql=$db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
$num = $db->num_rows($resql);
|
print '<select class="flat" name="'.$htmlname.'">';
|
||||||
$i = 0;
|
$num = $db->num_rows($resql);
|
||||||
|
$i = 0;
|
||||||
|
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
print '<option value="'.$obj->id.'"';
|
print '<option value="'.$obj->id.'"';
|
||||||
@ -603,9 +607,13 @@ class Form
|
|||||||
print '>'.$obj->type;
|
print '>'.$obj->type;
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
print '</select>';
|
||||||
|
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionnarySetup"),1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dolibarr_print_error($db,$db->lasterror());
|
||||||
}
|
}
|
||||||
print '</select>';
|
|
||||||
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionnarySetup"),1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user