X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/ad4a0fc9c11ed0246a659950e1c8bbdd5ef5f396..53db54a80c97c95321d567bfc6f73ae47d7d6a4d:/SL/OE.pm diff --git a/SL/OE.pm b/SL/OE.pm index 5665b04bd..d86b6c0ec 100644 --- a/SL/OE.pm +++ b/SL/OE.pm @@ -105,7 +105,7 @@ sub transactions { FROM record_links rl1 JOIN record_links rl2 ON (rl1.to_table = rl2.from_table AND rl1.to_id = rl2.from_id) JOIN record_links rl3 ON (rl2.to_table = rl3.from_table AND rl2.to_id = rl3.from_id) - WHERE (rl1.from_table = 'oe') AND rl2.to_table = 'ar' + WHERE rl1.from_table = 'oe' AND rl2.to_table = 'ar' AND rl3.to_table = 'ar' ) rl LEFT JOIN ar ON ar.id = rl.to_id @@ -1528,9 +1528,9 @@ sub order_details { # get parts and push them onto the stack my $sortorder = ""; if ($form->{groupitems}) { - $sortorder = qq|ORDER BY pg.partsgroup, a.oid|; + $sortorder = qq|ORDER BY pg.partsgroup, a.position|; } else { - $sortorder = qq|ORDER BY a.oid|; + $sortorder = qq|ORDER BY a.position|; } $query = qq|SELECT p.partnumber, p.description, p.unit, a.qty, | .