X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=inline;f=bin%2Fmozilla%2Fcp.pl;h=6a21edecbbf1990eed7f7a3320ebeb7d85702136;hb=61ab3c630bf655d54cb44f70f871eed5879f9693;hp=2e58c8f833cad333b921c96cd5b7664d05596744;hpb=546480e0d8c4684288967aa54b80207d5c57a71a;p=kivitendo-erp.git diff --git a/bin/mozilla/cp.pl b/bin/mozilla/cp.pl index 2e58c8f83..6a21edecb 100644 --- a/bin/mozilla/cp.pl +++ b/bin/mozilla/cp.pl @@ -36,7 +36,13 @@ use SL::OP; use SL::IS; use SL::IR; -require "$form->{path}/arap.pl"; +use strict ("vars", "subs"); +#use warnings; + +require "bin/mozilla/arap.pl"; +require "bin/mozilla/common.pl"; + +our ($form, %myconfig, $lxdebug, $locale, $auth); 1; @@ -45,6 +51,10 @@ require "$form->{path}/arap.pl"; sub payment { $lxdebug->enter_sub(); + $auth->assert('cash'); + + my (@curr); + $form->{ARAP} = ($form->{type} eq 'receipt') ? "AR" : "AP"; $form->{arap} = lc $form->{ARAP}; @@ -106,6 +116,11 @@ sub payment { sub form_header { $lxdebug->enter_sub(); + $auth->assert('cash'); + + my ($vc, $vclabel, $allvc, $arap, $department, $exchangerate); + my ($jsscript, $button1, $button2, $onload); + $vclabel = ucfirst $form->{vc}; $vclabel = $locale->text($vclabel); @@ -145,7 +160,7 @@ sub form_header { } } - foreach $item ($form->{vc}, account, currency, $form->{ARAP}, department) { + foreach my $item ($form->{vc}, "account", "currency", $form->{ARAP}, "department") { $form->{"select$item"} =~ s/ selected//; $form->{"select$item"} =~ s/option>\Q$form->{$item}\E/option selected>$form->{$item}/; @@ -167,23 +182,13 @@ sub form_header { # $locale->text('AR') # $locale->text('AP') - $department = qq| -