projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Steuersatz/taxzone aus Masken nicht überschreiben.
[kivitendo-erp.git]
/
SL
/
Form.pm
diff --git
a/SL/Form.pm
b/SL/Form.pm
index
14e3ed2
..
68b1681
100644
(file)
--- a/
SL/Form.pm
+++ b/
SL/Form.pm
@@
-251,6
+251,7
@@
sub new {
my $self = {};
my $self = {};
+ no warnings 'once';
if ($LXDebug::watch_form) {
require SL::Watchdog;
tie %{ $self }, 'SL::Watchdog';
if ($LXDebug::watch_form) {
require SL::Watchdog;
tie %{ $self }, 'SL::Watchdog';
@@
-842,10
+843,11
@@
sub _prepare_html_template {
$additional_params->{"conf_parts_image_css"} = $::lx_office_conf{features}->{parts_image_css};
$additional_params->{"conf_parts_listing_images"} = $::lx_office_conf{features}->{parts_listing_images};
$additional_params->{"conf_parts_show_image"} = $::lx_office_conf{features}->{parts_show_image};
$additional_params->{"conf_parts_image_css"} = $::lx_office_conf{features}->{parts_image_css};
$additional_params->{"conf_parts_listing_images"} = $::lx_office_conf{features}->{parts_listing_images};
$additional_params->{"conf_parts_show_image"} = $::lx_office_conf{features}->{parts_show_image};
+ $additional_params->{"conf_payments_changeable"} = $::lx_office_conf{features}->{payments_changeable};
$additional_params->{"INSTANCE_CONF"} = $::instance_conf;
$additional_params->{"INSTANCE_CONF"} = $::instance_conf;
- if (
%main::debug_options
) {
- map { $additional_params->{'DEBUG_' . uc($_)} = $
main::debug_options{$_} } keys %main::
debug_options;
+ if (
my $debug_options = $::lx_office_conf{debug}{options}
) {
+ map { $additional_params->{'DEBUG_' . uc($_)} = $
debug_options->{$_} } keys %$
debug_options;
}
if ($main::auth && $main::auth->{RIGHTS} && $main::auth->{RIGHTS}->{$self->{login}}) {
}
if ($main::auth && $main::auth->{RIGHTS} && $main::auth->{RIGHTS}->{$self->{login}}) {
@@
-1116,8
+1118,7
@@
sub format_amount_units {
return '';
}
return '';
}
- AM->retrieve_all_units();
- my $all_units = $main::all_units;
+ my $all_units = AM->retrieve_all_units;
if (('' eq ref $conv_units) && ($conv_units =~ /convertible/)) {
$conv_units = AM->convertible_units($all_units, $part_unit_name, $conv_units eq 'convertible_not_smaller');
if (('' eq ref $conv_units) && ($conv_units =~ /convertible/)) {
$conv_units = AM->convertible_units($all_units, $part_unit_name, $conv_units eq 'convertible_not_smaller');
@@
-1314,26
+1315,25
@@
sub parse_template {
if ($template->uses_temp_file() || $self->{media} eq 'email') {
$out = $self->{OUT};
if ($template->uses_temp_file() || $self->{media} eq 'email') {
$out = $self->{OUT};
- $self->{OUT} = "
>
$self->{tmpfile}";
+ $self->{OUT} = "$self->{tmpfile}";
}
my $result;
if ($self->{OUT}) {
}
my $result;
if ($self->{OUT}) {
- open OUT, "$self->{OUT}" or $self->error("$self->{OUT} : $!");
- $result = $template->parse(*OUT);
- close OUT;
-
+ open(OUT, ">", $self->{OUT}) or $self->error("$self->{OUT} : $!");
} else {
} else {
+ open(OUT, ">&", \*STDOUT) or $self->error("STDOUT : $!");
$self->header;
$self->header;
- $result = $template->parse(*STDOUT);
}
}
- if (!$
result
) {
+ if (!$
template->parse(*OUT)
) {
$self->cleanup();
$self->error("$self->{IN} : " . $template->get_error());
}
$self->cleanup();
$self->error("$self->{IN} : " . $template->get_error());
}
+ close OUT;
+
if ($self->{media} eq 'file') {
copy(join('/', $self->{cwd}, $userspath, $self->{tmpfile}), $out =~ m|^/| ? $out : join('/', $self->{cwd}, $out)) if $template->uses_temp_file;
$self->cleanup;
if ($self->{media} eq 'file') {
copy(join('/', $self->{cwd}, $userspath, $self->{tmpfile}), $out =~ m|^/| ? $out : join('/', $self->{cwd}, $out)) if $template->uses_temp_file;
$self->cleanup;
@@
-1367,7
+1367,7
@@
sub parse_template {
$myconfig->{signature} =~ s/\n/<br>\n/g;
$mail->{message} .= "<br>\n-- <br>\n$myconfig->{signature}\n<br>";
$myconfig->{signature} =~ s/\n/<br>\n/g;
$mail->{message} .= "<br>\n-- <br>\n$myconfig->{signature}\n<br>";
- open(IN, $self->{tmpfile})
+ open(IN,
"<",
$self->{tmpfile})
or $self->error($self->cleanup . "$self->{tmpfile} : $!");
while (<IN>) {
$mail->{message} .= $_;
or $self->error($self->cleanup . "$self->{tmpfile} : $!");
while (<IN>) {
$mail->{message} .= $_;
@@
-1397,7
+1397,7
@@
sub parse_template {
$self->{OUT} = $out;
my $numbytes = (-s $self->{tmpfile});
$self->{OUT} = $out;
my $numbytes = (-s $self->{tmpfile});
- open(IN, $self->{tmpfile})
+ open(IN,
"<",
$self->{tmpfile})
or $self->error($self->cleanup . "$self->{tmpfile} : $!");
binmode IN;
or $self->error($self->cleanup . "$self->{tmpfile} : $!");
binmode IN;
@@
-1408,7
+1408,7
@@
sub parse_template {
#print(STDERR "OUT $self->{OUT}\n");
for my $i (1 .. $self->{copies}) {
if ($self->{OUT}) {
#print(STDERR "OUT $self->{OUT}\n");
for my $i (1 .. $self->{copies}) {
if ($self->{OUT}) {
- open OUT, $self->{OUT} or $self->error($self->cleanup . "$self->{OUT} : $!");
+ open OUT,
'>',
$self->{OUT} or $self->error($self->cleanup . "$self->{OUT} : $!");
print OUT while <IN>;
close OUT;
seek IN, 0, 0;
print OUT while <IN>;
close OUT;
seek IN, 0, 0;
@@
-1537,12
+1537,17
@@
sub generate_email_subject {
sub cleanup {
$main::lxdebug->enter_sub();
sub cleanup {
$main::lxdebug->enter_sub();
- my $self = shift;
+ my ($self, $application) = @_;
+
+ my $error_code = $?;
chdir("$self->{tmpdir}");
my @err = ();
chdir("$self->{tmpdir}");
my @err = ();
- if (-f "$self->{tmpfile}.err") {
+ if ((-1 == $error_code) || (127 == (($error_code) >> 8))) {
+ push @err, $::locale->text('The application "#1" was not found on the system.', $application || 'pdflatex') . ' ' . $::locale->text('Please contact your administrator.');
+
+ } elsif (-f "$self->{tmpfile}.err") {
open(FH, "$self->{tmpfile}.err");
@err = <FH>;
close(FH);
open(FH, "$self->{tmpfile}.err");
@err = <FH>;
close(FH);
@@
-2986,7
+2991,7
@@
sub create_links {
$query =
qq|SELECT
c.accno, c.description,
$query =
qq|SELECT
c.accno, c.description,
- a.source, a.amount, a.memo, a.transdate, a.gldate, a.cleared, a.project_id, a.taxkey,
+ a.
acc_trans_id, a.
source, a.amount, a.memo, a.transdate, a.gldate, a.cleared, a.project_id, a.taxkey,
p.projectnumber,
t.rate, t.id
FROM acc_trans a
p.projectnumber,
t.rate, t.id
FROM acc_trans a