From 5a2af3414e6a5f0fa4811194b42a3d155f414acb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Fri, 7 Feb 2020 12:10:51 +0100 Subject: [PATCH] =?utf8?q?Kundenspezifische=20Artikelpreise:=20Reihenfolge?= =?utf8?q?/sortorder=20ber=C3=BCcksichtigen?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/DB/Part.pm | 3 ++- templates/webpages/part/_customerprices.html | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/SL/DB/Part.pm b/SL/DB/Part.pm index db3a26663..581b468d5 100644 --- a/SL/DB/Part.pm +++ b/SL/DB/Part.pm @@ -80,7 +80,8 @@ __PACKAGE__->meta->add_relationships( __PACKAGE__->meta->initialize; __PACKAGE__->attr_html('notes'); -__PACKAGE__->attr_sorted({ unsorted => 'makemodels', position => 'sortorder' }); +__PACKAGE__->attr_sorted({ unsorted => 'makemodels', position => 'sortorder' }); +__PACKAGE__->attr_sorted({ unsorted => 'customerprices', position => 'sortorder' }); __PACKAGE__->before_save('_before_save_set_partnumber'); diff --git a/templates/webpages/part/_customerprices.html b/templates/webpages/part/_customerprices.html index 49f32c328..b9ffd4798 100644 --- a/templates/webpages/part/_customerprices.html +++ b/templates/webpages/part/_customerprices.html @@ -19,7 +19,7 @@ [% SET listrow = 0 %] - [%- FOREACH customerprice = SELF.part.customerprices %] + [%- FOREACH customerprice = SELF.part.customerprices_sorted %] [% listrow = listrow + 1 %] [% PROCESS 'part/_customerprice_row.html' customerprice=customerprice listrow=listrow %] [%- END %] -- 2.20.1