X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/0a02b827a5c14cdd46a1faa13cb7fdda832a6aa2..eaaef7cd99e5db60d5f6492d6b8e06ea9ff44d55:/SL/AR.pm diff --git a/SL/AR.pm b/SL/AR.pm index 96547c566..cd4063695 100644 --- a/SL/AR.pm +++ b/SL/AR.pm @@ -412,6 +412,7 @@ sub ar_transactions { qq| a.duedate, a.netamount, a.amount, a.paid, | . qq| a.invoice, a.datepaid, a.terms, a.notes, a.shipvia, | . qq| a.shippingpoint, a.storno, a.globalproject_id, | . + qq| a.marge_total, a.marge_percent, | . qq| a.transaction_description, | . qq| pr.projectnumber AS globalprojectnumber, | . qq| c.name, | . @@ -645,7 +646,7 @@ sub storno { do_query($form, $dbh, $query, $id); # now copy acc_trans entries - $query = qq|SELECT a.*, c.link FROM acc_trans a LEFT JOIN chart c ON a.chart_id = c.id WHERE a.trans_id = ?|; + $query = qq|SELECT a.*, c.link FROM acc_trans a LEFT JOIN chart c ON a.chart_id = c.id WHERE a.trans_id = ? ORDER BY a.oid|; my $rowref = selectall_hashref_query($form, $dbh, $query, $id); # kill all entries containing payments, which are the last 2n rows, of which the last has link =~ /paid/