Revision a34ae163
Von Sven Schöling vor mehr als 11 Jahren hinzugefügt
SL/DB/Helper/PriceTaxCalculator.pm | ||
---|---|---|
7 | 7 |
|
8 | 8 |
use Carp; |
9 | 9 |
use List::Util qw(sum min); |
10 |
use SL::DB::Default; |
|
11 |
use SL::DB::PriceFactor; |
|
12 |
use SL::DB::Unit; |
|
13 | 10 |
|
14 | 11 |
sub calculate_prices_and_taxes { |
15 | 12 |
my ($self, %params) = @_; |
16 | 13 |
|
14 |
require SL::DB::PriceFactor; |
|
15 |
require SL::DB::Unit; |
|
16 |
|
|
17 | 17 |
my %units_by_name = map { ( $_->name => $_ ) } @{ SL::DB::Manager::Unit->get_all }; |
18 | 18 |
my %price_factors_by_id = map { ( $_->id => $_ ) } @{ SL::DB::Manager::PriceFactor->get_all }; |
19 | 19 |
|
... | ... | |
52 | 52 |
|
53 | 53 |
sub _get_exchangerate { |
54 | 54 |
my ($self, $data, %params) = @_; |
55 |
require SL::DB::Default; |
|
55 | 56 |
|
56 | 57 |
my $currency = $self->currency_id ? $self->currency->name || '' : ''; |
57 | 58 |
if ($currency ne SL::DB::Default->get_default_currency) { |
Auch abrufbar als: Unified diff
In Helper kein use SL::DB::Objects