]> wagnertech.de Git - mfinanz.git/blobdiff - SL/DB/Manager/PriceRule.pm
Merge branch 'bankerweiterung_und_skonto'
[mfinanz.git] / SL / DB / Manager / PriceRule.pm
index 99065dbb5ee60f56048fe8c7fba92d099c1f1e7f..d5b5489d67e181d85a7cd3f7d2bb23eb2c541be3 100644 (file)
@@ -7,6 +7,10 @@ use strict;
 
 use parent qw(SL::DB::Helper::Manager);
 
+use constant PRICE_NEW                 => 0;
+use constant PRICE_REDUCED_MASTER_DATA => 1;
+use constant PRICE_DISCOUNT            => 2;
+
 use SL::DB::Helper::Filtered;
 use SL::DB::Helper::Paginated;
 use SL::DB::Helper::Sorted;
@@ -76,6 +80,12 @@ sub get_all_matching {
   $self->get_all(query => [ id => \@ids ]);
 }
 
+sub all_price_types {
+  [ PRICE_NEW,                 t8('Price')               ],
+  [ PRICE_REDUCED_MASTER_DATA, t8('Reduced Master Data') ],
+  [ PRICE_DISCOUNT,            t8('Discount')            ],
+}
+
 sub _sort_spec {
   return ( columns => { SIMPLE => 'ALL', },
            default => [ 'name', 1 ],