X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Far.pl;h=2094ead3ac34c7bce7ca99ec54a91d92392667e0;hb=09fe7f33a735ecc3f4a3112ad716f674983b00cc;hp=a86668c98645a0fe097c8ec1ef832b11e9c9e544;hpb=875f08f3a3e043b19a874e3fa3530d777017a754;p=kivitendo-erp.git diff --git a/bin/mozilla/ar.pl b/bin/mozilla/ar.pl index a86668c98..2094ead3a 100644 --- a/bin/mozilla/ar.pl +++ b/bin/mozilla/ar.pl @@ -40,20 +40,13 @@ use SL::IS; use SL::PE; use SL::ReportGenerator; -# use strict; -#use warnings; - -# imports -our ($cgi, $form, $lxdebug, $locale, %myconfig); - require "bin/mozilla/arap.pl"; require "bin/mozilla/common.pl"; require "bin/mozilla/drafts.pl"; require "bin/mozilla/reportgenerator.pl"; -1; - -# end of main +use strict; +#use warnings; # this is for our long dates # $locale->text('January') @@ -83,12 +76,17 @@ require "bin/mozilla/reportgenerator.pl"; # $locale->text('Nov') # $locale->text('Dec') +my $totalpaid; + sub add { - $lxdebug->enter_sub(); + $main::lxdebug->enter_sub(); - $auth->assert('general_ledger'); + $main::auth->assert('general_ledger'); - return $lxdebug->leave_sub() if (load_draft_maybe()); + my $form = $main::form; + my %myconfig = %main::myconfig; + + return $main::lxdebug->leave_sub() if (load_draft_maybe()); # saving the history if(!exists $form->{addition} && ($form->{id} ne "")) { @@ -106,13 +104,15 @@ sub add { &create_links; $form->{transdate} = $form->{initial_transdate}; &display_form; - $lxdebug->leave_sub(); + $main::lxdebug->leave_sub(); } sub edit { - $lxdebug->enter_sub(); + $main::lxdebug->enter_sub(); + + $main::auth->assert('general_ledger'); - $auth->assert('general_ledger'); + my $form = $main::form; # show history button $form->{javascript} = qq||; @@ -123,24 +123,29 @@ sub edit { &create_links; &display_form; - $lxdebug->leave_sub(); + $main::lxdebug->leave_sub(); } sub display_form { - $lxdebug->enter_sub(); + $main::lxdebug->enter_sub(); - $auth->assert('general_ledger'); + $main::auth->assert('general_ledger'); + + my $form = $main::form; &form_header; &form_footer; - $lxdebug->leave_sub(); + $main::lxdebug->leave_sub(); } sub create_links { - $lxdebug->enter_sub(); + $main::lxdebug->enter_sub(); + + $main::auth->assert('general_ledger'); - $auth->assert('general_ledger'); + my $form = $main::form; + my %myconfig = %main::myconfig; my ($duedate, $taxincluded, @curr); @@ -168,30 +173,30 @@ sub create_links { map { $form->{selectcurrency} .= "