Reporte de Precios de Compras

This commit is contained in:
janeth arvizu
2019-10-23 11:55:47 -07:00
parent b400414c1f
commit 67e049f541
2 changed files with 45 additions and 33 deletions

View File

@@ -83,7 +83,7 @@
</style> </style>
</asp:Content> </asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server"> <asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
<li> <li>
<asp:LinkButton ID="LnkPdf" runat="server"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton> <asp:LinkButton ID="LnkPdf" runat="server"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
</li> </li>
<li> <li>
@@ -118,17 +118,16 @@
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" /> <asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
</div> </div>
<div class="portlet-body"> <div class="portlet-body">
<div class="row"> <div class="row">
<label class="col-md-1 truncate" data-toggle="tooltip" title="Almacén Destino">Proveedor:</label> <label class="col-md-1 truncate" data-toggle="tooltip" title="Almacén Destino">Proveedor:</label>
<div class="col-md-2"> <div class="col-md-2">
<asp:DropDownList ID="DdlProveedor" DataTextField="RazonSocial" DataValueField="CveProveedor" CssClass="form-control input-sm input-small select2me" Width="150px" runat="server"></asp:DropDownList> <asp:DropDownList ID="DdlProveedor" DataTextField="RazonSocial" DataValueField="CveProveedor" CssClass="form-control input-sm input-small select2me" Width="150px" runat="server"></asp:DropDownList>
</div>
</div> </div>
</div> </div>
</div>
</div> </div>
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>> <div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
</div> </div>
</div> </div>
</ContentTemplate> </ContentTemplate>
@@ -142,33 +141,29 @@
</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ó información" <asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="True" EmptyDataText="No se encontró información"
CssClass="table table-striped table-advance table-hover Widthall ScrollAD" CssClass="table table-striped table-advance table-hover Widthall ScrollAD"
data-sort="true" Style="text-align: center;" GridLines="None"> data-sort="true" Style="text-align: center;" GridLines="None" ShowHeader="true" DataKeyNames="CvePS">
<Columns> <Columns>
<asp:TemplateField HeaderText="REQ" ItemStyle-HorizontalAlign="Left">
<%-- <asp:TemplateField HeaderText="PS" ItemStyle-HorizontalAlign="Left">
<ItemTemplate> <ItemTemplate>
<asp:HyperLink ID="HplREQ" runat="server" CssClass="Texto" Target="_blank" NavigateUrl='<%# Eval("CveOCREQ", "/OC/OC.aspx?OC={0}")%>' Text='<%# Eval("FolioREQ") %>'></asp:HyperLink> <asp:Literal ID="HplREQ" runat="server" Text='<%# Eval("PS") %>'></asp:Literal>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="OC" ItemStyle-HorizontalAlign="Left"> <asp:TemplateField HeaderText="Ultima Compra" ItemStyle-HorizontalAlign="Right">
<ItemTemplate> <ItemTemplate>
<asp:HyperLink ID="HplOC" runat="server" CssClass="Texto" Target="_blank" NavigateUrl='<%# Eval("CveOC", "/OC/OC.aspx?OC={0}")%>' Text='<%# Eval("FolioOC") %>'></asp:HyperLink> <asp:Literal ID="HplOC" runat="server" Text='<%# Eval("UltCompra", "{0:N2}") %>'></asp:Literal>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Compra" ItemStyle-HorizontalAlign="Left"> <asp:TemplateField HeaderText="Precio Venta" ItemStyle-HorizontalAlign="Right">
<ItemTemplate> <ItemTemplate>
<asp:HyperLink ID="HplCompra" runat="server" CssClass="Texto" Target="_blank" NavigateUrl='<%# Eval("CveCompra", "/Compras/Compras.aspx?CveCompra={0}")%>' Text='<%# Eval("FolioCompra") %>'></asp:HyperLink> <asp:Literal ID="HplOC2" runat="server" Text='<%# Eval("PrecioLista", "{0:N2}") %>'></asp:Literal>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>--%>
<asp:TemplateField HeaderText="Inventario" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:HyperLink ID="HplInv" runat="server" CssClass="Texto" Target="_blank" NavigateUrl='<%# Eval("CveMovimiento", "/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}")%>' Text='<%# Eval("FolioMov") %>'></asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>
</Columns> </Columns>
<HeaderStyle CssClass="Titulos" /> <HeaderStyle CssClass="Titulos" />
<RowStyle CssClass="Texto" /> <RowStyle CssClass="Texto" />

View File

@@ -21,13 +21,8 @@ Partial Class RepComprasPrecios
#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
'txtFechaI.Text = Now.ToShortDateString
'txtFechaF.Text = Now.ToShortDateString
'CargaSucursal()
CargaProveedor() CargaProveedor()
CargaDatos() CargaDatos()
End If End If
End Sub End Sub
@@ -35,10 +30,7 @@ Partial Class RepComprasPrecios
Public Sub CargaDatos() Public Sub CargaDatos()
Dim ObjCompras As New ClsCompras Dim ObjCompras As New ClsCompras
'FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim(), MinFecha.ToShortDateString) If ObjCompras.GetRepComprasPrecios(DdlProveedor.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
'FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), MaxFecha.ToShortDateString)
If ObjCompras.GetRepReqOCCompraInv("".ToDate, "".ToDate, DdlProveedor.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa) Then
GvDatos.DataSource = ObjCompras.DtResultados GvDatos.DataSource = ObjCompras.DtResultados
DtCompras = ObjCompras.DtResultados DtCompras = ObjCompras.DtResultados
GvDatos.DataBind() GvDatos.DataBind()
@@ -53,6 +45,31 @@ Partial Class RepComprasPrecios
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowType = DataControlRowType.DataRow Then
GvDatos.HeaderRow.Cells(0).Visible = False
e.Row.Cells(0).Visible = False
e.Row.HorizontalAlign = HorizontalAlign.Right
e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Left
If e.Row.DBCampo("CvePS") = "" Then
e.Row.CssClass = "Totales"
End If
For Each Cells As TableCell In e.Row.Cells
Dim Celda As String = Cells.Text
If IsNumeric(Celda) Then
'If Celda.ToDouble = 0 Then
' Cells.Text = ""
'Else
Dim ce = DirectCast(Cells, System.Web.UI.WebControls.DataControlFieldCell)
If Not ce.ContainingField.HeaderText = "PS" Then
Cells.Text = Cells.Text.FormatoNumero(2)
End If
'End If
End If
Next
'Cuando es titulo 'Cuando es titulo
'If e.Row.DBCampo("PS").ToString.Trim = "" Then 'If e.Row.DBCampo("PS").ToString.Trim = "" Then
' e.Row.CssClass = "Totales" ' e.Row.CssClass = "Totales"