From 53db54a80c97c95321d567bfc6f73ae47d7d6a4d Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Thu, 27 Feb 2020 12:37:57 +0100 Subject: [PATCH] =?utf8?q?Unterst=C3=BCtzung=20f=C3=BCr=20PostgreSQL=2012?= =?utf8?q?=20Teil=203?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Sortierung der Erzeugnisse nach der dafür vorgesehenen Positionsspalte, nicht ID. --- SL/DO.pm | 4 ++-- SL/IS.pm | 4 ++-- SL/OE.pm | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/SL/DO.pm b/SL/DO.pm index f32e097dc..034189fc3 100644 --- a/SL/DO.pm +++ b/SL/DO.pm @@ -1030,9 +1030,9 @@ sub order_details { my $sortorder = ""; if ($form->{groupitems}) { $sortorder = - qq|ORDER BY pg.partsgroup, a.id|; + qq|ORDER BY pg.partsgroup, a.position|; } else { - $sortorder = qq|ORDER BY a.id|; + $sortorder = qq|ORDER BY a.position|; } do_statement($form, $h_pg, $q_pg, conv_i($form->{"id_$i"})); diff --git a/SL/IS.pm b/SL/IS.pm index 894a8aea7..f79952ec9 100644 --- a/SL/IS.pm +++ b/SL/IS.pm @@ -442,9 +442,9 @@ sub invoice_details { my $sortorder = ""; if ($form->{groupitems}) { $sortorder = - qq|ORDER BY pg.partsgroup, a.id|; + qq|ORDER BY pg.partsgroup, a.position|; } else { - $sortorder = qq|ORDER BY a.id|; + $sortorder = qq|ORDER BY a.position|; } my $query = diff --git a/SL/OE.pm b/SL/OE.pm index a94e9c2b1..d86b6c0ec 100644 --- a/SL/OE.pm +++ b/SL/OE.pm @@ -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.id|; + $sortorder = qq|ORDER BY pg.partsgroup, a.position|; } else { - $sortorder = qq|ORDER BY a.id|; + $sortorder = qq|ORDER BY a.position|; } $query = qq|SELECT p.partnumber, p.description, p.unit, a.qty, | . -- 2.20.1