smerp-quotation-engine 0.2.2 → 0.2.4

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: f71b4dd4f66d6b3a84d08becf612915e07c73d559b9b45b1739474e78670d48e
4
- data.tar.gz: 808298fcebe1eea7dc2cc7820b34ce7ee68db717a76f3b948c1430def58cfe20
3
+ metadata.gz: cd0d27d0794a189f21582ff384002f632b70f9248c5cb4e0abcbde4530c073b6
4
+ data.tar.gz: 36442f75d249b9e0ddffc4d9fe8f70beba311b20f64ddf1e20d5ff5332e7f0be
5
5
  SHA512:
6
- metadata.gz: 8d43e99812253d2be32facd3e28a76b299074258db6574a54ff83cad2b772491854d88f3dc57579409834140adc7ddbc84dc00d92e986d5dd5ba43a0eb8aaae7
7
- data.tar.gz: 2cc26d8e261f27eb6f09fd8ddd30367df751b4395f038c1653fe61bb6b72e506d4c18da81d25a5ac73cecf4ad2259cb5b38d63cbeff11189e874f9c4f53c1fab
6
+ metadata.gz: c10601bb79a149188d0cac9c29dd3eb7681b0be8bd5a7acfd9a861ca957375254f4f4fa54f2ff4124b70e1b189c7ad181f9e81876aadaf1ca924df65c9726fe9
7
+ data.tar.gz: 5b2d7ae24d489b595e074e09740daf0e9f92d97fd0961293f42c8dfd4a9607ae9341f91103db3dcf39dc25bcdba89e5cfc5c54488fe71c79a54cd495f68f2535
@@ -48,6 +48,9 @@
48
48
 
49
49
  <% iindx = 0 %>
50
50
  <% i.children.each do |c| %>
51
+
52
+ <% next if c.id == @quotation_item.id %>
53
+
51
54
  <%= render "quotation_item", quotation_item: c, level: 1, index: iindx, f: form %>
52
55
  <% iindx += 1 %>
53
56
  <%= render_item_tree_table(c, 1, iindx).join.html_safe %>
@@ -18,10 +18,17 @@
18
18
  <% end %>
19
19
 
20
20
  <table class="table">
21
- <% if not @parent.nil? %>
22
- <tr style="background-color: #8EFEC1">
23
- <th>Parent Item : </th>
24
- <td colspan="6"><%= @parent.name %></td>
21
+ <% if quotation_item.new_record? %>
22
+ <% if not @parent.nil? %>
23
+ <tr style="background-color: #8EFEC1">
24
+ <th>Parent Item : </th>
25
+ <td colspan="4"><%= @parent.name %></td>
26
+ </tr>
27
+ <% end %>
28
+ <% else %>
29
+ <tr>
30
+ <th>Parent : </th>
31
+ <td colspan="4"><%= form.select :parent_id, quotation_item.quotation.quotation_items.where(["id != ?", quotation_item.id]).order(:name).collect { |e| [e.name, e.id] }.unshift([" - ", nil]), {}, class: "form-control" %></td>
25
32
  </tr>
26
33
  <% end %>
27
34
 
@@ -19,6 +19,7 @@
19
19
  </td>
20
20
  <td class="text-center"><%= quotation_item.quantity %></td>
21
21
  <td class="text-first"><%= quotation_item.unit %></td>
22
+
22
23
  <td class="text-end">
23
24
  <%= currency(quotation_item.unit_price) %>
24
25
  <div class="collapse" id="dist<%= quotation_item.id %>">
@@ -40,13 +41,13 @@
40
41
  <% consolSrc = quotation_item.is_consolidation_source_item? %>
41
42
 
42
43
  <td class="text-end">
43
-
44
+
44
45
  <% if consolDest %>
45
46
  <%= currency(quotation_item.consolidated_line_total) %>
46
47
  <% elsif consolSrc %>
47
48
  <%= currency(quotation_item.balance_after_distribution[:balance_amount]) %> *
48
49
  <% else %>
49
- <%= currency(quotation_item.line_total) %>
50
+ <%= currency(quotation_item.consolidated_line_total) %>
50
51
  <% end %>
51
52
 
52
53
  <div class="collapse" id="dist<%= quotation_item.id %>">
@@ -1,7 +1,7 @@
1
1
  module Smerp
2
2
  module Quotation
3
3
  module Engine
4
- VERSION = "0.2.2"
4
+ VERSION = "0.2.4"
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.2.2
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ian