snoopy_afip 4.0.0 → 4.0.1

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
  SHA256:
3
- metadata.gz: 9db972edf8d732f6395b81d338b287e1a98c5a3498963019aa52527e2db819f6
4
- data.tar.gz: 5b2cadf326bf6b0bf8e7efd280d9221d7871963dc5629d69f94298eef2b0e226
3
+ metadata.gz: 1434df2e42679fb7d860755edec3f47e1b2e4b2dc717977d6a1d6d1d7f0d8ef9
4
+ data.tar.gz: ee5336acb7dcaad19b562409ea76b6749e5e999aae0a5292c05ccad228de9568
5
5
  SHA512:
6
- metadata.gz: 559be5ddebeeaa7064b97f76b2187458645a28be9afdd2ccfd6ae8818e26f6b94ac817d53bb2a39ce2ea6f7372fe848c5981220869a3ab5c0f5db808db40d99e
7
- data.tar.gz: 11cd79757d6cf297a6136a408bfd88eb4b71b5a586446b61570b3ad0830c2e83753739618c6ee5690893291eb6202f228aeae252ddd61ae50943dc5d37eb52bd
6
+ metadata.gz: b90a7bc15f4e62004a948d9eaa0602ec283d38f4d3ebd27a97a4158769fb8cb4cb073ec4bae39e9b6d32634c7aace3954457eb0398905f54aaad927a54cf63b8
7
+ data.tar.gz: e94897c0533a95372a247e109395ba9b88b360afaf220195b8f2818f995c0a6ee13513380521421e4194330cada48872f36a2936aafb81a280722b4be5519cb4
@@ -95,7 +95,7 @@ module Snoopy
95
95
  if bill.receiver_iva_cond.to_s.include?("nota_credito")
96
96
  detail.merge!({"CbtesAsoc" => {"CbteAsoc" => {"Nro" => bill.cbte_asoc_num,
97
97
  "PtoVta" => bill.cbte_asoc_to_sale_point,
98
- "Tipo" => bill.cbte_type }}})
98
+ "Tipo" => bill.cbte_asoc_type }}})
99
99
  end
100
100
 
101
101
  @request = { "Auth" => auth }.merge!(fecaereq)
@@ -1,13 +1,13 @@
1
1
  # coding: utf-8
2
2
  module Snoopy
3
3
  class Bill
4
- ATTRIBUTES = [ :total_net, :document_num, :document_type, :concept, :currency, :result,
5
- :cbte_asoc_num, :cae, :service_date_to, :due_date,
6
- :number, :alicivas, :cuit, :sale_point, :service_date_from,
7
- :due_date_cae, :voucher_date, :process_date, :imp_iva, :cbte_asoc_to_sale_point,
8
- :receiver_iva_cond, :issuer_iva_cond, :errors ]
4
+ ATTRIBUTES = [:total_net, :document_num, :document_type, :concept, :currency, :result,
5
+ :cbte_asoc_num, :cae, :service_date_to, :due_date,
6
+ :number, :alicivas, :cuit, :sale_point, :service_date_from,
7
+ :due_date_cae, :voucher_date, :process_date, :imp_iva, :cbte_asoc_to_sale_point,
8
+ :receiver_iva_cond, :issuer_iva_cond, :errors, :asoc_receiver_iva_cond]
9
9
 
10
- TAX_ATTRIBUTES = [ :id, :amount, :taxeable_base ]
10
+ TAX_ATTRIBUTES = [:id, :amount, :taxeable_base]
11
11
 
12
12
  ATTRIBUTES_PRECENSE = [:total_net, :concept, :receiver_iva_cond, :alicivas, :document_type, :service_date_from, :service_date_to, :sale_point, :issuer_iva_cond]
13
13
 
@@ -32,6 +32,7 @@ module Snoopy
32
32
  @service_date_to = attrs[:service_date_to]
33
33
  @service_date_from = attrs[:service_date_from]
34
34
  @receiver_iva_cond = attrs[:receiver_iva_cond]
35
+ @asoc_receiver_iva_cond = attrs[:asoc_receiver_iva_cond]
35
36
  @cbte_asoc_to_sale_point = attrs[:cbte_asoc_to_sale_point] # Esto es el punto de venta de la factura para la nota de credito
36
37
  end
37
38
 
@@ -77,6 +78,10 @@ module Snoopy
77
78
  Snoopy::BILL_TYPE[receiver_iva_cond.to_sym]
78
79
  end
79
80
 
81
+ def cbte_asoc_type
82
+ Snoopy::BILL_TYPE[asoc_receiver_iva_cond.to_sym]
83
+ end
84
+
80
85
  def approved?
81
86
  result == 'A'
82
87
  end
@@ -1,3 +1,3 @@
1
1
  module Snoopy
2
- VERSION = "4.0.0"
2
+ VERSION = "4.0.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: snoopy_afip
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0
4
+ version: 4.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - g.edera
@@ -133,7 +133,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
133
133
  - !ruby/object:Gem::Version
134
134
  version: '0'
135
135
  requirements: []
136
- rubygems_version: 3.0.4
136
+ rubygems_version: 3.0.6
137
137
  signing_key:
138
138
  specification_version: 4
139
139
  summary: Adaptador AFIP wsfe.