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

@@ -3267,7 +3267,8 @@ Public Class ClsVentas
Return Retorno Return Retorno
End Function End Function
Public Function GetRepRemisionesSinFacturar(FechaI As String, FechaF As String, FechaV As String, CveSubProyecto As String, CveCliente As Integer, CveContrato As Integer, CveVendedor As String, CveEmpresa As Integer, Optional CveUsuarioConsulta As Integer = -1, Optional ConsultaInventario As Boolean = False) As Boolean Public Function GetRepRemisionesSinFacturar(FechaI As String, FechaF As String, FechaV As String, CveSubProyecto As String, CveCliente As Integer, CveContrato As Integer, CveVendedor As String, CveEmpresa As Integer,
Optional CveUsuarioConsulta As Integer = -1, Optional ConsultaInventario As Boolean = False, Optional PrimerProducto As Boolean = False) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Vta_RepRemisionesGet") DataAdapter("PA_Vta_RepRemisionesGet")
@@ -3282,6 +3283,7 @@ Public Class ClsVentas
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta .Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta
.Add("@ConsultaInventario", SqlDbType.Bit).Value = ConsultaInventario .Add("@ConsultaInventario", SqlDbType.Bit).Value = ConsultaInventario
.Add("@PrimerProducto", SqlDbType.Bit).Value = PrimerProducto
End With End With
Try Try

View File

@@ -113,6 +113,13 @@
font-weight: 600; font-weight: 600;
color: #3e4f5e; color: #3e4f5e;
} }
.modal-dialog {
display: flex;
align-items: center;
justify-content: center;
min-height: 50vh;
}
</style> </style>
</asp:Content> </asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server"> <asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
@@ -418,7 +425,7 @@
</asp:UpdatePanel> </asp:UpdatePanel>
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-8">
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UpNumeroParte"> <asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UpNumeroParte">
<ContentTemplate> <ContentTemplate>
<asp:Label runat="server" ID="LblNumeroParte" Text="" Visible ="false"></asp:Label> <asp:Label runat="server" ID="LblNumeroParte" Text="" Visible ="false"></asp:Label>
@@ -426,7 +433,25 @@
</asp:UpdatePanel> </asp:UpdatePanel>
</div> </div>
<div class="col-md-6"> <div class="col-md-2" style="text-align:right!important">
<asp:UpdatePanel runat="server" ID="UpOCS" UpdateMode="Conditional">
<ContentTemplate>
<div id="DivIndicadorOC2" runat="server" visible="false" >
<div style=" color: gray;font-size: 12px;font-weight: bold;">
OC
</div>
<div style=" color: blue; font-size: 20px; font-weight: bold;">
<asp:LinkButton ID="LnkIndicador_OC2" Text="" OnClick="LnkIndicador_OC_Click" runat="server" CssClass="Texto" />
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<div class="col-md-2">
<div class="text-right" style="margin: 5px 0px;"> <div class="text-right" style="margin: 5px 0px;">
<input type="text" id="TxtBusqueda2" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GvM.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" /> <input type="text" id="TxtBusqueda2" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GvM.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GvM.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a> <a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GvM.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>

View File

@@ -301,7 +301,7 @@ Partial Class Inventarios_Kardex
If NumeroParte.Trim.Length > 0 Then If NumeroParte.Trim.Length > 0 Then
If UsuarioActual.TienePermisoPagina(13) Then If UsuarioActual.TienePermisoPagina(13) Then
LblNumeroParte.Text = $" Producto: <a href='../Ventas/ProductosServicios.aspx?CvePS={CvePS}' class='Texto' target='_blank' > {Codigo} -{NumeroParte} - {PS}</a>" LblNumeroParte.Text = $" Producto: <a href='../Ventas/ProductosServicios.aspx?CvePS={CvePS}' class='Texto' target='_blank' >{Codigo}</a> - <a href='../Ventas/ProductosServicios.aspx?CvePS={CvePS}' class='Texto' target='_blank' >{NumeroParte}</a> - <a href='../Ventas/ProductosServicios.aspx?CvePS={CvePS}' class='Texto' target='_blank' >{PS}</a>"
Else Else
LblNumeroParte.Text = $" Producto: {NumeroParte}" LblNumeroParte.Text = $" Producto: {NumeroParte}"
End If End If
@@ -333,10 +333,12 @@ Partial Class Inventarios_Kardex
If ObjOC.PendientesCompra(ddlProducto2.SelectedValue.ToEntero, tCveSubProyectos, UsuarioActual.CveEmpresa) Then If ObjOC.PendientesCompra(ddlProducto2.SelectedValue.ToEntero, tCveSubProyectos, UsuarioActual.CveEmpresa) Then
GvOC.DataSource = ObjOC.DtResultados.Copy.FiltraParametros("", "Fecha Desc") GvOC.DataSource = ObjOC.DtResultados.Copy.FiltraParametros("", "Fecha Desc")
LnkIndicador_OC.Text = ObjOC.DtResultados.Copy.SUM("CantidadPendienteVincular").ToString() LnkIndicador_OC.Text = ObjOC.DtResultados.Copy.SUM("CantidadPendienteVincular").ToString()
LnkIndicador_OC2.Text = ObjOC.DtResultados.Copy.SUM("CantidadPendienteVincular").ToString()
End If End If
ObjOC.Dispose() ObjOC.Dispose()
GvOC.DataBind() GvOC.DataBind()
UpModalOC.Update() UpModalOC.Update()
UpOCS.Update()
End Sub End Sub
Private Function CargarKardex(CvePS As Integer) As DataTable Private Function CargarKardex(CvePS As Integer) As DataTable
@@ -408,6 +410,8 @@ Partial Class Inventarios_Kardex
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
CargarOCPendientesCompra() CargarOCPendientesCompra()
DivIndicadorOC.Visible = True DivIndicadorOC.Visible = True
DivIndicadorOC2.Visible = True
UpOCS.Update()
End If End If
UpIndicadores.Update() UpIndicadores.Update()

View File

@@ -216,13 +216,13 @@
</div> </div>
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate> <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" ToolTip="Remisiones sin Facturar"
CssClass="table table-striped table-advance table-hover Widthall ScrollAD" CssClass="table table-striped table-advance table-hover Widthall ScrollAD"
data-sort="true" GridLines="None"> data-sort="true" GridLines="None">
<Columns> <Columns>
<asp:HyperLinkField HeaderText="Folio" ItemStyle-Width="100px" DataTextField ="Folio" DataNavigateUrlFormatString="/Ventas/RepRemisionesDetalle.aspx?CveVenta={0}" DataNavigateUrlFields="CveVenta" Target="_blank" /> <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="Vencimiento" DataField="FechaVencimiento" DataFormatString="{0:d}" />
<asp:BoundField HeaderText="Cliente" DataField="Cliente" /> <asp:BoundField HeaderText="Cliente" DataField="Cliente" />
<asp:BoundField HeaderText="Contrato" DataField="TieneContrato" Visible="false" /> <asp:BoundField HeaderText="Contrato" DataField="TieneContrato" Visible="false" />
@@ -230,6 +230,7 @@
<asp:BoundField HeaderText="Procedimiento" DataField="Procedimiento" Visible="false" /> <asp:BoundField HeaderText="Procedimiento" DataField="Procedimiento" Visible="false" />
<asp:BoundField HeaderText="Folio Rem" DataField="Alfa1" Visible="false" /> <asp:BoundField HeaderText="Folio Rem" DataField="Alfa1" Visible="false" />
<asp:BoundField HeaderText="Vendedor" DataField="Vendedor" /> <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="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="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" /> <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 #End Region
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load 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() CargaSucursales()
CargaCliente() CargaCliente()
CargaContrato() CargaContrato()
@@ -89,18 +94,19 @@ Partial Class RepRemisiones
Sucursales = IIf(DdlSubProyectos.GetSelectedValuesM = "", "-1", DdlSubProyectos.GetSelectedValuesM).ToString Sucursales = IIf(DdlSubProyectos.GetSelectedValuesM = "", "-1", DdlSubProyectos.GetSelectedValuesM).ToString
Dim Vendedores As String = IIf(DdlVendedor.GetSelectedValuesM = "", "-1", DdlVendedor.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 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() DtVentas = ObjVentas.DtResultados.Copy()
GvDatos.DataSource = DtVentas GvDatos.DataSource = DtVentas
End If End If
If DtVentas IsNot Nothing Then If DtVentas IsNot Nothing Then
GvDatos.Columns(11).Visible = DtVentas.SUMD("Descuento") > 0 GvDatos.Columns(12).Visible = DtVentas.SUMD("Descuento") > 0
End If 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() ObjVentas.Dispose()
GvDatos.DataBind() GvDatos.DataBind()
@@ -124,7 +130,10 @@ Partial Class RepRemisiones
e.Row.Cells(2).ForeColor = Drawing.Color.Red e.Row.Cells(2).ForeColor = Drawing.Color.Red
End If 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 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>" 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 End If