From: Moritz Bunkus Date: Thu, 27 Feb 2020 11:37:57 +0000 (+0100) Subject: Unterstützung für PostgreSQL 12 Teil 3 X-Git-Tag: release-3.5.6.1~251 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=53db54a80c97c95321d567bfc6f73ae47d7d6a4d;p=kivitendo-erp.git Unterstützung für PostgreSQL 12 Teil 3 Sortierung der Erzeugnisse nach der dafür vorgesehenen Positionsspalte, nicht ID. --- 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, | .