Add SupplierCategory
This allows the categorization of suppliers. For a better reporting it is necessary to split the expenses of the invoices. E.g. we want to be able to generate independent sums of general cost like the rent or electricity and the cost of the bought articles.
This commit is contained in:
parent
f5bbe0d5ae
commit
d90d188dbf
11 changed files with 90 additions and 25 deletions
|
|
@ -27,4 +27,5 @@ financial_transaction_class = FinancialTransactionClass.create(:name => "Other")
|
|||
FinancialTransactionType.create(:name => "Foodcoop", :financial_transaction_class_id => financial_transaction_class.id)
|
||||
|
||||
# First entry for article categories
|
||||
SupplierCategory.create(:name => "Other")
|
||||
ArticleCategory.create(:name => "Other", :description => "other, misc, unknown")
|
||||
|
|
|
|||
|
|
@ -2,11 +2,13 @@ require_relative 'seed_helper.rb'
|
|||
|
||||
## Suppliers & articles
|
||||
|
||||
SupplierCategory.create(:id => 1, :name => "Other")
|
||||
|
||||
Supplier.create([
|
||||
{:id => 1, :name => "Beautiful bakery", :address => "Smallstreet 1, Cookilage", :phone => "0123456789", :email => "info@bbakery.test", :min_order_quantity => "100"},
|
||||
{:id => 2, :name => "Chocolatiers", :address => "Multatuliroad 1, Amsterdam", :phone => "0123456789", :email => "info@chocolatiers.test", :url => "http://www.chocolatiers.test/", :contact_person => "Max Pure", :delivery_days => "Tue, Fr (Amsterdam)"},
|
||||
{:id => 3, :name => "Cheesemaker", :address => "Cheesestreet 5, London", :phone => "0123456789", :url => "http://www.cheesemaker.test/"},
|
||||
{:id => 4, :name => "The Nuthome", :address => "Alexanderplatz, Berlin", :phone => "0123456789", :email => "info@thenuthome.test", :url => "http://www.thenuthome.test/", :note => "delivery in Berlin; €9 delivery costs for orders under €123"}
|
||||
{:id => 1, :name => "Beautiful bakery", :supplier_category_id => 1, :address => "Smallstreet 1, Cookilage", :phone => "0123456789", :email => "info@bbakery.test", :min_order_quantity => "100"},
|
||||
{:id => 2, :name => "Chocolatiers", :supplier_category_id => 1, :address => "Multatuliroad 1, Amsterdam", :phone => "0123456789", :email => "info@chocolatiers.test", :url => "http://www.chocolatiers.test/", :contact_person => "Max Pure", :delivery_days => "Tue, Fr (Amsterdam)"},
|
||||
{:id => 3, :name => "Cheesemaker", :supplier_category_id => 1, :address => "Cheesestreet 5, London", :phone => "0123456789", :url => "http://www.cheesemaker.test/"},
|
||||
{:id => 4, :name => "The Nuthome", :supplier_category_id => 1, :address => "Alexanderplatz, Berlin", :phone => "0123456789", :email => "info@thenuthome.test", :url => "http://www.thenuthome.test/", :note => "delivery in Berlin; €9 delivery costs for orders under €123"}
|
||||
])
|
||||
|
||||
ArticleCategory.create(:id => 1, :name => "Other", :description => "other, misc, unknown")
|
||||
|
|
|
|||
|
|
@ -2,11 +2,13 @@ require_relative 'seed_helper.rb'
|
|||
|
||||
## Suppliers & articles
|
||||
|
||||
SupplierCategory.create(:id => 1, :name => "Other")
|
||||
|
||||
Supplier.create([
|
||||
{:id => 1, :name => "Koekenbakker", :address => "Dorpsstraat 1, Koekange", :phone => "012 3456789", :email => "info@dekoekenbakker.test", :min_order_quantity => "100"},
|
||||
{:id => 2, :name => "Chocolademakkers", :address => "Multatuliweg 1, Amsterdam", :phone => "012 3456789", :email => "info@chocolademakkers.test", :url => "http://www.chocolademakkers.test/", :contact_person => "Max Puur", :delivery_days => "di, vr (Amsterdam)"},
|
||||
{:id => 3, :name => "Kaasmaker", :address => "Waagplein, Alkmaar", :phone => "012 3456789", :url => "http://www.kaaskamer.test/"},
|
||||
{:id => 4, :name => "Notenhuis", :address => "Damrak 1, Amsterdam", :phone => "012 3456789", :email => "info@notenhuis.test", :url => "http://www.notenhuis.test/", :note => "leveren in Amsterdam; €9 leverkosten bij bestellingen onder €123"}
|
||||
{:id => 1, :name => "Koekenbakker", :supplier_category_id => 1, :address => "Dorpsstraat 1, Koekange", :phone => "012 3456789", :email => "info@dekoekenbakker.test", :min_order_quantity => "100"},
|
||||
{:id => 2, :name => "Chocolademakkers", :supplier_category_id => 1, :address => "Multatuliweg 1, Amsterdam", :phone => "012 3456789", :email => "info@chocolademakkers.test", :url => "http://www.chocolademakkers.test/", :contact_person => "Max Puur", :delivery_days => "di, vr (Amsterdam)"},
|
||||
{:id => 3, :name => "Kaasmaker", :supplier_category_id => 1, :address => "Waagplein, Alkmaar", :phone => "012 3456789", :url => "http://www.kaaskamer.test/"},
|
||||
{:id => 4, :name => "Notenhuis", :supplier_category_id => 1, :address => "Damrak 1, Amsterdam", :phone => "012 3456789", :email => "info@notenhuis.test", :url => "http://www.notenhuis.test/", :note => "leveren in Amsterdam; €9 leverkosten bij bestellingen onder €123"}
|
||||
])
|
||||
|
||||
ArticleCategory.create(:id => 1, :name => "Other", :description => "overig, anders, onbekend")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue