nfse-carioca 0.2.1 → 0.2.2

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
  SHA1:
3
- metadata.gz: 0042cdf6bbd6686616c643e88690b4a8260d43a8
4
- data.tar.gz: facdde1a0318db115e0ec7ea7b74a2bf546bf37f
3
+ metadata.gz: 4c9ce592fcfdaed241d7b69427578147d533651c
4
+ data.tar.gz: 70376a6f1959639564c34066f694ea70e33987dd
5
5
  SHA512:
6
- metadata.gz: c1e02dc9c2e150d98a94737baa2a5359433ad0230dff10a81bfad806a227a3bff469bd09224b9cbe44ad18bf68fadc3e0f89028d558b493f2fdc55e5378cb1a8
7
- data.tar.gz: 4f601af779acf52347fcee17d5261797b7e22b5a85f7c9bc3a2a34657931334dbcee9a2fd7e0bd07246a6b06dc8ac6c5031915f7c988acfb4d6568d35f40a4ec
6
+ metadata.gz: afead07d39fe05a47481fe25dcda23dfb15f4772e141b51782a9f3d1c721ef877c170b045f6e8ced5f8ba102fc16e00b6ac6531382919da7b1c864c3a812694e
7
+ data.tar.gz: 0849758adbffa99490f65187fa01a6efc7de9acd3a99f3584024435c2382c5bebd4dccba6b84709f89b4d7b49a69eb232c542b00b236d2de3edba3d39837f3aa
@@ -65,7 +65,13 @@ module NfseCarioca
65
65
  tomador.Endereco do |endereco|
66
66
  endereco.Endereco @invoice[:customer][:address][:street]
67
67
  endereco.Numero @invoice[:customer][:address][:number]
68
- endereco.Complemento @invoice[:customer][:address][:complement]
68
+
69
+ complement = @invoice[:customer][:address][:complement]
70
+
71
+ if !(complement.nil? || complement.empty?)
72
+ endereco.Complemento complement
73
+ end
74
+
69
75
  endereco.Bairro @invoice[:customer][:address][:neighborhood]
70
76
  endereco.CodigoMunicipio @invoice[:customer][:address][:city_ibge_code]
71
77
  endereco.Uf @invoice[:customer][:address][:state_code]
@@ -74,8 +80,10 @@ module NfseCarioca
74
80
  end
75
81
 
76
82
  tomador.Contato do |contato|
77
- if @invoice[:customer][:phone_number]
78
- contato.Telefone @invoice[:customer][:phone_number]
83
+ phone_number = @invoice[:customer][:phone_number]
84
+
85
+ if !(phone_number.nil? || phone_number.empty?)
86
+ contato.Telefone phone_number
79
87
  end
80
88
 
81
89
  contato.Email @invoice[:customer][:email]
@@ -1,3 +1,3 @@
1
1
  module NfseCarioca
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nfse-carioca
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - LUZ Planilhas