$self->part->makemodels;
}
+sub available_discounts { }
+
sub price_from_source {
my ($self, $source, $spec) = @_;
my $makemodel = SL::DB::Manager::MakeModel->find_by(id => $spec);
- # TODO: if someone deletes the prices entry, this fails. add a fallback
+ return SL::PriceSource::Price->new(
+ price_source => $self,
+ missing => t8('This makemodel price does not exist anymore'),
+ ) if !$makemodel;
+
return $self->make_price_from_makemodel($makemodel);
}
+sub discount_from_source { }
+
sub best_price {
my ($self, %params) = @_;
}
+sub best_discount { }
+
sub make_price_from_makemodel {
my ($self, $makemodel) = @_;
);
}
-
1;