X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Fir.pl;h=239a85942c779390c936292a1033d135159523d9;hb=a6c9465ac8cd4b35644f14ffec8bdb65a6093056;hp=c9624ccb3035b25ea14f1f0406e0195a006a8f68;hpb=e06a7e08648363ef8c8ef14678ab853ae7bdd670;p=kivitendo-erp.git
diff --git a/bin/mozilla/ir.pl b/bin/mozilla/ir.pl
index c9624ccb3..239a85942 100644
--- a/bin/mozilla/ir.pl
+++ b/bin/mozilla/ir.pl
@@ -31,11 +31,14 @@
#
#======================================================================
+use SL::FU;
use SL::IR;
use SL::IS;
use SL::PE;
+use List::Util qw(max sum);
require "bin/mozilla/io.pl";
+require "bin/mozilla/invoice_io.pl";
require "bin/mozilla/arap.pl";
require "bin/mozilla/common.pl";
require "bin/mozilla/drafts.pl";
@@ -47,6 +50,8 @@ require "bin/mozilla/drafts.pl";
sub add {
$lxdebug->enter_sub();
+ $auth->assert('vendor_invoice_edit');
+
return $lxdebug->leave_sub() if (load_draft_maybe());
$form->{title} = $locale->text('Add Vendor Invoice');
@@ -60,7 +65,9 @@ sub add {
sub edit {
$lxdebug->enter_sub();
-
+
+ $auth->assert('vendor_invoice_edit');
+
# show history button
$form->{javascript} = qq||;
#/show hhistory button
@@ -77,6 +84,8 @@ sub edit {
sub invoice_links {
$lxdebug->enter_sub();
+ $auth->assert('vendor_invoice_edit');
+
# create links
$form->{webdav} = $webdav;
$form->{jsscript} = 1;
@@ -122,13 +131,6 @@ sub invoice_links {
$form->{oldvendor} = "$form->{vendor}--$form->{vendor_id}";
- # vendors
- if (@{ $form->{all_vendor} }) {
- $form->{vendor} = "$form->{vendor}--$form->{vendor_id}";
- map { $form->{selectvendor} .= "
@@ -1150,6 +1165,7 @@ sub delete {
map { delete $form->{$_} } qw(action header);
foreach $key (keys %$form) {
+ next if (($key eq 'login') || ($key eq 'password') || ('' ne ref $form->{$key}));
$form->{$key} =~ s/\"/"/g;
print qq|\n|;
}
@@ -1171,6 +1187,9 @@ sub delete {
sub yes {
$lxdebug->enter_sub();
+
+ $auth->assert('vendor_invoice_edit');
+
if (IR->delete_invoice(\%myconfig, \%$form)) {
# saving the history
if(!exists $form->{addition}) {