From 7d580f6046917fa63c4799f5219fae6ac425856f Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Sun, 8 Sep 2019 00:27:24 +0200 Subject: [PATCH] Correct Add button for ledger when creating FIN ledger --- include/class/acc_ledger.class.php | 2 ++ include/template/param_jrn.php | 1 + 2 files changed, 3 insertions(+) diff --git a/include/class/acc_ledger.class.php b/include/class/acc_ledger.class.php index ad72cfcb3..6f90ead07 100644 --- a/include/class/acc_ledger.class.php +++ b/include/class/acc_ledger.class.php @@ -2463,6 +2463,7 @@ class Acc_Ledger extends jrn_def_sql */ function input_new() { + global $g_user; $http=new HttpInput(); $retry=$http->post("sa", "string", ""); // if ( $retry == "add") { @@ -2480,6 +2481,7 @@ class Acc_Ledger extends jrn_def_sql $f_add_button->javascript=" this.jrn=-1;select_card_type({type_cat:4});"; $str_add_button=""; + if ($g_user->check_action(FICADD)==1) { $str_add_button=$f_add_button->input(); diff --git a/include/template/param_jrn.php b/include/template/param_jrn.php index b5af8cec9..6c73529d9 100644 --- a/include/template/param_jrn.php +++ b/include/template/param_jrn.php @@ -68,6 +68,7 @@ if ( $new|| $type=='FIN') : echo $card->search(); echo $card->input(); echo $str_add_button; + ?>