X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Fgl.pl;h=7516cf8d11e5d42e995ff0c53766396127f2f713;hb=f75b552e93cc451f08caa845e7e0e5f34aaf44cf;hp=5069cefa7f89fd26cfbab3999b07fa99c7fd153b;hpb=9aaca43317d3ea33d80a308cab7ce4c20d732a16;p=kivitendo-erp.git diff --git a/bin/mozilla/gl.pl b/bin/mozilla/gl.pl index 5069cefa7..7516cf8d1 100644 --- a/bin/mozilla/gl.pl +++ b/bin/mozilla/gl.pl @@ -32,14 +32,16 @@ #====================================================================== 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/drafts.pl"; require "bin/mozilla/reportgenerator.pl"; 1; @@ -77,11 +79,13 @@ require "bin/mozilla/reportgenerator.pl"; sub add { $lxdebug->enter_sub(); + $auth->assert('general_ledger'); + + return $lxdebug->leave_sub() if (load_draft_maybe()); + $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 +123,8 @@ sub add { sub prepare_transaction { $lxdebug->enter_sub(); + $auth->assert('general_ledger'); + GL->transaction(\%myconfig, \%$form); map { @@ -191,6 +197,8 @@ sub prepare_transaction { sub edit { $lxdebug->enter_sub(); + $auth->assert('general_ledger'); + prepare_transaction(); $form->{title} = "Edit"; @@ -208,6 +216,8 @@ sub edit { sub search { $lxdebug->enter_sub(); + $auth->assert('general_ledger'); + $form->{title} = $locale->text('Journal'); $form->all_departments(\%myconfig); @@ -253,7 +263,7 @@ sub search { $button1 = qq|