diff --git a/App_Code/ClsClientes.vb b/App_Code/ClsClientes.vb index 364a870bc..b7b8d93d5 100644 --- a/App_Code/ClsClientes.vb +++ b/App_Code/ClsClientes.vb @@ -128,7 +128,8 @@ Public Class ClsClientes Public Property CveFormaPago33 As Integer Public Property CveMetodoPago33 As Integer Public Property CveClienteCorporativo As String - Public Property DesglosaIEPS As Boolean + Public Property DesglosaIEPS As Boolean + Public Property NoDesglosaIVA As Boolean Public Property AplicaComercioExterior As Boolean Public Property CveTipoOperacion As Integer Public Property CvePedimento As Integer @@ -385,6 +386,7 @@ Public Class ClsClientes _CveClienteCorporativo = Data(0)("CveClienteCorporativo").ToString _DesglosaIEPS = CType(Data(0)("DesglosaIEPS"), Boolean) + _NoDesglosaIVA = CType(Data(0)("NoDesglosaIVA"), Boolean) _AplicaComercioExterior = CType(Data(0)("AplicaComercioExterior"), Boolean) _CveTipoOperacion = Data(0)("CveTipoOperacion").ToString.ToEntero @@ -513,18 +515,22 @@ Public Class ClsClientes 'SqlAdapter.Dispose() Return Retorno End Function - Public Function GetHistorialVentas(CveCliente As Integer, Optional SelectTop As Integer = -1, Optional CveClienteSucursal As Integer = -1, Optional TipoDocto As String = "-1", Optional CveEstatusFactura As Integer = -1, Optional FechaI As DateTime = ModExtensiones.MinFecha, Optional FechaF As DateTime = ModExtensiones.MaxFecha) As Boolean + Public Function GetHistorialVentas(CveCliente As Integer, CveEmpresa As Integer, Optional SelectTop As Integer = -1, Optional CveClienteSucursal As Integer = -1, Optional TipoDocto As String = "-1", Optional CveEstatusFactura As Integer = -1, Optional FechaI As DateTime = ModExtensiones.MinFecha, Optional FechaF As DateTime = ModExtensiones.MaxFecha) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_ClienteHistorialVentas") - SqlAdapter.SelectCommand.Parameters.Add("@CveCliente", SqlDbType.Int).Value = CveCliente - SqlAdapter.SelectCommand.Parameters.Add("@SelectTop", SqlDbType.Int).Value = SelectTop - SqlAdapter.SelectCommand.Parameters.Add("@CveClienteSucursal", SqlDbType.Int).Value = CveClienteSucursal - SqlAdapter.SelectCommand.Parameters.Add("@TipoDocto", SqlDbType.VarChar).Value = TipoDocto - SqlAdapter.SelectCommand.Parameters.Add("@CveEstatusFactura", SqlDbType.Int).Value = CveEstatusFactura - SqlAdapter.SelectCommand.Parameters.Add("@FechaI", SqlDbType.DateTime).Value = FechaI - SqlAdapter.SelectCommand.Parameters.Add("@FechaF", SqlDbType.DateTime).Value = FechaF - + With SqlAdapter.SelectCommand.Parameters + .Add("@CveCliente", SqlDbType.Int).Value = CveCliente + .Add("@SelectTop", SqlDbType.Int).Value = SelectTop + .Add("@CveClienteSucursal", SqlDbType.Int).Value = CveClienteSucursal + .Add("@TipoDocto", SqlDbType.VarChar).Value = TipoDocto + .Add("@CveEstatusFactura", SqlDbType.Int).Value = CveEstatusFactura + .Add("@FechaI", SqlDbType.DateTime).Value = FechaI + .Add("@FechaF", SqlDbType.DateTime).Value = FechaF + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + + Try SqlAdapter.Fill(Data) Retorno = True @@ -757,7 +763,7 @@ Public Class ClsClientes Optional CveMotivoTraslado As Integer = 0, Optional NumRegIdTrib As String = "-1", Optional ComExtEstado As String = "-1", Optional ComExtMunicipio As String = "-1", Optional ComExtColonia As String = "-1", Optional ApellidoPaternoPF As String = "-1", Optional ApellidoMaternoPF As String = "-1", Optional NombresPF As String = "-1", Optional RequiereOC As Boolean = False, Optional LT As String = "0", Optional LG As String = "0", Optional EsDistribuidor As Boolean = False, Optional TipoCliente As Integer = 1, Optional CargoUsado As Boolean = False, Optional BonificacionUsado As Boolean = False, Optional CveTipoRetencion As Integer = 0, Optional CorreoEntregaCompras As String = "-1", Optional CorreoEntregaAlmacen As String = "-1", - Optional CveSATEstado As Integer = -1, Optional CveAdminTrayecto As Integer = -1) As Boolean + Optional CveSATEstado As Integer = -1, Optional CveAdminTrayecto As Integer = -1, Optional NoDesglosaIVA As Boolean = False) As Boolean Dim Retorno As Boolean = False @@ -878,6 +884,7 @@ Public Class ClsClientes .Add("@CveClienteCorporativo", SqlDbType.Int).Value = CveClienteCorporativo .Add("@DesglosaIEPS", SqlDbType.Bit).Value = If(DesglosaIEPS, 1, 0) + .Add("@NoDesglosaIVA", SqlDbType.Bit).Value = If(NoDesglosaIVA, 1, 0) .Add("@AplicaComercioExterior", SqlDbType.Bit).Value = AplicaComercioExterior .Add("@CveTipoOperacion", SqlDbType.Int).Value = CveTipoOperacion diff --git a/App_Code/ClsCompras.vb b/App_Code/ClsCompras.vb index 4aa180e78..d52811978 100644 --- a/App_Code/ClsCompras.vb +++ b/App_Code/ClsCompras.vb @@ -438,12 +438,12 @@ Public Class ClsCompras End Function Public Function AddCompraDetalle(CveCompra As Integer, CveUM As Integer, CvePS As Integer, CveSubProyecto As Integer, CveCliente As Integer, CveActivoFijo As Integer, - Cantidad As Double, PU As Double, IVA As Double, Total As Double, Descuento As Double, Observaciones As String, CveOCDetalle As Integer, + Cantidad As Decimal, PU As Decimal, IVA As Decimal, Total As Decimal, Descuento As Decimal, Observaciones As String, CveOCDetalle As Integer, Optional TipoRecepcion As Integer = -1, Optional CveContrato As Integer = -1, Optional CvePresupuestoEgreso As Integer = -1, Optional AplicaCostoIndirecto As Integer = -1, Optional EstatusAlmacen As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveTipoGasto As Integer = -1, Optional AF_Medida As Integer = -1, Optional AF_TipoMantenimiento As Integer = -1, Optional Referencia As String = "", Optional OtrosGastos As Decimal = 0, - Optional RetIVA As Double = 0, Optional RetISR As Double = 0, Optional IEPSPS As Double = 0, Optional IEPSPSIVA As Double = 0, - 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 RetIVA As Decimal = 0, Optional RetISR As Decimal = 0, Optional IEPSPS As Decimal = 0, Optional IEPSPSIVA As Decimal = 0, + 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 NoDeducible As Boolean = False, Optional CveContratoDetalle As Integer = -1, Optional CveCultivoCuadroDetalle As Integer = -1) As Boolean Dim Retorno As Boolean = False @@ -457,12 +457,12 @@ Public Class ClsCompras .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto .Add("@CveCliente", SqlDbType.Int).Value = CveCliente .Add("@CveActivoFijo", SqlDbType.Int).Value = CveActivoFijo - .Add("@Cantidad", SqlDbType.Float).Value = Cantidad - .Add("@PU", SqlDbType.Float).Value = PU - .Add("@IVA", SqlDbType.Float).Value = IVA - .Add("@Total", SqlDbType.Float).Value = Total - .Add("@Descuento", SqlDbType.Float).Value = Descuento - .Add("@OtrosGastos", SqlDbType.Float).Value = OtrosGastos + .Add("@Cantidad", SqlDbType.Decimal).Value = Cantidad + .Add("@PU", SqlDbType.Decimal).Value = PU + .Add("@IVA", SqlDbType.Decimal).Value = IVA + .Add("@Total", SqlDbType.Decimal).Value = Total + .Add("@Descuento", SqlDbType.Decimal).Value = Descuento + .Add("@OtrosGastos", SqlDbType.Decimal).Value = OtrosGastos .Add("@Observaciones", SqlDbType.VarChar).Value = Observaciones .Add("@CveOCDetalle", SqlDbType.Int).Value = CveOCDetalle .Add("@TipoRecepcion", SqlDbType.Int).Value = TipoRecepcion @@ -476,16 +476,16 @@ Public Class ClsCompras .Add("@AF_TipoMantenimiento", SqlDbType.Int).Value = AF_TipoMantenimiento .Add("@Referencia", SqlDbType.VarChar).Value = Referencia .Add("@CveCompraDetalle", SqlDbType.Int).Direction = ParameterDirection.Output - .Add("@RetIVA", SqlDbType.Float).Value = RetIVA - .Add("@RetISR", SqlDbType.Float).Value = RetISR - .Add("@IEPSPS", SqlDbType.Float).Value = IEPSPS - .Add("@IEPSPSIVA", SqlDbType.Float).Value = IEPSPSIVA + .Add("@RetIVA", SqlDbType.Decimal).Value = RetIVA + .Add("@RetISR", SqlDbType.Decimal).Value = RetISR + .Add("@IEPSPS", SqlDbType.Decimal).Value = IEPSPS + .Add("@IEPSPSIVA", SqlDbType.Decimal).Value = IEPSPSIVA - .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("@NoDeducible", SqlDbType.Bit).Value = NoDeducible .Add("@CveContratoDetalle", SqlDbType.Int).Value = CveContratoDetalle .Add("@CveCultivoCuadroDetalle", SqlDbType.Int).Value = CveCultivoCuadroDetalle diff --git a/App_Code/ClsGenerales.vb b/App_Code/ClsGenerales.vb index 0c36234e9..a84761df1 100644 --- a/App_Code/ClsGenerales.vb +++ b/App_Code/ClsGenerales.vb @@ -2527,7 +2527,7 @@ Public Class ClsGenerales CveEmpresa As Integer, Optional CveUsuario As Integer = -1, Optional CvePersonal As Integer = -1, Optional IdPoliza As Integer = -1, Optional CvePrePoliza As Integer = -1, Optional CvePeriodo As Integer = -1, Optional CveConceptoNomina As Integer = -1, Optional CvePromocion As Integer = -1, Optional CveAsistencia As Integer = -1, Optional CveAsistenciaDetalle As Integer = -1, Optional CveTipoBitacora As Integer = -1, - Optional FechaInicio As String = "", Optional FechaFin As String = "") As Boolean + Optional FechaInicio As String = "", Optional FechaFin As String = "", Optional Fecha As Date = MinFecha) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Gral_HistorialBitacoraGet") @@ -2554,6 +2554,8 @@ Public Class ClsGenerales .Add("@CveTipoBitacora", SqlDbType.Int).Value = CveTipoBitacora .Add("@FechaInicio", SqlDbType.VarChar).Value = FechaInicio .Add("@FechaFin", SqlDbType.VarChar).Value = FechaFin + .Add("@Fecha", SqlDbType.Date).Value = Fecha + End With 'SqlTypes.SqlDateTime.Null diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb index 6cfd8a54b..03880cf97 100644 --- a/App_Code/ClsInventarios.vb +++ b/App_Code/ClsInventarios.vb @@ -131,8 +131,6 @@ Public Class ClsInventarios Public Property ResponsableCarga As String Public Property ResponsableRecibio As String Public Property Modulo As String - Public Property ConAplicacion As Boolean - @@ -2309,8 +2307,6 @@ Public Class ClsInventarios FechaI = dr("FechaInicio").ToString FechaF = dr("FechaFin").ToString Estatus = dr("Estatus").ToString - ConAplicacion = Convert.ToBoolean(dr("ConAplicacion").ToString) - Retorno = True End If diff --git a/App_Code/ClsNominas.vb b/App_Code/ClsNominas.vb index 9d1572a61..2dd6b5be7 100644 --- a/App_Code/ClsNominas.vb +++ b/App_Code/ClsNominas.vb @@ -2483,6 +2483,52 @@ Public Class ClsNominas End Try Return retorno End Function +#Region "Prorrateo" + + Public Function ProrrateosubproyectoGET(CveEmpresa As Integer) As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_Nom_Prorrateosubproyecto") + SqlAdapter.SelectCommand.Parameters.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + Me.OnError("Ocurrió un error al obtener prorrateo.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return Retorno + End Function + Public Function ProrrateosubproyectoAdd(CvePersonal As Integer, CveSubProyecto As Integer, Porcentaje As Decimal) As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_Nom_ProrrateosubproyectoAdd") + SqlAdapter.SelectCommand.Parameters.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal + SqlAdapter.SelectCommand.Parameters.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto + SqlAdapter.SelectCommand.Parameters.Add("@Porcentaje", SqlDbType.Decimal).Value = Porcentaje + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + Me.OnError("Ocurrió un error al obtener prorrateo.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return Retorno + End Function + Public Function ProrrateosubproyectoRemove(CvePersonal As Integer, CveSubProyecto As Integer) As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_Nom_ProrrateosubproyectoRemove") + SqlAdapter.SelectCommand.Parameters.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal + SqlAdapter.SelectCommand.Parameters.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + Me.OnError("Ocurrió un error al obtener prorrateo.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return Retorno + End Function + +#End Region #Region "CRUD_Nom_PersonalIncapacidad" Public Function PersonalIncapacidadGet(cvePersonalIncapacidad As Int32, cvePersonal As Int32, CveEmpresa As Int32) As Boolean diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index f772f0635..555f3d41d 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -1352,7 +1352,7 @@ Public Class ClsPaginas End Get End Property Public Property GlobalDTPSSimplificado(CveEmpresa As Integer, Optional CveClasificacion As Integer = -1, Optional PSCodigo As String = "-1", Optional Estatus As Integer = 1, - Optional AplicaParaVenta As Integer = -1, Optional CvePS As Integer = -1, Optional Codigo As String = "-1") As DataTable + Optional AplicaParaVenta As Integer = -1, Optional CvePS As Integer = -1, Optional Codigo As String = "-1", Optional CodigoSATPS As String = "-1") As DataTable Get Dim AppNombre As String = String.Format("GlobalDTPSSimplificado-{0}", CveEmpresa) If CveEmpresa <> -1 Then @@ -1367,7 +1367,7 @@ Public Class ClsPaginas Dim Cons = DirectCast(Application(AppNombre), EnumerableRowCollection(Of DataRow)) - Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveEmpresa) = CveEmpresa)) + 'Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveEmpresa) = CveEmpresa)) If CveClasificacion >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveClasificacion) = CveClasificacion)) If PSCodigo <> "-1" Then Cons = Cons.Where((Function(a) Convert.ToString(a!PSCodigo) = PSCodigo)) Codigo = Codigo.ToUpper().Trim() @@ -1375,6 +1375,7 @@ Public Class ClsPaginas If Estatus >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveEstado) = Estatus)) If AplicaParaVenta >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!AplicaParaVenta) = AplicaParaVenta)) If CvePS >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!CvePS) = CvePS)) + If CodigoSATPS <> "-1" Then Cons = Cons.Where((Function(a) Convert.ToString(a!SATClavePS) = CodigoSATPS)) Try GlobalDTPSSimplificado = Cons.OrderBy(Function(a) a!PSCodigo).CopyToDataTable diff --git a/App_Code/ClsRH.vb b/App_Code/ClsRH.vb index 9a643e6ef..a78a05d7c 100644 --- a/App_Code/ClsRH.vb +++ b/App_Code/ClsRH.vb @@ -2031,12 +2031,13 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo Return Retorno End Function - Public Function UpdateSalariointegrado(CvePersonal As Integer, CveEmpresa As Integer, SDI As Double, SalarioDiario As Double) As Boolean + Public Function UpdateSalariointegrado(CvePersonal As Integer, CveUsuario As Integer, CveEmpresa As Integer, SDI As Double, SalarioDiario As Double) As Boolean Dim Retorno As Boolean = False SqlDataAdapter("PA_RH_PersonalUpdateSalarioIntegrado") With SqlAdapter.SelectCommand.Parameters .Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@SDI", SqlDbType.Money).Value = SDI .Add("@SalarioDiario", SqlDbType.Money).Value = SalarioDiario End With @@ -2048,13 +2049,14 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo End Try Return Retorno End Function - Public Function UpdateSalarios(CvePersonal As Integer, Fecha As String, CveEmpresa As Integer, SalarioDiario As Double, SDI As Double, SalarioDiarioSS As Double, SalarioDiarioPago As Double, Optional CalcularSDI As Boolean = False) As Boolean + Public Function UpdateSalarios(CvePersonal As Integer, Fecha As String, CveUsuario As Integer, CveEmpresa As Integer, SalarioDiario As Double, SDI As Double, SalarioDiarioSS As Double, SalarioDiarioPago As Double, Optional CalcularSDI As Boolean = False) As Boolean Dim Retorno As Boolean = False SqlDataAdapter("PA_RH_PersonalUpdateSalarios") With SqlAdapter.SelectCommand.Parameters .Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal .Add("@Fecha", SqlDbType.Date).Value = Fecha .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@SalarioDiarioPago", SqlDbType.Money).Value = SalarioDiarioPago .Add("@SalarioDiario", SqlDbType.Money).Value = SalarioDiario .Add("@SDI", SqlDbType.Money).Value = SDI @@ -2448,7 +2450,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo Dim Retorno As Boolean = False Dim xmlProductos As System.Xml.Linq.XDocument = Nothing If registros IsNot Nothing AndAlso registros.Count > 0 Then - xmlProductos = New System.Xml.Linq.XDocument(New System.Xml.Linq.XElement("registros", From x In registros Select New System.Xml.Linq.XElement("registro", New System.Xml.Linq.XElement("CveAsistenciaDetalle", x.CveAsistenciaDetalle), New System.Xml.Linq.XElement("CvePersonal", x.CvePersonal), New System.Xml.Linq.XElement("CveAsistenciasInasistencias", x.CveAsistenciasInasistencias), New System.Xml.Linq.XElement("CveSubProyecto", x.CveSubProyecto), New System.Xml.Linq.XElement("Fecha", x.Fecha)))) + xmlProductos = New System.Xml.Linq.XDocument(New System.Xml.Linq.XElement("registros", From x In registros Select New System.Xml.Linq.XElement("registro", New System.Xml.Linq.XElement("CveAsistenciaDetalle", x.CveAsistenciaDetalle), New System.Xml.Linq.XElement("CvePersonal", x.CvePersonal), New System.Xml.Linq.XElement("CveAsistenciasInasistencias", x.CveAsistenciasInasistencias), New System.Xml.Linq.XElement("CveSubProyecto", x.CveSubProyecto), New System.Xml.Linq.XElement("Fecha", x.Fecha), New System.Xml.Linq.XElement("Motivo", x.Motivo)))) End If Data = New DataTable SqlDataAdapter("PA_RH_AsistenciaDetalleUP") diff --git a/Compras/PopUpBuscarFolioC.aspx b/Compras/PopUpBuscarFolioC.aspx index 041743b15..77b5be834 100644 --- a/Compras/PopUpBuscarFolioC.aspx +++ b/Compras/PopUpBuscarFolioC.aspx @@ -46,7 +46,7 @@