X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/80b36869dd9b1ff2ed9063fabe79ca5001dc276e..0dc65e8532e92daacbef328f3df2f92e7e221cb5:/SL/IS.pm diff --git a/SL/IS.pm b/SL/IS.pm index d90a0d0db..3aa0d3ca9 100644 --- a/SL/IS.pm +++ b/SL/IS.pm @@ -353,7 +353,9 @@ sub invoice_details { $sth->finish; } - map { push @{ $form->{TEMPLATE_ARRAYS}->{"ic_cvar_$_->{name}"} }, $form->{"ic_cvar_$_->{name}_$i"} } @{ $ic_cvar_configs }; + push @{ $form->{TEMPLATE_ARRAYS}->{"ic_cvar_$_->{name}"} }, + CVar->format_to_template(CVar->parse($form->{"ic_cvar_$_->{name}_$i"}, $_), $_) + for @{ $ic_cvar_configs }; } } @@ -877,7 +879,7 @@ sub post_invoice { # record payments and offsetting AR if (!$form->{storno}) { for my $i (1 .. $form->{paidaccounts}) { - + if ($form->{"acc_trans_id_$i"} && $payments_only && ($::lx_office_conf{features}->{payments_changeable} == 0)) { @@ -1438,7 +1440,7 @@ sub retrieve_invoice { my ($sth, $ref, $query); - my $query_transdate = ", current_date AS invdate" if !$form->{id}; + my $query_transdate = !$form->{id} ? ", current_date AS invdate" : ''; $query = qq|SELECT