facturacr 0.1.3 → 0.1.4

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
  SHA1:
3
- metadata.gz: 5fe54ad4526251387084b74247d3897b87781a56
4
- data.tar.gz: 549cdc504c1ee37a4cac7c15cc424031fe043c0f
3
+ metadata.gz: aea851ecee75d42e2a0b8f958ead2ac23d0a4cb1
4
+ data.tar.gz: 1484b00510fe834c3c29eab1cb5115504cd2512b
5
5
  SHA512:
6
- metadata.gz: 0dcf0d1781a0be675f4a33053dd834b6c60a1e6e0d6e8a2a4d7b82bdbe3ae63aa8549664b6e4f281104175daa50969eb520c8447051ab827359dd9700e14a343
7
- data.tar.gz: 8ca8978495e86e774cdb566fb6162d6ea112c369e84b70ce46f7c54100b05dfd31757a4e473c4eec48813e267c823f42d5050b845886f73c6fac8a21eb0a58b0
6
+ metadata.gz: e1c76bad034b6de2b6530f4c1bbf0304dff3b70491deceaad4734cb580f5845bfd9ad3e4a4150154caca4f1eefe071eabf42bd6701a0139716d8a73fb3a150d9
7
+ data.tar.gz: 20219ed607264ac15ecc9c65fcf66e00c477b3a379a73736b9b04213287673b78e0073c494ae5a032bad37697cce717a91f0271f3e9214b0f5d6d9679149fc49
@@ -53,11 +53,11 @@ module FE
53
53
  private
54
54
 
55
55
  def totals_ok?
56
- errors[:taxable_total] << "invalid amount" unless @taxable_total == @services_taxable_total + @goods_taxable_total
57
- errors[:exent_total] << "invalid amount" unless @exent_total == @services_exent_total + @goods_exent_total
58
- errors[:subtotal] << "invalid amount" unless @subtotal == @taxable_total + @exent_total
59
- errors[:gross_total] << "invalid amount" unless @gross_total == @subtotal - @discount_total
60
- errors[:net_total] << "invalid amount" unless @net_total == @gross_total + @tax_total
56
+ errors[:taxable_total] << "invalid amount" unless @taxable_total == (@services_taxable_total + @goods_taxable_total).round(5)
57
+ errors[:exent_total] << "invalid amount" unless @exent_total == (@services_exent_total + @goods_exent_total).round(5)
58
+ errors[:subtotal] << "invalid amount" unless @subtotal == (@taxable_total + @exent_total).round(5)
59
+ errors[:gross_total] << "invalid amount" unless @gross_total == (@subtotal - @discount_total).round(5)
60
+ errors[:net_total] << "invalid amount" unless @net_total == (@gross_total + @tax_total).round(5)
61
61
  end
62
62
  end
63
63
  end
@@ -1,3 +1,3 @@
1
1
  module FE
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: facturacr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josef Sauter
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-04-04 00:00:00.000000000 Z
11
+ date: 2018-04-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler