From 400a18e91c4e1b2fd5847ad3da017e0d41afdc50 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Thu, 11 Nov 2010 16:53:04 +0100 Subject: [PATCH] Bei EUR keine Warenbestandskosten verbuchen --- SL/DB/Helper/PriceTaxCalculator.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SL/DB/Helper/PriceTaxCalculator.pm b/SL/DB/Helper/PriceTaxCalculator.pm index 622f9db99..6a3343548 100644 --- a/SL/DB/Helper/PriceTaxCalculator.pm +++ b/SL/DB/Helper/PriceTaxCalculator.pm @@ -162,7 +162,7 @@ sub _calculate_amounts { sub _calculate_assembly_item { my ($self, $data, $part, $total_qty, $base_factor) = @_; - return 0 unless $::eur && $data->{is_invoice}; + return 0 if $::eur || !$data->{is_invoice}; foreach my $assembly_entry (@{ $part->assemblies }) { push @{ $data->{assembly_items}->[-1] }, { part => $assembly_entry->part, @@ -183,7 +183,7 @@ sub _calculate_part_item { _dbg("cpsi tq " . $total_qty); - return 0 unless $::eur && $data->{is_invoice} && $total_qty; + return 0 if $::eur || !$data->{is_invoice} || !$total_qty; my ($entry); $base_factor ||= 1; -- 2.20.1