X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Far.pl;h=2094ead3ac34c7bce7ca99ec54a91d92392667e0;hb=09fe7f33a735ecc3f4a3112ad716f674983b00cc;hp=528d2c4edd6fde7a09d05bb1a46d3ec8366ac5c7;hpb=4077825982a622b654888a20121c845d0e15c9c3;p=kivitendo-erp.git
diff --git a/bin/mozilla/ar.pl b/bin/mozilla/ar.pl
index 528d2c4ed..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 "")) {
@@ -96,8 +94,8 @@ sub add {
$form->{addition} = "ADDED";
$form->save_history($form->dbconnect(\%myconfig));
}
- # /saving the history
-
+ # /saving the history
+
$form->{title} = "Add";
$form->{callback} = "ar.pl?action=add" unless $form->{callback};
@@ -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();
- $auth->assert('general_ledger');
+ $main::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();
+
+ $main::auth->assert('general_ledger');
- $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();
- $auth->assert('general_ledger');
+ $main::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} .= "