X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FForm.pm;h=a3990f9cb19db768b559cd0929cbc7552beedd84;hb=3cae447edd6ab367173b9aca8a168be236f9078c;hp=21817242701799503cb2e31a37aca46910a2977c;hpb=c29d964cf0a67d868e6877115bbbe0ae2eeb722e;p=kivitendo-erp.git diff --git a/SL/Form.pm b/SL/Form.pm index 218172427..a3990f9cb 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -673,6 +673,7 @@ sub init_template { 'COMPILE_EXT' => '.tcc', 'COMPILE_DIR' => $::lx_office_conf{paths}->{userspath} . '/templates-cache', 'ERROR' => 'templates/webpages/generic/exception.html', + 'ENCODING' => 'utf8', })) || die; } @@ -694,7 +695,6 @@ sub show_generic_error { } if ($::request->is_ajax) { - $::lxdebug->message(0, "trying to render AJAX response..."); SL::ClientJS->new ->error($error) ->render(SL::Controller::Base->new); @@ -3326,6 +3326,13 @@ sub prepare_for_printing { # compatibility. $self->{$_} = $defaults->$_ for qw(company address taxnumber co_ustid duns sepa_creditor_id); + $self->{"myconfig_${_}"} = $::myconfig{$_} for grep { $_ ne 'dbpasswd' } keys %::myconfig; + + if (!$self->{employee_id}) { + $self->{"employee_${_}"} = $::myconfig{$_} for qw(email tel fax name signature); + $self->{"employee_${_}"} = $defaults->$_ for qw(address businessnumber co_ustid company duns sepa_creditor_id taxnumber); + } + # set shipto from billto unless set my $has_shipto = any { $self->{"shipto$_"} } qw(name street zipcode city country contact); if (!$has_shipto && ($self->{type} =~ m/^(?:purchase_order|request_quotation)$/)) { @@ -3344,6 +3351,10 @@ sub prepare_for_printing { $output_longdates = 1; } + $self->{myconfig_output_dateformat} = $output_dateformat; + $self->{myconfig_output_longdates} = $output_longdates; + $self->{myconfig_output_numberformat} = $output_numberformat; + # Retrieve accounts for tax calculation. IC->retrieve_accounts(\%::myconfig, $self, map { $_ => $self->{"id_$_"} } 1 .. $self->{rowcount});