ajustes rep OC 13, cuentas 119
This commit is contained in:
@@ -294,9 +294,15 @@
|
||||
<asp:UpdatePanel ID="UpBusqueda" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="row" style="display:flex; justify-content:flex-end; padding-bottom: 12px; padding-right: 15px;">
|
||||
<asp:UpdatePanel class="col-md-4" style="max-width: 300px;" ID="UPPIndicadorCompradoRecibido" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
<div id="DivIndicadoresCompradoRecibido" align="Right" runat="server" visible="false" style="max-width:300px!important">
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel class="col-md-4" style="min-width: 450px;" ID="UPPIndicador" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
<ContentTemplate>
|
||||
<div id="DivIndicadores" align="Right" runat="server" visible="false">
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
|
||||
@@ -398,6 +398,7 @@ Partial Class RepOC
|
||||
If UsuarioActual.TienePermisoProceso(227) Then
|
||||
DivIndicadores.Visible = True
|
||||
DivIndicadores.InnerHtml = String.Empty
|
||||
|
||||
Dim Cantidad As Integer = DtOC.COUNT("CveOrdenCompra")
|
||||
Dim TotalPesos As Double = DtOC.SUM("Total", "CveMoneda = 1")
|
||||
Dim TotalDolares As Double = DtOC.SUM("Total", "CveMoneda = 2")
|
||||
@@ -405,6 +406,7 @@ Partial Class RepOC
|
||||
|
||||
MuestraIndicador(DivIndicadores, "green-haze", "fa fa-money", "Órdenes de Compra", Cantidad.ToString, "Cantidad", "$" + Total.FormatoNumero, "Total", "$" + TotalPesos.FormatoNumero, "Pesos", "$" + TotalDolares.FormatoNumero, "Dólares")
|
||||
UPPIndicador.Update()
|
||||
|
||||
End If
|
||||
|
||||
If DtOC IsNot Nothing AndAlso DtOC.Rows.Count > 0 Then
|
||||
@@ -432,6 +434,37 @@ Partial Class RepOC
|
||||
GvConsultar.Columns(15).Visible = False
|
||||
End If
|
||||
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(227) And UsuarioActual.CveRol = 1 Then
|
||||
|
||||
DivIndicadoresCompradoRecibido.Visible = True
|
||||
DivIndicadoresCompradoRecibido.InnerHtml = String.Empty
|
||||
|
||||
|
||||
If OC.GetOrdenesCompraCompradosRecibidosRep(DdlTipo.SelectedValue.ToString, DdlProyectos.SelectedValue.ToEntero, DdlSubProyectos.SelectedValue.ToEntero, DDlClasificacion.SelectedValue.ToEntero,
|
||||
DdlEstatus.SelectedValue.ToEntero, FI, FF, -1, DdlProveedores.SelectedValue.ToEntero, If(txtFolio.Text.ToEntero = 0, -1, txtFolio.Text.ToEntero), ddlUsuario.SelectedValue.ToEntero,
|
||||
UsuarioActual.CveUsuario, UsuarioActual.Empresa.CveEmpresa, If(DDlPS.SelectedValue = "", -1, DDlPS.SelectedValue.ToEntero), False,
|
||||
ddlclientes.SelectedValue.ToEntero, CveActivoFijo:=DdlActivoFijo.SelectedValue.ToEntero, SoloSubProyectosConPermiso:=If(UsuarioActual.Empresa.Funcionalidad(530) = "1", True, False),
|
||||
CveUsuarioAutorizo:=DdlUsuarioAutorizo.SelectedValue.ToEntero(), CveUsuarioAsignado:=DdlUsuarioAsignado.SelectedValue.ToEntero(), EntregaDirecta:=DdlEntregaDirecta.SelectedValue.ToEntero(),
|
||||
CveMoneda:=DdlMoneda.SelectedValue.ToEntero(), MetodoPago:=DdlMetodoPago.SelectedValue.ToEntero, TieneAnticipo:=DdlTieneAnticipo.SelectedValue.ToEntero) Then
|
||||
|
||||
Dim Recibidos As Decimal = 0D
|
||||
Dim Comprados As Decimal = 0D
|
||||
|
||||
If OC.DtResultados.Rows.Count > 0 Then
|
||||
Recibidos = OC.DtResultados.Rows(0)("Comprado").ToString.ToDecimal
|
||||
Comprados = OC.DtResultados.Rows(0)("Recibido").ToString.ToDecimal
|
||||
End If
|
||||
|
||||
MuestraIndicadorCompradoRecibido(DivIndicadoresCompradoRecibido, "blue", "fa fa-truck", "Almacén", Recibidos.ToString("###,###,###.00"), "Comprados", "", "Recibidos", Comprados.ToString("###,###,###.00"), "")
|
||||
|
||||
End If
|
||||
|
||||
UPPIndicadorCompradoRecibido.Update()
|
||||
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
OC.Dispose()
|
||||
GvConsultar.DataBind()
|
||||
@@ -638,6 +671,7 @@ Partial Class RepOC
|
||||
#End Region
|
||||
|
||||
#Region "Indicadores"
|
||||
|
||||
Private Sub MuestraIndicador(DIV As HtmlGenericControl, Color As String, Icono As String, Titulo As String, C1 As String, CT1 As String, C2 As String, CT2 As String, C3 As String, CT3 As String, C4 As String, CT4 As String)
|
||||
Dim htmldiv As New StringBuilder
|
||||
htmldiv.AppendFormat("{0}<div class='dashboard-stat {1}'><div class='visual'><i class='{2}' '=''></i></div>", DIV.InnerHtml, Color, Icono)
|
||||
@@ -648,6 +682,24 @@ Partial Class RepOC
|
||||
htmldiv.AppendFormat("</div></div></div>")
|
||||
DIV.InnerHtml = htmldiv.ToString
|
||||
End Sub
|
||||
|
||||
Private Sub MuestraIndicadorCompradoRecibido(DIV As HtmlGenericControl, Color As String, Icono As String, Titulo As String, C1 As String, CT1 As String, C2 As String, CT2 As String, C3 As String, CT3 As String)
|
||||
Dim htmldiv As New StringBuilder
|
||||
htmldiv.AppendFormat("{0}<div class='dashboard-stat {1}'><div class='visual'><i class='{2}' '=''></i></div>", DIV.InnerHtml, Color, Icono)
|
||||
htmldiv.AppendFormat("<div class='details'><div class='number'>{0}</div><div class='desc'>", Titulo)
|
||||
|
||||
htmldiv.AppendFormat("<label class='indicadortipo4 col-md-6 tooltips' data-original-title='{0}'>{1}</label>", "", "")
|
||||
htmldiv.AppendFormat("<label class='indicadortipo4 col-md-6 tooltips' data-original-title='{0}'>{1}</label>", CT1, C1)
|
||||
htmldiv.AppendFormat("<label class='indicadortipo4 col-md-6 tooltips' data-original-title='{0}'>{1}</label>", "", "")
|
||||
htmldiv.AppendFormat("<label class='indicadortipo4 col-md-6 tooltips' data-original-title='{0}'>{1}</label>", CT2, C2)
|
||||
htmldiv.AppendFormat("<label class='indicadortipo4 col-md-6 tooltips' data-original-title='{0}'>{1}</label>", "", "")
|
||||
htmldiv.AppendFormat("<label class='indicadortipo4 col-md-6 tooltips' data-original-title='{0}'>{1}</label>", CT3, C3)
|
||||
'htmldiv.AppendFormat("<label class='indicadortipo4 col-md-6 tooltips' data-original-title='{0}'>{1}</label>", CT4, C4)
|
||||
htmldiv.AppendFormat("</div></div></div>")
|
||||
DIV.InnerHtml = htmldiv.ToString
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user