comee_core 0.1.46 → 0.1.48
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/item_statuses_controller.rb +13 -0
- data/app/controllers/comee/core/sales_order_items_controller.rb +1 -1
- data/app/models/comee/core/item_status.rb +9 -0
- data/app/models/comee/core/sales_order_item.rb +1 -1
- data/app/serializers/comee/core/item_status_serializer.rb +7 -0
- data/app/serializers/comee/core/sales_order_item_serializer.rb +2 -1
- data/app/services/comee/core/customer_order_service.rb +1 -0
- data/config/routes.rb +1 -0
- data/db/migrate/20230812212844_create_comee_core_sales_order_items.rb +4 -0
- data/db/migrate/20231207235542_create_comee_core_item_statuses.rb +17 -0
- data/lib/comee/core/version.rb +1 -1
- data/spec/factories/comee/core/item_statuses.rb +10 -0
- data/spec/factories/comee/core/sales_order_items.rb +4 -0
- metadata +7 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e4dbbe8c8a9b605e180c997b14476dc4bd72f45d461d0c8c3e7d3c7b023aa1ed
|
4
|
+
data.tar.gz: c0a69b00c5c198db04590dcf825d700750147f6179de44c3e3d0986ff0523f01
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 37bece99a80c1ebb5af969095e22f6db6ecc9f3a5cb60a41eb05d400420d5ff50466a1dabdd7672440867e356819ee0124ba0f53c75d5fffa999de858f70f743
|
7
|
+
data.tar.gz: 63a792ebf8e7a58dc0d83c84cb200e9a98c058ecea0aaae545469d917ee7ae53eb5b9ae4b5e6ec8036e84ef78acd897135f18607fc7836cec233321e9d51bcb3
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module Comee
|
2
|
+
module Core
|
3
|
+
class ItemStatusesController < ApplicationController
|
4
|
+
include Common
|
5
|
+
|
6
|
+
private
|
7
|
+
|
8
|
+
def model_params
|
9
|
+
params.require(:payload).permit(:hash_code, :status, :status_date, :remark, :sales_order_item_id, :details)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -24,7 +24,7 @@ module Comee
|
|
24
24
|
|
25
25
|
def model_params
|
26
26
|
params.require(:payload).permit(:sales_order_id, :customer_order_item_id, :product_id, :unit_id, :quantity, :quantity_delivered,
|
27
|
-
:price, :delivery_date, :eb_number)
|
27
|
+
:customer_item_no, :price, :delivery_date, :eb_number, :comment, :action_note, :po_reference)
|
28
28
|
end
|
29
29
|
end
|
30
30
|
end
|
@@ -7,7 +7,7 @@ module Comee
|
|
7
7
|
belongs_to :unit
|
8
8
|
has_many :warehouse_shipment_items
|
9
9
|
|
10
|
-
validates :delivery_date, presence: true
|
10
|
+
validates :customer_item_no, :delivery_date, presence: true
|
11
11
|
validates :quantity, :price, presence: true, numericality: {greater_than: 0}
|
12
12
|
validates :quantity_delivered, numericality: {greater_than_or_equal_to: 0}
|
13
13
|
end
|
@@ -1,7 +1,8 @@
|
|
1
1
|
module Comee
|
2
2
|
module Core
|
3
3
|
class SalesOrderItemSerializer < ActiveModel::Serializer
|
4
|
-
attributes :id, :quantity, :quantity_delivered, :price, :delivery_date, :eb_number
|
4
|
+
attributes :id, :customer_item_no, :quantity, :quantity_delivered, :price, :delivery_date, :eb_number, :comment,
|
5
|
+
:action_note, :po_reference
|
5
6
|
belongs_to :sales_order
|
6
7
|
belongs_to :customer_order_item
|
7
8
|
belongs_to :unit
|
data/config/routes.rb
CHANGED
@@ -17,6 +17,7 @@ class CreateComeeCoreSalesOrderItems < ActiveRecord::Migration[7.0]
|
|
17
17
|
null: false,
|
18
18
|
index: {name: "coi_on_ccsoi_indx"},
|
19
19
|
foreign_key: {to_table: :comee_core_customer_order_items}
|
20
|
+
t.string :customer_item_no, null: false
|
20
21
|
t.float :quantity, null: false
|
21
22
|
t.float :quantity_delivered, null: false, default: 0
|
22
23
|
t.float :price, null: false
|
@@ -24,6 +25,9 @@ class CreateComeeCoreSalesOrderItems < ActiveRecord::Migration[7.0]
|
|
24
25
|
t.boolean :canceled, default: false
|
25
26
|
t.date :handover_date
|
26
27
|
t.string :eb_number
|
28
|
+
t.string :comment
|
29
|
+
t.string :action_note
|
30
|
+
t.string :po_reference
|
27
31
|
|
28
32
|
t.timestamps
|
29
33
|
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
class CreateComeeCoreItemStatuses < ActiveRecord::Migration[7.1]
|
2
|
+
def change
|
3
|
+
create_table :comee_core_item_statuses do |t|
|
4
|
+
t.bigint :hash_code, null: false
|
5
|
+
t.references :sales_order_item,
|
6
|
+
null: false,
|
7
|
+
index: {name: "so_on_ccis_indx"},
|
8
|
+
foreign_key: {to_table: :comee_core_sales_order_items}
|
9
|
+
t.string :status, null: false
|
10
|
+
t.date :status_date, null: false
|
11
|
+
t.jsonb :details
|
12
|
+
t.string :remark
|
13
|
+
|
14
|
+
t.timestamps
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
data/lib/comee/core/version.rb
CHANGED
@@ -4,11 +4,15 @@ FactoryBot.define do
|
|
4
4
|
association :customer_order_item, :with_inventory
|
5
5
|
product
|
6
6
|
unit
|
7
|
+
customer_item_no { Faker::Alphanumeric.alpha(number: 10) }
|
7
8
|
quantity { 100 }
|
8
9
|
quantity_delivered { 0 }
|
9
10
|
price { 50 }
|
10
11
|
delivery_date { Date.current.advance(months: 1) }
|
11
12
|
handover_date { Date.current }
|
12
13
|
eb_number { Faker::Lorem.word }
|
14
|
+
comment { Faker::Lorem.sentence }
|
15
|
+
action_note { Faker::Lorem.sentence }
|
16
|
+
po_reference { Faker::Alphanumeric.alpha(number: 10) }
|
13
17
|
end
|
14
18
|
end
|
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.1.
|
4
|
+
version: 0.1.48
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Henock L.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-12-
|
11
|
+
date: 2023-12-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: active_model_serializers
|
@@ -288,6 +288,7 @@ files:
|
|
288
288
|
- app/controllers/comee/core/customer_orders_controller.rb
|
289
289
|
- app/controllers/comee/core/customs_details_controller.rb
|
290
290
|
- app/controllers/comee/core/external_rfqs_controller.rb
|
291
|
+
- app/controllers/comee/core/item_statuses_controller.rb
|
291
292
|
- app/controllers/comee/core/lookups_controller.rb
|
292
293
|
- app/controllers/comee/core/notifications_controller.rb
|
293
294
|
- app/controllers/comee/core/products_controller.rb
|
@@ -322,6 +323,7 @@ files:
|
|
322
323
|
- app/models/comee/core/inventory.rb
|
323
324
|
- app/models/comee/core/invoice.rb
|
324
325
|
- app/models/comee/core/invoice_item.rb
|
326
|
+
- app/models/comee/core/item_status.rb
|
325
327
|
- app/models/comee/core/lookup.rb
|
326
328
|
- app/models/comee/core/master_price.rb
|
327
329
|
- app/models/comee/core/notification.rb
|
@@ -349,6 +351,7 @@ files:
|
|
349
351
|
- app/serializers/comee/core/customer_order_serializer.rb
|
350
352
|
- app/serializers/comee/core/customs_detail_serializer.rb
|
351
353
|
- app/serializers/comee/core/external_rfq_serializer.rb
|
354
|
+
- app/serializers/comee/core/item_status_serializer.rb
|
352
355
|
- app/serializers/comee/core/lookup_serializer.rb
|
353
356
|
- app/serializers/comee/core/product_serializer.rb
|
354
357
|
- app/serializers/comee/core/product_type_serializer.rb
|
@@ -408,6 +411,7 @@ files:
|
|
408
411
|
- db/migrate/20231125122723_create_comee_core_purchase_orders.rb
|
409
412
|
- db/migrate/20231126082907_create_comee_core_purchase_order_items.rb
|
410
413
|
- db/migrate/20231206082503_create_comee_core_unit_conversions.rb
|
414
|
+
- db/migrate/20231207235542_create_comee_core_item_statuses.rb
|
411
415
|
- lib/comee/core.rb
|
412
416
|
- lib/comee/core/engine.rb
|
413
417
|
- lib/comee/core/version.rb
|
@@ -428,6 +432,7 @@ files:
|
|
428
432
|
- spec/factories/comee/core/inventories.rb
|
429
433
|
- spec/factories/comee/core/invoice_items.rb
|
430
434
|
- spec/factories/comee/core/invoices.rb
|
435
|
+
- spec/factories/comee/core/item_statuses.rb
|
431
436
|
- spec/factories/comee/core/lookups.rb
|
432
437
|
- spec/factories/comee/core/master_prices.rb
|
433
438
|
- spec/factories/comee/core/notifications.rb
|