X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/8d771986641efbc83911b0ba007e6c240daea550..7647d46:/bin/mozilla/gl.pl diff --git a/bin/mozilla/gl.pl b/bin/mozilla/gl.pl index a46cad00c..a0a1a73f3 100644 --- a/bin/mozilla/gl.pl +++ b/bin/mozilla/gl.pl @@ -844,6 +844,10 @@ sub display_rows { } +sub _get_radieren { + return ($::instance_conf->get_gl_changeable == 2) ? ($::form->current_date(\%::myconfig) eq $::form->{gldate}) : ($::instance_conf->get_gl_changeable == 1); +} + sub form_header { $::lxdebug->enter_sub; $::auth->assert('general_ledger'); @@ -886,6 +890,7 @@ sub form_header { $::form->header; print $::form->parse_html_template('gl/form_header', { hide_title => $title, + readonly => $::form->{id} && ($::form->{locked} || !_get_radieren()), }); $::lxdebug->leave_sub; @@ -903,10 +908,8 @@ sub form_footer { $follow_ups_due = sum map { $_->{due} * 1 } @{ $follow_ups || [] }; } - my $radieren = $::form->current_date(\%::myconfig) eq $::form->{gldate}; - print $::form->parse_html_template('gl/form_footer', { - radieren => $radieren, + radieren => _get_radieren(), follow_ups => $follow_ups, follow_ups_due => $follow_ups_due, }); @@ -1075,7 +1078,8 @@ sub post_transaction { } if ($split_safety{-1} > 1 && $split_safety{1} > 1) { - $::form->error($::locale->text("Split entry detected. The values you have entered will result in an entry with more than one position on both debit and credit. Due to known problems involving accounting software Lx-Office does not allow these.")); + $::form->error($::locale->text("Split entry detected. The values you have entered will result in an entry with more than one position on both debit and credit. " . + "Due to known problems involving accounting software kivitendo does not allow these.")); } for my $i (1 .. $count) {