From: Bernd Bleßmann Date: Fri, 7 Feb 2020 11:10:51 +0000 (+0100) Subject: Kundenspezifische Artikelpreise: Reihenfolge/sortorder berücksichtigen X-Git-Tag: release-3.5.6.1~262 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=5a2af3414e6a5f0fa4811194b42a3d155f414acb;p=kivitendo-erp.git Kundenspezifische Artikelpreise: Reihenfolge/sortorder berücksichtigen --- 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 %]