Fix: id is lost if the page is based with $_GET['ref']
This commit is contained in:
parent
41307a7f42
commit
abaf84b523
@ -620,7 +620,11 @@ else
|
|||||||
{
|
{
|
||||||
$contrat = new Contrat($db);
|
$contrat = new Contrat($db);
|
||||||
$result=$contrat->fetch($_GET['id'],$_GET['ref']);
|
$result=$contrat->fetch($_GET['id'],$_GET['ref']);
|
||||||
if ($result > 0) $result=$contrat->fetch_lignes();
|
if ($result > 0)
|
||||||
|
{
|
||||||
|
$id = $contrat->id; // if $_GET['ref']
|
||||||
|
$result=$contrat->fetch_lignes();
|
||||||
|
}
|
||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
{
|
{
|
||||||
dol_print_error($db,$contrat->error);
|
dol_print_error($db,$contrat->error);
|
||||||
@ -975,7 +979,7 @@ else
|
|||||||
$arraycontractid[$contractcursor->id]=$contractcursor->ref;
|
$arraycontractid[$contractcursor->id]=$contractcursor->ref;
|
||||||
}
|
}
|
||||||
//var_dump($arraycontractid);
|
//var_dump($arraycontractid);
|
||||||
// Crée un tableau formulaire
|
// Cree un tableau formulaire
|
||||||
$formquestion=array(
|
$formquestion=array(
|
||||||
'text' => $langs->trans("ConfirmMoveToAnotherContractQuestion"),
|
'text' => $langs->trans("ConfirmMoveToAnotherContractQuestion"),
|
||||||
array('type' => 'select', 'name' => 'newcid', 'values' => $arraycontractid));
|
array('type' => 'select', 'name' => 'newcid', 'values' => $arraycontractid));
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user