X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FForm.pm;h=2a61422c82f883a2a6870b7fd0fb88db84bad1ff;hb=af11d2b792619bf5b169eccd651ba1f443386284;hp=9270c5555924b38f0ec34fc020c05fc19bb8ad2b;hpb=a967d2a494d1a863b95d060a52ef655e7c00d583;p=kivitendo-erp.git diff --git a/SL/Form.pm b/SL/Form.pm index 9270c5555..2a61422c8 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -382,10 +382,11 @@ sub create_http_response { my $session_cookie_value = $main::auth->get_session_id(); if ($session_cookie_value) { - $session_cookie = $cgi->cookie('-name' => $main::auth->get_session_cookie_name(), - '-value' => $session_cookie_value, - '-path' => $uri->path, - '-secure' => $::request->is_https); + $session_cookie = $cgi->cookie('-name' => $main::auth->get_session_cookie_name(), + '-value' => $session_cookie_value, + '-path' => $uri->path, + '-expires' => '+' . $::auth->{session_timeout} . 'm', + '-secure' => $::request->is_https); } } @@ -700,7 +701,10 @@ sub sort_columns { } # -sub format_amount { shift; goto &SL::Helper::Number::_number; } +sub format_amount { + my ($self, $myconfig, $amount, $places, $dash) = @_; + SL::Helper::Number::_format_number($amount, $places, %$myconfig, dash => $dash); +} sub format_amount_units { $main::lxdebug->enter_sub(); @@ -787,7 +791,10 @@ sub format_string { # -sub parse_amount { shift; goto &SL::Helper::Number::_parse_number; } +sub parse_amount { + my ($self, $myconfig, $amount) = @_; + SL::Helper::Number::_parse_number($amount, %$myconfig); +} sub round_amount { shift; goto &SL::Helper::Number::_round_number; } @@ -927,7 +934,7 @@ sub parse_template { } } - if (!$self->{preview} && $self->doc_storage_enabled) + if (!$self->{preview} && $self->{attachment_type} !~ m{^dunning} && $self->doc_storage_enabled) { $self->{attachment_filename} ||= $self->generate_attachment_filename; $self->store_pdf($self); @@ -947,7 +954,7 @@ sub parse_template { } } - if ( !$self->{preview} && $ext_for_format eq 'pdf' && $self->doc_storage_enabled) { + if ( !$self->{preview} && $ext_for_format eq 'pdf' && $self->{attachment_type} !~ m{^dunning} && $self->doc_storage_enabled) { $self->{attachment_filename} ||= $self->generate_attachment_filename; my $file_obj = $self->store_pdf($self); $self->{print_file_id} = $file_obj->id if $file_obj; @@ -2560,7 +2567,7 @@ sub create_links { $query = qq|SELECT a.cp_id, a.invnumber, a.transdate, a.${table}_id, a.datepaid, a.deliverydate, - a.duedate, a.ordnumber, a.taxincluded, (SELECT cu.name FROM currencies cu WHERE cu.id=a.currency_id) AS currency, a.notes, + a.duedate, a.tax_point, a.ordnumber, a.taxincluded, (SELECT cu.name FROM currencies cu WHERE cu.id=a.currency_id) AS currency, a.notes, a.mtime, a.itime, a.intnotes, a.department_id, a.amount AS oldinvtotal, a.paid AS oldtotalpaid, a.employee_id, a.gldate, a.type, @@ -3223,7 +3230,7 @@ sub prepare_for_printing { # Format dates. $self->format_dates($output_dateformat, $output_longdates, - qw(invdate orddate quodate pldate duedate reqdate transdate shippingdate deliverydate validitydate paymentdate datepaid + qw(invdate orddate quodate pldate duedate reqdate transdate tax_point shippingdate deliverydate validitydate paymentdate datepaid transdate_oe deliverydate_oe employee_startdate employee_enddate), grep({ /^(?:datepaid|transdate_oe|reqdate|deliverydate|deliverydate_oe|transdate)_\d+$/ } keys(%{$self})));