From 40fa692684d2d500d0dc38a84009a1d7f1b5e946 Mon Sep 17 00:00:00 2001 From: rmolina Date: Thu, 12 Dec 2019 18:56:22 -0700 Subject: [PATCH] - correcciones variadas --- App_Code/ClsProductosServicios.vb | 2 ++ Compras/Compras.aspx.vb | 4 ++-- General/SaldosIniciales.aspx.vb | 2 +- Inventarios/RecepcionEntrega.aspx.vb | 4 ++++ Ventas/PV.aspx.vb | 26 +++++++++----------------- Ventas/Ventas.aspx.vb | 26 +++++++++++--------------- 6 files changed, 29 insertions(+), 35 deletions(-) diff --git a/App_Code/ClsProductosServicios.vb b/App_Code/ClsProductosServicios.vb index 317ff984a..27d3474b3 100644 --- a/App_Code/ClsProductosServicios.vb +++ b/App_Code/ClsProductosServicios.vb @@ -27,6 +27,7 @@ Public Class ClsProductosServicios Public Property CvePS As Integer Public Property CveClasificacion As Integer + Public Property Clasificacion As String Public Property CveUnidadMedida As Integer Public Property CveSATPS As Integer Public Property SATClavePS As String @@ -226,6 +227,7 @@ Public Class ClsProductosServicios If Data.Rows.Count > 0 Then Me.CvePS = Data.Rows(0)("CvePS").ToString().ToEntero Me.CveClasificacion = Data.Rows(0)("CveClasificacion").ToString.ToEntero + Me.Clasificacion = Data.Rows(0)("Clasificacion").ToString CveUnidadMedida = Data.Rows(0)("CveUnidadMedida").ToString.ToEntero CveSATPS = Data.Rows(0)("CveSATPS").ToString.ToEntero Me.SATClavePS = Data.Rows(0)("SATClavePS").ToString diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 24ceab07b..86936d8b7 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -6639,10 +6639,10 @@ Partial Class Compras_Compras IdCtaContable = CtaProveedorExtranjera CveCuenta = CveCuentaProveedorExtranjera - If ObjConta.AddPrePolizasDetalle(CvePrePolizaTemp, False, importeMovimientoNC, Referencia, 17, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=Gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=TipoCambioFactura, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then + If ObjConta.AddPrePolizasDetalle(CvePrePolizaTemp, False, importeMovimientoNC, Referencia, 272, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=Gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=TipoCambioFactura, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza, CveCompraAmortizacion:=CveCompra) Then IdCtaContable = CtaProveedorComplementaria CveCuenta = CveCuentaProveedorComplementaria - If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaTemp, False, importeMNNC - importeMovimientoNC, Referencia, 206, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=Gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMNNC - importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=TipoCambioFactura, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaTemp, False, importeMNNC - importeMovimientoNC, Referencia, 206, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=Gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMNNC - importeMovimientoNC, ImporteME:=importeMovimientoNC, TipoCambio:=TipoCambioFactura, CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza, CveCompraAmortizacion:=CveCompra) Then ErrorPrepoliza = True Exit For End If diff --git a/General/SaldosIniciales.aspx.vb b/General/SaldosIniciales.aspx.vb index 11221fb2f..7e3a9a2bd 100644 --- a/General/SaldosIniciales.aspx.vb +++ b/General/SaldosIniciales.aspx.vb @@ -681,7 +681,7 @@ Partial Class General_SaldosIniciales Dim CveTipoPS As Integer = If(TipoPS.ToUpper = "PRODUCTO", 2, 1) Dim CveClasificacion As Integer = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveClasificacion", $"Clasificacion = '{Clasificacion}'").ToString.ToEntero - Dim CveUnidadMedida As Integer = GlobalDTUnidadesMedida(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveUnidadMedida", $"UnidadMedida = '{UnidadMedida}'").ToString.ToEntero + Dim CveUnidadMedida As Integer = GlobalDTUnidadesMedida(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveUnidadMedida", $"UnidadMedida = '{UnidadMedida}' OR Abreviatura = '{UnidadMedida}'").ToString.ToEntero Dim CveSATPS As Integer = GlobalDTPSATPS.FiltroPrimeroValor("CveSATPS", $"SATClavePS = '{SATClavePS}'").ToString.ToEntero Dim CveTamaño As Integer = GlobalDTAcumTamaños.FiltroPrimeroValor("CveTamaño", $"Tamaño = '{Tamaño}' AND CveEmpresa = {UsuarioActual.CveEmpresa}").ToString.ToEntero Dim CveClasificacion2 As Integer = GlobalDTClasificaciones2(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveClasificacion", $"Clasificacion = '{Clasificacion2}'").ToString.ToEntero diff --git a/Inventarios/RecepcionEntrega.aspx.vb b/Inventarios/RecepcionEntrega.aspx.vb index d2251c4a9..1ef659d96 100644 --- a/Inventarios/RecepcionEntrega.aspx.vb +++ b/Inventarios/RecepcionEntrega.aspx.vb @@ -1919,6 +1919,7 @@ Partial Class Inventarios_RecepcionEntrega CveMovimientoRelacionadoVirtual = CveMovimientoSalidaDev Else ErrorMovInv = True + TextoError = "Ocurrió un error al procesar el movimiento. Por favor vuelva a intentar." End If 'CARGA CONCEPTOS DEVUELTOS EN LA VENTA @@ -1926,6 +1927,7 @@ Partial Class Inventarios_RecepcionEntrega DtPSVirtual = ObjInventario.DtResultados.Copy() Else ErrorMovInv = True + TextoError = "Ocurrió un error al procesar los movimientos de devolución. Por favor vuelva a intentar." End If CveConceptoMovimientoVirtual = 18 End If @@ -1954,10 +1956,12 @@ Partial Class Inventarios_RecepcionEntrega Else ErrorMovInv = True + TextoError = "Ocurrió un error al procesar el movimiento en almacen virtual. Por favor vuelva a intentar." End If If DtPSVirtual.Rows.Count = 0 Then ErrorMovInv = True + TextoError = "No se tienen productos para el almacen virtual." End If End If diff --git a/Ventas/PV.aspx.vb b/Ventas/PV.aspx.vb index f2ed1bd58..eb7260310 100644 --- a/Ventas/PV.aspx.vb +++ b/Ventas/PV.aspx.vb @@ -5587,9 +5587,8 @@ Partial Class PV Dim CveUnidadMedidaPSA As Integer = -1 Dim UnidadMedidaPSA As String = "Unidad" - Dim CveClacificacionPSA As Integer = -1 - - Dim ClacificacionPSA As String = "" + Dim CveClasificacionPSA As Integer = -1 + Dim ClasificacionPSA As String = "" Dim CveSubProyectoPSA As Integer = -1 Dim SubProyectoPSA As String = "" @@ -5601,8 +5600,8 @@ Partial Class PV DTPSTemp.Columns.Add("Cantidad", GetType(Integer)) DTPSTemp.Columns.Add("CveUnidadMedida", GetType(Integer)) DTPSTemp.Columns.Add("UnidadMedida", GetType(String)) - DTPSTemp.Columns.Add("CveClacificacion", GetType(Integer)) - DTPSTemp.Columns.Add("Clacificacion", GetType(String)) + DTPSTemp.Columns.Add("CveClasificacion", GetType(Integer)) + DTPSTemp.Columns.Add("Clasificacion", GetType(String)) DTPSTemp.Columns.Add("CvePS", GetType(Integer)) DTPSTemp.Columns.Add("PS", GetType(String)) DTPSTemp.Columns.Add("PU", GetType(Decimal)) @@ -5626,21 +5625,14 @@ Partial Class PV If ObjProductosServicios.GetPS(CvePsTemp, -1, UsuarioActual.CveEmpresa) Then CveUnidadMedidaPSA = ObjProductosServicios.CveUnidadMedida - CveClacificacionPSA = ObjProductosServicios.CveClasificacion + CveClasificacionPSA = ObjProductosServicios.CveClasificacion + ClasificacionPSA = ObjProductosServicios.Clasificacion UnidadMedidaPSA = ObjProductosServicios.DtResultados.FiltroPrimeroValor("UnidadMedida") PSPSA = ObjProductosServicios.PS End If - - If UsuarioActual.Empresa.UsaAC Then - ClacificacionPSA = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, UsoClasificacion:=If(UsuarioActual.Empresa.UsaContabilidad, CveClacificacionPSA, -1)).FiltroPrimeroValor("Clasificacion", " Codigo = '' OR Codigo IS NULL ", Orderby:="Clasificacion") - Else - ClacificacionPSA = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, UsoClasificacion:=If(UsuarioActual.Empresa.UsaContabilidad, CveClacificacionPSA, -1)).FiltroPrimeroValor("Clasificacion", Orderby:="Clasificacion") - End If - Dim Cargo As Decimal = DTTamanios.FiltroPrimeroValor("Cargo", $" CveTamaño = { CveTamanioTemp }").ToDecimal - If DTPSTemp.FiltraParametros($"CvePs = { CvePsTemp }").Rows.Count > 0 Then For Each dRowUpdate As DataRow In DTPSTemp.Rows @@ -5660,8 +5652,8 @@ Partial Class PV dRowNuevo("PU") = Cargo dRowNuevo("CveUnidadMedida") = CveUnidadMedidaPSA dRowNuevo("UnidadMedida") = UnidadMedidaPSA - dRowNuevo("CveClacificacion") = CveClacificacionPSA - dRowNuevo("Clacificacion") = ClacificacionPSA + dRowNuevo("CveClasificacion") = CveClasificacionPSA + dRowNuevo("Clasificacion") = ClasificacionPSA dRowNuevo("CvePS") = CvePsTemp dRowNuevo("PS") = PSPSA @@ -5686,7 +5678,7 @@ Partial Class PV For Each drowPsTamaños As DataRow In DTPSTemp.Rows If drowPsTamaños("PU").ToString.ToDecimal > 0 Then Dim Concec = AgregarProductoServicio(drowPsTamaños("Cantidad").ToString.ToEntero, drowPsTamaños("CveUnidadMedida").ToString.ToEntero, drowPsTamaños("UnidadMedida").ToString, - drowPsTamaños("CveClacificacion").ToString.ToEntero, drowPsTamaños("Clacificacion").ToString, drowPsTamaños("CvePS").ToString.ToEntero, + drowPsTamaños("CveClasificacion").ToString.ToEntero, drowPsTamaños("Clasificacion").ToString, drowPsTamaños("CvePS").ToString.ToEntero, drowPsTamaños("PS").ToString, "", drowPsTamaños("PU").ToString.ToDecimal, 0, -1, "", drowPsTamaños("CveSubProyecto").ToString.ToEntero, drowPsTamaños("SubProyecto").ToString, EsCargo:=True, ConsecPSPadre:=drowPsTamaños("ConsecPSPadre").ToString.ToEntero) If Consec > 0 Then diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index aff09fb81..bfb32f96d 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -23528,9 +23528,9 @@ Partial Class Ventas Dim CveUnidadMedidaPSA As Integer = -1 Dim UnidadMedidaPSA As String = "Unidad" - Dim CveClacificacionPSA As Integer = -1 + Dim CveClasificacionPSA As Integer = -1 - Dim ClacificacionPSA As String = "" + Dim ClasificacionPSA As String = "" Dim CveSubProyectoPSA As Integer = -1 Dim SubProyectoPSA As String = "" @@ -23538,12 +23538,12 @@ Partial Class Ventas Dim PSPSA As String = "" Dim DTPSTemp As New DataTable '= TmpDT.Clone - 'AgregarProductoServicio(1, CveUnidadMedidaPSA, UnidadMedidaPSA, CveClacificacionPSA, ClacificacionPSA, CvePSPSA, PSPSA, "", ImporteCargo, 0, -1, "", CveSubProyectoPSA, SubProyectoPSA) + DTPSTemp.Columns.Add("Cantidad", GetType(Integer)) DTPSTemp.Columns.Add("CveUnidadMedida", GetType(Integer)) DTPSTemp.Columns.Add("UnidadMedida", GetType(String)) - DTPSTemp.Columns.Add("CveClacificacion", GetType(Integer)) - DTPSTemp.Columns.Add("Clacificacion", GetType(String)) + DTPSTemp.Columns.Add("CveClasificacion", GetType(Integer)) + DTPSTemp.Columns.Add("Clasificacion", GetType(String)) DTPSTemp.Columns.Add("CvePS", GetType(Integer)) DTPSTemp.Columns.Add("PS", GetType(String)) DTPSTemp.Columns.Add("PU", GetType(Decimal)) @@ -23563,20 +23563,16 @@ Partial Class Ventas SubProyectoPSA = DrowPartidas("SubProyecto").ToString Dim ObjProductosServicios As New ClsProductosServicios() + If ObjProductosServicios.GetPS(CvePsTemp, -1, UsuarioActual.CveEmpresa) Then CveUnidadMedidaPSA = ObjProductosServicios.CveUnidadMedida - CveClacificacionPSA = ObjProductosServicios.CveClasificacion + CveClasificacionPSA = ObjProductosServicios.CveClasificacion + ClasificacionPSA = ObjProductosServicios.Clasificacion UnidadMedidaPSA = ObjProductosServicios.DtResultados.FiltroPrimeroValor("UnidadMedida") PSPSA = ObjProductosServicios.PS End If ObjProductosServicios.Dispose() - If UsuarioActual.Empresa.UsaAC Then - ClacificacionPSA = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, UsoClasificacion:=If(UsuarioActual.Empresa.UsaContabilidad, CveClacificacionPSA, -1)).FiltroPrimeroValor("Clasificacion", " Codigo = '' OR Codigo IS NULL ", Orderby:="Clasificacion") - Else - ClacificacionPSA = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, UsoClasificacion:=If(UsuarioActual.Empresa.UsaContabilidad, CveClacificacionPSA, -1)).FiltroPrimeroValor("Clasificacion", Orderby:="Clasificacion") - End If - Dim Cargo As Decimal = DTTamanios.FiltroPrimeroValor("Cargo", $" CveTamaño = { CveTamanioTemp }").ToDecimal @@ -23599,8 +23595,8 @@ Partial Class Ventas dRowNuevo("PU") = Cargo dRowNuevo("CveUnidadMedida") = CveUnidadMedidaPSA dRowNuevo("UnidadMedida") = UnidadMedidaPSA - dRowNuevo("CveClacificacion") = CveClacificacionPSA - dRowNuevo("Clacificacion") = ClacificacionPSA + dRowNuevo("CveClasificacion") = CveClasificacionPSA + dRowNuevo("Clasificacion") = ClasificacionPSA dRowNuevo("CvePS") = CvePsTemp dRowNuevo("PS") = PSPSA @@ -23619,7 +23615,7 @@ Partial Class Ventas Modalidad = "A" If drowPsTamaños("PU").ToString.ToDecimal > 0 Then AgregarProductoServicio(drowPsTamaños("Cantidad").ToString.ToEntero, drowPsTamaños("CveUnidadMedida").ToString.ToEntero, drowPsTamaños("UnidadMedida").ToString, - drowPsTamaños("CveClacificacion").ToString.ToEntero, drowPsTamaños("Clacificacion").ToString, drowPsTamaños("CvePS").ToString.ToEntero, + drowPsTamaños("CveClasificacion").ToString.ToEntero, drowPsTamaños("Clasificacion").ToString, drowPsTamaños("CvePS").ToString.ToEntero, drowPsTamaños("PS").ToString, "", drowPsTamaños("PU").ToString.ToDecimal, 0, -1, "", drowPsTamaños("CveSubProyecto").ToString.ToEntero, drowPsTamaños("SubProyecto").ToString) End If