Fix: Creation of social contribution
This commit is contained in:
parent
54683f3f18
commit
3502975687
@ -177,7 +177,7 @@ if ($_GET["action"] == 'create')
|
||||
{
|
||||
print_fiche_titre($langs->trans("NewSocialContribution"));
|
||||
print "<br>\n";
|
||||
|
||||
|
||||
if ($mesg) print $mesg.'<br>';
|
||||
|
||||
$var=false;
|
||||
@ -207,12 +207,12 @@ if ($_GET["action"] == 'create')
|
||||
print '<tr '.$bc[$var].' valign="top">';
|
||||
print '<td> </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><input type="text" size="8" name="period"><br>YYYYMMDD</td>';
|
||||
|
||||
print '<td align="left"><select class="flat" name="type">';
|
||||
$html->select_type_socialcontrib();
|
||||
print '<td align="left">';
|
||||
$html->select_type_socialcontrib();
|
||||
print '</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;
|
||||
|
||||
print '<select class="flat" name="'.$htmlname.'">';
|
||||
$sql = "SELECT c.id, c.libelle as type FROM ".MAIN_DB_PREFIX."c_chargesociales as c";
|
||||
$sql .= " ORDER BY lower(c.libelle) ASC";
|
||||
$resql=$db->query($sql);
|
||||
$sql = "SELECT c.id, c.libelle as type";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."c_chargesociales as c";
|
||||
$sql.= " WHERE active = 1";
|
||||
$sql.= " ORDER BY c.libelle ASC";
|
||||
|
||||
dolibarr_syslog("Form::select_type_socialcontrib sql=".$sql, LOG_DEBUG);
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
print '<select class="flat" name="'.$htmlname.'">';
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
|
||||
while ($i < $num)
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
print '<option value="'.$obj->id.'"';
|
||||
@ -603,9 +607,13 @@ class Form
|
||||
print '>'.$obj->type;
|
||||
$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