sw_fac 0.3.56 → 0.3.57
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 +4 -4
- data/lib/sw_fac/facturacion.rb +10 -8
- data/lib/sw_fac/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2b42c257daa8d42e001986d905ffab338db35601a8ddc082815ce3a9000440d2
|
|
4
|
+
data.tar.gz: f513ba041875e90d46cbc9ca47e57a4f3d216e669fa814fadb5539677094e050
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 69ecc08be4f9d4f5c97199b964085f6574a571271806c0ef7ff7b428c72072ab805ace8f8e1641cab06383c0befeac7b95fb1ed97a2a24383e5839fe0ea82c8c
|
|
7
|
+
data.tar.gz: 2140988d0cd6d7a09a58e80cbc10224c7385ff87196b9aa35d39665be54a9a9535ab47f21206f67593ae9ecb2a2c5cb64154d92bfdc9e1fa5637b3fbf5c39425
|
data/lib/sw_fac/facturacion.rb
CHANGED
|
@@ -9,9 +9,9 @@ module SwFac
|
|
|
9
9
|
# venta_folio: '',
|
|
10
10
|
# cp: '',
|
|
11
11
|
# receptor_razon: 'Car zone',
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
# receptor_rfc: 'XAXX010101000',
|
|
13
|
+
# forma_pago: '01',
|
|
14
|
+
# total: 100.00,
|
|
15
15
|
# time: '',
|
|
16
16
|
# modena: '',
|
|
17
17
|
# line_items: [
|
|
@@ -23,15 +23,17 @@ module SwFac
|
|
|
23
23
|
# }
|
|
24
24
|
|
|
25
25
|
puts " Datos --------"
|
|
26
|
-
puts "-- Total: #{params[:total]}"
|
|
26
|
+
puts "-- Total params: #{params[:total]}"
|
|
27
27
|
puts "--- Line items: "
|
|
28
28
|
params[:line_items].each do |line|
|
|
29
29
|
puts "--- #{line[:monto]}"
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
end
|
|
31
|
+
lines_total = params[:line_items].inject(0) {|sum, x| sum + x[:monto].to_f}
|
|
32
|
+
|
|
33
|
+
puts "-- Suma de line_items: #{lines_total}"
|
|
32
34
|
|
|
33
|
-
if (
|
|
34
|
-
raise 'Error - la suma de los complementos de pago es mayor al total reportado'
|
|
35
|
+
if (lines_total > params[:total].to_f)
|
|
36
|
+
raise 'Error SW - la suma de los complementos de pago es mayor al total reportado'
|
|
35
37
|
end
|
|
36
38
|
|
|
37
39
|
uri = @production ? URI("#{SwFac::UrlProduction}cfdi33/stamp/customv1/b64") : URI("#{SwFac::UrlDev}cfdi33/stamp/customv1/b64")
|
data/lib/sw_fac/version.rb
CHANGED
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
|
+
version: 0.3.57
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Angel Padilla
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-
|
|
11
|
+
date: 2020-09-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|