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};
'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++) {