This commit is contained in:
2024-02-28 20:14:27 -07:00
parent 66181a66c8
commit f99941f756
2 changed files with 29 additions and 21 deletions

View File

@@ -292,9 +292,9 @@
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" Width="100%"
EmptyDataText="No se encontraron Ventas con los filtros especificados" data-sort="true" ToolTip="Listado de Ventas"
CssClass="ScrollAD table table-striped table-hover Widthall" data-heighterror="320" data-freezecols="0" data-freezerows="0" GridLines="None"
DataKeyNames="CveVenta,TipoDocto,Saldo,DescripcionVenta">
DataKeyNames="CveVenta,TipoDocto,Saldo,AtencionA">
<Columns>
<asp:BoundField HeaderText="Descripción" DataField="DescripcionVenta" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField HeaderText="Atención" DataField="AtencionA" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField HeaderText="Folio" DataField="SerieFolio" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField HeaderText="Fecha/Hora" DataField="Fecha" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField HeaderText="Importe" DataField="Saldo" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
@@ -310,14 +310,15 @@
<asp:Panel runat="server" ID="PnlContado" DefaultButton="BtnPagar" Visible="false">
<div class="row">
<div class="note note-success">
<b>Nombre:
</b>
&nbsp;<label><asp:Literal ID="LtlNombre" runat="server"></asp:Literal></label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<div class="row">
<div class="col-md-1"><b>Nombre:</b></div>
<div class="col-md-3">&nbsp;<label><asp:Literal ID="LtlNombre" runat="server"></asp:Literal></label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
<b>
<asp:Literal ID="LtLTipoSaldo" runat="server" Text="Total:"></asp:Literal>
</b>
<asp:TextBox ID="LtlSaldo" runat="server" Enabled="true" CssClass="TextBoxAsLabel" BorderStyle="None" BackColor="Transparent" ForeColor="#3c763d" Style="text-align: left"></asp:TextBox>
<div class="col-md-1"><b><asp:Literal ID="LtLTipoSaldo" runat="server" Text="Total:"></asp:Literal></b></div>
<div class="col-md-1"><b><asp:TextBox ID="LtlSaldo" runat="server" Enabled="true" CssClass="TextBoxAsLabel" BorderStyle="None" BackColor="Transparent" ForeColor="#3c763d" Style="text-align: left"></asp:TextBox> </b></div>
<div class="col-md-3" style="text-align:right;"><asp:LinkButton ID="LnkLiberar" runat="server" CssClass="btn btn-xs btn-success" Text="Liberar" OnClick="LnkLiberar_Click" /></div>
</div>
</div>
</div>
@@ -514,15 +515,7 @@
<asp:RegularExpressionValidator ID="REVCaja" runat="server" ControlToValidate="TxtDineroCaja" 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="GprIniciarTruno"></asp:RegularExpressionValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="REVCaja" Width="300px"></ajax:ValidatorCalloutExtender>
</td>
</tr>
<tr>
<td colspan="1">
<asp:Label runat="server" Text="Descripción:" Font-Bold="true" Width="120px" />
</td>
<td colspan="1">
<asp:TextBox runat="server" ID="TxtDescripcionCaja" TextMode="MultiLine" Width="100%" />
</td>
</tr>
</tr>
<tr>
<td colspan="1">&nbsp;</td>
<td colspan="1">&nbsp;</td>

View File

@@ -93,7 +93,7 @@ Partial Class Ventas_PVCobranza
If ObjPVenta.DtResultados.Rows.Count > 0 Then
CveCorte = ObjPVenta.CveCorte
Dim FechaICorte As Date = ObjPVenta.FechaInicial.Date '.AddDays(-5)
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso FechaICorte < NowADS().Date Then
If FechaICorte < NowADS().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
@@ -244,7 +244,7 @@ Partial Class Ventas_PVCobranza
TxtImporteContado.Text = GvRow.DataKey("Saldo").FormatoNumero
HdnTotal.Value = GvRow.DataKey("Saldo")
TxtImporteEfectivo.Focus()
LtlNombre.Text = GvRow.DataKey("DescripcionVenta")
LtlNombre.Text = GvRow.DataKey("AtencionA")
LtlSaldo.Text = GvRow.DataKey("Saldo").ToDecimal.FormatoNumero
Catch ex As Exception
TieneError = True
@@ -340,6 +340,10 @@ Partial Class Ventas_PVCobranza
PagoEfectivo = TxtImporteCheque.Text.ToDecimal
End If
If Not ObjVentas2.UpdateVentaCorte(CveVenta, UsuarioActual.CveEmpresa, CveCorte) Then
MsgError = "Error al aplicar el corte"
End If
Else
MsgError = "Error al registrar prepólizas"
End If
@@ -503,7 +507,7 @@ Partial Class Ventas_PVCobranza
Private Sub BtnIniciarTurno_Click(sender As Object, e As EventArgs) Handles BtnIniciarTurno.Click
Dim ObjPVenta As New ClsPuntoVenta
ObjPVenta.AddVtaCortes(NowADS(), TxtDineroCaja.Text.ToDecimal, UsuarioActual.CveUsuario, TxtDescripcionCaja.Text, UsuarioActual.CveEmpresa)
ObjPVenta.AddVtaCortes(NowADS(), TxtDineroCaja.Text.ToDecimal, UsuarioActual.CveUsuario, "", UsuarioActual.CveEmpresa)
CveCorte = ObjPVenta.CveCorte
LblTurno.Text = NowADS().ToShortDateString
UpTurno.Visible = True
@@ -561,4 +565,15 @@ Partial Class Ventas_PVCobranza
End If
End Sub
Protected Sub LnkLiberar_Click(sender As Object, e As EventArgs)
Dim ObjVentas As New ClsVentas
If ObjVentas.UpdateAsignaVentaCobranza(HdnCveVenta.Value.ToEntero, -1, -1, -1, "", Now) Then
PnlContado.Visible = False
HdnCveVenta.Value = ""
CargaDatos()
End If
ObjVentas.Dispose()
End Sub
End Class