cats_core 1.4.34 → 1.4.35
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/services/cats/core/round_plan_service.rb +8 -1
- data/lib/cats/core/version.rb +1 -1
- 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: 186d5da451b5abf3212599586408ca925e553e855f185b2ac52038a7cfa7b651
|
4
|
+
data.tar.gz: 7fa1c103c95c8f80d98f75be767bf346b4cb5bfab1cf066776e3ae8880a95621
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd85c7c41b4a8c7ab65f388969b4e9e6e5a6191c1eaf19c01bcf6cdbef36018d76136ab73c1bcf57b4fe47f81e5ab6062df1da4ca98970aaec7ddef593818bd7
|
7
|
+
data.tar.gz: 885be8ea62166c70ae4bf3e4f900ed12a18ddecd0b9ba712643e3fe1e781b4099f7e2b8010ca5fdc14ef57089956fe2c43e2de0f36eabe343d69689b13c4b233
|
@@ -7,7 +7,7 @@ module Cats
|
|
7
7
|
|
8
8
|
raise(StandardError, 'Plan has no plan items.') if round_plan.round_plan_items.count.zero?
|
9
9
|
|
10
|
-
round_plan.
|
10
|
+
clear_needs(round_plan.id)
|
11
11
|
|
12
12
|
details = []
|
13
13
|
rations = round_plan.round_rations
|
@@ -32,6 +32,13 @@ module Cats
|
|
32
32
|
round_plan
|
33
33
|
end
|
34
34
|
|
35
|
+
def clear_needs(plan_id)
|
36
|
+
Cats::Core::RoundPlanItemDetail
|
37
|
+
.joins(beneficiary_round_plan_item: :round_plan_item)
|
38
|
+
.where(cats_core_beneficiary_round_plan_items: { cats_core_round_plan_items: { round_plan_id: plan_id } })
|
39
|
+
.delete_all
|
40
|
+
end
|
41
|
+
|
35
42
|
def generate_round_plan(reference_no, rounds, plan_id, region_id)
|
36
43
|
round_plan = Cats::Core::RoundPlan.create!(
|
37
44
|
plan_id: plan_id,
|
data/lib/cats/core/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cats_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.35
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Henock L.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-06-
|
11
|
+
date: 2022-06-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: active_model_serializers
|