From 1c89f06256e51ee7216815bf6b520ebca4c92046 Mon Sep 17 00:00:00 2001 From: rmolina Date: Mon, 16 Dec 2019 09:19:35 -0700 Subject: [PATCH] =?UTF-8?q?-=20ventas,=20que=20al=20editar=20pregunte=20en?= =?UTF-8?q?=20la=20existencia=20sea=20producto=20--=20comprobaciones,=20el?= =?UTF-8?q?=20redondeo=20de=20%=20de=20pago=20--=20clsinventarios.=20param?= =?UTF-8?q?etro=20de=20clasificaci=C3=B3n=20en=20kardex=20horizontal?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App_Code/ClsInventarios.vb | 5 +++-- Compras/ReembolsosComprobaciones.aspx.vb | 2 +- Inventarios/KardexAlmacenHorizontal.aspx.vb | 2 +- Ventas/Ventas.aspx.vb | 3 ++- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb index c74ea1059..4d3dd108d 100644 --- a/App_Code/ClsInventarios.vb +++ b/App_Code/ClsInventarios.vb @@ -1453,7 +1453,7 @@ Public Class ClsInventarios Return Retorno End Function - Public Function GetKardexAlmacenHorizontal(CvePS As Integer, FechaFin As Date, CveAlmacen As Integer, CveUnidadMedida As Integer, CveProveedor As Integer, CveTipoAlmacen As Integer, IncluyeTransitorios As Integer, CveUsuario As Integer, CveEmpresa As Integer, Optional CondicionExistencias As Integer = 0) As Boolean + Public Function GetKardexAlmacenHorizontal(CvePS As Integer, FechaFin As Date, CveAlmacen As Integer, CveUnidadMedida As Integer, CveProveedor As Integer, CveTipoAlmacen As Integer, IncluyeTransitorios As Integer, CveClasificacion As Integer, CveUsuario As Integer, CveEmpresa As Integer, Optional CondicionExistencias As Integer = 0) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Inv_KardexAlmacenHorizontalGet") @@ -1461,7 +1461,8 @@ Public Class ClsInventarios With SqlAdapter.SelectCommand.Parameters '.Add("@FechaI", SqlDbType.VarChar).Value = FechaI .Add("@FechaFin", SqlDbType.Date).Value = FechaFin - .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion .Add("@CvePS", SqlDbType.Int).Value = CvePS .Add("@CveAlmacen", SqlDbType.Int).Value = CveAlmacen .Add("@CveUnidadMedida", SqlDbType.Int).Value = CveUnidadMedida diff --git a/Compras/ReembolsosComprobaciones.aspx.vb b/Compras/ReembolsosComprobaciones.aspx.vb index 453efc16e..ad4471d55 100644 --- a/Compras/ReembolsosComprobaciones.aspx.vb +++ b/Compras/ReembolsosComprobaciones.aspx.vb @@ -656,7 +656,7 @@ Partial Class Compras_ReembolsosComprobaciones End If End If - If gvr.DataKey("Original").ToDecimal > 0 Then PorcentajePago = (ImporteMovto / gvr.DataKey("Original").ToDecimal).RoundSQL Else PorcentajePago = 1 + If gvr.DataKey("Original").ToDecimal > 0 Then PorcentajePago = (ImporteMovto / gvr.DataKey("Original").ToDecimal) Else PorcentajePago = 1 If Not ChkReembolsarSinBancos.Checked AndAlso (Not HdnCheque.Value.ToEntero > 0 Or Not UsuarioActual.CveEmpresa.Contiene(119)) Then 'Si es caja chica metemos el concepto 30, si es funcionario metemos 29 diff --git a/Inventarios/KardexAlmacenHorizontal.aspx.vb b/Inventarios/KardexAlmacenHorizontal.aspx.vb index 05f4dc33f..75cb2e694 100644 --- a/Inventarios/KardexAlmacenHorizontal.aspx.vb +++ b/Inventarios/KardexAlmacenHorizontal.aspx.vb @@ -128,7 +128,7 @@ Partial Class Inventarios_KardexAlmacen Dim CveAlmacen As Integer = ddlAlmacen.SelectedValue.ToEntero Dim CveProveedorCompra As Integer = If(DdlProveedor.SelectedValue.ToEntero > 0, DdlProveedor.SelectedValue.ToEntero, -1) - If ObjMovimientos.GetKardexAlmacenHorizontal(CvePS, FechaF, CveAlmacen, DdlUnidadMedida.SelectedValue.ToEntero, CveProveedorCompra, DdlTipoAlmacen.SelectedValue.ToEntero(), If(ChkIncluyeTransitorios.Checked, 1, 0), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CondicionExistencias:=DdlExistencia.SelectedValue) Then + If ObjMovimientos.GetKardexAlmacenHorizontal(CvePS, FechaF, CveAlmacen, DdlUnidadMedida.SelectedValue.ToEntero, CveProveedorCompra, DdlTipoAlmacen.SelectedValue.ToEntero(), If(ChkIncluyeTransitorios.Checked, 1, 0), DdlClasificacion_SelectedIndexChanged.selectedvalue.toentero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CondicionExistencias:=DdlExistencia.SelectedValue) Then If ObjMovimientos.DtResultados IsNot Nothing AndAlso ObjMovimientos.DtResultados.Rows.Count > 0 Then dt = ObjMovimientos.DtResultados Dim ListaBorrar As New List(Of DataColumn) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index bfb32f96d..d34f49b0d 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -5733,6 +5733,7 @@ Partial Class Ventas If Not UsuarioActual.TienePermisoProceso(169) Then ' NO VALIDA EXISTENCIAS NI COSTO - PERMISO PARA NO VALIDAR Dim CvePS As Integer = DatarowPS("CvePS").ToString.ToEntero + Dim CveTipoPS As Integer = DatarowPS("CveTipoPS").ToString.ToEntero CantidadInventario = GvPS.Rows(e.RowIndex).DataKey("CantidadInventario").ToString.ToDecimal @@ -5742,7 +5743,7 @@ Partial Class Ventas End If 'SOLO VALIDA EXISTENCIAS Y COSTO: SI USA INVENTARIOS, SOLO PRODUCTOS TIPO PRODUCTO, SOLO REMISIONES E INGRESOS - If UsuarioActual.Empresa.UsaInventarios AndAlso (DdlTipoComprobante.SelectedValue.Contiene("Rem", "Ing", "PA") Or (DdlTipoComprobante.SelectedValue.Contiene("Cot") And UsuarioActual.CveEmpresa.Contiene(119))) Then + If UsuarioActual.Empresa.UsaInventarios AndAlso CveTipoPS = 2 AndAlso (DdlTipoComprobante.SelectedValue.Contiene("Rem", "Ing", "PA") Or (DdlTipoComprobante.SelectedValue.Contiene("Cot") And UsuarioActual.CveEmpresa.Contiene(119))) Then Dim ObjInventarios As New ClsInventarios Dim Existencia As Decimal If ValidaExistencia Then