Lines 2864-2871
sub populate_order_with_prices {
Link Here
|
2864 |
|
2864 |
|
2865 |
# tax value = quantity * ecost tax excluded * tax rate |
2865 |
# tax value = quantity * ecost tax excluded * tax rate |
2866 |
# we should use the unitprice if included |
2866 |
# we should use the unitprice if included |
2867 |
my $cost_tax_included = $order->{unitprice_tax_included} || $order->{ecost_tax_included}; |
2867 |
my $cost_tax_included = $order->{unitprice_tax_included} == 0 ? $order->{ecost_tax_included} : $order->{unitprice_tax_included}; |
2868 |
my $cost_tax_excluded = $order->{unitprice_tax_excluded} || $order->{ecost_tax_excluded}; |
2868 |
my $cost_tax_excluded = $order->{unitprice_tax_excluded} == 0 ? $order->{ecost_tax_excluded} : $order->{unitprice_tax_excluded}; |
2869 |
$order->{tax_value_on_ordering} = ( get_rounded_price($cost_tax_included) - get_rounded_price($cost_tax_excluded) ) * $order->{quantity}; |
2869 |
$order->{tax_value_on_ordering} = ( get_rounded_price($cost_tax_included) - get_rounded_price($cost_tax_excluded) ) * $order->{quantity}; |
2870 |
|
2870 |
|
2871 |
} |
2871 |
} |
Lines 2886-2892
sub populate_order_with_prices {
Link Here
|
2886 |
|
2886 |
|
2887 |
# tax value = quantity * ecost tax included * tax rate |
2887 |
# tax value = quantity * ecost tax included * tax rate |
2888 |
# we should use the unitprice if included |
2888 |
# we should use the unitprice if included |
2889 |
my $cost_tax_excluded = $order->{unitprice_tax_excluded} || $order->{ecost_tax_excluded}; |
2889 |
my $cost_tax_excluded = $order->{unitprice_tax_excluded} == 0 ? $order->{ecost_tax_excluded} : $order->{unitprice_tax_excluded}; |
2890 |
$order->{tax_value_on_ordering} = $order->{quantity} * get_rounded_price($cost_tax_excluded) * $order->{tax_rate_on_ordering}; |
2890 |
$order->{tax_value_on_ordering} = $order->{quantity} * get_rounded_price($cost_tax_excluded) * $order->{tax_rate_on_ordering}; |
2891 |
} |
2891 |
} |
2892 |
} |
2892 |
} |
2893 |
- |
|
|