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

(-)a/C4/Acquisition.pm (-1 / +12 lines)
Lines 2878-2883 sub populate_order_with_prices { Link Here
2878
2878
2879
    if ($receiving) {
2879
    if ($receiving) {
2880
        if ( $bookseller->{invoiceincgst} ) {
2880
        if ( $bookseller->{invoiceincgst} ) {
2881
            # Trick for unitprice. If the unit price rounded value is the same as the ecost rounded value
2882
            # we need to keep the exact ecost value
2883
            if ( Koha::Number::Price->new( $order->{unitprice} )->round == Koha::Number::Price->new( $order->{ecost_tax_included} )->round ) {
2884
                $order->{unitprice} = $order->{ecost_tax_included};
2885
            }
2886
2881
            # The user entered the unit price tax included
2887
            # The user entered the unit price tax included
2882
            $order->{unitprice_tax_included} = $order->{unitprice};
2888
            $order->{unitprice_tax_included} = $order->{unitprice};
2883
2889
Lines 2885-2890 sub populate_order_with_prices { Link Here
2885
            $order->{unitprice_tax_excluded} = $order->{unitprice_tax_included} / ( 1 + $order->{tax_rate} );
2891
            $order->{unitprice_tax_excluded} = $order->{unitprice_tax_included} / ( 1 + $order->{tax_rate} );
2886
        }
2892
        }
2887
        else {
2893
        else {
2894
            # Trick for unitprice. If the unit price rounded value is the same as the ecost rounded value
2895
            # we need to keep the exact ecost value
2896
            if ( Koha::Number::Price->new( $order->{unitprice} )->round == Koha::Number::Price->new( $order->{ecost_tax_excluded} )->round ) {
2897
                $order->{unitprice} = $order->{ecost_tax_excluded};
2898
            }
2899
2888
            # The user entered the unit price tax excluded
2900
            # The user entered the unit price tax excluded
2889
            $order->{unitprice_tax_excluded} = $order->{unitprice};
2901
            $order->{unitprice_tax_excluded} = $order->{unitprice};
2890
2902
2891
- 

Return to bug 13321