Exemplo n.º 1
0
        {
            Header("Location: fiche.php?id=".$object->id);
            exit;
        }
        else {
            $mesg='<div class="error">'.$object->error.'</div>';
        }
        $_GET["socid"]=$_POST["socid"];
        $action='create';
    }
}

if ($action == 'classin')
{
    $object->fetch($_GET["id"]);
    $object->setProject($_POST["projectid"]);
}

if ($action == 'addline' && $user->rights->contrat->creer)
{
    if ($_POST["pqty"] && (($_POST["pu"] != '' && $_POST["desc"]) || $_POST["idprod"]))
    {
        $ret=$object->fetch($_GET["id"]);
        if ($ret < 0)
		{
			dol_print_error($db,$commande->error);
			exit;
		}
		$ret=$object->fetch_thirdparty();

		$date_start='';