Add automatic generation of financial transactions and links

This commit is contained in:
Patrick Gansterer 2017-01-26 13:27:30 +01:00
parent 91eeac6c40
commit 8e2ca5e7d7
11 changed files with 284 additions and 0 deletions

15
spec/factories/invoice.rb Normal file
View file

@ -0,0 +1,15 @@
require 'factory_bot'
FactoryBot.define do
factory :invoice do
supplier
number { rand(1..99999) }
amount { rand(0.1..26.0).round(2) }
after :create do |invoice|
invoice.supplier.reload
end
end
end