Fix: Le user de creatio n'était pas sauvegardé lors de la creation d'une écriture bancaire
This commit is contained in:
parent
4aa101e9fc
commit
fb0732be28
@ -43,6 +43,11 @@ $vline=isset($_GET["vline"])?$_GET["vline"]:$_POST["vline"];
|
|||||||
$action=isset($_GET["action"])?$_GET["action"]:$_POST["action"];
|
$action=isset($_GET["action"])?$_GET["action"]:$_POST["action"];
|
||||||
$page=isset($_GET["page"])?$_GET["page"]:0;
|
$page=isset($_GET["page"])?$_GET["page"]:0;
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Action
|
||||||
|
*/
|
||||||
|
|
||||||
if ($_POST["action"] == 'add' && $account && ! isset($_POST["cancel"]))
|
if ($_POST["action"] == 'add' && $account && ! isset($_POST["cancel"]))
|
||||||
{
|
{
|
||||||
if ($_POST["credit"] > 0)
|
if ($_POST["credit"] > 0)
|
||||||
@ -63,16 +68,15 @@ if ($_POST["action"] == 'add' && $account && ! isset($_POST["cancel"]))
|
|||||||
|
|
||||||
$acct=new Account($db,$account);
|
$acct=new Account($db,$account);
|
||||||
|
|
||||||
$insertid = $acct->addline($dateop, $operation, $label, $amount, $num_chq, $cat1);
|
$insertid = $acct->addline($dateop, $operation, $label, $amount, $num_chq, $cat1, $user);
|
||||||
|
if ($insertid > 0)
|
||||||
if ($insertid)
|
|
||||||
{
|
{
|
||||||
Header("Location: account.php?account=" . $account);
|
Header("Location: account.php?account=" . $account);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dolibarr_print_error($db);
|
dolibarr_print_error($db,$acct->error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($_GET["action"] == 'del' && $account && $user->rights->banque->modifier)
|
if ($_GET["action"] == 'del' && $account && $user->rights->banque->modifier)
|
||||||
@ -82,6 +86,9 @@ if ($_GET["action"] == 'del' && $account && $user->rights->banque->modifier)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Affichage page
|
||||||
|
*/
|
||||||
|
|
||||||
llxHeader();
|
llxHeader();
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user