diff --git a/db/seeds.rb b/db/seeds.rb index 81442b4f7d..c82c8f7108 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -550,11 +550,14 @@ def seed_quantity(item_name, organization, storage_location, quantity) 20.times.each do storage_location = random_record_for_org(pdx_org, StorageLocation) stored_inventory_items_sample = storage_location.inventory_items.sample(20) + delivery_method = Distribution.delivery_methods.keys.sample + shipping_cost = delivery_method == "shipped" ? (rand(20.0..100.0)).round(2).to_s : nil distribution = Distribution.create!(storage_location: storage_location, partner: random_record_for_org(pdx_org, Partner), organization: pdx_org, issued_at: Faker::Date.between(from: 4.days.ago, to: Time.zone.today), - delivery_method: Distribution.delivery_methods.keys.sample, + delivery_method: delivery_method, + shipping_cost: shipping_cost, comment: 'Urgent') stored_inventory_items_sample.each do |stored_inventory_item|