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

(-)a/acqui/addorderiso2709.pl (-13 / +8 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 - $order_discount / 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 325-336 if ($op eq ""){ Link Here
325
                $c_price = Koha::Number::Price->new($c_price)->unformat;
323
                $c_price = Koha::Number::Price->new($c_price)->unformat;
326
                $orderinfo{tax_rate_on_ordering} = $bookseller->tax_rate;
324
                $orderinfo{tax_rate_on_ordering} = $bookseller->tax_rate;
327
                $orderinfo{tax_rate_on_receiving} = $bookseller->tax_rate;
325
                $orderinfo{tax_rate_on_receiving} = $bookseller->tax_rate;
328
                my $c = $c_discount ? $c_discount : $bookseller->discount;
326
                my $order_discount = $c_discount ? $c_discount : $bookseller->discount;
329
                $orderinfo{discount} = $c;
327
                $orderinfo{discount} = $order_discount;
330
                if ( $c ) {
328
                $orderinfo{rrp}   = $c_price;
331
                    $orderinfo{ecost} = $c_price * ( 1 - $c / 100 );
329
                $orderinfo{ecost} = $order_discount ? $c_price * ( 1 - $order_discount / 100 ) : $c_price;
332
                    $orderinfo{rrp}   = $c_price;
333
                }
334
                $orderinfo{listprice} = $orderinfo{rrp} / $active_currency->rate;
330
                $orderinfo{listprice} = $orderinfo{rrp} / $active_currency->rate;
335
                $orderinfo{unitprice} = $orderinfo{ecost};
331
                $orderinfo{unitprice} = $orderinfo{ecost};
336
            } else {
332
            } else {
337
- 

Return to bug 32167