Permalink
Browse files

Fixed retrieving of tax adjustments

  • Loading branch information...
1 parent eb2bd24 commit 082fc7769868b3cab4fe5053c94a11d28d5e28cb Thomas von Deyen committed Jul 2, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 app/controllers/checkout_controller_decorator.rb
@@ -259,7 +259,7 @@ def order_opts(order, payment_method, stage)
:items => items,
:currency => "EUR",
:subtotal => ((order.item_total * 100) + credits_total).to_i,
- :tax => ((order.adjustments.map { |a| a.amount if ( a.source_type == 'Order' && a.label == 'Tax') }.compact.sum) * 100 ).to_i,
+ :tax => ((order.adjustments.map { |a| a.amount if ( a.source_type == 'Order' && a.originator_type == 'TaxRate') }.compact.sum) * 100 ).to_i,
:shipping => ((order.adjustments.map { |a| a.amount if a.source_type == 'Shipment' }.compact.sum) * 100 ).to_i,
:money => (order.total * 100 ).to_i }

0 comments on commit 082fc77

Please sign in to comment.