diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 5b3184493..78964e5b4 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -3548,12 +3548,21 @@ Public Class ClsPaginas End Property Property GlobalDTAC_PD_Programas(CveEjeRector As Integer) As DataTable Get + Dim CveEmpresa As Integer = 48 + Dim AppNombre As String = $"GlobalDTAC_PD_Programas-{CveEmpresa}" + 'sino existe, recarga los datos + If HttpContext.Current.Application(AppNombre) Is Nothing Then + Using ObjAC As New ClsAC + If ObjAC.GetClasificacionAdministrativa(CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjAC.DtResultados + End Using + End If + GlobalDTAC_PD_Programas = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) If CveEjeRector <> -1 Then - Dim Dv As New DataView(DirectCast(Application("GlobalDTAC_PD_Programas"), DataTable), String.Format("CveEjeRector = {0}", CveEjeRector), "", DataViewRowState.CurrentRows) + Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), String.Format("CveEjeRector = {0}", CveEjeRector), "", DataViewRowState.CurrentRows) GlobalDTAC_PD_Programas = Dv.ToTable Dv.Dispose() Else - GlobalDTAC_PD_Programas = DirectCast(Application("GlobalDTAC_PD_Programas"), DataTable) + GlobalDTAC_PD_Programas = DirectCast(Application(AppNombre), DataTable) End If End Get Set(value As DataTable) @@ -5454,7 +5463,7 @@ Public Class ClsPaginas If XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Name = "tfd:TimbreFiscalDigital" Then Vta.FolioFiscal = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("UUID").InnerText Vta.NoSerieCertificado = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("NoCertificadoSAT").InnerText - Vta.FechaCertificacion = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("FechaTimbrado").InnerText.ToDate + Vta.FechaTimbrado = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("FechaTimbrado").InnerText.ToDate Vta.SelloCFDi = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("SelloCFD").InnerText Vta.SelloSAT = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("SelloSAT").InnerText End If @@ -5573,7 +5582,7 @@ Public Class ClsPaginas If XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Name = "tfd:TimbreFiscalDigital" Then Vta.FolioFiscal = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("UUID").InnerText Vta.NoSerieCertificado = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("noCertificadoSAT").InnerText - Vta.FechaCertificacion = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("FechaTimbrado").InnerText.ToDate + Vta.FechaTimbrado = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("FechaTimbrado").InnerText.ToDate Vta.SelloCFDi = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("selloCFD").InnerText Vta.SelloSAT = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("selloSAT").InnerText End If @@ -5651,7 +5660,7 @@ Public Class ClsPaginas 'ImgCBB = String.Format("{0}://{1}:{2}/Empresas/{3}/CBB/{4}.jpg", Request.Url.Scheme.Replace("https", "http"), Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa, Vta.SerieFolio) 'Dim CadenaOriginals As String = "||1.0|" + Vta.FolioFiscal + "|" + Vta.FechaCertificacion.ToString("yyyy-MM-dd") + "T" + Vta.FechaCertificacion.ToString("HH:mm:ss") + "|" + Vta.SelloCFDi + "|" + Vta.NoSerieCertificado + "||" - Dim CadenaOriginals As String = String.Format("||{0}|{1}|{2}T{3}|{4}|{5}||", If(Vta.Version.Contiene("3.3", "4.0"), "1.1", "1.0"), Vta.FolioFiscal, Vta.FechaCertificacion.ToString("yyyy-MM-dd"), Vta.FechaCertificacion.ToString("HH:mm:ss"), Vta.SelloCFDi, Vta.NoSerieCertificado) + Dim CadenaOriginals As String = String.Format("||{0}|{1}|{2}T{3}|{4}|{5}||", If(Vta.Version.Contiene("3.3", "4.0"), "1.1", "1.0"), Vta.FolioFiscal, Vta.FechaTimbrado.ToString("yyyy-MM-dd"), Vta.FechaTimbrado.ToString("HH:mm:ss"), Vta.SelloCFDi, Vta.NoSerieCertificado) If Not ImagenCBB.Exists Then ImgCBB = "" Dim RutaFormato As String = "" Dim RutaFormatoDefault As String = "" @@ -5717,7 +5726,7 @@ Public Class ClsPaginas params.Add(New ReportParameter("DomicilioSucursal", DomicilioSucursal)) params.Add(New ReportParameter("Vencimiento", Vta.FechaVencimiento.ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("FolioFiscal", Vta.FolioFiscal)) - params.Add(New ReportParameter("FechaCertificacion", String.Format("{0}T{1}", Vta.FechaCertificacion.ToString("yyyy-MM-dd"), Vta.FechaCertificacion.ToString("HH:mm:ss")))) + params.Add(New ReportParameter("FechaCertificacion", String.Format("{0}T{1}", Vta.FechaTimbrado.ToString("yyyy-MM-dd"), Vta.FechaTimbrado.ToString("HH:mm:ss")))) params.Add(New ReportParameter("SelloCFDI", Vta.SelloCFDi)) params.Add(New ReportParameter("CadenaSAT", CadenaOriginals)) params.Add(New ReportParameter("SelloSAT", Vta.SelloSAT)) diff --git a/App_Code/ClsRH.vb b/App_Code/ClsRH.vb index 283f9be3b..6fb81455d 100644 --- a/App_Code/ClsRH.vb +++ b/App_Code/ClsRH.vb @@ -1908,9 +1908,22 @@ Public Class ClsRH End Try Return Retorno + End Function + + Public Function PA_RH_PersonalSalarioMenorAlMinimo(cveEmpresa As Int32, calculaSalarioV As Boolean, guardar As Boolean, cveRegistroPatronal As Int32, salarioZonaA As Decimal, salarioZonaB As Decimal, salarioZonaC As Decimal, fecha As DateTime) As Boolean + Dim retorno As Boolean = False + DataAdapter("PA_RH_PersonalSalarioMenorAlMinimo", CommandType.StoredProcedure) + addParameters("@CveEmpresa", SqlDbType.Int, cveEmpresa) + addParameters("@CalculaSalarioV", SqlDbType.Bit, calculaSalarioV) + addParameters("@Guardar", SqlDbType.Bit, guardar) + addParameters("@CveRegistroPatronal", SqlDbType.Int, cveRegistroPatronal) + addParameters("@SalarioZonaA", SqlDbType.Money, salarioZonaA) + addParameters("@SalarioZonaB", SqlDbType.Money, salarioZonaB) + addParameters("@SalarioZonaC", SqlDbType.Money, salarioZonaC) + addParameters("@Fecha", SqlDbType.Date, fecha) + retorno = RunQuery("Ocurrió un error al obtener el personal con salario menor al minimo.") + Return retorno End Function - - Public Function GetPersonalMasivo(CveTurno As Integer, CveProyecto As Integer, CveSubProyecto As Integer, CveSupervisor As Integer, CveEmpresa As Integer, Optional CveCliente As Integer = -1) As Boolean Dim Retorno As Boolean = False 'Data = New DataTable @@ -1947,7 +1960,7 @@ Public Class ClsRH NombrePadre As String, NombreMadre As String, CveSATBanco As Integer, CveSATRiesgoPuesto As Integer, CveSATRegimenContratacion As Integer, CveClienteAsignado As Integer, CveSubProyecto As Integer, URL As String, CveSupervisor As Integer, CLABE As String, BancoNumCuenta As String, CveJornada As Integer, CveUsuario As Integer, CveEmpresa As Integer, CveUsuarioNomina As Integer, Beneficiario As String, Optional CveSubProyectoZona As Integer = Nothing, Optional CveUniforme As Integer = -1, Optional TelefonoExtension As String = "-1", Optional CelularPersonal As String = "-1", Optional TelefonoMarcadoRapido As String = "-1", Optional ContactoAlterno As String = "-1", Optional CveTipodeSalario As Integer = 1, Optional Sindicalizado As Boolean = False, Optional CvePais As Integer = -1, - Optional Pensionado As Boolean = False, Optional CveMedioTransporte As Integer = -1, Optional CveRegistroPatronal As Integer = -1, Optional CveEmpresaAsignado As Integer = -1, Optional CveTipoTrabajador As Integer = -1, Optional NetoPeriodo As Decimal = -1, Optional TipoSangre As String = "-1", Optional CveSubTipoPeriodo As Integer = -1) As Boolean + Optional Pensionado As Boolean = False, Optional CveMedioTransporte As Integer = -1, Optional CveRegistroPatronal As Integer = -1, Optional CveEmpresaAsignado As Integer = -1, Optional CveTipoTrabajador As Integer = -1, Optional NetoPeriodo As Decimal = -1, Optional TipoSangre As String = "-1", Optional CveSubTipoPeriodo As Integer = -1, Optional AreaGeografica As String = "A") As Boolean Dim Retorno As Boolean = False Dim noguardoXcurp As Boolean = False @@ -2036,6 +2049,7 @@ Public Class ClsRH .Add("@CveTipoTrabajador", SqlDbType.Int).Value = CveTipoTrabajador .Add("@NetoPeriodo", SqlDbType.Money).Value = NetoPeriodo .Add("@TipoSangre", SqlDbType.VarChar).Value = TipoSangre + .Add("@AreaGeografica", SqlDbType.VarChar).Value = AreaGeografica .Add("@CveSubTipoPeriodo", SqlDbType.Int).Value = CveSubTipoPeriodo @@ -2079,7 +2093,7 @@ Public Class ClsRH Optional TelefonoExtension As String = "-1", Optional CelularPersonal As String = "-1", Optional TelefonoMarcadoRapido As String = "-1", Optional ContactoAlterno As String = "-1", Optional CveUsuarioModifico As Integer = -1, Optional FechaActivo As Date = MinFecha, Optional FechaReingreso As Date = MinFecha, Optional CveTipodeSalario As Integer = 1, Optional Sindicalizado As Integer = -1, Optional CvePais As Integer = -1, Optional Pensionado As Boolean = False, Optional CveRegistroPatronal As Integer = -1, Optional CveEmpresaAsignado As Integer = -1, Optional CveMedioTransporte As Integer = -1, Optional EsReserva As Integer = -1, Optional Fiscalizable As Integer = -1, Optional CveTipoTrabajador As Integer = -1, Optional NetoPeriodo As Decimal = -1, - Optional TipoSangre As String = "-1", Optional CveSubTipoPeriodo As Integer = -1) As Boolean + Optional TipoSangre As String = "-1", Optional CveSubTipoPeriodo As Integer = -1, Optional AreaGeografica As String = "") As Boolean Dim Retorno As Boolean = False @@ -2174,6 +2188,8 @@ Public Class ClsRH .Add("@CveTipoTrabajador", SqlDbType.Int).Value = CveTipoTrabajador .Add("@NetoPeriodo", SqlDbType.Money).Value = NetoPeriodo .Add("@TipoSangre", SqlDbType.VarChar).Value = TipoSangre + .Add("@AreaGeografica", SqlDbType.VarChar).Value = AreaGeografica + .Add("@CveSubTipoPeriodo", SqlDbType.Int).Value = CveSubTipoPeriodo End With diff --git a/App_Code/ClsRutas.vb b/App_Code/ClsRutas.vb index 82f301ee0..bde0252dc 100644 --- a/App_Code/ClsRutas.vb +++ b/App_Code/ClsRutas.vb @@ -129,26 +129,6 @@ Public Class ClsRutas GC.SuppressFinalize(Me) End Sub #End Region - Public Function GetRutas(CveRuta As Integer, CveUsuario As Integer, CveEmpresa As Integer, Ruta As String, Estatus As Boolean, FechaIng As DateTime) As Boolean - Dim Retorno As Boolean = False - DataAdapter("PA_Trans_RutasGet") - With SqlAdapter.SelectCommand.Parameters - .Add("@CveRuta", SqlDbType.Int).Value = CveRuta - .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa - .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario - .Add("@Ruta", SqlDbType.VarChar).Value = Ruta - .Add("@Estatus", SqlDbType.Bit).Value = Estatus - .Add("@FechaIng", SqlDbType.DateTime).Value = FechaIng - End With - Try - SqlAdapter.Fill(Data) - Retorno = True - Catch ex As Exception - OnError("Ocurrió un error al obtener las rutas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) - End Try - - Return Retorno - End Function End Class diff --git a/App_Code/ClsTransportes.vb b/App_Code/ClsTransportes.vb index 061c528a7..13189b553 100644 --- a/App_Code/ClsTransportes.vb +++ b/App_Code/ClsTransportes.vb @@ -339,6 +339,30 @@ Public Class ClsTransportes End Function #End Region +#Region "Rutas" + Public Function GetRutas(CveRuta As Integer, CveUsuario As Integer, CveEmpresa As Integer, Ruta As String, Estatus As Boolean, FechaIng As DateTime) As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_Trans_RutasGet") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveRuta", SqlDbType.Int).Value = CveRuta + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + .Add("@Ruta", SqlDbType.VarChar).Value = Ruta + .Add("@Estatus", SqlDbType.Bit).Value = Estatus + .Add("@FechaIng", SqlDbType.DateTime).Value = FechaIng + + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener las rutas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return Retorno + End Function +#End Region + #Region "Tarifas" Public Function GetDestinosTarifas(CveDestinoOrigen As Integer, CveDestinoFinal As Integer) As Boolean Dim Retorno As Boolean = False diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index 560f2b21c..5839b9a96 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -424,7 +424,7 @@ Public Class ClsVentas Return Retorno End Function - Public Function AddVenta(TipoDocto As String, FolioFact As Integer, CveCliente As Integer, CveClienteSucursal As Integer, SubTotal As Double, Descuento As Double, Amortizacion As Double, IVA As Double, RetIVA As Double, RetISR As Double, Total As Double, + Public Function AddVenta(TipoDocto As String, FolioFact As Integer, CveCliente As Integer, CveClienteSucursal As Integer, SubTotal As Decimal, Descuento As Decimal, Amortizacion As Decimal, IVA As Decimal, RetIVA As Decimal, RetISR As Decimal, Total As Decimal, CveMoneda As Integer, TipoCambio As Double, CveMetodoPago As Integer, CondicionesPago As Integer, FormaPago As Integer, FechaVencimiento As DateTime, Fecha As DateTime, MotivoDescuento As String, Observaciones As String, FechaEjecucion As DateTime, CveVendedor As Integer, Alfa1 As String, Alfa2 As String, Alfa3 As String, Num1 As Double, Num2 As Double, Num3 As Double, Fech1 As Date, Fech2 As Date, Fech3 As Date, CveCorte As Integer, NumeroPersonas As Integer, CvePrePoliza As Integer, CveUsuario As Integer, CveEmpresa As Integer, @@ -438,7 +438,8 @@ Public Class ClsVentas Optional DiasCredito As Integer = 0, Optional EsDiasCreditoFijo As Boolean = False, Optional AnticipoEspecial As Boolean = False, Optional Kilometraje As Double = 0, Optional EsAmortizacion As Boolean = False, Optional CveTipoRetencion As Integer = 0, Optional CorreoNotificacion As String = "", Optional FormaPaqueteria As Integer = 1, Optional FacturarSucursal As Boolean = False, Optional VentaDesglosaIEPS As Boolean = False, Optional ServicioDomicilio As Boolean = False, Optional RFCReceptor As String = "", Optional Adjunto As String = "-1", Optional DevolucionImportePagado As Decimal = 0, Optional EsGarantia As Boolean = False, Optional CveLineaAdicional As Integer = -1, Optional DescripcionVenta As String = "", - Optional CveMedico As Integer = -1, Optional CveProcedimiento As Integer = -1, Optional CveTipoVenta As Integer = -1, Optional RequiereOS As Boolean = False + Optional CveMedico As Integer = -1, Optional CveProcedimiento As Integer = -1, Optional CveTipoVenta As Integer = -1, Optional RequiereOS As Boolean = False, + Optional FechaParaSurtir As DateTime = MinFecha ) As Boolean Dim Retorno As Boolean = False @@ -449,15 +450,15 @@ Public Class ClsVentas .Add("@FolioFact", SqlDbType.Int).Value = FolioFact .Add("@CveCliente", SqlDbType.Int).Value = CveCliente .Add("@CveClienteSucursal", SqlDbType.Int).Value = CveClienteSucursal - .Add("@SubTotal", SqlDbType.Float).Value = SubTotal.RoundSQL - .Add("@Descuento", SqlDbType.Float).Value = Descuento.RoundSQL - .Add("@Amortizacion", SqlDbType.Float).Value = Amortizacion.RoundSQL - .Add("@IVA", SqlDbType.Float).Value = IVA.RoundSQL - .Add("@IEPS", SqlDbType.Float).Value = IEPS.RoundSQL - .Add("@RetIVA", SqlDbType.Float).Value = RetIVA.RoundSQL - .Add("@RetISR", SqlDbType.Float).Value = RetISR.RoundSQL - .Add("@ImpuestoLocal", SqlDbType.Float).Value = ImpuestoLocal.RoundSQL - .Add("@Total", SqlDbType.Float).Value = Total.RoundSQL + .Add("@SubTotal", SqlDbType.Money).Value = SubTotal.RoundSQL + .Add("@Descuento", SqlDbType.Money).Value = Descuento.RoundSQL + .Add("@Amortizacion", SqlDbType.Money).Value = Amortizacion.RoundSQL + .Add("@IVA", SqlDbType.Money).Value = IVA.RoundSQL + .Add("@IEPS", SqlDbType.Money).Value = IEPS.RoundSQL + .Add("@RetIVA", SqlDbType.Money).Value = RetIVA.RoundSQL + .Add("@RetISR", SqlDbType.Money).Value = RetISR.RoundSQL + .Add("@ImpuestoLocal", SqlDbType.Money).Value = ImpuestoLocal.RoundSQL + .Add("@Total", SqlDbType.Money).Value = Total.RoundSQL .Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda .Add("@TipoCambio", SqlDbType.Float).Value = TipoCambio .Add("@CveMetodoPago", SqlDbType.Int).Value = CveMetodoPago @@ -480,7 +481,7 @@ Public Class ClsVentas .Add("@Fech3", SqlDbType.VarChar).Value = IIf(Fech3.ToString.Contiene("1/1/0001 12:00:00 a. m.", "01/01/0001 12:00:00 a. m."), "-1", Fech3.ToString("yyyy/MM/dd")) .Add("@CveCorte", SqlDbType.Int).Value = CveCorte .Add("@NumeroPersonas", SqlDbType.Int).Value = NumeroPersonas - .Add("@Propina", SqlDbType.Float).Value = Propina + .Add("@Propina", SqlDbType.Money).Value = Propina .Add("@CveVentaTerminal", SqlDbType.Int).Value = CveVentaTerminal .Add("@CvePrePoliza", SqlDbType.Int).Value = CvePrePoliza .Add("@AtencionA", SqlDbType.VarChar).Value = AtencionA @@ -544,6 +545,7 @@ Public Class ClsVentas .Add("@CveProcedimiento", SqlDbType.Int).Value = CveProcedimiento .Add("@CveTipoVenta", SqlDbType.Int).Value = CveTipoVenta .Add("@RequiereOS", SqlDbType.Int).Value = RequiereOS + .Add("@FechaParaSurtir", SqlDbType.DateTime).Value = If(FechaParaSurtir = MinFecha, Fecha, FechaParaSurtir) .Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue @@ -568,35 +570,33 @@ Public Class ClsVentas Return Retorno End Function - Public Function UpdateVentas(SubTotal As Double, Descuento As Double, IVA As Double, IEPS As Double, Total As Double, CveMoneda As Integer, TipoCambio As Double, - Fecha As Date, Observaciones As String, CveEmpresa As Integer, CveVenta As Integer, CveMetodoPago As Integer, FormaPago As Integer, + Public Function UpdateVentas(SubTotal As Decimal, Descuento As Decimal, IVA As Decimal, IEPS As Decimal, Total As Decimal, CveMoneda As Integer, TipoCambio As Decimal, + Fecha As Date, Observaciones As String, CveEmpresa As Integer, CveVenta As Integer, Optional TipoDocto As String = "Cot", Optional Vigencia As Date = MinFecha, Optional CondicionesPago As Integer = -1, - Optional AtencionA As String = "-1", Optional PedidoContrato As String = "-1", Optional CveFormaPago33 As Integer = -1, Optional CveMetodoPago33 As Integer = -1, - Optional CveCliente As Integer = -1, Optional CveClienteSucursal As Integer = -1, Optional OrdenCompra As String = "-1", Optional RetIVA As Double = -1, - Optional RetISR As Double = -1, Optional Kilometraje As Double = 0, Optional CveUsoCFDi As Integer = -1, Optional ServicioDomicilio As Boolean = False, Optional CveVendedor As Integer = -1, + Optional AtencionA As String = "", Optional PedidoContrato As String = "", Optional CveFormaPago33 As Integer = -1, Optional CveMetodoPago33 As Integer = -1, + Optional CveCliente As Integer = -1, Optional CveClienteSucursal As Integer = -1, Optional OrdenCompra As String = "-1", Optional RetIVA As Decimal = -1, + Optional RetISR As Decimal = -1, Optional Kilometraje As Decimal = 0, Optional CveUsoCFDi As Integer = -1, Optional ServicioDomicilio As Boolean = False, Optional CveVendedor As Integer = -1, Optional RequiereOS As Boolean = False, Optional CveMedico As Integer = -1, Optional CveProcedimiento As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_VentasUpdate") With SqlAdapter.SelectCommand.Parameters - .Add("@SubTotal", SqlDbType.Float).Value = SubTotal - .Add("@Descuento", SqlDbType.Float).Value = Descuento - .Add("@IVA", SqlDbType.Float).Value = IVA - .Add("@IEPS", SqlDbType.Float).Value = IEPS - .Add("@Total", SqlDbType.Float).Value = Total + .Add("@SubTotal", SqlDbType.Money).Value = SubTotal + .Add("@Descuento", SqlDbType.Money).Value = Descuento + .Add("@IVA", SqlDbType.Money).Value = IVA + .Add("@IEPS", SqlDbType.Money).Value = IEPS + .Add("@Total", SqlDbType.Money).Value = Total .Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda - .Add("@TipoCambio", SqlDbType.Float).Value = TipoCambio - .Add("@RetIVA", SqlDbType.Float).Value = RetIVA - .Add("@RetISR", SqlDbType.Float).Value = RetISR + .Add("@TipoCambio", SqlDbType.Money).Value = TipoCambio + .Add("@RetIVA", SqlDbType.Money).Value = RetIVA + .Add("@RetISR", SqlDbType.Money).Value = RetISR .Add("@Fecha", SqlDbType.Date).Value = Fecha .Add("@Observaciones", SqlDbType.VarChar).Value = Observaciones .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveVenta", SqlDbType.Int).Value = CveVenta .Add("@TipoDocto", SqlDbType.VarChar).Value = TipoDocto - .Add("@CveMetodoPago", SqlDbType.Int).Value = CveMetodoPago .Add("@CondicionesPago", SqlDbType.Int).Value = CondicionesPago - .Add("@FormaPago", SqlDbType.Int).Value = FormaPago .Add("@AtencionA", SqlDbType.VarChar).Value = AtencionA .Add("@Vigencia", SqlDbType.Date).Value = Vigencia .Add("@PedidoContrato", SqlDbType.VarChar).Value = PedidoContrato @@ -605,7 +605,7 @@ Public Class ClsVentas .Add("@CveCliente", SqlDbType.Int).Value = CveCliente .Add("@CveClienteSucursal", SqlDbType.Int).Value = CveClienteSucursal .Add("@OrdenCompra", SqlDbType.VarChar).Value = OrdenCompra - .Add("@Kilometraje", SqlDbType.Float).Value = Kilometraje + .Add("@Kilometraje", SqlDbType.Money).Value = Kilometraje .Add("@CveUsoCFDi", SqlDbType.SmallInt).Value = CveUsoCFDi .Add("@ServicioDomicilio", SqlDbType.Bit).Value = ServicioDomicilio .Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor @@ -1382,7 +1382,8 @@ Public Class ClsVentas CvePresupuestoIngreso As Integer, Optional TiempoEntrega As String = "", Optional CveVentaDetallePadre As Integer = -1, Optional CveContratoDetalle As Integer = -1, Optional PorcentajeIVA As Decimal = 0, Optional IEPS As Decimal = -1, Optional PorcentajeIEPS As Double = 0, Optional CvePromocionDetalle As Integer = -1, Optional CveMovimientoDetallePedido As Integer = -1, Optional ImporteRetIVA As Decimal = 0, Optional PorcentajeRetIVA As Double = 0, - Optional ImporteRetISR As Decimal = 0, Optional PorcentajeRetISR As Decimal = 0, Optional CuentaPredial As String = "", Optional CvePrecioLista As Integer = -1, Optional CveActivoFijo As Integer = -1, Optional NumTurnos As Decimal = 0D) As Boolean + Optional ImporteRetISR As Decimal = 0, Optional PorcentajeRetISR As Decimal = 0, Optional CuentaPredial As String = "", Optional CvePrecioLista As Integer = -1, Optional CveActivoFijo As Integer = -1, + Optional NumTurnos As Decimal = 0D, Optional EstatusAlmacen As Integer = 0) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_VentasDetalleAdd") @@ -1415,6 +1416,7 @@ Public Class ClsVentas .Add("@CvePrecioLista", SqlDbType.Int).Value = CvePrecioLista .Add("@CveActivoFijo", SqlDbType.Int).Value = CveActivoFijo .Add("@NumTurnos", SqlDbType.Decimal).Value = NumTurnos + .Add("@EstatusAlmacen", SqlDbType.Int).Value = EstatusAlmacen End With Try diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb index 4fd52665f..2feb5e7e7 100644 --- a/App_Code/Modelos.vb +++ b/App_Code/Modelos.vb @@ -7094,7 +7094,6 @@ Namespace Modelos Public Property FacturarSucursal As Boolean = False 'Public Property Sucursal As SucursalModel Public Property SubProyecto As Modelos.SubProyectoModel - Public Property DtDetalle As Data.DataTable Public Property DtMercancias As Data.DataTable Public Property DtDetalleAC As Data.DataTable @@ -7108,7 +7107,6 @@ Namespace Modelos Public Property DtDesgloseImpuestos As Data.DataTable Public Property DtDocumentosRelacionados As Data.DataTable Public Property DtNCVinculadas As Data.DataTable - Public Property DtAnticipos As Data.DataTable Public Property DtPromociones As Data.DataTable Public Property DtImpuestosLocales As Data.DataTable @@ -7122,10 +7120,8 @@ Namespace Modelos Public Property DtDocumentacionCliente As Data.DataTable Public Property DtContratosSerieDetalle As Data.DataTable Public Property DtOtrosConceptos As Data.DataTable - Public Property DtRemisionesDocumentosRelacionados As Data.DataTable Public Property DtInventario As Data.DataTable - 'Public Property DtAnticipoAmortizacion As Data.DataTable Public Property DtRemConceptosSurtidos As Data.DataTable Public Property UsadosBonificacion As List(Of Integer) Public Property TipoBonificacion As Integer = 0 @@ -7176,7 +7172,6 @@ Namespace Modelos Public Property RefDocto As String = "" Public Property RealizarDevolucionAlmacen As Boolean Public Property CveAlmacenDevolucionVenta As Integer - Public Property TipoDocumento As String @@ -7224,28 +7219,6 @@ Namespace Modelos End Select End Get End Property - Public ReadOnly Property TipodeComprobanteSAT As ClbNegBICFDv3_2.TipoDeComprobante - Get - Select Case TipoDocto - Case "Ing" - Return ClbNegBICFDv3_2.TipoDeComprobante.ingreso - Case "Egs" - Return ClbNegBICFDv3_2.TipoDeComprobante.egreso - Case "Dev" - Return ClbNegBICFDv3_2.TipoDeComprobante.egreso - Case "Cot" - Return Nothing - Case "Rem" - Return Nothing - Case "Nom" - Return Nothing - Case "Ant" - Return ClbNegBICFDv3_2.TipoDeComprobante.ingreso - Case Else - Return Nothing - End Select - End Get - End Property Public ReadOnly Property ClaseDoctoSat As Integer Get Select Case TipoDocto @@ -7293,7 +7266,6 @@ Namespace Modelos Return retorno End Get End Property - Public Property CondicionesPago As Integer = 0 ' 0 - Contado, 1 - Credito (CHECAR) Public ReadOnly Property CondicionesPagoText As String @@ -7308,7 +7280,6 @@ Namespace Modelos Return retorno End Get End Property - Public Property MotivoDescuento As String = "" Public Property EsGarantia As Boolean = False @@ -7433,24 +7404,21 @@ Namespace Modelos Public Property Num1 As Double = 0 Public Property Num2 As Double = 0 Public Property Num3 As Double = 0 - Public Property DiasCredito As Integer Public Property EsDiasCreditoFijo As Boolean - Public Property CveCorte As Integer = -1 'Public Property CveMesa As Integer = -1 Public Property NumeroPersonas As Integer = 0 Public Property FechaPago As Date - Public Property CveNCaVincular As Integer Public Property FolioFiscal As String = "" Public Property NoSerieCertificado As String Public Property SelloCFDi As String = "" Public Property SelloSAT As String = "" Public Property FechaEmision As Date - Public Property FechaCertificacion As Date + Public Property FechaTimbrado As Date Public Property NoSerieCertificadoContribuyente As String Public Property NumeroCuenta As String = "" Public Property CveTipoAmortizacionAnticipo As Integer = -1 @@ -7564,8 +7532,8 @@ Namespace Modelos Public Property VendedorCodigo As String = "" Public Property CveSucursalEjecucion As Integer Public Property FechaEjecucion As DateTime + Public Property FechaParaSurtir As DateTime = MinFecha Public Property CveSucursalCobranza As Integer - Public Property CveSubProyectoCobranza As Integer Public Property CveSubProyectoEjecucion As Integer Public Property CveOS As Integer @@ -7578,25 +7546,16 @@ Namespace Modelos Public Property TipoEstatus As Integer = 0 Public Property CveCondicionEntrega As Integer = -1 Public Property CondicionEntrega As String = "" - Public Property TipoRelacion As String Public Property UUIDRelacionados As List(Of String) - - Public Property CveVentaRelacion As Integer = -1 Public Property ImporteRelacion As Decimal - Public Property EsNCAmortizacion As Boolean Public Property Kilometraje As Decimal - Public Property CveTipoRetencion As Integer - Public Property VentaDesglosaIEPS As Boolean - Public Property CveMotivoCancelacion As Integer = -1 - Public Property MotivoCancelacion As String = "" - Public Property TipoContable As Integer = -1 #End Region diff --git a/App_Code/Usuario.vb b/App_Code/Usuario.vb index a0adb072c..465e618e6 100644 --- a/App_Code/Usuario.vb +++ b/App_Code/Usuario.vb @@ -227,12 +227,12 @@ Namespace ADSSession Case OpcionSession.getListasession retorno = _dicSessionobj.Values.ToList() Case OpcionSession.CerrarSession - Dim objlist = _dicSessionobj.Values.ToList() + Dim objlist As List(Of ADSSessionObj) = _dicSessionobj.Values.ToList() For Each user As ADSSession.ADSSessionObj In objlist If CveUsuario = user.CveUsuario Then 'AndAlso (CveEmpresa = -1 OrElse CveEmpresa = user.CveEmpresa) Then Dim taspsig As String = user.ASPSIG '"94C6AC57E8599390A4B7B8AB41FEABEF466D9B31120BE06D78110E66265F1ACC5616297BF3B88EDCEE71EBCFE35484308F62C8017EAC29FB3F0FB45CEC09E8F03DFBB4A4DD890D45755B7A30185C6D01F20AEFA74BE3A25FD12D536B20DCB8D9940A3D95" Dim tsessionID As String = user.SessionID - Dim url = System.Configuration.ConfigurationManager.AppSettings("urlcerrarSession").ToString() + Dim url As String = System.Configuration.ConfigurationManager.AppSettings("urlcerrarSession").ToString() Dim cookie As String = String.Format("ASP.NET_SessionId={0};.ASPXSIG={1}", tsessionID, taspsig) sendURL(url, cookie) End If diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index 868b5c508..6d8c2930f 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -7,8 +7,7 @@ Imports System.Xml Imports Extensiones Imports iText.Barcodes.Dmcode Imports Microsoft.Reporting.WebForms -Imports Stimulsoft.Report -Imports Stimulsoft.Report.Web + Partial Class PopUpVerFactura Inherits ClsPaginas @@ -3400,12 +3399,8 @@ Partial Class PopUpVerFactura If Archivo.Exists Then If RegenerarPDF Then Archivo.Delete() - If UsuarioActual.Empresa.CvePlataforma = 2 Then - GeneraPDFVtaPyMe(Vta, "PDF") - Else - ImprimirbytesPDF(PdfFactura(Vta, AplicaPagare:=AplicaPagare, Guardar:=True, SubReportData:=CartaPorte, RegenerarQR:=True), Vta.SerieFolio, "PDF") - Vta = Nothing - End If + ImprimirbytesPDF(PdfFactura(Vta, AplicaPagare:=AplicaPagare, Guardar:=True, SubReportData:=CartaPorte, RegenerarQR:=True), Vta.SerieFolio, "PDF") + Vta = Nothing Else HttpContext.Current.Response.Clear() HttpContext.Current.Response.ClearContent() @@ -3418,20 +3413,11 @@ Partial Class PopUpVerFactura Archivo = Nothing End If Else - - '04/05/2018 - Se agrega seccion pruebas para generar factura venta .mrt para PyME - If UsuarioActual.Empresa.CvePlataforma = 2 Then - GeneraPDFVtaPyMe(Vta, "PDF") - Else - ImprimirbytesPDF(PdfFactura(Vta, AplicaPagare:=AplicaPagare, Guardar:=Guardar, SubReportData:=CartaPorte), Vta.SerieFolio, "PDF") - Vta = Nothing - End If + ImprimirbytesPDF(PdfFactura(Vta, AplicaPagare:=AplicaPagare, Guardar:=Guardar, SubReportData:=CartaPorte), Vta.SerieFolio, "PDF") + Vta = Nothing End If End If - - End If - End Sub #End Region @@ -6530,65 +6516,6 @@ Partial Class PopUpVerFactura End Sub #End Region -#Region "OP = VTA - PyME" - - ' 04/05/2018 - Pruebas de impresion de factura PyME - Private Sub GeneraPDFVtaPyMe(Venta As Modelos.Factura, Optional Formato As String = "PDF") - Dim Directorio1 As String = String.Format("{0}Formatos\Factura.mrt", UsuarioActual.Empresa.Ruta) - Dim File As FileInfo = New FileInfo(Directorio1) - - If File.Exists Then - Dim Reporte As StiReport = New StiReport() - Reporte.Load(Directorio1) - Reporte.Dictionary.DataSources.Clear() - - Dim ds As DataSet = New DataSet() - Venta.DtDetalle.TableName = "Datos" - - ds.Tables.Add(Venta.DtDetalle) - - Reporte.RegData(ds) - - Reporte.Dictionary.Variables("Empresa").Value = UsuarioActual.Empresa.Empresa - - Reporte.Dictionary.Variables("Tipo").Value = "Ingreso" - Reporte.Dictionary.Variables("RFC").Value = UsuarioActual.Empresa.RFC - Reporte.Dictionary.Variables("Serie").Value = Venta.Serie - Reporte.Dictionary.Variables("Folio").Value = Venta.Folio.ToString() - - Reporte.Dictionary.Variables("ClienteNombre").Value = Venta.Cliente.Nombre - Reporte.Dictionary.Variables("ClienteDireccion").Value = Venta.Cliente.Direccion - Reporte.Dictionary.Variables("ClienteLugar").Value = Venta.Cliente.Ciudad - Reporte.Dictionary.Variables("ClienteRFC").Value = Venta.Cliente.RFC - - Reporte.Dictionary.Variables("DomicilioExpedicion").Value = Venta.SubProyecto.Direccion - - Dim SubtTotal As Decimal = (Venta.DtDetalle.SUM("PU") * Venta.DtDetalle.SUM("Cantidad")) '* 0.16 lleva el IVA? - Dim IVA As Decimal = SubtTotal * 0.16D 'lleva IVA? - Dim Total As Decimal = SubtTotal + IVA - - 'Reporte.Dictionary.Variables("Importe").Value = - Reporte.Dictionary.Variables("ImporteLetra").Value = Total.Texto2Letras() - - Reporte.Dictionary.Variables("SubTotal").Value = SubtTotal.ToString() - Reporte.Dictionary.Variables("IVA").Value = IVA.ToString() - Reporte.Dictionary.Variables("Total").Value = Total.ToString() - - Reporte.Dictionary.Variables("UsoCFDI").Value = Venta.UsoCFDI - Reporte.Dictionary.Variables("MetodoPago").Value = Venta.MetodoPago33 - Reporte.Dictionary.Variables("FormaPago").Value = Venta.FormaPago33 - - Reporte.Dictionary.Variables("QR").Value = "lajgkfjsldasdhjsakd229312974tedghjbsadskuuhdkjsad" - Reporte.Dictionary.Variables("SelloCFDI").Value = "lajgkfjsldasdhjsakd229312974tedghjbsadskuuhdkjsadlajgkfjsldasdhjsakd229312974tedghjbsadskuuhdkjsadlajgkfjsldasdhjsakd229312974tedghjbsadskuuhdkjsad" - Reporte.Dictionary.Variables("SelloSAT").Value = "lajgkfjsldasdhjsakd229312974tedghjbsadskuuhdkjsad" - Reporte.Dictionary.Synchronize() - - StiReportResponse.ResponseAsPdf(Me, Reporte) - Else - RegistraScript("alert('No hay un formato de factura predefinido,favor de comunicar a soporte tecnico')") - End If - End Sub -#End Region #Region "OP = ENTREGAS - Entregas por realizar" Public Sub ImprimeEntregasPorRealizar(CveAsignacionEntrega As Long, pUsuarioEntregar As String) diff --git a/General/CatRimTamanios.aspx.vb b/General/CatRimTamanios.aspx.vb index 79a1c0e96..b5bc39021 100644 --- a/General/CatRimTamanios.aspx.vb +++ b/General/CatRimTamanios.aspx.vb @@ -30,7 +30,7 @@ Partial Class General_CatRimTamanios End Sub Private Sub CargaDatos() Dim ObjGral As New ClsGenerales - If ObjGral.GetRimTamanios(UsuarioActual.CveEmpresa) Then + If ObjGral.GetRinTamanios(UsuarioActual.CveEmpresa) Then GvDatos.DataSource = ObjGral.DtResultados End If ObjGral.Dispose() diff --git a/General/SaldosIniciales.aspx.vb b/General/SaldosIniciales.aspx.vb index 95f405963..428c5e9b5 100644 --- a/General/SaldosIniciales.aspx.vb +++ b/General/SaldosIniciales.aspx.vb @@ -4,8 +4,7 @@ Imports System.Data Imports System.Math Imports ClosedXML.Excel Imports Extensiones -Imports GemBox.Spreadsheet -Imports log4net.Filter + Partial Class General_SaldosIniciales Inherits ClsPaginas @@ -1601,14 +1600,14 @@ Partial Class General_SaldosIniciales Dim Fecha As Date = Row("Fecha").ToString().ToDate Dim FechaVencimiento As Date = Row("Fecha Vencimiento").ToString().ToDate Dim ImpuestoLocal As Decimal = If(dt.Columns.Contains("ImpuestoLocal"), Row("ImpuestoLocal").ToString().ToDecimal, 0D) - Dim Amortizacion As Double = If(dt.Columns.Contains("Amort.Ant"), Row("Amort.Ant").ToString().ToDouble, 0.0) + Dim Amortizacion As Decimal = If(dt.Columns.Contains("Amort.Ant"), Row("Amort.Ant").ToString().ToDecimal, 0) Dim SubTotal As Decimal = Row("SubTotal").ToString().ToDecimal Dim IVA As Decimal = Row("IVA").ToString().ToDecimal Dim Total As Decimal = Row("Total").ToString().ToDecimal Dim Saldo As Decimal = Row("Saldo").ToString().ToDecimal Dim CveCliente As Integer = DtClientes.FiltroPrimeroValor("CveCliente", $"RFC = '{RFC}'").ToString().ToEntero() Dim RetIVA As Decimal = Row("Ret IVA").ToString().ToDecimal - Dim RetISR As Double = Row("Ret ISR").ToString().ToDouble + Dim RetISR As Decimal = Row("Ret ISR").ToString().ToDecimal Dim Moneda As String = Row("Moneda").ToString() Dim TipoCambio As String = Row("Tipo Cambio").ToString() Dim CveMoneda As Integer = 1 diff --git a/Inventarios/EntradasSalidas.aspx.vb b/Inventarios/EntradasSalidas.aspx.vb index 03c834585..9f9985580 100644 --- a/Inventarios/EntradasSalidas.aspx.vb +++ b/Inventarios/EntradasSalidas.aspx.vb @@ -2070,7 +2070,10 @@ Partial Class Inventarios_EntradasSalidas ErrorMovInv = True End If Next - + Else + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovtoAlmacen, tValorInventario, tValorInventario, CveConceptoContable, TxtObservaciones.Text.Trim, TxtObservaciones.Text.Trim, CveMovimientoAlmacen:=CveMovimiento, CveClasificacion:=CveClasificacion, Contabilizable:=EsContabilizable) Then + ErrorMovInv = True + End If End If End If Else @@ -4433,7 +4436,7 @@ Partial Class Inventarios_EntradasSalidas #End Region -#Region "GUARDAR" +#Region "GUARDAR CAMBIO INVENTARIO FISICO " Private Sub BtnAplicarCambioInvFisico_Click(sender As Object, e As EventArgs) Handles BtnAplicarCambioInvFisico.Click If GvEntradas.Rows.Count = 0 And GvSalidas.Rows.Count = 0 Then diff --git a/Inventarios/RecepcionAlmacen.aspx b/Inventarios/RecepcionAlmacen.aspx index 1da85b76c..937f907e0 100644 --- a/Inventarios/RecepcionAlmacen.aspx +++ b/Inventarios/RecepcionAlmacen.aspx @@ -192,7 +192,7 @@
- +
diff --git a/Inventarios/RecepcionAlmacen.aspx.vb b/Inventarios/RecepcionAlmacen.aspx.vb index 40d70f44a..382b175f2 100644 --- a/Inventarios/RecepcionAlmacen.aspx.vb +++ b/Inventarios/RecepcionAlmacen.aspx.vb @@ -474,7 +474,7 @@ Partial Class Inventarios_RecepcionAlmacen CargaPendientes() CargaPermisos() - If UsuarioActual.CveEmpresa.Contiene(72, 80) Then DdlAlmacen.AutoPostBack = True + Dim PermisoEspecialCambioFecha As Boolean = False If UsuarioActual.CveUsuario.Contiene(100, 1937) Then PermisoEspecialCambioFecha = True @@ -591,9 +591,7 @@ Partial Class Inventarios_RecepcionAlmacen UpGenerales.Update() End Sub - Protected Sub DdlAlmacen_SelectedIndexChanged(sender As Object, e As EventArgs) - RecargaporAlmacenes() - End Sub + Private Sub RecargaporAlmacenes() CveTipoAlmacen = -1 diff --git a/Inventarios/RepEntradasSalidas.aspx b/Inventarios/RepEntradasSalidas.aspx index 8a60e98ab..4e6ef9959 100644 --- a/Inventarios/RepEntradasSalidas.aspx +++ b/Inventarios/RepEntradasSalidas.aspx @@ -209,7 +209,7 @@ diff --git a/Ventas/RepProductosServicios.aspx.vb b/Ventas/RepProductosServicios.aspx.vb index e14b4dea6..381395413 100644 --- a/Ventas/RepProductosServicios.aspx.vb +++ b/Ventas/RepProductosServicios.aspx.vb @@ -53,8 +53,6 @@ Partial Class Ventas_RepProductosServicios If UsuarioActual.CveEmpresa = 2 AndAlso UsuarioActual.CveUsuario.Contiene(77, 21) Then Response.Redirect("/Inicio.aspx") CargarMarcas() SetValues() - - End If End Sub @@ -115,8 +113,6 @@ Partial Class Ventas_RepProductosServicios divClasif2.Visible = True DdlGrupo.Items.Add(New ListItem("Clasificacion2", "25")) - - LblServicioDomicilioFiltro.Visible = True DVServicioDomicilio.Visible = True @@ -142,6 +138,12 @@ Partial Class Ventas_RepProductosServicios DdlPS.ddl.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CveClasificacion:=DdlClasificacion.SelectedValue.ToEntero) DdlPS.ddl.DataBind() DdlPS.ddl.Items.Insert(0, New ListItem("Seleccione el Producto", "-1")) + End If + + If UsuarioActual.Empresa.Funcionalidad(713) = "1" Then + ChkIEPS.Visible = True + ChkIEPS.Checked = True + GvDatos.Columns(6).Visible = True End If 'CargaEstatus @@ -334,43 +336,48 @@ Partial Class Ventas_RepProductosServicios Protected Sub BtnPersonalizar_Click(sender As Object, e As System.EventArgs) Handles BtnPersonalizar.Click - - If ChkMaxSub.Checked Then + If ChkIEPS.Checked Then GvDatos.Columns(6).Visible = True Else GvDatos.Columns(6).Visible = False End If - If ChkAVGSub.Checked Then + If ChkMaxSub.Checked Then GvDatos.Columns(7).Visible = True Else GvDatos.Columns(7).Visible = False End If - If ChkMinSub.Checked Then + If ChkAVGSub.Checked Then GvDatos.Columns(8).Visible = True Else GvDatos.Columns(8).Visible = False End If - If ChkMaxTot.Checked Then + If ChkMinSub.Checked Then GvDatos.Columns(9).Visible = True Else GvDatos.Columns(9).Visible = False End If - If ChkAvgTot.Checked Then + If ChkMaxTot.Checked Then GvDatos.Columns(10).Visible = True Else GvDatos.Columns(10).Visible = False End If - If ChkMinTot.Checked Then + If ChkAvgTot.Checked Then GvDatos.Columns(11).Visible = True Else GvDatos.Columns(11).Visible = False End If + If ChkMinTot.Checked Then + GvDatos.Columns(12).Visible = True + Else + GvDatos.Columns(12).Visible = False + End If + UPDatos.Update() End Sub #End Region diff --git a/Ventas/RepProductosServiciosDetalle.aspx b/Ventas/RepProductosServiciosDetalle.aspx index 02cb489fd..45c299c7d 100644 --- a/Ventas/RepProductosServiciosDetalle.aspx +++ b/Ventas/RepProductosServiciosDetalle.aspx @@ -399,13 +399,13 @@ <%--3--%> <%--4--%> - + <%--5--%> <%--6--%> - + <%--7--%> - + <%--8--%> <%--9--%> @@ -413,13 +413,13 @@ <%--10--%> <%--11--%> - + <%--12--%> <%--13--%> <%--14--%> - + <%--15--%> <%--16--%> diff --git a/Ventas/RepVentaDetalle.aspx b/Ventas/RepVentaDetalle.aspx index bf80fe55d..cb6dece06 100644 --- a/Ventas/RepVentaDetalle.aspx +++ b/Ventas/RepVentaDetalle.aspx @@ -579,12 +579,18 @@ - <%-- 39--%> + <%-- 40--%> + <%-- 41--%> + + + + + @@ -732,6 +738,11 @@ + + + + + diff --git a/Ventas/RepVentaDetalle.aspx.vb b/Ventas/RepVentaDetalle.aspx.vb index b292cf75f..302599684 100644 --- a/Ventas/RepVentaDetalle.aspx.vb +++ b/Ventas/RepVentaDetalle.aspx.vb @@ -705,6 +705,8 @@ Partial Class RepVentaDetalle If ChkTC.Checked Then ListPersonalizada.Add("TC") + If ChkDescripcionVenta.Checked Then ListPersonalizada.Add("DescripcionVenta") + If objUsuario.AddUsuariosPersonalizaciones(UsuarioActual, "RepVentaDetalles.aspx", String.Join("|", ListPersonalizada)) Then 'Alert("Personalizacion guardada") End If @@ -889,6 +891,9 @@ Partial Class RepVentaDetalle Case "Kilometraje" ChkKilometraje.Checked = True Exit Select + Case "DescripcionVenta" + ChkDescripcionVenta.Checked = True + Exit Select Case Else Exit Select End Select @@ -947,6 +952,8 @@ Partial Class RepVentaDetalle GvDatos.Columns(38).Visible = ChkUsoCFDI.Checked GvDatos.Columns(39).Visible = ChkKilometraje.Checked GvDatos.Columns(40).Visible = ChkTC.Checked + GvDatos.Columns(41).Visible = ChkDescripcionVenta.Checked + Personalizo = 1 If Personalizo = 1 Then diff --git a/Ventas/RepVentas.aspx b/Ventas/RepVentas.aspx index fecc3ef63..a0d7ae3f0 100644 --- a/Ventas/RepVentas.aspx +++ b/Ventas/RepVentas.aspx @@ -366,13 +366,13 @@ <%--2--%> - + <%--3--%> <%--4--%> <%--5--%> - + <%--6--%> <%--7--%> @@ -384,7 +384,7 @@ <%--10--%> <%--11--%> - + <%--12--%> <%--13--%> diff --git a/Ventas/RepVentas.aspx.vb b/Ventas/RepVentas.aspx.vb index 64d428b75..66a52fd02 100644 --- a/Ventas/RepVentas.aspx.vb +++ b/Ventas/RepVentas.aspx.vb @@ -390,7 +390,7 @@ Partial Class Ventas_RepVentas CveMoneda = e.Row.DBCampo("CveMoneda").ToString.ToEntero End If - Dim CveSubProyecto = "-1", CveProyecto = "-1" + Dim CveSubProyecto As String = "-1", CveProyecto As String = "-1" If DdlGrupo.SelectedValue.ToEntero = 19 Then CveSubProyecto = e.Row.DBCampo("CveCentroCosto") CveProyecto = e.Row.DBCampo("CveCentroCostoProyecto") @@ -411,7 +411,7 @@ Partial Class Ventas_RepVentas If e.Row.DBCampo("Mes").ToEntero() > 0 Then Dim Anio As Integer = FechaFRef.Year Dim Mes As Integer = e.Row.DBCampo("Mes").ToEntero() - Dim lastDayOfMonth = DateTime.DaysInMonth(Anio, Mes) + Dim lastDayOfMonth As Integer = DateTime.DaysInMonth(Anio, Mes) Dim Dia As Integer = FechaFRef.Day @@ -423,7 +423,7 @@ Partial Class Ventas_RepVentas FechaInicial = New DateTime(Anio, Mes, 1).ToString("dd/MM/yyyy") End If - Dim FechaFinalRef = New DateTime(Anio, Mes, Dia) + Dim FechaFinalRef As New DateTime(Anio, Mes, Dia) 'ASIGNAR LA FECHA FINAL DEL GRUPO, SI ES MENOR A LA FECHA DEL FILTRO If FechaF <> "-1" Then @@ -435,9 +435,6 @@ Partial Class Ventas_RepVentas Else FechaFinal = FechaFinalRef.ToString("dd/MM/yyyy") End If - - - End If Case 3 ' AÑO/MES @@ -445,13 +442,13 @@ Partial Class Ventas_RepVentas Dim FechaFRef As DateTime = FechaF.ToDateTime() Dim separator As Char = "/".ToCharArray().FirstOrDefault() - Dim AnioMes = e.Row.DBCampo("AnioMes").Split(separator) + Dim AnioMes As String() = e.Row.DBCampo("AnioMes").Split(separator) Dim Anio As Integer = AnioMes(0).ToEntero() Dim Mes As Integer = AnioMes(1).ToEntero() If Anio > 0 AndAlso Mes > 0 Then - Dim lastDayOfMonth = DateTime.DaysInMonth(Anio, Mes) + Dim lastDayOfMonth As Integer = DateTime.DaysInMonth(Anio, Mes) Dim DiaFinal As Integer = FechaFRef.Day @@ -469,8 +466,7 @@ Partial Class Ventas_RepVentas End If End If - Dim FechaFinalRef = New DateTime(Anio, Mes, DiaFinal) - + Dim FechaFinalRef As New DateTime(Anio, Mes, DiaFinal) 'ASIGNAR LA FECHA FINAL DEL GRUPO, SI ES MENOR A LA FECHA DEL FILTRO If FechaF <> "-1" Then If FechaFRef < FechaFinalRef Then @@ -504,7 +500,6 @@ Partial Class Ventas_RepVentas e.Row.Attributes.Add("style", "background:#CCCCCC !important") End If - If DdlGrupo.SelectedValue.ToEntero = 21 Then If e.Row.DBCampo("GPO").Contains("Total") Then e.Row.CssClass = "Totales" @@ -517,8 +512,6 @@ Partial Class Ventas_RepVentas e.Row.Cells(6).BackColor = Drawing.Color.Transparent End If End If - - End If End If End Sub @@ -818,9 +811,8 @@ Partial Class Ventas_RepVentas If DdlClienteClasificacion.SelectedValue <> "-1" Then StrFiltro.AppendFormat(" Clasificación Cliente: {0}", DdlClienteClasificacion.SelectedItem.Text) If DdlCondicionesPago.SelectedValue <> "-1" Then StrFiltro.AppendFormat(" Condiciones Pago: {0}", DdlCondicionesPago.SelectedItem.Text) - Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png") - Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + Dim logouri As String = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) Dim dt As DataTable = DtVentas '.FiltraParametros("", "Orden") '.FiltraParametros("Total > 0", DistinctColumns:={"GPO", "Cantidad", "SubTotal", "Descuento", "Amortizacion", "IVA", "Total"}) Dim FechaI, FechaF As String FechaI = If(txtFechaI.Text = "" Or txtFechaI.Text = "__/__/____", "-1", txtFechaI.Text) @@ -964,7 +956,7 @@ Partial Class Ventas_RepVentas End Sub Private Sub CalcularIntervaloRepHP() - Dim PrevMondayDate = DateTime.Today.AddDays(-Weekday(Today.AddDays(-1), Microsoft.VisualBasic.FirstDayOfWeek.Monday)) + Dim PrevMondayDate As Date = DateTime.Today.AddDays(-Weekday(Today.AddDays(-1), Microsoft.VisualBasic.FirstDayOfWeek.Monday)) Dim Sunday As DateTime = PrevMondayDate.AddDays(6) txtFechaIHP.Text = PrevMondayDate.ToString("dd/MM/yyyy") diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index be622b490..18d7194e5 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -446,16 +446,14 @@ :
-
- +
+ -
-
- -
+
+ @@ -584,16 +582,16 @@ - + Requiere Técnico: - + - + Fecha de Cirugia: - + @@ -1978,12 +1976,13 @@
+ +
- - +   @@ -4095,7 +4094,7 @@ - + <%-- Médico:  @@ -4116,7 +4115,7 @@ Seleccione uno - + --%> @@ -8407,13 +8406,13 @@ <%--Tipo Venta--%>
-
+
-
+
-
+
@@ -8491,7 +8490,7 @@
- Requiere Técnico: + Requiere Técnico:
@@ -8547,6 +8546,40 @@