Folio fiscal de complemento de pago al cancelar IE
This commit is contained in:
@@ -4503,37 +4503,60 @@ Partial Class Bancos_IE
|
|||||||
|
|
||||||
If CveMotivoCancelacion > 0 AndAlso CveSATMotivoCancelacion > 0 Then
|
If CveMotivoCancelacion > 0 AndAlso CveSATMotivoCancelacion > 0 Then
|
||||||
|
|
||||||
Dim ObjCancelacion As New Timbrado
|
Dim DtComplementos As DataTable = Nothing
|
||||||
If EstatusSATCancelado(FolioFiscalCancelar, UsuarioActual.Empresa.RFC, RFCReceptorCancelar) Then
|
If CveIE > 0 AndAlso Banc.GetComplementoPagos(-1, CveIE, -1, UsuarioActual.CveEmpresa) Then
|
||||||
|
DtComplementos = Banc.DtResultados.FiltraParametros(" Estatus IN(1,3) ")
|
||||||
|
End If
|
||||||
|
|
||||||
If Banc.UpdateComplementoPagoCancelado(CveComplementoPagoCancelar, 2, CvePACCancelacion, UsuarioActual.CveEmpresa, Date.Now, "", 1) Then
|
For Each RowComplemento As DataRow In DtComplementos.Rows
|
||||||
CargaComplementosPago()
|
|
||||||
RegistraScript("$('#ModalCancelarComplemetno').modal('hide');")
|
|
||||||
ErrorCancelarComplemento = False
|
|
||||||
Alert("El complemento se cancelo correctamente.")
|
|
||||||
End If
|
|
||||||
|
|
||||||
Else
|
CveComplementoPagoCancelar = RowComplemento("CveComplementoPago").ToString().ToEntero()
|
||||||
Dim respCancelacion = ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscalCancelar, 0, RFCReceptorCancelar, UsuarioActual.Empresa.RFC, CvePACCancelacion, CveSATMotivoCancelacion:=CveSATMotivoCancelacion)
|
FolioFiscalCancelar = RowComplemento("FolioFiscal").ToString()
|
||||||
If respCancelacion.Verificado Then
|
'' Dim RFCEmisor As String = UsuarioActual.Empresa.RFC
|
||||||
|
RFCReceptorCancelar = RowComplemento("RFCReceptor").ToString()
|
||||||
|
CvePACCancelacion = RowComplemento("CvePAC").ToString().ToEntero()
|
||||||
|
|
||||||
If Banc.UpdateComplementoPagoCancelado(CveComplementoPagoCancelar, 2, CvePACCancelacion, UsuarioActual.CveEmpresa, FechaCancelacion:=ObjCancelacion.CancelacionFecha, SelloCancelacion:=ObjCancelacion.CancelacionAcuse, CveSATMotivoCancelacion:=CveSATMotivoCancelacion) Then
|
Dim ObjCancelacion As New Timbrado
|
||||||
|
If EstatusSATCancelado(FolioFiscalCancelar, UsuarioActual.Empresa.RFC, RFCReceptorCancelar) Then
|
||||||
|
|
||||||
|
If Banc.UpdateComplementoPagoCancelado(CveComplementoPagoCancelar, 2, CvePACCancelacion, UsuarioActual.CveEmpresa, Date.Now, "", 1) Then
|
||||||
CargaComplementosPago()
|
CargaComplementosPago()
|
||||||
RegistraScript("$('#ModalCancelarComplemetno').modal('hide');")
|
RegistraScript("$('#ModalCancelarComplemetno').modal('hide');")
|
||||||
ErrorCancelarComplemento = False
|
ErrorCancelarComplemento = False
|
||||||
Alert("El complemento se cancelo correctamente.")
|
Alert("El complemento se cancelo correctamente.")
|
||||||
|
Else
|
||||||
|
ErrorCancelarComplemento = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
Alert("Se presento un error al cancelar el complemento.", TipoMensaje.MsgAdvertencia)
|
Dim respCancelacion = ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscalCancelar, 0, RFCReceptorCancelar, UsuarioActual.Empresa.RFC, CvePACCancelacion, CveSATMotivoCancelacion:=CveSATMotivoCancelacion)
|
||||||
|
If respCancelacion.Verificado Then
|
||||||
|
|
||||||
|
If Banc.UpdateComplementoPagoCancelado(CveComplementoPagoCancelar, 2, CvePACCancelacion, UsuarioActual.CveEmpresa, FechaCancelacion:=ObjCancelacion.CancelacionFecha, SelloCancelacion:=ObjCancelacion.CancelacionAcuse, CveSATMotivoCancelacion:=CveSATMotivoCancelacion) Then
|
||||||
|
CargaComplementosPago()
|
||||||
|
RegistraScript("$('#ModalCancelarComplemetno').modal('hide');")
|
||||||
|
ErrorCancelarComplemento = False
|
||||||
|
Alert("El complemento se cancelo correctamente.")
|
||||||
|
End If
|
||||||
|
|
||||||
|
Else
|
||||||
|
Alert("Se presento un error al cancelar el complemento.", TipoMensaje.MsgAdvertencia)
|
||||||
|
ErrorCancelarComplemento = True
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Next
|
||||||
|
|
||||||
|
If DtComplementos IsNot Nothing Then
|
||||||
|
DtComplementos.Dispose()
|
||||||
|
DtComplementos = Nothing
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Else
|
||||||
|
ErrorCancelarComplemento = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Else
|
Else
|
||||||
ErrorCancelarComplemento = False
|
ErrorCancelarComplemento = False
|
||||||
End If
|
End If
|
||||||
|
|||||||
Reference in New Issue
Block a user