]> wagnertech.de Git - mfinanz.git/blobdiff - SL/DB/Part.pm
Artikel-BDVs unter Basisdaten anzeigen, falls konfiguriert
[mfinanz.git] / SL / DB / Part.pm
index e98b0c4d7d0ec0c875440675d9b13194a27087bc..0f855231e4bf63f119a5c3dcbf057eefbca9e6dd 100644 (file)
@@ -76,6 +76,12 @@ __PACKAGE__->meta->add_relationships(
     column_map   => { id => 'part_id' },
     manager_args => { with_objects => [ 'shop' ] },
   },
+  last_price_update => {
+    type         => 'one to one',
+    class        => 'SL::DB::PartsPriceHistory',
+    column_map   => { id => 'part_id' },
+    manager_args => { sort_by => 'valid_from DESC', limit => 1 },
+  },
 );
 
 __PACKAGE__->meta->initialize;