forked from Wavyzz/dolibarr
Fix: mssql: rcupration du dernire ID
Fix: le type d'entreprise et et son effectif n'tait plus rcupr
This commit is contained in:
@@ -573,11 +573,16 @@ class DoliDb
|
||||
*/
|
||||
function last_insert_id($tab)
|
||||
{
|
||||
return query("SELECT @@identity ");
|
||||
|
||||
//return mssql_insert_id($this->db);
|
||||
$res = $this->query("SELECT @@IDENTITY as id");
|
||||
if ($data = $this->fetch_array($res))
|
||||
{
|
||||
return $data["id"];
|
||||
}
|
||||
else
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Next function are not required. Only minor features use them.
|
||||
|
||||
@@ -489,10 +489,10 @@ if ($_POST["getcustomercode"] || $_POST["getsuppliercode"] ||
|
||||
print '</td></tr>';
|
||||
|
||||
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>'.$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>';
|
||||
|
||||
// Assujeti TVA
|
||||
@@ -828,10 +828,10 @@ elseif ($_GET["action"] == 'edit' || $_POST["action"] == 'edit')
|
||||
print '</td></tr>';
|
||||
|
||||
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>'.$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 '<tr><td align="center" colspan="4">';
|
||||
|
||||
Reference in New Issue
Block a user