comee_core 0.1.74 → 0.1.75
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/models/comee/core/shipment_instruction.rb +12 -0
- data/app/models/comee/core/shipment_instruction_item.rb +12 -0
- data/db/migrate/20240104131607_create_comee_core_shipment_instructions.rb +16 -0
- data/db/migrate/20240104143246_create_comee_core_shipment_instruction_items.rb +29 -0
- data/lib/comee/core/version.rb +1 -1
- data/spec/factories/comee/core/shipment_instruction_items.rb +16 -0
- data/spec/factories/comee/core/shipment_instructions.rb +8 -0
- metadata +8 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: afbd28df711f1ae6c81c11d39d01a96cf95f3f5c4dc0b726c87eef7da700aef2
|
4
|
+
data.tar.gz: 54b1d3b914efc1901a85e4b2cdcfa5fb348063d63d4996e3736c4b79c71a534a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4b32b66a11190cd9e676c6a681dec80b8444558cc87f6cac40ad58d58dea12e6d772ec5a4e96f0be6fb79b63fa2a872e72329df256a1fd964d81de87c0253dd7
|
7
|
+
data.tar.gz: ec73fa46afb4fecbd7ceb6dcad18bad501886790e19c9328ff2409f4b749b9e06333fcdd964fb4a50d89473dc24bd771eff91206ab434d65e1adc97904849754
|
@@ -0,0 +1,12 @@
|
|
1
|
+
module Comee
|
2
|
+
module Core
|
3
|
+
class ShipmentInstruction < ApplicationRecord
|
4
|
+
enum :status, {draft: 0, confirmed: 1}
|
5
|
+
|
6
|
+
belongs_to :client
|
7
|
+
|
8
|
+
validates :reference_no, presence: true, uniqueness: true
|
9
|
+
validates :status, presence: true
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
module Comee
|
2
|
+
module Core
|
3
|
+
class ShipmentInstructionItem < ApplicationRecord
|
4
|
+
belongs_to :shipment_instruction
|
5
|
+
belongs_to :shipment_item
|
6
|
+
belongs_to :unit
|
7
|
+
|
8
|
+
validates :delivery_note_no, :pallet_no, :goods_issue_date, presence: true
|
9
|
+
validates :length, :width, :height, :weight, :quantity, :price, presence: true, numericality: {greater_than: 0}
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
class CreateComeeCoreShipmentInstructions < ActiveRecord::Migration[7.1]
|
2
|
+
def change
|
3
|
+
create_table :comee_core_shipment_instructions do |t|
|
4
|
+
t.string :reference_no, null: false
|
5
|
+
t.references :client,
|
6
|
+
null: false,
|
7
|
+
index: {name: "client_on_ccsi_indx"},
|
8
|
+
foreign_key: {to_table: :comee_core_clients}
|
9
|
+
t.integer :status, null: false, default: 0
|
10
|
+
t.string :remark
|
11
|
+
|
12
|
+
t.timestamps
|
13
|
+
end
|
14
|
+
add_index :comee_core_shipment_instructions, :reference_no, unique: true
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
class CreateComeeCoreShipmentInstructionItems < ActiveRecord::Migration[7.1]
|
2
|
+
def change
|
3
|
+
create_table :comee_core_shipment_instruction_items do |t|
|
4
|
+
t.references :shipment_instruction,
|
5
|
+
null: false,
|
6
|
+
index: {name: "si_on_ccsii_indx"},
|
7
|
+
foreign_key: {to_table: :comee_core_shipment_instructions}
|
8
|
+
t.references :shipment_item,
|
9
|
+
null: false,
|
10
|
+
index: {name: "shi_on_ccsii_indx"},
|
11
|
+
foreign_key: {to_table: :comee_core_shipment_items}
|
12
|
+
t.string :delivery_note_no, null: false
|
13
|
+
t.string :pallet_no, null: false
|
14
|
+
t.date :goods_issue_date, null: false
|
15
|
+
t.float :length, null: false
|
16
|
+
t.float :width, null: false
|
17
|
+
t.float :height, null: false
|
18
|
+
t.float :weight, null: false
|
19
|
+
t.float :quantity, null: false
|
20
|
+
t.references :unit,
|
21
|
+
null: false,
|
22
|
+
index: {name: "unit_on_ccsii_indx"},
|
23
|
+
foreign_key: {to_table: :comee_core_units}
|
24
|
+
t.float :price, null: false
|
25
|
+
|
26
|
+
t.timestamps
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
data/lib/comee/core/version.rb
CHANGED
@@ -0,0 +1,16 @@
|
|
1
|
+
FactoryBot.define do
|
2
|
+
factory :shipment_instruction_item, class: "Comee::Core::ShipmentInstructionItem" do
|
3
|
+
shipment_instruction
|
4
|
+
shipment_item
|
5
|
+
delivery_note_no { Faker::Alphanumeric.alpha(number: 10) }
|
6
|
+
pallet_no { Faker::Alphanumeric.alpha(number: 10) }
|
7
|
+
goods_issue_date { Date.current.advance(days: 3) }
|
8
|
+
length { 5.0 }
|
9
|
+
width { 3.0 }
|
10
|
+
height { 1.5 }
|
11
|
+
weight { 10.0 }
|
12
|
+
quantity { 5.0 }
|
13
|
+
unit
|
14
|
+
price { 100 }
|
15
|
+
end
|
16
|
+
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.75
|
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-01-
|
11
|
+
date: 2024-01-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: active_model_serializers
|
@@ -339,6 +339,8 @@ files:
|
|
339
339
|
- app/models/comee/core/quotation_request_item.rb
|
340
340
|
- app/models/comee/core/sales_order.rb
|
341
341
|
- app/models/comee/core/sales_order_item.rb
|
342
|
+
- app/models/comee/core/shipment_instruction.rb
|
343
|
+
- app/models/comee/core/shipment_instruction_item.rb
|
342
344
|
- app/models/comee/core/shipment_item.rb
|
343
345
|
- app/models/comee/core/supplier.rb
|
344
346
|
- app/models/comee/core/unit.rb
|
@@ -421,6 +423,8 @@ files:
|
|
421
423
|
- db/migrate/20231206082503_create_comee_core_unit_conversions.rb
|
422
424
|
- db/migrate/20231207153420_create_comee_core_shipment_items.rb
|
423
425
|
- db/migrate/20231207235542_create_comee_core_item_statuses.rb
|
426
|
+
- db/migrate/20240104131607_create_comee_core_shipment_instructions.rb
|
427
|
+
- db/migrate/20240104143246_create_comee_core_shipment_instruction_items.rb
|
424
428
|
- lib/comee/core.rb
|
425
429
|
- lib/comee/core/engine.rb
|
426
430
|
- lib/comee/core/version.rb
|
@@ -454,6 +458,8 @@ files:
|
|
454
458
|
- spec/factories/comee/core/quotation_requests.rb
|
455
459
|
- spec/factories/comee/core/sales_order_items.rb
|
456
460
|
- spec/factories/comee/core/sales_orders.rb
|
461
|
+
- spec/factories/comee/core/shipment_instruction_items.rb
|
462
|
+
- spec/factories/comee/core/shipment_instructions.rb
|
457
463
|
- spec/factories/comee/core/shipment_items.rb
|
458
464
|
- spec/factories/comee/core/suppliers.rb
|
459
465
|
- spec/factories/comee/core/unit_conversions.rb
|