diff --git a/App_Code/ClsBancos.vb b/App_Code/ClsBancos.vb index bab8da61a..e4b936d10 100644 --- a/App_Code/ClsBancos.vb +++ b/App_Code/ClsBancos.vb @@ -945,7 +945,7 @@ Public Class ClsBancos Public Function GeneraTimbrePago(CveIE As Integer, CveVenta As Integer, UsuarioActual As Usuario, Optional CveCliente As Integer = -1, Optional CFDIRelacionado As String = "-1", Optional EsRegeneracion As Boolean = False, Optional CvePrePoliza As Integer = -1, Optional FechaTimbrado As DateTime = MinFecha) As Boolean - If FechaTimbrado = MinFecha Then FechaTimbrado = DateTime.Now + Dim Serie As String = "Pag" Dim Folio As Integer = -1 Dim Retorno As Boolean = False @@ -961,6 +961,33 @@ Public Class ClsBancos 'If EsCancelacion Then Estatus = 2 If EsRegeneracion Then Estatus = 3 + If FechaTimbrado = MinFecha Then + Dim RowFiltro As DataRow = Nothing + + RowFiltro = dttpagos.FiltroPrimero("") + + If RowFiltro IsNot Nothing Then + If Now.EsHorarioVerano Then + Dim UTCOffsetVerano As Integer = RowFiltro("UTCOffsetVerano").ToString().ToEntero() + If UTCOffsetVerano <> 0 Then + FechaTimbrado = DateTime.UtcNow.AddHours(UTCOffsetVerano) + Else + FechaTimbrado = DateTime.Now + End If + Else + Dim UTCOffsetInvierno As Integer = RowFiltro("UTCOffsetInvierno").ToString().ToEntero() + If UTCOffsetInvierno <> 0 Then + FechaTimbrado = DateTime.UtcNow.AddHours(UTCOffsetInvierno) + Else + FechaTimbrado = DateTime.Now + End If + End If + Else + FechaTimbrado = DateTime.Now + End If + + End If + Dim tCveComplementoPago As Integer = AddComplementoPago(If(CvePrePoliza > 0, CveIE, dr("CveIE").ToString.ToEntero), -1, Serie, Folio, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CvePrePoliza:=CvePrePoliza, Estatus:=Estatus) If tCveComplementoPago > 0 Then diff --git a/App_Code/ClsCompras.vb b/App_Code/ClsCompras.vb index cc76dc5f6..11f45eec7 100644 --- a/App_Code/ClsCompras.vb +++ b/App_Code/ClsCompras.vb @@ -439,7 +439,8 @@ Public Class ClsCompras 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 NoDeducible As Boolean = False) As Boolean + 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 NoDeducible As Boolean = False, Optional CveContratoDetalle As Integer = -1) As Boolean Dim Retorno As Boolean = False @@ -482,6 +483,7 @@ Public Class ClsCompras .Add("@IEPSPSPorcentaje", SqlDbType.Float).Value = IEPSPSPorcentaje .Add("@IEPSPSIVAPorcentaje", SqlDbType.Float).Value = IEPSPSIVAPorcentaje .Add("@NoDeducible", SqlDbType.Bit).Value = NoDeducible + .Add("@CveContratoDetalle", SqlDbType.Int).Value = CveContratoDetalle End With Try diff --git a/App_Code/ClsContratos.vb b/App_Code/ClsContratos.vb index d57f54cd8..a46495d7e 100644 --- a/App_Code/ClsContratos.vb +++ b/App_Code/ClsContratos.vb @@ -145,6 +145,7 @@ Public Class ClsContratos Public Property FechaFinal As DateTime Public Property Ubicacion As String Public Property Responsable As String + Public Property Lugar As String Public Property CveSubProyecto As Integer Public Property SubProyectoContrato As String Public Property CveProyecto As Integer @@ -290,6 +291,8 @@ Public Class ClsContratos Me.FechaVenc = Data.Rows(0)("FechaVenc").ToString.ToDate Me.CveVendedor = Data.Rows(0)("CveVendedor").ToString.ToEntero Me.ImporteTotal = Data.Rows(0)("ImporteTotal").ToString.ToDecimal + Me.Lugar = Data.Rows(0)("Lugar").ToString + Observaciones = Data.Rows(0)("Observaciones").ToString CveDireccionEnvio = Data.Rows(0)("CveDireccionEnvio").ToString.ToEntero AplicaImpuestosLocales = CBool(Data.Rows(0)("AplicaImpuestosLocales")) @@ -540,7 +543,7 @@ Public Class ClsContratos Geom As String, CveContratoPadre As Integer, CveUsuario As Integer, CveEmpresa As Integer, EsPresupuestal As Boolean, Minimo As Double, Maximo As Double, Importe As Double, CveMoneda As Integer, ModalidadDetalle As Integer, Optional CveContratosEstatus As Integer = -1, Optional CveContratoTipo As Integer = -1, Optional TipoCambio As Double = 1, Optional CveSucursalCliente As Integer = -1, Optional CveAlmacenOrigen As Integer = -1, Optional CveAlmacenDestino As Integer = -1, Optional PorcentajeComision As Integer = -1, Optional TipoGarantia As Integer = -1, Optional Folio As Integer = -1, Optional FechaVenc As Date = Nothing, Optional EstatusFianza As Integer = -1, Optional CvePeriodo As Integer = -1, Optional CveContratoPlantilla As Integer = -1, Optional CveCuentaEquipo As Integer = -1, - Optional CveVendedor As Integer = -1, Optional Observaciones As String = "", Optional CveDireccionEnvio As Integer = -1, Optional AplicaImpuestosLocales As Boolean = False, Optional CorreoNotificacionPedDev As String = "") As Integer + Optional CveVendedor As Integer = -1, Optional Observaciones As String = "", Optional CveDireccionEnvio As Integer = -1, Optional AplicaImpuestosLocales As Boolean = False, Optional CorreoNotificacionPedDev As String = "", Optional Lugar As String = "") As Integer Dim Retorno As Integer = -1 DataAdapter("PA_Con_ContratosObraAdd") @@ -591,6 +594,7 @@ Public Class ClsContratos .Add("@CveDireccionEnvio", SqlDbType.Int).Value = CveDireccionEnvio .Add("@AplicaImpuestosLocales", SqlDbType.Bit).Value = If(AplicaImpuestosLocales, 1, 0) .Add("@CorreoNotificacionPedDev", SqlDbType.VarChar).Value = CorreoNotificacionPedDev + .Add("@Lugar", SqlDbType.VarChar).Value = Lugar .Add("@CveContrato", SqlDbType.Int).Direction = ParameterDirection.Output @@ -617,7 +621,7 @@ Public Class ClsContratos CveContratoPadre As Integer, CveUsuario As Integer, CveEmpresa As Integer, EsPresupuestal As Boolean, Minimo As Double, Maximo As Double, Importe As Double, CveMoneda As Integer, ModalidadDetalle As Integer, Optional CveContratosEstatus As Integer = -1, Optional CveContratoTipo As Integer = -1, Optional TipoCambio As Double = 1.0, Optional CveSucursalCliente As Integer = -1, Optional CveAlmacenOrigen As Integer = -1, Optional CveAlmacenDestino As Integer = -1, Optional PorcentajeComision As Integer = -1, Optional TipoGarantia As Integer = -1, Optional Folio As Integer = -1, Optional FechaVenc As Date = Nothing, Optional EstatusFianza As Integer = -1, Optional CveContratoPlantilla As Integer = -1, Optional CveCuentaEquipo As Integer = -1, - Optional CveVendedor As Integer = -1, Optional Observaciones As String = "", Optional CveDireccionEnvio As Integer = -1, Optional AplicaImpuestosLocales As Boolean = False, Optional CorreoNotificacionPedDev As String = "") As Boolean + Optional CveVendedor As Integer = -1, Optional Observaciones As String = "", Optional CveDireccionEnvio As Integer = -1, Optional AplicaImpuestosLocales As Boolean = False, Optional CorreoNotificacionPedDev As String = "", Optional Lugar As String = "") As Boolean Dim Retorno = False DataAdapter("PA_Con_ContratosObraUpdate") @@ -666,7 +670,8 @@ Public Class ClsContratos .Add("@Observaciones", SqlDbType.VarChar).Value = Observaciones .Add("@CveDireccionEnvio", SqlDbType.Int).Value = CveDireccionEnvio .Add("@AplicaImpuestosLocales", SqlDbType.Bit).Value = If(AplicaImpuestosLocales, 1, 0) - .Add("@CorreoNotificacionPedDev", SqlDbType.VarChar).Value = CorreoNotificacionPedDev + .Add("@CorreoNotificacionPedDev", SqlDbType.VarChar).Value = CorreoNotificacionPedDev + .Add("@Lugar", SqlDbType.VarChar).Value = Lugar End With @@ -794,6 +799,9 @@ Public Class ClsContratos Return Retorno End Function + + + #End Region #Region "C I C L O C O M E R C I A L" @@ -1061,9 +1069,10 @@ Public Class ClsContratos End Try Return Retorno - End Function - + End Function + #End Region + #Region "Contratos detalles Avance" Public Function GetContratosAvanceHistoricos(CveContrato As Integer, CveTipoPresupuesto As Integer, fecha As String) As Boolean Dim Retorno = False @@ -1275,6 +1284,30 @@ Public Class ClsContratos #End Region +#Region "CONTRATOS OBRA COMPRAS" + + Public Function GetContratosObraCompras(CveContrato As Integer, CveEmpresa As Integer) As Boolean + Dim Retorno = False + + DataAdapter("PA_Con_ContratosAvanceObraComprasGet") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveContrato", SqlDbType.Int).Value = CveContrato + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al cargar los avances del Contrato.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return Retorno + End Function + +#End Region + + #Region " S E C C I O N E S " Public Function GetSecciones() As Boolean Dim Retorno As Boolean = False @@ -2121,11 +2154,11 @@ Public Class ClsContratos End Try Return Retorno - End Function - - + End Function + + #Region " REPORTES AVANCES " - + Public Function GetReporteContratosAvancesCP(CveEmpresa As Integer, CveCliente As Integer, CveProveedor As Integer, CveTipoContrato As Integer, CveContrato As Integer, Optional CveEstatus As Integer = -1, Optional CveTipoEstatus As Integer = -1) As Boolean Dim Retorno As Boolean = False @@ -2150,7 +2183,17 @@ Public Class ClsContratos End Try Return Retorno - End Function + End Function + + + + + + + + + + Public Function GetReporteContratosAvancesDetalleCP(CveContrato As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False @@ -2169,8 +2212,34 @@ Public Class ClsContratos OnError("Ocurrió un error al obtener el Reporte de Avances Detalle CP.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End Try + Return Retorno + End Function + + + + + Public Function GetReporteContratosAvancesDetalleControl(CveContrato As Integer, CveEmpresa As Integer) As Boolean + Dim Retorno As Boolean = False + + DataAdapter("PA_Con_ReporteContratosAvancesControlDetalle") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveContrato", SqlDbType.Int).Value = CveContrato + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener el Reporte de Avances de control.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return Retorno End Function + + Public Function GetVentasAvance(CveContrato As Integer, CveClasificacion As Integer, CvePS As Integer, Tipo As Integer) As Boolean Dim Retorno As Boolean = False diff --git a/App_Code/ClsOC.vb b/App_Code/ClsOC.vb index b12725805..f9723e55e 100644 --- a/App_Code/ClsOC.vb +++ b/App_Code/ClsOC.vb @@ -68,6 +68,7 @@ Public Class ClsOC Public Property FechaEstimadaEntrega As Date 'Private _NombreUsuario As String Public Property CveProveedor As Integer + Public Property TipoProveedor As String Public Property CveProveedorSucursal As Integer Public Property SucursalDireccion As String Public Property ProveedorContacto As String @@ -736,6 +737,7 @@ Public Class ClsOC _NombreUsuario = dr("NombreUsuario").ToString _CveProveedor = If(Not IsDBNull(dr("CveProveedor")), dr("CveProveedor").ToString.ToEntero, -1) + Me.TipoProveedor = If(Not IsDBNull(dr("CveTipoProveedor")), dr("CveTipoProveedor").ToString, "-1") _CveProveedorSucursal = If(Not IsDBNull(dr("CveProveedorSucursal")), dr("CveProveedorSucursal").ToString.ToEntero, -1) _RazonSocial = If(Not IsDBNull(dr("RazonSocial")), dr("RazonSocial").ToString, "") _Direccion = If(Not IsDBNull(dr("Direccion")), dr("Direccion").ToString, "") @@ -1250,7 +1252,7 @@ Public Class ClsOC 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) As Boolean + Optional IEPSPSIVAPorcentaje As Double = 0, Optional CveVentaDetalleCotizacion As Integer = -1, Optional CveTipoGastoObra As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_OC_OrdenesCompraDetalleAdd") @@ -1281,6 +1283,10 @@ Public Class ClsOC .Add("@IEPSPSPorcentaje", SqlDbType.Float).Value = IEPSPSPorcentaje .Add("@IEPSPSIVAPorcentaje", SqlDbType.Float).Value = IEPSPSIVAPorcentaje .Add("@CveVentaDetalleCotizacion", SqlDbType.Int).Value = CveVentaDetalleCotizacion + .Add("@CveTipoGastoObra", SqlDbType.Int).Value = CveTipoGastoObra + + + End With Try @@ -1303,7 +1309,7 @@ Public Class ClsOC 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) As Integer + Optional IEPSPSIVAPorcentaje As Double = 0, Optional CveTipoGastoObra As Integer = -1) As Integer Dim Retorno As Integer = -1 DataAdapter("PA_OC_OrdenesCompraDetalleUpdate") @@ -1333,6 +1339,7 @@ Public Class ClsOC .Add("@RetISRPorcentaje", SqlDbType.Float).Value = RetISRPorcentaje .Add("@IEPSPSPorcentaje", SqlDbType.Float).Value = IEPSPSPorcentaje .Add("@IEPSPSIVAPorcentaje", SqlDbType.Float).Value = IEPSPSIVAPorcentaje + .Add("@CveTipoGastoObra", SqlDbType.Int).Value = CveTipoGastoObra End With Try diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 38ccbc84f..0cceddab1 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -1758,12 +1758,12 @@ Public Class ClsPaginas End Property Property GlobalDTContratosTipos(CveEmpresa As Integer) As DataTable Get - Dim AppNombre As String = String.Format("GlobalDTContratosTipos-{0}", CveEmpresa) + Dim AppNombre As String = "GlobalDTContratosTipos" 'sino existe, recarga los datos If Application(AppNombre) Is Nothing Then Dim ObjContratos As New ClsContratos - If ObjContratos.GetContratosTipos(CveEmpresa) Then Application(AppNombre) = ObjContratos.DtResultados + If ObjContratos.GetContratosTipos(-1) Then Application(AppNombre) = ObjContratos.DtResultados ObjContratos.Dispose() End If @@ -1771,7 +1771,7 @@ Public Class ClsPaginas End Get Set(value As DataTable) - Dim AppNombre As String = String.Format("GlobalDTContratosTipos-{0}", CveEmpresa) + Dim AppNombre As String = "GlobalDTContratosTipos" Application(AppNombre) = value End Set End Property @@ -7376,7 +7376,7 @@ Public Class ClsPaginas params.Add(New ReportParameter("Descuento", DtDetalle.SUM("Descuento").ToString.FormatoNumero(2))) End If 'DATOS PARA DESCUENTO - If EmpresaActual.CveEmpresa.Contiene(4, 145, 7, 11, 12, 13, 72, 80, 83, 122, 126) Then 'EMPRESAS QUE YA TIENEN EL AJUSTE EN EL FORMATO + If EmpresaActual.CveEmpresa.Contiene(4, 145, 7, 11, 12, 13, 72, 80, 83, 119, 122, 126) Then 'EMPRESAS QUE YA TIENEN EL AJUSTE EN EL FORMATO params.Add(New ReportParameter("SubTotal", ObjOC.SubTotal.ToString)) params.Add(New ReportParameter("SubTotal2", DtDetalle.SUM("Total").ToString)) Else @@ -7406,6 +7406,9 @@ Public Class ClsPaginas params.Add(New ReportParameter("ProveedorDireccion", If(ObjOC.CveProveedorSucursal > 0, ObjOC.SucursalDireccion, ObjOC.Direccion))) params.Add(New ReportParameter("ProveedorTel", If(ObjOC.CveProveedorSucursal > 0, ObjOC.SucursalTelefono, ObjOC.Telefono))) + If UsuarioActual.CveEmpresa = 119 Then + params.Add(New ReportParameter("TipoProveedor", ObjOC.TipoProveedor)) + End If params.Add(New ReportParameter("ProveedorRFC", ObjOC.RFC)) params.Add(New ReportParameter("IVA", ObjOC.IVA.ToString)) params.Add(New ReportParameter("RetIVA", ObjOC.RetIVA.ToString.FormatoNumero(2))) diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index 6a4739cf8..9e3fe70cf 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -1346,7 +1346,7 @@ Public Class ClsVentas Public Function GetRepVentas(FechaI As Date, FechaF As Date, FechaIEjec As Date, FechaFEjec As Date, CveCliente As Integer, CveSubProyectoEjecucion As Integer, CveVendedor As String, CveUsuario As Integer, CveEstatus As String, IVA As String, CveEmpresa As Integer, Gpo As Integer, Optional TipoDocto As String = "-1", Optional CveProyecto As Integer = -1, Optional CveSubProyecto As String = "-1", Optional TipoCambio As Integer = 1, Optional TCEspecifico As Decimal = -1, Optional CveUsuarioConsulta As Integer = -1, - Optional CveClienteClasificacion As Integer = -1, Optional CveCondicionesPago As Integer = -1, Optional TipoCliente As Integer = -1) As Boolean + Optional CveClienteClasificacion As Integer = -1, Optional CveCondicionesPago As Integer = -1, Optional TipoCliente As Integer = -1, Optional ModalidadContable As Boolean = False) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_VentasGetRep") @@ -1373,6 +1373,7 @@ Public Class ClsVentas .Add("@CveClienteClasificacion", SqlDbType.Int).Value = CveClienteClasificacion .Add("@CveCondicionesPago", SqlDbType.Int).Value = CveCondicionesPago .Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente + .Add("@ModalidadContable", SqlDbType.Bit).Value = ModalidadContable End With Try @@ -1477,7 +1478,7 @@ Public Class ClsVentas Vendedor As String, CveUsuario As Integer, CveEstatus As String, FechaI As Date, FechaF As Date, CveCorte As Integer, TipoDocto As String, CveSubProyectoEjecucion As Integer, CveEmpresa As Integer, FechaIEjec As Date, FechaFEjec As Date, Optional CveProyecto As Integer = -1, Optional CveSubProyecto As String = "-1", Optional TipoCambio As Integer = 1, Optional TCEspecifico As Decimal = -1, Optional CveMoneda As Integer = -1, Optional CveUsuarioConsulta As Integer = -1, - Optional CveClienteClasificacion As Integer = -1, Optional CveCondicionesPago As Integer = -1, Optional TipoCliente As Integer = -1) As Boolean + Optional CveClienteClasificacion As Integer = -1, Optional CveCondicionesPago As Integer = -1, Optional TipoCliente As Integer = -1, Optional ModalidadContable As Boolean = False) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_VentasGetRepDetalle") @@ -1509,6 +1510,7 @@ Public Class ClsVentas .Add("@CveClienteClasificacion", SqlDbType.Int).Value = CveClienteClasificacion .Add("@CveCondicionesPago", SqlDbType.Int).Value = CveCondicionesPago .Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente + .Add("@ModalidadContable", SqlDbType.Bit).Value = ModalidadContable End With Try diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb index 7ce9cd07e..d6b72340c 100644 --- a/App_Code/Modelos.vb +++ b/App_Code/Modelos.vb @@ -4707,7 +4707,7 @@ Namespace Modelos If CveMovimientoDevolucion > 0 Then For Each Dr As DataRow In DtExistencias.FiltraParametros($"CveMovimiento = {RowMovimiento("CveMovimiento").ToString()}").Rows - If Not ObjInventario.AddMovimientoDetalle(CveMovimientoDevolucion, Dr("Cantidad").ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, -1, Serie:=Dr("Serie").ToString, Lote:=Dr("Lote").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero) Then + If Not ObjInventario.AddMovimientoDetalle(CveMovimientoDevolucion, Dr("Cantidad").ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, -1, Serie:=Dr("Serie").ToString, Lote:=Dr("Lote").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, CveSeccionAlmacen:=Dr("CveSeccionAlmacen").ToString.ToEntero) Then ErrorCancelar = True MensajeError = "Ocurrió un error al procesar los conceptos de salida. Por favor vuelva a intentar." Exit For @@ -4810,7 +4810,7 @@ Namespace Modelos 'REALIZA LA DEVOLUCION AL ALMACEN VIRTUAL - If Not GeneraMovimientosVirtuales(CveVenta, CveMovimientoDevolucion, RowMovimiento("CveMovimiento").ToString().ToEntero(), ObjInventario) Then + If Not ErrorCancelar AndAlso Not GeneraMovimientosVirtuales(CveVenta, CveMovimientoDevolucion, RowMovimiento("CveMovimiento").ToString().ToEntero(), ObjInventario) Then ErrorCancelar = True MensajeError = "Ocurrió un error al cargar los datos de devolución. Por favor vuelva a intentar." End If @@ -4824,6 +4824,10 @@ Namespace Modelos End If End If + If ErrorCancelar Then + Exit For + End If + Next 'SI EXISTEN HAY EXISTENCIA EN (ENTREGA POR ADELANTADO) SE TIENE QUE REGRESAR AL ALMACEN ORGINAL (GENERAL,SIN COSTO) @@ -4857,6 +4861,10 @@ Namespace Modelos End If Next + If ErrorCancelar Then + Exit For + End If + Next End If @@ -5297,7 +5305,7 @@ Namespace Modelos Exit For End If - If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalidaDevRem, DrRem("Cantidad").ToString.ToDecimal, DrRem("CveUM").ToString.ToEntero, DrRem("CvePS").ToString.ToEntero, DrRem("PU").ToString.ToDecimal, CveAF:=DrRem("CveActivoFijo").ToString.ToEntero, Serie:=DrRem("Serie").ToString, Lote:=DrRem("Lote").ToString, CveVentaDetalle:=CveVentaDetalleRem, CveMovimientoDetalleEntrada:=DrRem("CveMovimientoDetalle").ToString().ToEntero()) Then + If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalidaDevRem, DrRem("Cantidad").ToString.ToDecimal, DrRem("CveUM").ToString.ToEntero, DrRem("CvePS").ToString.ToEntero, DrRem("PU").ToString.ToDecimal, CveAF:=DrRem("CveActivoFijo").ToString.ToEntero, Serie:=DrRem("Serie").ToString, Lote:=DrRem("Lote").ToString, CveVentaDetalle:=CveVentaDetalleRem, CveMovimientoDetalleEntrada:=DrRem("CveMovimientoDetalle").ToString().ToEntero(), CveSeccionAlmacen:=-3) Then ErrorCancelar = True Exit For End If @@ -5320,7 +5328,7 @@ Namespace Modelos If Not ErrorCancelar Then If DtEntradaDetalle IsNot Nothing Then For Each Dr As DataRow In DtEntradaDetalle.Rows - If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntradaDevRem, Dr("Cantidad").ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, Serie:=Dr("Serie").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString().ToEntero(), CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, Lote:=Dr("Lote").ToString) Then + If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntradaDevRem, Dr("Cantidad").ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, Serie:=Dr("Serie").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString().ToEntero(), CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, Lote:=Dr("Lote").ToString, CveSeccionAlmacen:=-3) Then ErrorCancelar = True Exit For End If @@ -6097,6 +6105,28 @@ Namespace Modelos Public Sub SetCliente() If CveCliente > 0 Then Cliente = New Modelos.ClienteModel(CveCliente, CveEmpresa) + If Me.CveClienteSucursal > 0 Then + Dim ObjCliente As New ClsClientes() + If ObjCliente.GetSucursales(CveCliente, Me.CveClienteSucursal) AndAlso ObjCliente.DtResultados.Rows.Count > 0 Then + Me.ClienteSucursal = New Modelos.SucursalModel(ObjCliente.DtResultados.Rows(0)) + End If + ObjCliente.Dispose() + Else + Me.ClienteSucursal = New Modelos.SucursalModel() + Me.ClienteSucursal.NoExt = Cliente.NoExt + Me.ClienteSucursal.NoInt = Cliente.NoInt + Me.ClienteSucursal.Localidad = Cliente.Localidad + Me.ClienteSucursal.Direccion = Cliente.Direccion + Me.ClienteSucursal.Colonia = Cliente.Colonia + Me.ClienteSucursal.Municipio = Cliente.Localidad + Me.ClienteSucursal.Estado = Cliente.Estado + Me.ClienteSucursal.CP = Cliente.CP + Me.ClienteSucursal.Pais = Cliente.Pais + Me.ClienteSucursal.CorreoSucursal = Cliente.CorreoCotizacion + Me.ClienteSucursal.TelefonoSucursal = Cliente.Telefono + Me.ClienteSucursal.Sucursal = Cliente.Sucursal + Me.ClienteSucursal.ImprimeNombreSucursal = Cliente.ImprimeNombreSucursal.ToString() + End If End If End Sub Public Sub SetMoneda() @@ -9435,7 +9465,8 @@ Namespace Modelos Public Property ClaveSATColonia As String Public Property ClaveSATCP As String Public Property EsDistribuidor As Boolean - + Public Property CorreoCotizacion As String + Public Property ImprimeNombreSucursal As Integer End Class diff --git a/Ashx/SIGWeb.ashx b/Ashx/SIGWeb.ashx index 0bd572211..46d96e18d 100644 --- a/Ashx/SIGWeb.ashx +++ b/Ashx/SIGWeb.ashx @@ -966,6 +966,13 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState Private Function GETUMSAT(ByVal context As HttpContext) As String Dim retorno As String = "" + + If context.Application("GlobalDTPSATUM") Is Nothing Then + Dim ObjGrales As New ClsGenerales + If ObjGrales.GetSATUnidadMedida Then context.Application("GlobalDTPSATUM") = ObjGrales.DtResultados.AsEnumerable() Else context.Application("GlobalDTPSATUM") = Nothing + ObjGrales.Dispose() + End If + Dim DTUM = DirectCast(context.Application("GlobalDTPSATUM"), EnumerableRowCollection(Of DataRow)) Dim DtPSRetorno As DataTable diff --git a/Bancos/RepComplementoPago.aspx b/Bancos/RepComplementoPago.aspx index 9b28d447a..06af838af 100644 --- a/Bancos/RepComplementoPago.aspx +++ b/Bancos/RepComplementoPago.aspx @@ -114,7 +114,7 @@ diff --git a/Bancos/RepComplementoPago.aspx.vb b/Bancos/RepComplementoPago.aspx.vb index bcfde9140..629fa321f 100644 --- a/Bancos/RepComplementoPago.aspx.vb +++ b/Bancos/RepComplementoPago.aspx.vb @@ -51,28 +51,44 @@ Partial Class Bancos_RepComplementoPago For Each gvr As GridViewRow In GvD.Rows - If gvr.FCCheckBox("Chk").Checked Then - Dim Banco As New ClsBancos - Banco.IniciaTransacSQL() - - - If Banco.GeneraTimbrePago(gvr.DataKey("CveIE").ToEntero, -1, UsuarioActual) Then - If Banco.Mensaje = "" Then - Banco.Commit() - PDFReciboDePagos(-1, -1, Banco.CveComplementoPago, False) - Str.AppendFormat("Folio: {0}  ", Banco.ComplementoSerieFolio) - Str.AppendFormat("XML    ", Encripta(String.Format("OP=CompP&EXT=xml&SerieFolio={0}&CveComplementoPago={1}", Banco.ComplementoSerieFolio, Banco.CveComplementoPago))) - Str.AppendFormat("PDF   ", Encripta(String.Format("OP=CompP&EXT=pdf&SerieFolio={0}&CveComplementoPago={1}", Banco.ComplementoSerieFolio, Banco.CveComplementoPago))) - Str.AppendFormat("{1}   {2}
", gvr.DataKey("CveIE"), gvr.DataKey("Folio"), gvr.DataKey("NombreCliente")) - MandaCorreo(Banco.ComplementoSerieFolio, gvr.DataKey("CobranzaCorreo")) - End If - - Else - Str.AppendFormat("No se genero complemento del Folio {0} por el siguiente motivo: {1}", gvr.DataKey("Folio"), Banco.Mensaje) - Banco.RollBack() + If gvr.FCCheckBox("Chk").Checked Then + Dim FechaTimbrado As DateTime = DateTime.Now + + Dim UTCOffset As Integer = 0 + + If Now.EsHorarioVerano Then + If gvr.DataKey("UTCOffsetVerano").ToEntero() <> 0 Then + UTCOffset = gvr.DataKey("UTCOffsetVerano").ToEntero() + End If + Else + If gvr.DataKey("UTCOffsetInvierno").ToEntero() <> 0 Then + UTCOffset = gvr.DataKey("UTCOffsetInvierno").ToEntero() + End If End If + If UTCOffset <> 0 Then + FechaTimbrado = DateTime.UtcNow.AddHours(UTCOffset) + End If + Dim Banco As New ClsBancos + Banco.IniciaTransacSQL() + + If Banco.GeneraTimbrePago(gvr.DataKey("CveIE").ToEntero, -1, UsuarioActual, FechaTimbrado:=FechaTimbrado) Then + If Banco.Mensaje = "" Then + Banco.Commit() + PDFReciboDePagos(-1, -1, Banco.CveComplementoPago, False) + Str.AppendFormat("Folio: {0}  ", Banco.ComplementoSerieFolio) + Str.AppendFormat("XML    ", Encripta(String.Format("OP=CompP&EXT=xml&SerieFolio={0}&CveComplementoPago={1}", Banco.ComplementoSerieFolio, Banco.CveComplementoPago))) + Str.AppendFormat("PDF   ", Encripta(String.Format("OP=CompP&EXT=pdf&SerieFolio={0}&CveComplementoPago={1}", Banco.ComplementoSerieFolio, Banco.CveComplementoPago))) + Str.AppendFormat("{1}   {2}
", gvr.DataKey("CveIE"), gvr.DataKey("Folio"), gvr.DataKey("NombreCliente")) + MandaCorreo(Banco.ComplementoSerieFolio, gvr.DataKey("CobranzaCorreo")) + End If + + Else + Str.AppendFormat("No se genero complemento del Folio {0} por el siguiente motivo: {1}", gvr.DataKey("Folio"), Banco.Mensaje) + Banco.RollBack() + End If + Banco.Dispose() End If Next diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 7fec87ed4..8f1c3a848 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -2679,7 +2679,7 @@ Partial Class Compras_Compras TmpDT.Columns.Add("CveContrato", GetType(Integer)) TmpDT.Columns.Add("DifPSSat", GetType(Integer)) - + TmpDT.Columns.Add("CveContratoDetalle", GetType(Integer)) GvPS.DataSource = TmpDT @@ -5055,7 +5055,8 @@ Partial Class Compras_Compras CveTipoGasto:=Row("CveTipoGasto").ToString.ToEntero, AF_Medida:=Row("AFMedida").ToString.ToEntero, AF_TipoMantenimiento:=Row("AFTipoMantenimiento").ToString.ToEntero, Referencia:=Referencia, OtrosGastos:=Row("OtrosGastos").ToString.ToDecimal, RetIVA:=Row("RetIVA").ToString.ToDouble, RetISR:=Row("RetISR").ToString.ToDouble, IEPSPS:=Row("IEPSPS").ToString.ToDouble, IEPSPSIVA:=Row("IEPSPSIVA").ToString.ToDouble, IVAPorcentaje:=Row("IVAPorcentaje").ToString.ToDouble, RetIVAPorcentaje:=Row("RetIVAPorcentaje").ToString.ToDouble, RetISRPorcentaje:=Row("RetISRPorcentaje").ToString.ToDouble, - IEPSPSPorcentaje:=Row("IEPSPSPorcentaje").ToString.ToDouble, IEPSPSIVAPorcentaje:=Row("IEPSPSIVAPorcentaje").ToString.ToDouble, NoDeducible:=If((Row("NoDeducible").ToString().ToUpper().Contiene("TRUE", "1")) AndAlso EsNoDeducible, True, False)) Then + IEPSPSPorcentaje:=Row("IEPSPSPorcentaje").ToString.ToDouble, IEPSPSIVAPorcentaje:=Row("IEPSPSIVAPorcentaje").ToString.ToDouble, NoDeducible:=If((Row("NoDeducible").ToString().ToUpper().Contiene("TRUE", "1")) AndAlso EsNoDeducible, True, False), + CveContratoDetalle:=Row("CveContratoDetalle").ToString.ToEntero) Then ErrorDetalles = True Exit For @@ -11262,6 +11263,8 @@ Partial Class Compras_Compras TmpDT.Columns.Add("DifPSSat", GetType(Integer)) + TmpDT.Columns.Add("CveContratoDetalle", GetType(Integer)) + TmpDTOriginal = New DataTable TmpDTOriginal.Columns.Add("Consec", GetType(Integer)) TmpDTOriginal.Columns.Add("Cantidad", GetType(Decimal)) @@ -11367,6 +11370,7 @@ Partial Class Compras_Compras TmpDTOriginal.Columns.Add("NoDeducible", GetType(Boolean)) TmpDTOriginal.Columns.Add("Importe", GetType(Double)) + TmpDTOriginal.Columns.Add("CveContratoDetalle", GetType(Double)) End Sub @@ -15645,8 +15649,10 @@ Partial Class Compras_Compras Dim CveOrdenCompraDetalle As Integer = dr("CveOrdenCompraDetalle").ToString.ToEntero Dim EntregaDirecta As Integer = dr("EntregaDirecta").ToString.ToEntero Dim CveSATPS As Integer = gvr.FCDropDownLost("DdlSATPS").SelectedValue.ToEntero - Dim CveTipoGasto As Integer = -1 - Dim TipoGasto As String = "" + + Dim CveTipoGasto As Integer = dr("CveTipoGastoObra").ToString.ToEntero + Dim TipoGasto As String = dr("TipoGasto").ToString + Dim CveContratoDetalle As Integer = dr("CveContratoDetalle").ToString.ToEntero '[IPP] PROVISIONAL PARA TIPO GASTO If GlobalDTTiposGastos(UsuarioActual.CveEmpresa) IsNot Nothing AndAlso GlobalDTTiposGastos(UsuarioActual.CveEmpresa).Rows.Count = 1 Then @@ -15657,7 +15663,8 @@ Partial Class Compras_Compras End If End If - AddPS(Cantidad, CveUM, UM, CveClasificacion, Clasificacion, CvePS, PS, CveTipoPS, CveSubProyectoContrato, SubProyecto, Proyecto, CveProyecto, Obs, PU, Total, IVA, RetIVA, RetISR, IEPSPS, IEPSPSIVA, Descuento, CveOrdenCompraDetalle, False, CantidadF:=CantidadF, EntregaDirecta:=EntregaDirecta, CveSATPS:=CveSATPS, CveTipoGasto:=CveTipoGasto, TipoGasto:=TipoGasto) + AddPS(Cantidad, CveUM, UM, CveClasificacion, Clasificacion, CvePS, PS, CveTipoPS, CveSubProyectoContrato, SubProyecto, Proyecto, CveProyecto, Obs, PU, Total, IVA, RetIVA, RetISR, IEPSPS, IEPSPSIVA, Descuento, CveOrdenCompraDetalle, False, + CantidadF:=CantidadF, EntregaDirecta:=EntregaDirecta, CveSATPS:=CveSATPS, CveTipoGasto:=CveTipoGasto, TipoGasto:=TipoGasto, CveContratoDetalle:=CveContratoDetalle) 'CARGA PE Index = TmpDT.Rows.Count - 1 @@ -17896,7 +17903,7 @@ Partial Class Compras_Compras Obs As String, PU As Double, Total As Double, IVA As Double, RetIVA As Double, RetISR As Double, IEPSPS As Double, IEPSPSIVA As Double, Descuento As Double, Optional CveOrdenCompraDetalle As Integer = -1, Optional TCalculaTotales As Boolean = True, Optional PSCodigo As String = "-", Optional PSDescripcion As String = "-", Optional CantidadF As Double = -1, Optional EntregaDirecta As Integer = -1, Optional OtrosGastos As Double = 0, Optional CveSATPS As Integer = -1, Optional CargaXml As Boolean = False, Optional CveTipoGasto As Integer = -1, Optional TipoGasto As String = "", Optional PorcentajeIVA As Double = 0, - Optional PorcentajeIEPS As Double = 0, Optional PorcentajeRetIVA As Double = 0, Optional PorcentajeRetISR As Double = 0, Optional NoDeducible As Boolean = False) As Integer + Optional PorcentajeIEPS As Double = 0, Optional PorcentajeRetIVA As Double = 0, Optional PorcentajeRetISR As Double = 0, Optional NoDeducible As Boolean = False, Optional CveContratoDetalle As Integer = -1) As Integer Dim Row As DataRow = Nothing @@ -18017,6 +18024,8 @@ Partial Class Compras_Compras Row("CveTipoGasto") = CveTipoGasto Row("TipoGasto") = If(CveTipoGasto > 0, TipoGasto, "") + Row("CveContratoDetalle") = CveContratoDetalle + If UsuarioActual.Empresa.UsaAC Then Row("CveProgramaOperativo") = DdlACGeneral1.SelectedValue.ToEntero Row("CveUnidadAdministrativa") = DdlACGeneral2.SelectedValue.ToEntero diff --git a/Compras/eFacturas.aspx.vb b/Compras/eFacturas.aspx.vb index 6282a37cd..58e9dd59c 100644 --- a/Compras/eFacturas.aspx.vb +++ b/Compras/eFacturas.aspx.vb @@ -2639,6 +2639,7 @@ Partial Class Compras_eFacturas Protected Sub LnkAgregarPago_Click(sender As Object, e As EventArgs) Dim sbSinIE As New StringBuilder + Dim TieneCompras As Boolean = False HdnCveIE.Value = "" MSGComplemento = "" @@ -2841,6 +2842,15 @@ Partial Class Compras_eFacturas GVPDocumentosRelacionadosPagos.DataBind() + + If DTDocumentosRelacionados.MAX("CveCompra").ToString.ToEntero > 0 Then + TieneCompras = True + Else + TieneCompras = False + End If + + + For Each dRow2 As DataRow In DTDocumentosRelacionados.Rows If dRow2("CveMetodoPago").ToString.ToEntero > 0 Then If dRow2("CveMetodoPago").ToString.ToEntero = 1 Then @@ -2947,27 +2957,41 @@ Partial Class Compras_eFacturas ObjCompras.Dispose() - If Math.Abs(DiferenciaImportes) > 5 Then - TextoDiferenciaImporte = $"  -   IE ${ImporteIES.FormatoNumero}
Diferencia { DiferenciaImportes.FormatoNumero() }
" - BtnVincularPago.Visible = False - MSGComplemento = MSGComplemento & $" Existe una diferencia mayor a $5.00 ({Math.Abs(DiferenciaImportes)})" + If TieneCompras Then + If ImporteIES > 0 Then + If Math.Abs(DiferenciaImportes) > 5 Then + TextoDiferenciaImporte = $"  -   IE ${ImporteIES.FormatoNumero}
Diferencia { DiferenciaImportes.FormatoNumero() }
" + BtnVincularPago.Visible = False + MSGComplemento = MSGComplemento & $" Existe una diferencia mayor a $5.00 ({Math.Abs(DiferenciaImportes)})" - If TieneRegistros AndAlso UsuarioActual.TienePermisoProceso(286) Then - DivVincularPagoManualmente.Visible = True + If TieneRegistros AndAlso UsuarioActual.TienePermisoProceso(286) Then + DivVincularPagoManualmente.Visible = True + End If + End If + Else + TextoDiferenciaImporte = $"No se encontraron pagos " + BtnVincularPago.Visible = False + MSGComplemento = MSGComplemento & $" No se encontraron pagos " + If TieneRegistros AndAlso UsuarioActual.TienePermisoProceso(286) Then + DivVincularPagoManualmente.Visible = True + End If End If - Else - 'BtnVincularPago.Visible = True - 'TextoDiferenciaImporte = "" + BtnVincularPago.Visible = False + MSGComplemento = MSGComplemento & $"No se encontraron compras relacionadas" + DivVincularPagoManualmente.Visible = False End If + + + LblSerieFolioPago.Text = $"{SeriePago}-{FolioPago}" LblImportePago.Text = Monto.ToString("###,###,###.00") 'ImportePago.FormatoNumero LblPagosCantidad.Text = PagosCantidad.ToString LblImporteIE.Text = ImporteIES.FormatoNumero - LblDiferencia.Text = If(DiferenciaImportes <> 0, DiferenciaImportes.FormatoNumero, "") + LblDiferencia.Text = If(DiferenciaImportes <> 0 And ImporteIES > 0, DiferenciaImportes.FormatoNumero, "") If MSGComplemento.Trim.Length > 0 And CveComplementoPagoCompra <= 0 Then diff --git a/Contratos/ContratoAvance.aspx.vb b/Contratos/ContratoAvance.aspx.vb index 0eeb183f3..4ff8715fb 100644 --- a/Contratos/ContratoAvance.aspx.vb +++ b/Contratos/ContratoAvance.aspx.vb @@ -460,7 +460,6 @@ Partial Class Contratos_ContratoAvance Private Sub BtnDescargarGenerado_Click(sender As Object, e As EventArgs) Handles BtnDescargarGenerado.Click - GeneraAnexo(CveEstimacionNueva, NuemeroEstimacionNuevo, Now, DDlContratosEstimaciones.SelectedItem.Text) End Sub @@ -477,10 +476,16 @@ Partial Class Contratos_ContratoAvance Dim DtControl As New DataTable Dim ObjContratos As New ClsContratos + Dim Lugar As String = "" + Dim DescripcionContrato As String = "" If ObjContratos.GetContratosObraAvancesControlAcumulativo(CveContrato, CveEstimacion, UsuarioActual.CveEmpresa) Then DtControl = ObjContratos.DtResultados + If DtControl.Rows.Count > 0 Then + Lugar = DtControl(0)("Lugar").ToString + DescripcionContrato = DtControl(0)("DescripcionContrato").ToString + End If End If ObjContratos.Dispose() @@ -503,10 +508,16 @@ Partial Class Contratos_ContratoAvance WSControl.Cell(20, 6).Value = NumeroContrato - WSControl.Cell(18, 2).Value = "" 'Lugar + WSControl.Cell(18, 2).Value = Lugar + WSControl.Cell(18, 2).Style.Alignment.SetHorizontal(XLAlignmentHorizontalValues.Left) + WSControl.Cell(18, 2).Style.Alignment.SetVertical(XLAlignmentVerticalValues.Top) + WSControl.Cell(17, 6).Value = "" 'Periodo Fecha Inicial WSControl.Cell(17, 7).Value = "" 'Periuodo Fecha Final - WSControl.Cell(20, 2).Value = "" 'Obra + WSControl.Cell(20, 2).Value = DescripcionContrato + WSControl.Cell(20, 2).Style.Alignment.SetHorizontal(XLAlignmentHorizontalValues.Left) + WSControl.Cell(20, 2).Style.Alignment.SetVertical(XLAlignmentVerticalValues.Top) + WSControl.Cell(22, 7).Value = "" 'Presupuesto segun contrato WSControl.Cell(19, 5).Value = "" 'Contrtatista @@ -614,8 +625,6 @@ Partial Class Contratos_ContratoAvance range.Value = "C. SALVADOR SUAREZ" - - range = WSControl.Range($"A{CuerrentRow + 5}:D{CuerrentRow + 5}") range.Merge() range.Style.Border.BottomBorder = ClosedXML.Excel.XLBorderStyleValues.Thin @@ -633,12 +642,11 @@ Partial Class Contratos_ContratoAvance range.Style.Font.Bold = True - - End If CuerrentRow = CuerrentRow + 1 RowCountControl = RowCountControl + 1 + Next WBAnexo.Worksheet(1).CopyTo(WBAnexoSalvar, "CONTROL") @@ -655,9 +663,7 @@ Partial Class Contratos_ContratoAvance WSDetalle.Cell(4, 10).Value = "" 'Fecha a WSDetalle.Cell(4, 11).Value = NumeroEstimacion - 'WSDetalle.Picture("Logo").Name = $"Logo{Drow("CveContratoDetalle").ToString}" - 'WSDetalle.Picture("Firma").Name = $"Firma{Drow("CveContratoDetalle").ToString}" - + WSDetalle.Cell(6, 6).Value = DescripcionContrato WSDetalle.Cell(14, 2).Value = Drow("Codigo").ToString WSDetalle.Cell(14, 3).Value = Drow("PS").ToString @@ -716,12 +722,9 @@ Partial Class Contratos_ContratoAvance End If - Next - - Dim msB = New MemoryStream() WBAnexoSalvar.SaveAs(msB) diff --git a/Contratos/ContratoObra.aspx b/Contratos/ContratoObra.aspx index 4ee9ea4b0..040501b96 100644 --- a/Contratos/ContratoObra.aspx +++ b/Contratos/ContratoObra.aspx @@ -75,7 +75,7 @@ -
  • +<%--
  • Concluir Contrato
  • @@ -155,7 +155,7 @@ Habilitar Ajuste A.F.
  • -
    +
    --%> @@ -185,7 +185,7 @@ - + <%-- @@ -195,7 +195,7 @@ - + --%> @@ -209,6 +209,7 @@ <%-- +
    @@ -373,6 +374,13 @@
    +
    + +
    + +
    +
    + <%--
    @@ -950,7 +958,8 @@ DataKeyNames="CveContratoDetalle,CveUM, CvePS, Cantidad, PU,CveTipoPresupuesto,CveClasificacion,CodigoPS,LimitarCantidad,PS,OCInterna,NoIdentificacion,PermitirAvance" ShowHeader="true" SelectedRowStyle-BackColor="#66CCFF" CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None"> - + + <%-- @@ -958,7 +967,9 @@ - + --%> + + @@ -978,7 +989,7 @@ - + <%-- @@ -986,7 +997,7 @@ - + --%> @@ -1216,7 +1227,7 @@ - + <%-- @@ -1224,7 +1235,7 @@ - + --%> @@ -1517,66 +1528,158 @@ -
    -
    - " style="display: inline-block; margin-right: -20px; width: 150px;" /> - " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> -
    -
    - - -
    - - - - - - - - - -
    Clasificación Contratado Avance Faltante Avance Por Facturar Anticipo
    -
    - - - + + + + + +
    +
    + " style="display: inline-block; margin-right: -20px; width: 150px;" /> + " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> +
    +
    + + + + +
    + + + + + + + + + +
    Clasificación Contratado Avance Faltante Avance Por Facturar Anticipo
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + + + +
    +
    + " style="display: inline-block; margin-right: -20px; width: 150px;" /> + " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> +
    +
    + + + + +
    + + + + + + + <%-- + --%> + +
    Clasificación Contratado Avance Faltante Avance Por Facturar Anticipo
    +
    + + + + + + + + + + + + + + + + + + + + + + +<%-- + + + + + + + + + + --%> + + + + +
    +
    + + +
    +
    + + +
    + + - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    -
    -
    diff --git a/Contratos/ContratoObra.aspx.vb b/Contratos/ContratoObra.aspx.vb index fe738afd7..da9636f7a 100644 --- a/Contratos/ContratoObra.aspx.vb +++ b/Contratos/ContratoObra.aspx.vb @@ -454,12 +454,12 @@ Partial Class Contratos_ContratoObra If CveContrato > 0 Then If UsuarioActual.TienePermisoProceso(164) Then BtnEliminar.Visible = True - Gv.Columns(11).Visible = True - GvInsumos.Columns(9).Visible = True + Gv.Columns(9).Visible = True + GvInsumos.Columns(8).Visible = True Else BtnEliminar.Visible = False - Gv.Columns(11).Visible = False - GvInsumos.Columns(9).Visible = False + Gv.Columns(9).Visible = False + GvInsumos.Columns(8).Visible = False End If 'If CveTipoContrato.Contiene(11, 25) Then 'ciclo comercial @@ -469,8 +469,8 @@ Partial Class Contratos_ContratoObra Else TabPres.Visible = False - Gv.Columns(11).Visible = True - GvInsumos.Columns(9).Visible = True + Gv.Columns(9).Visible = True + GvInsumos.Columns(8).Visible = True End If @@ -993,7 +993,7 @@ Partial Class Contratos_ContratoObra 'RowPorcentajeComision.Visible = False RowEstatus.Visible = False 'dvAddendum.Visible = False - liImprimir.Visible = True + 'liImprimir.Visible = True CargaPlantillas() 'TrContratoPlantilla.Visible = True 'DdlPeriodo.SelectedValueExist(ObjContratos.DtResultados.Rows(0)("CvePeriodo")) @@ -1042,7 +1042,7 @@ Partial Class Contratos_ContratoObra 'TDObservacion.Visible = True 'tdObservaciones.Visible = True TxtObservaciones.Text = ObjContratos.DtResultados.Rows(0)("Observaciones").ToString - Gv.Columns(6).Visible = True + Gv.Columns(4).Visible = True 'DdlPeriodo.SelectedValueExist(ObjContratos.DtResultados.Rows(0)("CvePeriodo").ToString) End If @@ -1073,6 +1073,7 @@ Partial Class Contratos_ContratoObra TxtFechaInicial.Text = ObjContratos.FechaInicial.ToShortDateString TxtUbicacion.Text = ObjContratos.Ubicacion TxtResponsable.Text = ObjContratos.Responsable + TxtLugar.Text = ObjContratos.Lugar TxtPorAnticipo.Text = ObjContratos.PorAmortizacionAnticipo.FormatoNumero TxtPorAmortizacionAnticipo.Text = ObjContratos.PorAmortizacionAnticipo.FormatoNumero TxtPorGarantia.Text = ObjContratos.PorGarantia.FormatoNumero @@ -1100,8 +1101,8 @@ Partial Class Contratos_ContratoObra If ObjContratos.TipoEstatus = 2 Then DdlEstatus.Enabled = False If UsuarioActual.TienePermisoProceso(173) Then - liVigenteContrato.Visible = True - LBVigenteContrato.Visible = True + 'liVigenteContrato.Visible = True + 'LBVigenteContrato.Visible = True End If Else DdlEstatus.Items.Clear() @@ -1110,17 +1111,17 @@ Partial Class Contratos_ContratoObra DdlEstatus.DataBind() Select Case ObjContratos.TipoEstatus Case 1 - If UsuarioActual.TienePermisoProceso(173) Then - liTerminarContrato.Visible = True - LBTerminarContrato.Visible = True - - liCancelarContrato.Visible = True - LBCancelarContrato.Visible = True + If UsuarioActual.TienePermisoProceso(173) Then + ' liTerminarContrato.Visible = True + 'LBTerminarContrato.Visible = True + + ' liCancelarContrato.Visible = True + 'LBCancelarContrato.Visible = True End If Case 2, 3 ' reactivar el contrato - If UsuarioActual.TienePermisoProceso(173) Then - liVigenteContrato.Visible = True - LBVigenteContrato.Visible = True + If UsuarioActual.TienePermisoProceso(173) Then + ' liVigenteContrato.Visible = True + ' LBVigenteContrato.Visible = True End If End Select @@ -1315,7 +1316,7 @@ Partial Class Contratos_ContratoObra TxtTipoCambio.Text.ToDouble, CveSucursalCliente:=DdlSucursalCliente.SelectedValue.ToEntero, CveAlmacenOrigen:=-1, CveAlmacenDestino:=-1, PorcentajeComision:=0, TipoGarantia:=-1, Folio:=0, FechaVenc:=Nothing, EstatusFianza:=1, CvePeriodo:=-1, CveCuentaEquipo:=-1, CveContratoPlantilla:=-1, CveVendedor:=-1, - Observaciones:=TxtObservaciones.Text, CveDireccionEnvio:=-1, AplicaImpuestosLocales:=False, CorreoNotificacionPedDev:=TxtCorreoNotificacion.Text.Trim()) + Observaciones:=TxtObservaciones.Text, CveDireccionEnvio:=-1, AplicaImpuestosLocales:=False, CorreoNotificacionPedDev:=TxtCorreoNotificacion.Text.Trim(), Lugar:=TxtLugar.Text.Trim) TieneError = Not GuardaFianzas(ObjContratos) @@ -1414,7 +1415,7 @@ Partial Class Contratos_ContratoObra CveAlmacenOrigen:=-1, CveAlmacenDestino:=-1, PorcentajeComision:=0, TipoGarantia:=-1, Folio:=-1, FechaVenc:=Nothing, EstatusFianza:=-1, CveContratoPlantilla:=-1, CveCuentaEquipo:=-1, CveVendedor:=-1, Observaciones:=TxtObservaciones.Text, CveDireccionEnvio:=-1, AplicaImpuestosLocales:=False, - CorreoNotificacionPedDev:=TxtCorreoNotificacion.Text.Trim()) Then + CorreoNotificacionPedDev:=TxtCorreoNotificacion.Text.Trim(), Lugar:=TxtLugar.Text.Trim) Then TieneError = Not GuardaFianzas(ObjContratos) @@ -1840,11 +1841,11 @@ Partial Class Contratos_ContratoObra Gv.DataSource = DtTemp DtPresupuestos = DtTemp Gv.DataBind() - If CveTipoContrato = 25 Then - Gv.Columns(0).Visible = False - Gv.Columns(2).Visible = False - Gv.Columns(3).Visible = False - Gv.Columns(9).Visible = False + If CveTipoContrato = 25 Then + ' Gv.Columns(0).Visible = False + Gv.Columns(2).Visible = False + ' Gv.Columns(3).Visible = False + Gv.Columns(7).Visible = False End If 'If (Gv.Rows.Count > 0) Then ' Gv.UseAccessibleHeader = True @@ -2581,7 +2582,7 @@ Partial Class Contratos_ContratoObra End If TabReporteAvance.Visible = True - lbImprimirAvance.Visible = True + 'lbImprimirAvance.Visible = True Dim Modalidad = IfNull(Request("Tipo"), 1, 2) @@ -2600,16 +2601,32 @@ Partial Class Contratos_ContratoObra Alert("Ocurrió un Error al obtener el Reporte de Avances. Por favor vuelva a intentar", TipoMensaje.MsgError) End If - ObjContratos.Dispose() + 'ObjContratos.Dispose() GvDatosAvance.DataBind() If (GvDatosAvance.Rows.Count > 0) Then GvDatosAvance.UseAccessibleHeader = True GvDatosAvance.HeaderRow.TableSection = TableRowSection.TableHeader RegistraScript("OrdenarGV();") - End If - - UpGral.Update() + End If + + + + + + If ObjContratos.GetReporteContratosAvancesDetalleControl(CveContrato, UsuarioActual.CveEmpresa) Then + + GvDatosAvanceControl.DataSource = ObjContratos.DtResultados + Else + Alert("Ocurrió un Error al obtener el Reporte de Avances de control. Por favor vuelva a intentar", TipoMensaje.MsgError) + End If + + + GvDatosAvanceControl.DataBind() + + ObjContratos.Dispose() + UpGral.Update() + End Sub Protected Sub GvDatosAvance_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatosAvance.RowDataBound @@ -2629,6 +2646,27 @@ Partial Class Contratos_ContratoObra e.Row.FCLinkButton("LBAvanceXFacturarCantidad").CommandArgument = Liga2 e.Row.FCLinkButton("LBAvanceXFacturarImporte").CommandArgument = Liga2 + End If + End Sub + + + Protected Sub GvDatosAvanceControl_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatosAvanceControl.RowDataBound + If e.Row.RowType = DataControlRowType.DataRow Then + + If e.Row.DBCampo("CveClasificacion").ToString.ToEntero = 0 Then + e.Row.CssClass = "Totales white" + ElseIf e.Row.DBCampo("CvePS").ToString.ToEntero = 0 Then + e.Row.CssClass = "SubTotales" + End If + + 'Dim Liga1 = $"{e.Row.DBCampo("CveClasificacion").ToEntero}|{e.Row.DBCampo("Clasificacion")}|{e.Row.DBCampo("CvePS").ToEntero}|{e.Row.DBCampo("CodigoPS")}|1" + 'e.Row.FCLinkButton("LBAvanceCantidad").CommandArgument = Liga1 + 'e.Row.FCLinkButton("LBAvanceImporte").CommandArgument = Liga1 + + 'Dim Liga2 = $"{e.Row.DBCampo("CveClasificacion").ToEntero}|{e.Row.DBCampo("Clasificacion")}|{e.Row.DBCampo("CvePS").ToEntero}|{e.Row.DBCampo("CodigoPS")}|2" + 'e.Row.FCLinkButton("LBAvanceXFacturarCantidad").CommandArgument = Liga2 + 'e.Row.FCLinkButton("LBAvanceXFacturarImporte").CommandArgument = Liga2 + End If End Sub Protected Sub MuestaModalVentasAvance(sender As Object, e As EventArgs) @@ -2672,9 +2710,9 @@ Partial Class Contratos_ContratoObra GVAvanceXDocumento.DataSource = ObjContratos.DtResultados DtAvanceDocumento = ObjContratos.DtResultados If DtAvanceDocumento.Rows.Count > 0 Then - LBImprimir.Visible = True - End If - LBImprimirInformacionG.Visible = True + 'LBImprimir.Visible = True + End If + ' LBImprimirInformacionG.Visible = True Else Alert("Ocurrió un error al obtener el Reporte de Avances por Documento. Por favor vuelva a intentar", TipoMensaje.MsgError) End If @@ -2871,7 +2909,7 @@ Partial Class Contratos_ContratoObra If GvContratosGastos.Rows.Count > 0 Then GvContratosGastos.HeaderRow.CssClass = "SinColor" - LBImprimirGastos.Visible = True + 'LBImprimirGastos.Visible = True End If UpContratoGasto.Update() @@ -2948,12 +2986,12 @@ Partial Class Contratos_ContratoObra UpPedidosDevoluciones.Update() End Sub - Protected Sub ImgExcelPedDev_Click(sender As Object, e As EventArgs) Handles LbImprimirPedDevExcel.Click - GenerarPDFPedDev("Excel") - End Sub - Protected Sub ImgImprimirPedDev_Click(sender As Object, e As EventArgs) Handles LbImprimirPedDev.Click - GenerarPDFPedDev() - End Sub + 'Protected Sub ImgExcelPedDev_Click(sender As Object, e As EventArgs) Handles LbImprimirPedDevExcel.Click + ' GenerarPDFPedDev("Excel") + 'End Sub + 'Protected Sub ImgImprimirPedDev_Click(sender As Object, e As EventArgs) Handles LbImprimirPedDev.Click + ' GenerarPDFPedDev() + 'End Sub Private Sub GenerarPDFPedDev(Optional Formato As String = "PDF") If DsDatosPedDev Is Nothing Then Alert("No se pudieron consultar los pedidos y devoluciones", TipoMensaje.MsgAdvertencia) @@ -3202,27 +3240,27 @@ Partial Class Contratos_ContratoObra ObjInv.Dispose() - LnkAjusteAF.Visible = True + 'LnkAjusteAF.Visible = True DivHajusteAF.Visible = False GvDatosAlmacen.Columns(6).Visible = False CargaInventarios() - UPHajusteAF.Update() - UpHajusteAcciones.Update() - + UPHajusteAF.Update() + ' UpHajusteAcciones.Update() + End Sub - Protected Sub LnkAjusteAF_Click(sender As Object, e As EventArgs) - - LnkAjusteAF.Visible = False + Protected Sub LnkAjusteAF_Click(sender As Object, e As EventArgs) + + ' LnkAjusteAF.Visible = False DivHajusteAF.Visible = True GvDatosAlmacen.Columns(6).Visible = True CargaInventarios() - UPHajusteAF.Update() - UpHajusteAcciones.Update() + UPHajusteAF.Update() + ' UpHajusteAcciones.Update() UpAlmacen.Update() End Sub @@ -3425,9 +3463,9 @@ Partial Class Contratos_ContratoObra Response.End() End If End Sub - Public Sub LbDescargarExcel_Click(sender As Object, e As EventArgs) Handles LbDescargarExcel.Click - DescargarFormato() - End Sub + 'Public Sub LbDescargarExcel_Click(sender As Object, e As EventArgs) Handles LbDescargarExcel.Click + ' DescargarFormato() + 'End Sub Private Function ReadExcelFile(ByVal flatFilePath As String, ByVal firstRowHasHeaders As Boolean) As DataTable SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet) Dim excelFile As ExcelFile = ExcelFile.Load(flatFilePath) @@ -3702,9 +3740,9 @@ Partial Class Contratos_ContratoObra #Region " IMPRESION " #Region " IMPRIMIR AVANCE POR DOCUMENTO " - Protected Sub ImgImprimir_Click(sender As Object, e As EventArgs) Handles LBImprimir.Click - GenerarPDF() - End Sub + 'Protected Sub ImgImprimir_Click(sender As Object, e As EventArgs) Handles LBImprimir.Click + ' GenerarPDF() + 'End Sub Private Sub GenerarPDF(Optional Formato As String = "PDF") Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) @@ -3730,66 +3768,67 @@ Partial Class Contratos_ContratoObra End If Dim Nombre As String = If(LtlTitulo.Text.Length > 20, LtlTitulo.Text.Substring(0, 20), LtlTitulo.Text) ImprimirPDF("Empresas/Grales/Formatos/RepContratoAvanceDocumento.rdlc", dt, params, $"{Nombre}-AvanceDocumento", Formato:=Formato) - End Sub - Private Sub LBImprimirInformacionG_Click(sender As Object, e As EventArgs) Handles LBImprimirInformacionG.Click - Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) - Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) - - Dim dt As DataTable = DtAvanceDocumento - Dim params As New List(Of ReportParameter) - params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) - params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) - params.Add(New ReportParameter("Contrato", Titulo)) - 'DATOS DEL CONTRATO - params.Add(New ReportParameter("NoContrato", TxtNumeroContrato.Text.Trim)) - params.Add(New ReportParameter("Descripcion", TxtDescripcionContrato.Text.Trim)) - params.Add(New ReportParameter("Proveedor", If(TrProveedor.Visible = True, DdlContratista.SelectedItem.Text.Trim, "-"))) - params.Add(New ReportParameter("Ubicacion", TxtUbicacion.Text.Trim)) - params.Add(New ReportParameter("Responsable", TxtResponsable.Text.Trim)) - params.Add(New ReportParameter("Almacen", "-")) - params.Add(New ReportParameter("Porcentaje", "-")) - 'CENTRO DE COSTOS - params.Add(New ReportParameter("Proyecto", If(DVddlproyecto.Visible = True, DdlProyecto.SelectedItem.Text.Trim, "-"))) - params.Add(New ReportParameter("SubProyecto", CveSubProyecto.ToString)) - params.Add(New ReportParameter("Addendum", "")) - 'INFORMACION - params.Add(New ReportParameter("Cliente", If(TrCliente.Visible = True, DdlCliente.SelectedItem.Text.Trim, "-"))) - params.Add(New ReportParameter("Sucursal", If(TrClienteSucursal.Visible = True, DdlSucursalCliente.SelectedItem.Text.Trim, "-"))) - params.Add(New ReportParameter("FechaInicial", TxtFechaInicial.Text.Trim)) - params.Add(New ReportParameter("FechaFinal", TxtFechaFinal.Text.Trim)) - params.Add(New ReportParameter("Moneda", DdlMoneda.SelectedItem.Text.Trim)) - params.Add(New ReportParameter("TipoCambio", If(tipoCambio.Visible = True, TxtTipoCambio.Text.Trim, "-"))) - params.Add(New ReportParameter("IVA", TxtPorIVA.Text.Trim)) - params.Add(New ReportParameter("Anticipo", TxtPorAnticipo.Text.Trim)) - params.Add(New ReportParameter("Amortizacion", TxtPorAmortizacionAnticipo.Text.Trim)) - params.Add(New ReportParameter("Garantia", TxtPorGarantia.Text.Trim)) - params.Add(New ReportParameter("Minimo", "-")) - params.Add(New ReportParameter("Maximo", "-")) - params.Add(New ReportParameter("Total", If(DvTotal.Visible = True, TxtTotal.Text.Trim, "-"))) - 'Estatus - params.Add(New ReportParameter("Estatus", DdlEstatus.SelectedItem.Text.Trim)) - params.Add(New ReportParameter("TipoGarantia", "")) - params.Add(New ReportParameter("EstatusFianza", "")) - params.Add(New ReportParameter("Folio", "0")) - params.Add(New ReportParameter("FechaVencimiento", "")) - - If Imagen.Exists Then - params.Add(New ReportParameter("LogoPath", logouri)) - Else - params.Add(New ReportParameter("LogoPath", "")) - End If - ImprimirPDF("Empresas/Grales/Formatos/Contrato.rdlc", dt, params, $"Contrato-{Titulo}", Formato:="PDF") - End Sub + 'Private Sub LBImprimirInformacionG_Click(sender As Object, e As EventArgs) Handles LBImprimirInformacionG.Click + ' Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) + ' Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + + ' Dim dt As DataTable = DtAvanceDocumento + ' Dim params As New List(Of ReportParameter) + ' params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) + ' params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) + ' params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + ' params.Add(New ReportParameter("Contrato", Titulo)) + ' 'DATOS DEL CONTRATO + ' params.Add(New ReportParameter("NoContrato", TxtNumeroContrato.Text.Trim)) + ' params.Add(New ReportParameter("Descripcion", TxtDescripcionContrato.Text.Trim)) + ' params.Add(New ReportParameter("Proveedor", If(TrProveedor.Visible = True, DdlContratista.SelectedItem.Text.Trim, "-"))) + ' params.Add(New ReportParameter("Ubicacion", TxtUbicacion.Text.Trim)) + ' params.Add(New ReportParameter("Responsable", TxtResponsable.Text.Trim)) + ' params.Add(New ReportParameter("Almacen", "-")) + ' params.Add(New ReportParameter("Porcentaje", "-")) + ' 'CENTRO DE COSTOS + ' params.Add(New ReportParameter("Proyecto", If(DVddlproyecto.Visible = True, DdlProyecto.SelectedItem.Text.Trim, "-"))) + ' params.Add(New ReportParameter("SubProyecto", CveSubProyecto.ToString)) + ' params.Add(New ReportParameter("Addendum", "")) + ' 'INFORMACION + ' params.Add(New ReportParameter("Cliente", If(TrCliente.Visible = True, DdlCliente.SelectedItem.Text.Trim, "-"))) + ' params.Add(New ReportParameter("Sucursal", If(TrClienteSucursal.Visible = True, DdlSucursalCliente.SelectedItem.Text.Trim, "-"))) + ' params.Add(New ReportParameter("FechaInicial", TxtFechaInicial.Text.Trim)) + ' params.Add(New ReportParameter("FechaFinal", TxtFechaFinal.Text.Trim)) + ' params.Add(New ReportParameter("Moneda", DdlMoneda.SelectedItem.Text.Trim)) + ' params.Add(New ReportParameter("TipoCambio", If(tipoCambio.Visible = True, TxtTipoCambio.Text.Trim, "-"))) + ' params.Add(New ReportParameter("IVA", TxtPorIVA.Text.Trim)) + ' params.Add(New ReportParameter("Anticipo", TxtPorAnticipo.Text.Trim)) + ' params.Add(New ReportParameter("Amortizacion", TxtPorAmortizacionAnticipo.Text.Trim)) + ' params.Add(New ReportParameter("Garantia", TxtPorGarantia.Text.Trim)) + ' params.Add(New ReportParameter("Minimo", "-")) + ' params.Add(New ReportParameter("Maximo", "-")) + ' params.Add(New ReportParameter("Total", If(DvTotal.Visible = True, TxtTotal.Text.Trim, "-"))) + ' 'Estatus + ' params.Add(New ReportParameter("Estatus", DdlEstatus.SelectedItem.Text.Trim)) + ' params.Add(New ReportParameter("TipoGarantia", "")) + ' params.Add(New ReportParameter("EstatusFianza", "")) + ' params.Add(New ReportParameter("Folio", "0")) + ' params.Add(New ReportParameter("FechaVencimiento", "")) + + ' If Imagen.Exists Then + ' params.Add(New ReportParameter("LogoPath", logouri)) + ' Else + ' params.Add(New ReportParameter("LogoPath", "")) + ' End If + ' ImprimirPDF("Empresas/Grales/Formatos/Contrato.rdlc", dt, params, $"Contrato-{Titulo}", Formato:="PDF") + + 'End Sub + #End Region #Region "I M P R E S I O N D E G A S T O S" - Protected Sub ImgImprimirGastos_Click(sender As Object, e As EventArgs) Handles LBImprimirGastos.Click - GenerarPDFGastos() - End Sub + 'Protected Sub ImgImprimirGastos_Click(sender As Object, e As EventArgs) Handles LBImprimirGastos.Click + ' GenerarPDFGastos() + 'End Sub Private Sub GenerarPDFGastos(Optional Formato As String = "PDF") Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) @@ -3819,22 +3858,22 @@ Partial Class Contratos_ContratoObra End If Dim Nombre As String = If(LtlTitulo.Text.Length > 20, LtlTitulo.Text.Substring(0, 20), LtlTitulo.Text) ImprimirPDF("Empresas/Grales/Formatos/RepContratoGastos.rdlc", dt, params, $"{Nombre}-Gastos", Formato:=Formato) - End Sub - - Private Sub LBAgregarGasto_Click(sender As Object, e As EventArgs) Handles LBAgregarGasto.Click - TxtDescripcion.Text = "" - TxtImporteC.Text = "" - TxtFecha.Text = "" - UpAgregarGastos.Update() - RegistraScript("$('#ModalAgregarGastos').modal();") End Sub + 'Private Sub LBAgregarGasto_Click(sender As Object, e As EventArgs) Handles LBAgregarGasto.Click + ' TxtDescripcion.Text = "" + ' TxtImporteC.Text = "" + ' TxtFecha.Text = "" + ' UpAgregarGastos.Update() + ' RegistraScript("$('#ModalAgregarGastos').modal();") + 'End Sub + #End Region #Region "I M P R E S I O N D E S U M I N I S T R O S" - Protected Sub ImgImprimirSuministros_Click(sender As Object, e As EventArgs) Handles LbImprimirSuministros.Click - GenerarPDFSuministros() - End Sub + 'Protected Sub ImgImprimirSuministros_Click(sender As Object, e As EventArgs) Handles LbImprimirSuministros.Click + ' GenerarPDFSuministros() + 'End Sub Private Sub GenerarPDFSuministros(Optional Formato As String = "PDF") Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) @@ -3863,9 +3902,9 @@ Partial Class Contratos_ContratoObra #End Region #Region "I M P R E S I O N D E A V A N C E " - Private Sub lbImprimirAvance_Click(sender As Object, e As EventArgs) Handles lbImprimirAvance.Click - GenerarPDFAvance() - End Sub + 'Private Sub lbImprimirAvance_Click(sender As Object, e As EventArgs) Handles lbImprimirAvance.Click + ' GenerarPDFAvance() + 'End Sub Private Sub GenerarPDFAvance(Optional Formato As String = "PDF") Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) @@ -3895,9 +3934,9 @@ Partial Class Contratos_ContratoObra #End Region #Region "I M P R E S I O N D E P R E S U P U E S T O " - Private Sub lLbImprimirPresupuesto_Click(sender As Object, e As EventArgs) Handles LbImprimirPresupuesto.Click - GenerarPDFPPresupuesto() - End Sub + 'Private Sub lLbImprimirPresupuesto_Click(sender As Object, e As EventArgs) Handles LbImprimirPresupuesto.Click + ' GenerarPDFPPresupuesto() + 'End Sub Private Sub GenerarPDFPPresupuesto(Optional Formato As String = "PDF") Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) @@ -3927,12 +3966,12 @@ Partial Class Contratos_ContratoObra #End Region #Region "I M P R E S I O N D E A C T I V O S F I J O S " - Private Sub LbImprmirAF_Click(sender As Object, e As EventArgs) Handles LbImprmirAF.Click - GenerarPDFActivosFijos() - End Sub - Private Sub LbImprmirAFExcel_Click(sender As Object, e As EventArgs) Handles LbImprmirAFExcel.Click - GenerarPDFActivosFijos("Excel") - End Sub + 'Private Sub LbImprmirAF_Click(sender As Object, e As EventArgs) Handles LbImprmirAF.Click + ' GenerarPDFActivosFijos() + 'End Sub + 'Private Sub LbImprmirAFExcel_Click(sender As Object, e As EventArgs) Handles LbImprmirAFExcel.Click + ' GenerarPDFActivosFijos("Excel") + 'End Sub Private Sub GenerarPDFActivosFijos(Optional Formato As String = "PDF") Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) @@ -4053,13 +4092,13 @@ Partial Class Contratos_ContratoObra ObjGral.Dispose() 'DdlPlantillaContrato.DataSource = DtPlantillasContratos 'DdlPlantillaContrato.DataBind() - End Sub - - Protected Sub BtnImprimirC_Click(sender As Object, e As EventArgs) Handles liImprimir.Click - ' Dim docx As String = DtPlantillasContratos.FiltroPrimeroValor("URL", $"CveContratoPlantilla = {DdlPlantillaContrato.SelectedValue}") - ' DescarFormato(docx) End Sub + 'Protected Sub BtnImprimirC_Click(sender As Object, e As EventArgs) Handles liImprimir.Click + ' ' Dim docx As String = DtPlantillasContratos.FiltroPrimeroValor("URL", $"CveContratoPlantilla = {DdlPlantillaContrato.SelectedValue}") + ' ' DescarFormato(docx) + 'End Sub + #End Region diff --git a/Contratos/RepContratosObraAvances.aspx b/Contratos/RepContratosObraAvances.aspx index 5587ae0af..7f31c16ea 100644 --- a/Contratos/RepContratosObraAvances.aspx +++ b/Contratos/RepContratosObraAvances.aspx @@ -28,7 +28,7 @@
    -
    + <%--
    Fecha Inicio:
    @@ -46,9 +46,9 @@ -
    - +
    --%> +<%--
    Fecha Fin:
    @@ -65,7 +65,7 @@ -
    +
    --%>
    Cliente: @@ -92,6 +92,151 @@ + + + + +
    + +
    +
    + +
    + +
    + Contratos +

    + + +

    + +
    + +
    + Total +

    + $ +

    +
    + +
    + +
    + +
    + +
    + +
    + + +
    +
    +
    + +
    + + + + +
    + Avance +

    + + + + +

    + +
    + Porcentaje +

    + + + + +

    + +
    + +
    + +
    + +
    +
    +
    + +
    + + <%--76% Avance--%> + +
    + +
    +
    Avance
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    + + + + +
    + Faltante +

    + + + + +

    + +
    + Porcentaje +

    + + + + +

    + +
    + + +
    + +
    + +
    +
    +
    +
    + + <%--76% Avance--%> + +
    +
    +
    Faltante
    +
    +
    +
    +
    +
    + +
    + +
    +
    + @@ -116,45 +261,91 @@ DataKeyNames="CveContrato,NumeroContrato" ShowHeader="True" CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None"> - - - - - - - - - - - - + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + - + + + +
    diff --git a/Contratos/RepContratosObraAvances.aspx.vb b/Contratos/RepContratosObraAvances.aspx.vb index 6215f5a5a..066bab9dc 100644 --- a/Contratos/RepContratosObraAvances.aspx.vb +++ b/Contratos/RepContratosObraAvances.aspx.vb @@ -11,7 +11,7 @@ Partial Class RepContratosObraAvances CargaClientes() CargaContratos() - 'CargaDatos() + CargaDatos() End If End Sub @@ -20,9 +20,11 @@ Partial Class RepContratosObraAvances Private Sub CargaDatos() Dim Con As New ClsContratos + Dim DTDatos As New DataTable - If Con.GetContratosObraRepAvances(txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, DdlCliente.SelectedValue.ToEntero, DdlContrato.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then + If Con.GetContratosObraRepAvances(MinFecha, MaxFecha, DdlCliente.SelectedValue.ToEntero, DdlContrato.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then GVDatos.DataSource = Con.DtResultados + DTDatos = Con.DtResultados Else GVDatos.DataSource = Nothing End If @@ -30,8 +32,47 @@ Partial Class RepContratosObraAvances Con.Dispose() GVDatos.DataBind() - UpDatos.Update() - + UpDatos.Update() + + + If DTDatos.Rows.Count > 0 Then + Indicadores(DTDatos) + End If + + End Sub + + + + Private Sub Indicadores(DTDatos As DataTable) + + Dim NumeroContratos As Integer = DTDatos.Rows.Count + + Dim TotalContratos As Decimal = DTDatos.SUM("Importe") + Dim TotalAvance As Decimal = DTDatos.SUM("AvanceImporte") + Dim TotalFaltante As Decimal = TotalContratos - TotalAvance + + + Dim TotalAvancePorcentaje As Decimal = (TotalAvance * 100) / TotalContratos + Dim TotalFaltantePorcentaje As Decimal = 100 - TotalAvancePorcentaje + + + LtlGrafNumeroContratos.Text = NumeroContratos.ToString + LtlGrafTotal.Text = TotalContratos.ToString("###,###,###.00") + + + LtlAvanceImporte.Text = $"$ {TotalAvance.ToString("###,###,###.00")}" + LtlAvanceImporteProcentaje1.Text = $"{TotalAvancePorcentaje.ToString("###.00")} %" + LtlAvanceImporteProcentaje2.Text = $"{TotalAvancePorcentaje.ToString("###.00")}%" + SPAvance1.Attributes.Add("style", $"width:{TotalAvancePorcentaje.ToString.ToEntero}%") + + + LtlFaltanteImporte.Text = $"$ {TotalFaltante.ToString("###,###,###.00")}" + LtlFaltanteImportePorcentaje1.Text = $"{TotalFaltantePorcentaje.ToString("###.00")} %" + LtlFaltanteImportePorcentaje2.Text = $"{TotalFaltantePorcentaje.ToString("###.00")}%" + SPFaltante.Attributes.Add("style", $"width:{TotalFaltantePorcentaje.ToString.ToEntero}%") + + UpGrafica.Update() + End Sub #Region "C O M B O S" diff --git a/Contratos/RepContratosObraAvancesDetalle.aspx b/Contratos/RepContratosObraAvancesDetalle.aspx index 1a1269883..1cee61c45 100644 --- a/Contratos/RepContratosObraAvancesDetalle.aspx +++ b/Contratos/RepContratosObraAvancesDetalle.aspx @@ -8,89 +8,159 @@ - Reporte Contratos Avance Detalle + -<%-- + + + - -
    -
    +
    -
    - -
    - -
    -
    - -
    - Fecha Inicio: -
    -
    -
    - - - - -
    - - - - - - +
    +
    +
    -
    +
    + Numero Estimaciones +

    + + +

    + +
    + +
    + Numero Estimaciones +

    + +

    +
    + +
    + +
    + +
    + +
    + +
    -
    - Fecha Fin: -
    -
    -
    - - - +
    +
    +
    + +
    + + + + +
    + Avance +

    + + - - - - - - - - + +

    + +
    + Porcentaje +

    + + + + +

    + +
    -
    - Cliente: -
    -
    - -
    +
    + +
    + +
    +
    +
    + +
    + + <%--76% Avance--%> + +
    + +
    +
    Avance
    +
    +
    -
    - Contrato: -
    -
    - -
    - - -
    -
    -
    - + +
    +
    +
    + +
    + + + + +
    + Fecha Fin +

    + + + + +

    + +
    + Dias Restantes +

    + + + + +

    + +
    + + +
    + +
    + +
    +
    + + <%--
    +
    + + 76% Avance + +
    +
    +
    Días
    +
    +
    +
    --%> + +
    +
    + +
    + - --%> + @@ -99,11 +169,11 @@
    -
    - +
    +
    -
    +
    " style="display: inline-block; margin-right: -20px; width: 150px; height: 25px; border-color: #89C4F4;" /> " class="btn btn-circle btn-sm label-info"> @@ -115,7 +185,7 @@
    -
    +
    0, Request("CveContrato").ToString.ToEntero, -1) - LblNumeroContrato.Text = If(Request("NumeroContrato") IsNot Nothing AndAlso Request("NumeroContrato").ToString.Length > 0, $"Numero Contrato: {Request("NumeroContrato").ToString}", "") + NumeroContrato = If(Request("NumeroContrato") IsNot Nothing AndAlso Request("NumeroContrato").ToString.Length > 0, $"{Request("NumeroContrato").ToString}", "") + LblNumeroContrato.Text = If(Request("NumeroContrato") IsNot Nothing AndAlso Request("NumeroContrato").ToString.Length > 0, $"Estimaciones del Contrato: {Request("NumeroContrato").ToString}", "") If CveContrato > 0 Then CargaDatos() @@ -40,54 +52,72 @@ Partial Class RepContratosObraAvancesDetalle Private Sub CargaDatos() Dim Con As New ClsContratos - + Dim DTDatos As DataTable = New DataTable + Dim DTContrato As DataTable = New DataTable + If Con.GetContratosObraRepAvancesDetalle(CveContrato, UsuarioActual.CveEmpresa) Then GVDatos.DataSource = Con.DtResultados - + DTDatos = Con.DtResultados If Con.DtResultados.Rows.Count = 0 Then Alert("No se encontraron estimaciones.", TipoMensaje.MsgAdvertencia) End If Else GVDatos.DataSource = Nothing + End If + If Con.GetContratosObraRepAvances(MinFecha, MaxFecha, -1, CveContrato, UsuarioActual.CveEmpresa) Then + DTContrato = Con.DtResultados + If DTContrato.Rows.Count > 0 Then + Indicadores(DTContrato, DTDatos.Rows.Count) + End If End If + + Con.Dispose() GVDatos.DataBind() - UpDatos.Update() - + UpDatos.Update() + End Sub - '#Region "C O M B O S" + Private Sub Indicadores(DTDatos As DataTable, NumeroEstimaciones As Integer) + + LtlGrafNumeroEstimaciones.Text = NumeroEstimaciones - ' Private Sub CargaContratos() - ' DdlContrato.DataSource = GlobalDTContratos.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveContratoTipo IN(30,31) ") - ' DdlContrato.DataBind() - ' DdlContrato.Items.Insert(0, New System.Web.UI.WebControls.ListItem("Todos", "-1")) - ' End Sub + Dim AvanceImporte As Decimal = DTDatos(0)("AvanceImporte").ToString.ToDecimal + Dim TotalContratos As Decimal = DTDatos(0)("Importe").ToString.ToDecimal + Dim TotalAvancePorcentaje As Decimal = (AvanceImporte * 100) / TotalContratos + Dim TotalFaltantePorcentaje As Decimal = 100 - TotalAvancePorcentaje + + Dim FechaFinal As Date = DTDatos(0)("FechaFinal").ToString.ToDate + Dim Dias As Integer = (FechaFinal - Now).Days + + Dias = If(Dias < 0, 0, Dias) + + LtlAvanceImporte.Text = $"$ {AvanceImporte.ToString("###,###,###.00")}" + + LtlAvanceImporteProcentaje1.Text = $"{TotalAvancePorcentaje.ToString("###.00")} %" + LtlAvanceImporteProcentaje2.Text = $"{TotalAvancePorcentaje.ToString("###.00")}%" + SPAvance1.Attributes.Add("style", $"width:{TotalAvancePorcentaje.ToString.ToEntero}%") + + LtlFechaFin.Text = FechaFinal.ToString("dd/MM/yyyy") + LtlDiasRestantes.Text = Dias.ToString("###,###") + + UpGrafica.Update() + + End Sub + - ' Private Sub CargaClientes() - ' Dim dt As DataTable = Nothing - ' Dim Cli As New ClsClientes - ' If Cli.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) Then - ' dt = Cli.DtResultados - ' End If - ' Cli.Dispose() - ' DdlCliente.DataSource = dt - ' DdlCliente.DataBind() - ' DdlCliente.Items.Insert(0, New ListItem("Todos", "-1")) - ' End Sub - '#End Region Protected Sub GV_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GVDatos.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then Dim HplNumeroEstimacion As HyperLink = e.Row.FCHyperLink("HplNumeroEstimacion") - HplNumeroEstimacion.NavigateUrl = $"./RepContratosObraAvancesPartida.aspx?CveEstimacion={e.Row.DataKey("CveEstimacion")}&NumeroEstimacion={ e.Row.DataKey("NumeroEstimacion")}&CveContrato={ CveContrato }" + HplNumeroEstimacion.NavigateUrl = $"./RepContratosObraAvancesPartida.aspx?CveEstimacion={e.Row.DataKey("CveEstimacion")}&NumeroEstimacion={ e.Row.DataKey("NumeroEstimacion")}&CveContrato={ CveContrato }&NumeroContrato={NumeroContrato}" Dim LnkAnexo As LinkButton = e.Row.FCLinkButton("LnkAnexo") @@ -97,9 +127,6 @@ Partial Class RepContratosObraAvancesDetalle End Sub - 'Protected Sub CmdConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click - ' CargaDatos() - 'End Sub Protected Sub LnkAnexo_Click(sender As Object, e As EventArgs) @@ -130,18 +157,23 @@ Partial Class RepContratosObraAvancesDetalle Dim DtControl As New DataTable Dim ObjContratos As New ClsContratos - - + Dim Lugar As String = "" + Dim DescripcionContrato As String = "" If ObjContratos.GetContratosObraAvancesControlAcumulativo(CveContrato, CveEstimacion, UsuarioActual.CveEmpresa) Then DtControl = ObjContratos.DtResultados + + + If DtControl.Rows.Count > 0 Then + Lugar = DtControl(0)("Lugar").ToString + DescripcionContrato = DtControl(0)("DescripcionContrato").ToString + End If End If ObjContratos.Dispose() If DtControl.Rows.Count > 0 Then - Dim WBAnexo = New ClosedXML.Excel.XLWorkbook(PlantillaAnexo) Dim WBAnexoSalvar = New ClosedXML.Excel.XLWorkbook @@ -158,10 +190,16 @@ Partial Class RepContratosObraAvancesDetalle WSControl.Cell(20, 6).Value = NumeroContrato - WSControl.Cell(18, 2).Value = "" 'Lugar + WSControl.Cell(18, 2).Value = Lugar + WSControl.Cell(18, 2).Style.Alignment.SetHorizontal(XLAlignmentHorizontalValues.Left) + WSControl.Cell(18, 2).Style.Alignment.SetVertical(XLAlignmentVerticalValues.Top) + WSControl.Cell(17, 6).Value = "" 'Periodo Fecha Inicial WSControl.Cell(17, 7).Value = "" 'Periuodo Fecha Final - WSControl.Cell(20, 2).Value = "" 'Obra + WSControl.Cell(20, 2).Value = DescripcionContrato + WSControl.Cell(20, 2).Style.Alignment.SetHorizontal(XLAlignmentHorizontalValues.Left) + WSControl.Cell(20, 2).Style.Alignment.SetVertical(XLAlignmentVerticalValues.Top) + WSControl.Cell(22, 7).Value = "" 'Presupuesto segun contrato WSControl.Cell(19, 5).Value = "" 'Contrtatista @@ -310,9 +348,7 @@ Partial Class RepContratosObraAvancesDetalle WSDetalle.Cell(4, 10).Value = "" 'Fecha a WSDetalle.Cell(4, 11).Value = NumeroEstimacion - 'WSDetalle.Picture("Logo").Name = $"Logo{Drow("CveContratoDetalle").ToString}" - 'WSDetalle.Picture("Firma").Name = $"Firma{Drow("CveContratoDetalle").ToString}" - + WSDetalle.Cell(6, 6).Value = DescripcionContrato WSDetalle.Cell(14, 2).Value = Drow("Codigo").ToString WSDetalle.Cell(14, 3).Value = Drow("PS").ToString @@ -353,7 +389,7 @@ Partial Class RepContratosObraAvancesDetalle Dim ImgWidth As Double = Imagen.Height - Dim nRowmas As Integer = ImgWidth / RowH + Dim nRowmas As Integer = (ImgWidth / RowH).ToEntero CurrectRowImg = CurrectRowImg + nRowmas @@ -396,13 +432,5 @@ Partial Class RepContratosObraAvancesDetalle End Sub - 'Public Function GetStream(excelWorkbook As ClosedXML.Excel.XLWorkbook) As Stream - - ' Dim fs = New MemoryStream() - ' excelWorkbook.SaveAs(fs) - ' fs.Position = 0 - ' Return fs - - 'End Function End Class \ No newline at end of file diff --git a/Contratos/RepContratosObraAvancesPartida.aspx b/Contratos/RepContratosObraAvancesPartida.aspx index 31ffcfad3..ec7f8299d 100644 --- a/Contratos/RepContratosObraAvancesPartida.aspx +++ b/Contratos/RepContratosObraAvancesPartida.aspx @@ -8,45 +8,14 @@ - Reporte Contratos Avance por partida + -<%-- - - -
    -
    -
    -
      -
    • Cliente: - -
    • -
    • Contratos: - -
    • -
    • Sección: - -
    • -
    • Partida: - -
    • -
    • Productos y Servicios: - -
    • -
    -
    -
    - -
    -
    -
    -
    -
    -
    --%> + @@ -56,7 +25,7 @@
    - +
    diff --git a/Contratos/RepContratosObraAvancesPartida.aspx.vb b/Contratos/RepContratosObraAvancesPartida.aspx.vb index 07287f5ab..2abb6424b 100644 --- a/Contratos/RepContratosObraAvancesPartida.aspx.vb +++ b/Contratos/RepContratosObraAvancesPartida.aspx.vb @@ -25,7 +25,6 @@ Partial Class RepContratosObraAvancesPartida Property CveContrato As Integer - Get If ViewState("CveContrato") Is Nothing Then Return -1 @@ -36,8 +35,20 @@ Partial Class RepContratosObraAvancesPartida Set(value As Integer) ViewState("CveContrato") = value End Set - - + End Property + + + Property NumeroContrato As String + Get + If ViewState("NumeroContrato") Is Nothing Then + Return "" + Else + Return ViewState("NumeroContrato").ToString + End If + End Get + Set(value As String) + ViewState("NumeroContrato") = value + End Set End Property Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load @@ -46,8 +57,9 @@ Partial Class RepContratosObraAvancesPartida CveEstimacion = If(Request("CveEstimacion") IsNot Nothing AndAlso Request("CveEstimacion").ToString.ToEntero > 0, Request("CveEstimacion").ToString.ToEntero, -1) CveContrato = If(Request("CveContrato") IsNot Nothing AndAlso Request("CveContrato").ToString.ToEntero > 0, Request("CveContrato").ToString.ToEntero, -1) + NumeroContrato = If(Request("NumeroContrato") IsNot Nothing AndAlso Request("NumeroContrato").ToString.Length > 0, $"{Request("NumeroContrato").ToString}", "") - LblEstimacion.Text = If(Request("NumeroEstimacion") IsNot Nothing AndAlso Request("NumeroEstimacion").ToString.Length > 0, $"Numero Estimacion: {Request("NumeroEstimacion").ToString}", "") + LblEstimacion.Text = If(Request("NumeroEstimacion") IsNot Nothing AndAlso Request("NumeroEstimacion").ToString.Length > 0, $"Contgrato { NumeroContrato } Estimacion {Request("NumeroEstimacion").ToString}", "") If CveEstimacion > 0 Then diff --git a/Empresas/119/Formatos/OC.rdlc b/Empresas/119/Formatos/OC.rdlc index 972fe2b26..1d461c99b 100644 --- a/Empresas/119/Formatos/OC.rdlc +++ b/Empresas/119/Formatos/OC.rdlc @@ -12,10 +12,16 @@ 1.5586cm - 11.45281cm + 9.58751cm - 5.42617cm + 3.627cm + + + 1.8653cm + + + 1.79919cm @@ -254,6 +260,122 @@ + + + + true + true + + + + + P. U. + + + + + + + Textbox2 + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Total + + + + + + + Textbox1 + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + @@ -477,6 +599,75 @@ + + + + true + true + + + + + =Fields!Importe.Value + + + + + + + Importe + + + 2pt + 2pt + 1pt + + + + + + + + true + true + + + + + =Fields!Total.Value + + + + + + + Total + + + 2pt + 2pt + 1pt + + + + @@ -487,6 +678,16 @@ + + + =IIF(Parameters!TipoProveedor.Value = "1",true,false) + + + + + =IIF(Parameters!TipoProveedor.Value = "1",true,false) + + @@ -503,7 +704,7 @@ 4.58198cm 0.20457cm 0.96717cm - 20.2584cm + 20.25842cm =Today @@ -2276,6 +2480,12 @@ true ReportParameter1 + + String + true + true + ReportParameter1 + diff --git a/Empresas/141/Formatos/Factura.rdlc b/Empresas/141/Formatos/Factura.rdlc index 76daa0c7d..5d6e0d999 100644 --- a/Empresas/141/Formatos/Factura.rdlc +++ b/Empresas/141/Formatos/Factura.rdlc @@ -335,6 +335,141 @@ + + true + true + true + + + + + Sonora: Veracruz (662) 210-0041 - Morelos (662) 211-0805 - Colosio (662) 2608088 - Colosio2 (662) 1189939 - Reforma (662) 213-8724 - Perisur (662) 254-4849 - Rodríguez (662) 213-0388 + + + + + + + + + Sahuaro (662) 2161471 - Solidaridad (662) 216-0935 - Palo Verde (662) 4363254 - Progreso (662) 3105781 - Quiroga (662) 261- 0838 - Caborca (637) 3724214 - Magdalena (632) 322-4080 + + + + + + + + + Nogales (631) 319-0093 - Cananea (645) 332 20 40 - Guaymas (622) 222-2417 - Obregón (644)412-2002 Obregón II (644) 413-1543- Obregón III (644) 4134501 - Navojoa (642) 422-9852 + + + + + + + + + Sinaloa: Los Mochis (668) 817-0209 - Los Mochis II (668) 176-5802 - Guasave (687) 871-5317 - Calzada (667) 729-2112 - Zapata (667) 992-0876 - Tierra Blanca (667) 716-6997 - Sanalona (667) 713-667 + + + + + + + + + Tres Ríos (667) 455-4621 - Mazatlán (669) 910-2122 - Baja California: Tijuana1 (664) 622-5221 - Tijuana3 (664) 626-2615 - Rosarito (661) 612-4461 - Mexicali (686) 567-6102 - Mexicali3 (686) 326 02 79 + + + + + + + + + Tecate (665) 5212080 - Ensenada (646) 172-4075 - Ensenada2 (646) 176-2703 - Baja California Sur: La Paz (612) 146-3656 - La Paz 2 (612) 121-3185 - Los Cabos (624) 688 3552 + + + + + + + Textbox4 + 9.91718cm + 0.22108cm + 2.03224cm + 20.79751cm + + + 2pt + 2pt + 2pt + 2pt + + @@ -477,10 +612,11 @@ true - 6.06618in + 6.31618in 0.06752in 1.42169in 8.23953in + 1 @@ -1275,7 +1411,7 @@ 0.09836in 0.36206in 8.16629in - 1 + 2 @@ -1297,11 +1433,11 @@ Textbox5 - 8.32309cm + 9.27559cm 0.28014cm 0.05496cm 20.88652cm - 2 + 3 @@ -1345,11 +1481,11 @@ Textbox1 - 8.41332cm + 9.36582cm 2.01402cm 0.51608cm 19.15264cm - 3 + 4 @@ -1368,7 +1504,7 @@ 1.15361cm 2.413cm 2.75323cm - 4 + 5 @@ -1448,7 +1584,7 @@ 4.32565cm 2.70968cm 7.93893cm - 5 + 6 @@ -1528,7 +1664,7 @@ 12.68838cm 2.70968cm 5.11312cm - 6 + 7 @@ -1562,7 +1698,7 @@ 18.23008cm 0.96018cm 2.79101cm - 7 + 8 @@ -1598,7 +1734,7 @@ 18.23008cm 0.6cm 2.79101cm - 8 + 9 @@ -1649,7 +1785,7 @@ 18.23008cm 0.86903cm 2.79101cm - 9 + 10 @@ -1740,7 +1876,7 @@ 0.28014cm 1.09007cm 9.71199cm - 10 + 11 @@ -1820,7 +1956,7 @@ 10.06268cm 0.7927cm 9.71199cm - 11 + 12 @@ -2001,7 +2137,7 @@ 0.25136cm 0.74611cm 13.82025cm - 12 + 13 @@ -2034,7 +2170,7 @@ 14.07729cm 0.57354cm 2.90753cm - 13 + 14 @@ -2068,11 +2204,11 @@ Textbox4 - 5.8751cm + 6.1926cm 1.74571cm 1.05328cm 17.71415cm - 14 + 15 =IIF((Sum(IIF(Fields!CveClasificacion.Value = 20345,1,0), "DsOC") > 0),false,true) @@ -2086,142 +2222,6 @@ 2pt - - true - true - true - - - - - Sonora: Veracruz (662) 210-0041 - Morelos (662) 211-0805 - Colosio (662) 2608088 - Colosio2 (662) 1189939 - Reforma (662) 213-8724 - Perisur (662) 254-4849 - Rodríguez (662) 213-0388 - - - - - - - - - Sahuaro (662) 2161471 - Solidaridad (662) 216-0935 - Palo Verde (662) 4363254 - Progreso (662) 3105781 - Quiroga (662) 261- 0838 - Caborca (637) 3724214 - Magdalena (632) 322-4080 - - - - - - - - - Nogales (631) 319-0093 - Cananea (645) 332 20 40 - Guaymas (622) 222-2417 - Obregón (644)412-2002 Obregón II (644) 413-1543- Obregón III (644) 4134501 - Navojoa (642) 422-9852 - - - - - - - - - Sinaloa: Los Mochis (668) 817-0209 - Los Mochis II (668) 176-5802 - Guasave (687) 871-5317 - Calzada (667) 729-2112 - Zapata (667) 992-0876 - Tierra Blanca (667) 716-6997 - Sanalona (667) 713-667 - - - - - - - - - Tres Ríos (667) 455-4621 - Mazatlán (669) 910-2122 - Baja California: Tijuana1 (664) 622-5221 - Tijuana3 (664) 626-2615 - Rosarito (661) 612-4461 - Mexicali (686) 567-6102 - Mexicali3 (686) 326 02 79 - - - - - - - - - Tecate (665) 5212080 - Ensenada (646) 172-4075 - Ensenada2 (646) 176-2703 - Baja California Sur: La Paz (612) 146-3656 - La Paz 2 (612) 121-3185 - Los Cabos (624) 688 3552 - - - - - - - Textbox4 - 8.96468cm - 0.22108cm - 2.03224cm - 20.79751cm - 15 - - - 2pt - 2pt - 2pt - 2pt - - true true @@ -2237,7 +2237,7 @@ Textbox5 - 12.60759cm + 13.24259cm 0.24983cm 0.05496cm 20.88652cm @@ -2253,57 +2253,6 @@ 2pt - - Embedded - ID3 - FitProportional - 21.4598cm - 0.28014cm - 0.93046cm - 5.37042cm - 17 - - - - - - true - true - - - - - DESCARGA NUESTRA NUEVA APLICACIÓN - - - - - - - Textbox60 - 19.12502cm - 0.28014cm - 0.6882cm - 20.71217cm - 18 - - - 2pt - 2pt - 2pt - 2pt - - true true @@ -2346,7 +2295,7 @@ 17.09066cm 0.64028cm 3.90165cm - 19 + 17 @@ -2509,11 +2458,11 @@ Textbox4 - 12.76838cm + 13.40338cm 0.16383cm 2.44366cm 15.51057cm - 20 + 18 @@ -2544,11 +2493,11 @@ Textbox19 - 5.01303in + 5.26303in 6.21617in 0.17708in 0.94607in - 21 + 19 @@ -2579,11 +2528,11 @@ Textbox19 - 5.2055in + 5.4555in 6.21616in 0.17966in 0.94607in - 22 + 20 @@ -2614,11 +2563,11 @@ Textbox19 - 5.40449in + 5.65449in 6.21616in 0.18819in 0.94607in - 23 + 21 @@ -2649,11 +2598,11 @@ Textbox19 - 5.61074in + 5.86074in 6.22658in 0.17119in 0.94607in - 24 + 22 @@ -2685,11 +2634,11 @@ Textbox19 - 5.80137in + 6.05137in 6.237in 0.19596in 0.94607in - 25 + 23 @@ -2721,11 +2670,11 @@ Textbox42 - 5.03803in + 5.28803in 7.16224in 0.17708in 0.98426in - 26 + 24 @@ -2756,11 +2705,11 @@ Textbox42 - 5.2305in + 5.4805in 7.16224in 0.17966in 0.98425in - 27 + 25 @@ -2791,11 +2740,11 @@ Textbox42 - 5.42949in + 5.67949in 7.17266in 0.18819in 0.98425in - 28 + 26 @@ -2827,11 +2776,11 @@ Textbox42 - 5.63574in + 5.88574in 7.17266in 0.17119in 0.98425in - 29 + 27 @@ -2863,11 +2812,11 @@ Textbox42 - 5.82637in + 6.07637in 7.18308in 0.19596in 0.98425in - 30 + 28 @@ -2904,7 +2853,7 @@ 6.75122cm 0.82021cm 5.51336cm - 31 + 29 @@ -2930,11 +2879,11 @@ Textbox5 - 15.2826cm + 15.9176cm 0.10579cm 0.05496cm 20.88652cm - 32 + 30 @@ -2946,55 +2895,6 @@ 2pt - - true - true - true - - - - - ** SI LAS LLANTAS NO SON INSTALADAS EN ECONOLLANTAS PIERDE SU GARANTÍA DE FABRICA ** - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - true true @@ -3018,11 +2918,249 @@ Textbox4 - 12.13048cm + 12.79723cm 0.19008cm 0.40655cm 12.88812cm + 31 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + Black + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + Black + 2pt + 2pt + 2pt + 2pt + + + + Embedded + rockblade + FitProportional + 12.06211cm + 6.5919cm + 0.62223cm + 4.03523cm 34 + + + + + + Embedded + yokohama2 + FitProportional + 12.06211cm + 0.58737cm + 0.62223cm + 4.03523cm + 35 + + + + + + Embedded + mastercraft + FitProportional + 12.12228cm + 17.02729cm + 0.62223cm + 4.03523cm + 36 + + + + + + Embedded + coopertires + FitProportional + 12.18225cm + 11.79701cm + 0.62223cm + 4.03523cm + 37 + + + + + + true + true + true + + + + + ESTAS LLANTAS SOLO TENDRAN GARANTÍA DE POR VIDA CONTRA DEFECTO DE FABRICA. +*SI LAS LLANTAS NO SON INSTALADAS EN ECONOLLANTAS PIERDE SU GARANTÍA DE FABRICA*. + + + + =IIF(IIF((Sum(IIF(Fields!CveClasificacion.Value = 20345,1,0), "DsOC") = 0) and (Sum(IIF(Fields!CveClasificacion.Value = 20342 or Fields!CveClasificacion.Value = 20341,1,0), "DsOC") > 0),false,true),"","<br/>**EL CLIENTE NO ACEPTA PÓLIZA DE SEGURO**") + HTML + + + + + + + + + PARA UNA OPTIMA DURACION DE SUS LLANTAS, ESTAS DEBEN ALINEARSE BALANCEARSE Y ROTAR CADA 6 MESES O 1O MIL KILOMETROS. + + + + PARA HACER VALIDA UNA RECLAMACIÓN DEBERAN CUMPLIR CON EL ANTERIOR REQUISITO + + + + + + 2pt + 2pt + 2pt + 2pt + + + + Embedded + ID3 + FitProportional + 22.13416cm + 0.22725cm + 0.93046cm + 5.37042cm + 39 + + + + + + true + true + + + + + DESCARGA NUESTRA NUEVA APLICACIÓN + + + + + + + Textbox60 + 19.79938cm + 0.22725cm + 0.6882cm + 20.71217cm + 40 @@ -3038,11 +3176,11 @@ =System.Convert.FromBase64String(Parameters!QRDescarga.Value) image/png FitProportional - 8.0685in - 6.67743in + 8.33399in + 6.65661in 0.6035in 0.78275in - 35 + 41 @@ -3091,11 +3229,11 @@ Textbox60 - 19.5698cm - 0.28014cm + 20.24416cm + 0.22725cm 1.49135cm 5.37042cm - 36 + 42 @@ -3106,68 +3244,6 @@ 2pt - - true - true - - - - - - - - Black - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - - - - Black - 2pt - 2pt - 2pt - 2pt - - true true @@ -3246,11 +3322,11 @@ Textbox60 - 19.5698cm - 7.45145cm + 20.24416cm + 7.39856cm 2.45709cm 6.56105cm - 39 + 43 @@ -3285,11 +3361,11 @@ Textbox60 - 19.56002cm - 14.67145cm + 20.23438cm + 14.61856cm 1.46939cm 6.32076cm - 40 + 44 @@ -3300,68 +3376,24 @@ 2pt - - Embedded - rockblade - FitProportional - 11.19428cm - 5.58835cm - 0.86918cm - 4.08628cm - 41 + + + Start + + true + 19.90494cm + 0cm + 3.07798cm + 21.09991cm + 45 - - - Embedded - yokohama2 - FitProportional - 11.33186cm - 0.58737cm - 0.65751cm - 4.35272cm - 42 - - - - - - Embedded - mastercraft - FitProportional - 11.30011cm - 17.06617cm - 0.93972cm - 3.99634cm - 43 - - - - - - Embedded - coopertires - FitProportional - 11.33186cm - 10.33489cm - 0.65751cm - 6.09184cm - 44 - - - - + - 22.57045cm + 23.17899cm