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: 4d1d75495161f2d48d8918606ba43857b3cd834ac29adc9a1c8143401ad0ee7b
4
- data.tar.gz: 35c713a4584b3ddb7103ea9fb3935eae3aff3cad46820eb93ffeb8e331140b5b
3
+ metadata.gz: 2b249ddf2a74cdb65f1a5567e2a37ec440728906f7d13a09c1bcb2ba4b883875
4
+ data.tar.gz: d8a2a8f09283ea682f03166894045c080f5f00ef6431135a7d9a517af1ffa3a8
5
5
  SHA512:
6
- metadata.gz: 40cead80d6fcd7069686c936f90b7f40a6a84b4dcd9f22a5859f22badf9cb1f7c8fd18bfa42da85e78a1acd2aee0ce750a23af04bf2196a98ea550e835639334
7
- data.tar.gz: 5962dbb35b0726b0025368989b4e13ff9bb8e2a976070929b29c2b92e4f01c89ee13f8dac416a1af023031eec3336b2042164e47cad3e852522518f04c0fbdf5
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: 1}
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)
@@ -6,6 +6,7 @@ module Comee
6
6
  belongs_to :product
7
7
  belongs_to :supplier
8
8
  belongs_to :product_lookup
9
+ belongs_to :unit
9
10
  end
10
11
  end
11
12
  end
@@ -1,5 +1,5 @@
1
1
  module Comee
2
2
  module Core
3
- VERSION = "0.2.32".freeze
3
+ VERSION = "0.2.34".freeze
4
4
  end
5
5
  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.32
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-16 00:00:00.000000000 Z
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