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

(-)a/acqui/addorderiso2709.pl (-12 / +7 lines)
Lines 275-286 if ($op eq ""){ Link Here
275
                        $price = Koha::Number::Price->new($price)->unformat;
275
                        $price = Koha::Number::Price->new($price)->unformat;
276
                        $orderinfo{tax_rate_on_ordering} = $bookseller->tax_rate;
276
                        $orderinfo{tax_rate_on_ordering} = $bookseller->tax_rate;
277
                        $orderinfo{tax_rate_on_receiving} = $bookseller->tax_rate;
277
                        $orderinfo{tax_rate_on_receiving} = $bookseller->tax_rate;
278
                        my $c = $c_discount ? $c_discount : $bookseller->discount;
278
                        my $order_discount = $c_discount ? $c_discount : $bookseller->discount;
279
                        $orderinfo{discount} = $c;
279
                        $orderinfo{discount} = $order_discount;
280
                        if ( $c ) {
280
                        $orderinfo{rrp} = $price;
281
                            $orderinfo{ecost} = $price * ( 1 - $c / 100 );
281
                        $orderinfo{ecost} = $order_discount ? $price * ( 1 - $c / 100 ) : $price;
282
                            $orderinfo{rrp}   = $price;
283
                        }
284
                        $orderinfo{listprice} = $orderinfo{rrp} / $active_currency->rate;
282
                        $orderinfo{listprice} = $orderinfo{rrp} / $active_currency->rate;
285
                        $orderinfo{unitprice} = $orderinfo{ecost};
283
                        $orderinfo{unitprice} = $orderinfo{ecost};
286
                    } else {
284
                    } else {
Lines 324-335 if ($op eq ""){ Link Here
324
                $c_price = Koha::Number::Price->new($c_price)->unformat;
322
                $c_price = Koha::Number::Price->new($c_price)->unformat;
325
                $orderinfo{tax_rate_on_ordering} = $bookseller->tax_rate;
323
                $orderinfo{tax_rate_on_ordering} = $bookseller->tax_rate;
326
                $orderinfo{tax_rate_on_receiving} = $bookseller->tax_rate;
324
                $orderinfo{tax_rate_on_receiving} = $bookseller->tax_rate;
327
                my $c = $c_discount ? $c_discount : $bookseller->discount;
325
                my $order_discount = $c_discount ? $c_discount : $bookseller->discount;
328
                $orderinfo{discount} = $c;
326
                $orderinfo{discount} = $c;
329
                if ( $c ) {
327
                $orderinfo{rrp}   = $c_price;
330
                    $orderinfo{ecost} = $c_price * ( 1 - $c / 100 );
328
                $orderinfo{ecost} = $order_discount ? $c_price * ( 1 - $c / 100 ) : $c_price;
331
                    $orderinfo{rrp}   = $c_price;
332
                }
333
                $orderinfo{listprice} = $orderinfo{rrp} / $active_currency->rate;
329
                $orderinfo{listprice} = $orderinfo{rrp} / $active_currency->rate;
334
                $orderinfo{unitprice} = $orderinfo{ecost};
330
                $orderinfo{unitprice} = $orderinfo{ecost};
335
            } else {
331
            } else {
336
- 

Return to bug 32167