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

(-)a/C4/Acquisition.pm (-4 / +3 lines)
Lines 2798-2805 sub populate_order_with_prices { Link Here
2798
2798
2799
            # tax value = quantity * ecost tax excluded * tax rate
2799
            # tax value = quantity * ecost tax excluded * tax rate
2800
            # we should use the unitprice if included
2800
            # we should use the unitprice if included
2801
            my $cost_tax_included = $order->{unitprice_tax_included} || $order->{ecost_tax_included};
2801
            my $cost_tax_included = $order->{unitprice_tax_included} == 0 ? $order->{ecost_tax_included} : $order->{unitprice_tax_included};
2802
            my $cost_tax_excluded = $order->{unitprice_tax_excluded} || $order->{ecost_tax_excluded};
2802
            my $cost_tax_excluded = $order->{unitprice_tax_excluded} == 0 ? $order->{ecost_tax_excluded} : $order->{unitprice_tax_excluded};
2803
            $order->{tax_value_on_ordering} = ( get_rounded_price($cost_tax_included) - get_rounded_price($cost_tax_excluded) ) * $order->{quantity};
2803
            $order->{tax_value_on_ordering} = ( get_rounded_price($cost_tax_included) - get_rounded_price($cost_tax_excluded) ) * $order->{quantity};
2804
2804
2805
        }
2805
        }
Lines 2820-2826 sub populate_order_with_prices { Link Here
2820
2820
2821
            # tax value = quantity * ecost tax included * tax rate
2821
            # tax value = quantity * ecost tax included * tax rate
2822
            # we should use the unitprice if included
2822
            # we should use the unitprice if included
2823
            my $cost_tax_excluded = $order->{unitprice_tax_excluded} || $order->{ecost_tax_excluded};
2823
            my $cost_tax_excluded = $order->{unitprice_tax_excluded} == 0 ?  $order->{ecost_tax_excluded} : $order->{unitprice_tax_excluded};
2824
            $order->{tax_value_on_ordering} = $order->{quantity} * get_rounded_price($cost_tax_excluded) * $order->{tax_rate_on_ordering};
2824
            $order->{tax_value_on_ordering} = $order->{quantity} * get_rounded_price($cost_tax_excluded) * $order->{tax_rate_on_ordering};
2825
        }
2825
        }
2826
    }
2826
    }
2827
- 

Return to bug 27203