comee_core 0.2.40 → 0.2.41
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_requisition_item.rb +1 -1
- 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_requisition_items.rb +1 -0
- data/spec/factories/comee/core/purchase_requisitions.rb +1 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '09414cc0b1fa45cb52e089e2854a51bf135502177ada40425077d7e4b7587a8a'
|
4
|
+
data.tar.gz: e65ffb3986a085e460196af5d068319bdf66fc857c0295d24c45d00b8bab51b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a07511623828729350a1dd4a4707101b1402ced5f2e9b06978c722249d38a202a905dd8ba4b737ac46dc86782fb4a34c83d37e6ec636a80d0d8f3f37367c8172
|
7
|
+
data.tar.gz: c7887f7a54b2be7808d6aefd54e187edf4f47ded2ef873c60ae3d59e7f3afc087bb51752e883c9a083965fff41217a63bc5325c1cc6605dc34978f2fc7f9b08a
|
@@ -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
|
@@ -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
|