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

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

Return to bug 32167