-- 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 class="row" style="max-width: 780px;">
<div class="col-md-12" style="display: flex; justify-content: flex-end">
<table>
<div class="col-md-12" style="display: flex;">
<table style="width:100%">
<tr>
<td class="text-right" style="text-align: right;" runat="server" id="DivListasPrecios2" visible="false">Lista: </td>
<td id="DivListasPrecios" visible="false" runat="server">
@@ -130,9 +129,23 @@
</td>
</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 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>
</td>
</tr>

View File

@@ -154,6 +154,10 @@ Partial Class Inventarios_Default
ObjInventarios.Dispose()
GV.DataBind()
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
CargaListaPrecios(CvePS)
End If
UPDatos.Update()
Else
@@ -161,6 +165,18 @@ Partial Class Inventarios_Default
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
Private Sub CargaPS(CvePS As Integer)
If CvePS <= 0 Then Exit Sub

View File

@@ -217,7 +217,7 @@
</a>
</li>
<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>
Buscar Existencias
</a>

View File

@@ -34526,7 +34526,7 @@ Partial Class Ventas
Return Valido
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
If ObjClientes.GetVentasRemisionesTotales(CveCliente, CveRemisiones, TipoCargas, UsuarioActual.CveEmpresa) Then
DtRemisionesPS = ObjClientes.DtResultados
@@ -34569,11 +34569,16 @@ Partial Class Ventas
End If
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(),
Dr("CvePS").ToString().ToEntero(), Dr("PS").ToString(), Dr("Obs").ToString(), Dr("PU").ToString().ToDecimal, Dr("Descuento").ToString().ToDecimal,
CveProyecto, Proyecto, CveSubProyecto, SubProyecto,
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
If DdlFiltroContrato.SelectedValue.ToEntero() > 0 Then
@@ -34667,6 +34672,13 @@ Partial Class Ventas
Private Function PreparaFacturarRemision() As Boolean
'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()
TxtSubTotal.Text = "0.00"
TxtSubTotal2.Text = "0.00"
@@ -34688,7 +34700,7 @@ Partial Class Ventas
If RemisionesLista IsNot Nothing Then
RemisionesLista.Clear()
RemisionesLista.Add(CveVenta)
CargaConceptosRemisionPorFacturar(CveVenta.ToString(), 1)
CargaConceptosRemisionPorFacturar(CveVenta.ToString(), 1, DtOrden:=DtOrden)
End If
If TmpDT.Rows.Count = 0 Then
@@ -39175,7 +39187,11 @@ Partial Class Ventas
Dim PuedeAplicarDevolucion As Boolean = False
'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 DevolucionAlmacen = 0 Then
PuedeAplicarDevolucion = True