Fix: le changement de date via le calendrier se faisait au mme endroit
This commit is contained in:
parent
2e3e7c3a80
commit
959d2b8f12
@ -153,7 +153,7 @@ if ($_POST["action"] == 'addligne' && $user->rights->contrat->creer)
|
||||
$result = 0;
|
||||
$contrat = new Contrat($db);
|
||||
$result=$contrat->fetch($_GET["id"]);
|
||||
if (($_POST["p_idprod"] > 0 && $_POST["mode"]=='predefined') || ($_POST["mode"]=='libre'))
|
||||
if ($_POST["p_idprod"] > 0 && $_POST["mode"]=='predefined')
|
||||
{
|
||||
//print $_POST["desc"]." - ".$_POST["pu"]." - ".$_POST["pqty"]." - ".$_POST["tva_tx"]." - ".$_POST["p_idprod"]." - ".$_POST["premise"]; exit;
|
||||
$result = $contrat->addline(
|
||||
@ -167,6 +167,19 @@ if ($_POST["action"] == 'addligne' && $user->rights->contrat->creer)
|
||||
$date_end
|
||||
);
|
||||
}
|
||||
elseif ($_POST["mode"]=='libre')
|
||||
{
|
||||
$result = $contrat->addline(
|
||||
$_POST["desc"],
|
||||
$_POST["pu"],
|
||||
$_POST["pqty"],
|
||||
$_POST["tva_tx"],
|
||||
0,
|
||||
$_POST["premise"],
|
||||
$date_start_sl,
|
||||
$date_end_sl
|
||||
);
|
||||
}
|
||||
|
||||
if ($result >= 0)
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user