X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FForm.pm;h=3e9704fd241861f0d3b8bc9112a13918bac31d75;hb=8dd087bfc7c8947308b170c666682f6dec1ea30d;hp=591e02df3e61108a6debb8da5bde601b298d4a5e;hpb=ddb162b67dbd1c97df9a6f60608dd7cd0ff6f811;p=kivitendo-erp.git diff --git a/SL/Form.pm b/SL/Form.pm index 591e02df3..3e9704fd2 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -56,6 +56,7 @@ use SL::DBUtils; use SL::DO; use SL::IC; use SL::IS; +use SL::Layout::Dispatcher; use SL::Locale; use SL::Mailer; use SL::Menu; @@ -457,12 +458,13 @@ sub header { $::lxdebug->leave_sub and return if !$ENV{HTTP_USER_AGENT} || $self->{header}++; if ($params{no_layout}) { - $::request->{layout} = SL::Controller::Layout->new(style => 'none'); + $::request->{layout} = SL::Layout::Dispatcher->new(style => 'none'); } my $layout = $::request->{layout}; # standard css for all + # this should gradually move to the layouts that need it $layout->use_stylesheet("$_.css") for qw( main menu tabcontent list_accounts jquery.autocomplete jquery.multiselect2side frame_header/header @@ -632,11 +634,9 @@ sub _prepare_html_template { $additional_params->{"conf_latex_templates"} = $::lx_office_conf{print_templates}->{latex}; $additional_params->{"conf_opendocument_templates"} = $::lx_office_conf{print_templates}->{opendocument}; $additional_params->{"conf_vertreter"} = $::lx_office_conf{features}->{vertreter}; - $additional_params->{"conf_show_best_before"} = $::lx_office_conf{features}->{show_best_before}; $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; if (my $debug_options = $::lx_office_conf{debug}{options}) { @@ -1095,6 +1095,7 @@ sub parse_template { UNLINK => ($::lx_office_conf{debug} && $::lx_office_conf{debug}->{keep_temp_files})? 0 : 1, ); close $temp_fh; + (undef, undef, $self->{template_meta}{tmpfile}) = File::Spec->splitpath( $self->{tmpfile} ); if ($template->uses_temp_file() || $self->{media} eq 'email') { $out = $self->{OUT}; @@ -1606,7 +1607,7 @@ sub get_exchangerate { my ($self, $dbh, $curr, $transdate, $fld) = @_; my ($query); - unless ($transdate) { + unless ($transdate && $curr) { $main::lxdebug->leave_sub(); return 1; } @@ -1739,10 +1740,9 @@ sub set_payment_options { $amounts{invtotal} = $self->{invtotal}; $amounts{total} = $self->{total}; } - $amounts{skonto_in_percent} = 100.0 * $self->{percent_skonto}; - map { $amounts{$_} = $self->parse_amount($myconfig, $amounts{$_}) } keys %amounts; + $amounts{skonto_in_percent} = 100.0 * $self->{percent_skonto}; $amounts{skonto_amount} = $amounts{invtotal} * $self->{percent_skonto}; $amounts{invtotal_wo_skonto} = $amounts{invtotal} * (1 - $self->{percent_skonto}); $amounts{total_wo_skonto} = $amounts{total} * (1 - $self->{percent_skonto});