ajustes rep OC 13, cuentas 119
This commit is contained in:
@@ -1726,6 +1726,57 @@ Public Class ClsOC
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Public Function GetOrdenesCompraCompradosRecibidosRep(Tipo As String, CveProyecto As Integer, CveSubProyecto As Integer, CveClasificacion As Integer, CveEstatus As Integer, FechaInicio As Date,
|
||||||
|
FechaFin As Date, CveOrdenCompra As Integer, CveProveedor As Integer, Folio As Integer, CveUsuarioRegistro As Integer, CveUsuario As Integer,
|
||||||
|
CveEmpresa As Integer, CvePS As Integer, Optional PendientePorSurtir As Boolean = False, Optional CveCliente As Integer = -1, Optional Guia As String = "-1",
|
||||||
|
Optional CveActivoFijo As Integer = -1, Optional SoloSubProyectosConPermiso As Boolean = False, Optional CveUsuarioAutorizo As Integer = -1,
|
||||||
|
Optional CveUsuarioAsignado As Integer = -1, Optional EntregaDirecta As Integer = -1, Optional TopSelect As Integer = 10000, Optional CveMoneda As Integer = -1,
|
||||||
|
Optional MetodoPago As Integer = -1, Optional Serie As String = "-1", Optional TieneAnticipo As Integer = -1) As Boolean
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
|
DataAdapter("PA_OC_OrdenesCompraCompradosRecibidosRep")
|
||||||
|
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@Tipo", SqlDbType.VarChar).Value = Tipo
|
||||||
|
.Add("@CveProyecto", SqlDbType.Int).Value = CveProyecto
|
||||||
|
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||||
|
.Add("@CveEstatus", SqlDbType.Int).Value = CveEstatus
|
||||||
|
.Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio
|
||||||
|
.Add("@FechaFin", SqlDbType.Date).Value = FechaFin
|
||||||
|
.Add("@CveOrdenCompra", SqlDbType.Int).Value = CveOrdenCompra
|
||||||
|
.Add("@CveUsuarioRegistro", SqlDbType.Int).Value = CveUsuarioRegistro
|
||||||
|
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||||
|
.Add("@Folio", SqlDbType.Int).Value = Folio
|
||||||
|
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
.Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
|
||||||
|
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||||
|
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||||
|
.Add("@PendientePorSurtir", SqlDbType.Bit).Value = PendientePorSurtir
|
||||||
|
.Add("@Guia", SqlDbType.VarChar).Value = Guia
|
||||||
|
.Add("@CveActivoFijo", SqlDbType.Int).Value = CveActivoFijo
|
||||||
|
.Add("@SoloSubProyectosConPermiso", SqlDbType.Bit).Value = SoloSubProyectosConPermiso
|
||||||
|
.Add("@CveUsuarioAutorizo", SqlDbType.Int).Value = CveUsuarioAutorizo
|
||||||
|
.Add("@CveUsuarioAsignado", SqlDbType.Int).Value = CveUsuarioAsignado
|
||||||
|
.Add("@EntregaDirecta", SqlDbType.Int).Value = EntregaDirecta
|
||||||
|
.Add("@TopSelect", SqlDbType.Int).Value = TopSelect
|
||||||
|
.Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda
|
||||||
|
.Add("@MetodoPago", SqlDbType.Int).Value = MetodoPago
|
||||||
|
.Add("@Serie", SqlDbType.VarChar).Value = Serie
|
||||||
|
.Add("@TieneAnticipo", SqlDbType.Int).Value = TieneAnticipo
|
||||||
|
End With
|
||||||
|
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al obtener Ordenes de Compras Comprados Recividos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
Public Function GetOrdenesCompraRepReqXOC(Folio As Integer, FechaInicio As String, FechaFin As String, CveProveedor As Integer, CveVendedor As Integer, CveCliente As Integer, CveEmpresa As Integer, Grupo As Integer) As Boolean
|
Public Function GetOrdenesCompraRepReqXOC(Folio As Integer, FechaInicio As String, FechaFin As String, CveProveedor As Integer, CveVendedor As Integer, CveCliente As Integer, CveEmpresa As Integer, Grupo As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
|
|||||||
@@ -554,6 +554,7 @@ Partial Class Contabilidad_RepBalanceGeneral
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub GvPatrimonio_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
Protected Sub GvPatrimonio_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||||
|
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
If e.Row.DBCampo("CtaMayor").ToString.ToEntero < 0 Then
|
If e.Row.DBCampo("CtaMayor").ToString.ToEntero < 0 Then
|
||||||
TotalPatrimonioActual += e.Row.DBCampo("ImporteActual").ToString.ToDouble
|
TotalPatrimonioActual += e.Row.DBCampo("ImporteActual").ToString.ToDouble
|
||||||
@@ -585,6 +586,7 @@ Partial Class Contabilidad_RepBalanceGeneral
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|||||||
@@ -165,8 +165,8 @@ Partial Class AC_RepEstadoActividades
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaGrids()
|
Private Sub CargaGrids()
|
||||||
DtIngresos = DtDatos.FiltraParametros("Tipo ='H' ")
|
DtIngresos = DtDatos.FiltraParametros("(Tipo ='H' OR Codigo like '4020%') AND NOT(Codigo like '5030%' OR Codigo like '7020%') ")
|
||||||
DtGastos = DtDatos.FiltraParametros("Tipo ='G' ")
|
DtGastos = DtDatos.FiltraParametros("(Tipo ='G' AND Codigo NOT like '4020%') OR (Codigo like '5030%' OR Codigo like '7020%') ")
|
||||||
Dim Row As DataRow = DtIngresos.NewRow
|
Dim Row As DataRow = DtIngresos.NewRow
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
Option Strict On
|
Option Strict On
|
||||||
|
|
||||||
Imports System.Data
|
Imports System.Data
|
||||||
Imports Extensiones
|
|
||||||
Imports Microsoft.Reporting.WebForms
|
Imports Microsoft.Reporting.WebForms
|
||||||
Partial Class Contabilidad2_RepEstadoResultados
|
Partial Class Contabilidad2_RepEstadoResultados
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
@@ -192,8 +191,8 @@ Partial Class Contabilidad2_RepEstadoResultados
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaGrids()
|
Private Sub CargaGrids()
|
||||||
DtIngresos = DtDatos.FiltraParametros("Orden Like '0004%' OR Tipo = 'H'")
|
DtIngresos = DtDatos.FiltraParametros("Orden Like '0004%' OR Tipo = 'H' OR Codigo like '4020%' ")
|
||||||
DtGastos = DtDatos.FiltraParametros("Orden Like '0005%' OR Tipo = 'G'")
|
DtGastos = DtDatos.FiltraParametros("Orden Like '0005%' OR Tipo = 'G' OR (Codigo like '5030%' OR Codigo like '7020%') ")
|
||||||
Dim Row As DataRow = DtIngresos.NewRow
|
Dim Row As DataRow = DtIngresos.NewRow
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -294,9 +294,15 @@
|
|||||||
<asp:UpdatePanel ID="UpBusqueda" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpBusqueda" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<div class="row" style="display:flex; justify-content:flex-end; padding-bottom: 12px; padding-right: 15px;">
|
<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">
|
<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 id="DivIndicadores" align="Right" runat="server" visible="false">
|
||||||
</div>
|
</div>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
|
|||||||
@@ -398,6 +398,7 @@ Partial Class RepOC
|
|||||||
If UsuarioActual.TienePermisoProceso(227) Then
|
If UsuarioActual.TienePermisoProceso(227) Then
|
||||||
DivIndicadores.Visible = True
|
DivIndicadores.Visible = True
|
||||||
DivIndicadores.InnerHtml = String.Empty
|
DivIndicadores.InnerHtml = String.Empty
|
||||||
|
|
||||||
Dim Cantidad As Integer = DtOC.COUNT("CveOrdenCompra")
|
Dim Cantidad As Integer = DtOC.COUNT("CveOrdenCompra")
|
||||||
Dim TotalPesos As Double = DtOC.SUM("Total", "CveMoneda = 1")
|
Dim TotalPesos As Double = DtOC.SUM("Total", "CveMoneda = 1")
|
||||||
Dim TotalDolares As Double = DtOC.SUM("Total", "CveMoneda = 2")
|
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")
|
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()
|
UPPIndicador.Update()
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If DtOC IsNot Nothing AndAlso DtOC.Rows.Count > 0 Then
|
If DtOC IsNot Nothing AndAlso DtOC.Rows.Count > 0 Then
|
||||||
@@ -432,6 +434,37 @@ Partial Class RepOC
|
|||||||
GvConsultar.Columns(15).Visible = False
|
GvConsultar.Columns(15).Visible = False
|
||||||
End If
|
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
|
End If
|
||||||
OC.Dispose()
|
OC.Dispose()
|
||||||
GvConsultar.DataBind()
|
GvConsultar.DataBind()
|
||||||
@@ -638,6 +671,7 @@ Partial Class RepOC
|
|||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "Indicadores"
|
#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)
|
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
|
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("{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>")
|
htmldiv.AppendFormat("</div></div></div>")
|
||||||
DIV.InnerHtml = htmldiv.ToString
|
DIV.InnerHtml = htmldiv.ToString
|
||||||
End Sub
|
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 Region
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
Reference in New Issue
Block a user