Sha256: 0ef51c534328d23bb529ef83fcf92f78efd5262e2d4379246915fa7e4b1262c0
Contents?: true
Size: 1.58 KB
Versions: 19
Compression:
Stored size: 1.58 KB
Contents
FactoryBot.define do factory :sales_order, class: "Comee::Core::SalesOrder" do order_number { nil } order_date { Date.current } customer_order fulfillment_center client order_terms { Faker::Lorem.sentence } shipment_address { Faker::Address.full_address } delivery_address { Faker::Address.full_address } invoice_address { Faker::Address.full_address } destination { Faker::Address.city } handover_date { Date.current.advance(weeks: 1) } shipping_date { Date.current.advance(days: 10) } delivery_date { Date.current.advance(days: 15) } consignee { Faker::Name.name } parent_client_name { Faker::Name.name } payment_term { Faker::Lorem.sentence } delivery_term { Faker::Lorem.sentence } payment_penalty { 0 } status { Comee::Core::SalesOrder.statuses[:draft] } consolidator_date { Date.current } voyage_no { Faker::Alphanumeric.alpha(number: 10) } shipping_arrangement { Comee::Core::SalesOrder::OWN } purchase_status { Comee::Core::SalesOrder.purchase_statuses[:unprocessed] } total_price { 0 } amount_paid { 0 } pallete_note { Faker::Lorem.sentence } remark { Faker::Lorem.sentence } created_by { Faker::Name.name } trait :submitted do status { Comee::Core::SalesOrder.statuses[:submitted] } end trait :confirmed do status { Comee::Core::SalesOrder.statuses[:confirmed] } end trait :accepted do status { Comee::Core::SalesOrder.statuses[:accepted] } end trait :canceled do status { Comee::Core::SalesOrder.statuses[:canceled] } end end end
Version data entries
19 entries across 19 versions & 1 rubygems