--Pedir corte antes de hacer el pago
This commit is contained in:
@@ -738,6 +738,41 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</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--%>
|
<%-- FIN MODAL SALDAR INCOBRABLE--%>
|
||||||
|
|
||||||
<%--<div id="ModalVincularIntermediario" class="modal ADS fade" role="dialog">
|
<%--<div id="ModalVincularIntermediario" class="modal ADS fade" role="dialog">
|
||||||
|
|||||||
@@ -696,9 +696,38 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Protected Sub BtnIEGuardar_Click(sender As Object, e As EventArgs) Handles BtnIEGuardar.Click
|
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
|
Dim FechaEmision As Date = MinFecha
|
||||||
|
|
||||||
If ChkComplementoPago.Checked AndAlso UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
If ChkComplementoPago.Checked AndAlso UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
||||||
@@ -1550,7 +1579,6 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
If MsgError = "" Then
|
If MsgError = "" Then
|
||||||
LimpiaCampos()
|
LimpiaCampos()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function TimbrarFactura(ByRef ObjFactura As Modelos.Factura, ByRef SeTimbro As Boolean) As String
|
Private Function TimbrarFactura(ByRef ObjFactura As Modelos.Factura, ByRef SeTimbro As Boolean) As String
|
||||||
|
|||||||
Reference in New Issue
Block a user