From f9727829e6271dd88c7546f361be33518dba74c8 Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 25 Apr 2022 20:32:18 -0700 Subject: [PATCH] -- cambio de double a decimal --- App_Code/ClsOC.vb | 250 ++++++++++++---------------------------------- 1 file changed, 66 insertions(+), 184 deletions(-) diff --git a/App_Code/ClsOC.vb b/App_Code/ClsOC.vb index a2a007864..628310288 100644 --- a/App_Code/ClsOC.vb +++ b/App_Code/ClsOC.vb @@ -33,7 +33,7 @@ Public Class ClsOC Public Property CveIEAnticipo As Integer Public Property CveProveedorAnticipo As Integer Public Property FolioIEAnticipo As Integer - Public Property ImporteAnticipo As Double + Public Property ImporteAnticipo As Decimal Public Property FolioAdicional As String Public Property EntregaDirecta As Boolean @@ -79,16 +79,16 @@ Public Class ClsOC Public Property RFC As String Public Property LugarEntrega As String Public Property Cancelacion As String - Public Property PorcentajeIVA As Double + Public Property PorcentajeIVA As Decimal Public Property CveCliente As Integer Public Property CveVendedor As Integer Public Property PrioridadObservacion As String - Public Property SubTotal As Double - Public Property IVA As Double - Public Property RetIVA As Double - Public Property RetISR As Double - Public Property IEPS As Double - Public Property Total As Double + Public Property SubTotal As Decimal + Public Property IVA As Decimal + Public Property RetIVA As Decimal + Public Property RetISR As Decimal + Public Property IEPS As Decimal + Public Property Total As Decimal Public Property CvePresupuestoEgreso As Integer Public Property RequiereCotizacion As Boolean Public Property CveActivoFijo As Integer @@ -98,8 +98,8 @@ Public Class ClsOC Public Property SubProyecto As String Public Property UsuarioSolicito As String Public Property UsuarioAutorizo As String - Public Property Descuento As Double - Public Property Pendiente As Double + Public Property Descuento As Decimal + Public Property Pendiente As Decimal Public Property NombreCliente As String Public Property SucCalle As String Public Property SucNoExt As String @@ -274,7 +274,7 @@ Public Class ClsOC Extension = Data.Rows(0)("Extension").ToString Usuario = Data.Rows(0)("Usuario").ToString Me.CveUsuario = Data.Rows(0)("CveUsuario").ToString.ToEntero - Me.Total = Data.Rows(0)("Total").ToString.ToDouble + Me.Total = Data.Rows(0)("Total").ToString.ToDecimal Me.CveEmpresa = Data.Rows(0)("CveEmpresa").ToString.ToEntero @@ -416,7 +416,7 @@ Public Class ClsOC Return Retorno End Function - Public Function AddCotizacionDetalle(pCveCotizacion As Integer, pCvePS As Integer, pPrecioUnitario As Double, pCantidad As Double, pCveUM As Integer, pCantidadSurtir As Double, pFechaEntrega As String, pObservacion As String, pCveOrdenCompraDetalle As Integer) As Boolean + Public Function AddCotizacionDetalle(pCveCotizacion As Integer, pCvePS As Integer, pPrecioUnitario As Decimal, pCantidad As Decimal, pCveUM As Integer, pCantidadSurtir As Decimal, pFechaEntrega As String, pObservacion As String, pCveOrdenCompraDetalle As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_OC_CotizacionesDetalleAdd") @@ -425,9 +425,9 @@ Public Class ClsOC .Add("@CveCotizacion", SqlDbType.Int).Value = pCveCotizacion .Add("@CvePS", SqlDbType.Int).Value = pCvePS .Add("@PU", SqlDbType.Money).Value = pPrecioUnitario - .Add("@Cantidad", SqlDbType.Float).Value = pCantidad + .Add("@Cantidad", SqlDbType.Decimal).Value = pCantidad .Add("@CveUM", SqlDbType.Int).Value = pCveUM - .Add("@CantidadSurtir", SqlDbType.Float).Value = pCantidadSurtir + .Add("@CantidadSurtir", SqlDbType.Decimal).Value = pCantidadSurtir .Add("@FechaEntrega", SqlDbType.VarChar).Value = pFechaEntrega .Add("@Observacion", SqlDbType.VarChar).Value = pObservacion .Add("@CveOrdenCompraDetalle", SqlDbType.Int).Value = pCveOrdenCompraDetalle @@ -452,14 +452,14 @@ Public Class ClsOC Return Retorno End Function - Public Function UpdateCotizacionDetalle(pCveCotizacionDetalle As Integer, pPrecioUnitario As Double, pCantidadSurtir As Double, pFechaEntrega As String, pObservacion As String) As Boolean + Public Function UpdateCotizacionDetalle(pCveCotizacionDetalle As Integer, pPrecioUnitario As Decimal, pCantidadSurtir As Decimal, pFechaEntrega As String, pObservacion As String) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_OC_CotizacionesDetalleUpdate") With SqlAdapter.SelectCommand.Parameters .Add("@PU", SqlDbType.Money).Value = pPrecioUnitario - .Add("@CantidadSurtir", SqlDbType.Float).Value = pCantidadSurtir + .Add("@CantidadSurtir", SqlDbType.Decimal).Value = pCantidadSurtir .Add("@FechaEntrega", SqlDbType.VarChar).Value = pFechaEntrega .Add("@Observacion", SqlDbType.VarChar).Value = pObservacion .Add("@CveCotizacionDetalle", SqlDbType.Int).Value = pCveCotizacionDetalle @@ -546,107 +546,6 @@ Public Class ClsOC End Function #End Region - 'Public Function GetEstatusCompra(ByVal CveEstatusCompra As Integer, ByVal EstatusCompra As String) As Boolean - ' Dim Retorno As Boolean = False - - ' DataAdapter("PA_OC_EstatusOrdenCompraGet") - ' Try - ' SqlAdapter.Fill(Data) - - ' If Data.Rows.Count = 1 Then - ' _CveEstatusCompra = Data.Rows(0)("CveEstatusCompra").ToString().ToEntero() - ' _EstatusCompra = Data.Rows(0)("EstatusCompra").ToString() - ' _Estatus = Data.Rows(0)("Estatus").ToString = "True" - ' _FechaIng = Data.Rows(0)("FechaIng").ToString().ToDate() - ' _CveUsuario = Data.Rows(0)("CveUsuario").ToString().ToEntero() - ' _NombreUsuario = Data.Rows(0)("Nombre").ToString() - ' End If - - ' Retorno = True - ' Catch ex As Exception - ' OnError("Ocurrió un error al obtener el Catálogo de Estatus de compra.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) - ' End Try - - ' Return Retorno - 'End Function - - 'Public Function AddEstatusCompra(ByVal Descripcion As String, Estatus As Boolean, ByVal CveUsuario As Integer) As Boolean - ' Dim Retorno As Boolean = False - - ' DataAdapter("PA_OC_EstatusOrdenCompraAdd") - - ' With SqlAdapter.SelectCommand.Parameters - ' .Add("@EstatusOrdenCompra", SqlDbType.VarChar).Value = Descripcion - ' .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario - ' End With - - ' Try - ' SqlAdapter.Fill(Data) - - ' Retorno = True - ' Catch ex As SqlException - ' If ex.Number = 2627 Then - ' Alert("La Clave o Descripción del EstatusCompra ya existe.", TipoMensaje.MsgAdvertencia) - ' Else - ' OnError("Ocurrió un error al guardar el nuevo estatus de compra.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) - ' End If - ' Catch ex As Exception - ' OnError("Ocurrió un error al guardar el nuevo estatus de compra.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) - ' End Try - - ' Return Retorno - 'End Function - - 'Public Function UpdateEstatusCompra(ByVal Descripcion As String, Estatus As Boolean, ByVal CveEstatusCompra As Integer, ByVal CveUsuario As Integer) As Boolean - ' Dim Retorno As Boolean = False - - ' DataAdapter("PA_OC_EstatusOrdenCompraUpdate") - - ' With SqlAdapter.SelectCommand.Parameters - ' .Add("@EstatusOrdenCompra", SqlDbType.VarChar).Value = Descripcion - ' '.Add("@pCveUsuario", SqlDbType.Int).Value = CveUsuario - ' .Add("@Estatus", SqlDbType.Bit).Value = Estatus - ' .Add("@CveEstatusOrdenCompra", SqlDbType.Int).Value = CveEstatusCompra - ' End With - - ' Try - ' SqlAdapter.Fill(Data) - - ' Retorno = True - ' Catch ex As SqlException - ' If ex.Number = 2627 Then - ' Alert("La Clave o Descripción del Estatus de Compra ya existe.", TipoMensaje.MsgAdvertencia) - ' Else - ' OnError("Ocurrió un error al guardar los cambios en el estatus de compra", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) - ' End If - ' Catch ex As Exception - ' OnError("Ocurrió un error al guardar los cambios en el estatus de compra.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) - ' End Try - - ' Return Retorno - 'End Function - - 'Public Function RemoveEstatusCompra(ByVal CveEstatusCompra As Integer) As Boolean - ' Dim Retorno As Boolean = False - - ' DataAdapter("PA_OC_EstatusOrdenCompraRemove") - - ' With SqlAdapter.SelectCommand.Parameters - ' .Add("@CveEstatusOrdenCompra", SqlDbType.Int).Value = CveEstatusCompra - ' End With - - ' Try - ' SqlAdapter.Fill(Data) - - ' Retorno = True - ' Catch ex As Exception - ' OnError("Ocurrió un error al eliminar el estatus de compra.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) - ' End Try - - ' Return Retorno - 'End Function - - #Region "O R D E N E S - D E - C O M P R A S" Public Function GetOC(ObjOrdenCompra As Modelos.OrdenCompra) As Boolean @@ -707,7 +606,7 @@ Public Class ClsOC _Folio = dr("Folio").ToString.ToEntero _CveIEAnticipo = dr("CveIEAnticipo").ToString.ToEntero _FolioIEAnticipo = dr("FolioIEAnticipo").ToString.ToEntero - _ImporteAnticipo = dr("ImporteAnticipo").ToString.ToDouble + _ImporteAnticipo = dr("ImporteAnticipo").ToString.ToDecimal _CveProveedorAnticipo = dr("CveProveedorAnticipo").ToString.ToEntero _CveEmpresa = dr("CveEmpresa").ToString.ToEntero _CveProyecto = dr("CveProyecto").ToString.ToEntero @@ -752,32 +651,15 @@ Public Class ClsOC Me.SucursalTelefono = If(Not IsDBNull(dr("TelefonoSucursal")), dr("TelefonoSucursal").ToString, "") ProveedorContacto = dr("ContactoNombre").ToString - PorcentajeIVA = dr("PorcentajeIVA").ToString.ToDouble - SubTotal = dr("SubTotal").ToString.ToDouble - Descuento = dr("Descuento").ToString.ToDouble - IVA = dr("IVA").ToString.ToDouble - RetIVA = dr("RetIVA").ToString.ToDouble - RetISR = dr("RetISR").ToString.ToDouble - IEPS = dr("IEPS").ToString.ToDouble - Total = dr("Total").ToString.ToDouble - Pendiente = dr("Pendiente").ToString.ToDouble - 'If Not IsDBNull(dr("SubTotal")) Then - ' SubTotal = dr("SubTotal").ToString.ToDouble - ' If IVA <= 0 Then - ' _IVA = _SubTotal * dr("PorcentajeIVA").ToString.ToDouble - ' End If - ' _Total = _SubTotal + _IVA - _Descuento - _RetIVA - _RetISR - 'End If - - '_CveSupervisara = dr("CveSupervisara").ToString.ToEntero - '_CveAutoriza = dr("CveAutoriza").ToString.ToEntero - '_CveAutorizara = dr("CveAutorizara").ToString.ToEntero - - '_NombreSupervisa = dr("NombreSupervisa").ToString - - '_NombreAutoriza = dr("NombreAutoriza").ToString - '_FechaSupervisa = dr("FechaSupervisa").ToString.ToDate - '_FechaAutoriza = dr("FechaAutoriza").ToString.ToDate + PorcentajeIVA = dr("PorcentajeIVA").ToString.ToDecimal + SubTotal = dr("SubTotal").ToString.ToDecimal + Descuento = dr("Descuento").ToString.ToDecimal + IVA = dr("IVA").ToString.ToDecimal + RetIVA = dr("RetIVA").ToString.ToDecimal + RetISR = dr("RetISR").ToString.ToDecimal + IEPS = dr("IEPS").ToString.ToDecimal + Total = dr("Total").ToString.ToDecimal + Pendiente = dr("Pendiente").ToString.ToDecimal 'RequiereCotizacion = CType(dr("RequiereCotizacion"), Boolean) SubProyecto = dr("SubProyecto").ToString @@ -820,9 +702,9 @@ Public Class ClsOC pFechaEstimadaEntrega As String, pLugarEntrega As String, pCveUsuario As Integer, pCveEmpresa As Integer, pCvePresupuestoEgreso As Integer, Optional pCveProveedor As Integer = -1, Optional pCveProveedorSucursal As Integer = -1, Optional IDPoliza As Integer = -1, Optional RequiereCotizacion As Boolean = False, Optional CveUsuarioAsignado As Integer = -1, Optional CveCliente As Integer = -1, Optional CveVendedor As Integer = -1, Optional PrioridadObservacion As String = "", - Optional PorcentajeIVA As Double = 0.16, Optional IVA As Decimal = 0, Optional RetIVA As Decimal = 0, Optional RetISR As Decimal = 0, Optional FechaExpiracion As Date = Nothing, Optional CveCotizacion As Integer = -1, + Optional PorcentajeIVA As Decimal = 0.16, Optional IVA As Decimal = 0, Optional RetIVA As Decimal = 0, Optional RetISR As Decimal = 0, Optional FechaExpiracion As Date = Nothing, Optional CveCotizacion As Integer = -1, Optional FolioAdicional As String = "", Optional EntregaDirecta As Integer = -1, Optional CveDireccionEnvio As Integer = -1, Optional Guia As String = "-1", Optional IEPS As Decimal = -1, - Optional CveIEAnticipo As Integer = -1, Optional ImporteAnticipo As Double = 0, Optional UsoCFDI As Integer = -1, Optional Promocion As String = "-1", Optional CveProveedorContacto As Integer = -1) As Boolean + Optional CveIEAnticipo As Integer = -1, Optional ImporteAnticipo As Decimal = 0, Optional UsoCFDI As Integer = -1, Optional Promocion As String = "-1", Optional CveProveedorContacto As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_OC_OrdenesCompraAdd") @@ -971,7 +853,7 @@ Public Class ClsOC Return Retorno End Function - Public Function UpdateOrdenCompraDetalleAjuste(CveOrdenCompra As Integer, CveOrdenCompraDetalle As Integer, Diferencia As Double, CveUsuarioModifico As Integer) As Boolean + Public Function UpdateOrdenCompraDetalleAjuste(CveOrdenCompra As Integer, CveOrdenCompraDetalle As Integer, Diferencia As Decimal, CveUsuarioModifico As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_OC_OrdenesCompraDetalleAjusteUpdate") With SqlAdapter.SelectCommand.Parameters @@ -1028,7 +910,7 @@ Public Class ClsOC pCveProveedor As Integer, pCveOrdenCompra As Integer, pCveUsuarioModifico As Integer, Optional CveCliente As Integer = -1, Optional CveVendedor As Integer = -1, Optional PrioridadObservacion As String = "", Optional IVA As Decimal = 0, Optional RetIVA As Decimal = 0, Optional RetISR As Decimal = 0, Optional IDPoliza As Integer = -1, Optional FechaExpiracion As Date = Nothing, Optional FolioAdicional As String = "", Optional EntregaDirecta As Integer = -1, Optional CveDireccionEnvio As Integer = -1, Optional Guia As String = "-1", Optional IEPS As Decimal = -1, Optional UsoCFDI As Integer = -1, Optional Promocion As String = "-1", - Optional pCveProveedorSucursal As Integer = -1, Optional CveProveedorContacto As Integer = -1, Optional PorcentajeIVA As Double = 0.16) As Boolean + Optional pCveProveedorSucursal As Integer = -1, Optional CveProveedorContacto As Integer = -1, Optional PorcentajeIVA As Decimal = 0.16) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_OC_OrdenesCompraUpdate") @@ -1266,18 +1148,18 @@ Public Class ClsOC Return Retorno End Function - Public Function AddOrdenCompraDetalle(pCveOrdenCompra As Integer, pCantidad As Double, pCveUnidadMedida As Integer, pCvePS As Integer, pImporte As Double, pCveSubProyecto As Integer, pCveActivoFijo As Integer, - pObservacion As String, pCveUsuario As Integer, Optional pCveOrdenCompraPadre As Integer = -1, Optional CvePresupuestoEgreso As Integer = -1, Optional Descuento As Double = 0, - Optional IEPSPS As Double = 0, Optional IEPSPSIVA As Double = 0, Optional IVA As Double = 0, Optional RetIVA As Double = 0, Optional RetISR As Double = 0, Optional Total As Double = 0, - Optional CveContratoDetalle As Integer = -1, Optional IVAPorcentaje As Double = 0, Optional RetIVAPorcentaje As Double = 0, Optional RetISRPorcentaje As Double = 0, Optional IEPSPSPorcentaje As Double = 0, - Optional IEPSPSIVAPorcentaje As Double = 0, Optional CveVentaDetalleCotizacion As Integer = -1, Optional CveTipoGastoObra As Integer = -1, Optional CveCultivoCuadroDetalle As Integer = -1) As Boolean + Public Function AddOrdenCompraDetalle(pCveOrdenCompra As Integer, pCantidad As Decimal, pCveUnidadMedida As Integer, pCvePS As Integer, pImporte As Decimal, pCveSubProyecto As Integer, pCveActivoFijo As Integer, + pObservacion As String, pCveUsuario As Integer, Optional pCveOrdenCompraPadre As Integer = -1, Optional CvePresupuestoEgreso As Integer = -1, Optional Descuento As Decimal = 0, + Optional IEPSPS As Decimal = 0, Optional IEPSPSIVA As Decimal = 0, Optional IVA As Decimal = 0, Optional RetIVA As Decimal = 0, Optional RetISR As Decimal = 0, Optional Total As Decimal = 0, + Optional CveContratoDetalle As Integer = -1, Optional IVAPorcentaje As Decimal = 0, Optional RetIVAPorcentaje As Decimal = 0, Optional RetISRPorcentaje As Decimal = 0, Optional IEPSPSPorcentaje As Decimal = 0, + Optional IEPSPSIVAPorcentaje As Decimal = 0, Optional CveVentaDetalleCotizacion As Integer = -1, Optional CveTipoGastoObra As Integer = -1, Optional CveCultivoCuadroDetalle As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_OC_OrdenesCompraDetalleAdd") With SqlAdapter.SelectCommand.Parameters .Add("@CveOrdenCompra", SqlDbType.Int).Value = pCveOrdenCompra - .Add("@Cantidad", SqlDbType.Float).Value = pCantidad - .Add("@Descuento", SqlDbType.Float).Value = Descuento + .Add("@Cantidad", SqlDbType.Decimal).Value = pCantidad + .Add("@Descuento", SqlDbType.Decimal).Value = Descuento .Add("@Importe", SqlDbType.Float).Value = pImporte .Add("@CveUnidadMedida", SqlDbType.Int).Value = pCveUnidadMedida .Add("@CvePS", SqlDbType.Int).Value = pCvePS @@ -1290,16 +1172,16 @@ Public Class ClsOC .Add("@vCveOrdenCompraDetalle", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@IEPSPS", SqlDbType.Money).Value = IEPSPS .Add("@IEPSPSIVA", SqlDbType.Money).Value = IEPSPSIVA - .Add("@IVA", SqlDbType.Float).Value = IVA - .Add("@RetIVA", SqlDbType.Float).Value = RetIVA - .Add("@RetISR", SqlDbType.Float).Value = RetISR - .Add("@Total", SqlDbType.Float).Value = Total + .Add("@IVA", SqlDbType.Decimal).Value = IVA + .Add("@RetIVA", SqlDbType.Decimal).Value = RetIVA + .Add("@RetISR", SqlDbType.Decimal).Value = RetISR + .Add("@Total", SqlDbType.Decimal).Value = Total .Add("@CveContratoDetalle", SqlDbType.Int).Value = CveContratoDetalle - .Add("@IVAPorcentaje", SqlDbType.Float).Value = IVAPorcentaje - .Add("@RetIVAPorcentaje", SqlDbType.Float).Value = RetIVAPorcentaje - .Add("@RetISRPorcentaje", SqlDbType.Float).Value = RetISRPorcentaje - .Add("@IEPSPSPorcentaje", SqlDbType.Float).Value = IEPSPSPorcentaje - .Add("@IEPSPSIVAPorcentaje", SqlDbType.Float).Value = IEPSPSIVAPorcentaje + .Add("@IVAPorcentaje", SqlDbType.Decimal).Value = IVAPorcentaje + .Add("@RetIVAPorcentaje", SqlDbType.Decimal).Value = RetIVAPorcentaje + .Add("@RetISRPorcentaje", SqlDbType.Decimal).Value = RetISRPorcentaje + .Add("@IEPSPSPorcentaje", SqlDbType.Decimal).Value = IEPSPSPorcentaje + .Add("@IEPSPSIVAPorcentaje", SqlDbType.Decimal).Value = IEPSPSIVAPorcentaje .Add("@CveVentaDetalleCotizacion", SqlDbType.Int).Value = CveVentaDetalleCotizacion .Add("@CveTipoGastoObra", SqlDbType.Int).Value = CveTipoGastoObra .Add("@CveCultivoCuadroDetalle", SqlDbType.Int).Value = CveCultivoCuadroDetalle @@ -1322,11 +1204,11 @@ Public Class ClsOC Return Retorno End Function - Public Function UpdateOrdenCompraDetalle(pCantidad As Double, pCveUnidadMedida As Integer, pCvePS As Integer, pImporte As Double, pCveSubProyecto As Integer, pCveActivoFijo As Integer, - pObservacion As String, pCveUsuario As Integer, pCveOrdenCompraDetalle As Integer, Optional CvePresupuestoEgreso As Integer = -1, Optional Descuento As Double = 0, - Optional IEPSPS As Double = 0, Optional IEPSPSIVA As Double = 0, Optional IVA As Double = 0, Optional RetIVA As Double = 0, Optional RetISR As Double = 0, Optional Total As Double = 0, - Optional CveContratoDetalle As Integer = -1, Optional IVAPorcentaje As Double = 0, Optional RetIVAPorcentaje As Double = 0, Optional RetISRPorcentaje As Double = 0, Optional IEPSPSPorcentaje As Double = 0, - Optional IEPSPSIVAPorcentaje As Double = 0, Optional CveTipoGastoObra As Integer = -1) As Integer + Public Function UpdateOrdenCompraDetalle(pCantidad As Decimal, pCveUnidadMedida As Integer, pCvePS As Integer, pImporte As Decimal, pCveSubProyecto As Integer, pCveActivoFijo As Integer, + pObservacion As String, pCveUsuario As Integer, pCveOrdenCompraDetalle As Integer, Optional CvePresupuestoEgreso As Integer = -1, Optional Descuento As Decimal = 0, + Optional IEPSPS As Decimal = 0, Optional IEPSPSIVA As Decimal = 0, Optional IVA As Decimal = 0, Optional RetIVA As Decimal = 0, Optional RetISR As Decimal = 0, Optional Total As Decimal = 0, + Optional CveContratoDetalle As Integer = -1, Optional IVAPorcentaje As Decimal = 0, Optional RetIVAPorcentaje As Decimal = 0, Optional RetISRPorcentaje As Decimal = 0, Optional IEPSPSPorcentaje As Decimal = 0, + Optional IEPSPSIVAPorcentaje As Decimal = 0, Optional CveTipoGastoObra As Integer = -1) As Integer Dim Retorno As Integer = -1 DataAdapter("PA_OC_OrdenesCompraDetalleUpdate") @@ -1336,8 +1218,8 @@ Public Class ClsOC .Add("@Cantidad", SqlDbType.Float).Value = pCantidad .Add("@CveUnidadMedida", SqlDbType.Int).Value = pCveUnidadMedida .Add("@CvePS", SqlDbType.Int).Value = pCvePS - .Add("@Descuento", SqlDbType.Float).Value = Descuento - .Add("@Importe", SqlDbType.Float).Value = pImporte + .Add("@Descuento", SqlDbType.Decimal).Value = Descuento + .Add("@Importe", SqlDbType.Decimal).Value = pImporte .Add("@CveSubProyecto", SqlDbType.Int).Value = pCveSubProyecto .Add("@CveOrdenCompraDetalle", SqlDbType.Int).Value = pCveOrdenCompraDetalle .Add("@CveActivoFijo", SqlDbType.Int).Value = pCveActivoFijo @@ -1346,16 +1228,16 @@ Public Class ClsOC .Add("@CveUsuario", SqlDbType.Int).Value = pCveUsuario .Add("@IEPSPS", SqlDbType.Money).Value = IEPSPS .Add("@IEPSPSIVA", SqlDbType.Money).Value = IEPSPSIVA - .Add("@IVA", SqlDbType.Float).Value = IVA - .Add("@RetIVA", SqlDbType.Float).Value = RetIVA - .Add("@RetISR", SqlDbType.Float).Value = RetISR - .Add("@Total", SqlDbType.Float).Value = Total + .Add("@IVA", SqlDbType.Decimal).Value = IVA + .Add("@RetIVA", SqlDbType.Decimal).Value = RetIVA + .Add("@RetISR", SqlDbType.Decimal).Value = RetISR + .Add("@Total", SqlDbType.Decimal).Value = Total .Add("@CveContratoDetalle", SqlDbType.Int).Value = CveContratoDetalle - .Add("@IVAPorcentaje", SqlDbType.Float).Value = IVAPorcentaje - .Add("@RetIVAPorcentaje", SqlDbType.Float).Value = RetIVAPorcentaje - .Add("@RetISRPorcentaje", SqlDbType.Float).Value = RetISRPorcentaje - .Add("@IEPSPSPorcentaje", SqlDbType.Float).Value = IEPSPSPorcentaje - .Add("@IEPSPSIVAPorcentaje", SqlDbType.Float).Value = IEPSPSIVAPorcentaje + .Add("@IVAPorcentaje", SqlDbType.Decimal).Value = IVAPorcentaje + .Add("@RetIVAPorcentaje", SqlDbType.Decimal).Value = RetIVAPorcentaje + .Add("@RetISRPorcentaje", SqlDbType.Decimal).Value = RetISRPorcentaje + .Add("@IEPSPSPorcentaje", SqlDbType.Decimal).Value = IEPSPSPorcentaje + .Add("@IEPSPSIVAPorcentaje", SqlDbType.Decimal).Value = IEPSPSIVAPorcentaje .Add("@CveTipoGastoObra", SqlDbType.Int).Value = CveTipoGastoObra End With @@ -2412,7 +2294,7 @@ Public Class ClsOC Return Retorno End Function - Public Function AddSolicitudAnticipo(CveOrdenCompra As Integer, Importe As Double, CveEmpresa As Integer) As Boolean + Public Function AddSolicitudAnticipo(CveOrdenCompra As Integer, Importe As Decimal, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_OC_SolicitudAnticipoAdd") @@ -2496,16 +2378,16 @@ Public Class ClsOC End Function #Region " OC DETALLE - SALDOS [ SURTIDO INV | VINCULADO COMP ]" - Public Function OrdenesCompraDetalleSaldosInvCompraAdd(CveOCDetalle As Integer, CveInvDetalle As Integer, CantidadSurtida As Double, CveCompraDetalle As Integer, CantidadVinculada As Double) As Boolean + Public Function OrdenesCompraDetalleSaldosInvCompraAdd(CveOCDetalle As Integer, CveInvDetalle As Integer, CantidadSurtida As Decimal, CveCompraDetalle As Integer, CantidadVinculada As Decimal) As Boolean Dim Retorno As Boolean = False DataAdapter("OC_OrdenesCompraDetalleSaldosInvCompraAdd") With SqlAdapter.SelectCommand.Parameters .Add("@CveOCDetalle", SqlDbType.Int).Value = CveOCDetalle .Add("@CveInvDetalle", SqlDbType.Int).Value = CveInvDetalle - .Add("@CantidadSurtida", SqlDbType.Float).Value = CantidadSurtida + .Add("@CantidadSurtida", SqlDbType.Decimal).Value = CantidadSurtida .Add("@CveCompraDetalle", SqlDbType.Int).Value = CveCompraDetalle - .Add("@CantidadVinculada", SqlDbType.Float).Value = CantidadVinculada + .Add("@CantidadVinculada", SqlDbType.Decimal).Value = CantidadVinculada End With Try