X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fir.pl;fp=bin%2Fmozilla%2Fir.pl;h=b0df30c44a13fc6e43e4123e64f439e525090c55;hb=b293ff8ad52fc76ba0c44783e3982418114d6b08;hp=cca6d12f1acaad9381f36fd1c63b6e18469f5f3d;hpb=d4925a8b60f04674885e30d9316dc0263f8b9a84;p=kivitendo-erp.git diff --git a/bin/mozilla/ir.pl b/bin/mozilla/ir.pl index cca6d12f1..b0df30c44 100644 --- a/bin/mozilla/ir.pl +++ b/bin/mozilla/ir.pl @@ -34,6 +34,7 @@ use SL::FU; use SL::Helper::Flash qw(flash_later); +use SL::Helper::UserPreferences::DisplayPreferences; use SL::IR; use SL::IS; use SL::DB::BankTransactionAccTrans; @@ -56,9 +57,10 @@ use strict; # end of main sub _may_view_or_edit_this_invoice { - return 1 if $::auth->assert('ap_transactions', 1); # may edit all invoices - return 0 if !$::form->{id}; # creating new invoices isn't allowed without invoice_edit - return 0 if !$::form->{globalproject_id}; # existing records without a project ID are not allowed + return 1 if $::auth->assert('ap_transactions', 1); # may edit all invoices + return 0 if !$::form->{id}; # creating new invoices isn't allowed without invoice_edit + return 1 if $::auth->assert('purchase_invoice_view', 1); # viewing is allowed with this right + return 0 if !$::form->{globalproject_id}; # existing records without a project ID are not allowed return SL::DB::Project->new(id => $::form->{globalproject_id})->load->may_employee_view_project_invoices(SL::DB::Manager::Employee->current); } @@ -455,9 +457,10 @@ sub form_header { $form->{"select$item"} =~ s/option>\Q$form->{$item}\E/option selected>$form->{$item}/; } - $TMPL_VAR{is_format_html} = $form->{format} eq 'html'; - $TMPL_VAR{dateformat} = $myconfig{dateformat}; - $TMPL_VAR{numberformat} = $myconfig{numberformat}; + $TMPL_VAR{is_format_html} = $form->{format} eq 'html'; + $TMPL_VAR{dateformat} = $myconfig{dateformat}; + $TMPL_VAR{numberformat} = $myconfig{numberformat}; + $TMPL_VAR{longdescription_dialog_size_percentage} = SL::Helper::UserPreferences::DisplayPreferences->new()->get_longdescription_dialog_size_percentage(); # hiddens $TMPL_VAR{HIDDENS} = [qw(