rem remito cárnico
Dim fe As New WSAFIPFE.Factura
Dim bresultado As Boolean = True
If fe.iniciar(0, "cuit", "ruta y archivo al certificado AFIP *.pfx", "archivo de licencia no es necesario en modo prueba") Then
fe.ArchivoCertificadoPassword = "contraseña generada al crear *.pfx"
If fe.rcObtenerTicketAcceso() Then
bresultado = True
bresultado = fe.rcCargarPropiedad("LIMPIAR", "", 0, 0)
bresultado = bresultado And fe.rcCargarPropiedad("RegistrarRecepcionMercaderia.itemcantidad", "2", 0, 0)
bresultado = bresultado And fe.rcCargarPropiedad("RegistrarRecepcionMercaderia.kilos", "10.15", 0, 0)
bresultado = bresultado And fe.rcCargarPropiedad("RegistrarRecepcionMercaderia.orden", "5", 0, 0)
bresultado = bresultado And fe.rcCargarPropiedad("RegistrarRecepcionMercaderia.unidades", "1", 0, 0)
bresultado = bresultado And fe.rcCargarPropiedad("RegistrarRecepcionMercaderia.kilos", "10.15", 1, 0)
bresultado = bresultado And fe.rcCargarPropiedad("RegistrarRecepcionMercaderia.orden", "6", 1, 0)
bresultado = bresultado And fe.rcCargarPropiedad("RegistrarRecepcionMercaderia.unidades", "2", 01 0)
fe.ArchivoXMLEnviado = "d:\rcrecibir.xml"
fe.ArchivoXMLRecibido = "d:\rcrecibirecibo.xml"
If bresultado Then
bresultado = fe.rcRegistrarRecepcion("estado: ACE, ACP, NAC,PEN", "codigo remito", "codigo categoria receptor")
rem estado ACT (aceptacion total no es necesario informar la tabla de mercaderias)
rem ACP (aceptación parcial, es necesario informar la tabla de mercaderias)
REM NAC (no aceptación, rechazo)
REM PEN (pendiente)
If fe.UltimoMensajeError = "" And fe.rcErrorDescripcion1 = "" Then
MsgBox("resultado " + fe.rcLeerPropiedad("rcRegistrarRecepcion", "resultado", "", 0, 0))
Else
MsgBox("error leer" + fe.UltimoMensajeError)
MsgBox("error del servidor " + fe.rcErrorDescripcion1)
End If
Else
MsgBox("fallo cargar propiedad " + fe.UltimoMensajeError)
End If
Else
MsgBox("fallo acceso " + fe.UltimoMensajeError)
End If
Else
MsgBox("fallo iniciar " + fe.UltimoMensajeError)
End If
rem remito harinero
Dim fe As New WSAFIPFE.Factura
Dim bresultado As Boolean = True
If fe.iniciar(0, "cuit", "ruta y archivo al certificado AFIP *.pfx", "archivo de licencia no es necesario en modo prueba") Then
fe.rcversion = 1
fe.ArchivoCertificadoPassword = "contraseña generada al crear *.pfx"
If fe.rcObtenerTicketAcceso() Then
fe.ArchivoXMLEnviado = "d:\rcrecibir.xml"
fe.ArchivoXMLRecibido = "d:\rcrecibirecibo.xml"
bresultado = fe.rcCargarPropiedad("LIMPIAR", "", 0, 0)
bresultado = bresultado And fe.rcCargarPropiedad("RegistrarRecepcionMercaderia.itemcantidad", "2", 0, 0)
bresultado = bresultado And fe.rcCargarPropiedad("RegistrarRecepcionMercaderia.pesoNetoKG", "10.15", 0, 0)
bresultado = bresultado And fe.rcCargarPropiedad("RegistrarRecepcionMercaderia.orden", "5", 0, 0)
bresultado = bresultado And fe.rcCargarPropiedad("RegistrarRecepcionMercaderia.pesoNetoKG", "10.15", 1, 0)
bresultado = bresultado And fe.rcCargarPropiedad("RegistrarRecepcionMercaderia.orden", "5", 1, 0)
If bresultado Then
bresultado = fe.rcRegistrarRecepcion("ACP", "5233", "20190913")
If fe.UltimoMensajeError = "" And fe.rcErrorDescripcion1 = "" Then
MsgBox("resultado " + fe.rcLeerPropiedad("rcRegistrarRecepcion", "resultado", "", 0, 0))
MsgBox(fe.UltimoMensajeError)
Else
MsgBox("error leer" + fe.UltimoMensajeError)
MsgBox("error del servidor " + fe.rcErrorDescripcion1)
End If
Else
MsgBox("fallo cargar propiedad " + fe.UltimoMensajeError)
End If
Else
MsgBox("fallo acceso " + fe.UltimoMensajeError)
End If
Else
MsgBox("fallo iniciar " + fe.UltimoMensajeError)
End If
rem remito azucarero
Dim fe As New WSAFIPFE.Factura
Dim bresultado As Boolean = True
Dim strticket As String = ""
Dim cnumero As String = ""
If fe.iniciar(0, "cuit", "ruta certifciado pfx", "") Then
fe.rcVersion = 2
fe.ArchivoXMLEnviado = "d:\rarecpenvi.xml"
fe.ArchivoXMLRecibido = "d:\rarecep.xml"
fe.ArchivoCertificadoPassword = ""
If fe.rcObtenerTicketAcceso() Then
bresultado = fe.rcCargarPropiedad("LIMPIAR", "", 0, 0)
bresultado = bresultado And fe.rcCargarPropiedad("RegistrarRecepcionMercaderia.itemcantidad", "2", 0, 0)
bresultado = bresultado And fe.rcCargarPropiedad("RegistrarRecepcionMercaderia.cantidad", "10.15", 0, 0)
bresultado = bresultado And fe.rcCargarPropiedad("RegistrarRecepcionMercaderia.orden", "1", 0, 0)
bresultado = bresultado And fe.rcCargarPropiedad("RegistrarRecepcionMercaderia.cantidad", "11.15", 1, 0)
bresultado = bresultado And fe.rcCargarPropiedad("RegistrarRecepcionMercaderia.orden", "2", 1, 0)
If bresultado Then
bresultado = fe.rcRegistrarRecepcion("SI", "5233", "OBSERVACION")
If fe.UltimoMensajeError = "" And fe.rcErrorDescripcion1 = "" Then
MsgBox("resultado " + fe.rcLeerPropiedad("rcRegistrarRecepcion", "resultado", "", 0, 0))
Else
MsgBox("error leer" + fe.UltimoMensajeError)
MsgBox("error ller servidor " + fe.rcErrorDescripcion1)
End If
Else
MsgBox("fallo cargar propiedad " + fe.UltimoMensajeError)
End If
Else
MsgBox("fallo acceso " + fe.UltimoMensajeError)
End If
Else
MsgBox("fallo iniciar " + fe.UltimoMensajeError)
End If