PriceRule: validate auf reductions angepasst
authorSven Schöling <s.schoeling@linet-services.de>
Mon, 8 Dec 2014 11:31:59 +0000 (12:31 +0100)
committerSven Schöling <s.schoeling@linet-services.de>
Tue, 7 Apr 2015 13:53:46 +0000 (15:53 +0200)
SL/DB/PriceRule.pm

index 3deac75..e33b3a3 100644 (file)
@@ -48,7 +48,7 @@ sub price_type {
   my ($self, $value) = @_;
 
   if (@_ > 1) {
-    my $number = $self->price || $self->discount;
+    my $number = $self->price || $self->discount || $self->reduction;
     if ($value == SL::DB::Manager::PriceRule::PRICE_NEW()) {
       $self->price($number);
     } elsif ($value == SL::DB::Manager::PriceRule::PRICE_REDUCED_MASTER_DATA()) {