mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
New: Add direct link to discount on invoice creation page
This commit is contained in:
parent
c1dddab48f
commit
b4c1cfa5bd
|
|
@ -19,7 +19,7 @@
|
|||
/**
|
||||
* \file htdocs/comm/remise.php
|
||||
* \ingroup societe
|
||||
* \brief Onglet remise de la societe
|
||||
* \brief Page to edit relative discount of a customer
|
||||
*/
|
||||
|
||||
require("../main.inc.php");
|
||||
|
|
@ -30,7 +30,7 @@ $langs->load("companies");
|
|||
$langs->load("orders");
|
||||
$langs->load("bills");
|
||||
|
||||
$_socid = $_GET["id"];
|
||||
$_socid = GETPOST("id");
|
||||
// Security check
|
||||
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->fetch($_GET["id"]);
|
||||
|
|
@ -110,6 +120,7 @@ if ($_socid > 0)
|
|||
print '<form method="POST" action="remise.php?id='.$objsoc->id.'">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="setremise">';
|
||||
print '<input type="hidden" name="backtopage" value="'.GETPOST('backtopage').'">';
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
|
|
@ -123,7 +134,14 @@ if ($_socid > 0)
|
|||
|
||||
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>";
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ $langs->load("bills");
|
|||
$langs->load("companies");
|
||||
|
||||
// Security check
|
||||
$_socid = $_GET["id"];
|
||||
$_socid = GETPOST("id");
|
||||
if ($user->societe_id > 0)
|
||||
{
|
||||
$_socid = $user->societe_id;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user