smerp-quotation-engine 0.1.1 → 0.1.3

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: eda16b3d471ce47b293b1b100ff14cbbaf03ef1b3d620faa755bd2467108cee3
4
- data.tar.gz: c07217641092521c1c8e6c00bab750c76c251f681d31d27b8965a7b530ea9851
3
+ metadata.gz: e8fa2350126d124dac1b1064cb594942c30dd0961dcc31dc1a71d80c5f4c52c9
4
+ data.tar.gz: 256d95f8da605f9578e310a6b6684be01cdaf8d498bd4700ebd163e1e07bcaca
5
5
  SHA512:
6
- metadata.gz: b1801ccdd498a4a47fbbbe1948752469ad2930da531175d025e77eb09d942aaf177fde5a147bd5dc6560f6c1f953a531ea32ed2c72b157ee32430ebf0bdfc327
7
- data.tar.gz: 91769ca06ccb0c8a3e81d713eea5db0e4f24611041408108850fd11050b5fb1626207867e8321405ca86bbc0c23b097b036eea5c85b3f8152e6f3b671334ca2a
6
+ metadata.gz: 43b307465fef8eb48cf3478b75ac9060108cc18dc1196f455d693f981a18ed60590a7024c882fe783cb4c58746346a6b8e76fa89adeb9248836cc90182634e2b
7
+ data.tar.gz: 3c3e8412f6d18608bc97476143cbb61e1a15ff960f6581e00bea29efe617434c33fba9255cf521363e0d39ecdd6520ef89173bf629d3642cbd718362f4c1fce3
@@ -19,7 +19,6 @@ module Smerp::Quotation::Engine
19
19
  cont = []
20
20
  level += 1
21
21
  indx = 0
22
- puts "Inside : #{itm.id.to_s} / #{session[:hide_children_parent_id].include?(itm.id)} / #{session[:hide_children_parent_id]}"
23
22
  if session[:hide_children_parent_id].nil? or not session[:hide_children_parent_id].include?(itm.id)
24
23
  itm.children.each do |c|
25
24
  cont << render("quotation_item", quotation_item: c, level: level, index: indx)
@@ -12,12 +12,9 @@ module Smerp::Quotation::Engine
12
12
 
13
13
  validates_presence_of :name
14
14
 
15
- # can only have one before_save hook
16
- # Have to override the parent method and call the parent
17
- # method instead
18
- # This method shall be activated by parent's
19
- # before_save hook
20
- def update_total
15
+ before_validation :map_product_item
16
+
17
+ def map_product_item
21
18
 
22
19
  if not self.quotation_product_id.nil?
23
20
  prod = QuotationProduct.find(self.quotation_product_id)
@@ -26,8 +23,6 @@ module Smerp::Quotation::Engine
26
23
  self.unit = prod.unit if is_empty?(self.unit)
27
24
  end
28
25
 
29
- # call parent update_total
30
- super
31
26
  end
32
27
 
33
28
  end
@@ -1,7 +1,7 @@
1
1
  module Smerp
2
2
  module Quotation
3
3
  module Engine
4
- VERSION = "0.1.1"
4
+ VERSION = "0.1.3"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smerp-quotation-engine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ian