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

(-)a/C4/Acquisition.pm (-1 / +12 lines)
Lines 2856-2861 sub populate_order_with_prices { Link Here
2856
2856
2857
    if ($receiving) {
2857
    if ($receiving) {
2858
        if ( $bookseller->{invoiceincgst} ) {
2858
        if ( $bookseller->{invoiceincgst} ) {
2859
            # Trick for unitprice. If the unit price rounded value is the same as the ecost rounded value
2860
            # we need to keep the exact ecost value
2861
            if ( Koha::Number::Price->new( $order->{unitprice} )->round == Koha::Number::Price->new( $order->{ecost_tax_included} )->round ) {
2862
                $order->{unitprice} = $order->{ecost_tax_included};
2863
            }
2864
2859
            # The user entered the unit price tax included
2865
            # The user entered the unit price tax included
2860
            $order->{unitprice_tax_included} = $order->{unitprice};
2866
            $order->{unitprice_tax_included} = $order->{unitprice};
2861
2867
Lines 2863-2868 sub populate_order_with_prices { Link Here
2863
            $order->{unitprice_tax_excluded} = $order->{unitprice_tax_included} / ( 1 + $order->{tax_rate} );
2869
            $order->{unitprice_tax_excluded} = $order->{unitprice_tax_included} / ( 1 + $order->{tax_rate} );
2864
        }
2870
        }
2865
        else {
2871
        else {
2872
            # Trick for unitprice. If the unit price rounded value is the same as the ecost rounded value
2873
            # we need to keep the exact ecost value
2874
            if ( Koha::Number::Price->new( $order->{unitprice} )->round == Koha::Number::Price->new( $order->{ecost_tax_excluded} )->round ) {
2875
                $order->{unitprice} = $order->{ecost_tax_excluded};
2876
            }
2877
2866
            # The user entered the unit price tax excluded
2878
            # The user entered the unit price tax excluded
2867
            $order->{unitprice_tax_excluded} = $order->{unitprice};
2879
            $order->{unitprice_tax_excluded} = $order->{unitprice};
2868
2880
2869
- 

Return to bug 13321