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

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

Return to bug 13321