billme 0.40.0 → 0.44.0

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: 59b5b5b496c1cd6a5697c21f3c9dd3c160577d87
4
- data.tar.gz: a789fe8f526cd3cf64a9bcb67cf9519d19d9739f
3
+ metadata.gz: 7e465a9b57514de193d25ef8e3f42acb097d345d
4
+ data.tar.gz: 84c0d2102d1bfad3080564e7eb7cd97da14ea188
5
5
  SHA512:
6
- metadata.gz: b29bd3475177d7f6ad00eadf027e9e9c4ec526e10f9ab00ff6d1836dd595a03af9e9449fe34cbcbbe383ad1c47a6bcfd4231ffd43f5bb5fa9064bf4fb824d841
7
- data.tar.gz: b50af72f1cba623d86fcf23551aa81a963ddd9206f4499b91ed5bd3c0af51204aeb97ee748e648eba5baa5eb85ff474dc13169ddc88d0beab37a1314022a8191
6
+ metadata.gz: 35ad681301b81eff9e0a7e0ff3fa82c04a523d2a666c5a8a0b88d6447a78ea29a1cbc6c4193525df3122d26a8d9c68edfc82c6af18f2293f1953734d969bc967
7
+ data.tar.gz: f3736ffaf4913e1cb5b1225462fb81990c2d686feb68649e5e989bd5a9be8a0143b9042cdc71f2b79ff7aa7099cab9022ddfec61294511349c039c8b0cf22c79
@@ -6,4 +6,10 @@ class Object
6
6
  def show(input)
7
7
  input ||= '-'
8
8
  end
9
+ end
10
+
11
+ Numeric.class_eval do
12
+ def round_money
13
+ '%.2f' % self
14
+ end
9
15
  end
@@ -1,3 +1,3 @@
1
1
  module Billme
2
- VERSION = "0.40.0"
2
+ VERSION = "0.44.0"
3
3
  end
@@ -60,23 +60,23 @@
60
60
  <tr>
61
61
  <td class="service"><%= service[:name] %></td>
62
62
  <td class="desc"><%= service[:description] || '-' %></td>
63
- <td class="unit"><%= service[:unit] %><%= @data[:services][:currency] %></td>
63
+ <td class="unit"><%= service[:unit].to_f.round_money %> <%= @data[:services][:currency] %></td>
64
64
  <td class="qty"><%= service[:quantity] %></td>
65
- <td class="total"><%= service[:quantity].to_i * service[:unit].to_i %><%= @data[:services][:currency] %></td>
65
+ <td class="total"><%= (service[:quantity].to_i * service[:unit].to_i).round_money %> <%= @data[:services][:currency] %></td>
66
66
  </tr>
67
67
  <% end %>
68
68
  <tr>
69
69
  <td colspan="3"><%= I18n.t :subtotal %></td>
70
- <td class="total"><td class="total"><%= @data[:services][:subtotal] %><%= @data[:services][:currency] %></td></td>
70
+ <td class="total"><td class="total"><%= @data[:services][:subtotal].round_money %> <%= @data[:services][:currency] %></td></td>
71
71
  </tr>
72
72
  <tr>
73
73
  <td colspan="3"><%= I18n.t :tax %> <%= @data[:services][:tax_percentage] %>%</td>
74
- <td class="total"><td class="total"><%= @data[:services][:tax] %><%= @data[:services][:currency] %></td>
74
+ <td class="total"><td class="total"><%= @data[:services][:tax].round_money %> <%= @data[:services][:currency] %></td>
75
75
  </td>
76
76
  </tr>
77
77
  <tr>
78
78
  <td colspan="3" class="grand total"><%= I18n.t :total %></td>
79
- <td class="grand total"><td class="grand total"><%= @data[:services][:total] %><%= @data[:services][:currency] %></td>
79
+ <td class="grand total"><td class="grand total"><%= @data[:services][:total].round_money %> <%= @data[:services][:currency] %></td>
80
80
  </td>
81
81
  </tr>
82
82
  </tbody>
data/output.html CHANGED
@@ -74,7 +74,6 @@ h1 {
74
74
 
75
75
  #project div,
76
76
  #company div {
77
- white-space: nowrap;
78
77
  }
79
78
 
80
79
  table {
@@ -201,7 +200,7 @@ footer {
201
200
  <th class="service">SERVICE</th>
202
201
  <th class="desc">DESCRIPTION</th>
203
202
  <th>PRICE</th>
204
- <th>QTY</th>
203
+ <th>QUANTITY</th>
205
204
  <th>TOTAL</th>
206
205
  </tr>
207
206
  </thead>
@@ -212,7 +211,7 @@ footer {
212
211
  <td class="desc">Warmup for battle</td>
213
212
  <td class="unit">1000$</td>
214
213
  <td class="qty">1</td>
215
- <td class="total">1000$</td>
214
+ <td class="total">1000.00 $</td>
216
215
  </tr>
217
216
 
218
217
  <tr>
@@ -220,21 +219,21 @@ footer {
220
219
  <td class="desc">Rescue captive away teams</td>
221
220
  <td class="unit">2000$</td>
222
221
  <td class="qty">2</td>
223
- <td class="total">4000$</td>
222
+ <td class="total">4000.00 $</td>
224
223
  </tr>
225
224
 
226
225
  <tr>
227
226
  <td colspan="3">SUBTOTAL</td>
228
- <td class="total"><td class="total">3750.0$</td></td>
227
+ <td class="total"><td class="total">3750.00 $</td></td>
229
228
  </tr>
230
229
  <tr>
231
230
  <td colspan="3">TAX 25.0%</td>
232
- <td class="total"><td class="total">1250.0$</td>
231
+ <td class="total"><td class="total">1250.00 $</td>
233
232
  </td>
234
233
  </tr>
235
234
  <tr>
236
235
  <td colspan="3" class="grand total">TOTAL</td>
237
- <td class="grand total"><td class="grand total">5000$</td>
236
+ <td class="grand total"><td class="grand total">5000.00 $</td>
238
237
  </td>
239
238
  </tr>
240
239
  </tbody>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: billme
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.40.0
4
+ version: 0.44.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hrvoje G
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-04-12 00:00:00.000000000 Z
11
+ date: 2016-04-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler