X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FTaxkeys.pm;h=d921a9056716b6272d5ddd73bf1bf9a3a9a8e0ef;hb=e770cd180600810fecd3554e104546236a9c9597;hp=cf3463bb7db50497df59aa96b9f8d51a5dd6e2c3;hpb=80f6efd0cd9de22d54ccc605808a74c9955e643c;p=kivitendo-erp.git diff --git a/SL/Taxkeys.pm b/SL/Taxkeys.pm index cf3463bb7..d921a9056 100644 --- a/SL/Taxkeys.pm +++ b/SL/Taxkeys.pm @@ -78,7 +78,8 @@ sub get_tax_info { } my $sth = $self->{handles}->{get_tax_info}; - do_statement($form, $sth, $self->{queries}->{get_tax_info}, $params{taxkey}, $params{transdate}); + # Lieferdatum (deliverydate) ist entscheidend für den Steuersatz + do_statement($form, $sth, $self->{queries}->{get_tax_info}, $params{taxkey}, $params{deliverydate} || $params{transdate}); my $ref = $sth->fetchrow_hashref() || { }; @@ -106,7 +107,7 @@ sub get_full_tax_info { my @all_taxkeys = map { $_->{taxkey} } (selectall_hashref_query($form, $form->get_standard_dbh(), qq|SELECT DISTINCT taxkey FROM tax WHERE taxkey IS NOT NULL|)); foreach my $taxkey (@all_taxkeys) { - my $ref = $self->get_tax_info('transdate' => $params{transdate}, 'taxkey' => $taxkey); + my $ref = $self->get_tax_info('transdate' => $params{transdate}, 'taxkey' => $taxkey, 'deliverydate' => $params{deliverydate}); $tax_info{taxkeys}->{$taxkey} = $ref; $tax_info{accnos}->{$ref->{taxchart_id}} = $ref if ($ref->{taxchart_id});