X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fgl.pl;h=075a397d858ecaa3b58e310f76ff4fc9e335daf1;hb=91e45c035d896c80b7405a037ded84fc89e28c5a;hp=bceb08f70e6a51624f4ef90334690b5e6820f4a8;hpb=bfcc910a2d617eabdd9962d705f97b9721d98a18;p=kivitendo-erp.git diff --git a/bin/mozilla/gl.pl b/bin/mozilla/gl.pl index bceb08f70..075a397d8 100644 --- a/bin/mozilla/gl.pl +++ b/bin/mozilla/gl.pl @@ -32,13 +32,14 @@ #====================================================================== use POSIX qw(strftime); +use List::Util qw(sum); +use SL::FU; use SL::GL; use SL::IS; use SL::PE; use SL::ReportGenerator; -require "bin/mozilla/arap.pl"; require "bin/mozilla/common.pl"; require "bin/mozilla/reportgenerator.pl"; @@ -77,11 +78,11 @@ require "bin/mozilla/reportgenerator.pl"; sub add { $lxdebug->enter_sub(); + $auth->assert('general_ledger'); + $form->{title} = "Add"; - $form->{callback} = - "$form->{script}?action=add&login=$form->{login}&password=$form->{password}" - unless $form->{callback}; + $form->{callback} = "gl.pl?action=add" unless $form->{callback}; # we use this only to set a default date GL->transaction(\%myconfig, \%$form); @@ -119,6 +120,8 @@ sub add { sub prepare_transaction { $lxdebug->enter_sub(); + $auth->assert('general_ledger'); + GL->transaction(\%myconfig, \%$form); map { @@ -191,6 +194,8 @@ sub prepare_transaction { sub edit { $lxdebug->enter_sub(); + $auth->assert('general_ledger'); + prepare_transaction(); $form->{title} = "Edit"; @@ -208,6 +213,8 @@ sub edit { sub search { $lxdebug->enter_sub(); + $auth->assert('general_ledger'); + $form->{title} = $locale->text('Journal'); $form->all_departments(\%myconfig); @@ -281,7 +288,7 @@ sub search { print qq|
-