Sha256: dfb65a63fd9fe504110547023e035576787255c5ae44e862201f65331ac3f6a4
Contents?: true
Size: 430 Bytes
Versions: 22
Compression:
Stored size: 430 Bytes
Contents
FactoryBot.define do factory :credit_note, class: "Comee::Core::CreditNote" do credit_note_no { nil } total_price { 0 } vat { 0 } status { Comee::Core::CreditNote.statuses[:draft] } date_issued { Date.current } remark { Faker::Lorem.sentence } after(:build) do |note, _| invoice = create(:invoice) create(:invoice_item, invoice: invoice) note.invoice ||= invoice end end end
Version data entries
22 entries across 22 versions & 1 rubygems