Sha256: fcb44ca1237a2046c344b61a793c9ebd7168b5dd65f538b8f06b378ce00f6238
Contents?: true
Size: 395 Bytes
Versions: 9
Compression:
Stored size: 395 Bytes
Contents
# This migration comes from spree (originally 20140709160534) class BackfillLineItemPreTaxAmount < ActiveRecord::Migration[4.2] def change # set pre_tax_amount to discounted_amount - included_tax_total execute(<<-SQL) UPDATE spree_line_items SET pre_tax_amount = ((price * quantity) + promo_total) - included_tax_total WHERE pre_tax_amount IS NULL; SQL end end
Version data entries
9 entries across 9 versions & 2 rubygems