FeCred Rechazar NC

Método que permite al Comprador rechazar Notas de Débito / Crédito individualmente

mientras la Factura de Crédito no haya sido Aceptada o Rechazada. Al rechazarla no

afectará a la Cta Cte. Debe indicar al menos un motivo de rechazo y justificarlo.

Dim fe As New WSAFIPFE.Factura

Dim bresultado As Boolean = True

If fe.iniciar(0, "cuit", "certificado pfx", "archivo licencia modo real") Then

fe.ArchivoCertificadoPassword = ""

If fe.fecObtenerTicketAcceso() Then

fe.ArchivoXMLRecibido = "d:\fecrecibido.xml"

fe.ArchivoXMLEnviado = "d:\fecenviado.xml"

bresultado = fe.fecCargarPropiedad("LIMPIAR", "", 0, 0)

bresultado = bresultado And fe.fecCargarPropiedad("idComprobante.codTipoCmp", "1", 0, 0)

bresultado = bresultado And fe.fecCargarPropiedad("idComprobante.CUITEmisor", "13636364", 0, 0)

bresultado = bresultado And fe.fecCargarPropiedad("idComprobante.nroCmp", "5", 0, 0)

bresultado = bresultado And fe.fecCargarPropiedad("idComprobante.ptoVta", "5", 0, 0)

bresultado = bresultado And fe.fecCargarPropiedad("MotivoRechazo.itemcantidad", "1", 0, 0)

bresultado = bresultado And fe.fecCargarPropiedad("motivoRechazo.codMotivo", "5", 0, 0)

bresultado = bresultado And fe.fecCargarPropiedad("motivoRechazo.descMotivo", "prueba", 0, 0)

bresultado = bresultado And fe.fecCargarPropiedad("motivoRechazo.justificacion", "prueba", 0, 0)

If bresultado Then

bresultado = fe.fecrechazarNotaDC()

If fe.UltimoMensajeError = "" And fe.fecErrorDescripcion1 = "" Then

MsgBox(fe.fecLeerPropiedad("fecrechazarNotaDC", "resultado", "", 0, 0))

Else

MsgBox("error leer ctactes" + fe.UltimoMensajeError)

MsgBox("error ller servidor ctactes " + fe.fecErrorDescripcion1)

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