Cancelacion de complemento junto con el IE
This commit is contained in:
@@ -55,7 +55,7 @@
|
|||||||
</li>--%>
|
</li>--%>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<asp:LinkButton ID="LnkCancelarComplementoImporte" OnClick="LnkCancelarComplementoImporte_Click" runat="server" Visible="false" data-btn-ok-label="si" Style="color: #686868;" data-toggle="tooltip" data-placement="left" title="Cancelar Movimiento y Complemento" > <i class="fa fa-pencil"></i> Cancelar Movimiento y Complemento</asp:LinkButton>
|
<%--<asp:LinkButton ID="LnkCancelarComplementoImporte" OnClick="LnkCancelarComplementoImporte_Click" runat="server" Visible="false" data-btn-ok-label="si" Style="color: #686868;" data-toggle="tooltip" data-placement="left" title="Cancelar Movimiento y Complemento" > <i class="fa fa-pencil"></i> Cancelar Movimiento y Complemento</asp:LinkButton>--%>
|
||||||
|
|
||||||
<%-- data-original-title="¿Está seguro que desea cancelar el documento?" data-btn-ok-label="si" Style="color: #686868;"><i class="fa fa-pencil"--%>
|
<%-- data-original-title="¿Está seguro que desea cancelar el documento?" data-btn-ok-label="si" Style="color: #686868;"><i class="fa fa-pencil"--%>
|
||||||
|
|
||||||
@@ -150,6 +150,7 @@
|
|||||||
|
|
||||||
<div class="col-md-2" runat="server" id="DivTC" visible="false">
|
<div class="col-md-2" runat="server" id="DivTC" visible="false">
|
||||||
T.C.:
|
T.C.:
|
||||||
|
|
||||||
<asp:TextBox ID="TxtTC" runat="server" Text="1" placeholder="Tipo de Cambio" CssClass="form-control input-sm" MaxLength="12" onblur="CambiaTCPagoOC();" Width="70px" ClientIDMode="Static" Style="text-align: right; display: inline-block;" />
|
<asp:TextBox ID="TxtTC" runat="server" Text="1" placeholder="Tipo de Cambio" CssClass="form-control input-sm" MaxLength="12" onblur="CambiaTCPagoOC();" Width="70px" ClientIDMode="Static" Style="text-align: right; display: inline-block;" />
|
||||||
<asp:RequiredFieldValidator ID="RFVTC" Enabled="false" runat="server" ControlToValidate="TxtTC" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Cambio''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RFVTC" Enabled="false" runat="server" ControlToValidate="TxtTC" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Cambio''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCETC" runat="server" HighlightCssClass="vco" TargetControlID="RFVTC" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCETC" runat="server" HighlightCssClass="vco" TargetControlID="RFVTC" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
@@ -161,9 +162,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-md-2" runat="server" id="DivTC2" visible="false">
|
<div class="col-md-2" runat="server" id="DivTC2" visible="false">
|
||||||
Dolares
|
Dolares
|
||||||
|
|
||||||
<asp:TextBox ID="TxtImporteDolares" runat="server" Text="1" placeholder="Dolares" CssClass="form-control input-sm" MaxLength="12" Width="70px" ClientIDMode="Static" Style="text-align: right; display: inline-block;" />
|
<asp:TextBox ID="TxtImporteDolares" runat="server" Text="1" placeholder="Dolares" CssClass="form-control input-sm" MaxLength="12" Width="70px" ClientIDMode="Static" Style="text-align: right; display: inline-block;" />
|
||||||
<%--<asp:Label ID="Label1" Text="" ClientIDMode="Static" runat="server" />--%>
|
<%--<asp:Label ID="Label1" Text="" ClientIDMode="Static" runat="server" />--%>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
@@ -1252,7 +1253,38 @@
|
|||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
<br />
|
||||||
|
<div class="row" id="DivCancelarComplemento" runat="server" Visible="false">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="portlet light xspadding bordered whitoutcol" style="width: 100%">
|
||||||
|
<div class="portlet-title">
|
||||||
|
<div class="caption font-green">
|
||||||
|
<i class="icon-pin font-green"></i>
|
||||||
|
<span class="caption-subject bold uppercase">Cancelar Complemento</span>
|
||||||
|
</div>
|
||||||
|
<div class="actions">
|
||||||
|
<div class="btn-group">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="tools">
|
||||||
|
<a href="javascript:;" class="collapse"></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="portlet-body ">
|
||||||
|
<div class="row" style="align-items: center; vertical-align: middle;">
|
||||||
|
<label class="col-md-3" style="max-width: 155px;">Motivo de cancelación:</label>
|
||||||
|
<div class="col-md-9">
|
||||||
|
<asp:DropDownList runat="server" id="DdlMotivoCancelacion" DataTextField="CodigoSATDescripcion" DataValueField="CveMotivoCancelacion" CssClass="select2me" Width="100%" >
|
||||||
|
</asp:DropDownList>
|
||||||
|
|
||||||
|
<asp:RequiredFieldValidator ID="RfvDdlMotivoCancelacion" runat="server" ControlToValidate="DdlMotivoCancelacion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Motivo de Cancelación''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpCancelarIE"></asp:RequiredFieldValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCERfvDdlMotivoCancelacion" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlMotivoCancelacion" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
@@ -1385,7 +1417,7 @@
|
|||||||
|
|
||||||
<asp:TemplateField HeaderText="Motivo" Visible="true" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="30%">
|
<asp:TemplateField HeaderText="Motivo" Visible="true" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="30%">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:DropDownList runat="server" id="DdlMotivoCancelacion" DataTextField="CodigoSATDescripcion" DataValueField="CveMotivoCancelacion" CssClass="form-control input-sm select2me" Visible ="false">
|
<asp:DropDownList runat="server" ID="DdlMotivoCancelacion" DataTextField="CodigoSATDescripcion" DataValueField="CveMotivoCancelacion" CssClass="form-control input-sm select2me" Visible="false">
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
<asp:Literal runat="server" ID="LtlMotivoCancelacion" Text='<%# Eval("MotivoCancelacion") %>'> </asp:Literal>
|
<asp:Literal runat="server" ID="LtlMotivoCancelacion" Text='<%# Eval("MotivoCancelacion") %>'> </asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
@@ -1406,7 +1438,6 @@
|
|||||||
CssClass="btn btn-circle btn-sm blue" Text="<i class='fa fa-question'></i>" />
|
CssClass="btn btn-circle btn-sm blue" Text="<i class='fa fa-question'></i>" />
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>--%>
|
</asp:TemplateField>--%>
|
||||||
|
|
||||||
</Columns>
|
</Columns>
|
||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
</div>
|
</div>
|
||||||
@@ -1547,7 +1578,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="ModalCancelarComplemetno" class="modal ADS fade" role="dialog">
|
<%-- <div id="ModalCancelarComplemetno" class="modal ADS fade" role="dialog">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
|
|
||||||
<!-- Modal content-->
|
<!-- Modal content-->
|
||||||
@@ -1563,13 +1594,6 @@
|
|||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
<%-- <p>¿Cual de las siguientes acciones es la que desea realizar?</p>
|
|
||||||
|
|
||||||
<asp:RadioButtonList runat="server" ID="RdlCancelarComplemento" OnSelectedIndexChanged="RdlCancelarComplemento_SelectedIndexChanged" AutoPostBack="true" RepeatDirection="Horizontal">
|
|
||||||
<asp:ListItem Value="1" Selected="True">Cancelar Complemento</asp:ListItem>
|
|
||||||
<asp:ListItem Value="2">Cancelar Pago y Complemento</asp:ListItem>
|
|
||||||
</asp:RadioButtonList>--%>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="row" runat="server" id="DivFechaCancelación" visible="true">
|
<div class="row" runat="server" id="DivFechaCancelación" visible="true">
|
||||||
|
|
||||||
@@ -1630,7 +1654,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>--%>
|
||||||
|
|
||||||
<div id="DModalDesconciliar" class="modal ADS fade" role="dialog">
|
<div id="DModalDesconciliar" class="modal ADS fade" role="dialog">
|
||||||
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpDesconciliar" UpdateMode="Conditional">
|
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpDesconciliar" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
|
|||||||
@@ -1120,7 +1120,8 @@ Partial Class Bancos_IE
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
'LnkCancelarComplemento.Visible = False
|
'LnkCancelarComplemento.Visible = False
|
||||||
LnkCancelarComplementoImporte.Visible = False
|
'LnkCancelarComplementoImporte.Visible = False
|
||||||
|
DivCancelarComplemento.Visible = False
|
||||||
UppEliminarIE.Update()
|
UppEliminarIE.Update()
|
||||||
|
|
||||||
|
|
||||||
@@ -1296,7 +1297,8 @@ Partial Class Bancos_IE
|
|||||||
'LnkCancelar.Visible = False
|
'LnkCancelar.Visible = False
|
||||||
|
|
||||||
'LnkCancelarComplemento.Visible = True
|
'LnkCancelarComplemento.Visible = True
|
||||||
LnkCancelarComplementoImporte.Visible = True
|
'LnkCancelarComplementoImporte.Visible = True
|
||||||
|
DivCancelarComplemento.Visible = True
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -1304,7 +1306,8 @@ Partial Class Bancos_IE
|
|||||||
Else
|
Else
|
||||||
BtnEditar.Visible = False
|
BtnEditar.Visible = False
|
||||||
' LnkCancelarComplemento.Visible = False
|
' LnkCancelarComplemento.Visible = False
|
||||||
LnkCancelarComplementoImporte.Visible = False
|
'LnkCancelarComplementoImporte.Visible = False
|
||||||
|
DivCancelarComplemento.Visible = False
|
||||||
DVGenerarComplementoModal.Visible = False
|
DVGenerarComplementoModal.Visible = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -4453,13 +4456,12 @@ Partial Class Bancos_IE
|
|||||||
Protected Sub BtnCancelarIE_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnCancelarIE_Click(sender As Object, e As EventArgs)
|
||||||
RegistraScript("$('#DivCancelarIE').modal('hide');")
|
RegistraScript("$('#DivCancelarIE').modal('hide');")
|
||||||
Dim ExistenComplementosVigentes As Boolean = VerificaComplementos(True)
|
Dim ExistenComplementosVigentes As Boolean = VerificaComplementos(True)
|
||||||
|
If ExistenComplementosVigentes AndAlso DdlMotivoCancelacion.SelectedValue.ToEntero() <= 0 Then
|
||||||
If Not ExistenComplementosVigentes Then
|
Alert("Debe seleccionar un motivo de cancelación", TipoMensaje.MsgError)
|
||||||
CancelarIE()
|
Exit Sub
|
||||||
Else
|
|
||||||
Alert("No se puede cancelar documento con complementos de pago vigentes", TipoMensaje.MsgError)
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
CancelarIE(CancelarComplemento:=ExistenComplementosVigentes)
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -4681,23 +4683,23 @@ Partial Class Bancos_IE
|
|||||||
Dim ObjCancelacion As New Timbrado
|
Dim ObjCancelacion As New Timbrado
|
||||||
If EstatusSATCancelado(FolioFiscalCancelar, UsuarioActual.Empresa.RFC, RFCReceptorCancelar) Then
|
If EstatusSATCancelado(FolioFiscalCancelar, UsuarioActual.Empresa.RFC, RFCReceptorCancelar) Then
|
||||||
|
|
||||||
If Banc.UpdateComplementoPago(CveComplementoPagoCancelar, "-1", -1, UsuarioActual.CveEmpresa, 2, CvePACCancelacion, FechaCancelacion:=Date.Now, SelloCancelacion:="") Then
|
'If Banc.UpdateComplementoPago(CveComplementoPagoCancelar, "-1", -1, UsuarioActual.CveEmpresa, 2, CvePACCancelacion, FechaCancelacion:=Date.Now, SelloCancelacion:="") 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.")
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
Dim respCancelacion = ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscalCancelar, 0, RFCReceptorCancelar, UsuarioActual.Empresa.RFC, CvePACCancelacion, CveSATMotivoCancelacion:=CveSATMotivoCancelacion)
|
Dim respCancelacion = ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscalCancelar, 0, RFCReceptorCancelar, UsuarioActual.Empresa.RFC, CvePACCancelacion, CveSATMotivoCancelacion:=CveSATMotivoCancelacion)
|
||||||
If respCancelacion.Verificado Then
|
If respCancelacion.Verificado Then
|
||||||
|
|
||||||
If Banc.UpdateComplementoPago(CveComplementoPagoCancelar, "-1", -1, UsuarioActual.CveEmpresa, 2, CvePACCancelacion, FechaCancelacion:=ObjCancelacion.CancelacionFecha, SelloCancelacion:=ObjCancelacion.CancelacionAcuse, CveSATMotivoCancelacion:=CveSATMotivoCancelacion) Then
|
'If Banc.UpdateComplementoPago(CveComplementoPagoCancelar, "-1", -1, UsuarioActual.CveEmpresa, 2, CvePACCancelacion, FechaCancelacion:=ObjCancelacion.CancelacionFecha, SelloCancelacion:=ObjCancelacion.CancelacionAcuse, CveSATMotivoCancelacion:=CveSATMotivoCancelacion) 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.")
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
Alert("Se presento un error al cancelar el complemento.", TipoMensaje.MsgAdvertencia)
|
Alert("Se presento un error al cancelar el complemento.", TipoMensaje.MsgAdvertencia)
|
||||||
@@ -5937,7 +5939,7 @@ Partial Class Bancos_IE
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If ObjBancos.DtResultados.FiltraParametros(" Estatus IN (1,3) ").Rows.Count = 1 And Tipo.ToUpper = "CARGO" And CveCliente > 0 And CveEstatusIE <> 2 Then
|
If ObjBancos.DtResultados.FiltraParametros(" Estatus IN (1,3) ").Rows.Count = 1 And Tipo.ToUpper = "CARGO" And CveCliente > 0 And CveEstatusIE <> 2 Then
|
||||||
DVmotivoCancelacion.Visible = True
|
DivCancelarComplemento.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
@@ -6758,20 +6760,20 @@ Partial Class Bancos_IE
|
|||||||
|
|
||||||
If EstatusSATCancelado(FolioFiscalCancelar, UsuarioActual.Empresa.RFC, RFCReceptorCancelar) Then
|
If EstatusSATCancelado(FolioFiscalCancelar, UsuarioActual.Empresa.RFC, RFCReceptorCancelar) Then
|
||||||
|
|
||||||
If ObjBanco.UpdateComplementoPago(CveComplementoPagoCancelar, "-1", -1, UsuarioActual.CveEmpresa, 2, CvePACCancelacion, FechaCancelacion:=Date.Now, SelloCancelacion:="") Then
|
'If ObjBanco.UpdateComplementoPago(CveComplementoPagoCancelar, "-1", -1, UsuarioActual.CveEmpresa, 2, CvePACCancelacion, FechaCancelacion:=Date.Now, SelloCancelacion:="") Then
|
||||||
CargaComplementosPago()
|
' CargaComplementosPago()
|
||||||
Alert("El complemento se cancelo correctamente.")
|
' Alert("El complemento se cancelo correctamente.")
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
|
|
||||||
Dim resp = ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscalCancelar, 0, RFCReceptorCancelar, UsuarioActual.Empresa.RFC, CvePACCancelacion, CveSATMotivoCancelacion:=CveSATMotivoCancelacion)
|
Dim resp = ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscalCancelar, 0, RFCReceptorCancelar, UsuarioActual.Empresa.RFC, CvePACCancelacion, CveSATMotivoCancelacion:=CveSATMotivoCancelacion)
|
||||||
If resp.Verificado Then
|
If resp.Verificado Then
|
||||||
|
|
||||||
If ObjBanco.UpdateComplementoPago(CveComplementoPagoCancelar, "-1", -1, UsuarioActual.CveEmpresa, 2, CvePACCancelacion, FechaCancelacion:=ObjCancelacion.CancelacionFecha, SelloCancelacion:=ObjCancelacion.CancelacionAcuse, CveSATMotivoCancelacion:=CveSATMotivoCancelacion) Then
|
'If ObjBanco.UpdateComplementoPago(CveComplementoPagoCancelar, "-1", -1, UsuarioActual.CveEmpresa, 2, CvePACCancelacion, FechaCancelacion:=ObjCancelacion.CancelacionFecha, SelloCancelacion:=ObjCancelacion.CancelacionAcuse, CveSATMotivoCancelacion:=CveSATMotivoCancelacion) Then
|
||||||
|
|
||||||
Alert("El complemento se cancelo correctamente.")
|
' Alert("El complemento se cancelo correctamente.")
|
||||||
End If
|
'End If
|
||||||
Else
|
Else
|
||||||
Alert("Se presento un error al cancelar el complemento.", TipoMensaje.MsgError)
|
Alert("Se presento un error al cancelar el complemento.", TipoMensaje.MsgError)
|
||||||
End If
|
End If
|
||||||
@@ -6791,7 +6793,7 @@ Partial Class Bancos_IE
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
TxtFechaCancelacion.Text = TxtFechaCancelarComplemento.Text
|
'TxtFechaCancelacion.Text = TxtFechaCancelarComplemento.Text
|
||||||
CancelarIE(True)
|
CancelarIE(True)
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
@@ -6822,10 +6824,10 @@ Partial Class Bancos_IE
|
|||||||
CvePACCancelacion = DTComplementos.Rows(0)("CvePAC").ToString.ToEntero
|
CvePACCancelacion = DTComplementos.Rows(0)("CvePAC").ToString.ToEntero
|
||||||
|
|
||||||
RegistraScript("$('#ModalCancelarComplemetno').modal('show');")
|
RegistraScript("$('#ModalCancelarComplemetno').modal('show');")
|
||||||
DivFechaCancelación.Visible = True
|
'DivFechaCancelación.Visible = True
|
||||||
CargaComplementosPago()
|
CargaComplementosPago()
|
||||||
|
|
||||||
UpModalCancelarComplemetno.Update()
|
'UpModalCancelarComplemetno.Update()
|
||||||
|
|
||||||
Else
|
Else
|
||||||
If DTComplementos.Rows.Count = 0 Then
|
If DTComplementos.Rows.Count = 0 Then
|
||||||
|
|||||||
Reference in New Issue
Block a user