dm_event 4.2.3.3 → 4.2.3.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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b6820c04a7d61a158f16abbb81b16e9c0a2dd4d3
|
4
|
+
data.tar.gz: 40500432e4de874f91b699717d0d2202de9201f3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f84c61d0f840394afbc62a8eb97b2b5e88724928f3e03aef8663b6e5d5ec7d3a092f12cfd43abf84620d8343766811481b113983fe0a7b1328d4b0250bd841e8
|
7
|
+
data.tar.gz: 9cde796a672582ea1dc66b6b753205add4357f015332d8459ac3f481c4a3ffeacb62f75db5d81c201c43dc5347849fe6626742f8fa0c09e11c90bd398f48ba4a
|
data/app/models/registration.rb
CHANGED
@@ -129,6 +129,20 @@ public
|
|
129
129
|
end
|
130
130
|
end
|
131
131
|
|
132
|
+
# when a customer wants to make a payment, they should either charged the amount
|
133
|
+
# for this month (which could be less than the normal monthly amount), or the
|
134
|
+
# standard monthly amount, or whatever the balance_owed is
|
135
|
+
#------------------------------------------------------------------------------
|
136
|
+
def make_payment_now_amount
|
137
|
+
if payment_owed.positive?
|
138
|
+
payment_owed
|
139
|
+
elsif workshop_price.payment_price < balance_owed
|
140
|
+
workshop_price.payment_price
|
141
|
+
else
|
142
|
+
balance_owed
|
143
|
+
end
|
144
|
+
end
|
145
|
+
|
132
146
|
# Return the number of items specified, in particular the number of items in
|
133
147
|
# a particular state
|
134
148
|
#------------------------------------------------------------------------------
|
@@ -91,7 +91,11 @@
|
|
91
91
|
</ul>
|
92
92
|
<table class="accounting" style="width: 100%">
|
93
93
|
<tr>
|
94
|
-
<th>Price
|
94
|
+
<th>Price
|
95
|
+
<% if @registration.workshop_price.recurring_payments? %>
|
96
|
+
<span style="font-weight: normal"></br>On a payment plan</span>
|
97
|
+
<% end %>
|
98
|
+
</th>
|
95
99
|
<td><%= @registration.price.format %></td>
|
96
100
|
</tr>
|
97
101
|
<tr>
|
@@ -108,11 +112,7 @@
|
|
108
112
|
</tr>
|
109
113
|
<% if @registration.payment_owed.positive? %>
|
110
114
|
<tr class="section">
|
111
|
-
<th>Payment Owed
|
112
|
-
<% if @registration.workshop_price.recurring_payments? %>
|
113
|
-
<span style="font-weight: normal"></br>On a payment plan</span>
|
114
|
-
<% end %>
|
115
|
-
</th>
|
115
|
+
<th>Payment Owed</th>
|
116
116
|
<td class="text-info"><%= @registration.payment_owed.format %></td>
|
117
117
|
</tr>
|
118
118
|
<tr>
|
@@ -214,9 +214,17 @@
|
|
214
214
|
<% end %>
|
215
215
|
</div>
|
216
216
|
<div class="col-md-3 col-sm-3">
|
217
|
+
<ul class="statistics">
|
218
|
+
<% color = @registration.balance_owed.positive? ? :danger : :success %>
|
219
|
+
<li><%= stat_block_small label: 'Balance', number: @registration.balance_owed.format(no_cents_if_whole: true), color_type: color, icon: 'icon-coin', percent: 100 %></li>
|
220
|
+
</ul>
|
217
221
|
<table class="accounting" style="width: 100%">
|
218
222
|
<tr>
|
219
|
-
<th>Price
|
223
|
+
<th>Price
|
224
|
+
<% if @registration.workshop_price.recurring_payments? %>
|
225
|
+
<span style="font-weight: normal"></br>On a payment plan</span>
|
226
|
+
<% end %>
|
227
|
+
</th>
|
220
228
|
<td><%= @registration.price.format %></td>
|
221
229
|
</tr>
|
222
230
|
<tr>
|
@@ -233,11 +241,7 @@
|
|
233
241
|
</tr>
|
234
242
|
<% if @registration.payment_owed.positive? %>
|
235
243
|
<tr class="section">
|
236
|
-
<th>Payment Owed
|
237
|
-
<% if @registration.workshop_price.recurring_payments? %>
|
238
|
-
<span style="font-weight: normal"></br>On a payment plan</span>
|
239
|
-
<% end %>
|
240
|
-
</th>
|
244
|
+
<th>Payment Owed</th>
|
241
245
|
<td class="text-info"><%= @registration.payment_owed.format %></td>
|
242
246
|
</tr>
|
243
247
|
<tr>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<% payment_service_for @registration.receipt_code, current_account.preferred_paypal_merchant_id,
|
2
|
-
amount: @registration.
|
2
|
+
amount: @registration.make_payment_now_amount,
|
3
3
|
currency: @registration.payment_owed.currency.iso_code,
|
4
4
|
service: :paypal do |service|
|
5
5
|
service.customer :first_name => @registration.first_name,
|
@@ -2,7 +2,7 @@
|
|
2
2
|
credential2: current_account.preferred_sofort_project_id,
|
3
3
|
credential3: current_account.preferred_sofort_project_password,
|
4
4
|
credential4: '', #--- notification password
|
5
|
-
amount: @registration.
|
5
|
+
amount: @registration.make_payment_now_amount,
|
6
6
|
currency: @registration.payment_owed.currency.iso_code,
|
7
7
|
service: :directebanking do |service|
|
8
8
|
service.item_name @registration.workshop.title
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dm_event
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.2.3.
|
4
|
+
version: 4.2.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brett Walker
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dm_core
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 4.2.3.
|
19
|
+
version: 4.2.3.4
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 4.2.3.
|
26
|
+
version: 4.2.3.4
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: dm_cms
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 4.2.3.
|
33
|
+
version: 4.2.3.4
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 4.2.3.
|
40
|
+
version: 4.2.3.4
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: activemerchant
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -421,7 +421,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
421
421
|
version: '0'
|
422
422
|
requirements: []
|
423
423
|
rubyforge_project:
|
424
|
-
rubygems_version: 2.
|
424
|
+
rubygems_version: 2.6.8
|
425
425
|
signing_key:
|
426
426
|
specification_version: 4
|
427
427
|
summary: Part of MokshaCms, Event Engine
|