--Pedir corte antes de hacer el pago
This commit is contained in:
@@ -42,7 +42,7 @@
|
||||
<asp:RadioButtonList ID="RblTipoPago" AutoPostBack="true" runat="server" RepeatDirection="Horizontal">
|
||||
<asp:ListItem Value="1" Selected="true">Banco </asp:ListItem>
|
||||
<asp:ListItem Value="3">Ingresos x Comprobar</asp:ListItem>
|
||||
<%-- <asp:ListItem Value="2" >Pago Intermediario</asp:ListItem>--%>
|
||||
<%-- <asp:ListItem Value="2" >Pago Intermediario</asp:ListItem>--%>
|
||||
</asp:RadioButtonList>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
@@ -208,10 +208,10 @@
|
||||
<div class="col-md-2">
|
||||
<asp:TextBox ID="TxtAnticipo" runat="server" Width="100px" ClientIDMode="Static" />
|
||||
</div>
|
||||
<div class="col-md-1" runat="server" id="DivAntSubProyectoTexto" visible="false">Sucursal:</div>
|
||||
<div class="col-md-2" runat="server" id="DivAntSubProyecto" visible="false">
|
||||
<div class="col-md-1" runat="server" id="DivAntSubProyectoTexto" visible="false">Sucursal:</div>
|
||||
<div class="col-md-2" runat="server" id="DivAntSubProyecto" visible="false">
|
||||
<asp:DropDownList runat="server" ID="DdlSubProyectos" CssClass="form-control input-sm select2me" DataValueField="CveSubProyecto" DataTextField="SubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm">
|
||||
</asp:DropDownList>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-3" runat="server" id="Div4" visible="false">
|
||||
</div>
|
||||
@@ -257,9 +257,9 @@
|
||||
<div class="col-md-3">
|
||||
<asp:TextBox ID="TxtImporteDeduccionesPago" runat="server" Width="100px" onkeyup="FormatoMoneda(this)" ClientIDMode="Static"></asp:TextBox>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="col-md-2">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="col-md-3">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -312,7 +312,7 @@
|
||||
|
||||
<asp:UpdatePanel ID="UpGuardar" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<%-- <br />
|
||||
<%-- <br />
|
||||
<div class="row">
|
||||
<div class="col-lg-2" style="text-align:right!important;max-width:15%!important">
|
||||
|
||||
@@ -333,54 +333,54 @@
|
||||
</div>--%>
|
||||
|
||||
|
||||
<table class="Widthall" style="height:50px!important">
|
||||
<table class="Widthall" style="height: 50px!important">
|
||||
<tr>
|
||||
<td style="text-align: right; width: 15%">
|
||||
<asp:CheckBox Text=" Seguir Registrando Pagos" ID="ChkSeguirRegistrando" CssClass="md-checksd" runat="server" />
|
||||
</td>
|
||||
<td style="text-align: left; width: 15%">
|
||||
<asp:CheckBox Text=" Emitir complemento de pago" ID="ChkComplementoPago" Visible="true" CssClass="md-checksd" runat="server" AutoPostBack="true" OnCheckedChanged="ChkComplementoPago_CheckedChanged" />
|
||||
<br />
|
||||
<asp:Label ID="LblValidaCeuntaTipoTransaccion" runat="server" Visible="false" ForeColor="Red"></asp:Label>
|
||||
<asp:CheckBox Text=" Emitir complemento de pago" ID="ChkComplementoPago" Visible="true" CssClass="md-checksd" runat="server" AutoPostBack="true" OnCheckedChanged="ChkComplementoPago_CheckedChanged" />
|
||||
<br />
|
||||
<asp:Label ID="LblValidaCeuntaTipoTransaccion" runat="server" Visible="false" ForeColor="Red"></asp:Label>
|
||||
</td>
|
||||
<td style="text-align: left; width: 14%">
|
||||
<td style="text-align: left; width: 14%">
|
||||
|
||||
<div runat="server" id="DvFechaEmision" visible="false">
|
||||
<div runat="server" id="DvFechaEmision" visible="false">
|
||||
|
||||
<table>
|
||||
<td style="white-space: nowrap;">Fecha Emisión:</td>
|
||||
<td>
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 110px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaEmision" runat="server" CssClass="form-control"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton runat="server" ID="LnkImgTxtFechaEmision" class="btn default"><i class="fa fa-calendar"></i></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<table>
|
||||
<td style="white-space: nowrap;">Fecha Emisión:</td>
|
||||
<td>
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 110px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaEmision" runat="server" CssClass="form-control"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton runat="server" ID="LnkImgTxtFechaEmision" class="btn default"><i class="fa fa-calendar"></i></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<ajax:MaskedEditExtender ID="METxtFechaEmision" runat="server" TargetControlID="TxtFechaEmision" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CETxtFechaEmision" runat="server" TargetControlID="TxtFechaEmision" PopupButtonID="LnkImgTxtFechaEmision" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtFechaEmision" runat="server" ControlToValidate="TxtFechaEmision" Display="None" ErrorMessage="El campo <b>''Fecha de Emisión''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVTxtFechaEmision" runat="server" ControlToValidate="TxtFechaEmision" Display="None" ErrorMessage="El campo <b>''Fecha de Emisión''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
<ajax:MaskedEditExtender ID="METxtFechaEmision" runat="server" TargetControlID="TxtFechaEmision" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CETxtFechaEmision" runat="server" TargetControlID="TxtFechaEmision" PopupButtonID="LnkImgTxtFechaEmision" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtFechaEmision" runat="server" ControlToValidate="TxtFechaEmision" Display="None" ErrorMessage="El campo <b>''Fecha de Emisión''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVTxtFechaEmision" runat="server" ControlToValidate="TxtFechaEmision" Display="None" ErrorMessage="El campo <b>''Fecha de Emisión''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
|
||||
<%--<asp:RangeValidator ID="RVTxtFechaEmision" runat="server" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior a la fecha actual" ControlToValidate="TxtFechaDocumento" MinimumValue="01/01/1900" Type="Date" ValidationGroup="GrpGuardar"></asp:RangeValidator>--%>
|
||||
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender8" runat="server" HighlightCssClass="vco" TargetControlID="RfvTxtFechaEmision" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender9" runat="server" HighlightCssClass="vco" TargetControlID="CVTxtFechaEmision" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<%--<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender10" runat="server" HighlightCssClass="vco" TargetControlID="RVTxtFechaEmision" Width="350px"></ajax:ValidatorCalloutExtender>--%>
|
||||
</td>
|
||||
</table>
|
||||
|
||||
|
||||
<%--<asp:RangeValidator ID="RVTxtFechaEmision" runat="server" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior a la fecha actual" ControlToValidate="TxtFechaDocumento" MinimumValue="01/01/1900" Type="Date" ValidationGroup="GrpGuardar"></asp:RangeValidator>--%>
|
||||
|
||||
</div>
|
||||
|
||||
</td>
|
||||
<td style="text-align: center;width: 10%">
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender8" runat="server" HighlightCssClass="vco" TargetControlID="RfvTxtFechaEmision" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender9" runat="server" HighlightCssClass="vco" TargetControlID="CVTxtFechaEmision" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<%--<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender10" runat="server" HighlightCssClass="vco" TargetControlID="RVTxtFechaEmision" Width="350px"></ajax:ValidatorCalloutExtender>--%>
|
||||
</td>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</td>
|
||||
<td style="text-align: center; width: 10%">
|
||||
<asp:Button ID="BtnIEGuardar" runat="server" Text="Guardar" ValidationGroup="GrpGuardar" class="btn btn-primary" />
|
||||
</td>
|
||||
<td style="text-align: right; width: 45%">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvCxC.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 125px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvCxC.ClientID) %>" style="margin-top: -3px; margin-right: 20px" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvCxC.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 125px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvCxC.ClientID) %>" style="margin-top: -3px; margin-right: 20px" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -716,7 +716,7 @@
|
||||
<asp:ListItem Text="Gasto No Deducible" Value="255" Selected="True"></asp:ListItem>
|
||||
<asp:ListItem Text="Incobrable No Deducible" Value="179"></asp:ListItem>
|
||||
<asp:ListItem Text="Incobrable Deducible" Value="263"></asp:ListItem>
|
||||
<asp:ListItem Text="Reservas" Value="252"></asp:ListItem>
|
||||
<asp:ListItem Text="Reservas" Value="252"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
@@ -738,6 +738,41 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="ModalCorte" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">Corte de caja</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<asp:UpdatePanel runat="server" ID="UpModalCorte" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="alert alert-warning">Debe seleccionar un corte de caja</div>
|
||||
<div class="row">
|
||||
<label class="col-xs-2 control-label">Corte:</label>
|
||||
<div class="col-xs-10">
|
||||
<asp:DropDownList ID="DdlCorteCaja" runat="server" CssClass="form-control input-sm select2me" DataTextField="DescripcionCorte" DataValueField="CveCorte" Width="100%" ValidationGroup="GrpPago"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVCorteCaja" runat="server" ControlToValidate="DdlCorteCaja" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Corte de caja''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpPago"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCECorteCaja" runat="server" HighlightCssClass="vco" TargetControlID="RFVCorteCaja" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:Button ID="BtnGenerarPago" runat="server" CssClass="btn btn-primary" Text="Pagar" ValidationGroup="GrpPago" />
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%-- FIN MODAL SALDAR INCOBRABLE--%>
|
||||
|
||||
<%--<div id="ModalVincularIntermediario" class="modal ADS fade" role="dialog">
|
||||
|
||||
@@ -696,9 +696,38 @@ Partial Class Ventas_ClientesAbonar
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Protected Sub BtnIEGuardar_Click(sender As Object, e As EventArgs) Handles BtnIEGuardar.Click
|
||||
'VERIFICA SI HAY CORTE ANTES DE HACER EL PAGO
|
||||
If UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso CveCorte <= 0 Then
|
||||
Dim ObjPVenta As New ClsPuntoVenta
|
||||
If ObjPVenta.GetVta_Cortes(TxtFechaDocumento.Text, TxtFechaDocumento.Text, -1, -1, UsuarioActual.CveEmpresa, -1) Then
|
||||
DdlCorteCaja.DataSource = ObjPVenta.DtResultados.FiltraParametros($"CveSubProyecto={CveSubProyecto}")
|
||||
DdlCorteCaja.DataBind()
|
||||
End If
|
||||
ObjPVenta.Dispose()
|
||||
DdlCorteCaja.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
UpModalCorte.Update()
|
||||
RegistraScript("$('#ModalCorte').modal({backdrop: 'static', keyboard: false}, 'show')")
|
||||
Else
|
||||
GenerarPago()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnGenerarPago_Click(sender As Object, e As EventArgs) Handles BtnGenerarPago.Click
|
||||
CveCorte = DdlCorteCaja.SelectedValue.ToEntero()
|
||||
|
||||
If CveCorte <= 0 Then
|
||||
Alert("Debe seleccionar un corte", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
GenerarPago()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub GenerarPago()
|
||||
Dim FechaEmision As Date = MinFecha
|
||||
|
||||
If ChkComplementoPago.Checked AndAlso UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
||||
@@ -1550,7 +1579,6 @@ Partial Class Ventas_ClientesAbonar
|
||||
If MsgError = "" Then
|
||||
LimpiaCampos()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Function TimbrarFactura(ByRef ObjFactura As Modelos.Factura, ByRef SeTimbro As Boolean) As String
|
||||
|
||||
Reference in New Issue
Block a user