X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=acqui%2Faddorderiso2709.pl;h=e4250515ff7967c61149c1a04cefb0d223648693;hb=20d9ed618fbe3cdcb9c04444a1f8a584b0364069;hp=d2c2e251cd69789637ad3852e9d08fb792f422d5;hpb=9a77e0600e0c87f95c098e67f7fcc53c6491f500;p=koha.git diff --git a/acqui/addorderiso2709.pl b/acqui/addorderiso2709.pl index d2c2e251cd..e4250515ff 100755 --- a/acqui/addorderiso2709.pl +++ b/acqui/addorderiso2709.pl @@ -205,7 +205,7 @@ if ($op eq ""){ # in this case, the price will be x100 when unformatted ! Replace the . by a , to get a proper price calculation $price =~ s/\./,/ if C4::Context->preference("CurrencyFormat") eq "FR"; $price = Koha::Number::Price->new($price)->unformat; - $orderinfo{gstrate} = $bookseller->{gstrate}; + $orderinfo{tax_rate} = $bookseller->{tax_rate}; my $c = $c_discount ? $c_discount : $bookseller->{discount} / 100; if ( $bookseller->{listincgst} ) { if ( $c_discount ) { @@ -217,10 +217,10 @@ if ($op eq ""){ } } else { if ( $c_discount ) { - $orderinfo{ecost} = $price / ( 1 + $orderinfo{gstrate} ); + $orderinfo{ecost} = $price / ( 1 + $orderinfo{tax_rate} ); $orderinfo{rrp} = $orderinfo{ecost} / ( 1 - $c ); } else { - $orderinfo{rrp} = $price / ( 1 + $orderinfo{gstrate} ); + $orderinfo{rrp} = $price / ( 1 + $orderinfo{tax_rate} ); $orderinfo{ecost} = $orderinfo{rrp} * ( 1 - $c ); } }