Sha256: 5f8562345777de496a62bcc02dd163fa4dee260ae9bc7c362730f195886ebab3
Contents?: true
Size: 652 Bytes
Versions: 62
Compression:
Stored size: 652 Bytes
Contents
module Workarea module Pricing class ShippingTotals def initialize(shipping) @shipping = shipping @price_adjustments = PriceAdjustmentSet.new( @shipping.price_adjustments ) end def total set_shipping_total set_tax_total end def set_shipping_total relevant_adjustments = @price_adjustments.adjusting('shipping') @shipping.shipping_total = relevant_adjustments.sum end def set_tax_total relevant_adjustments = @price_adjustments.adjusting('tax') @shipping.tax_total = relevant_adjustments.sum end end end end
Version data entries
62 entries across 62 versions & 1 rubygems