Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modificaciones y correcciones varias #1

Open
wants to merge 53 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
23ccaa4
Modificado path al ejecutable de openssl en wsaa-client.sh. Ahora dep…
ceneon Apr 7, 2011
f0cd76e
Dependencias agregadas
ceneon Apr 7, 2011
f50409b
Corregido rechazo de comprobantes de "Productos"
ceneon Apr 7, 2011
054e475
Agregada información de instalación de openssl
ceneon Apr 7, 2011
1f55ce6
Nota sobre incompatibilidad Windows
ceneon Apr 7, 2011
4b96d69
Agregué archivo de salida parametrizable
ceneon Apr 9, 2011
df363d2
Moví archivo de salida de WSAA a directorio tmp dentro del proyecto (…
ceneon Apr 9, 2011
55ebaad
Agregué soporte a distintos CUIT en la misma aplicación (Varios archi…
ceneon Apr 9, 2011
3e96c1e
Parsing de "Observaciones" del rechazo de pedido de WSFE
ceneon Apr 9, 2011
8de5e84
Parsing de "Errores" del rechazo de pedido de WSFE
ceneon Apr 9, 2011
b87ec0e
Agregué BILL_TYPE nota de débito A y B
ceneon Apr 9, 2011
17c76a9
Captura de error en el token de WSAA
ceneon Apr 11, 2011
d67de6f
Corregido error de redondeo en cálculo de IVA!
ceneon Apr 11, 2011
eca3ab1
Removido el IVA 21% Hardcodeado !!!!
ceneon Apr 11, 2011
0d1efd5
Corregido el typo del commit anterior
ceneon Apr 11, 2011
770cd75
Ídem
ceneon Apr 11, 2011
366c695
me.stupid
ceneon Apr 11, 2011
fbc39e7
Agregué fecha de emisión del comprobante parametrizable (Bill.fch_emi…
ceneon Apr 14, 2011
3aa9a3b
corrección menor en readme
ceneon Apr 14, 2011
5ed1303
Método nuevo "deleteToken"
ceneon May 3, 2011
d39c895
Método nuevo "deleteToken"
ceneon May 3, 2011
fa14530
Edited lib/bravo/bill.rb via GitHub
ceneon Jun 10, 2011
cc1b742
Ejecuta wsaa-client incluso si no tiene permisos de ejecución
ceneon Jan 19, 2012
b050358
Soporte para múltiples IVA
ceneon Jan 20, 2012
61e5a7e
cleanup
ceneon Jan 20, 2012
5398782
Calculo de iva_sum interno
ceneon Jan 20, 2012
7758446
fix en tests
ceneon Jan 20, 2012
80de1bc
Freeze savon version
ceneon Jan 15, 2013
e87c341
Freezed savon version in gemspec
ceneon Jan 15, 2013
ce7b22d
Debugging wsaa shit
ceneon Jun 30, 2015
a2d1987
Please debug all this :shit:
ceneon Jul 1, 2015
ff70d2e
:shit:
ceneon Jul 1, 2015
49d8b35
adding monotributo invoicing
nan-apps Dec 21, 2018
4a74584
precision fix
nan-apps Jan 4, 2019
aeff827
Merge branch 'master' into c-invoicing
nan-apps Jan 4, 2019
9d54b53
Merge pull request #1 from ceneon/c-invoicing
ceneon Jan 15, 2019
5540bb9
adding related invoice params for A and B notes. New afip requirements
nan-apps Sep 23, 2020
e0a50a2
[hotfix] adding C notes to constants, it was sending always C invoice…
nan-apps Sep 25, 2020
b0127e4
method to get token last modified date time
nan-apps Oct 3, 2020
b9b1967
[WIP] Search for invoices and such
Oct 26, 2020
27d9a56
🤬
Oct 26, 2020
cefcbcf
Updated to a newer savon gem
Oct 26, 2020
506ac35
Force savon to log for emergency reasons
Oct 29, 2020
8752d83
Made Savon log through Rails
Oct 29, 2020
92ebd32
Merge pull request #2 from ceneon/search-invoices
ceneon Oct 30, 2020
dd4b0fb
Make Savon log always
Oct 30, 2020
dac1c01
Hotfix for very old code that keeps failing
Oct 30, 2020
251f76f
getting authentication errors on WSAA requests and raising exception …
nan-apps Jan 5, 2021
22eda09
Merge remote-tracking branch 'origin/master'
nan-apps Jan 5, 2021
dd53dbb
Patched constant token/sign setter for multi-tenant environments
ceneon Jun 7, 2021
85f558c
2021 AFIP update: RIs now use A invoices for MOs (because reasons)
ceneon Oct 16, 2021
235e1f1
Use PeriodoAsoc when submitting NC/ND without CbteAsoc
ceneon Nov 10, 2023
3fdd9ac
User PeriodoAsoc on nc/nd only
ceneon Nov 11, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Captura de error en el token de WSAA
ceneon committed Apr 11, 2011
commit 17c76a915eecfdd22216826ccefa73e2a8f1b21b
20 changes: 15 additions & 5 deletions lib/bravo/bill.rb
Original file line number Diff line number Diff line change
@@ -106,8 +106,8 @@ def next_bill_number
resp.to_hash[:fe_comp_ultimo_autorizado_response][:fe_comp_ultimo_autorizado_result][:cbte_nro].to_i + 1
end

def authorized?
!response.nil? && response.header_result == "A" && response.detail_result == "A"
def authorized?
!response.nil? && response.header_result == "A" && response.detail_result == "A"
end

private
@@ -122,15 +122,25 @@ def setup_response(response)
# TODO: turn this into an all-purpose Response class

result = response[:fecae_solicitar_response][:fecae_solicitar_result]


if not result[:fe_det_resp] or not result[:fe_cab_resp] then
# Si no obtuvo respuesta ni cabecera ni detalle, evito hacer '[]' sobre algo indefinido.
# Ejemplo: Error con el token-sign de WSAA
keys, values = {
:errores => result[:errors],
:header_result => {:resultado => "X" },
:observaciones => nil
}.to_a.transpose
self.response = (defined?(Struct::ResponseMal) ? Struct::ResponseMal : Struct.new("ResponseMal", *keys)).new(*values)
return
end

response_header = result[:fe_cab_resp]
response_detail = result[:fe_det_resp][:fecae_det_response]

request_header = body["FeCAEReq"]["FeCabReq"].underscore_keys.symbolize_keys
request_detail = body["FeCAEReq"]["FeDetReq"]["FECAEDetRequest"].underscore_keys.symbolize_keys

iva = request_detail.delete(:iva)["AlicIva"].underscore_keys.symbolize_keys

request_detail.merge!(iva)

if result[:errors] then