| Pantalla Bloqueada | ++ |
| + | + |
|
+
+
+
+
+
+
+
+
+ Información:
+
+ |
+ |
|
+
+
+
+
+
+
+
+
+
+
+ Estado de caja
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+ |
| + | + |
| Serie - Folio: |
@@ -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);
diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb
index b2f7fe442..55808d4aa 100644
--- a/Ventas/Ventas.aspx.vb
+++ b/Ventas/Ventas.aspx.vb
@@ -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 {FechaICorte.ToString("dd/MM/yyyy")}. 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()
|