X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fir.pl;h=3f67961acbb33b7294a375f30a544dd8230431ec;hb=72f018a6943ea8776f163e12f37bc0d91000b9aa;hp=0a468615e5ad037e1c1f6f84f735f47e0c191eee;hpb=787062c9172e3eca0756c21d9cc5652e44e5a643;p=kivitendo-erp.git diff --git a/bin/mozilla/ir.pl b/bin/mozilla/ir.pl index 0a468615e..3f67961ac 100644 --- a/bin/mozilla/ir.pl +++ b/bin/mozilla/ir.pl @@ -35,6 +35,7 @@ use SL::FU; use SL::IR; use SL::IS; use SL::PE; +use SL::DB::Default; use List::Util qw(max sum); require "bin/mozilla/io.pl"; @@ -357,6 +358,7 @@ sub form_header { map { $_.'_rate', $_.'_description', $_.'_taxnumber' } split / /, $form->{taxaccounts}]; $form->{jsscript} = 1; + $::request->layout->use_stylesheet('presenter/record/record_list.css'); $form->header(); print $form->parse_html_template("ir/form_header", \%TMPL_VAR); @@ -415,10 +417,10 @@ sub form_footer { for my $i (1 .. $form->{paidaccounts}) { $form->{"changeable_$i"} = 1; - if ($::lx_office_conf{features}->{payments_changeable} == 0) { + if (SL::DB::Default->get->payments_changeable == 0) { # never $form->{"changeable_$i"} = ($form->{"acc_trans_id_$i"})? 0 : 1; - } elsif ($::lx_office_conf{features}->{payments_changeable} == 2) { + } elsif (SL::DB::Default->get->payments_changeable == 2) { # on the same day $form->{"changeable_$i"} = (($form->{"gldate_$i"} eq '') || ($form->current_date(\%myconfig) eq $form->{"gldate_$i"})); @@ -439,7 +441,9 @@ sub form_footer { totalpaid => $totalpaid, paid_missing => $form->{invtotal} - $totalpaid, show_storno => $form->{id} && !$form->{storno} && !IS->has_storno(\%myconfig, $form, "ap") && !$totalpaid, - show_delete => ($form->current_date(\%myconfig) eq $form->{gldate}), + show_delete => ($::instance_conf->get_ir_changeable == 2) + ? ($form->current_date(\%myconfig) eq $form->{gldate}) + : ($::instance_conf->get_ir_changeable == 1), }); ##print $form->parse_html_template('ir/_payments'); # parser ##print $form->parse_html_template('webdav/_list'); # parser @@ -606,7 +610,7 @@ sub storno { } -sub use_as_template { +sub use_as_new { $main::lxdebug->enter_sub(); my $form = $main::form;