comee_core 0.2.40 → 0.2.42
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/comee/core/purchase_order_item.rb +1 -0
- data/app/models/comee/core/purchase_requisition_item.rb +1 -1
- data/db/migrate/20230728123827_create_comee_core_purchase_order_items.rb +4 -0
- data/db/migrate/20240314111117_create_comee_core_purchase_requisitions.rb +1 -0
- data/db/migrate/20240314111307_create_comee_core_purchase_requisition_items.rb +1 -0
- data/lib/comee/core/version.rb +1 -1
- data/spec/factories/comee/core/purchase_order_items.rb +1 -0
- data/spec/factories/comee/core/purchase_requisition_items.rb +1 -0
- data/spec/factories/comee/core/purchase_requisitions.rb +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5951c1379bb4b8d73cac18c899638b0467cc0e2f5c3d53cd919262bf4855a1d2
|
4
|
+
data.tar.gz: 108d49442722624bc32ae0f7690a21e4ec089c9daf3433a9a2a749f0ae47bdb5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4d739a2063e916853695c66f2eb7b7a1a73d1b0386c0cdea529cc895a02789baee67ada44412a14c25fb850bd457ce8c4545b2e033cc40f2f0b0f4ea0a7951b7
|
7
|
+
data.tar.gz: 7c671d0abb884fec73dbfe3b4d5ff0fea4019483bdec2b2346e458709cea53f0b329b61589c4729fbe29063f0914d7c98cf2c8fcb8ae84d7222df956fcf28be1
|
@@ -12,7 +12,7 @@ module Comee
|
|
12
12
|
belongs_to :purchase_requisition
|
13
13
|
belongs_to :purchase_order_item, optional: true
|
14
14
|
|
15
|
-
validates :processing_status, presence: true
|
15
|
+
validates :processing_status, :delivery_date, presence: true
|
16
16
|
validates :quantity, :price, presence: true, numericality: {greater_than_or_equal_to: 0}
|
17
17
|
|
18
18
|
def calculate_total_price
|
@@ -8,6 +8,10 @@ class CreateComeeCorePurchaseOrderItems < ActiveRecord::Migration[7.1]
|
|
8
8
|
|
9
9
|
t.float :quantity, null: false
|
10
10
|
t.float :confirmed_quantity, null: false
|
11
|
+
t.references :product,
|
12
|
+
null: false,
|
13
|
+
index: {name: "product_on_ccpoitm_indx"},
|
14
|
+
foreign_key: {to_table: :comee_core_products}
|
11
15
|
t.references :unit,
|
12
16
|
null: false,
|
13
17
|
index: {name: "unit_on_ccpoitm_indx"},
|
@@ -3,6 +3,7 @@ class CreateComeeCorePurchaseRequisitions < ActiveRecord::Migration[7.1]
|
|
3
3
|
create_table :comee_core_purchase_requisitions do |t|
|
4
4
|
t.string :requisition_no, null: false
|
5
5
|
t.date :requisition_date, null: false
|
6
|
+
t.date :delivery_date
|
6
7
|
t.string :remark
|
7
8
|
t.integer :status, null: false, default: 0
|
8
9
|
t.float :total_price, null: false, default: 0
|
@@ -24,6 +24,7 @@ class CreateComeeCorePurchaseRequisitionItems < ActiveRecord::Migration[7.1]
|
|
24
24
|
t.float :quantity, null: false
|
25
25
|
t.float :price, null: false
|
26
26
|
t.float :total_price, null: false
|
27
|
+
t.date :delivery_date, null: false
|
27
28
|
t.integer :processing_status, null: false, default: 0
|
28
29
|
|
29
30
|
t.timestamps
|
data/lib/comee/core/version.rb
CHANGED
@@ -2,6 +2,7 @@ FactoryBot.define do
|
|
2
2
|
factory :purchase_requisition, class: "Comee::Core::PurchaseRequisition" do
|
3
3
|
requisition_no { Faker::Alphanumeric.alpha(number: 10) }
|
4
4
|
requisition_date { Date.current }
|
5
|
+
delivery_date { Date.current.advance(days: 10) }
|
5
6
|
remark { Faker::Lorem.sentence }
|
6
7
|
status { Comee::Core::PurchaseRequisition.statuses[:draft] }
|
7
8
|
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.2.
|
4
|
+
version: 0.2.42
|
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-03-
|
11
|
+
date: 2024-03-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: active_model_serializers
|