Skip to content

Commit

Permalink
Varios: Issue 19, Issue 20.
Browse files Browse the repository at this point in the history
  • Loading branch information
GerardoAllende committed Apr 30, 2011
1 parent 9e9a9b2 commit 2429850
Show file tree
Hide file tree
Showing 7 changed files with 58 additions and 58 deletions.
2 changes: 1 addition & 1 deletion config.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;!@Install@!UTF-8!
Title="PyAfipWs 1.25a"
BeginPrompt="¿Desea instalar la Interface Para Servicios Web de AFIP?"
BeginPrompt="¿Desea instalar la Interfaz Para Servicios Web de AFIP?"
RunProgram="INSTALAR.BAT %%T"
Directory=".\\DIST\\"
;!@InstallEnd@!
4 changes: 2 additions & 2 deletions licencia.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PyAfipWS: Interfases y herramientas para Servicios Web AFIP Copyright (C) 2008/2009/2010/2011 Mariano Reingart <reingart@gmail.com>
PyAfipWS: Interfaces y herramientas para Servicios Web AFIP Copyright (C) 2008/2009/2010/2011 Mariano Reingart <reingart@gmail.com>

Este programa se entrega ABSOLUTAMENTE SIN GARANTIA bajo la licencia GPLv3 de software libre (ver abajo), y no puede ser incorporado o distribuido con software propietario (no libre) sin la previa autorizacion del autor.
Adicionalmente se debe conservar y mostrar las atribuciones de autor�a y avisos legales, estando prohibida la tergiversaci�n del origen de este material.
Expand Down Expand Up @@ -682,4 +682,4 @@ into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
12 changes: 6 additions & 6 deletions pyafipws.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.

"Módulo de Servidor COM para interface con Windows"
"Módulo de Servidor COM para interfaz con Windows"

__author__ = "Mariano Reingart (reingart@gmail.com)"
__copyright__ = "Copyright (C) 2008 Mariano Reingart"
Expand Down Expand Up @@ -49,7 +49,7 @@ def raisePythonException(e):


class WSFE:
"Interfase para el WebService de Factura Electrónica"
"Interfaz para el WebService de Factura Electrónica"
_public_methods_ = ['RecuperarQty', 'UltNro', 'RecuperaLastCMP', 'Aut', 'Dummy', 'Conectar' ]
_public_attrs_ = ['Token', 'Sign', 'Cuit',
'AppServerStatus', 'DbServerStatus', 'AuthServerStatus',
Expand Down Expand Up @@ -189,7 +189,7 @@ def Dummy(self):


class WSBFE:
"Interfase para el WebService de Bono Fiscal Electrónico (FE Bs. Capital)"
"Interfaz para el WebService de Bono Fiscal Electrónico (FE Bs. Capital)"
_public_methods_ = ['CrearFactura', 'AgregarItem', 'Authorize', 'GetCMP',
'GetParamMon', 'GetParamTipoCbte', 'GetParamUMed', 'GetParamTipoIVA', 'GetParamNCM',
'Dummy', 'Conectar', 'GetLastCMP', 'GetLastID' ]
Expand Down Expand Up @@ -408,7 +408,7 @@ def GetParamNCM(self):


class WSFEX:
"Interfase para el WebService de Factura Electrónica Exportación"
"Interfaz para el WebService de Factura Electrónica Exportación"
_public_methods_ = ['CrearFactura', 'AgregarItem', 'Authorize', 'GetCMP',
'AgregarPermiso', 'AgregarCmpAsoc',
'GetParamMon', 'GetParamTipoCbte', 'GetParamTipoExpo',
Expand Down Expand Up @@ -737,7 +737,7 @@ def GetParamCtz(self, moneda_id='DOL'):


class WSCTG:
"Interfase para el WebService de Código de Trazabilidad de Granos"
"Interfaz para el WebService de Código de Trazabilidad de Granos"
_public_methods_ = ['Conectar','Dummy','SolicitarCTG','ConfirmarCTG']
_public_attrs_ = ['Token', 'Sign', 'Cuit',
'AppServerStatus', 'DbServerStatus', 'AuthServerStatus',
Expand Down Expand Up @@ -844,7 +844,7 @@ def ConfirmarCTG(self, numero_carta_de_porte, numero_CTG, cuit_transportista, pe


class wDigDepFiel:
"Interfase para el WebService de Depositario Fiel"
"Interfaz para el WebService de Depositario Fiel"
_public_methods_ = ['Conectar', 'Dummy', 'AvisoDigit', 'AvisoRecepAcept', 'IniciarAviso', 'AgregarFamilia']
_public_attrs_ = ['Token', 'Sign', 'Cuit',
'AppServerStatus', 'DbServerStatus', 'AuthServerStatus',
Expand Down
14 changes: 7 additions & 7 deletions pyfepdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
from decimal import Decimal
from pyfpdf_hg import Template

def inicializar_y_capturar_execepciones(func):
def inicializar_y_capturar_excepciones(func):
"Decorador para inicializar y capturar errores"
def capturar_errores_wrapper(self, *args, **kwargs):
try:
Expand All @@ -75,7 +75,7 @@ def capturar_errores_wrapper(self, *args, **kwargs):


class FEPDF:
"Interfase para generar PDF de Factura Electrónica"
"Interfaz para generar PDF de Factura Electrónica"
_public_methods_ = ['CrearFactura',
'AgregarDetalleItem', 'AgregarIva', 'AgregarTributo',
'AgregarCmpAsoc', 'AgregarPermiso',
Expand Down Expand Up @@ -151,7 +151,7 @@ def DebugLog(self):
msg = self.log.getvalue()
return msg

@inicializar_y_capturar_execepciones
@inicializar_y_capturar_excepciones
def CrearFactura(self, concepto=1, tipo_doc=80, nro_doc="", tipo_cbte=1, punto_vta=0,
cbte_nro=0, imp_total=0.00, imp_tot_conc=0.00, imp_neto=0.00,
imp_iva=0.00, imp_trib=0.00, imp_op_ex=0.00, fecha_cbte="", fecha_venc_pago="",
Expand Down Expand Up @@ -309,7 +309,7 @@ def digito_verificador_modulo10(self, codigo):
# Funciones públicas:


@inicializar_y_capturar_execepciones
@inicializar_y_capturar_excepciones
def CargarFormato(self, archivo=""):
"Cargo el formato de campos a generar desde una planilla CSV"
if not archivo:
Expand All @@ -334,7 +334,7 @@ def CargarFormato(self, archivo=""):
return True


@inicializar_y_capturar_execepciones
@inicializar_y_capturar_excepciones
def AgregarCampo(self, nombre, tipo, x1, y1, x2, y2,
font="Arial", size=12,
bold=False, italic=False, underline=False,
Expand All @@ -357,7 +357,7 @@ def AgregarCampo(self, nombre, tipo, x1, y1, x2, y2,
self.elements.append(field)


@inicializar_y_capturar_execepciones
@inicializar_y_capturar_excepciones
def CrearPlantilla(self, papel="A4", orientacion="portrait"):
"Iniciar la creación del archivo PDF"

Expand All @@ -379,7 +379,7 @@ def CrearPlantilla(self, papel="A4", orientacion="portrait"):
self.template = t


@inicializar_y_capturar_execepciones
@inicializar_y_capturar_excepciones
def ProcesarPlantilla(self, num_copias=1, lineas_max=24, qty_pos='izq'):
"Generar el PDF según la factura creada y plantilla cargada"

Expand Down
2 changes: 1 addition & 1 deletion wsaa.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def call_wsaa(cms, location = WSAAURL, proxy=None, trace=False):


class WSAA:
"Interfase para el WebService de Autenticación y Autorización"
"Interfaz para el WebService de Autenticación y Autorización"
_public_methods_ = ['CreateTRA', 'SignTRA', 'CallWSAA', 'LoginCMS', 'Conectar',
'AnalizarXml', 'ObtenerTagXml', 'Expirado',
]
Expand Down
42 changes: 21 additions & 21 deletions wsfev1.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
WSDL="https://wswhomo.afip.gov.ar/wsfev1/service.asmx?WSDL"


def inicializar_y_capturar_execepciones(func):
def inicializar_y_capturar_excepciones(func):
"Decorador para inicializar y capturar errores"
def capturar_errores_wrapper(self, *args, **kwargs):
try:
Expand Down Expand Up @@ -87,7 +87,7 @@ def capturar_errores_wrapper(self, *args, **kwargs):


class WSFEv1:
"Interfase para el WebService de Factura Electrónica Version 1"
"Interfaz para el WebService de Factura Electrónica Version 1"
_public_methods_ = ['CrearFactura', 'AgregarIva', 'CAESolicitar',
'AgregarTributo', 'AgregarCmpAsoc',
'CompUltimoAutorizado', 'CompConsultar',
Expand Down Expand Up @@ -182,7 +182,7 @@ def DebugLog(self):
msg = u''
return msg

@inicializar_y_capturar_execepciones
@inicializar_y_capturar_excepciones
def Conectar(self, cache=None, wsdl=None, proxy="", wrapper=None, cacert=None):
# cliente soap del web service
if wrapper:
Expand All @@ -208,7 +208,7 @@ def Conectar(self, cache=None, wsdl=None, proxy="", wrapper=None, cacert=None):
trace = "--trace" in sys.argv)
return True

@inicializar_y_capturar_execepciones
@inicializar_y_capturar_excepciones
def Dummy(self):
"Obtener el estado de los servidores de la AFIP"
result = self.client.FEDummy()['FEDummyResult']
Expand Down Expand Up @@ -265,7 +265,7 @@ def AgregarIva(self, iva_id=0, base_imp=0.0, importe=0.0, **kwarg):
self.factura['iva'].append(iva)
return True

@inicializar_y_capturar_execepciones
@inicializar_y_capturar_excepciones
def CAESolicitar(self):
f = self.factura
ret = self.client.FECAESolicitar(
Expand Down Expand Up @@ -360,7 +360,7 @@ def CAESolicitar(self):
self.__analizar_errores(result)
return self.CAE

@inicializar_y_capturar_execepciones
@inicializar_y_capturar_excepciones
def CompTotXRequest(self):
ret = self.client.FECompTotXRequest (
Auth={'Token': self.Token, 'Sign': self.Sign, 'Cuit': self.Cuit},
Expand All @@ -369,7 +369,7 @@ def CompTotXRequest(self):
result = ret['FECompTotXRequestResult']
return result['RegXReq']

@inicializar_y_capturar_execepciones
@inicializar_y_capturar_excepciones
def CompUltimoAutorizado(self, tipo_cbte, punto_vta):
ret = self.client.FECompUltimoAutorizado(
Auth={'Token': self.Token, 'Sign': self.Sign, 'Cuit': self.Cuit},
Expand All @@ -382,7 +382,7 @@ def CompUltimoAutorizado(self, tipo_cbte, punto_vta):
self.__analizar_errores(result)
return self.CbteNro is not None and str(self.CbteNro) or ''

@inicializar_y_capturar_execepciones
@inicializar_y_capturar_excepciones
def CompConsultar(self, tipo_cbte, punto_vta, cbte_nro, reproceso=False):
difs = [] # si hay reproceso, verifico las diferencias con AFIP

Expand Down Expand Up @@ -501,7 +501,7 @@ def verifica(ver_list,res_dict):
return ''


@inicializar_y_capturar_execepciones
@inicializar_y_capturar_excepciones
def CAESolicitarLote(self):
f = self.factura
ret = self.client.FECAESolicitar(
Expand Down Expand Up @@ -591,7 +591,7 @@ def CAESolicitarLote(self):
return self.CAE


@inicializar_y_capturar_execepciones
@inicializar_y_capturar_excepciones
def CAEASolicitar(self, periodo, orden):
ret = self.client.FECAEASolicitar(
Auth={'Token': self.Token, 'Sign': self.Sign, 'Cuit': self.Cuit},
Expand All @@ -616,7 +616,7 @@ def CAEASolicitar(self, periodo, orden):
return self.CAEA and str(self.CAEA) or ''


@inicializar_y_capturar_execepciones
@inicializar_y_capturar_excepciones
def CAEAConsultar(self, periodo, orden):
"Método de consulta de CAEA"
ret = self.client.FECAEAConsultar(
Expand All @@ -641,7 +641,7 @@ def CAEAConsultar(self, periodo, orden):

return self.CAEA and str(self.CAEA) or ''

@inicializar_y_capturar_execepciones
@inicializar_y_capturar_excepciones
def CAEARegInformativo(self):
"Método para informar comprobantes emitidos con CAEA"
f = self.factura
Expand Down Expand Up @@ -731,7 +731,7 @@ def CAEARegInformativo(self):
self.__analizar_errores(result)
return self.CAEA

@inicializar_y_capturar_execepciones
@inicializar_y_capturar_excepciones
def ParamGetTiposCbte(self):
"Recuperador de valores referenciales de códigos de Tipos de Comprobantes"
ret = self.client.FEParamGetTiposCbte(
Expand All @@ -741,7 +741,7 @@ def ParamGetTiposCbte(self):
return [u"%(Id)s: %(Desc)s (%(FchDesde)s-%(FchHasta)s)" % p['CbteTipo']
for p in res['ResultGet']]

@inicializar_y_capturar_execepciones
@inicializar_y_capturar_excepciones
def ParamGetTiposConcepto(self):
"Recuperador de valores referenciales de códigos de Tipos de Conceptos"
ret = self.client.FEParamGetTiposConcepto(
Expand All @@ -752,7 +752,7 @@ def ParamGetTiposConcepto(self):
for p in res['ResultGet']]


@inicializar_y_capturar_execepciones
@inicializar_y_capturar_excepciones
def ParamGetTiposDoc(self):
"Recuperador de valores referenciales de códigos de Tipos de Documentos"
ret = self.client.FEParamGetTiposDoc(
Expand All @@ -762,7 +762,7 @@ def ParamGetTiposDoc(self):
return [u"%(Id)s: %(Desc)s (%(FchDesde)s-%(FchHasta)s)" % p['DocTipo']
for p in res['ResultGet']]

@inicializar_y_capturar_execepciones
@inicializar_y_capturar_excepciones
def ParamGetTiposIva(self):
"Recuperador de valores referenciales de códigos de Tipos de Alícuotas"
ret = self.client.FEParamGetTiposIva(
Expand All @@ -772,7 +772,7 @@ def ParamGetTiposIva(self):
return [u"%(Id)s: %(Desc)s (%(FchDesde)s-%(FchHasta)s)" % p['IvaTipo']
for p in res['ResultGet']]

@inicializar_y_capturar_execepciones
@inicializar_y_capturar_excepciones
def ParamGetTiposMonedas(self):
"Recuperador de valores referenciales de códigos de Monedas"
ret = self.client.FEParamGetTiposMonedas(
Expand All @@ -782,7 +782,7 @@ def ParamGetTiposMonedas(self):
return [u"%(Id)s: %(Desc)s (%(FchDesde)s-%(FchHasta)s)" % p['Moneda']
for p in res['ResultGet']]

@inicializar_y_capturar_execepciones
@inicializar_y_capturar_excepciones
def ParamGetTiposOpcional(self):
"Recuperador de valores referenciales de códigos de Tipos de datos opcionales"
ret = self.client.FEParamGetTiposOpcional(
Expand All @@ -792,7 +792,7 @@ def ParamGetTiposOpcional(self):
return [u"%(Id)s: %(Desc)s (%(FchDesde)s-%(FchHasta)s)" % p['OpcionalTipo']
for p in res.get('ResultGet', [])]

@inicializar_y_capturar_execepciones
@inicializar_y_capturar_excepciones
def ParamGetTiposTributos(self):
"Recuperador de valores referenciales de códigos de Tipos de Tributos"
"Este método permite consultar los tipos de tributos habilitados en este WS"
Expand All @@ -803,7 +803,7 @@ def ParamGetTiposTributos(self):
return [u"%(Id)s: %(Desc)s (%(FchDesde)s-%(FchHasta)s)" % p['TributoTipo']
for p in res['ResultGet']]

@inicializar_y_capturar_execepciones
@inicializar_y_capturar_excepciones
def ParamGetCotizacion(self, moneda_id):
"Recuperador de cotización de moneda"
ret = self.client.FEParamGetCotizacion(
Expand All @@ -814,7 +814,7 @@ def ParamGetCotizacion(self, moneda_id):
res = ret['FEParamGetCotizacionResult']['ResultGet']
return str(res.get('MonCotiz',""))

@inicializar_y_capturar_execepciones
@inicializar_y_capturar_excepciones
def ParamGetPtosVenta(self):
"Recuperador de valores referenciales Puntos de Venta registrados"
ret = self.client.FEParamGetPtosVenta(
Expand Down
Loading

0 comments on commit 2429850

Please sign in to comment.