New: Add direct link to discount on invoice creation page
This commit is contained in:
parent
944a7e67a9
commit
05198e965b
@ -19,7 +19,7 @@
|
|||||||
/**
|
/**
|
||||||
* \file htdocs/comm/remise.php
|
* \file htdocs/comm/remise.php
|
||||||
* \ingroup societe
|
* \ingroup societe
|
||||||
* \brief Onglet remise de la societe
|
* \brief Page to edit relative discount of a customer
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("../main.inc.php");
|
require("../main.inc.php");
|
||||||
@ -30,7 +30,7 @@ $langs->load("companies");
|
|||||||
$langs->load("orders");
|
$langs->load("orders");
|
||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
|
|
||||||
$_socid = $_GET["id"];
|
$_socid = GETPOST("id");
|
||||||
// Security check
|
// Security check
|
||||||
if ($user->societe_id > 0)
|
if ($user->societe_id > 0)
|
||||||
{
|
{
|
||||||
@ -38,7 +38,17 @@ if ($user->societe_id > 0)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if ($_POST["action"] == 'setremise')
|
/*
|
||||||
|
* Actions
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (GETPOST('cancel') && GETPOST('backtopage'))
|
||||||
|
{
|
||||||
|
Header("Location: ".GETPOST("backtopage"));
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (GETPOST("action") == 'setremise')
|
||||||
{
|
{
|
||||||
$soc = New Societe($db);
|
$soc = New Societe($db);
|
||||||
$soc->fetch($_GET["id"]);
|
$soc->fetch($_GET["id"]);
|
||||||
@ -110,6 +120,7 @@ if ($_socid > 0)
|
|||||||
print '<form method="POST" action="remise.php?id='.$objsoc->id.'">';
|
print '<form method="POST" action="remise.php?id='.$objsoc->id.'">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input type="hidden" name="action" value="setremise">';
|
print '<input type="hidden" name="action" value="setremise">';
|
||||||
|
print '<input type="hidden" name="backtopage" value="'.GETPOST('backtopage').'">';
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
@ -123,7 +134,14 @@ if ($_socid > 0)
|
|||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
|
||||||
print '<center><input type="submit" class="button" value="'.$langs->trans("Modify").'"></center>';
|
print '<center>';
|
||||||
|
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||||
|
if (GETPOST("backtopage"))
|
||||||
|
{
|
||||||
|
print ' ';
|
||||||
|
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
|
||||||
|
}
|
||||||
|
print '</center>';
|
||||||
|
|
||||||
print "</form>";
|
print "</form>";
|
||||||
|
|
||||||
|
|||||||
@ -33,7 +33,7 @@ $langs->load("bills");
|
|||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$_socid = $_GET["id"];
|
$_socid = GETPOST("id");
|
||||||
if ($user->societe_id > 0)
|
if ($user->societe_id > 0)
|
||||||
{
|
{
|
||||||
$_socid = $user->societe_id;
|
$_socid = $user->societe_id;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user