comee_core 0.1.96 → 0.1.98

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/comee/core/agents_controller.rb +13 -0
  3. data/app/controllers/comee/core/application_controller.rb +15 -2
  4. data/app/controllers/comee/core/back_orders_controller.rb +2 -2
  5. data/app/controllers/comee/core/client_prices_controller.rb +3 -10
  6. data/app/controllers/comee/core/client_warehouses_controller.rb +13 -0
  7. data/app/controllers/comee/core/clients_controller.rb +42 -9
  8. data/app/controllers/comee/core/contacts_controller.rb +13 -0
  9. data/app/controllers/comee/core/customer_order_items_controller.rb +3 -2
  10. data/app/controllers/comee/core/customer_orders_controller.rb +3 -3
  11. data/app/controllers/comee/core/item_statuses_controller.rb +2 -2
  12. data/app/controllers/comee/core/notifications_controller.rb +4 -4
  13. data/app/controllers/comee/core/product_lookups_controller.rb +2 -2
  14. data/app/controllers/comee/core/products_controller.rb +7 -9
  15. data/app/controllers/comee/core/purchase_order_items_controller.rb +2 -2
  16. data/app/controllers/comee/core/purchase_orders_controller.rb +2 -2
  17. data/app/controllers/comee/core/quotation_request_items_controller.rb +2 -2
  18. data/app/controllers/comee/core/quotation_requests_controller.rb +8 -9
  19. data/app/controllers/comee/core/sales_order_items_controller.rb +1 -1
  20. data/app/controllers/comee/core/sales_orders_controller.rb +13 -7
  21. data/app/controllers/comee/core/shipment_items_controller.rb +13 -13
  22. data/app/controllers/comee/core/suppliers_controller.rb +4 -6
  23. data/app/controllers/comee/core/unit_conversions_controller.rb +1 -1
  24. data/app/controllers/comee/core/units_controller.rb +1 -1
  25. data/app/controllers/concerns/comee/core/common.rb +33 -7
  26. data/app/models/comee/core/agent.rb +7 -0
  27. data/app/models/comee/core/client.rb +4 -1
  28. data/app/models/comee/core/client_warehouse.rb +8 -0
  29. data/app/models/comee/core/contact.rb +7 -0
  30. data/app/models/comee/core/customer_order_item.rb +6 -0
  31. data/app/models/comee/core/master_price.rb +1 -0
  32. data/app/models/comee/core/price.rb +2 -1
  33. data/app/models/comee/core/sales_order.rb +1 -2
  34. data/app/models/comee/core/sales_order_item.rb +6 -1
  35. data/app/models/comee/core/supplier.rb +2 -0
  36. data/app/serializers/comee/core/agent_serializer.rb +7 -0
  37. data/app/serializers/comee/core/client_serializer.rb +4 -1
  38. data/app/serializers/comee/core/client_warehouse_serializer.rb +8 -0
  39. data/app/serializers/comee/core/contact_serializer.rb +7 -0
  40. data/app/serializers/comee/core/product_serializer.rb +2 -2
  41. data/app/serializers/comee/core/sales_order_item_serializer.rb +1 -1
  42. data/app/serializers/comee/core/supplier_serializer.rb +1 -0
  43. data/app/services/comee/core/customer_order_service.rb +7 -2
  44. data/config/routes.rb +7 -1
  45. data/db/migrate/20230728122618_create_comee_core_suppliers.rb +4 -0
  46. data/db/migrate/20230728123039_create_comee_core_clients.rb +4 -0
  47. data/db/migrate/20230728123458_create_comee_core_agents.rb +23 -0
  48. data/db/migrate/20230728123559_create_comee_core_contacts.rb +34 -0
  49. data/db/migrate/20230811102708_create_comee_core_customer_order_items.rb +1 -0
  50. data/db/migrate/20230812212844_create_comee_core_sales_order_items.rb +1 -0
  51. data/db/migrate/20230813235946_create_comee_core_master_prices.rb +2 -1
  52. data/db/migrate/20230814151601_create_comee_core_client_prices.rb +2 -1
  53. data/db/migrate/20240119100125_create_comee_core_client_warehouses.rb +15 -0
  54. data/lib/comee/core/version.rb +1 -1
  55. data/spec/factories/comee/core/agents.rb +8 -0
  56. data/spec/factories/comee/core/client_prices.rb +1 -1
  57. data/spec/factories/comee/core/client_warehouses.rb +8 -0
  58. data/spec/factories/comee/core/clients.rb +2 -1
  59. data/spec/factories/comee/core/contacts.rb +8 -0
  60. data/spec/factories/comee/core/customer_order_items.rb +1 -0
  61. data/spec/factories/comee/core/fulfillment_centers.rb +1 -1
  62. data/spec/factories/comee/core/master_prices.rb +1 -0
  63. data/spec/factories/comee/core/sales_order_items.rb +1 -0
  64. data/spec/factories/comee/core/suppliers.rb +1 -0
  65. metadata +35 -12
  66. data/app/models/comee/core/warehouse_shipment.rb +0 -70
  67. data/app/models/comee/core/warehouse_shipment_item.rb +0 -37
  68. data/db/migrate/20231003080017_create_comee_core_warehouse_shipments.rb +0 -17
  69. data/db/migrate/20231004105455_create_comee_core_warehouse_shipment_items.rb +0 -17
  70. data/spec/factories/comee/core/warehouse_shipment_items.rb +0 -7
  71. data/spec/factories/comee/core/warehouse_shipments.rb +0 -9
@@ -3,7 +3,10 @@ module Comee
3
3
  class Client < ApplicationRecord
4
4
  belongs_to :user, optional: true
5
5
  belongs_to :parent, class_name: "Comee::Core::Client", optional: true
6
- has_many :warehouse_shipments
6
+ belongs_to :currency, optional: true
7
+ has_and_belongs_to_many :contacts, join_table: :comee_core_clients_contacts
8
+ has_and_belongs_to_many :agents, join_table: :comee_core_clients_agents
9
+ has_many :client_warehouses
7
10
 
8
11
  validates :code, :name, :address, :locale, presence: true
9
12
  validates :code, uniqueness: true
@@ -0,0 +1,8 @@
1
+ module Comee
2
+ module Core
3
+ class ClientWarehouse < ApplicationRecord
4
+ belongs_to :client
5
+ validates :name, :address, presence: true
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,7 @@
1
+ module Comee
2
+ module Core
3
+ class Contact < ApplicationRecord
4
+ validates :first_name, :last_name, :email, :telephone, presence: true
5
+ end
6
+ end
7
+ end
@@ -1,12 +1,18 @@
1
1
  module Comee
2
2
  module Core
3
3
  class CustomerOrderItem < ApplicationRecord
4
+ before_save :calculate_total_price, unless: proc { |item| item.total_price }
5
+
4
6
  belongs_to :customer_order
5
7
  belongs_to :product
6
8
  belongs_to :unit
7
9
 
8
10
  validates :customer_item_no, :quantity, :price, :delivery_date, presence: true
9
11
 
12
+ def calculate_total_price
13
+ self.total_price = price * quantity
14
+ end
15
+
10
16
  def self.ransackable_attributes(_auth_object = nil)
11
17
  %w[id customer_order_id product_id unit_id]
12
18
  end
@@ -1,6 +1,7 @@
1
1
  module Comee
2
2
  module Core
3
3
  class MasterPrice < Price
4
+ enum :price_status, {draft: 0, approved: 1}
4
5
  belongs_to :supplier
5
6
  belongs_to :previous_price, class_name: "Comee::Core::MasterPrice", optional: true
6
7
  belongs_to :next_price, class_name: "Comee::Core::MasterPrice", optional: true
@@ -5,6 +5,7 @@ module Comee
5
5
  before_save :compute_status
6
6
 
7
7
  enum :status, {past: 0, current: 1, future: 2}
8
+ enum :price_status, {draft: 0, approved: 1}
8
9
 
9
10
  scope :current, -> { where(status: Price.statuses[:current]) }
10
11
  scope :future, -> { where(status: Price.statuses[:future]) }
@@ -12,7 +13,7 @@ module Comee
12
13
  belongs_to :product
13
14
  belongs_to :unit
14
15
 
15
- validates :valid_from, :valid_to, presence: true
16
+ validates :price_status, :valid_from, :valid_to, presence: true
16
17
  validate :validate_price_validity_dates
17
18
 
18
19
  def validate_price_validity_dates
@@ -26,8 +26,7 @@ module Comee
26
26
 
27
27
  def total_price
28
28
  sales_order_items = SalesOrderItem.where(sales_order_id: id)
29
- total_price = sales_order_items.sum(&:price)
30
- self.total_price = total_price
29
+ self.total_price = sales_order_items.sum(&:total_price)
31
30
  end
32
31
 
33
32
  def set_parent_client_name
@@ -1,18 +1,23 @@
1
1
  module Comee
2
2
  module Core
3
3
  class SalesOrderItem < ApplicationRecord
4
+ before_save :calculate_total_price
5
+
4
6
  belongs_to :sales_order
5
7
  belongs_to :customer_order_item
6
8
  belongs_to :product
7
9
  belongs_to :unit
8
10
  belongs_to :source, class_name: "Comee::Core::FulfillmentCenter", optional: true
9
- # has_many :warehouse_shipment_items
10
11
  has_many :shipment_items
11
12
 
12
13
  validates :customer_item_no, :delivery_date, presence: true
13
14
  validates :quantity, :price, presence: true, numericality: {greater_than: 0}
14
15
  validates :quantity_delivered, numericality: {greater_than_or_equal_to: 0}
15
16
 
17
+ def calculate_total_price
18
+ self.total_price = price * quantity
19
+ end
20
+
16
21
  def self.ransackable_attributes(_auth_object = nil)
17
22
  %w[
18
23
  id
@@ -2,6 +2,8 @@ module Comee
2
2
  module Core
3
3
  class Supplier < ApplicationRecord
4
4
  belongs_to :user, optional: true
5
+ belongs_to :currency, optional: true
6
+ has_and_belongs_to_many :contacts, join_table: :comee_core_suppliers_contacts
5
7
 
6
8
  validates :code, presence: true, uniqueness: true
7
9
  validates :name, :address, :locale, presence: true
@@ -0,0 +1,7 @@
1
+ module Comee
2
+ module Core
3
+ class AgentSerializer < ActiveModel::Serializer
4
+ attributes :id, :name, :address, :email, :telephone
5
+ end
6
+ end
7
+ end
@@ -1,8 +1,11 @@
1
1
  module Comee
2
2
  module Core
3
3
  class ClientSerializer < ActiveModel::Serializer
4
- attributes :id, :code, :name, :address, :locale, :user_id, :user_name, :consignees, :shipment_addresses
4
+ attributes :id, :code, :name, :address, :locale, :user_id, :user_name, :consignees, :shipment_addresses, :currency
5
5
  belongs_to :parent
6
+ has_many :agents
7
+ has_many :contacts
8
+ has_many :client_warehouses
6
9
  end
7
10
  end
8
11
  end
@@ -0,0 +1,8 @@
1
+ module Comee
2
+ module Core
3
+ class ClientWarehouseSerializer < ActiveModel::Serializer
4
+ attributes :id, :name, :description, :address
5
+ belongs_to :client
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,7 @@
1
+ module Comee
2
+ module Core
3
+ class ContactSerializer < ActiveModel::Serializer
4
+ attributes :id, :first_name, :last_name, :email, :telephone
5
+ end
6
+ end
7
+ end
@@ -1,8 +1,8 @@
1
1
  module Comee
2
2
  module Core
3
3
  class ProductSerializer < ActiveModel::Serializer
4
- attributes :id, :code, :name, :description, :thumbnail_image_url, :images_url, :preferred_units, :weight, :dimensions, :hs_code,
5
- :hs_description
4
+ attributes :id, :code, :name, :description, :thumbnail_image_url, :images_url, :preferred_units, :weight,
5
+ :dimensions, :hs_code, :hs_description
6
6
  belongs_to :source
7
7
  belongs_to :weight_unit
8
8
  end
@@ -2,7 +2,7 @@ module Comee
2
2
  module Core
3
3
  class SalesOrderItemSerializer < ActiveModel::Serializer
4
4
  attributes :id, :customer_item_no, :quantity, :quantity_delivered, :price, :handover_date, :delivery_date, :eb_number,
5
- :lead_time, :comment, :action_note, :po_reference
5
+ :lead_time, :comment, :action_note, :po_reference, :total_price
6
6
 
7
7
  belongs_to :sales_order
8
8
  belongs_to :customer_order_item
@@ -2,6 +2,7 @@ module Comee
2
2
  module Core
3
3
  class SupplierSerializer < ActiveModel::Serializer
4
4
  attributes :id, :code, :name, :address, :locale, :user_id
5
+ belongs_to :currency
5
6
  end
6
7
  end
7
8
  end
@@ -8,7 +8,11 @@ module Comee
8
8
  order_params = params.except(:items)
9
9
  order = Comee::Core::CustomerOrder.create(**order_params)
10
10
  items = params.slice(:items)[:items]
11
- items.each { |item| item[:customer_order_id] = order.id }
11
+ items.each do |item|
12
+ item[:customer_order_id] = order.id
13
+ item[:total_price] = item[:quantity] * item[:price] unless item.key?(:total_price) && !item[:total_price].nil?
14
+ end
15
+
12
16
  Comee::Core::CustomerOrderItem.insert_all!(items)
13
17
  end
14
18
  order
@@ -81,7 +85,7 @@ module Comee
81
85
 
82
86
  price = convert_price(master_price.selling_price, master_price.unit_id, new_unit_id)
83
87
  end
84
- {quantity: quantity, price: price}
88
+ {quantity: quantity, price: price, total_price: quantity * price}
85
89
  end
86
90
 
87
91
  def submit(id)
@@ -171,6 +175,7 @@ module Comee
171
175
  customer_item_no: item.product.code,
172
176
  quantity: quantity,
173
177
  price: price,
178
+ total_price: quantity * price,
174
179
  delivery_date: item.delivery_date,
175
180
  lead_time: master_price&.lead_time
176
181
  }
data/config/routes.rb CHANGED
@@ -8,6 +8,7 @@ Comee::Core::Engine.routes.draw do
8
8
  post "mark_as_unread", controller: :notifications, action: :mark_as_unread
9
9
  end
10
10
  end
11
+ resources :contacts
11
12
  resources :suppliers do
12
13
  collection do
13
14
  post "filter"
@@ -82,13 +83,16 @@ Comee::Core::Engine.routes.draw do
82
83
  get "rfq_products", controller: :quotation_requests, action: :rfq_products_for_client
83
84
  get "prices", controller: :client_prices, action: :fetch_for_client
84
85
  get "consignees"
85
- get "shipment_addresses"
86
+ get "agents"
86
87
  get "shipment_items", controller: :shipment_items, action: :filter_for_client
88
+ post "create_agent"
89
+ post "create_contact"
87
90
  end
88
91
  collection do
89
92
  post "filter"
90
93
  end
91
94
  end
95
+ resources :agents
92
96
  post "/client_prices/filter", controller: :client_prices, action: :filter
93
97
  resources :client_prices
94
98
  post "/back_orders/filter", controller: :back_orders, action: :filter
@@ -127,4 +131,6 @@ Comee::Core::Engine.routes.draw do
127
131
  end
128
132
  end
129
133
  resources :fulfillment_centers
134
+
135
+ resources :client_warehouses
130
136
  end
@@ -5,6 +5,10 @@ class CreateComeeCoreSuppliers < ActiveRecord::Migration[7.0]
5
5
  t.string :name, null: false
6
6
  t.string :address, null: false
7
7
  t.string :locale, null: false, default: "en"
8
+ t.references :currency,
9
+ null: true,
10
+ index: {name: "currency_on_ccs_indx"},
11
+ foreign_key: {to_table: :comee_core_currencies}
8
12
  t.references :user,
9
13
  null: true,
10
14
  index: {name: "user_on_ccs_indx"},
@@ -15,6 +15,10 @@ class CreateComeeCoreClients < ActiveRecord::Migration[7.0]
15
15
  foreign_key: {to_table: :comee_core_clients}
16
16
  t.string :consignees, array: true, default: []
17
17
  t.string :shipment_addresses, array: true, default: []
18
+ t.references :currency,
19
+ null: true,
20
+ index: {name: "currency_on_ccc_indx"},
21
+ foreign_key: {to_table: :comee_core_currencies}
18
22
 
19
23
  t.timestamps
20
24
  end
@@ -0,0 +1,23 @@
1
+ class CreateComeeCoreAgents < ActiveRecord::Migration[7.1]
2
+ def change
3
+ create_table :comee_core_agents do |t|
4
+ t.string :name, null: false
5
+ t.string :address
6
+ t.string :email, null: false
7
+ t.string :telephone, null: false
8
+
9
+ t.timestamps
10
+ end
11
+
12
+ create_table :comee_core_clients_agents, id: false do |t|
13
+ t.references :client,
14
+ null: false,
15
+ index: {name: "client_on_ccca_indx"},
16
+ foreign_key: {to_table: :comee_core_clients}
17
+ t.references :agent,
18
+ null: false,
19
+ index: {name: "agent_on_ccca_indx"},
20
+ foreign_key: {to_table: :comee_core_agents}
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,34 @@
1
+ class CreateComeeCoreContacts < ActiveRecord::Migration[7.1]
2
+ def change
3
+ create_table :comee_core_contacts do |t|
4
+ t.string :first_name, null: false
5
+ t.string :last_name, null: false
6
+ t.string :email, null: false
7
+ t.string :telephone, null: false
8
+
9
+ t.timestamps
10
+ end
11
+
12
+ create_table :comee_core_suppliers_contacts, id: false do |t|
13
+ t.references :supplier,
14
+ null: false,
15
+ index: {name: "supplier_on_ccsc_indx"},
16
+ foreign_key: {to_table: :comee_core_suppliers}
17
+ t.references :contact,
18
+ null: false,
19
+ index: {name: "sc_on_ccsc_indx"},
20
+ foreign_key: {to_table: :comee_core_contacts}
21
+ end
22
+
23
+ create_table :comee_core_clients_contacts, id: false do |t|
24
+ t.references :client,
25
+ null: false,
26
+ index: {name: "client_on_ccsc_indx"},
27
+ foreign_key: {to_table: :comee_core_clients}
28
+ t.references :contact,
29
+ null: false,
30
+ index: {name: "cc_on_ccsc_indx"},
31
+ foreign_key: {to_table: :comee_core_contacts}
32
+ end
33
+ end
34
+ end
@@ -16,6 +16,7 @@ class CreateComeeCoreCustomerOrderItems < ActiveRecord::Migration[7.1]
16
16
  t.string :customer_item_no, null: false
17
17
  t.float :quantity, null: false, default: 0
18
18
  t.float :price, null: false, default: 0
19
+ t.float :total_price, null: false, default: 0
19
20
  t.date :delivery_date, null: false
20
21
  t.boolean :canceled, default: false
21
22
 
@@ -25,6 +25,7 @@ class CreateComeeCoreSalesOrderItems < ActiveRecord::Migration[7.0]
25
25
  t.float :quantity, null: false
26
26
  t.float :quantity_delivered, null: false, default: 0
27
27
  t.float :price, null: false
28
+ t.float :total_price, null: false
28
29
  t.date :delivery_date, null: false
29
30
  t.boolean :canceled, default: false
30
31
  t.date :handover_date
@@ -5,7 +5,8 @@ class CreateComeeCoreMasterPrices < ActiveRecord::Migration[7.0]
5
5
  t.float :selling_price, null: false
6
6
  t.date :valid_from, null: false
7
7
  t.date :valid_to, null: false
8
- t.float :status, null: false, default: 0
8
+ t.integer :status, null: false, default: 0
9
+ t.integer :price_status, null: false, default: 0
9
10
  t.boolean :primary, null: false, default: false
10
11
  t.float :margin, null: false, default: 0
11
12
  t.integer :lead_time
@@ -4,7 +4,8 @@ class CreateComeeCoreClientPrices < ActiveRecord::Migration[7.0]
4
4
  t.date :valid_from, null: false
5
5
  t.date :valid_to, null: false
6
6
  t.float :price, null: false
7
- t.float :status, null: false, default: 0
7
+ t.integer :status, null: false, default: 0
8
+ t.integer :price_status, null: false, default: 0
8
9
  t.float :margin, null: false, default: 0
9
10
  t.integer :margin_type, null: false, default: 0
10
11
  t.references :product,
@@ -0,0 +1,15 @@
1
+ class CreateComeeCoreClientWarehouses < ActiveRecord::Migration[7.1]
2
+ def change
3
+ create_table :comee_core_client_warehouses do |t|
4
+ t.string :name, null: false
5
+ t.string :description
6
+ t.string :address, null: false
7
+ t.references :client,
8
+ null: false,
9
+ index: {name: "client_on_cccw_indx"},
10
+ foreign_key: {to_table: :comee_core_clients}
11
+
12
+ t.timestamps
13
+ end
14
+ end
15
+ end
@@ -1,5 +1,5 @@
1
1
  module Comee
2
2
  module Core
3
- VERSION = "0.1.96".freeze
3
+ VERSION = "0.1.98".freeze
4
4
  end
5
5
  end
@@ -0,0 +1,8 @@
1
+ FactoryBot.define do
2
+ factory :agent, class: "Comee::Core::Agent" do
3
+ name { Faker::Name.name }
4
+ address { Faker::Address.full_address }
5
+ email { Faker::Internet.email }
6
+ telephone { Faker::PhoneNumber.phone_number }
7
+ end
8
+ end
@@ -2,7 +2,7 @@ FactoryBot.define do
2
2
  factory :client_price, class: "Comee::Core::ClientPrice" do
3
3
  valid_from { Date.current.advance(months: -1) }
4
4
  valid_to { Date.current.advance(months: 1) }
5
- status { 0 }
5
+ price_status { Comee::Core::Price.price_statuses[:draft] }
6
6
  price { 100 }
7
7
  product
8
8
  client
@@ -0,0 +1,8 @@
1
+ FactoryBot.define do
2
+ factory :client_warehouse, class: "Comee::Core::ClientWarehouse" do
3
+ name { Faker::Lorem.word }
4
+ description { Faker::Lorem.sentence }
5
+ address { Faker::Address.full_address }
6
+ client
7
+ end
8
+ end
@@ -1,12 +1,13 @@
1
1
  FactoryBot.define do
2
2
  factory :client, class: "Comee::Core::Client" do
3
3
  user
4
- code { Faker::Alphanumeric.unique.alpha(number: 8) }
4
+ sequence(:code) { |n| "#{Faker::Alphanumeric.unique.alpha(number: 8)}-#{n}" }
5
5
  name { Faker::Name.name }
6
6
  address { Faker::Address.full_address }
7
7
  locale { "en" }
8
8
  parent { nil }
9
9
  consignees { [] }
10
10
  shipment_addresses { [] }
11
+ currency
11
12
  end
12
13
  end
@@ -0,0 +1,8 @@
1
+ FactoryBot.define do
2
+ factory :contact, class: "Comee::Core::Contact" do
3
+ first_name { Faker::Name.first_name }
4
+ last_name { Faker::Name.last_name }
5
+ email { Faker::Internet.email }
6
+ telephone { Faker::PhoneNumber.phone_number }
7
+ end
8
+ end
@@ -6,6 +6,7 @@ FactoryBot.define do
6
6
  customer_item_no { Faker::Alphanumeric.alpha(number: 10) }
7
7
  quantity { 1 }
8
8
  price { 1.5 }
9
+ total_price { quantity * price }
9
10
  delivery_date { Date.current }
10
11
  canceled { false }
11
12
 
@@ -1,6 +1,6 @@
1
1
  FactoryBot.define do
2
2
  factory :fulfillment_center, class: "Comee::Core::FulfillmentCenter" do
3
- code { Faker::Alphanumeric.alpha(number: 10) }
3
+ sequence(:code) { |n| "#{Faker::Alphanumeric.unique.alpha(number: 10)}-#{n}" }
4
4
  name { Faker::Name.name }
5
5
  address { Faker::Address.street_address }
6
6
  email { Faker::Internet.email }
@@ -7,6 +7,7 @@ FactoryBot.define do
7
7
  primary { false }
8
8
  margin { 10.0 }
9
9
  lead_time { nil }
10
+ price_status { Comee::Core::Price.price_statuses[:draft] }
10
11
  product
11
12
  supplier
12
13
  unit
@@ -9,6 +9,7 @@ FactoryBot.define do
9
9
  quantity { 100 }
10
10
  quantity_delivered { 0 }
11
11
  price { 50 }
12
+ total_price { quantity * price }
12
13
  delivery_date { Date.current.advance(months: 1) }
13
14
  handover_date { Date.current }
14
15
  eb_number { Faker::Lorem.word }
@@ -5,5 +5,6 @@ FactoryBot.define do
5
5
  address { Faker::Address.full_address }
6
6
  locale { "en" }
7
7
  user
8
+ currency
8
9
  end
9
10
  end