View | Details | Raw Unified | Return to bug 32167
Collapse All | Expand All

(-)a/acqui/addorderiso2709.pl (-13 / +8 lines)
Lines 276-287 if ($op eq ""){ Link Here
276
                        $price =~ s/\./,/ if C4::Context->preference("CurrencyFormat") eq "FR";
276
                        $price =~ s/\./,/ if C4::Context->preference("CurrencyFormat") eq "FR";
277
                        $price = Koha::Number::Price->new($price)->unformat;
277
                        $price = Koha::Number::Price->new($price)->unformat;
278
                        $orderinfo{tax_rate} = $bookseller->tax_rate;
278
                        $orderinfo{tax_rate} = $bookseller->tax_rate;
279
                        my $c = $c_discount ? $c_discount : $bookseller->discount / 100;
279
                        my $order_discount = $c_discount ? $c_discount : $bookseller->discount;
280
                        $orderinfo{discount} = $c;
280
                        $orderinfo{discount} = $order_discount;
281
                        if ( $c ) {
281
                        $orderinfo{rrp}   = $price;
282
                            $orderinfo{ecost} = $price * ( 1 - $c / 100 );
282
                        $orderinfo{ecost} = $order_discount ? $price * ( 1 - $order_discount / 100 ) : $price;
283
                            $orderinfo{rrp}   = $price;
284
                        }
285
                        $orderinfo{listprice} = $orderinfo{rrp} / $active_currency->rate;
283
                        $orderinfo{listprice} = $orderinfo{rrp} / $active_currency->rate;
286
                        $orderinfo{unitprice} = $orderinfo{ecost};
284
                        $orderinfo{unitprice} = $orderinfo{ecost};
287
                        $orderinfo{total} = $orderinfo{ecost} * $infos->{quantity};
285
                        $orderinfo{total} = $orderinfo{ecost} * $infos->{quantity};
Lines 334-345 if ($op eq ""){ Link Here
334
                $c_price =~ s/\./,/ if C4::Context->preference("CurrencyFormat") eq "FR";
332
                $c_price =~ s/\./,/ if C4::Context->preference("CurrencyFormat") eq "FR";
335
                $c_price = Koha::Number::Price->new($c_price)->unformat;
333
                $c_price = Koha::Number::Price->new($c_price)->unformat;
336
                $orderinfo{tax_rate} = $bookseller->tax_rate;
334
                $orderinfo{tax_rate} = $bookseller->tax_rate;
337
                my $c = $c_discount ? $c_discount : $bookseller->discount / 100;
335
                my $order_discount = $c_discount ? $c_discount : $bookseller->discount;
338
                $orderinfo{discount} = $c;
336
                $orderinfo{discount} = $order_discount;
339
                if ( $c ) {
337
                $orderinfo{rrp}   = $c_price;
340
                    $orderinfo{ecost} = $c_price * ( 1 - $c / 100 );
338
                $orderinfo{ecost} = $order_discount ? $c_price * ( 1 - $order_discount / 100 ) : $c_price;
341
                    $orderinfo{rrp}   = $c_price;
342
                }
343
                $orderinfo{listprice} = $orderinfo{rrp} / $active_currency->rate;
339
                $orderinfo{listprice} = $orderinfo{rrp} / $active_currency->rate;
344
                $orderinfo{unitprice} = $orderinfo{ecost};
340
                $orderinfo{unitprice} = $orderinfo{ecost};
345
                $orderinfo{total} = $orderinfo{ecost} * $c_quantity;
341
                $orderinfo{total} = $orderinfo{ecost} * $c_quantity;
346
- 

Return to bug 32167