Skip to content

Commit

Permalink
WSFEXv1: ajustes menores y actualización
Browse files Browse the repository at this point in the history
  • Loading branch information
reingart committed Mar 28, 2016
1 parent 1fa187a commit 93afbfb
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions ejemplos/wsfexv1/wsfexv1.prg
Expand Up @@ -30,7 +30,7 @@ ta = WSAA.LoginCMS(cms)
ON ERROR DO errhand2;

*-- Crear objeto interface Web Service de Factura Electrónica Exportación
WSFEX = CREATEOBJECT("WSFEX")
WSFEX = CREATEOBJECT("WSFEXv1")

? WSFEX.Version
? WSFEX.InstallDir
Expand All @@ -45,7 +45,7 @@ WSFEX.Cuit = "20267565393"
*-- Conectar al Servicio Web de Facturación
*-- Producción usar:
*-- ok = WSFEX.Conectar("", "https://servicios1.afip.gov.ar/WSFEXv1/service.asmx?WSDL") && Producción
ok = WSFEX.Conectar("") && Homologación
ok = WSFEX.Conectar("", "https://wswhomo.afip.gov.ar/WSFEXv1/service.asmx?WSDL") && Homologación

? WSFEX.DebugLog()

Expand All @@ -62,6 +62,11 @@ punto_vta = 1
LastCBTE = WSFEX.GetLastCMP(tipo_cbte, punto_vta)
? "Ult. Cbte:", LastCBTE

IF ISNULL(LastCBTE) THEN
MESSAGEBOX("No se pudo obtener el ult. nro de comprobante. ErrMsg: " + WSFEX.ErrMsg + " Excepcion: " + WSFEX.Excepcion, 0)
CANCEL
ENDIF

*-- Establezco los valores de la factura o lote a autorizar:
tipo_expo = 1 && tipo de exportación (ver tabla de parámetros)
fecha_cbte = STRTRAN(STR(YEAR(DATE()),4) + STR(MONTH(DATE()),2) + STR(DAY(DATE()),2)," ","0")
Expand Down

0 comments on commit 93afbfb

Please sign in to comment.