X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FIR.pm;h=aec03dcc71d5e6cf0b3c76743fa764b7462df154;hb=94ca2a659164fcb3cd7a08504d67e03efde8a8a5;hp=c85daa334086420d75a14f93ea874df8dd85f747;hpb=ac315ac059800cab7bc7f21288a8581922acb231;p=kivitendo-erp.git diff --git a/SL/IR.pm b/SL/IR.pm index c85daa334..aec03dcc7 100644 --- a/SL/IR.pm +++ b/SL/IR.pm @@ -1071,7 +1071,9 @@ sub retrieve_invoice { # get tax rates and description my $accno_id = ($form->{vc} eq "customer") ? $ref->{income_accno} : $ref->{expense_accno}; $query = - qq|SELECT c.accno, t.taxdescription, t.rate, t.taxnumber FROM tax t + qq|SELECT c.accno, t.taxdescription, t.rate, + c.accno as taxnumber -- taxnumber is same as accno, but still accessed as taxnumber in code + FROM tax t LEFT JOIN chart c ON (c.id = t.chart_id) WHERE t.id in (SELECT tk.tax_id FROM taxkeys tk @@ -1339,7 +1341,7 @@ sub retrieve_item { # get tax rates and description my $accno_id = ($form->{vc} eq "customer") ? $ref->{income_accno} : $ref->{expense_accno}; $query = - qq|SELECT c.accno, t.taxdescription, t.rate, t.taxnumber + qq|SELECT c.accno, t.taxdescription, t.rate, c.accno as taxnumber FROM tax t LEFT JOIN chart c on (c.id = t.chart_id) WHERE t.id IN