c80_shared 0.1.18 → 0.1.19
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9498e821d76d969f709fe14004d1033fb1fa12aab4f93bd622084db0282f170d
|
4
|
+
data.tar.gz: 19c8ab95ef92de95cd13e231195705b4a819bc635ba8d249b9e8d9c7d75d19e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2823a191b8786bb8f41fe67ebfa5b43561d23b30e147646c3d616839e9c9d7dcd4e3f1098be28d8e1da1464d2af77307dcb59ac0b6d00a8313830dee4ebd825e
|
7
|
+
data.tar.gz: 6dd9a7c23ba4309a5a5ea6322ddb4a41b253eeb5ee18bfcb67385c407acd95bfd316701a6036dd3d6ccdf5d6264f36a20d748dc4550ed329e8bfdf55468e4aed
|
@@ -22,6 +22,7 @@ module Lease
|
|
22
22
|
period
|
23
23
|
duration
|
24
24
|
human_price
|
25
|
+
human_price_vat_incl
|
25
26
|
comments
|
26
27
|
].freeze
|
27
28
|
end
|
@@ -70,6 +71,16 @@ module Lease
|
|
70
71
|
{ human_price: val }
|
71
72
|
end
|
72
73
|
|
74
|
+
def human_price_vat_incl(bid)
|
75
|
+
val = nil
|
76
|
+
if bid.price.present? && bid.currency.present?
|
77
|
+
val = bid.price / 100.0 * (100 + bid.vat)
|
78
|
+
val = num_to_cur(val, bid.currency, @opts[:locale])
|
79
|
+
end
|
80
|
+
|
81
|
+
{ human_price_vat_include: val.to_i }
|
82
|
+
end
|
83
|
+
|
73
84
|
def period(bid)
|
74
85
|
{ period: '%s - %s' % [from(bid)[:from], to(bid)[:to]] }
|
75
86
|
end
|
@@ -43,7 +43,7 @@ module Lease
|
|
43
43
|
def human_price_vat_incl(rebate)
|
44
44
|
val = nil
|
45
45
|
if rebate.amount.present? && rebate.currency.present?
|
46
|
-
val = rebate.amount / 100.0 * (100 + rebate.bid
|
46
|
+
val = rebate.amount / 100.0 * (100 + rebate.bid.vat)
|
47
47
|
val = num_to_cur(val, rebate.currency, @opts[:locale])
|
48
48
|
end
|
49
49
|
|
data/lib/c80_shared/version.rb
CHANGED