Sha256: e9c1e2b801f810c7312ba572cb6067a2efbc9fb31fc56f8d9798bfe006b2745b
Contents?: true
Size: 1.06 KB
Versions: 17
Compression:
Stored size: 1.06 KB
Contents
FactoryBot.define do factory :invoice, class: "Comee::Core::Invoice" do invoice_no { nil } sales_order invoice_type { Comee::Core::Invoice::DELIVERY } pod date_issued { Date.current } due_date { Date.current.advance(days: 10) } total_price { 0 } amount_paid { 0 } amount_credited { 0 } payment_term { Faker::Lorem.sentence } pct_advanced { nil } notifications_sent { 0 } status { Comee::Core::Invoice.statuses[:draft] } payment_status { Comee::Core::Invoice.payment_statuses[:not_paid] } association :invoice_address, factory: :client_address, address_type: Comee::Core::ClientAddress::INVOICING_ADDRESS trait :approved do status { Comee::Core::Invoice.statuses[:approved] } end trait :issued do status { Comee::Core::Invoice.statuses[:issued] } end trait :advance do invoice_type { Comee::Core::Invoice::ADVANCE } pod { nil } pct_advanced { 25 } end trait :direct do invoice_type { Comee::Core::Invoice::DIRECT } pct_advanced { nil } end end end
Version data entries
17 entries across 17 versions & 1 rubygems