Merge branch 'master' of http://rpimienta@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -1185,12 +1185,19 @@
|
||||
|
||||
<asp:TemplateField HeaderText="Cancelar" Visible="true" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15%">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkCancelarComplemetno" OnClick="LnkCancelarComplemetno_Click" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Regenerar"
|
||||
<asp:LinkButton ID="LnkCancelarComplemetno" OnClick="LnkCancelarComplemetno_Click" runat="server" AlternateText="Editar" CausesValidation="False"
|
||||
data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea cancelar el complemento?" data-btn-ok-label="si"
|
||||
CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-minus'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<%-- <asp:TemplateField HeaderText="EstatusSAT" Visible="true" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15%">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEstatusSAT" OnClick="LnkEstatusSAT_Click" runat="server" AlternateText="Editar" CausesValidation="False"
|
||||
CssClass="btn btn-circle btn-sm blue" Text="<i class='fa fa-question'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>--%>
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
|
||||
@@ -501,6 +501,7 @@ Partial Class Bancos_IE
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
|
||||
If Not IsPostBack Then
|
||||
|
||||
Folio = ""
|
||||
@@ -3916,9 +3917,10 @@ Partial Class Bancos_IE
|
||||
If CancelarComplemento Then
|
||||
Dim ObjCancelacion As New Timbrado
|
||||
'Dim ObjBanco As New ClsBancos
|
||||
If ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscalCancelar, 0, RFCReceptorCancelar, UsuarioActual.Empresa.RFC, CvePACCancelacion) Then
|
||||
|
||||
If Banc.UpdateComplementoPago(CveComplementoPagoCancelar, "-1", -1, UsuarioActual.CveEmpresa, 2, CvePACCancelacion, FechaCancelacion:=ObjCancelacion.CancelacionFecha, SelloCancelacion:=ObjCancelacion.CancelacionAcuse) Then
|
||||
If EstatusSATCancelado(FolioFiscalCancelar, UsuarioActual.Empresa.RFC, RFCReceptorCancelar) Then
|
||||
|
||||
If Banc.UpdateComplementoPago(CveComplementoPagoCancelar, "-1", -1, UsuarioActual.CveEmpresa, 2, CvePACCancelacion, FechaCancelacion:=Date.Now, SelloCancelacion:="") Then
|
||||
CargaComplementosPago()
|
||||
RegistraScript("$('#ModalCancelarComplemetno').modal('hide');")
|
||||
ErrorCancelarComplemento = False
|
||||
@@ -3926,8 +3928,22 @@ Partial Class Bancos_IE
|
||||
End If
|
||||
|
||||
Else
|
||||
Alert("Se presento un error al cancelar el complemento.", TipoMensaje.MsgAdvertencia)
|
||||
If ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscalCancelar, 0, RFCReceptorCancelar, UsuarioActual.Empresa.RFC, CvePACCancelacion) Then
|
||||
|
||||
If Banc.UpdateComplementoPago(CveComplementoPagoCancelar, "-1", -1, UsuarioActual.CveEmpresa, 2, CvePACCancelacion, FechaCancelacion:=ObjCancelacion.CancelacionFecha, SelloCancelacion:=ObjCancelacion.CancelacionAcuse) 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)
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
Else
|
||||
ErrorCancelarComplemento = False
|
||||
End If
|
||||
@@ -5538,39 +5554,34 @@ Partial Class Bancos_IE
|
||||
RFCReceptorCancelar = GvRow.DataKey("RFCReceptor")
|
||||
CvePACCancelacion = GvRow.DataKey("CvePAC").ToEntero
|
||||
|
||||
|
||||
Dim ObjCancelacion As New Timbrado
|
||||
Dim ObjBanco As New ClsBancos
|
||||
|
||||
If ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscalCancelar, 0, RFCReceptorCancelar, UsuarioActual.Empresa.RFC, CvePACCancelacion) Then
|
||||
|
||||
If ObjBanco.UpdateComplementoPago(CveComplementoPagoCancelar, "-1", -1, UsuarioActual.CveEmpresa, 2, CvePACCancelacion, FechaCancelacion:=ObjCancelacion.CancelacionFecha, SelloCancelacion:=ObjCancelacion.CancelacionAcuse) Then
|
||||
|
||||
If EstatusSATCancelado(FolioFiscalCancelar, UsuarioActual.Empresa.RFC, RFCReceptorCancelar) Then
|
||||
|
||||
If ObjBanco.UpdateComplementoPago(CveComplementoPagoCancelar, "-1", -1, UsuarioActual.CveEmpresa, 2, CvePACCancelacion, FechaCancelacion:=Date.Now, SelloCancelacion:="") Then
|
||||
CargaComplementosPago()
|
||||
|
||||
' RegistraScript("$('#ModalCancelarComplemetno').modal('hide');")
|
||||
Alert("El complemento se cancelo correctamente.")
|
||||
End If
|
||||
|
||||
Else
|
||||
Alert("Se presento un error al cancelar el complemento.")
|
||||
|
||||
If ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscalCancelar, 0, RFCReceptorCancelar, UsuarioActual.Empresa.RFC, CvePACCancelacion) Then
|
||||
|
||||
If ObjBanco.UpdateComplementoPago(CveComplementoPagoCancelar, "-1", -1, UsuarioActual.CveEmpresa, 2, CvePACCancelacion, FechaCancelacion:=ObjCancelacion.CancelacionFecha, SelloCancelacion:=ObjCancelacion.CancelacionAcuse) Then
|
||||
|
||||
Alert("El complemento se cancelo correctamente.")
|
||||
End If
|
||||
Else
|
||||
Alert("Se presento un error al cancelar el complemento.", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
ObjBanco.Dispose()
|
||||
|
||||
|
||||
'' INICIO Version 2
|
||||
'CveComplementoPagoCancelar = GvRow.DataKey("CveComplementoPago").ToEntero
|
||||
'FolioFiscalCancelar = GvRow.DataKey("FolioFiscal").ToString
|
||||
'' Dim RFCEmisor As String = UsuarioActual.Empresa.RFC
|
||||
'RFCReceptorCancelar = GvRow.DataKey("RFCReceptor")
|
||||
'CvePACCancelacion = GvRow.DataKey("CvePAC").ToEntero
|
||||
|
||||
'RegistraScript("$('#ModalCancelarComplemetno').modal('show');")
|
||||
|
||||
'RdlCancelarComplemento.SelectedValue = "1"
|
||||
'DivFechaCancelación.Visible = False
|
||||
'UpModalCancelarComplemetno.Update()
|
||||
'' FIN Version 2
|
||||
CargaComplementosPago()
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -5703,4 +5714,44 @@ Partial Class Bancos_IE
|
||||
|
||||
End Sub
|
||||
|
||||
'Protected Sub LnkEstatusSAT_Click(sender As Object, e As EventArgs)
|
||||
|
||||
' Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).BindingContainer, GridViewRow)
|
||||
|
||||
' Dim FolioFiscal As String = GvRow.DataKey("FolioFiscal").ToString
|
||||
' Dim RFCReceptor As String = GvRow.DataKey("RFCReceptor")
|
||||
|
||||
|
||||
' EstatusSATCancelado(FolioFiscal, UsuarioActual.Empresa.RFC, RFCReceptor)
|
||||
|
||||
' 'Dim Vigencia = Timbrado.VerificarVigenciaSAT(FolioFiscal, UsuarioActual.Empresa.RFC, RFCReceptor, "0", True)
|
||||
|
||||
' 'If Vigencia IsNot Nothing Then
|
||||
' ' Alert($"Estatus SAT: { Vigencia.Estado }")
|
||||
' 'End If
|
||||
|
||||
'End Sub
|
||||
|
||||
|
||||
Function EstatusSATCancelado(FolioFiscal As String, RFCDe As String, RFCReceptor As String) As Boolean
|
||||
|
||||
Dim respuesta As Boolean = False
|
||||
|
||||
Dim Vigencia = Timbrado.VerificarVigenciaSAT(FolioFiscal, RFCDe, RFCReceptor, "0", True)
|
||||
|
||||
If Vigencia IsNot Nothing Then
|
||||
If Vigencia.Estado.ToUpper = "CANCELADO" Then
|
||||
respuesta = True
|
||||
Else
|
||||
respuesta = False
|
||||
End If
|
||||
Else
|
||||
respuesta = False
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Return respuesta
|
||||
End Function
|
||||
|
||||
End Class
|
||||
Reference in New Issue
Block a user