sw_fac 0.3.4 → 0.3.43

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
- SHA1:
3
- metadata.gz: 0eda9f6e6d717cc5d8122e06cb4b4464f00de864
4
- data.tar.gz: 1edf4d110c9a274d96d97897e3d414be60c33bf0
2
+ SHA256:
3
+ metadata.gz: b1c8e909ea3cb2ad7dc86c6c315ac9a06fc8ea550dea0bba3fb018ab8755dbea
4
+ data.tar.gz: 01e59e6a61cc1f3b73452235af14c7075bd030d0200b3325018d7261d675c1c3
5
5
  SHA512:
6
- metadata.gz: 55f50080a01e105fe7b6380993c3673250997d3a944363c0cf685ae99cbbbbacc3db7cc27b6a8d9ae27d5cd3d5be603fac00d078bf9c0d0d55a18bd7938a111c
7
- data.tar.gz: 0ac7c2b1e6220a89bdc4f4bb5ff8f80c4c6996e80e3341c4437aff1db0be69467928833b31c26f0cb3a5e02e2ba9d532cb7570697a6e35500927469fd679a8af
6
+ metadata.gz: ecdef400fb0453f13df6d4827beb784bbc3e6c61a789e2e081c1074f4209ab6ecb7f3d1adf4e3024d92daca9f2127f6cb782fb643e2c9ee75340ff0121329b9a
7
+ data.tar.gz: 8477b5ab8985d1538d267d56fc485f4948f664ce584b3116f35f392652a8642283a66c67ba787cac3a07195c6392d042ebaea8290d85d3f4112382417be0140b
data/README.md CHANGED
@@ -54,3 +54,8 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/angelp
54
54
  ## License
55
55
 
56
56
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
57
+
58
+ ## Support on Beerpay
59
+ Hey dude! Help me out for a couple of :beers:!
60
+
61
+ [![Beerpay](https://beerpay.io/angelpadilla/sw_facturacion/badge.svg?style=beer-square)](https://beerpay.io/angelpadilla/sw_facturacion) [![Beerpay](https://beerpay.io/angelpadilla/sw_facturacion/make-wish.svg?style=flat-square)](https://beerpay.io/angelpadilla/sw_facturacion?focus=wish)
@@ -9,9 +9,9 @@ module SwFac
9
9
  # venta_folio: '',
10
10
  # cp: '',
11
11
  # receptor_razon: 'Car zone',
12
- # receptor_rfc: 'XAXX010101000',
13
- # forma_pago: '01',
14
- # total: 100.00,
12
+ # receptor_rfc: 'XAXX010101000',
13
+ # forma_pago: '01',
14
+ # total: 100.00,
15
15
  # time: '',
16
16
  # modena: '',
17
17
  # line_items: [
@@ -22,7 +22,17 @@ module SwFac
22
22
  # ]
23
23
  # }
24
24
 
25
- raise 'Error - la suma de los complementos de pago es mayor al total reportado' if (params[:line_items].inject(0) {|sum, x| sum + x[:monto].to_f }) > params[:total].to_f
25
+ puts " Datos --------"
26
+ puts "-- Total: #{params[:total]}"
27
+ puts "--- Line items: "
28
+ params[:line_items].each do |line|
29
+ puts "--- #{line[:monto]}"
30
+ end
31
+ puts "-- Suma de line_items: #{params[:line_items].inject(0) {|sum, x| sum + x[:monto].to_f.round(2) }}"
32
+
33
+ if (params[:line_items].inject(0) {|sum, x| sum + x[:monto].to_f }) > params[:total].to_f.round(2)
34
+ raise 'Error - la suma de los complementos de pago es mayor al total reportado'
35
+ end
26
36
 
27
37
  uri = @production ? URI("#{SwFac::UrlProduction}cfdi33/stamp/customv1/b64") : URI("#{SwFac::UrlDev}cfdi33/stamp/customv1/b64")
28
38
  token = @production ? @production_token : @dev_token
@@ -1,3 +1,3 @@
1
1
  module SwFac
2
- VERSION = "0.3.4"
2
+ VERSION = "0.3.43"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sw_fac
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.3.43
5
5
  platform: ruby
6
6
  authors:
7
7
  - Angel Padilla
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-11-08 00:00:00.000000000 Z
11
+ date: 2019-05-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -129,8 +129,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
129
129
  - !ruby/object:Gem::Version
130
130
  version: '0'
131
131
  requirements: []
132
- rubyforge_project:
133
- rubygems_version: 2.4.5
132
+ rubygems_version: 3.0.1
134
133
  signing_key:
135
134
  specification_version: 4
136
135
  summary: Gem used to fetch the Smarter Web API