comee_core 0.2.32 → 0.2.34
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2b249ddf2a74cdb65f1a5567e2a37ec440728906f7d13a09c1bcb2ba4b883875
|
4
|
+
data.tar.gz: d8a2a8f09283ea682f03166894045c080f5f00ef6431135a7d9a517af1ffa3a8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 99cadabdab0149cca9b835c97b92d0e73932ebe77effe9ad8d190217c03dd5761dad6789cb4aa120845fecf46f7726e51a4f507f3fb42f8b9b50ab6fecd54eed
|
7
|
+
data.tar.gz: 30f275e6123103a971aef2abe8293b6ef0a7375dd32a3b76878da053eee4dcce2bd4bcd66c6db1e6eaf2e13d32d16d5585af1ea855d5741b02c2b7a483efed2a
|
@@ -5,11 +5,15 @@ module Comee
|
|
5
5
|
|
6
6
|
has_many :purchase_requisition_items
|
7
7
|
|
8
|
-
enum :status, {draft: 0, approved:
|
8
|
+
enum :status, {draft: 0, submitted: 1, approved: 2, rejected: 3}
|
9
9
|
|
10
10
|
validates :requisition_no, presence: true, uniqueness: true
|
11
11
|
validates :requisition_date, :status, presence: true
|
12
12
|
|
13
|
+
def self.ransackable_attributes(_auth_object = nil)
|
14
|
+
%w[created_at id remark requisition_date requisition_no status total_price updated_at]
|
15
|
+
end
|
16
|
+
|
13
17
|
def calculate_total_price
|
14
18
|
items = PurchaseRequisitionItem.where(purchase_requisition_id: id)
|
15
19
|
self.total_price = items.sum(&:total_price)
|
data/lib/comee/core/version.rb
CHANGED
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.34
|
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-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: active_model_serializers
|