Cancelacion de complemento junto con el IE
This commit is contained in:
@@ -55,7 +55,7 @@
|
||||
</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"--%>
|
||||
|
||||
@@ -150,6 +150,7 @@
|
||||
|
||||
<div class="col-md-2" runat="server" id="DivTC" visible="false">
|
||||
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: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>
|
||||
@@ -161,9 +162,9 @@
|
||||
</div>
|
||||
<div class="col-md-2" runat="server" id="DivTC2" visible="false">
|
||||
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:Label ID="Label1" Text="" ClientIDMode="Static" runat="server" />--%>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1252,7 +1253,38 @@
|
||||
|
||||
|
||||
</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 class="modal-footer">
|
||||
@@ -1385,7 +1417,7 @@
|
||||
|
||||
<asp:TemplateField HeaderText="Motivo" Visible="true" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="30%">
|
||||
<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:Literal runat="server" ID="LtlMotivoCancelacion" Text='<%# Eval("MotivoCancelacion") %>'> </asp:Literal>
|
||||
</ItemTemplate>
|
||||
@@ -1406,7 +1438,6 @@
|
||||
CssClass="btn btn-circle btn-sm blue" Text="<i class='fa fa-question'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>--%>
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
@@ -1547,7 +1578,7 @@
|
||||
</div>
|
||||
|
||||
|
||||
<div id="ModalCancelarComplemetno" class="modal ADS fade" role="dialog">
|
||||
<%-- <div id="ModalCancelarComplemetno" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
|
||||
<!-- Modal content-->
|
||||
@@ -1563,13 +1594,6 @@
|
||||
|
||||
<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 class="row" runat="server" id="DivFechaCancelación" visible="true">
|
||||
|
||||
@@ -1630,7 +1654,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>--%>
|
||||
|
||||
<div id="DModalDesconciliar" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpDesconciliar" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
@@ -1120,7 +1120,8 @@ Partial Class Bancos_IE
|
||||
End If
|
||||
|
||||
'LnkCancelarComplemento.Visible = False
|
||||
LnkCancelarComplementoImporte.Visible = False
|
||||
'LnkCancelarComplementoImporte.Visible = False
|
||||
DivCancelarComplemento.Visible = False
|
||||
UppEliminarIE.Update()
|
||||
|
||||
|
||||
@@ -1296,7 +1297,8 @@ Partial Class Bancos_IE
|
||||
'LnkCancelar.Visible = False
|
||||
|
||||
'LnkCancelarComplemento.Visible = True
|
||||
LnkCancelarComplementoImporte.Visible = True
|
||||
'LnkCancelarComplementoImporte.Visible = True
|
||||
DivCancelarComplemento.Visible = True
|
||||
|
||||
End If
|
||||
|
||||
@@ -1304,7 +1306,8 @@ Partial Class Bancos_IE
|
||||
Else
|
||||
BtnEditar.Visible = False
|
||||
' LnkCancelarComplemento.Visible = False
|
||||
LnkCancelarComplementoImporte.Visible = False
|
||||
'LnkCancelarComplementoImporte.Visible = False
|
||||
DivCancelarComplemento.Visible = False
|
||||
DVGenerarComplementoModal.Visible = False
|
||||
End If
|
||||
|
||||
@@ -4453,13 +4456,12 @@ Partial Class Bancos_IE
|
||||
Protected Sub BtnCancelarIE_Click(sender As Object, e As EventArgs)
|
||||
RegistraScript("$('#DivCancelarIE').modal('hide');")
|
||||
Dim ExistenComplementosVigentes As Boolean = VerificaComplementos(True)
|
||||
|
||||
If Not ExistenComplementosVigentes Then
|
||||
CancelarIE()
|
||||
Else
|
||||
Alert("No se puede cancelar documento con complementos de pago vigentes", TipoMensaje.MsgError)
|
||||
If ExistenComplementosVigentes AndAlso DdlMotivoCancelacion.SelectedValue.ToEntero() <= 0 Then
|
||||
Alert("Debe seleccionar un motivo de cancelación", TipoMensaje.MsgError)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
CancelarIE(CancelarComplemento:=ExistenComplementosVigentes)
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -4681,23 +4683,23 @@ Partial Class Bancos_IE
|
||||
Dim ObjCancelacion As New Timbrado
|
||||
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
|
||||
Alert("El complemento se cancelo correctamente.")
|
||||
End If
|
||||
'If Banc.UpdateComplementoPago(CveComplementoPagoCancelar, "-1", -1, UsuarioActual.CveEmpresa, 2, CvePACCancelacion, FechaCancelacion:=Date.Now, SelloCancelacion:="") Then
|
||||
' CargaComplementosPago()
|
||||
' RegistraScript("$('#ModalCancelarComplemetno').modal('hide');")
|
||||
' ErrorCancelarComplemento = False
|
||||
' Alert("El complemento se cancelo correctamente.")
|
||||
'End If
|
||||
|
||||
Else
|
||||
Dim respCancelacion = ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscalCancelar, 0, RFCReceptorCancelar, UsuarioActual.Empresa.RFC, CvePACCancelacion, CveSATMotivoCancelacion:=CveSATMotivoCancelacion)
|
||||
If respCancelacion.Verificado Then
|
||||
|
||||
If Banc.UpdateComplementoPago(CveComplementoPagoCancelar, "-1", -1, UsuarioActual.CveEmpresa, 2, CvePACCancelacion, FechaCancelacion:=ObjCancelacion.CancelacionFecha, SelloCancelacion:=ObjCancelacion.CancelacionAcuse, CveSATMotivoCancelacion:=CveSATMotivoCancelacion) Then
|
||||
CargaComplementosPago()
|
||||
RegistraScript("$('#ModalCancelarComplemetno').modal('hide');")
|
||||
ErrorCancelarComplemento = False
|
||||
Alert("El complemento se cancelo correctamente.")
|
||||
End If
|
||||
'If Banc.UpdateComplementoPago(CveComplementoPagoCancelar, "-1", -1, UsuarioActual.CveEmpresa, 2, CvePACCancelacion, 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)
|
||||
@@ -5937,7 +5939,7 @@ Partial Class Bancos_IE
|
||||
End If
|
||||
|
||||
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
|
||||
|
||||
|
||||
@@ -6758,20 +6760,20 @@ Partial Class Bancos_IE
|
||||
|
||||
If EstatusSATCancelado(FolioFiscalCancelar, UsuarioActual.Empresa.RFC, RFCReceptorCancelar) Then
|
||||
|
||||
If ObjBanco.UpdateComplementoPago(CveComplementoPagoCancelar, "-1", -1, UsuarioActual.CveEmpresa, 2, CvePACCancelacion, FechaCancelacion:=Date.Now, SelloCancelacion:="") Then
|
||||
CargaComplementosPago()
|
||||
Alert("El complemento se cancelo correctamente.")
|
||||
End If
|
||||
'If ObjBanco.UpdateComplementoPago(CveComplementoPagoCancelar, "-1", -1, UsuarioActual.CveEmpresa, 2, CvePACCancelacion, FechaCancelacion:=Date.Now, SelloCancelacion:="") Then
|
||||
' CargaComplementosPago()
|
||||
' Alert("El complemento se cancelo correctamente.")
|
||||
'End If
|
||||
|
||||
Else
|
||||
|
||||
Dim resp = ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscalCancelar, 0, RFCReceptorCancelar, UsuarioActual.Empresa.RFC, CvePACCancelacion, CveSATMotivoCancelacion:=CveSATMotivoCancelacion)
|
||||
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.")
|
||||
End If
|
||||
' Alert("El complemento se cancelo correctamente.")
|
||||
'End If
|
||||
Else
|
||||
Alert("Se presento un error al cancelar el complemento.", TipoMensaje.MsgError)
|
||||
End If
|
||||
@@ -6791,7 +6793,7 @@ Partial Class Bancos_IE
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
TxtFechaCancelacion.Text = TxtFechaCancelarComplemento.Text
|
||||
'TxtFechaCancelacion.Text = TxtFechaCancelarComplemento.Text
|
||||
CancelarIE(True)
|
||||
|
||||
End Sub
|
||||
@@ -6822,10 +6824,10 @@ Partial Class Bancos_IE
|
||||
CvePACCancelacion = DTComplementos.Rows(0)("CvePAC").ToString.ToEntero
|
||||
|
||||
RegistraScript("$('#ModalCancelarComplemetno').modal('show');")
|
||||
DivFechaCancelación.Visible = True
|
||||
'DivFechaCancelación.Visible = True
|
||||
CargaComplementosPago()
|
||||
|
||||
UpModalCancelarComplemetno.Update()
|
||||
'UpModalCancelarComplemetno.Update()
|
||||
|
||||
Else
|
||||
If DTComplementos.Rows.Count = 0 Then
|
||||
|
||||
Reference in New Issue
Block a user