educode_sales 0.8.7 → 0.8.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fa6e3ad4c5385f2be6eaea6affcdcde6284c8bc04986877ca5880c2a26eff5c0
4
- data.tar.gz: 19ec51101d14bd95976a5c2211f66209fc6ef27f2894f84d9c21c5d1a4fbb5b2
3
+ metadata.gz: d40c49eb6d5bbbaea4b48a8ad0c8c5994bba11888e04ad256406e1fadd833ad2
4
+ data.tar.gz: f1733a819aadbe481b7a2f8d3233821bf24099612d1828109cd8c004e642be24
5
5
  SHA512:
6
- metadata.gz: 4091a85e044edea498641d586ea567b878af526f524e1ac32c947d02274379ebb3301ea7b9cd4fd02950b39ca7897a5d392079098ec74e96e59553d37e61bddb
7
- data.tar.gz: 59d6fa56fafcab5ab09d228f65b443ec70658e72d9bfaba56b7df38492ac46e80404dc95198e874d4a89c3d65dbbb86d96e573abb7c91da450ee08843647d9cf
6
+ metadata.gz: 63bd36188bf06b9a4ef62edbffe8253d8fcd80ae432a748ea061f12e014b8caf0705b7c6449ebe0a82a347dc47ef79552e455fb8f0d644acaac6867087fe99dd
7
+ data.tar.gz: 851b51d8cdddd226d9854606a88e9441eb59e378a9e32e9a75faf41d3ccac32addeb9e4a65dfe6ec0d9106ee35067bf5a692ad080b71ae112adaf1841d974fc6
@@ -16,6 +16,12 @@ json.data do
16
16
  json.signed_date d.last_follow_up&.signed_date.to_s
17
17
  json.total_amount d.last_follow_up&.total_amount
18
18
  json.service_end_time d.last_follow_up&.service_start_time.to_s + "-" + d.last_follow_up&.service_end_time.to_s
19
+ EducodeSales::FollowUp::BUSINESS_DEPLOYMENT[1..-1].each do |m|
20
+ if d.last_follow_up&.o_business_deployment == m[1]
21
+ json.o_business_deployment m[0]
22
+ break
23
+ end
24
+ end
19
25
  json.actual_amount d.last_follow_up&.actual_amount
20
26
  json.return_money d.return_money
21
27
  json.wait_return_money d.wait_return_money.to_i.round(2)
@@ -27,5 +33,6 @@ json.data do
27
33
  json.current_staff_id @current_admin.id
28
34
  json.staff_id d.staff_id
29
35
  json.latest_time d.last_follow_up.present? ? d.last_follow_up.created_at.to_s : ''
36
+ json.year d.last_follow_up&.year.to_s
30
37
  end
31
38
  end
@@ -25,8 +25,8 @@ json.data do
25
25
  end
26
26
  end
27
27
  json.year d.last_follow_up&.year.to_s
28
- json.total_amount d.last_follow_up&.total_amount
29
- json.actual_amount d.last_follow_up&.actual_amount
28
+ json.total_amount d.last_follow_up&.total_amount.to_f.round(2)
29
+ json.actual_amount d.last_follow_up&.actual_amount.to_f.round(2)
30
30
  json.return_money d.return_money
31
31
  json.wait_return_money d.wait_return_money.to_f.round(2)
32
32
  json.return_money_days d.last_follow_up&.reception_at.present? && d.last_follow_up.money_plans.where(clazz: '实际回款').present? ? (d.last_follow_up.money_plans.where(clazz: '实际回款').order(created_at: :asc).first.date_at.to_s(:date).to_date - d.last_follow_up&.reception_at).to_i : ''
@@ -87,7 +87,7 @@
87
87
  <label class="layui-form-label">总额(万)</label>
88
88
  <div class="layui-input-inline">
89
89
  <input name="total_amount" type="number" class="layui-input" autocomplete="off"
90
- value="<%= @last_follow_up&.total_amount %>">
90
+ value="<%= @last_follow_up&.total_amount.to_f.round(2) %>">
91
91
  </div>
92
92
  客户采购支出的费用。总额的生命历程:1.在最初阶段,是商机的预算总额;2.在挂网阶段,是项目的挂网预算总额;3.在中标阶段,是项目的中标总额。
93
93
  </div>
@@ -96,7 +96,7 @@
96
96
  <label class="layui-form-label">合同额(万)</label>
97
97
  <div class="layui-input-inline">
98
98
  <input name="actual_amount" type="number" class="layui-input" autocomplete="off" placeholder="本单位的签单金额"
99
- value="<%= @last_follow_up&.actual_amount %>">
99
+ value="<%= @last_follow_up&.actual_amount.to_f.round(2) %>">
100
100
  </div>
101
101
  客户签给头歌的费用。合同额的生命历程:1.在中标之前,合同额都是0;2.在中标之后,实际与头歌签合同的金额。
102
102
  </div>
@@ -111,7 +111,7 @@
111
111
  <div class="layui-inline">
112
112
  <label class="layui-form-label">渠道分成(万)</label>
113
113
  <div class="layui-input-inline">
114
- <input name="divide_amount" class="layui-input" value="<%= @last_follow_up&.divide_amount%>">
114
+ <input name="divide_amount" class="layui-input" value="<%= @last_follow_up&.divide_amount.to_f.round(2) %>">
115
115
  </div>
116
116
  总额里,渠道拿到的部分。
117
117
  </div>
@@ -17,9 +17,9 @@ json.data do
17
17
  end
18
18
  end
19
19
  end
20
- json.total_amount d.total_amount
21
- json.actual_amount d.actual_amount
22
- json.divide_amount d.divide_amount ? d.divide_amount : ""
20
+ json.total_amount d.total_amount.to_f.round(2)
21
+ json.actual_amount d.actual_amount.to_f.round(2)
22
+ json.divide_amount (d.divide_amount ? d.divide_amount : "").to_f.round(2)
23
23
  json.staff d.staff.user.real_name
24
24
  json.place d.place&.name
25
25
  json.money_plans_count d.money_plans_count
@@ -75,13 +75,13 @@
75
75
  <div class="layui-inline">
76
76
  <label class="layui-form-label">总额:</label>
77
77
  <div class="layui-input-inline">
78
- <%= @follow_up.total_amount %>万
78
+ <%= @follow_up.total_amount.to_f.round(2) %>万
79
79
  </div>
80
80
  </div>
81
81
  <div class="layui-inline">
82
82
  <label class="layui-form-label">合同额:</label>
83
83
  <div class="layui-input-inline">
84
- <%= @follow_up.actual_amount %>万
84
+ <%= @follow_up.actual_amount.to_f.round(2) %>万
85
85
  </div>
86
86
  </div>
87
87
  <br>
@@ -94,7 +94,7 @@
94
94
  <div class="layui-inline">
95
95
  <label class="layui-form-label">渠道分成:</label>
96
96
  <div class="layui-input-inline">
97
- <%= @follow_up.divide_amount %>万
97
+ <%= @follow_up.divide_amount.to_f.round(2) %>万
98
98
  </div>
99
99
  </div>
100
100
  <div class="layui-form-item">
@@ -1,3 +1,3 @@
1
1
  module EducodeSales
2
- VERSION = '0.8.7'
2
+ VERSION = '0.8.9'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: educode_sales
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.7
4
+ version: 0.8.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - anke1460
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-06-01 00:00:00.000000000 Z
11
+ date: 2022-06-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails