comee_core 0.3.26 → 0.3.27
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/comee/core/customer_orders_controller.rb +4 -4
- data/app/controllers/comee/core/quotation_requests_controller.rb +2 -2
- data/app/controllers/comee/core/sales_orders_controller.rb +2 -2
- data/app/models/comee/core/client_address.rb +0 -9
- data/app/models/comee/core/customer_order.rb +10 -0
- data/app/models/comee/core/quotation_request.rb +6 -0
- data/app/models/comee/core/sales_order.rb +10 -0
- data/app/services/comee/core/beo_service.rb +1 -1
- data/app/services/comee/core/quotation_request_service.rb +2 -2
- data/db/migrate/20230728122618_create_comee_core_suppliers.rb +0 -1
- data/db/migrate/20230728123039_create_comee_core_clients.rb +1 -2
- data/db/migrate/{20240503040722_create_comee_core_client_addresses.rb → 20230728123222_create_comee_core_client_addresses.rb} +2 -0
- data/db/migrate/{20240629044824_create_comee_core_supplier_addresses.rb → 20230728123324_create_comee_core_supplier_addresses.rb} +2 -0
- data/db/migrate/20230728123458_create_comee_core_agents.rb +9 -1
- data/db/migrate/20230728123823_create_comee_core_purchase_orders.rb +1 -0
- data/db/migrate/20230811083239_create_comee_core_customer_orders.rb +15 -3
- data/db/migrate/20230812190652_create_comee_core_sales_orders.rb +16 -3
- data/db/migrate/20230812212844_create_comee_core_sales_order_items.rb +2 -0
- data/db/migrate/20230813041307_create_comee_core_product_lookups.rb +1 -0
- data/db/migrate/20230813235946_create_comee_core_master_prices.rb +4 -0
- data/db/migrate/20231121094339_create_comee_core_quotation_requests.rb +8 -2
- data/db/migrate/20240105205522_create_comee_core_invoices.rb +1 -0
- data/db/migrate/20240111112140_create_comee_core_pickup_schedules.rb +4 -0
- data/lib/comee/core/version.rb +1 -1
- data/spec/factories/comee/core/customer_orders.rb +3 -3
- data/spec/factories/comee/core/quotation_requests.rb +2 -2
- data/spec/factories/comee/core/sales_orders.rb +3 -3
- metadata +4 -16
- data/db/migrate/20240628205454_add_print_details_field_to_customer.rb +0 -5
- data/db/migrate/20240629065810_remove_address_field_from_supplier_and_client.rb +0 -7
- data/db/migrate/20240629135249_add_additional_fields_to_order.rb +0 -10
- data/db/migrate/20240629145738_add_telephone_and_email_to_address.rb +0 -8
- data/db/migrate/20240629160357_add_more_address_fields_to_agent.rb +0 -14
- data/db/migrate/20240629170409_add_vat_to_sales_orders.rb +0 -5
- data/db/migrate/20240630063656_add_aliases_field_to_product_lookup.rb +0 -5
- data/db/migrate/20240630083042_add_agent_to_pickup_schedule.rb +0 -8
- data/db/migrate/20240702151519_add_vat_to_purchase_order.rb +0 -5
- data/db/migrate/20240702181613_add_vat_to_invoice.rb +0 -5
- data/db/migrate/20240703204755_add_currency_to_master_price.rb +0 -9
- data/db/migrate/20240706160902_add_change_fields_to_sales_order_item.rb +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5fcdc2d3181c86c758211659e916fad888c721853b243a574b214cf346857b5c
|
4
|
+
data.tar.gz: 5211e208480c35c0abfb7fc25d74f6e63d4be24ae1ad598364bc50fd7b6c9656
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 302ab6758617d98c1f6d531c0406095d8bc2d6278d8b117a2434133a5a6d63730c58f5feb5c17991a49e6feb490df30de2021261652a1f231616767b813e5256
|
7
|
+
data.tar.gz: 7df0feed10ece41750cf9b2fea1a5a9fe3be91fc7928666d29dcc4b64025681dda7eae4df917bcd1d733362a443d8ceda430ee22647e0d4cadea95300ec1a9a3
|
@@ -66,8 +66,8 @@ module Comee
|
|
66
66
|
def model_params
|
67
67
|
params.require(:payload)
|
68
68
|
.permit(
|
69
|
-
:order_number, :order_date, :order_terms, :consignee, :
|
70
|
-
:final_delivery_date, :handover_date, :shipping_date, :
|
69
|
+
:order_number, :order_date, :order_terms, :consignee, :shipment_address_id, :final_destination,
|
70
|
+
:final_delivery_date, :handover_date, :shipping_date, :delivery_address_id, :invoice_address_id, :status,
|
71
71
|
:client_id, :consolidator_date, :voyage_no, :shipping_arrangement, :file
|
72
72
|
)
|
73
73
|
end
|
@@ -75,8 +75,8 @@ module Comee
|
|
75
75
|
def create_with_item_params
|
76
76
|
params.require(:payload)
|
77
77
|
.permit(
|
78
|
-
:order_number, :order_date, :order_terms, :consignee, :
|
79
|
-
:final_delivery_date, :handover_date, :shipping_date, :
|
78
|
+
:order_number, :order_date, :order_terms, :consignee, :shipment_address_id, :final_destination, :voyage_no,
|
79
|
+
:final_delivery_date, :handover_date, :shipping_date, :delivery_address_id, :invoice_address_id, :status, :client_id,
|
80
80
|
:consolidator_date, :shipping_arrangement,
|
81
81
|
items: %i[
|
82
82
|
serial_no customer_item_no customer_item_description product_id quantity price total_price unit_id delivery_date
|
@@ -65,11 +65,11 @@ module Comee
|
|
65
65
|
|
66
66
|
def model_params
|
67
67
|
params.require(:payload)
|
68
|
-
.permit(:reference_no, :order_number, :order_date, :
|
68
|
+
.permit(:reference_no, :order_number, :order_date, :delivery_address_id, :invoice_address_id, :status, :client_id)
|
69
69
|
end
|
70
70
|
|
71
71
|
def rfq_params
|
72
|
-
params.require(:payload).permit(:client_id, :order_number, :order_date, :
|
72
|
+
params.require(:payload).permit(:client_id, :order_number, :order_date, :delivery_address_id, :invoice_address_id,
|
73
73
|
items: %i[product_id unit_id customer_item_no quantity expected_delivery_date])
|
74
74
|
end
|
75
75
|
end
|
@@ -122,14 +122,14 @@ module Comee
|
|
122
122
|
|
123
123
|
def model_params
|
124
124
|
params.require(:payload).permit(:order_number, :order_date, :customer_order_id, :fulfillment_center_id,
|
125
|
-
:client_id, :order_terms, :
|
125
|
+
:client_id, :order_terms, :shipment_address_id, :delivery_address_id, :invoice_address_id,
|
126
126
|
:destination, :handover_date, :shipping_date, :delivery_date, :consignee, :payment_term,
|
127
127
|
:delivery_term, :payment_penalty, :status, :purchase_status, :total_price, :amount_paid,
|
128
128
|
:consolidator_date, :voyage_no, :shipping_arrangement, :pallete_note, :remark, files: [])
|
129
129
|
end
|
130
130
|
|
131
131
|
def back_order_params
|
132
|
-
params.permit(payload: [:supplier_id, :order_number, :order_date, :delivery_date, :
|
132
|
+
params.permit(payload: [:supplier_id, :order_number, :order_date, :delivery_date, :delivery_address_id, :invoice_address_id,
|
133
133
|
back_order_items: %i[product_id requested_quantity requested_price supplier_quantity delivery_date]])
|
134
134
|
end
|
135
135
|
|
@@ -1,18 +1,9 @@
|
|
1
1
|
module Comee
|
2
2
|
module Core
|
3
3
|
class ClientAddress < Address
|
4
|
-
# BASIC_ADDRESS = "Basic Address".freeze
|
5
|
-
# SHIPPING_ADDRESS = "Shipping Address".freeze
|
6
|
-
# DELIVERY_ADDRESS = "Delivery Address".freeze
|
7
|
-
# INVOICING_ADDRESS = "Invoicing Address".freeze
|
8
|
-
|
9
|
-
# ADDRESS_TYPES = [BASIC_ADDRESS, SHIPPING_ADDRESS, DELIVERY_ADDRESS, INVOICING_ADDRESS].freeze
|
10
|
-
|
11
4
|
belongs_to :client
|
12
|
-
# belongs_to :country, -> { where(lookup_type: :country) }, class_name: "Comee::Core::Lookup"
|
13
5
|
|
14
6
|
validates :name, presence: true
|
15
|
-
# validates :address_type, inclusion: {in: ADDRESS_TYPES}
|
16
7
|
|
17
8
|
validate :validate_default
|
18
9
|
|
@@ -6,6 +6,16 @@ module Comee
|
|
6
6
|
SHIPPING_ARRANGEMENTS = [OWN, AGENT].freeze
|
7
7
|
|
8
8
|
belongs_to :client
|
9
|
+
belongs_to :shipment_address,
|
10
|
+
-> { where(address_type: ClientAddress::SHIPPING_ADDRESS) },
|
11
|
+
class_name: "Comee::Core::ClientAddress",
|
12
|
+
optional: true
|
13
|
+
belongs_to :delivery_address,
|
14
|
+
-> { where(address_type: ClientAddress::DELIVERY_ADDRESS) },
|
15
|
+
class_name: "Comee::Core::ClientAddress"
|
16
|
+
belongs_to :invoice_address,
|
17
|
+
-> { where(address_type: ClientAddress::INVOICING_ADDRESS) },
|
18
|
+
class_name: "Comee::Core::ClientAddress"
|
9
19
|
has_many :customer_order_items
|
10
20
|
has_one_attached :file
|
11
21
|
|
@@ -4,6 +4,12 @@ module Comee
|
|
4
4
|
before_validation :set_reference_no, if: proc { |rfq| rfq.reference_no.nil? }
|
5
5
|
|
6
6
|
belongs_to :client
|
7
|
+
belongs_to :delivery_address,
|
8
|
+
-> { where(address_type: ClientAddress::DELIVERY_ADDRESS) },
|
9
|
+
class_name: "Comee::Core::ClientAddress"
|
10
|
+
belongs_to :invoice_address,
|
11
|
+
-> { where(address_type: ClientAddress::INVOICING_ADDRESS) },
|
12
|
+
class_name: "Comee::Core::ClientAddress"
|
7
13
|
has_many :quotation_request_items
|
8
14
|
|
9
15
|
enum :status, {draft: 0, submitted: 1, awaiting_confirmation: 2, confirmed: 3, converted: 4}
|
@@ -12,6 +12,16 @@ module Comee
|
|
12
12
|
belongs_to :customer_order
|
13
13
|
belongs_to :fulfillment_center, optional: true
|
14
14
|
belongs_to :client
|
15
|
+
belongs_to :shipment_address,
|
16
|
+
-> { where(address_type: ClientAddress::SHIPPING_ADDRESS) },
|
17
|
+
class_name: "Comee::Core::ClientAddress",
|
18
|
+
optional: true
|
19
|
+
belongs_to :delivery_address,
|
20
|
+
-> { where(address_type: ClientAddress::DELIVERY_ADDRESS) },
|
21
|
+
class_name: "Comee::Core::ClientAddress"
|
22
|
+
belongs_to :invoice_address,
|
23
|
+
-> { where(address_type: ClientAddress::INVOICING_ADDRESS) },
|
24
|
+
class_name: "Comee::Core::ClientAddress"
|
15
25
|
has_many :sales_order_items
|
16
26
|
has_many :additional_services
|
17
27
|
has_many_attached :files
|
@@ -37,7 +37,7 @@ module Comee
|
|
37
37
|
|
38
38
|
raise(StandardError, "No customs detail filed for sales order") unless @customs_details.present?
|
39
39
|
|
40
|
-
@address =
|
40
|
+
@address = @customs_details[0].sales_order.delivery_address
|
41
41
|
@customs_details[0].transportation_route.each_with_index do |tr, index|
|
42
42
|
if xml
|
43
43
|
@transportation_routes << tr["route"][0, 2]
|
@@ -9,8 +9,8 @@ module Comee
|
|
9
9
|
status: QuotationRequest.statuses[:draft],
|
10
10
|
order_number: params[:order_number],
|
11
11
|
order_date: params[:order_date],
|
12
|
-
|
13
|
-
|
12
|
+
delivery_address_id: params[:delivery_address_id],
|
13
|
+
invoice_address_id: params[:invoice_address_id]
|
14
14
|
)
|
15
15
|
items = params[:items]
|
16
16
|
items.each do |item|
|
@@ -3,7 +3,6 @@ class CreateComeeCoreSuppliers < ActiveRecord::Migration[7.0]
|
|
3
3
|
create_table :comee_core_suppliers do |t|
|
4
4
|
t.string :code, null: false
|
5
5
|
t.string :name, null: false
|
6
|
-
t.string :address, null: false
|
7
6
|
t.string :locale, null: false, default: "en"
|
8
7
|
t.string :payment_terms, null: false, default: "30 Days Net"
|
9
8
|
t.string :vat_number
|
@@ -8,7 +8,6 @@ class CreateComeeCoreClients < ActiveRecord::Migration[7.0]
|
|
8
8
|
t.string :code, null: false
|
9
9
|
t.string :name, null: false
|
10
10
|
t.string :match_code, null: false
|
11
|
-
t.string :address, null: false
|
12
11
|
t.string :locale, null: false, default: "en"
|
13
12
|
t.string :tax_code
|
14
13
|
t.string :vat_number
|
@@ -17,7 +16,6 @@ class CreateComeeCoreClients < ActiveRecord::Migration[7.0]
|
|
17
16
|
index: {name: "so_on_ccc_indx"},
|
18
17
|
foreign_key: {to_table: :comee_core_clients}
|
19
18
|
t.string :consignees, array: true, default: []
|
20
|
-
t.string :shipment_addresses, array: true, default: []
|
21
19
|
t.references :currency,
|
22
20
|
null: true,
|
23
21
|
index: {name: "currency_on_ccc_indx"},
|
@@ -28,6 +26,7 @@ class CreateComeeCoreClients < ActiveRecord::Migration[7.0]
|
|
28
26
|
foreign_key: {to_table: :comee_core_lookups}
|
29
27
|
|
30
28
|
t.boolean :subsidiary, default: false
|
29
|
+
t.boolean :print_details, null: false, default: false
|
31
30
|
t.timestamps
|
32
31
|
end
|
33
32
|
add_index :comee_core_clients, :code, unique: true
|
@@ -15,6 +15,8 @@ class CreateComeeCoreClientAddresses < ActiveRecord::Migration[7.1]
|
|
15
15
|
index: {name: "country_on_ccca_indx"},
|
16
16
|
foreign_key: {to_table: :comee_core_lookups}
|
17
17
|
t.string :postal_code
|
18
|
+
t.string :telephone
|
19
|
+
t.string :email
|
18
20
|
t.string :address_type, null: false
|
19
21
|
t.boolean :default, default: false
|
20
22
|
|
@@ -14,6 +14,8 @@ class CreateComeeCoreSupplierAddresses < ActiveRecord::Migration[7.1]
|
|
14
14
|
index: {name: "country_on_ccsa_indx"},
|
15
15
|
foreign_key: {to_table: :comee_core_lookups}
|
16
16
|
t.string :postal_code
|
17
|
+
t.string :telephone
|
18
|
+
t.string :email
|
17
19
|
t.string :address_type, null: false
|
18
20
|
t.boolean :default, default: false
|
19
21
|
|
@@ -2,7 +2,15 @@ class CreateComeeCoreAgents < ActiveRecord::Migration[7.1]
|
|
2
2
|
def change
|
3
3
|
create_table :comee_core_agents do |t|
|
4
4
|
t.string :name, null: false
|
5
|
-
t.string :
|
5
|
+
t.string :address_line1
|
6
|
+
t.string :street
|
7
|
+
t.string :city
|
8
|
+
t.string :state
|
9
|
+
t.references :country,
|
10
|
+
null: false,
|
11
|
+
index: {name: "country_on_cca_indx"},
|
12
|
+
foreign_key: {to_table: :comee_core_lookups}
|
13
|
+
t.string :postal_code
|
6
14
|
t.string :email, null: false
|
7
15
|
t.string :telephone, null: false
|
8
16
|
|
@@ -9,13 +9,25 @@ class CreateComeeCoreCustomerOrders < ActiveRecord::Migration[7.1]
|
|
9
9
|
foreign_key: {to_table: :comee_core_clients}
|
10
10
|
t.string :order_terms
|
11
11
|
t.string :consignee
|
12
|
-
t.string :shipment_address
|
13
12
|
t.string :final_destination
|
14
13
|
t.date :final_delivery_date
|
14
|
+
t.date :consolidator_date
|
15
15
|
t.date :handover_date
|
16
16
|
t.date :shipping_date
|
17
|
-
t.string :
|
18
|
-
t.string :
|
17
|
+
t.string :voyage_no
|
18
|
+
t.string :shipping_arrangement
|
19
|
+
t.references :shipment_address,
|
20
|
+
null: true,
|
21
|
+
index: {name: "sa_on_ccco_indx"},
|
22
|
+
foreign_key: {to_table: :comee_core_client_addresses}
|
23
|
+
t.references :delivery_address,
|
24
|
+
null: false,
|
25
|
+
index: {name: "da_on_ccco_indx"},
|
26
|
+
foreign_key: {to_table: :comee_core_client_addresses}
|
27
|
+
t.references :invoice_address,
|
28
|
+
null: false,
|
29
|
+
index: {name: "ia_on_ccco_indx"},
|
30
|
+
foreign_key: {to_table: :comee_core_client_addresses}
|
19
31
|
t.integer :status, null: false, default: 0
|
20
32
|
|
21
33
|
t.timestamps
|
@@ -16,13 +16,25 @@ class CreateComeeCoreSalesOrders < ActiveRecord::Migration[7.0]
|
|
16
16
|
index: {name: "client_on_ccso_indx"},
|
17
17
|
foreign_key: {to_table: :comee_core_clients}
|
18
18
|
t.string :order_terms
|
19
|
-
t.
|
20
|
-
|
21
|
-
|
19
|
+
t.references :shipment_address,
|
20
|
+
null: true,
|
21
|
+
index: {name: "sa_on_ccso_indx"},
|
22
|
+
foreign_key: {to_table: :comee_core_client_addresses}
|
23
|
+
t.references :delivery_address,
|
24
|
+
null: false,
|
25
|
+
index: {name: "da_on_ccso_indx"},
|
26
|
+
foreign_key: {to_table: :comee_core_client_addresses}
|
27
|
+
t.references :invoice_address,
|
28
|
+
null: false,
|
29
|
+
index: {name: "ia_on_ccso_indx"},
|
30
|
+
foreign_key: {to_table: :comee_core_client_addresses}
|
22
31
|
t.string :destination
|
23
32
|
t.date :shipping_date
|
33
|
+
t.date :consolidator_date
|
24
34
|
t.date :delivery_date
|
25
35
|
t.date :handover_date
|
36
|
+
t.string :voyage_no
|
37
|
+
t.string :shipping_arrangement
|
26
38
|
t.string :consignee
|
27
39
|
t.string :parent_client_name
|
28
40
|
t.string :payment_term
|
@@ -32,6 +44,7 @@ class CreateComeeCoreSalesOrders < ActiveRecord::Migration[7.0]
|
|
32
44
|
t.integer :purchase_status, null: false, default: 0
|
33
45
|
t.float :total_price, default: 0.0
|
34
46
|
t.float :amount_paid, default: 0.0
|
47
|
+
t.float :vat, default: 0
|
35
48
|
t.string :pallete_note
|
36
49
|
t.string :remark
|
37
50
|
t.string :created_by
|
@@ -33,6 +33,8 @@ class CreateComeeCoreSalesOrderItems < ActiveRecord::Migration[7.0]
|
|
33
33
|
t.float :quantity_canceled, null: false, default: 0
|
34
34
|
t.float :price, null: false
|
35
35
|
t.float :total_price, null: false
|
36
|
+
t.float :price_diff, default: 0
|
37
|
+
t.float :quantity_diff, default: 0
|
36
38
|
t.date :delivery_date, null: false
|
37
39
|
t.boolean :canceled, default: false
|
38
40
|
t.date :handover_date
|
@@ -27,6 +27,10 @@ class CreateComeeCoreMasterPrices < ActiveRecord::Migration[7.0]
|
|
27
27
|
null: false,
|
28
28
|
index: {name: "unit_on_ccmp_indx"},
|
29
29
|
foreign_key: {to_table: :comee_core_units}
|
30
|
+
t.references :currency,
|
31
|
+
null: true,
|
32
|
+
index: {name: "currency_on_ccmp_indx"},
|
33
|
+
foreign_key: {to_table: :comee_core_currencies}
|
30
34
|
t.references :previous_price,
|
31
35
|
null: true,
|
32
36
|
index: {name: "previous_price_on_ccsp_indx"},
|
@@ -4,8 +4,14 @@ class CreateComeeCoreQuotationRequests < ActiveRecord::Migration[7.1]
|
|
4
4
|
t.string :reference_no, null: false
|
5
5
|
t.string :order_number, null: false
|
6
6
|
t.date :order_date, null: false
|
7
|
-
t.
|
8
|
-
|
7
|
+
t.references :delivery_address,
|
8
|
+
null: false,
|
9
|
+
index: {name: "da_on_ccqo_indx"},
|
10
|
+
foreign_key: {to_table: :comee_core_client_addresses}
|
11
|
+
t.references :invoice_address,
|
12
|
+
null: false,
|
13
|
+
index: {name: "ia_on_ccqo_indx"},
|
14
|
+
foreign_key: {to_table: :comee_core_client_addresses}
|
9
15
|
t.references :client,
|
10
16
|
null: false,
|
11
17
|
index: {name: "client_on_ccrfq_indx"},
|
@@ -14,6 +14,7 @@ class CreateComeeCoreInvoices < ActiveRecord::Migration[7.0]
|
|
14
14
|
t.date :due_date
|
15
15
|
t.float :total_price
|
16
16
|
t.float :amount_paid, default: 0
|
17
|
+
t.float :vat, default: 0
|
17
18
|
t.string :payment_term
|
18
19
|
t.integer :notifications_sent
|
19
20
|
t.integer :status, null: false, default: 0
|
@@ -9,6 +9,10 @@ class CreateComeeCorePickupSchedules < ActiveRecord::Migration[7.1]
|
|
9
9
|
null: false,
|
10
10
|
index: {name: "ts_on_ccps_indx"},
|
11
11
|
foreign_key: {to_table: :comee_core_time_slots}
|
12
|
+
t.references :agent,
|
13
|
+
null: true,
|
14
|
+
index: {name: "agent_on_ccps_indx"},
|
15
|
+
foreign_key: {to_table: :comee_core_agents}
|
12
16
|
t.integer :status, null: false, default: 0
|
13
17
|
t.string :truck_no
|
14
18
|
t.string :driver_license_no
|
data/lib/comee/core/version.rb
CHANGED
@@ -5,13 +5,13 @@ FactoryBot.define do
|
|
5
5
|
client
|
6
6
|
order_terms { Faker::Lorem.sentence }
|
7
7
|
consignee { Faker::Name.name }
|
8
|
-
shipment_address { Faker::Address.full_address }
|
9
8
|
final_destination { Faker::Address.full_address }
|
10
9
|
final_delivery_date { Faker::Date.between(from: Date.current.advance(days: 20), to: Date.current.advance(months: 2)) }
|
11
10
|
handover_date { final_delivery_date.advance(days: -10) }
|
12
11
|
shipping_date { handover_date.advance(days: 10) }
|
13
|
-
|
14
|
-
|
12
|
+
association :shipment_address, factory: :client_address, address_type: Comee::Core::ClientAddress::SHIPPING_ADDRESS
|
13
|
+
association :delivery_address, factory: :client_address, address_type: Comee::Core::ClientAddress::DELIVERY_ADDRESS
|
14
|
+
association :invoice_address, factory: :client_address, address_type: Comee::Core::ClientAddress::INVOICING_ADDRESS
|
15
15
|
status { 0 }
|
16
16
|
consolidator_date { Date.current }
|
17
17
|
voyage_no { Faker::Alphanumeric.alpha(number: 10) }
|
@@ -3,8 +3,8 @@ FactoryBot.define do
|
|
3
3
|
reference_no { "RFQ-#{client.code}-#{DateTime.now.to_i}" }
|
4
4
|
order_number { Faker::Alphanumeric.alpha(number: 10) }
|
5
5
|
order_date { Date.current }
|
6
|
-
delivery_address
|
7
|
-
invoice_address
|
6
|
+
association :delivery_address, factory: :client_address, address_type: Comee::Core::ClientAddress::DELIVERY_ADDRESS
|
7
|
+
association :invoice_address, factory: :client_address, address_type: Comee::Core::ClientAddress::INVOICING_ADDRESS
|
8
8
|
client
|
9
9
|
status { 0 }
|
10
10
|
end
|
@@ -6,9 +6,9 @@ FactoryBot.define do
|
|
6
6
|
fulfillment_center
|
7
7
|
client
|
8
8
|
order_terms { Faker::Lorem.sentence }
|
9
|
-
shipment_address
|
10
|
-
delivery_address
|
11
|
-
invoice_address
|
9
|
+
association :shipment_address, factory: :client_address, address_type: Comee::Core::ClientAddress::SHIPPING_ADDRESS
|
10
|
+
association :delivery_address, factory: :client_address, address_type: Comee::Core::ClientAddress::DELIVERY_ADDRESS
|
11
|
+
association :invoice_address, factory: :client_address, address_type: Comee::Core::ClientAddress::INVOICING_ADDRESS
|
12
12
|
destination { Faker::Address.city }
|
13
13
|
handover_date { Date.current.advance(weeks: 1) }
|
14
14
|
shipping_date { Date.current.advance(days: 10) }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: comee_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.27
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Henock L.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-07-
|
11
|
+
date: 2024-07-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: active_model_serializers
|
@@ -465,6 +465,8 @@ files:
|
|
465
465
|
- db/migrate/20230728014322_create_comee_core_products.rb
|
466
466
|
- db/migrate/20230728122618_create_comee_core_suppliers.rb
|
467
467
|
- db/migrate/20230728123039_create_comee_core_clients.rb
|
468
|
+
- db/migrate/20230728123222_create_comee_core_client_addresses.rb
|
469
|
+
- db/migrate/20230728123324_create_comee_core_supplier_addresses.rb
|
468
470
|
- db/migrate/20230728123458_create_comee_core_agents.rb
|
469
471
|
- db/migrate/20230728123559_create_comee_core_contacts.rb
|
470
472
|
- db/migrate/20230728123823_create_comee_core_purchase_orders.rb
|
@@ -521,21 +523,7 @@ files:
|
|
521
523
|
- db/migrate/20240406142113_create_comee_core_goods_issued_notes.rb
|
522
524
|
- db/migrate/20240406162711_create_comee_core_goods_issued_items.rb
|
523
525
|
- db/migrate/20240407083617_create_comee_core_email_settings.rb
|
524
|
-
- db/migrate/20240503040722_create_comee_core_client_addresses.rb
|
525
|
-
- db/migrate/20240628205454_add_print_details_field_to_customer.rb
|
526
|
-
- db/migrate/20240629044824_create_comee_core_supplier_addresses.rb
|
527
|
-
- db/migrate/20240629065810_remove_address_field_from_supplier_and_client.rb
|
528
|
-
- db/migrate/20240629135249_add_additional_fields_to_order.rb
|
529
|
-
- db/migrate/20240629145738_add_telephone_and_email_to_address.rb
|
530
|
-
- db/migrate/20240629160357_add_more_address_fields_to_agent.rb
|
531
|
-
- db/migrate/20240629170409_add_vat_to_sales_orders.rb
|
532
|
-
- db/migrate/20240630063656_add_aliases_field_to_product_lookup.rb
|
533
|
-
- db/migrate/20240630083042_add_agent_to_pickup_schedule.rb
|
534
526
|
- db/migrate/20240630122016_create_comee_core_additional_services.rb
|
535
|
-
- db/migrate/20240702151519_add_vat_to_purchase_order.rb
|
536
|
-
- db/migrate/20240702181613_add_vat_to_invoice.rb
|
537
|
-
- db/migrate/20240703204755_add_currency_to_master_price.rb
|
538
|
-
- db/migrate/20240706160902_add_change_fields_to_sales_order_item.rb
|
539
527
|
- lib/comee/core.rb
|
540
528
|
- lib/comee/core/engine.rb
|
541
529
|
- lib/comee/core/version.rb
|
@@ -1,7 +0,0 @@
|
|
1
|
-
class RemoveAddressFieldFromSupplierAndClient < ActiveRecord::Migration[7.1]
|
2
|
-
def change
|
3
|
-
remove_column :comee_core_clients, :address, :string
|
4
|
-
remove_column :comee_core_suppliers, :address, :string
|
5
|
-
remove_column :comee_core_clients, :shipment_addresses, :string, array: true
|
6
|
-
end
|
7
|
-
end
|
@@ -1,10 +0,0 @@
|
|
1
|
-
class AddAdditionalFieldsToOrder < ActiveRecord::Migration[7.1]
|
2
|
-
def change
|
3
|
-
add_column :comee_core_customer_orders, :consolidator_date, :date
|
4
|
-
add_column :comee_core_sales_orders, :consolidator_date, :date
|
5
|
-
add_column :comee_core_customer_orders, :voyage_no, :string
|
6
|
-
add_column :comee_core_sales_orders, :voyage_no, :string
|
7
|
-
add_column :comee_core_customer_orders, :shipping_arrangement, :string
|
8
|
-
add_column :comee_core_sales_orders, :shipping_arrangement, :string
|
9
|
-
end
|
10
|
-
end
|
@@ -1,8 +0,0 @@
|
|
1
|
-
class AddTelephoneAndEmailToAddress < ActiveRecord::Migration[7.1]
|
2
|
-
def change
|
3
|
-
add_column :comee_core_client_addresses, :telephone, :string
|
4
|
-
add_column :comee_core_supplier_addresses, :telephone, :string
|
5
|
-
add_column :comee_core_client_addresses, :email, :string
|
6
|
-
add_column :comee_core_supplier_addresses, :email, :string
|
7
|
-
end
|
8
|
-
end
|
@@ -1,14 +0,0 @@
|
|
1
|
-
class AddMoreAddressFieldsToAgent < ActiveRecord::Migration[7.1]
|
2
|
-
def change
|
3
|
-
remove_column :comee_core_agents, :address, :string
|
4
|
-
add_column :comee_core_agents, :address_line1, :string
|
5
|
-
add_column :comee_core_agents, :street, :string
|
6
|
-
add_column :comee_core_agents, :city, :string
|
7
|
-
add_column :comee_core_agents, :state, :string
|
8
|
-
add_reference :comee_core_agents,
|
9
|
-
:country,
|
10
|
-
index: {name: "country_on_cca_indx"},
|
11
|
-
foreign_key: {to_table: :comee_core_lookups}
|
12
|
-
add_column :comee_core_agents, :postal_code, :string
|
13
|
-
end
|
14
|
-
end
|
@@ -1,6 +0,0 @@
|
|
1
|
-
class AddChangeFieldsToSalesOrderItem < ActiveRecord::Migration[7.1]
|
2
|
-
def change
|
3
|
-
add_column :comee_core_sales_order_items, :price_diff, :float, null: true, default: 0
|
4
|
-
add_column :comee_core_sales_order_items, :quantity_diff, :float, null: true, default: 0
|
5
|
-
end
|
6
|
-
end
|