X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=inline;f=bin%2Fmozilla%2Far.pl;h=834e1b18e405f0f2d7a46b4cc2cc712207f39ef9;hb=4ac2976f86e7747ecf69a4e7b64f155343e984ae;hp=1e6c6780f1895d550d062583504fd1a3208b5679;hpb=f7f03503cfc22a15f5497d09dd9215c10c1d39b1;p=kivitendo-erp.git
diff --git a/bin/mozilla/ar.pl b/bin/mozilla/ar.pl
index 1e6c6780f..834e1b18e 100644
--- a/bin/mozilla/ar.pl
+++ b/bin/mozilla/ar.pl
@@ -38,6 +38,7 @@ use SL::AR;
use SL::FU;
use SL::IS;
use SL::PE;
+use SL::DB::Default;
use SL::ReportGenerator;
require "bin/mozilla/arap.pl";
@@ -219,7 +220,6 @@ sub form_header {
my ($title, $readonly, $exchangerate, $rows);
my ($notes, $department, $customer, $employee, $amount, $project);
- my ($onload);
my ($ARselected);
@@ -252,7 +252,9 @@ sub form_header {
#/show history button js
$readonly = ($form->{id}) ? "readonly" : "";
- $form->{radier} = ($form->current_date(\%myconfig) eq $form->{gldate}) ? 1 : 0;
+ $form->{radier} = ($::instance_conf->get_ar_changeable == 2)
+ ? ($form->current_date(\%myconfig) eq $form->{gldate})
+ : ($::instance_conf->get_ar_changeable == 1);
$readonly = ($form->{radier}) ? "" : $readonly;
# set option selected
@@ -316,7 +318,7 @@ sub form_header {
$taxcharts{$item->{id}} = $item;
}
- $form->{fokus} = "arledger.customer";
+ $::request->{layout}->focus("#customer");
my $follow_up_vc = $form->{customer};
$follow_up_vc =~ s/--.*?//;
@@ -326,8 +328,6 @@ sub form_header {
qq|| .
qq||;
- $onload = qq|focus()|;
-
# $amount = $locale->text('Amount');
# $project = $locale->text('Project');
@@ -424,8 +424,8 @@ sub form_header {
$payment->{changeable} =
- $::lx_office_conf{features}->{payments_changeable} == 0 ? !$payment->{acc_trans_id} # never
- : $::lx_office_conf{features}->{payments_changeable} == 2 ? $payment->{gldate} eq '' || $payment->{gldate} eq $now
+ SL::DB::Default->get->payments_changeable == 0 ? !$payment->{acc_trans_id} # never
+ : SL::DB::Default->get->payments_changeable == 2 ? $payment->{gldate} eq '' || $payment->{gldate} eq $now
: 1;
push @payments, $payment;
@@ -442,7 +442,6 @@ sub form_header {
project_labels => \%project_labels,
rows => $rows,
ARselected => $ARselected,
- onload => $onload,
title_str => $title,
follow_up_trans_info => $follow_up_trans_info,
});
@@ -528,10 +527,6 @@ $follow_ups_block
}
}
- if ($form->{menubar}) {
- require "bin/mozilla/menu.pl";
- &menubar;
- }
# button for saving history
if($form->{id} ne "") {
print qq| {id}); name=history id=history value=| . $locale->text('history') . qq|> |;
@@ -905,7 +900,7 @@ sub search {
my $cgi = $::request->{cgi};
my ($customer, $department);
- my ($jsscript, $button1, $button2, $onload);
+ my ($jsscript, $button1, $button2);
# setup customer selection
$form->all_vc(\%myconfig, "customer", "AR");