Sha256: 1a032c8b915adc6f08c8af5be64007d107e01705261c1b167868bdaf8d7ac2f3

Contents?: true

Size: 492 Bytes

Versions: 11

Compression:

Stored size: 492 Bytes

Contents

FactoryBot.define do
  factory :supplier_invoice, class: "Comee::Core::SupplierInvoice" do
    purchase_order
    invoice_no { Faker::Alphanumeric.alpha(number: 8) }
    date_issued { Date.current }
    total_price { 0 }
    amount_paid { 0 }
    status { Comee::Core::SupplierInvoice.statuses[:draft] }
    payment_status { Comee::Core::SupplierInvoice.payment_statuses[:not_paid] }

    trait :approved do
      status { Comee::Core::SupplierInvoice.statuses[:approved] }
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
comee_core-0.2.57 spec/factories/comee/core/supplier_invoices.rb
comee_core-0.2.56 spec/factories/comee/core/supplier_invoices.rb
comee_core-0.2.55 spec/factories/comee/core/supplier_invoices.rb
comee_core-0.2.54 spec/factories/comee/core/supplier_invoices.rb
comee_core-0.2.53 spec/factories/comee/core/supplier_invoices.rb
comee_core-0.2.52 spec/factories/comee/core/supplier_invoices.rb
comee_core-0.2.51 spec/factories/comee/core/supplier_invoices.rb
comee_core-0.2.50 spec/factories/comee/core/supplier_invoices.rb
comee_core-0.2.49 spec/factories/comee/core/supplier_invoices.rb
comee_core-0.2.48 spec/factories/comee/core/supplier_invoices.rb
comee_core-0.2.47 spec/factories/comee/core/supplier_invoices.rb