Pantalla de bloqueo en ventas.aspx y pv.aspx, asignar forma de pago en base al pago mas alto
This commit is contained in:
@@ -1891,12 +1891,89 @@
|
||||
|
||||
<asp:Button ID="btnShow" runat="server" Text="Show Modal Popup" Style="visibility: hidden; display: none;" />
|
||||
<asp:Button ID="btnClose" runat="server" CssClass="btn btn-danger" Style="visibility: hidden; display: none;" Text="Cancelar" />
|
||||
<asp:Button ID="btnShowBloqueoCorte" runat="server" Text="Show Modal Popup" Style="visibility: hidden; display: none;" />
|
||||
|
||||
<!-- ModalPopupExtender -->
|
||||
<cc1:ModalPopupExtender ID="mp1" runat="server" PopupControlID="PanelIniciarTurno" TargetControlID="btnShow"
|
||||
CancelControlID="btnClose" BackgroundCssClass="modalBackground">
|
||||
</cc1:ModalPopupExtender>
|
||||
|
||||
<cc1:ModalPopupExtender ID="MPEBloqueo" runat="server" PopupControlID="PanelBloqueoCorte" TargetControlID="btnShowBloqueoCorte" BackgroundCssClass="modalBackground">
|
||||
</cc1:ModalPopupExtender>
|
||||
|
||||
<asp:Panel ID="PanelBloqueoCorte" runat="server" CssClass="modalPopup" align="center" Style="display: none">
|
||||
<table border="0" width="650px" cellspacing="1" style="background-color: White; padding-left: 10px;">
|
||||
<tr style="background-color: #3598dc; color: #FFFFFF; font-size: 14px">
|
||||
<td>Pantalla Bloqueada </td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1"> </td>
|
||||
<td colspan="1"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<div class="row">
|
||||
<div class="col-md-12" style="vertical-align: middle;" align="center">
|
||||
<div style="z-index: 5; position: relative;">
|
||||
<div id="DivAdvertenciaBloqueo" clientidmode="Static" runat="server" class="alert alert-warning" style="padding: 5px; margin-bottom: 5px; padding-right: 25px;">
|
||||
<strong style="font-size: 20px; margin-right: 25px;">Información: </strong>
|
||||
<asp:Literal ID="LblMotivoBloqueo" runat="server" Text=""></asp:Literal>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="portlet light smmallpadding traspasorow bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<span class="caption-subject bold uppercase" style="line-height: 1;">Estado de caja</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body rowpadding">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:Label ID="LblEfectivoBloqueo" CssClass="form-control" runat="server"></asp:Label>
|
||||
<label for="<%= LblEfectivoBloqueo.ClientID.ToString()%>">Efectivo Esperado:</label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtEfectivoCajaBloqueo" CssClass="form-control" runat="server" onkeyup="javascript:this.value=Comma(this.value);" />
|
||||
<asp:RegularExpressionValidator ID="REVEfectivoCajaBloqueo" runat="server" ControlToValidate="TxtEfectivoCajaBloqueo" Display="None" ErrorMessage="El campo <b>''Dinero''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." ValidationExpression="^([1-9]{1}[\d]{0,2}(\,[\d]{3})*(\.[\d]{0,4})?|[1-9]{1}[\d]{0,}(\.[\d]{0,4})?|0(\.[\d]{0,2})?|(\.[\d]{1,4})?)$" ValidationGroup="GprBloqueo"></asp:RegularExpressionValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender25" runat="server" HighlightCssClass="vco" TargetControlID="REVEfectivoCajaBloqueo" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<label for="<%= TxtEfectivoEnCaja.ClientID.ToString()%>">Efectivo en Caja:</label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="LblDiferenciaCajaBloqueo" CssClass="form-control" runat="server" Enabled="false" />
|
||||
<label for="<%= LblDiferenciaCajaBloqueo.ClientID.ToString()%>">Diferencia:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1"> </td>
|
||||
<td colspan="1"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<asp:Button ID="BtnCerrarBloqueo" runat="server" CssClass="btn btn-danger" Text="Cerrar Turno" ValidationGroup="GprBloqueo" />
|
||||
</asp:Panel>
|
||||
|
||||
<asp:Panel ID="PanelIniciarTurno" runat="server" CssClass="modalPopup" align="center" Style="display: none">
|
||||
|
||||
<table border="0" width="250px" cellspacing="1" style="background-color: White; padding-left: 10px;">
|
||||
@@ -3170,6 +3247,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
function CalculaDiferenciaBloqueo() {
|
||||
var total = 0;
|
||||
total = ToDouble($('#C_TxtEfectivoCajaBloqueo').val()) - ToDouble($('#C_LblEfectivoBloqueo').text());
|
||||
$('#C_LblDiferenciaCajaBloqueo').val(FormatoNumero(total));
|
||||
}
|
||||
|
||||
// Get the input field
|
||||
var txtCodigoAcceso = document.getElementById("C_TxtCodigoAcceso");
|
||||
|
||||
|
||||
@@ -1149,6 +1149,7 @@ Partial Class PV
|
||||
TxtImporteCheque.Attributes.Add("onKeyUp", "CalculaTotalPagoContado();")
|
||||
TxtImporteTransferencia.Attributes.Add("onKeyUp", "CalculaTotalPagoContado();")
|
||||
TxtEfectivoEnCaja.Attributes.Add("onKeyUp", "CalculaDiferencia();")
|
||||
TxtEfectivoCajaBloqueo.Attributes.Add("onKeyUp", "CalculaDiferenciaBloqueo();")
|
||||
'ImgCerrarTerminoCorte.Attributes.Add("OnClick", "$('#DivTerminarCorte').hide();")
|
||||
'ImgCerrarIE.Attributes.Add("OnClick", "$('#DivIngresoEgreso').hide();")
|
||||
'ImgCerrarEstadoCaja.Attributes.Add("OnClick", "$('#DivEstadoCaja').hide();")
|
||||
@@ -2129,6 +2130,7 @@ Partial Class PV
|
||||
|
||||
#Region "PUNTO DE VENTA"
|
||||
Private Sub CargaCorteCaja()
|
||||
Dim DebeCerrarCorte As Boolean = False
|
||||
'Checar si hay un Turno Abierto
|
||||
Dim ObjPVenta As New ClsPuntoVenta
|
||||
|
||||
@@ -2136,18 +2138,33 @@ Partial Class PV
|
||||
|
||||
If ObjPVenta.DtResultados.Rows.Count > 0 Then
|
||||
CveCorte = ObjPVenta.CveCorte
|
||||
LblEstatusCaja.Text = ObjPVenta.FechaInicial.ToShortDateString
|
||||
TrEstatusCaja.Visible = True
|
||||
BtnIniciarTurno.Visible = False
|
||||
LkbEstadodeCaja.Visible = True
|
||||
LkbIngreso.Visible = True
|
||||
LkbRetiro.Visible = True
|
||||
Dim FechaICorte = ObjPVenta.FechaInicial.Date '.AddDays(-1)
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso FechaICorte < Now.Date Then
|
||||
DebeCerrarCorte = True
|
||||
LblMotivoBloqueo.Text = $"Existe un corte del día <b>{FechaICorte.ToString("dd/MM/yyyy")}</b>. Favor de cerrarlo para iniciar un nuevo corte."
|
||||
Else
|
||||
LblEstatusCaja.Text = ObjPVenta.FechaInicial.ToShortDateString
|
||||
TrEstatusCaja.Visible = True
|
||||
BtnIniciarTurno.Visible = False
|
||||
LkbEstadodeCaja.Visible = True
|
||||
LkbIngreso.Visible = True
|
||||
LkbRetiro.Visible = True
|
||||
End If
|
||||
|
||||
Else
|
||||
'Ingresar un nuevo Turno
|
||||
RegistraScript("window.onload = function MuestraCorteCaja() { document.getElementById(""C_btnShow"").click(); }")
|
||||
End If
|
||||
End If
|
||||
ObjPVenta.Dispose()
|
||||
|
||||
If DebeCerrarCorte Then
|
||||
CargaDatosCorte()
|
||||
BtnEmitirImprimir.Visible = False
|
||||
HlCliente.Visible = False
|
||||
DdlPS.Visible = False
|
||||
RegistraScript("window.onload = function MuestraPantallaBloqueo() { document.getElementById(""C_btnShowBloqueoCorte"").click(); }")
|
||||
End If
|
||||
End Sub
|
||||
Private Sub BtnIniciarTurno_Click(sender As Object, e As EventArgs) Handles BtnIniciarTurno.Click
|
||||
Dim ObjPVenta As New ClsPuntoVenta
|
||||
@@ -2181,6 +2198,7 @@ Partial Class PV
|
||||
Total = ObjPVenta.DtResultados(0)("ImporteInicial").ToString.ToDouble + ObjPVenta.DtResultados(0)("VentasEfectivo").ToString.ToDouble + ObjPVenta.DtResultados(0)("Propina").ToString.ToDouble + ObjPVenta.DtResultados(0)("Ingresado").ToString.ToDouble - ObjPVenta.DtResultados(0)("Retirado").ToString.ToDouble
|
||||
DineroCaja = Total
|
||||
LblEfectivoEsperado.Text = Total.FormatoNumero(2)
|
||||
LblEfectivoBloqueo.Text = Total.FormatoNumero(2)
|
||||
|
||||
Dim Dt As New DataTable
|
||||
|
||||
@@ -2288,6 +2306,20 @@ Partial Class PV
|
||||
End If
|
||||
ObjPVenta.Dispose()
|
||||
End Sub
|
||||
Private Sub BtnCerrarBloqueo_Click(sender As Object, e As EventArgs) Handles BtnCerrarBloqueo.Click
|
||||
Dim ObjPVenta As New ClsPuntoVenta
|
||||
If TxtEfectivoCajaBloqueo.Text.Trim <> "" Then
|
||||
If ObjPVenta.UpdateFinalizadoVtaCortes(CveCorte, TxtEfectivoCajaBloqueo.Text.ToDouble, LblDiferenciaCajaBloqueo.Text.ToDouble, Now, UsuarioActual.CveEmpresa) Then
|
||||
RegistraScript($"window.location.href = '/Compras/PopUpVerFactura.aspx?P={Encripta(String.Format("OP=CORT&CVECORTE={0}&FORMATO={1}", CveCorte, "PDF"))}'", "Imprimir")
|
||||
Dim Liga = "document.location.href=""/Ventas/PV.aspx"";"
|
||||
Alert("Se ha cerrado el turno correctamente.", TipoMensaje.MsgInformacion, Liga)
|
||||
End If
|
||||
Else
|
||||
Alert("Debe especificar el efectivo en caja", TipoMensaje.MsgAdvertencia)
|
||||
RegistraScript("window.onload = function MuestraPantallaBloqueo() { document.getElementById(""C_btnShowBloqueoCorte"").click(); }")
|
||||
End If
|
||||
ObjPVenta.Dispose()
|
||||
End Sub
|
||||
Private Sub BtnCancelar_Click(sender As Object, e As EventArgs) Handles BtnCancelar.Click
|
||||
Response.Redirect("~/Inicio.aspx")
|
||||
End Sub
|
||||
|
||||
@@ -637,7 +637,7 @@
|
||||
<td><b>Serie - Folio:</b></td>
|
||||
<td>
|
||||
<asp:Label ID="LblSerie" runat="server"></asp:Label>-
|
||||
<asp:TextBox ID="TxtFolio" runat="server" BorderStyle="None" Text="000" MaxLength="7" Width="60px" ValidationGroup="GrpEmitirImprimir" Style="text-align: left" autopostback="true"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtFolio" runat="server" BorderStyle="None" Text="000" MaxLength="7" Width="60px" ValidationGroup="GrpEmitirImprimir" Style="text-align: left" AutoPostBack="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVFolio" runat="server" ControlToValidate="TxtFolio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Folio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpEmitirImprimir"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender10" runat="server" HighlightCssClass="vco" TargetControlID="RFVFolio" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:CompareValidator ID="CVFolio" runat="server" ControlToValidate="TxtFolio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Folio''</b> no tiene el formato correcto, solo formato numérico." Operator="DataTypeCheck" Type="Integer" ValidationGroup="GrpEmitirImprimir"></asp:CompareValidator>
|
||||
@@ -4239,12 +4239,16 @@
|
||||
|
||||
<asp:Button ID="btnShow" runat="server" Text="Show Modal Popup" Style="visibility: hidden; display: none;" />
|
||||
<asp:Button ID="btnClose" runat="server" CssClass="btn btn-danger" Style="visibility: hidden; display: none;" Text="Cancelar" />
|
||||
<asp:Button ID="btnShowBloqueo" runat="server" Text="Show Modal Popup" Style="visibility: hidden; display: none;" />
|
||||
|
||||
<!-- ModalPopupExtender -->
|
||||
<cc1:ModalPopupExtender ID="mp1" runat="server" PopupControlID="PanelIniciarTurno" TargetControlID="btnShow"
|
||||
CancelControlID="btnClose" BackgroundCssClass="modalBackground">
|
||||
</cc1:ModalPopupExtender>
|
||||
|
||||
<cc1:ModalPopupExtender ID="MPEBloqueo" runat="server" PopupControlID="PanelBloqueo" TargetControlID="btnShowBloqueo" BackgroundCssClass="modalBackground">
|
||||
</cc1:ModalPopupExtender>
|
||||
|
||||
<asp:Panel ID="PanelIniciarTurno" runat="server" CssClass="modalPopup" align="center" Style="display: none">
|
||||
|
||||
<table border="0" width="250px" cellspacing="1" style="background-color: White; padding-left: 10px;">
|
||||
@@ -4286,6 +4290,79 @@
|
||||
</asp:Panel>
|
||||
<!-- ModalPopupExtender -->
|
||||
|
||||
<asp:Panel ID="PanelBloqueo" runat="server" CssClass="modalPopup" align="center" Style="display: none">
|
||||
<table border="0" width="650px" cellspacing="1" style="background-color: White; padding-left: 10px;">
|
||||
<tr style="background-color: #3598dc; color: #FFFFFF; font-size: 14px">
|
||||
<td>Pantalla Bloqueada </td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1"> </td>
|
||||
<td colspan="1"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<div class="row">
|
||||
<div class="col-md-12" style="vertical-align: middle;" align="center">
|
||||
<div style="z-index: 5; position: relative;">
|
||||
<div id="DivAdvertenciaBloqueo" clientidmode="Static" runat="server" class="alert alert-warning" style="padding: 5px; margin-bottom: 5px; padding-right: 25px;">
|
||||
<strong style="font-size: 20px; margin-right: 25px;">Información: </strong>
|
||||
<asp:Literal ID="LblMotivoBloqueo" runat="server" Text=""></asp:Literal>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="portlet light smmallpadding traspasorow bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<span class="caption-subject bold uppercase" style="line-height: 1;">Estado de caja</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body rowpadding">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:Label ID="LblEfectivoBloqueo" CssClass="form-control" runat="server"></asp:Label>
|
||||
<label for="<%= LblEfectivoBloqueo.ClientID.ToString()%>">Efectivo Esperado:</label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtEfectivoCajaBloqueo" CssClass="form-control" runat="server" onkeyup="javascript:this.value=Comma(this.value);" />
|
||||
<asp:RegularExpressionValidator ID="REVEfectivoCajaBloqueo" runat="server" ControlToValidate="TxtEfectivoCajaBloqueo" Display="None" ErrorMessage="El campo <b>''Dinero''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." ValidationExpression="^([1-9]{1}[\d]{0,2}(\,[\d]{3})*(\.[\d]{0,4})?|[1-9]{1}[\d]{0,}(\.[\d]{0,4})?|0(\.[\d]{0,2})?|(\.[\d]{1,4})?)$" ValidationGroup="GprBloqueo"></asp:RegularExpressionValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender25" runat="server" HighlightCssClass="vco" TargetControlID="REVEfectivoCajaBloqueo" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<label for="<%= TxtEfectivoEnCaja.ClientID.ToString()%>">Efectivo en Caja:</label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="LblDiferenciaCajaBloqueo" CssClass="form-control" runat="server" Enabled="false" />
|
||||
<label for="<%= LblDiferenciaCajaBloqueo.ClientID.ToString()%>">Diferencia:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="1"> </td>
|
||||
<td colspan="1"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<asp:LinkButton ID="BtnCerrarBloqueo" runat="server" CssClass="btn btn-danger" Text="Cerrar Turno" ValidationGroup="GprBloqueo"/>
|
||||
</asp:Panel>
|
||||
|
||||
<div id="DivEstadoCaja" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" style="width: 470px; min-width: 470px;">
|
||||
<div class="modal-content">
|
||||
@@ -8934,6 +9011,12 @@
|
||||
$('#C_LblDiferenciaCaja').text(FormatoNumero(total));
|
||||
}
|
||||
|
||||
function CalculaDiferenciaBloqueo() {
|
||||
var total = 0;
|
||||
total = ToDouble($('#C_TxtEfectivoCajaBloqueo').val()) - ToDouble($('#C_LblEfectivoBloqueo').text());
|
||||
$('#C_LblDiferenciaCajaBloqueo').val(FormatoNumero(total));
|
||||
}
|
||||
|
||||
function CalculaTotalPagoContado() {
|
||||
|
||||
var totalEfectivo = ToDouble($get("TxtImporteEfectivo").value);
|
||||
|
||||
@@ -2356,6 +2356,7 @@ Partial Class Ventas
|
||||
TxtImporteOtrosContado.Attributes.Add("onKeyUp", "CalculaTotalPagoContado();")
|
||||
|
||||
TxtEfectivoEnCaja.Attributes.Add("onKeyUp", "CalculaDiferencia();")
|
||||
TxtEfectivoCajaBloqueo.Attributes.Add("onKeyUp", "CalculaDiferenciaBloqueo();")
|
||||
|
||||
'ImgCerrarTerminoCorte.Attributes.Add("OnClick", "$('#DivTerminarCorte').hide();")
|
||||
'ImgCerrarIE.Attributes.Add("OnClick", "$('#DivIngresoEgreso').hide();")DdlTipoComprobante
|
||||
@@ -3182,6 +3183,7 @@ Partial Class Ventas
|
||||
|
||||
#Region "Punto Venta"
|
||||
Private Sub CargaCorteCaja()
|
||||
Dim DebeCerrarCorte As Boolean = False
|
||||
'Checar si hay un Turno Abierto
|
||||
Dim ObjPVenta As New ClsPuntoVenta
|
||||
|
||||
@@ -3189,14 +3191,21 @@ Partial Class Ventas
|
||||
|
||||
If ObjPVenta.DtResultados.Rows.Count > 0 Then
|
||||
CveCorte = ObjPVenta.CveCorte
|
||||
LblEstatusCaja.Text = ObjPVenta.FechaInicial.ToShortDateString
|
||||
LblTurno.Text = ObjPVenta.FechaInicial.ToShortDateString
|
||||
TrEstatusCaja.Visible = True
|
||||
BtnIniciarTurno.Visible = False
|
||||
LkbEstadodeCaja.Visible = True
|
||||
LkbIngreso.Visible = True
|
||||
LkbRetiro.Visible = True
|
||||
UpTurno.Visible = True
|
||||
Dim FechaICorte = ObjPVenta.FechaInicial.Date '.AddDays(-5)
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso FechaICorte < Now.Date Then
|
||||
DebeCerrarCorte = True
|
||||
LblMotivoBloqueo.Text = $"Existe un corte del día <b>{FechaICorte.ToString("dd/MM/yyyy")}</b>. Favor de cerrarlo para iniciar un nuevo corte."
|
||||
Else
|
||||
LblEstatusCaja.Text = ObjPVenta.FechaInicial.ToShortDateString
|
||||
LblTurno.Text = ObjPVenta.FechaInicial.ToShortDateString
|
||||
TrEstatusCaja.Visible = True
|
||||
BtnIniciarTurno.Visible = False
|
||||
LkbEstadodeCaja.Visible = True
|
||||
LkbIngreso.Visible = True
|
||||
LkbRetiro.Visible = True
|
||||
UpTurno.Visible = True
|
||||
End If
|
||||
|
||||
Else
|
||||
UpTurno.Visible = False
|
||||
'Ingresar un nuevo Turno
|
||||
@@ -3204,6 +3213,14 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
ObjPVenta.Dispose()
|
||||
|
||||
If DebeCerrarCorte Then
|
||||
CargaDatosCorte()
|
||||
BtnEmitirImprimir.Visible = False
|
||||
HlCliente.Visible = False
|
||||
DdlPS.Visible = False
|
||||
RegistraScript("window.onload = function MuestraPantallaBloqueo() { document.getElementById(""C_btnShowBloqueo"").click(); }")
|
||||
End If
|
||||
End Sub
|
||||
Private Sub BtnIniciarTurno_Click(sender As Object, e As EventArgs) Handles BtnIniciarTurno.Click
|
||||
Dim ObjPVenta As New ClsPuntoVenta
|
||||
@@ -3237,6 +3254,7 @@ Partial Class Ventas
|
||||
Total = ObjPVenta.DtResultados(0)("ImporteInicial").ToString().ToDouble + ObjPVenta.DtResultados(0)("VentasEfectivo").ToString().ToDouble + ObjPVenta.DtResultados(0)("Ingresado").ToString().ToDouble - ObjPVenta.DtResultados(0)("Retirado").ToString().ToDouble - ObjPVenta.DtResultados(0)("Devoluciones").ToString().ToDouble
|
||||
DineroCaja = Total
|
||||
LblEfectivoEsperado.Text = Total.FormatoNumero(2)
|
||||
LblEfectivoBloqueo.Text = Total.FormatoNumero(2)
|
||||
|
||||
Dim Dt As New DataTable
|
||||
|
||||
@@ -3349,6 +3367,21 @@ Partial Class Ventas
|
||||
End If
|
||||
ObjPVenta.Dispose()
|
||||
End Sub
|
||||
|
||||
Private Sub BtnCerrarBloqueo_Click(sender As Object, e As EventArgs) Handles BtnCerrarBloqueo.Click
|
||||
Dim ObjPVenta As New ClsPuntoVenta
|
||||
If TxtEfectivoCajaBloqueo.Text.Trim <> "" Then
|
||||
If ObjPVenta.UpdateFinalizadoVtaCortes(CveCorte, TxtEfectivoCajaBloqueo.Text.ToDouble, LblDiferenciaCajaBloqueo.Text.ToDouble, Now, UsuarioActual.CveEmpresa) Then
|
||||
RegistraScript($"window.location.href = '/Compras/PopUpVerFactura.aspx?P={Encripta(String.Format("OP=CORT&CVECORTE={0}&FORMATO={1}", CveCorte, "PDF"))}'", "Imprimir")
|
||||
Dim Liga = "document.location.href=""/Ventas/Ventas.aspx?CveVenta=-1"";"
|
||||
Alert("Se ha cerrado el turno correctamente.", TipoMensaje.MsgInformacion, Liga)
|
||||
End If
|
||||
Else
|
||||
Alert("Debe especificar el efectivo en caja", TipoMensaje.MsgAdvertencia)
|
||||
RegistraScript("window.onload = function MuestraPantallaBloqueo() { document.getElementById(""C_btnShowBloqueo"").click(); }")
|
||||
End If
|
||||
ObjPVenta.Dispose()
|
||||
End Sub
|
||||
Private Sub BtnCancelar_Click(sender As Object, e As EventArgs) Handles BtnCancelar.Click
|
||||
Response.Redirect("~/Inicio.aspx")
|
||||
End Sub
|
||||
@@ -21462,7 +21495,7 @@ Partial Class Ventas
|
||||
DrDebito("Folio") = CargaFolioContado(DdlCuentaTarjetaDebito.SelectedValue.ToEntero(), 11)
|
||||
DrDebito("Observaciones") = ""
|
||||
DrDebito("Tipo") = "Tarjeta de Débito"
|
||||
DrDebito("CveMetodoPago") = 5
|
||||
DrDebito("CveMetodoPago") = 18
|
||||
DrDebito("MesesSinIntereses") = -1
|
||||
|
||||
DtPagos.Rows.Add(DrDebito)
|
||||
@@ -21557,7 +21590,7 @@ Partial Class Ventas
|
||||
DrDebito("Folio") = CargaFolioContado(DdlCuentaOtrosContado.SelectedValue.ToEntero(), 11)
|
||||
DrDebito("Observaciones") = ""
|
||||
DrDebito("Tipo") = "Tarjeta de Débito"
|
||||
DrDebito("CveMetodoPago") = 5
|
||||
DrDebito("CveMetodoPago") = 18
|
||||
DrDebito("MesesSinIntereses") = -1
|
||||
|
||||
DtPagos.Rows.Add(DrDebito)
|
||||
@@ -21600,6 +21633,14 @@ Partial Class Ventas
|
||||
UpFacturar.Update()
|
||||
End If
|
||||
|
||||
'TOMA EL VALOR DEL PAGO MAS ALTO QUE SE APLIQUE
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso DtPagos IsNot Nothing Then
|
||||
Dim RowPagoMasAlto As DataRow = DtPagos.FiltraParametros("", Orderby:="Importe DESC").FiltroPrimero("")
|
||||
If RowPagoMasAlto IsNot Nothing Then
|
||||
DdlFormaPago33.SelectedValueExist(RowPagoMasAlto("CveMetodoPago"))
|
||||
End If
|
||||
End If
|
||||
|
||||
CargaGridContado()
|
||||
UpContado.Update()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user