Reporte de Precios de Compras
This commit is contained in:
@@ -83,7 +83,7 @@
|
||||
</style>
|
||||
</asp:Content>
|
||||
<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>
|
||||
</li>
|
||||
<li>
|
||||
@@ -118,17 +118,16 @@
|
||||
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
<div class="row">
|
||||
<label class="col-md-1 truncate" data-toggle="tooltip" title="Almacén Destino">Proveedor:</label>
|
||||
<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>
|
||||
<div class="row">
|
||||
<label class="col-md-1 truncate" data-toggle="tooltip" title="Almacén Destino">Proveedor:</label>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
@@ -142,33 +141,29 @@
|
||||
</div>
|
||||
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
|
||||
<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"
|
||||
data-sort="true" Style="text-align: center;" GridLines="None">
|
||||
data-sort="true" Style="text-align: center;" GridLines="None" ShowHeader="true" DataKeyNames="CvePS">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="REQ" ItemStyle-HorizontalAlign="Left">
|
||||
|
||||
<%-- <asp:TemplateField HeaderText="PS" ItemStyle-HorizontalAlign="Left">
|
||||
<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>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="OC" ItemStyle-HorizontalAlign="Left">
|
||||
|
||||
<asp:TemplateField HeaderText="Ultima Compra" ItemStyle-HorizontalAlign="Right">
|
||||
<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>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Compra" ItemStyle-HorizontalAlign="Left">
|
||||
|
||||
<asp:TemplateField HeaderText="Precio Venta" ItemStyle-HorizontalAlign="Right">
|
||||
<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>
|
||||
</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>
|
||||
</asp:TemplateField>--%>
|
||||
|
||||
</Columns>
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
<RowStyle CssClass="Texto" />
|
||||
|
||||
@@ -21,13 +21,8 @@ Partial Class RepComprasPrecios
|
||||
#End Region
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
'txtFechaI.Text = Now.ToShortDateString
|
||||
'txtFechaF.Text = Now.ToShortDateString
|
||||
|
||||
'CargaSucursal()
|
||||
CargaProveedor()
|
||||
CargaDatos()
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -35,10 +30,7 @@ Partial Class RepComprasPrecios
|
||||
Public Sub CargaDatos()
|
||||
Dim ObjCompras As New ClsCompras
|
||||
|
||||
'FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim(), MinFecha.ToShortDateString)
|
||||
'FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), MaxFecha.ToShortDateString)
|
||||
|
||||
If ObjCompras.GetRepReqOCCompraInv("".ToDate, "".ToDate, DdlProveedor.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa) Then
|
||||
If ObjCompras.GetRepComprasPrecios(DdlProveedor.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
GvDatos.DataSource = ObjCompras.DtResultados
|
||||
DtCompras = ObjCompras.DtResultados
|
||||
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
|
||||
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
|
||||
'If e.Row.DBCampo("PS").ToString.Trim = "" Then
|
||||
' e.Row.CssClass = "Totales"
|
||||
|
||||
Reference in New Issue
Block a user