7 Kardex OC

This commit is contained in:
rakcsle
2025-01-30 20:44:43 -07:00
parent 4fcbc0b6c3
commit 44f9fbecf7
5 changed files with 51 additions and 10 deletions

View File

@@ -216,13 +216,13 @@
</div>
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró ninguna remisión pendiente por facturar" DataKeyNames="CveVenta"
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró ninguna remisión pendiente por facturar" DataKeyNames="CveVenta,Fecha"
ToolTip="Remisiones sin Facturar"
CssClass="table table-striped table-advance table-hover Widthall ScrollAD"
data-sort="true" GridLines="None">
<Columns>
<asp:HyperLinkField HeaderText="Folio" ItemStyle-Width="100px" DataTextField ="Folio" DataNavigateUrlFormatString="/Ventas/RepRemisionesDetalle.aspx?CveVenta={0}" DataNavigateUrlFields="CveVenta" Target="_blank" />
<asp:HyperLinkField HeaderText="Fecha" ItemStyle-Width="100px" DataTextField ="Fecha" DataTextFormatString="{0:d}" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" DataNavigateUrlFields="CveVenta" />
<asp:HyperLinkField HeaderText="Fecha" ItemStyle-Width="150px" DataTextField ="Fecha" DataTextFormatString="{0:d}" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" DataNavigateUrlFields="CveVenta" />
<asp:BoundField HeaderText="Vencimiento" DataField="FechaVencimiento" DataFormatString="{0:d}" />
<asp:BoundField HeaderText="Cliente" DataField="Cliente" />
<asp:BoundField HeaderText="Contrato" DataField="TieneContrato" Visible="false" />
@@ -230,6 +230,7 @@
<asp:BoundField HeaderText="Procedimiento" DataField="Procedimiento" Visible="false" />
<asp:BoundField HeaderText="Folio Rem" DataField="Alfa1" Visible="false" />
<asp:BoundField HeaderText="Vendedor" DataField="Vendedor" />
<asp:BoundField HeaderText="Producto" DataField="PrimerCodigoPS" Visible="false" />
<asp:BoundField DataField="PorcentajeAvance" HeaderText="Facturado" DataFormatString="{0:F}%" HtmlEncode="false" />
<asp:BoundField DataField="SubTotal" HeaderText="SubTotal" DataFormatString="{0:N2}" Visible="false" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField DataField="Descuento" HeaderText="Descuento" DataFormatString="{0:N2}" Visible="false" ItemStyle-HorizontalAlign="Right" />

View File

@@ -67,7 +67,12 @@ Partial Class RepRemisiones
#End Region
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
If Not Page.IsPostBack Then
If UsuarioActual.CveEmpresa.Contiene(189) Then
GvDatos.Columns(9).Visible = True
End If
CargaSucursales()
CargaCliente()
CargaContrato()
@@ -89,18 +94,19 @@ Partial Class RepRemisiones
Sucursales = IIf(DdlSubProyectos.GetSelectedValuesM = "", "-1", DdlSubProyectos.GetSelectedValuesM).ToString
Dim Vendedores As String = IIf(DdlVendedor.GetSelectedValuesM = "", "-1", DdlVendedor.GetSelectedValuesM).ToString
Dim PrimerProducto As Boolean = If(UsuarioActual.CveEmpresa.Contiene(189), True, False)
Dim ObjVentas As New ClsVentas
If ObjVentas.GetRepRemisionesSinFacturar(FechaI, FechaF, FechaV, Sucursales, CveCliente, CveContrato, Vendedores, UsuarioActual.CveEmpresa, CveUsuarioConsulta:=UsuarioActual.CveUsuario, ConsultaInventario:=chkInv.Checked) Then
If ObjVentas.GetRepRemisionesSinFacturar(FechaI, FechaF, FechaV, Sucursales, CveCliente, CveContrato, Vendedores, UsuarioActual.CveEmpresa, CveUsuarioConsulta:=UsuarioActual.CveUsuario, ConsultaInventario:=chkInv.Checked, PrimerProducto:=PrimerProducto) Then
DtVentas = ObjVentas.DtResultados.Copy()
GvDatos.DataSource = DtVentas
End If
If DtVentas IsNot Nothing Then
GvDatos.Columns(11).Visible = DtVentas.SUMD("Descuento") > 0
GvDatos.Columns(12).Visible = DtVentas.SUMD("Descuento") > 0
End If
GvDatos.Columns(14).Visible = chkInv.Checked 'solo se visualiza si está selccionada
GvDatos.Columns(15).Visible = chkInv.Checked 'solo se visualiza si está selccionada
ObjVentas.Dispose()
GvDatos.DataBind()
@@ -124,7 +130,10 @@ Partial Class RepRemisiones
e.Row.Cells(2).ForeColor = Drawing.Color.Red
End If
e.Row.Cells(1).Text = $"<a href='./Ventas.aspx?CveVenta={e.Row.DataKey("CveVenta")}' targen='_blank'>{e.Row.DataKey("Fecha").ToDate().ToString("dd/MM/yyyy HH:mm:ss")}</a>"
End If
e.Row.FCLiteral("LtlTotal").Text = "<a class=""Texto"" target=""_blank"" href=""/Ventas/RepRemisionesDetalle.aspx?CveVenta=" & e.Row.DBCampo("CveVenta") & "&FechaI=" & FechaI & "&FechaF=" & FechaF & "&FechaV=" & FechaV & "&CveCliente=" & If(e.Row.DBCampo("CveCliente").ToString().ToEntero() > 0, e.Row.DBCampo("CveCliente").ToString(), DdlClientes.SelectedValue) & "&CveContrato=" & CveContrato & "&CveSubProyecto=" & Sucursales & "&CveMoneda=" & e.Row.DBCampo("CveMoneda") & """>" & e.Row.FCLiteral("LtlTotal").Text & "</a>"
End If