X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FForm.pm;h=c163532842950a2db75a5805e79a0a7de3c35e00;hb=e01d7de0936bc43c0c7b60cb5ef604ba3755ecff;hp=5fbed0d753ac360ad599d1bec60b4ba5f87a45c6;hpb=abc941da2860a2ad1cb3f13c083dcd19fe435883;p=kivitendo-erp.git diff --git a/SL/Form.pm b/SL/Form.pm index 5fbed0d75..c16353284 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -877,6 +877,7 @@ sub parse_template { } s/<%(.+?)%>/$self->{$1}/g; + s/<\/nobr>/ /g; print OUT; } @@ -1703,7 +1704,7 @@ sub create_links { LEFT Join tax t ON (a.taxkey = t.taxkey) WHERE a.trans_id = $self->{id} AND a.fx_transaction = '0' - ORDER BY a.transdate|; + ORDER BY a.oid,a.transdate|; $sth = $dbh->prepare($query); $sth->execute || $self->dberror($query); @@ -1713,12 +1714,17 @@ sub create_links { $self->{exchangerate} = $self->get_exchangerate($dbh, $self->{currency}, $self->{transdate}, $fld); + my $index=0; # store amounts in {acc_trans}{$key} for multiple accounts while (my $ref = $sth->fetchrow_hashref(NAME_lc)) { $ref->{exchangerate} = $self->get_exchangerate($dbh, $self->{currency}, $ref->{transdate}, $fld); + if ( !($xkeyref{ $ref->{accno} } =~ /tax/)) { + $index++; + } + $ref->{index} = $index; push @{ $self->{acc_trans}{ $xkeyref{ $ref->{accno} } } }, $ref; }