Bascule vers la propal lors de l'ajout d'un produit
This commit is contained in:
parent
4a8d7fc4cc
commit
3656358ceb
@ -99,19 +99,15 @@ if ($_POST["action"] == 'update' &&
|
|||||||
if ($_POST["action"] == 'addinpropal')
|
if ($_POST["action"] == 'addinpropal')
|
||||||
{
|
{
|
||||||
$propal = New Propal($db);
|
$propal = New Propal($db);
|
||||||
|
|
||||||
$propal->fetch($_POST["propalid"]);
|
$propal->fetch($_POST["propalid"]);
|
||||||
|
|
||||||
$result = $propal->insert_product($_GET["id"], $_POST["qty"], $_POST["remise_percent"]);
|
$result = $propal->insert_product($_GET["id"], $_POST["qty"], $_POST["remise_percent"]);
|
||||||
if ( $result < 0)
|
if ( $result < 0)
|
||||||
{
|
{
|
||||||
$mesg = "erreur $result";
|
$mesg = "erreur $result";
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
Header("Location: ../comm/propal.php?propalid=".$propal->id);
|
||||||
$mesg = ucfirst($types[$type]) . ' ajouté à la proposition ';
|
|
||||||
$mesg .= '<a href="../comm/propal.php?propalid='.$propal->id.'">'.$propal->ref.'</a>';
|
|
||||||
}
|
|
||||||
$_GET["action"] = '';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_POST["action"] == 'addinfacture' &&
|
if ($_POST["action"] == 'addinfacture' &&
|
||||||
@ -310,6 +306,7 @@ else
|
|||||||
$head[$h][1] = 'Statistiques';
|
$head[$h][1] = 'Statistiques';
|
||||||
|
|
||||||
dolibarr_fiche_head($head, 0, 'Fiche '.$types[$product->type].' : '.$product->ref);
|
dolibarr_fiche_head($head, 0, 'Fiche '.$types[$product->type].' : '.$product->ref);
|
||||||
|
|
||||||
print($mesg);
|
print($mesg);
|
||||||
print '<table class="border" width="100%" cellspacing="0" cellpadding="4">';
|
print '<table class="border" width="100%" cellspacing="0" cellpadding="4">';
|
||||||
print "<tr>";
|
print "<tr>";
|
||||||
@ -602,7 +599,6 @@ print "</div>";
|
|||||||
|
|
||||||
if ($_GET["id"] && $_GET["action"] == '' && $product->envente)
|
if ($_GET["id"] && $_GET["action"] == '' && $product->envente)
|
||||||
{
|
{
|
||||||
|
|
||||||
$htmls = new Form($db);
|
$htmls = new Form($db);
|
||||||
$propal = New Propal($db);
|
$propal = New Propal($db);
|
||||||
|
|
||||||
@ -636,9 +632,8 @@ if ($_GET["id"] && $_GET["action"] == '' && $product->envente)
|
|||||||
print "<td><a href=\"../comm/propal.php?propalid=$objp->propalid\">$objp->ref</a></TD>\n";
|
print "<td><a href=\"../comm/propal.php?propalid=$objp->propalid\">$objp->ref</a></TD>\n";
|
||||||
print "<td><a href=\"../comm/fiche.php?socid=$objp->idp\">$objp->nom</a></TD>\n";
|
print "<td><a href=\"../comm/fiche.php?socid=$objp->idp\">$objp->nom</a></TD>\n";
|
||||||
print "<td>". strftime("%d %B %Y",$objp->dp)."</td>\n";
|
print "<td>". strftime("%d %B %Y",$objp->dp)."</td>\n";
|
||||||
print '<form method="POST" action="fiche.php">';
|
print '<form method="POST" action="fiche.php?id='.$product->id.'">';
|
||||||
print '<input type="hidden" name="action" value="addinpropal">';
|
print '<input type="hidden" name="action" value="addinpropal">';
|
||||||
print '<input type="hidden" name="id" value="'.$product->id.'">';
|
|
||||||
print '<td><input type="hidden" name="propalid" value="'.$objp->propalid.'">';
|
print '<td><input type="hidden" name="propalid" value="'.$objp->propalid.'">';
|
||||||
print '<input type="text" name="qty" size="3" value="1"> Rem.';
|
print '<input type="text" name="qty" size="3" value="1"> Rem.';
|
||||||
print '<input type="text" name="remise_percent" size="3" value="0"> %';
|
print '<input type="text" name="remise_percent" size="3" value="0"> %';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user