X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=acqui%2Faddorderiso2709.pl;h=abfb870fef7de51f021a9f8681a24239a7113313;hb=771e91fdcdc2fbf59324e9038e30fb3da0d92508;hp=494257195273694999904f4aec1fa5489b875969;hpb=ea1aa7a0d906d583375618e37be60e9f0d62d939;p=koha.git diff --git a/acqui/addorderiso2709.pl b/acqui/addorderiso2709.pl index 4942571952..abfb870fef 100755 --- a/acqui/addorderiso2709.pl +++ b/acqui/addorderiso2709.pl @@ -189,7 +189,7 @@ if ($op eq ""){ SetImportRecordStatus( $biblio->{'import_record_id'}, 'imported' ); } # 3rd add order - my $patron = C4::Members->GetMember( borrowernumber => $loggedinuser ); + my $patron = C4::Members::GetMember( borrowernumber => $loggedinuser ); my $branch = C4::Branch->GetBranchDetail( $patron->{branchcode} ); # get quantity in the MARC record (1 if none) my $quantity = GetMarcQuantity($marcrecord, C4::Context->preference('marcflavour')) || 1; @@ -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++) {