projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge remote branch 'origin/master'
[kivitendo-erp.git]
/
bin
/
mozilla
/
ar.pl
diff --git
a/bin/mozilla/ar.pl
b/bin/mozilla/ar.pl
index
45193ed
..
80c87f9
100644
(file)
--- 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::FU;
use SL::IS;
use SL::PE;
+use SL::DB::Default;
use SL::ReportGenerator;
require "bin/mozilla/arap.pl";
use SL::ReportGenerator;
require "bin/mozilla/arap.pl";
@@
-160,9
+161,6
@@
sub create_links {
$form->{oldcustomer} = "$form->{customer}--$form->{customer_id}";
$form->{rowcount} = 1;
$form->{oldcustomer} = "$form->{customer}--$form->{customer_id}";
$form->{rowcount} = 1;
- # notes
- $form->{notes} = $form->{intnotes} unless $form->{notes};
-
# currencies
$form->{defaultcurrency} = $form->get_default_currency(\%myconfig);
# currencies
$form->{defaultcurrency} = $form->get_default_currency(\%myconfig);
@@
-219,7
+217,6
@@
sub form_header {
my ($title, $readonly, $exchangerate, $rows);
my ($notes, $department, $customer, $employee, $amount, $project);
my ($title, $readonly, $exchangerate, $rows);
my ($notes, $department, $customer, $employee, $amount, $project);
- my ($onload);
my ($ARselected);
my ($ARselected);
@@
-252,7
+249,9
@@
sub form_header {
#/show history button js
$readonly = ($form->{id}) ? "readonly" : "";
#/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
$readonly = ($form->{radier}) ? "" : $readonly;
# set option selected
@@
-316,7
+315,7
@@
sub form_header {
$taxcharts{$item->{id}} = $item;
}
$taxcharts{$item->{id}} = $item;
}
- $
form->{fokus} = "arledger.customer"
;
+ $
::request->{layout}->focus("#customer")
;
my $follow_up_vc = $form->{customer};
$follow_up_vc =~ s/--.*?//;
my $follow_up_vc = $form->{customer};
$follow_up_vc =~ s/--.*?//;
@@
-326,9
+325,6
@@
sub form_header {
qq|<script type="text/javascript" src="js/show_vc_details.js"></script>| .
qq|<script type="text/javascript" src="js/follow_up.js"></script>|;
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');
# $amount = $locale->text('Amount');
# $project = $locale->text('Project');
@@
-425,8
+421,8
@@
sub form_header {
$payment->{changeable} =
$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;
: 1;
push @payments, $payment;
@@
-443,7
+439,6
@@
sub form_header {
project_labels => \%project_labels,
rows => $rows,
ARselected => $ARselected,
project_labels => \%project_labels,
rows => $rows,
ARselected => $ARselected,
- onload => $onload,
title_str => $title,
follow_up_trans_info => $follow_up_trans_info,
});
title_str => $title,
follow_up_trans_info => $follow_up_trans_info,
});
@@
-529,17
+524,13
@@
$follow_ups_block
}
}
}
}
- 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
# 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|">|;
}
print qq|<input type="submit" class="submit" name="action" value="|
. $locale->text('mark as paid') . qq|">|;
}
@@
-547,9
+538,6
@@
$follow_ups_block
print "
</form>
print "
</form>
-
-</body>
-</html>
";
$main::lxdebug->leave_sub();
";
$main::lxdebug->leave_sub();
@@
-626,13
+614,10
@@
sub update {
$form->{invdate} = $form->{transdate};
$form->{invdate} = $form->{transdate};
- my %saved_variables = map +( $_ => $form->{$_} ), qw(AR AR_amount_1 taxchart_1 customer_id);
+ my %saved_variables = map +( $_ => $form->{$_} ), qw(AR AR_amount_1 taxchart_1 customer_id
notes
);
&check_name("customer");
&check_name("customer");
- # check_name loads customer notes into notes, but ar only knows intnotes, so copy them
- $form->{notes} = $form->{intnotes} if $saved_variables{customer_id} != $form->{customer_id};
-
$form->{AR} = $saved_variables{AR};
if ($saved_variables{AR_amount_1} =~ m/.--./) {
map { $form->{$_} = $saved_variables{$_} } qw(AR_amount_1 taxchart_1);
$form->{AR} = $saved_variables{AR};
if ($saved_variables{AR_amount_1} =~ m/.--./) {
map { $form->{$_} = $saved_variables{$_} } qw(AR_amount_1 taxchart_1);
@@
-850,8
+835,6
@@
sub delete {
delete $form->{header};
print qq|
delete $form->{header};
print qq|
-<body>
-
<form method=post action=$form->{script}>
|;
<form method=post action=$form->{script}>
|;
@@
-871,9
+854,6
@@
sub delete {
<input name=action class=submit type=submit value="|
. $locale->text('Yes') . qq|">
</form>
<input name=action class=submit type=submit value="|
. $locale->text('Yes') . qq|">
</form>
-
-</body>
-</html>
|;
$main::lxdebug->leave_sub();
|;
$main::lxdebug->leave_sub();
@@
-914,7
+894,7
@@
sub search {
my $cgi = $::request->{cgi};
my ($customer, $department);
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");
# setup customer selection
$form->all_vc(\%myconfig, "customer", "AR");