c80_shared 0.1.17 → 0.1.18

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: b8c57731d19725bf3952ac228856e67b329f76a2a3a0c910c9f5d1b69b9fa3cc
4
- data.tar.gz: 27d7d078fa9abea8900008bab8eadd20fcb135237047d011e5a5fb4ed5a6cc4a
3
+ metadata.gz: 2b5c44048049aaf4d63e6c25d454f8d047f108f1d81ea0fcc04d572dbe99a6f9
4
+ data.tar.gz: 8982a07e65a36b2976a02a0b8fdf4e8bbdebe0f17db01a78359dc205d235e85c
5
5
  SHA512:
6
- metadata.gz: d952202ea067e617d791f40a3f67ea612b40e695fc5b3ff3e5d1429ae8f8937e2599a6b2acfb97ce6373021ec1eef1a33085ce57ee1edd852ec8a21c7066adc8
7
- data.tar.gz: ffcbbac4f4cc3d358b1b9854908461af8d7aece4f63fd9ec5d14bb215944261377128c63143f12c1e8fab46ad6535514184b8055fb20a96d318541205caf409d
6
+ metadata.gz: e27dadb2b04c252fbd11729327bb4ea3135e4ee874e8a4e4e100c11479f01caccc46f9cc75122b4e8720f8b7ea3a2b0bf7ac4886aa45438d5dc6495b2c1a2210
7
+ data.tar.gz: 44f76b84245b8b9b8ffa0d6ca8e7765043f21b9b929870ed1e11c629adbed92df15d7c11c813e51911d9acdf3fd67c311fb7ef03dd77f2dff5aa815507991aa4
@@ -12,6 +12,7 @@ module Lease
12
12
  :amount,
13
13
  :currency,
14
14
  :human_price,
15
+ :human_price_vat_incl,
15
16
  :old_amount,
16
17
  :old_currency,
17
18
  :old_human_price
@@ -30,6 +31,7 @@ module Lease
30
31
  { currency: rebate.currency }
31
32
  end
32
33
 
34
+ # то, что юзер ввёл в диалоговое окно - "total renting price, VAT excl."
33
35
  def human_price(rebate)
34
36
  val = nil
35
37
  if rebate.amount.present? && rebate.currency.present?
@@ -38,6 +40,17 @@ module Lease
38
40
  { human_price: val }
39
41
  end
40
42
 
43
+ def human_price_vat_incl(rebate)
44
+ val = nil
45
+ if rebate.amount.present? && rebate.currency.present?
46
+ val = rebate.amount / 100.0 * (100 + rebate.bid[:vat])
47
+ val = num_to_cur(val, rebate.currency, @opts[:locale])
48
+ end
49
+
50
+ { human_price_vat_include: val.to_i }
51
+ end
52
+
53
+ # VAT incl
41
54
  def old_amount(rebate)
42
55
  { old_amount: rebate.old_amount }
43
56
  end
@@ -46,6 +59,7 @@ module Lease
46
59
  { old_currency: rebate.old_currency }
47
60
  end
48
61
 
62
+ # VAT incl
49
63
  def old_human_price(rebate)
50
64
  val = nil
51
65
  if rebate.old_amount.present? && rebate.old_currency.present?
@@ -1,3 +1,3 @@
1
1
  module C80Shared
2
- VERSION = "0.1.17"
2
+ VERSION = "0.1.18"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: c80_shared
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.17
4
+ version: 0.1.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - C80609A
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-02-07 00:00:00.000000000 Z
11
+ date: 2019-02-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler