-- cambios varios

This commit is contained in:
2025-01-23 14:30:15 -07:00
parent 2beee510c8
commit e2bc99345f
4 changed files with 56 additions and 11 deletions

View File

@@ -117,9 +117,8 @@
</div> </div>
</div> </div>
<div class="row" style="max-width: 780px;"> <div class="row" style="max-width: 780px;">
<div class="col-md-12" style="display: flex; justify-content: flex-end"> <div class="col-md-12" style="display: flex;">
<table style="width:100%">
<table>
<tr> <tr>
<td class="text-right" style="text-align: right;" runat="server" id="DivListasPrecios2" visible="false">Lista: </td> <td class="text-right" style="text-align: right;" runat="server" id="DivListasPrecios2" visible="false">Lista: </td>
<td id="DivListasPrecios" visible="false" runat="server"> <td id="DivListasPrecios" visible="false" runat="server">
@@ -130,9 +129,23 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<td></td> <td>
<div class="row" id="DivListaPrecios" runat="server" visible="false">
<div class="col-md-12">
<asp:GridView ID="GvPLMultiple" Width="100%" runat="server" GridLines="None" ClientIDMode="Static" AutoGenerateColumns="false"
CssClass="table table-striped table-hover" data-sort="true" EmptyDataText="No se encontraron registros">
<Columns>
<asp:BoundField DataField="PrecioLista" HeaderText="Lista de Precio" />
<asp:BoundField DataField="Precio" HeaderText="SubTotal" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField DataField="Precio8" HeaderText="Neto al 8%" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField DataField="Precio16" HeaderText="Neto al 16%" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
</Columns>
</asp:GridView>
</div>
</div>
</td>
<td id="DivListasPreciosRow2" visible="false" runat="server"></td> <td id="DivListasPreciosRow2" visible="false" runat="server"></td>
<td style="text-align: right;"> <td style="text-align: right; justify-content: flex-end;vertical-align: bottom;">
<asp:HyperLink ID="HlPendiente" Style="color: #337ab7;" Visible="false" runat="server" Text="Ventas Pendiente por Surtir" Target="_blank"></asp:HyperLink> <asp:HyperLink ID="HlPendiente" Style="color: #337ab7;" Visible="false" runat="server" Text="Ventas Pendiente por Surtir" Target="_blank"></asp:HyperLink>
</td> </td>
</tr> </tr>

View File

@@ -154,13 +154,29 @@ Partial Class Inventarios_Default
ObjInventarios.Dispose() ObjInventarios.Dispose()
GV.DataBind() GV.DataBind()
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
CargaListaPrecios(CvePS)
End If
UPDatos.Update() UPDatos.Update()
Else Else
Alert("Seleccione un producto", TipoMensaje.MsgAdvertencia) Alert("Seleccione un producto", TipoMensaje.MsgAdvertencia)
End If End If
End Sub
Private Sub CargaListaPrecios(CvePS As Integer)
If UsuarioActual.TienePermisoProceso(389) Then 'si puede actualizar precios se muestra
Dim objPS As New ClsProductosServicios
If objPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, -1, CvePS:=CvePS) Then
GvPLMultiple.DataSource = objPS.DtResultados.FiltraParametros("Precio > 0")
End If
objPS.Dispose()
DivListaPrecios.Visible = True
GvPLMultiple.DataBind()
End If
End Sub End Sub
Private Sub CargaPS(CvePS As Integer) Private Sub CargaPS(CvePS As Integer)
If CvePS <= 0 Then Exit Sub If CvePS <= 0 Then Exit Sub

View File

@@ -217,7 +217,7 @@
</a> </a>
</li> </li>
<li id="tdBExi" runat="server" visible="false"> <li id="tdBExi" runat="server" visible="false">
<a onclick="javascript:AbrirVentana('/Inventarios/PopUpExistenciasAlmacen.aspx?CvePS=-1',800,597,'N');"> <a onclick="javascript:AbrirVentana('/Inventarios/PopUpExistenciasAlmacen.aspx?CvePS=-1',800,700,'N');">
<i class="fa fa-cubes"></i> <i class="fa fa-cubes"></i>
Buscar Existencias Buscar Existencias
</a> </a>

View File

@@ -34526,7 +34526,7 @@ Partial Class Ventas
Return Valido Return Valido
End Function End Function
Private Sub CargaConceptosRemisionPorFacturar(CveRemisiones As String, TipoCargas As Integer) Private Sub CargaConceptosRemisionPorFacturar(CveRemisiones As String, TipoCargas As Integer, Optional DtOrden As DataTable = Nothing)
Dim ObjClientes As New ClsClientes Dim ObjClientes As New ClsClientes
If ObjClientes.GetVentasRemisionesTotales(CveCliente, CveRemisiones, TipoCargas, UsuarioActual.CveEmpresa) Then If ObjClientes.GetVentasRemisionesTotales(CveCliente, CveRemisiones, TipoCargas, UsuarioActual.CveEmpresa) Then
DtRemisionesPS = ObjClientes.DtResultados DtRemisionesPS = ObjClientes.DtResultados
@@ -34569,11 +34569,16 @@ Partial Class Ventas
End If End If
tCantidad = If(ChkRemProductos.Checked, GvRemPS.Rows(IndiceGVDataKey(GvRemPS, "CveVentaDetalle", $"{Dr("CveVentaDetalle")}")).FCTextBox("TxtCantidadRem").Text, Dr("Cantidad")).ToString().ToDecimal tCantidad = If(ChkRemProductos.Checked, GvRemPS.Rows(IndiceGVDataKey(GvRemPS, "CveVentaDetalle", $"{Dr("CveVentaDetalle")}")).FCTextBox("TxtCantidadRem").Text, Dr("Cantidad")).ToString().ToDecimal
Dim OrdenManual As Integer = 0
If DtOrden IsNot Nothing Then
OrdenManual = DtOrden.FiltroPrimeroValor("Orden", $"CveVentaDetalle = {Dr("CveVentaDetalle")}").ToEntero()
End If
AgregarProductoServicio(tCantidad, Dr("CveUM").ToString().ToEntero(), Dr("UM").ToString(), Dr("CveClasificacion").ToString().ToEntero(), Dr("Clasificacion").ToString(), AgregarProductoServicio(tCantidad, Dr("CveUM").ToString().ToEntero(), Dr("UM").ToString(), Dr("CveClasificacion").ToString().ToEntero(), Dr("Clasificacion").ToString(),
Dr("CvePS").ToString().ToEntero(), Dr("PS").ToString(), Dr("Obs").ToString(), Dr("PU").ToString().ToDecimal, Dr("Descuento").ToString().ToDecimal, Dr("CvePS").ToString().ToEntero(), Dr("PS").ToString(), Dr("Obs").ToString(), Dr("PU").ToString().ToDecimal, Dr("Descuento").ToString().ToDecimal,
CveProyecto, Proyecto, CveSubProyecto, SubProyecto, CveProyecto, Proyecto, CveSubProyecto, SubProyecto,
CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero(), CveContratoDetalle:=Dr("CveContratoDetalle").ToString().ToEntero(), CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero(), CveContratoDetalle:=Dr("CveContratoDetalle").ToString().ToEntero(),
CveVentaDetalleRemision:=Dr("CveVentaDetalle").ToString().ToEntero(), CvePromocionDetalle:=Dr("CvePromocionDetalle").ToString().ToEntero(), RegeneraIEPS:=True) CveVentaDetalleRemision:=Dr("CveVentaDetalle").ToString().ToEntero(), CvePromocionDetalle:=Dr("CvePromocionDetalle").ToString().ToEntero(), RegeneraIEPS:=True, OrdenManual:=OrdenManual)
Next Next
If DdlFiltroContrato.SelectedValue.ToEntero() > 0 Then If DdlFiltroContrato.SelectedValue.ToEntero() > 0 Then
@@ -34667,6 +34672,13 @@ Partial Class Ventas
Private Function PreparaFacturarRemision() As Boolean Private Function PreparaFacturarRemision() As Boolean
'LIMPIAMOS 'LIMPIAMOS
Dim DtOrden As DataTable = Nothing
'SI ES UNA VENTA EXISTENTE, CONSEVAR EL ORDEN
If CveVenta > 0 Then
DtOrden = TmpDT.FiltraParametros("", "Orden", {"CveVentaDetalle", "Orden"})
End If
TmpDT.Rows.Clear() TmpDT.Rows.Clear()
TxtSubTotal.Text = "0.00" TxtSubTotal.Text = "0.00"
TxtSubTotal2.Text = "0.00" TxtSubTotal2.Text = "0.00"
@@ -34688,7 +34700,7 @@ Partial Class Ventas
If RemisionesLista IsNot Nothing Then If RemisionesLista IsNot Nothing Then
RemisionesLista.Clear() RemisionesLista.Clear()
RemisionesLista.Add(CveVenta) RemisionesLista.Add(CveVenta)
CargaConceptosRemisionPorFacturar(CveVenta.ToString(), 1) CargaConceptosRemisionPorFacturar(CveVenta.ToString(), 1, DtOrden:=DtOrden)
End If End If
If TmpDT.Rows.Count = 0 Then If TmpDT.Rows.Count = 0 Then
@@ -39175,7 +39187,11 @@ Partial Class Ventas
Dim PuedeAplicarDevolucion As Boolean = False Dim PuedeAplicarDevolucion As Boolean = False
'código temporal RMF. para devoluciones de facturas cargadas de saldos iniciales. 'código temporal RMF. para devoluciones de facturas cargadas de saldos iniciales.
If UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso TxtFecha.Text.ToDate.Year < 2025 Then SaldoAlmacen = -1 If UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso TxtFecha.Text.ToDate.Year < 2025 Then
SaldoAlmacen = -1
DevolucionAlmacen = 0
End If
If SaldoAlmacen < 0 Then If SaldoAlmacen < 0 Then
If DevolucionAlmacen = 0 Then If DevolucionAlmacen = 0 Then
PuedeAplicarDevolucion = True PuedeAplicarDevolucion = True