X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=SL%2FAP.pm;h=f551b34ae19c42e9d382a91fc2d50b6c0ed52e09;hb=8e5b1f0e363dd22883e931006b8ac414bad9bbc5;hp=35a8e19b0c4ce5941bef91912a751c5f72098c13;hpb=b98b8e3f73a399d2d4df7be4962b56bd4ad8c82b;p=kivitendo-erp.git diff --git a/SL/AP.pm b/SL/AP.pm index 35a8e19b0..f551b34ae 100644 --- a/SL/AP.pm +++ b/SL/AP.pm @@ -126,7 +126,7 @@ sub post_transaction { qq|INSERT INTO ap (id, invnumber, employee_id,currency_id, taxzone_id) | . qq|VALUES (?, ?, (SELECT e.id FROM employee e WHERE e.login = ?), (SELECT id FROM currencies WHERE name = ?), (SELECT taxzone_id FROM vendor WHERE id = ?) )|; - do_query($form, $dbh, $query, $form->{id}, $form->{invnumber}, $form->{login}, $form->{currency}, $form->{vendor_id}); + do_query($form, $dbh, $query, $form->{id}, $form->{invnumber}, $::myconfig{login}, $form->{currency}, $form->{vendor_id}); } @@ -362,8 +362,6 @@ sub post_transaction { exporttype => DATEV_ET_BUCHUNGEN, format => DATEV_FORMAT_KNE, dbh => $dbh, - from => $transdate, - to => $transdate, trans_id => $form->{id}, ); @@ -418,7 +416,7 @@ sub ap_transactions { my $query = qq|SELECT a.id, a.invnumber, a.transdate, a.duedate, a.amount, a.paid, | . qq| a.ordnumber, v.name, a.invoice, a.netamount, a.datepaid, a.notes, | . - qq| a.globalproject_id, a.storno, a.storno_id, | . + qq| a.globalproject_id, a.storno, a.storno_id, a.direct_debit, | . qq| pr.projectnumber AS globalprojectnumber, | . qq| e.name AS employee, | . qq| v.vendornumber, v.country, v.ustid, | . @@ -436,8 +434,8 @@ sub ap_transactions { qq|LEFT JOIN contacts cp ON (a.cp_id = cp.cp_id) | . qq|LEFT JOIN employee e ON (a.employee_id = e.id) | . qq|LEFT JOIN project pr ON (a.globalproject_id = pr.id) | . - qq|LEFT JOIN tax_zones tz ON (tz.id = v.taxzone_id)| . - qq|LEFT JOIN payment_terms pt ON (pt.id = v.payment_id)|; + qq|LEFT JOIN tax_zones tz ON (tz.id = a.taxzone_id)| . + qq|LEFT JOIN payment_terms pt ON (pt.id = a.payment_id)|; my $where = ''; @@ -515,7 +513,7 @@ sub ap_transactions { my $sortdir = !defined $form->{sortdir} ? 'ASC' : $form->{sortdir} ? 'ASC' : 'DESC'; my $sortorder = join(', ', map { "$_ $sortdir" } @a); - if (grep({ $_ eq $form->{sort} } qw(transdate id invnumber ordnumber name netamount tax amount paid datepaid due duedate notes employee transaction_description))) { + if (grep({ $_ eq $form->{sort} } qw(transdate id invnumber ordnumber name netamount tax amount paid datepaid due duedate notes employee transaction_description direct_debit))) { $sortorder = $form->{sort} . " $sortdir"; }