RepOC ajuste unificar conulsta de almacén comprado recibido
This commit is contained in:
@@ -1726,57 +1726,6 @@ 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
|
||||||
|
|
||||||
|
|||||||
@@ -407,6 +407,16 @@ 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()
|
||||||
|
|
||||||
|
|
||||||
|
DivIndicadoresCompradoRecibido.Visible = True
|
||||||
|
DivIndicadoresCompradoRecibido.InnerHtml = String.Empty
|
||||||
|
|
||||||
|
Dim Recibidos As Decimal = DtOC.SUM("Comprado")
|
||||||
|
Dim Comprados As Decimal = DtOC.SUM("Recibido")
|
||||||
|
|
||||||
|
MuestraIndicadorCompradoRecibido(DivIndicadoresCompradoRecibido, "blue", "fa fa-truck", "Almacén", Recibidos.ToString("###,###,###.00"), "Comprados", "", "Recibidos", Comprados.ToString("###,###,###.00"), "")
|
||||||
|
UPPIndicadorCompradoRecibido.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
|
||||||
@@ -435,35 +445,7 @@ Partial Class RepOC
|
|||||||
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()
|
||||||
|
|||||||
Reference in New Issue
Block a user