Fix: mssql: récupération du dernière ID
Fix: le type d'entreprise et et son effectif n'était plus récupéré
This commit is contained in:
parent
e865d706fd
commit
45c98f1d0d
@ -573,11 +573,16 @@ class DoliDb
|
|||||||
*/
|
*/
|
||||||
function last_insert_id($tab)
|
function last_insert_id($tab)
|
||||||
{
|
{
|
||||||
return query("SELECT @@identity ");
|
$res = $this->query("SELECT @@IDENTITY as id");
|
||||||
|
if ($data = $this->fetch_array($res))
|
||||||
//return mssql_insert_id($this->db);
|
{
|
||||||
|
return $data["id"];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Next function are not required. Only minor features use them.
|
// Next function are not required. Only minor features use them.
|
||||||
|
|||||||
@ -489,10 +489,10 @@ if ($_POST["getcustomercode"] || $_POST["getsuppliercode"] ||
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("Type").'</td><td>'."\n";
|
print '<tr><td>'.$langs->trans("Type").'</td><td>'."\n";
|
||||||
$form->select_array("typent_id",$soc->typent_array(1), $soc->typent_id);
|
$form->select_array("typent_id",$soc->typent_array(0), $soc->typent_id);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td>'.$langs->trans("Staff").'</td><td>';
|
print '<td>'.$langs->trans("Staff").'</td><td>';
|
||||||
$form->select_array("effectif_id",$soc->effectif_array(1), $soc->effectif_id);
|
$form->select_array("effectif_id",$soc->effectif_array(0), $soc->effectif_id);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Assujeti TVA
|
// Assujeti TVA
|
||||||
@ -828,10 +828,10 @@ elseif ($_GET["action"] == 'edit' || $_POST["action"] == 'edit')
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("Type").'</td><td>';
|
print '<tr><td>'.$langs->trans("Type").'</td><td>';
|
||||||
$form->select_array("typent_id",$soc->typent_array(), $soc->typent_id);
|
$form->select_array("typent_id",$soc->typent_array(0), $soc->typent_id);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td>'.$langs->trans("Staff").'</td><td>';
|
print '<td>'.$langs->trans("Staff").'</td><td>';
|
||||||
$form->select_array("effectif_id",$soc->effectif_array(), $soc->effectif_id);
|
$form->select_array("effectif_id",$soc->effectif_array(0), $soc->effectif_id);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '<tr><td align="center" colspan="4">';
|
print '<tr><td align="center" colspan="4">';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user