use SL::FU;
use SL::IS;
use SL::PE;
+use SL::DB::Default;
use SL::ReportGenerator;
require "bin/mozilla/arap.pl";
my ($title, $readonly, $exchangerate, $rows);
my ($notes, $department, $customer, $employee, $amount, $project);
- my ($onload);
my ($ARselected);
#/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
$taxcharts{$item->{id}} = $item;
}
- $form->{fokus} = "arledger.customer";
+ $::request->{layout}->focus("#customer");
my $follow_up_vc = $form->{customer};
$follow_up_vc =~ s/--.*?//;
qq|<script type="text/javascript" src="js/show_vc_details.js"></script>| .
qq|<script type="text/javascript" src="js/follow_up.js"></script>|;
- $onload = qq|focus()|;
- $onload .= qq|;setupPoints('|. $myconfig{numberformat} .qq|', '|. $locale->text("wrongformat") .qq|')|;
-
# $amount = $locale->text('Amount');
# $project = $locale->text('Project');
$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;
project_labels => \%project_labels,
rows => $rows,
ARselected => $ARselected,
- onload => $onload,
title_str => $title,
follow_up_trans_info => $follow_up_trans_info,
});
}
}
- if ($form->{menubar}) {
- require "bin/mozilla/menu.pl";
- &menubar;
- }
# button for saving history
if($form->{id} ne "") {
print qq| <input type=button class=submit onclick=set_history_window($form->{id}); name=history id=history value=| . $locale->text('history') . qq|> |;
}
# /button for saving history
# mark_as_paid button
- if($form->{id} ne "") {
+ if(($form->{id} ne "") && $::instance_conf->get_ar_show_mark_as_paid) {
print qq|<input type="submit" class="submit" name="action" value="|
. $locale->text('mark as paid') . qq|">|;
}
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");