X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=acqui%2Faddorderiso2709.pl;h=abfb870fef7de51f021a9f8681a24239a7113313;hb=a0456560a45098a1e0ebc436133ed790b49fd867;hp=c4f889fbe7800e3bb45cc44b2b04878be8684712;hpb=5ff402f98b6b5eb19864d6cbeb108a0d2c282131;p=koha.git diff --git a/acqui/addorderiso2709.pl b/acqui/addorderiso2709.pl index c4f889fbe7..abfb870fef 100755 --- a/acqui/addorderiso2709.pl +++ b/acqui/addorderiso2709.pl @@ -222,12 +222,8 @@ if ($op eq ""){ my $basket = GetBasket( $orderinfo{basketno} ); my $bookseller = GetBookSellerFromId( $basket->{booksellerid} ); $orderinfo{gstrate} = $bookseller->{gstrate}; - if ( $bookseller->{listincgst} ) { - $orderinfo{ecost} = $price; - } else { - $orderinfo{ecost} = $price * ( 1 + $orderinfo{gstrate} ); - } - $orderinfo{rrp} = ( $orderinfo{ecost} * 100 ) / ( 100 - $bookseller->{discount} ); + $orderinfo{rrp} = $price; + $orderinfo{ecost} = $orderinfo{rrp} * ( 1 - $bookseller->{discount} / 100 ); $orderinfo{listprice} = $orderinfo{rrp}; $orderinfo{unitprice} = $orderinfo{ecost}; $orderinfo{total} = $orderinfo{ecost}; @@ -429,11 +425,11 @@ sub batch_info { 'current_matcher_description' => $matcher->description()); } } - add_matcher_list($batch->{'matcher_id'}); + add_matcher_list($batch->{'matcher_id'}, $template); } sub add_matcher_list { - my $current_matcher_id = shift; + my ($current_matcher_id, $template) = @_; my @matchers = C4::Matcher::GetMatcherList(); if (defined $current_matcher_id) { for (my $i = 0; $i <= $#matchers; $i++) {