diff --git a/AC/PresupuestoEgresosAnterior.aspx.vb.exclude b/AC/PresupuestoEgresosAnterior.aspx.vb.exclude index 1ace03209..8e79d681b 100644 --- a/AC/PresupuestoEgresosAnterior.aspx.vb.exclude +++ b/AC/PresupuestoEgresosAnterior.aspx.vb.exclude @@ -479,7 +479,7 @@ Partial Class AC_PresupuestoEgresos Dim Total As Double = GvDatos.Rows.Cast(Of GridViewRow)().Sum(Function(gvr) gvr.DataKey("Total").ToDouble) - IDPoliza = Conta.AddPoliza(123456, 4, "Aprobado", Total, Total, UsuarioActual.CveUsuario, Now) + IDPoliza = Conta.AddPoliza(123456, 4, "Aprobado", Total, Total, UsuarioActual.CveUsuario, NowADS()) If IDPoliza > 0 Then For Each gvr As GridViewRow In GvDatos.Rows @@ -505,9 +505,9 @@ Partial Class AC_PresupuestoEgresos If IdCuentaPagado = 0 Then IdCuentaPagado = Conta.AddCuenta(String.Format("827-{0}", Codigo), gvr.DataKey("ClasificadorOG"), "K", 0, 0, 1, 1, 608) Total = gvr.DataKey("Total").ToDouble - If Conta.AddMovimiento(123456, IDPoliza, IdCuentaAprobado, True, Total, "", "", 0, Now, "") Then + If Conta.AddMovimiento(123456, IDPoliza, IdCuentaAprobado, True, Total, "", "", 0, NowADS(), "") Then 'actualizo el idcuenta del presupuesto - If Not Conta.AddMovimiento(123456, IDPoliza, IdCuentaPorEjercer, False, Total, "", "", 0, Now, "") Then + If Not Conta.AddMovimiento(123456, IDPoliza, IdCuentaPorEjercer, False, Total, "", "", 0, NowADS(), "") Then TieneError = True Exit For End If diff --git a/AC/RegComprometido.aspx.vb b/AC/RegComprometido.aspx.vb index f41405278..492c6ab70 100644 --- a/AC/RegComprometido.aspx.vb +++ b/AC/RegComprometido.aspx.vb @@ -504,15 +504,15 @@ Partial Class AC_RegComprometido Conta.IniciaTransacSQL() Dim Total As Double = LbTotalPagar.Text.ToDouble - IDPoliza = Conta.AddPoliza(4, "Devengado-Ejercido-Pagado", Total, Total, UsuarioActual.CveUsuario, Now) + IDPoliza = Conta.AddPoliza(4, "Devengado-Ejercido-Pagado", Total, Total, UsuarioActual.CveUsuario, NowADS()) If IDPoliza > 0 Then For Each dr As DataRow In DtDetallePagar.Rows Dim Importe = dr("Importe").ToString.ToDouble 'Devengado - If Conta.AddMovimiento(IDPoliza, dr("IdCuentaComprometido").ToString.ToEntero, True, Importe, "", "", 0, String.Format("01/01/{0}", Now.Year).ToDate, "") Then - If Not Conta.AddMovimiento(IDPoliza, dr("IdCuentaDevengado").ToString.ToEntero, False, Importe, "", "", 0, String.Format("01/01/{0}", Now.Year).ToDate, "") Then + If Conta.AddMovimiento(IDPoliza, dr("IdCuentaComprometido").ToString.ToEntero, True, Importe, "", "", 0, String.Format("01/01/{0}", NowADS().Year).ToDate, "") Then + If Not Conta.AddMovimiento(IDPoliza, dr("IdCuentaDevengado").ToString.ToEntero, False, Importe, "", "", 0, String.Format("01/01/{0}", NowADS().Year).ToDate, "") Then TieneError = True Exit For End If @@ -522,8 +522,8 @@ Partial Class AC_RegComprometido End If 'Ejercido - If Conta.AddMovimiento(IDPoliza, dr("IdCuentaDevengado").ToString.ToEntero, True, Importe, "", "", 0, Now, "") Then - If Not Conta.AddMovimiento(IDPoliza, dr("IdCuentaEjercido").ToString.ToEntero, False, Importe, "", "", 0, Now, "") Then + If Conta.AddMovimiento(IDPoliza, dr("IdCuentaDevengado").ToString.ToEntero, True, Importe, "", "", 0, NowADS(), "") Then + If Not Conta.AddMovimiento(IDPoliza, dr("IdCuentaEjercido").ToString.ToEntero, False, Importe, "", "", 0, NowADS(), "") Then TieneError = True Exit For End If @@ -533,8 +533,8 @@ Partial Class AC_RegComprometido End If 'Pagado - If Conta.AddMovimiento(IDPoliza, dr("IdCuentaEjercido").ToString.ToEntero, True, Importe, "", "", 0, Now, "") Then - If Not Conta.AddMovimiento(IDPoliza, dr("IdCuentaPagado").ToString.ToEntero, False, Importe, "", "", 0, Now, "") Then + If Conta.AddMovimiento(IDPoliza, dr("IdCuentaEjercido").ToString.ToEntero, True, Importe, "", "", 0, NowADS(), "") Then + If Not Conta.AddMovimiento(IDPoliza, dr("IdCuentaPagado").ToString.ToEntero, False, Importe, "", "", 0, NowADS(), "") Then TieneError = True Exit For End If diff --git a/AC/RegDevengadoIngresos.aspx.vb b/AC/RegDevengadoIngresos.aspx.vb index 331d51626..610331123 100644 --- a/AC/RegDevengadoIngresos.aspx.vb +++ b/AC/RegDevengadoIngresos.aspx.vb @@ -91,8 +91,8 @@ Partial Class AC_RegDevengadoIngresos Dim dr As DataRow = DtPresupuestos.FiltroPrimero(String.Format("CvePresupuestoIngreso = {0}", CboPresupuesto.SelectedValue)) If dr IsNot Nothing Then - If ObjContaAC.AddMovimiento(IDPoliza, dr("IdCuentaDevengado").ToString.ToEntero, False, TotalDevengar, "", CboPresupuesto.SelectedItem.Text, 0, Now, "") Then - If ObjContaAC.AddMovimiento(IDPoliza, dr("IdCuentaPorEjecutar").ToString.ToEntero, True, TotalDevengar, "", CboPresupuesto.SelectedItem.Text, 0, Now, "") Then + If ObjContaAC.AddMovimiento(IDPoliza, dr("IdCuentaDevengado").ToString.ToEntero, False, TotalDevengar, "", CboPresupuesto.SelectedItem.Text, 0, NowADS(), "") Then + If ObjContaAC.AddMovimiento(IDPoliza, dr("IdCuentaPorEjecutar").ToString.ToEntero, True, TotalDevengar, "", CboPresupuesto.SelectedItem.Text, 0, NowADS(), "") Then 'AFECTAR MATRIZ INGRESOS Dim RegistroMatriz As DataRow = GlobalDTAC_MatrizIngresos.FiltroPrimero(String.Format("CodigoRubroIngreso = {0} ", dr("CodigoRubroIngreso").ToString)) @@ -103,9 +103,9 @@ Partial Class AC_RegDevengadoIngresos End If Dim CuentaCargo As Integer = DtCuentas.FiltraParametros(String.Format("Codigo = '{0}'", RegistroMatriz("CuentaCargo").ToString)).Rows(0)("Id").ToString.ToEntero Dim CuentaAbono As Integer = DtCuentas.FiltraParametros(String.Format("Codigo = '{0}'", RegistroMatriz("CuentaAbono").ToString)).Rows(0)("Id").ToString.ToEntero - If ObjContaAC.AddMovimiento(IDPoliza, CuentaCargo, False, TotalDevengar, "", CboPresupuesto.SelectedItem.Text, 0, Now, "") Then + If ObjContaAC.AddMovimiento(IDPoliza, CuentaCargo, False, TotalDevengar, "", CboPresupuesto.SelectedItem.Text, 0, NowADS(), "") Then 'actualizo el idcuenta del presupuesto - If Not ObjContaAC.AddMovimiento(IDPoliza, CuentaAbono, True, TotalDevengar, "", CboPresupuesto.SelectedItem.Text, 0, Now, "") Then + If Not ObjContaAC.AddMovimiento(IDPoliza, CuentaAbono, True, TotalDevengar, "", CboPresupuesto.SelectedItem.Text, 0, NowADS(), "") Then ErrorAC = True End If Else @@ -168,13 +168,13 @@ Partial Class AC_RegDevengadoIngresos If dr IsNot Nothing Then 'registro movimiento a la cuenta 814 - If ObjContaAC.AddMovimiento(IDPoliza, dr("IdCuentaRecaudado").ToString.ToEntero, False, TotalRecaudar, "", CboPresupuesto.SelectedItem.Text, 0, Now, "") Then + If ObjContaAC.AddMovimiento(IDPoliza, dr("IdCuentaRecaudado").ToString.ToEntero, False, TotalRecaudar, "", CboPresupuesto.SelectedItem.Text, 0, NowADS(), "") Then 'registro movimeinto a la cuenta 815 - If ObjContaAC.AddMovimiento(IDPoliza, dr("IdCuentaDevengado").ToString.ToEntero, True, TotalRecaudar, "", CboPresupuesto.SelectedItem.Text, 0, Now, "") Then + If ObjContaAC.AddMovimiento(IDPoliza, dr("IdCuentaDevengado").ToString.ToEntero, True, TotalRecaudar, "", CboPresupuesto.SelectedItem.Text, 0, NowADS(), "") Then 'registro movimiento a donde se donde - If Not ObjContaAC.AddMovimiento(IDPoliza, IdCuentaContable, False, TotalRecaudar, "", CboPresupuesto.SelectedItem.Text, 0, Now, "") Then + If Not ObjContaAC.AddMovimiento(IDPoliza, IdCuentaContable, False, TotalRecaudar, "", CboPresupuesto.SelectedItem.Text, 0, NowADS(), "") Then 'descuento a la cuenta bancaria - If ObjContaAC.AddMovimiento(IDPoliza, dr("IdCuentaDevengado").ToString.ToEntero, True, TotalRecaudar, "", CboPresupuesto.SelectedItem.Text, 0, Now, "") Then + If ObjContaAC.AddMovimiento(IDPoliza, dr("IdCuentaDevengado").ToString.ToEntero, True, TotalRecaudar, "", CboPresupuesto.SelectedItem.Text, 0, NowADS(), "") Then ErrorAC = True End If Else diff --git a/AC/RegEgresosModificaciones.aspx.vb b/AC/RegEgresosModificaciones.aspx.vb index e4095cd8a..d65829c30 100644 --- a/AC/RegEgresosModificaciones.aspx.vb +++ b/AC/RegEgresosModificaciones.aspx.vb @@ -48,7 +48,7 @@ Partial Class AC_RegPEAmpRed CreaDTDetalles() CargaPresupuestos() CargaCombosPE() - TxtFecha.Text = Now.ToShortDateString + TxtFecha.Text = NowADS().ToShortDateString End If End Sub Private Sub CargaPresupuestos() diff --git a/AC/RegIngresosModificaciones.aspx.vb b/AC/RegIngresosModificaciones.aspx.vb index 3fcc0fa29..0871f69f2 100644 --- a/AC/RegIngresosModificaciones.aspx.vb +++ b/AC/RegIngresosModificaciones.aspx.vb @@ -60,7 +60,7 @@ Partial Class AC_RegIngresosModificaciones CreaDTDetalles() CargaPresupuestos() - TxtFecha.Text = Now.ToShortDateString + TxtFecha.Text = NowADS().ToShortDateString LtEjercicio.Text = UsuarioActual.Empresa.EjercicioActual.ToString @@ -128,7 +128,7 @@ Partial Class AC_RegIngresosModificaciones Dim ampliacion As Double Dim reduccion As Double Conta.IniciaTransacSQL() - Dim Fecha As Date = Now + Dim Fecha As Date = NowADS() If Accion = 0 Then For Each gvr As GridViewRow In GvD.Rows diff --git a/AC/RegNomina.aspx.vb b/AC/RegNomina.aspx.vb index 90cc7fdc7..8f0bf32c0 100644 --- a/AC/RegNomina.aspx.vb +++ b/AC/RegNomina.aspx.vb @@ -47,7 +47,7 @@ Partial Class AC_RegNomina 'Else ' LbTitulo.Text = "Comprometido Otros" 'End If - TxtFecha.Text = Now.ToShortDateString + TxtFecha.Text = NowADS().ToShortDateString CargaPresupuestos() CargaMeta() diff --git a/AC/RepAnaliticoDeudaPublica.aspx.vb b/AC/RepAnaliticoDeudaPublica.aspx.vb index 870d7c02f..cf539ba8a 100644 --- a/AC/RepAnaliticoDeudaPublica.aspx.vb +++ b/AC/RepAnaliticoDeudaPublica.aspx.vb @@ -41,7 +41,7 @@ Partial Class AC_RepAnaliticoDeudaPublica TxtFechaInicio.Text = String.Format("01/01/{0}", UsuarioActual.Empresa.EjercicioActual) CalendarioInicio.StartDate = TxtFechaInicio.Text.ToDate - TxtFechaFin.Text = String.Format("{0}/{1}/{2}", Now.Day, Now.Month, UsuarioActual.Empresa.EjercicioActual) + TxtFechaFin.Text = String.Format("{0}/{1}/{2}", NowADS().Day, NowADS().Month, UsuarioActual.Empresa.EjercicioActual) CalendarioFin.EndDate = String.Format("31/12/{0}", UsuarioActual.Empresa.EjercicioActual).ToDate CargaDatos() @@ -198,7 +198,7 @@ Partial Class AC_RepAnaliticoDeudaPublica 'End Sub Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click - 'Gv.ExportToExcel("Estado analitico" & Now.ToShortDateString) + 'Gv.ExportToExcel("Estado analitico" & NowADS().ToShortDateString) If Not IsNothing(DtDatos) Then ImprimirReporte("Excel") 'Descarga reporte en Excel Else diff --git a/AC/RepCambiosSituacionFinanciera.aspx.vb b/AC/RepCambiosSituacionFinanciera.aspx.vb index 6c99e45b4..f10b440bf 100644 --- a/AC/RepCambiosSituacionFinanciera.aspx.vb +++ b/AC/RepCambiosSituacionFinanciera.aspx.vb @@ -126,8 +126,8 @@ Partial Class AC_RepCambiosSituacionFinanciera If Not Page.IsPostBack Then If UsuarioActual.Empresa.UsaAC Then - 'TxtFechaDel.Text = DateSerial(Year(Now), Month(Now), 1).ToShortDateString - 'TxtFechaAl.Text = Date.Now.ToShortDateString + 'TxtFechaDel.Text = DateSerial(Year(NowADS()), Month(NowADS()), 1).ToShortDateString + 'TxtFechaAl.Text = NowADS().ToShortDateString CargaDatos() diff --git a/AC/RepEstadoActividades.aspx.vb b/AC/RepEstadoActividades.aspx.vb index 133e0a7ca..422effe40 100644 --- a/AC/RepEstadoActividades.aspx.vb +++ b/AC/RepEstadoActividades.aspx.vb @@ -93,8 +93,8 @@ Partial Class AC_RepEstadoActividades TotalActual = 0 TotalAnterior = 0 - 'TxtFechaInicio.Text = DateSerial(Year(Date.Now), 1, 1).ToShortDateString - 'TxtFechaFin.Text = Date.Now.ToShortDateString + 'TxtFechaInicio.Text = DateSerial(Year(NowADS()), 1, 1).ToShortDateString + 'TxtFechaFin.Text = NowADS().ToShortDateString CargaEjercicios() CargaDatos() @@ -113,7 +113,7 @@ Partial Class AC_RepEstadoActividades DdlEjercicio.DataBind() DdlEjercicio.SelectedValueExist(UsuarioActual.Empresa.EjercicioActual.ToString) - DdlPeriodo.SelectedValue = Now.Month.ToString + DdlPeriodo.SelectedValue = NowADS().Month.ToString End Sub Private Sub CargaDatos() diff --git a/AC/RepEstadoAnaliticoActivo.aspx.vb b/AC/RepEstadoAnaliticoActivo.aspx.vb index 2b9a5ba46..4a9fe7704 100644 --- a/AC/RepEstadoAnaliticoActivo.aspx.vb +++ b/AC/RepEstadoAnaliticoActivo.aspx.vb @@ -100,7 +100,7 @@ Partial Class AC_RepEstadoAnaliticoActivo End Sub Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click - 'GvDatos.ExportToExcel("Estado analitico" & Now.ToShortDateString) + 'GvDatos.ExportToExcel("Estado analitico" & NowADS().ToShortDateString) ImprimirReporte("Excel") 'Descarga reporte en Excel End Sub diff --git a/AC/RepFlujoEfectivo.aspx.vb b/AC/RepFlujoEfectivo.aspx.vb index a99f8baa6..cf1f90278 100644 --- a/AC/RepFlujoEfectivo.aspx.vb +++ b/AC/RepFlujoEfectivo.aspx.vb @@ -53,8 +53,8 @@ Partial Class AC_RepFlujoEfectivo If Not Page.IsPostBack Then If UsuarioActual.Empresa.UsaAC Then - TxtFechaDel.Text = DateSerial(Year(Now), Month(Now), 1).ToShortDateString - TxtFechaAl.Text = Date.Now.ToShortDateString + TxtFechaDel.Text = DateSerial(Year(NowADS()), Month(NowADS()), 1).ToShortDateString + TxtFechaAl.Text = NowADS().ToShortDateString CargaDatos() @@ -70,8 +70,8 @@ Partial Class AC_RepFlujoEfectivo Private Sub CargaDatos() Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) - Dim FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate) - Dim FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate) + Dim FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate) + Dim FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate) FechaAl = TxtFechaAl.Text If ObjConta.GetFlujoEfectivo(FechaInicio, FechaFin, DdlUnidad.SelectedValue.ToEntero) Then DtDatos = ObjConta.DtResultados @@ -220,7 +220,7 @@ Partial Class AC_RepFlujoEfectivo 'End Sub Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click - 'GvDatos.ExportToExcel("ReporteFlujoEfectivo" & Now.ToShortDateString) + 'GvDatos.ExportToExcel("ReporteFlujoEfectivo" & NowADS().ToShortDateString) If Not IsNothing(DtDatos) Then ImprimirReporte("Excel") Else diff --git a/AC/RepIngresos.aspx.vb.exclude b/AC/RepIngresos.aspx.vb.exclude index ecd9d3da3..fbeeabe13 100644 --- a/AC/RepIngresos.aspx.vb.exclude +++ b/AC/RepIngresos.aspx.vb.exclude @@ -20,7 +20,7 @@ Partial Class AC_RepIngresos Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load If Not Page.IsPostBack Then - TxtFechaCorte.Text = Date.Now.ToShortDateString + TxtFechaCorte.Text = NowADS().ToShortDateString CargaDatos() End If diff --git a/AC/RepPresupuestoEgresos.aspx.vb b/AC/RepPresupuestoEgresos.aspx.vb index 152d498b5..b6f02b05d 100644 --- a/AC/RepPresupuestoEgresos.aspx.vb +++ b/AC/RepPresupuestoEgresos.aspx.vb @@ -30,7 +30,7 @@ Partial Class AC_RepPresupuestoEgresos Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load If Not Page.IsPostBack Then - txtFechaF.Text = Now.ToShortDateString + txtFechaF.Text = NowADS().ToShortDateString CargaCombos() End If End Sub @@ -82,10 +82,10 @@ Partial Class AC_RepPresupuestoEgresos UPFiltros.Update() End Sub Private Sub LimitaFechaCorte() - If DdlEjercicio.SelectedValue.ToEntero = Year(Now) Then - Calendario2.EndDate = Now - RVFechaFinal.MaximumValue = Now.ToShortDateString - txtFechaF.Text = Now.ToShortDateString + If DdlEjercicio.SelectedValue.ToEntero = Year(NowADS()) Then + Calendario2.EndDate = NowADS() + RVFechaFinal.MaximumValue = NowADS().ToShortDateString + txtFechaF.Text = NowADS().ToShortDateString Else Calendario2.EndDate = String.Format("31/12/{0}", DdlEjercicio.SelectedValue.ToEntero).ToDate RVFechaFinal.MaximumValue = String.Format("31/12/{0}", DdlEjercicio.SelectedValue.ToEntero) @@ -183,13 +183,13 @@ Partial Class AC_RepPresupuestoEgresos If e.Row.DBCampo("Ejercido").ToDecimal > e.Row.DBCampo("Devengado").ToDecimal Then e.Row.FCHyperLink("HLEjercido").ForeColor = Drawing.Color.Red If e.Row.DBCampo("Pagado").ToDecimal > e.Row.DBCampo("Ejercido").ToDecimal Then e.Row.FCHyperLink("HLPagado").ForeColor = Drawing.Color.Red - e.Row.FCHyperLink("HLComprometido").NavigateUrl = String.Format("/AC/RepPresupuestoEgresosDetalle.aspx?MM=1&PO={0}&FF={1}&TG={2}&UA={3}&C={4}&COG={5}&FeI={6}&FeF={7}&Ej={8}", e.Row.DBCampo("CveProgramaOperativo").ToEntero, e.Row.DBCampo("CveFuenteFinanciamiento").ToEntero, e.Row.DBCampo("CveTipoGasto").ToEntero, e.Row.DBCampo("CveUnidadAdministrativa").ToEntero, e.Row.DBCampo("CveClasificacion").ToEntero, e.Row.DBCampo("CodigoOG").ToEntero, String.Format("01/01/{0}", DdlEjercicio.SelectedItem.Text), If(txtFechaF.Text <> "", txtFechaF.Text, Date.Now.ToString("dd/MM/yyyy")), DdlEjercicio.SelectedValue) + e.Row.FCHyperLink("HLComprometido").NavigateUrl = String.Format("/AC/RepPresupuestoEgresosDetalle.aspx?MM=1&PO={0}&FF={1}&TG={2}&UA={3}&C={4}&COG={5}&FeI={6}&FeF={7}&Ej={8}", e.Row.DBCampo("CveProgramaOperativo").ToEntero, e.Row.DBCampo("CveFuenteFinanciamiento").ToEntero, e.Row.DBCampo("CveTipoGasto").ToEntero, e.Row.DBCampo("CveUnidadAdministrativa").ToEntero, e.Row.DBCampo("CveClasificacion").ToEntero, e.Row.DBCampo("CodigoOG").ToEntero, String.Format("01/01/{0}", DdlEjercicio.SelectedItem.Text), If(txtFechaF.Text <> "", txtFechaF.Text, NowADS().ToString("dd/MM/yyyy")), DdlEjercicio.SelectedValue) e.Row.FCHyperLink("HLComprometido").CssClass = "Texto" - e.Row.FCHyperLink("HLDevengado").NavigateUrl = String.Format("/AC/RepPresupuestoEgresosDetalle.aspx?MM=2&PO={0}&FF={1}&TG={2}&UA={3}&C={4}&COG={5}&FeI={6}&FeF={7}&Ej={8}", e.Row.DBCampo("CveProgramaOperativo").ToEntero, e.Row.DBCampo("CveFuenteFinanciamiento").ToEntero, e.Row.DBCampo("CveTipoGasto").ToEntero, e.Row.DBCampo("CveUnidadAdministrativa").ToEntero, e.Row.DBCampo("CveClasificacion").ToEntero, e.Row.DBCampo("CodigoOG").ToEntero, String.Format("01/01/{0}", DdlEjercicio.SelectedItem.Text), If(txtFechaF.Text <> "", txtFechaF.Text, Date.Now.ToString("dd/MM/yyyy")), DdlEjercicio.SelectedValue) + e.Row.FCHyperLink("HLDevengado").NavigateUrl = String.Format("/AC/RepPresupuestoEgresosDetalle.aspx?MM=2&PO={0}&FF={1}&TG={2}&UA={3}&C={4}&COG={5}&FeI={6}&FeF={7}&Ej={8}", e.Row.DBCampo("CveProgramaOperativo").ToEntero, e.Row.DBCampo("CveFuenteFinanciamiento").ToEntero, e.Row.DBCampo("CveTipoGasto").ToEntero, e.Row.DBCampo("CveUnidadAdministrativa").ToEntero, e.Row.DBCampo("CveClasificacion").ToEntero, e.Row.DBCampo("CodigoOG").ToEntero, String.Format("01/01/{0}", DdlEjercicio.SelectedItem.Text), If(txtFechaF.Text <> "", txtFechaF.Text, NowADS().ToString("dd/MM/yyyy")), DdlEjercicio.SelectedValue) e.Row.FCHyperLink("HLDevengado").CssClass = "Texto" - e.Row.FCHyperLink("HLEjercido").NavigateUrl = String.Format("/AC/RepPresupuestoEgresosDetalle.aspx?MM=3&PO={0}&FF={1}&TG={2}&UA={3}&C={4}&COG={5}&FeI={6}&FeF={7}&Ej={8}", e.Row.DBCampo("CveProgramaOperativo").ToEntero, e.Row.DBCampo("CveFuenteFinanciamiento").ToEntero, e.Row.DBCampo("CveTipoGasto").ToEntero, e.Row.DBCampo("CveUnidadAdministrativa").ToEntero, e.Row.DBCampo("CveClasificacion").ToEntero, e.Row.DBCampo("CodigoOG").ToEntero, String.Format("01/01/{0}", DdlEjercicio.SelectedItem.Text), If(txtFechaF.Text <> "", txtFechaF.Text, Date.Now.ToString("dd/MM/yyyy")), DdlEjercicio.SelectedValue) + e.Row.FCHyperLink("HLEjercido").NavigateUrl = String.Format("/AC/RepPresupuestoEgresosDetalle.aspx?MM=3&PO={0}&FF={1}&TG={2}&UA={3}&C={4}&COG={5}&FeI={6}&FeF={7}&Ej={8}", e.Row.DBCampo("CveProgramaOperativo").ToEntero, e.Row.DBCampo("CveFuenteFinanciamiento").ToEntero, e.Row.DBCampo("CveTipoGasto").ToEntero, e.Row.DBCampo("CveUnidadAdministrativa").ToEntero, e.Row.DBCampo("CveClasificacion").ToEntero, e.Row.DBCampo("CodigoOG").ToEntero, String.Format("01/01/{0}", DdlEjercicio.SelectedItem.Text), If(txtFechaF.Text <> "", txtFechaF.Text, NowADS().ToString("dd/MM/yyyy")), DdlEjercicio.SelectedValue) e.Row.FCHyperLink("HLEjercido").CssClass = "Texto" - e.Row.FCHyperLink("HLPagado").NavigateUrl = String.Format("/AC/RepPresupuestoEgresosDetalle.aspx?MM=4&PO={0}&FF={1}&TG={2}&UA={3}&C={4}&COG={5}&FeI={6}&FeF={7}&Ej={8}", e.Row.DBCampo("CveProgramaOperativo").ToEntero, e.Row.DBCampo("CveFuenteFinanciamiento").ToEntero, e.Row.DBCampo("CveTipoGasto").ToEntero, e.Row.DBCampo("CveUnidadAdministrativa").ToEntero, e.Row.DBCampo("CveClasificacion").ToEntero, e.Row.DBCampo("CodigoOG").ToEntero, String.Format("01/01/{0}", DdlEjercicio.SelectedItem.Text), If(txtFechaF.Text <> "", txtFechaF.Text, Date.Now.ToString("dd/MM/yyyy")), DdlEjercicio.SelectedValue) + e.Row.FCHyperLink("HLPagado").NavigateUrl = String.Format("/AC/RepPresupuestoEgresosDetalle.aspx?MM=4&PO={0}&FF={1}&TG={2}&UA={3}&C={4}&COG={5}&FeI={6}&FeF={7}&Ej={8}", e.Row.DBCampo("CveProgramaOperativo").ToEntero, e.Row.DBCampo("CveFuenteFinanciamiento").ToEntero, e.Row.DBCampo("CveTipoGasto").ToEntero, e.Row.DBCampo("CveUnidadAdministrativa").ToEntero, e.Row.DBCampo("CveClasificacion").ToEntero, e.Row.DBCampo("CodigoOG").ToEntero, String.Format("01/01/{0}", DdlEjercicio.SelectedItem.Text), If(txtFechaF.Text <> "", txtFechaF.Text, NowADS().ToString("dd/MM/yyyy")), DdlEjercicio.SelectedValue) e.Row.FCHyperLink("HLPagado").CssClass = "Texto" 'End If 'End If diff --git a/AC/RepPresupuestoEgresosDetalle.aspx.vb b/AC/RepPresupuestoEgresosDetalle.aspx.vb index b6d7f0f3c..16502b52d 100644 --- a/AC/RepPresupuestoEgresosDetalle.aspx.vb +++ b/AC/RepPresupuestoEgresosDetalle.aspx.vb @@ -112,8 +112,8 @@ Partial Class AC_RepPresupuestoEgresosDetalle params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png") params.Add(New ReportParameter("Img", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) - params.Add(New ReportParameter("Fecha", Now.ToString("dd/MM/yyyy"))) - ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/RepPresupuestosEgresos.rdlc", DtDatos, params, $"Rep.PresupuestosEgresos - {Now.ToShortDateString}", Formato:=Formato) + params.Add(New ReportParameter("Fecha", NowADS().ToString("dd/MM/yyyy"))) + ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/RepPresupuestosEgresos.rdlc", DtDatos, params, $"Rep.PresupuestosEgresos - {NowADS().ToShortDateString}", Formato:=Formato) End Sub Private Sub HplDownPDF_Click(sender As Object, e As EventArgs) Handles HplDownPDF.Click diff --git a/AC/RepPresupuestoIngresos.aspx.vb b/AC/RepPresupuestoIngresos.aspx.vb index 51798f725..973cb0685 100644 --- a/AC/RepPresupuestoIngresos.aspx.vb +++ b/AC/RepPresupuestoIngresos.aspx.vb @@ -49,7 +49,7 @@ Partial Class AC_RepPresupuestoIngresos End If DdlEjercicio.DataBind() DdlEjercicio.SelectedValue = UsuarioActual.Empresa.EjercicioActual.ToString - txtFechaF.Text = Now.ToShortDateString + txtFechaF.Text = NowADS().ToShortDateString CargaDatos() End If End Sub @@ -118,23 +118,23 @@ Partial Class AC_RepPresupuestoIngresos 'e.Row.FCHyperLink("HLRecaudado").Visible = False Else - e.Row.FCHyperLink("HLEstimado").NavigateUrl = String.Format("/AC/RepPresupuestoIngresosDetalle.aspx?MM=1&FR={0}&RI={1}&FeI={2}&FeF={3}&Ej={4}", e.Row.DBCampo("CveFuenteRecaudacion").ToEntero, e.Row.DBCampo("CveRubroIngreso").ToEntero, String.Format("01/01/{0}", DdlEjercicio.SelectedItem.Text), If(txtFechaF.Text <> "", txtFechaF.Text, Date.Now.ToString("dd/MM/yyyy")), DdlEjercicio.SelectedValue) + e.Row.FCHyperLink("HLEstimado").NavigateUrl = String.Format("/AC/RepPresupuestoIngresosDetalle.aspx?MM=1&FR={0}&RI={1}&FeI={2}&FeF={3}&Ej={4}", e.Row.DBCampo("CveFuenteRecaudacion").ToEntero, e.Row.DBCampo("CveRubroIngreso").ToEntero, String.Format("01/01/{0}", DdlEjercicio.SelectedItem.Text), If(txtFechaF.Text <> "", txtFechaF.Text, NowADS().ToString("dd/MM/yyyy")), DdlEjercicio.SelectedValue) e.Row.FCHyperLink("HLEstimado").CssClass = "Texto" - e.Row.FCHyperLink("HLModificado").NavigateUrl = String.Format("/AC/RepPresupuestoIngresosDetalle.aspx?MM=2&FR={0}&RI={1}&FeI={2}&FeF={3}&Ej={4}", e.Row.DBCampo("CveFuenteRecaudacion").ToEntero, e.Row.DBCampo("CveRubroIngreso").ToEntero, String.Format("01/01/{0}", DdlEjercicio.SelectedItem.Text), If(txtFechaF.Text <> "", txtFechaF.Text, Date.Now.ToString("dd/MM/yyyy")), DdlEjercicio.SelectedValue) + e.Row.FCHyperLink("HLModificado").NavigateUrl = String.Format("/AC/RepPresupuestoIngresosDetalle.aspx?MM=2&FR={0}&RI={1}&FeI={2}&FeF={3}&Ej={4}", e.Row.DBCampo("CveFuenteRecaudacion").ToEntero, e.Row.DBCampo("CveRubroIngreso").ToEntero, String.Format("01/01/{0}", DdlEjercicio.SelectedItem.Text), If(txtFechaF.Text <> "", txtFechaF.Text, NowADS().ToString("dd/MM/yyyy")), DdlEjercicio.SelectedValue) e.Row.FCHyperLink("HLModificado").CssClass = "Texto" - e.Row.FCHyperLink("HLDevengado").NavigateUrl = String.Format("/AC/RepPresupuestoIngresosDetalle.aspx?MM=3&FR={0}&RI={1}&FeI={2}&FeF={3}&Ej={4}", e.Row.DBCampo("CveFuenteRecaudacion").ToEntero, e.Row.DBCampo("CveRubroIngreso").ToEntero, String.Format("01/01/{0}", DdlEjercicio.SelectedItem.Text), If(txtFechaF.Text <> "", txtFechaF.Text, Date.Now.ToString("dd/MM/yyyy")), DdlEjercicio.SelectedValue) + e.Row.FCHyperLink("HLDevengado").NavigateUrl = String.Format("/AC/RepPresupuestoIngresosDetalle.aspx?MM=3&FR={0}&RI={1}&FeI={2}&FeF={3}&Ej={4}", e.Row.DBCampo("CveFuenteRecaudacion").ToEntero, e.Row.DBCampo("CveRubroIngreso").ToEntero, String.Format("01/01/{0}", DdlEjercicio.SelectedItem.Text), If(txtFechaF.Text <> "", txtFechaF.Text, NowADS().ToString("dd/MM/yyyy")), DdlEjercicio.SelectedValue) e.Row.FCHyperLink("HLDevengado").CssClass = "Texto" - e.Row.FCHyperLink("HLRecaudado").NavigateUrl = String.Format("/AC/RepPresupuestoIngresosDetalle.aspx?MM=4&FR={0}&RI={1}&FeI={2}&FeF={3}&Ej={4}", e.Row.DBCampo("CveFuenteRecaudacion").ToEntero, e.Row.DBCampo("CveRubroIngreso").ToEntero, String.Format("01/01/{0}", DdlEjercicio.SelectedItem.Text), If(txtFechaF.Text <> "", txtFechaF.Text, Date.Now.ToString("dd/MM/yyyy")), DdlEjercicio.SelectedValue) + e.Row.FCHyperLink("HLRecaudado").NavigateUrl = String.Format("/AC/RepPresupuestoIngresosDetalle.aspx?MM=4&FR={0}&RI={1}&FeI={2}&FeF={3}&Ej={4}", e.Row.DBCampo("CveFuenteRecaudacion").ToEntero, e.Row.DBCampo("CveRubroIngreso").ToEntero, String.Format("01/01/{0}", DdlEjercicio.SelectedItem.Text), If(txtFechaF.Text <> "", txtFechaF.Text, NowADS().ToString("dd/MM/yyyy")), DdlEjercicio.SelectedValue) e.Row.FCHyperLink("HLRecaudado").CssClass = "Texto" - 'e.Row.FCHyperLink("HLEstimado").NavigateUrl = String.Format("/AC/RepPresupuestoIngresosDetalle.aspx?MM=1&FR={0}&RI={1}&FeI={2}&FeF={3}&Ej={4}", e.Row.DBCampo("CveFuenteRecaudacion").ToEntero, e.Row.DBCampo("CveRubroIngreso").ToEntero, String.Format("01/01/{0}", DdlEjercicio.SelectedItem.Text), If(txtFechaF.Text <> "", txtFechaF.Text, Date.Now.ToString("dd/MM/yyyy")), DdlEjercicio.SelectedValue) + 'e.Row.FCHyperLink("HLEstimado").NavigateUrl = String.Format("/AC/RepPresupuestoIngresosDetalle.aspx?MM=1&FR={0}&RI={1}&FeI={2}&FeF={3}&Ej={4}", e.Row.DBCampo("CveFuenteRecaudacion").ToEntero, e.Row.DBCampo("CveRubroIngreso").ToEntero, String.Format("01/01/{0}", DdlEjercicio.SelectedItem.Text), If(txtFechaF.Text <> "", txtFechaF.Text, NowADS().ToString("dd/MM/yyyy")), DdlEjercicio.SelectedValue) 'e.Row.FCHyperLink("HLEstimado").CssClass = "Texto" - 'e.Row.FCHyperLink("HLModificado").NavigateUrl = String.Format("/AC/RepPresupuestoIngresosDetalle.aspx?MM=2&FR={0}&RI={1}&FeI={2}&FeF={3}&Ej={4}", e.Row.DBCampo("CveFuenteRecaudacion").ToEntero, e.Row.DBCampo("CveRubroIngreso").ToEntero, String.Format("01/01/{0}", DdlEjercicio.SelectedItem.Text), If(txtFechaF.Text <> "", txtFechaF.Text, Date.Now.ToString("dd/MM/yyyy")), DdlEjercicio.SelectedValue) + 'e.Row.FCHyperLink("HLModificado").NavigateUrl = String.Format("/AC/RepPresupuestoIngresosDetalle.aspx?MM=2&FR={0}&RI={1}&FeI={2}&FeF={3}&Ej={4}", e.Row.DBCampo("CveFuenteRecaudacion").ToEntero, e.Row.DBCampo("CveRubroIngreso").ToEntero, String.Format("01/01/{0}", DdlEjercicio.SelectedItem.Text), If(txtFechaF.Text <> "", txtFechaF.Text, NowADS().ToString("dd/MM/yyyy")), DdlEjercicio.SelectedValue) 'e.Row.FCHyperLink("HLModificado").CssClass = "Texto" - 'e.Row.FCHyperLink("HLDevengado").NavigateUrl = String.Format("/AC/RepPresupuestoIngresosDetalle.aspx?MM=3&FR={0}&RI={1}&FeI={2}&FeF={3}&Ej={4}", e.Row.DBCampo("CveFuenteRecaudacion").ToEntero, e.Row.DBCampo("CveRubroIngreso").ToEntero, String.Format("01/01/{0}", DdlEjercicio.SelectedItem.Text), If(txtFechaF.Text <> "", txtFechaF.Text, Date.Now.ToString("dd/MM/yyyy")), DdlEjercicio.SelectedValue) + 'e.Row.FCHyperLink("HLDevengado").NavigateUrl = String.Format("/AC/RepPresupuestoIngresosDetalle.aspx?MM=3&FR={0}&RI={1}&FeI={2}&FeF={3}&Ej={4}", e.Row.DBCampo("CveFuenteRecaudacion").ToEntero, e.Row.DBCampo("CveRubroIngreso").ToEntero, String.Format("01/01/{0}", DdlEjercicio.SelectedItem.Text), If(txtFechaF.Text <> "", txtFechaF.Text, NowADS().ToString("dd/MM/yyyy")), DdlEjercicio.SelectedValue) 'e.Row.FCHyperLink("HLDevengado").CssClass = "Texto" - 'e.Row.FCHyperLink("HLRecaudado").NavigateUrl = String.Format("/AC/RepPresupuestoIngresosDetalle.aspx?MM=4&FR={0}&RI={1}&FeI={2}&FeF={3}&Ej={4}", e.Row.DBCampo("CveFuenteRecaudacion").ToEntero, e.Row.DBCampo("CveRubroIngreso").ToEntero, String.Format("01/01/{0}", DdlEjercicio.SelectedItem.Text), If(txtFechaF.Text <> "", txtFechaF.Text, Date.Now.ToString("dd/MM/yyyy")), DdlEjercicio.SelectedValue) + 'e.Row.FCHyperLink("HLRecaudado").NavigateUrl = String.Format("/AC/RepPresupuestoIngresosDetalle.aspx?MM=4&FR={0}&RI={1}&FeI={2}&FeF={3}&Ej={4}", e.Row.DBCampo("CveFuenteRecaudacion").ToEntero, e.Row.DBCampo("CveRubroIngreso").ToEntero, String.Format("01/01/{0}", DdlEjercicio.SelectedItem.Text), If(txtFechaF.Text <> "", txtFechaF.Text, NowADS().ToString("dd/MM/yyyy")), DdlEjercicio.SelectedValue) 'e.Row.FCHyperLink("HLRecaudado").CssClass = "Texto" End If diff --git a/AC/RepSituacionFinanciera.aspx.vb b/AC/RepSituacionFinanciera.aspx.vb index e4b336d2d..8a1a83a5d 100644 --- a/AC/RepSituacionFinanciera.aspx.vb +++ b/AC/RepSituacionFinanciera.aspx.vb @@ -153,8 +153,8 @@ Partial Class AC_SituacionFinanciera TotalPasivoPatrimonioActual = 0 TotalPasivoPatrimonioAnterior = 0 - 'TxtFechaInicio.Text = DateSerial(Year(Date.Now), 1, 1).ToShortDateString - 'TxtFechaFin.Text = Date.Now.ToShortDateString + 'TxtFechaInicio.Text = DateSerial(Year(NowADS()), 1, 1).ToShortDateString + 'TxtFechaFin.Text = NowADS().ToShortDateString CargaEjercicios() @@ -175,7 +175,7 @@ Partial Class AC_SituacionFinanciera DdlEjercicio.DataBind() DdlEjercicio.SelectedValueExist(UsuarioActual.Empresa.EjercicioActual.ToString) - DdlPeriodo.SelectedValue = Now.Month.ToString + DdlPeriodo.SelectedValue = NowADS().Month.ToString End Sub Private Sub CargaDatos() diff --git a/AC/RepVariacionHaciendaPublica.aspx.vb b/AC/RepVariacionHaciendaPublica.aspx.vb index b314e0dee..f005d156c 100644 --- a/AC/RepVariacionHaciendaPublica.aspx.vb +++ b/AC/RepVariacionHaciendaPublica.aspx.vb @@ -71,8 +71,8 @@ Partial Class AC_RepVariacionHaciendaPublica If Not Page.IsPostBack Then If UsuarioActual.Empresa.UsaAC Then - TxtFechaDel.Text = DateSerial(Year(Now), Month(Now), 1).ToShortDateString - TxtFechaAl.Text = Date.Now.ToShortDateString + TxtFechaDel.Text = DateSerial(Year(NowADS()), Month(NowADS()), 1).ToShortDateString + TxtFechaAl.Text = NowADS().ToShortDateString CargaDatos() @@ -88,8 +88,8 @@ Partial Class AC_RepVariacionHaciendaPublica Private Sub CargaDatos() Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) - Dim FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate) - Dim FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate) + Dim FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate) + Dim FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate) FechaDel = TxtFechaDel.Text FechaAl = TxtFechaAl.Text @@ -366,7 +366,7 @@ Partial Class AC_RepVariacionHaciendaPublica 'End Sub Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click - 'GvDatos.ExportToExcel("123456" & Now.ToShortDateString) + 'GvDatos.ExportToExcel("123456" & NowADS().ToShortDateString) If Not IsNothing(DtDatos) Then ImprimirReporte("Excel") 'Descarga reporte en Excel Else diff --git a/AF/AF.aspx.vb b/AF/AF.aspx.vb index 2ad4f8085..ab530b603 100644 --- a/AF/AF.aspx.vb +++ b/AF/AF.aspx.vb @@ -402,7 +402,7 @@ Partial Class AF_AF 'Configuración de Modalidad Insert ImgAddObs.Visible = False - LblFechaCaptura.Text = Now.ToShortDateString() + LblFechaCaptura.Text = NowADS().ToShortDateString() LblUsuarioCapturo.Text = UsuarioActual.Usuario BtnEliminar.Visible = False @@ -484,17 +484,17 @@ Partial Class AF_AF GVOrdenesdeServicio.DataBind() End Sub Private Sub CargaFechaGPS() - TxtFechaIH.Text = $"01/{DateTime.Now.ToString("MM")}/{DateTime.Now.Year} 00:00" - TxtFechaFH.Text = $"{DateTime.Now.ToString("dd/MM/yyyy")} 23:59" + TxtFechaIH.Text = $"01/{NowADS().ToString("MM")}/{NowADS().Year} 00:00" + TxtFechaFH.Text = $"{NowADS().ToString("dd/MM/yyyy")} 23:59" - TxtFechaIC.Text = $"01/{DateTime.Now.ToString("MM")}/{DateTime.Now.Year} 00:00" - TxtFechaFC.Text = $"{DateTime.Now.ToString("dd/MM/yyyy")} 23:59" + TxtFechaIC.Text = $"01/{NowADS().ToString("MM")}/{NowADS().Year} 00:00" + TxtFechaFC.Text = $"{NowADS().ToString("dd/MM/yyyy")} 23:59" - TxtFechaID.Text = $"01/{DateTime.Now.ToString("MM")}/{DateTime.Now.Year} 00:00" - TxtFechaFD.Text = $"{DateTime.Now.ToString("dd/MM/yyyy")} 23:59" + TxtFechaID.Text = $"01/{NowADS().ToString("MM")}/{NowADS().Year} 00:00" + TxtFechaFD.Text = $"{NowADS().ToString("dd/MM/yyyy")} 23:59" - TxtFechaIG.Text = $"01/{DateTime.Now.ToString("MM")}/{DateTime.Now.Year} 00:00" - TxtFechaFG.Text = $"{DateTime.Now.ToString("dd/MM/yyyy")} 23:59" + TxtFechaIG.Text = $"01/{NowADS().ToString("MM")}/{NowADS().Year} 00:00" + TxtFechaFG.Text = $"{NowADS().ToString("dd/MM/yyyy")} 23:59" End Sub Private Sub InicializaValores() @@ -2380,7 +2380,7 @@ Partial Class AF_AF Dim NewName As String For Each FileItem As Archivo In FilesGral Dim Retorno As Boolean = False - NewName = DateTime.Now.Ticks.ToString + NewName = NowADS().Ticks.ToString Dim ObjActivosFijos As New ClsAF Try FileMove = FileItem.filename @@ -2477,7 +2477,7 @@ Partial Class AF_AF If AFInvCvePS > 0 AndAlso AFInvCveAlmacen > 0 Then Dim CveUMInv = GlobalDTPS(CveEmpresaActual, CvePS:=AFInvCvePS).FiltroPrimeroValor("CveUM").ToEntero If CveUMInv > 0 Then - CveMovimientoSalidaInv = ObjInventarios.AddMovimiento(AFInvCveAlmacen, 3, 1, Now, -1, UsuarioActual.CveUsuario, CveEmpresaActual, -1, -1, -1, -1, Observaciones:=$"Salida de inventario para Activo Fijo | {TxtCodigo.Text.Trim}", Modulo:="AF1") + CveMovimientoSalidaInv = ObjInventarios.AddMovimiento(AFInvCveAlmacen, 3, 1, NowADS(), -1, UsuarioActual.CveUsuario, CveEmpresaActual, -1, -1, -1, -1, Observaciones:=$"Salida de inventario para Activo Fijo | {TxtCodigo.Text.Trim}", Modulo:="AF1") If Not ObjInventarios.AddMovimientoDetalle(CveMovimientoSalidaInv, 1, CveUMInv, AFInvCvePS, 0, -1, Serie:=AFInvSerie, CveSeccionAlmacen:=AFInvCveSeccionAlmacen) Then ErrorGuardar = True End If @@ -2578,7 +2578,7 @@ Partial Class AF_AF 'PREPOLIZA DE IMPORTACION DESDE ALMACEN If AFInvCvePS > 0 AndAlso AFInvCveAlmacen > 0 Then If Not ErrorGuardar Then - Dim CvePrePoliza As Integer = ObjContabilidad.AddPrePolizas("AF/ImportadoInv", 4, TxtValorCompra.Text.ToDouble, TxtValorCompra.Text.ToDouble, 1, Now, $"AF importado de Almacén {TxtCodigo.Text.Trim}", UsuarioActual.CveUsuario, CveEmpresaActual) + Dim CvePrePoliza As Integer = ObjContabilidad.AddPrePolizas("AF/ImportadoInv", 4, TxtValorCompra.Text.ToDouble, TxtValorCompra.Text.ToDouble, 1, NowADS(), $"AF importado de Almacén {TxtCodigo.Text.Trim}", UsuarioActual.CveUsuario, CveEmpresaActual) If ObjContabilidad.AddPrePolizasDetalle(CvePrePoliza, False, TxtValorCompra.Text.ToDecimal, TxtValorCompra.Text.ToDecimal, 49, $"{TxtCodigo.Text.Trim} - {TxtDescripcion.Text.Trim}", $"{TxtCodigo.Text.Trim} - {TxtDescripcion.Text.Trim}", CveActivoFijo:=CveActivoFijo) Then If Not ErrorGuardar Then If Not ObjContabilidad.AddPrePolizasDetalle(CvePrePoliza, True, TxtValorCompra.Text.ToDecimal, TxtValorCompra.Text.ToDecimal, 68, TxtCodigo.Text.Trim, TxtCodigo.Text.Trim, CveMovimientoAlmacen:=CveMovimientoSalidaInv) Then @@ -3534,12 +3534,12 @@ Partial Class AF_AF Dim ObjInventario As New ClsInventarios - Dim Existencia = ObjInventario.GetExistenciasPS(DdlAFInvPS.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa, DdlAFInvAlmacen.SelectedValue.ToEntero, CveSeccionAlmacen:=CveSeccionAlmacen, FechaMovto:=Now.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Serie:=AFInvSerie) + Dim Existencia = ObjInventario.GetExistenciasPS(DdlAFInvPS.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa, DdlAFInvAlmacen.SelectedValue.ToEntero, CveSeccionAlmacen:=CveSeccionAlmacen, FechaMovto:=NowADS().ToDateTime.ToString("yyyy/MM/dd HH:mm"), Serie:=AFInvSerie) Dim Costo As Decimal = 0 If Inv_CveMetodoInventario = 5 Then Costo = ObjInventario.GetCostoPSSerie(DdlAFInvPS.SelectedValue.ToEntero, AFInvSerie, DdlAFInvAlmacen.SelectedValue.ToEntero, CveEmpresaActual) Else - Costo = ObjInventario.GetCostoPS(DdlAFInvPS.SelectedValue.ToEntero, 1, DdlAFInvAlmacen.SelectedValue.ToEntero, AFInvSerie, Now) + Costo = ObjInventario.GetCostoPS(DdlAFInvPS.SelectedValue.ToEntero, 1, DdlAFInvAlmacen.SelectedValue.ToEntero, AFInvSerie, NowADS()) End If ObjInventario.Dispose() @@ -3557,7 +3557,7 @@ Partial Class AF_AF TxtDescripcion.Text = DdlAFInvPS.SelectedText TxtValorCompra.Text = Costo.FormatoNumero - TxtFechaCompra.Text = Now.ToShortDateString + TxtFechaCompra.Text = NowADS().ToShortDateString TxtFechaBaja.Text = "" TxtNoSerie.Text = TxtAFInvSerie.Text.Trim diff --git a/AF/CatAF.aspx.vb b/AF/CatAF.aspx.vb index 94b9ed1d3..4a021ea00 100644 --- a/AF/CatAF.aspx.vb +++ b/AF/CatAF.aspx.vb @@ -65,7 +65,7 @@ Partial Class AF_CatAF Grupo = If(Request("GPO") IsNot Nothing AndAlso Request("GPO").ToEntero() > 0, Request("GPO").ToEntero(), -1).ToString.ToEntero CveAgrupador = If(Request("CveAgrupador") IsNot Nothing AndAlso Request("CveAgrupador").ToEntero() > 0, Request("CveAgrupador").ToEntero(), -1).ToEntero - If ObjAF.GetActivosFijos(-1, UsuarioActual.CveEmpresa, "-1", "-1", IfNull(CveTipoActivoFijo, "-1").ToString.ToEntero, IfNull(CveSubTipoActivoFijo, "-1").ToString.ToEntero, "-1", IfNull(Request("Anio"), Now.Year).ToString.ToEntero, + If ObjAF.GetActivosFijos(-1, UsuarioActual.CveEmpresa, "-1", "-1", IfNull(CveTipoActivoFijo, "-1").ToString.ToEntero, IfNull(CveSubTipoActivoFijo, "-1").ToString.ToEntero, "-1", IfNull(Request("Anio"), NowADS().Year).ToString.ToEntero, IfNull(CvePersonalResponsable, "-1").ToString.ToEntero, DdlProyecto.SelectedValue.ToEntero, IfNull(CveSubProyecto, "-1").ToString.ToEntero, IfNull(CveEstadoActivoFijo, "-1").ToString.ToEntero, "", -1) Then If ObjAF.DtResultados.Rows.Count > 0 Then DtActivosFijos = ObjAF.DtResultados @@ -462,7 +462,7 @@ Partial Class AF_CatAF Dim Ruta As String = "" 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("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) diff --git a/AF/OrdenTrabajoAsignacion.aspx.vb b/AF/OrdenTrabajoAsignacion.aspx.vb index 9bcbb867a..61ae296a4 100644 --- a/AF/OrdenTrabajoAsignacion.aspx.vb +++ b/AF/OrdenTrabajoAsignacion.aspx.vb @@ -50,7 +50,7 @@ Partial Class AF_OrdenTrabajoAsignacion CargaCombos() CargaDatos() - Dim FechaActual As Date = Now + Dim FechaActual As Date = NowADS() 'TxtFechaF.Text = $"{FechaActual.Day.ToString("00")}/{FechaActual.Month.ToString("00")}/{FechaActual.Year}" diff --git a/AF/RegistroRevision.aspx.vb b/AF/RegistroRevision.aspx.vb index a7d770ea2..77f0c4d52 100644 --- a/AF/RegistroRevision.aspx.vb +++ b/AF/RegistroRevision.aspx.vb @@ -67,7 +67,7 @@ Partial Class AF_RegistroRevision 'CargaDatos() - TxtFecha.Text = $"{Now.Day.ToString("00")}/{Now.Month.ToString("00")}/{Now.Year}" + TxtFecha.Text = $"{NowADS().Day.ToString("00")}/{NowADS().Month.ToString("00")}/{NowADS().Year}" End If End Sub @@ -253,7 +253,7 @@ Partial Class AF_RegistroRevision If Not ErrorProceso Then ObjAF.Commit() - ExportToExcelG(GvDatos, $"RegistroRevision{Now.ToString("yyyyMMddmmss")}", UsuarioActual, "ReporteRevision", 100, 100, filtros:=$"Filtros {LblSubProyecto.Text}: {DdlSubProyecto.SelectedItem.Text} Fecha: {TxtFecha.Text}") + ExportToExcelG(GvDatos, $"RegistroRevision{NowADS().ToString("yyyyMMddmmss")}", UsuarioActual, "ReporteRevision", 100, 100, filtros:=$"Filtros {LblSubProyecto.Text}: {DdlSubProyecto.SelectedItem.Text} Fecha: {TxtFecha.Text}") RegistraScript("$('#ModalDescargaReporte').modal({ backdrop: 'static', keyboard: false });") GvDatos.DataSource = Nothing GvDatos.DataBind() @@ -390,7 +390,7 @@ Partial Class AF_RegistroRevision worksheet.Rows(IndexEndTable + 1).Cells(0).Value = Usuario.Nombre worksheet.Rows(IndexEndTable).Cells(2).Value = "Fecha Impresión" - worksheet.Rows(IndexEndTable + 1).Cells(2).Value = DateTime.Now.ToString("dd/MM/yyyy") + worksheet.Rows(IndexEndTable + 1).Cells(2).Value = NowADS().ToString("dd/MM/yyyy") Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", Usuario.Empresa.Ruta)) @@ -420,7 +420,7 @@ Partial Class AF_RegistroRevision Response.ContentType = "application/force-download" - Response.AppendHeader("Content-Disposition", $"attachment;filename=RegistroRevision{Now.ToString("yyyyMMddmmss")}.xlsx") + Response.AppendHeader("Content-Disposition", $"attachment;filename=RegistroRevision{NowADS().ToString("yyyyMMddmmss")}.xlsx") Response.BinaryWrite(ReporteBytes) Response.End() diff --git a/AF/RepAF.aspx.vb b/AF/RepAF.aspx.vb index bd5d72b0f..f53192c02 100644 --- a/AF/RepAF.aspx.vb +++ b/AF/RepAF.aspx.vb @@ -330,7 +330,7 @@ Partial Class AF_RepAF 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("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) ImprimirPDF(String.Format("{0}Formatos\RepAF.rdlc", UsuarioActual.Empresa.Ruta), DtActivosFijos, params, "ReporteActivosFijos", Formato:=Formato) diff --git a/AF/RepDepreciacion.aspx.vb b/AF/RepDepreciacion.aspx.vb index 80935ed10..8196671a1 100644 --- a/AF/RepDepreciacion.aspx.vb +++ b/AF/RepDepreciacion.aspx.vb @@ -13,7 +13,7 @@ Partial Class AF_RepDepreciacion #End Region Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not Page.IsPostBack Then - txtFechaI.Text = DateTime.Now.AddMonths(1).AddDays(-1).ToString("dd/MM/yyyy") + txtFechaI.Text = NowADS().AddMonths(1).AddDays(-1).ToString("dd/MM/yyyy") End If End Sub diff --git a/AF/RepOrdenTrabajo.aspx.vb b/AF/RepOrdenTrabajo.aspx.vb index d4be6f652..9371d2886 100644 --- a/AF/RepOrdenTrabajo.aspx.vb +++ b/AF/RepOrdenTrabajo.aspx.vb @@ -50,7 +50,7 @@ Partial Class AF_RepOrdenTrabajo CargaCombos() CargaDatos() - Dim FechaActual As Date = Now + Dim FechaActual As Date = NowADS() 'TxtFechaF.Text = $"{FechaActual.Day.ToString("00")}/{FechaActual.Month.ToString("00")}/{FechaActual.Year}" diff --git a/AF/RepRevision.aspx.vb b/AF/RepRevision.aspx.vb index f96ebab1d..c5e5306a6 100644 --- a/AF/RepRevision.aspx.vb +++ b/AF/RepRevision.aspx.vb @@ -50,7 +50,7 @@ Partial Class AF_RepRevision CargaCombos() CargaDatos() - Dim FechaActual As Date = Now + Dim FechaActual As Date = NowADS() TxtFechaF.Text = $"{FechaActual.Day.ToString("00")}/{FechaActual.Month.ToString("00")}/{FechaActual.Year}" diff --git a/AF/ResguardoAF.aspx.vb b/AF/ResguardoAF.aspx.vb index 03ab0ce02..5da763414 100644 --- a/AF/ResguardoAF.aspx.vb +++ b/AF/ResguardoAF.aspx.vb @@ -69,7 +69,7 @@ Partial Class AF_ResguardoAF CveResguardoPadre = -1 CargaDTResguardos() 'RESGUARDO - TxtFecha.Text = Now.ToShortDateString + TxtFecha.Text = NowADS().ToShortDateString CargaAFResguardos() DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa) DdlSubProyecto.DataBind() @@ -85,7 +85,7 @@ Partial Class AF_ResguardoAF 'TRASPASO - TxtFechaT.Text = Now.ToShortDateString + TxtFechaT.Text = NowADS().ToShortDateString CargaAFResguardosTraslado() DdlSubProyectoT.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa) DdlSubProyectoT.DataBind() @@ -110,7 +110,7 @@ Partial Class AF_ResguardoAF DdlSubProyectoRTA.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa) DdlSubProyectoRTA.DataBind() DdlSubProyectoRTA.Items.Insert(0, New ListItem("Seleccione", "-1")) - TxtFechaR.Text = Now.ToShortDateString + TxtFechaR.Text = NowADS().ToShortDateString 'LIBERACION @@ -123,7 +123,7 @@ Partial Class AF_ResguardoAF DdlSubProyectoL.DataBind() DdlSubProyectoL.Items.Insert(0, New ListItem("Seleccione", "-1")) - TxtFechaRecepcion.Text = Now.ToShortDateString + TxtFechaRecepcion.Text = NowADS().ToShortDateString DdlPersonalR.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa).FiltraParametros("", "NombreCompleto") @@ -253,7 +253,7 @@ Partial Class AF_ResguardoAF TxtObservacionesR.Text = "" TxtObservacionesRecepcion.Text = "" TxtObservacionesT.Text = "" - TxtFecha.Text = Now.ToShortDateString + TxtFecha.Text = NowADS().ToShortDateString End Sub #End Region @@ -331,7 +331,7 @@ Partial Class AF_ResguardoAF DdlSubProyectoT.SelectedValue = "-1" DdlResponsableT.SelectedValue = "-1" TxtObservacionesT.Text = "" - TxtFechaT.Text = Now.ToShortDateString + TxtFechaT.Text = NowADS().ToShortDateString UPTraslado.Update() End Sub #End Region @@ -419,7 +419,7 @@ Partial Class AF_ResguardoAF Private Sub LimpiaRT() GvAFTR.DataBind() TxtObservacionesR.Text = "" - TxtFechaR.Text = Now.ToShortDateString + TxtFechaR.Text = NowADS().ToShortDateString DdlPersonalRT.SelectedValue = "-1" TxtFolioT.Text = "" DdlSubProyectoRT.SelectedValue = "-1" @@ -507,7 +507,7 @@ Partial Class AF_ResguardoAF Private Sub LimpiaRecepcion() GvRecepcion.DataBind() TxtObservacionesRecepcion.Text = "" - TxtFechaRecepcion.Text = Now.ToShortDateString + TxtFechaRecepcion.Text = NowADS().ToShortDateString DdlPersonalR.SelectedValue = "-1" DdlSubProyectoRL.SelectedValue = "-1" TxtFolioRL.Text = "" diff --git a/AF/TipoOrdenTrabajo.aspx.vb b/AF/TipoOrdenTrabajo.aspx.vb index ee6e23080..aa2110249 100644 --- a/AF/TipoOrdenTrabajo.aspx.vb +++ b/AF/TipoOrdenTrabajo.aspx.vb @@ -449,7 +449,7 @@ Partial Class AF_TipoOrdenTrabajo ' worksheet.Rows(IndexEndTable + 1).Cells(0).Value = Usuario.Nombre ' worksheet.Rows(IndexEndTable).Cells(2).Value = "Fecha Impresión" - ' worksheet.Rows(IndexEndTable + 1).Cells(2).Value = DateTime.Now.ToString("dd/MM/yyyy") + ' worksheet.Rows(IndexEndTable + 1).Cells(2).Value = NowADS().ToString("dd/MM/yyyy") ' Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", Usuario.Empresa.Ruta)) @@ -479,7 +479,7 @@ Partial Class AF_TipoOrdenTrabajo ' Response.ContentType = "application/force-download" - ' Response.AppendHeader("Content-Disposition", $"attachment;filename=RegistroRevision{Now.ToString("yyyyMMddmmss")}.xlsx") + ' Response.AppendHeader("Content-Disposition", $"attachment;filename=RegistroRevision{NowADS().ToString("yyyyMMddmmss")}.xlsx") ' Response.BinaryWrite(ReporteBytes) ' Response.End() diff --git a/AF/ValesCombustible.aspx.vb b/AF/ValesCombustible.aspx.vb index c95960131..acb86af4e 100644 --- a/AF/ValesCombustible.aspx.vb +++ b/AF/ValesCombustible.aspx.vb @@ -22,7 +22,7 @@ Partial Class AF_ValesCombustible CargarCombos() CargaFolios() - TxtFechaVale.Text = DateTime.Now.ToShortDateString + TxtFechaVale.Text = NowADS().ToShortDateString BtnActualizar.Visible = False 'BtnAplicar.Visible = False diff --git a/AIMMGM/ConsultaCliente.aspx.vb b/AIMMGM/ConsultaCliente.aspx.vb index 1264906e2..41a244b30 100644 --- a/AIMMGM/ConsultaCliente.aspx.vb +++ b/AIMMGM/ConsultaCliente.aspx.vb @@ -49,7 +49,7 @@ Partial Class AIMMGM_ConsultaCliente Session("FileUpload") = "" ViewState("Orden") = "" ViewState("ONombre") = "Nombre DESC" - TxtFecha.Text = Now.ToShortDateString + TxtFecha.Text = NowADS().ToShortDateString If Request("CveCliente") IsNot Nothing Then CveCliente = Request("CveCliente").ToString.ToEntero() @@ -266,7 +266,7 @@ Partial Class AIMMGM_ConsultaCliente Venta.UpdateVentas(dr("SubTotal").ToString.ToDouble - Total, 0, 0, dr("SubTotal").ToString.ToDouble - Total, 1, 1, dr("Fecha").ToString.ToDate, "", 43, CveVenta, "Rem") Alert("El Registro ha sido eliminado", TipoMensaje.MsgInformacion) If MovimientosVentas.ToEntero = 1 Then 'se cancela la venta en su totalidad - Venta.UpdateEstatusFactura(4, "", "", Now, CveVenta) + Venta.UpdateEstatusFactura(4, "", "", NowADS(), CveVenta) End If Venta.Commit() @@ -473,10 +473,10 @@ Partial Class AIMMGM_ConsultaCliente ' Dim EsVistaPrevia As Boolean = True - ' xlsxFileOut = String.Format("Format{0}-{1}.xlsx", Opcion, Now.Ticks) + ' xlsxFileOut = String.Format("Format{0}-{1}.xlsx", Opcion, NowADS().Ticks) ' 'Exportar PDF - ' pdfFileOut = String.Format("Format{0}-{1}.pdf", Opcion, Now.Ticks) + ' pdfFileOut = String.Format("Format{0}-{1}.pdf", Opcion, NowADS().Ticks) ' Dim outputFileName As Object = Ruta & xlsxFileOut ' If IO.File.Exists(Ruta & "FormatoAIMMGM33.xlsx") Then @@ -758,7 +758,7 @@ Partial Class AIMMGM_ConsultaCliente Dim Liga As String = "http://aimmgm.adsistemas.mx/AIMMGM/Portal.aspx" - Dim LigaActivar As String = Liga & "?p=" & Extensiones.Encripta("CveU=" & CveUsr & "&Clave=" & CveCliente & "&Opcion=Activar&Hora=" & DateTime.Now.Ticks) + Dim LigaActivar As String = Liga & "?p=" & Extensiones.Encripta("CveU=" & CveUsr & "&Clave=" & CveCliente & "&Opcion=Activar&Hora=" & NowADS().Ticks) Dim strSQL As New StringBuilder strSQL.Append(" ") diff --git a/AIMMGM/Pagos.aspx.vb b/AIMMGM/Pagos.aspx.vb index 24ccdebfd..d6ea495af 100644 --- a/AIMMGM/Pagos.aspx.vb +++ b/AIMMGM/Pagos.aspx.vb @@ -130,7 +130,7 @@ Partial Class AIMMGM_Pagos Dim dt As DataTable If AIM.GetPagos(DdlCliente.SelectedValue.ToEntero, 2) Then dt = AIM.DtResultados.FiltraParametros("Facturado = 0 and RequiereFactura = 1") - ' GvE.Caption = String.Format("
{0}
", Now.ToLongDateString) + ' GvE.Caption = String.Format("
{0}
", NowADS().ToLongDateString) GvE.CaptionAlign = TableCaptionAlign.Left GvE.DataSource = dt GvE.DataBind() diff --git a/AIMMGM/PopRegistro.aspx.vb b/AIMMGM/PopRegistro.aspx.vb index 6e590e2cf..34d29a09b 100644 --- a/AIMMGM/PopRegistro.aspx.vb +++ b/AIMMGM/PopRegistro.aspx.vb @@ -72,7 +72,7 @@ Partial Class AIMMGM_Registro For Each dr As DataRow In dtExcursiones.Rows Dim AIM As New ClsAIMMGM - If AIM.RepVentasPS(1, -1, -1, -1, "01/01/2014".ToDate, Now, 43) Then + If AIM.RepVentasPS(1, -1, -1, -1, "01/01/2014".ToDate, NowADS(), 43) Then Contador = AIM.DtResultados.COUNT("CvePS", "CvePS = " & dr("CvePS").ToString) If Contador >= 20 Then dr("CvePS") = 0 @@ -299,7 +299,7 @@ Partial Class AIMMGM_Registro If System.Web.HttpContext.Current IsNot Nothing AndAlso System.Web.HttpContext.Current.Handler IsNot Nothing Then Dim Img, Botones As String Dim Titulo As String - Dim Plus As String = DateTime.Now.Ticks.ToString + Dim Plus As String = NowADS().Ticks.ToString Mensaje = Mensaje.Replace("'"c, "\'") JSBtnAceptar = JSBtnAceptar.Replace("'"c, "\'") @@ -335,8 +335,8 @@ Partial Class AIMMGM_Registro Dim Pag As Page = DirectCast(System.Web.HttpContext.Current.Handler, Page) - 'ScriptManager.RegisterStartupScript(Pag, Pag.GetType(), (DateTime.Now.Ticks + 1).ToString(), "MuestraAlert('" & Alerta.ToString() & "', '" & Plus & "');", True) - ScriptManager.RegisterStartupScript(Pag, Pag.GetType(), (DateTime.Now.Ticks + 1).ToString(), String.Format("MuestraAlerta('{0}','{1}','{2}','{3}','{4}');", Titulo, Mensaje, Img, Botones, JSBtnAceptar), True) + 'ScriptManager.RegisterStartupScript(Pag, Pag.GetType(), (NowADS().Ticks + 1).ToString(), "MuestraAlert('" & Alerta.ToString() & "', '" & Plus & "');", True) + ScriptManager.RegisterStartupScript(Pag, Pag.GetType(), (NowADS().Ticks + 1).ToString(), String.Format("MuestraAlerta('{0}','{1}','{2}','{3}','{4}');", Titulo, Mensaje, Img, Botones, JSBtnAceptar), True) Pag = Nothing Catch ex As Exception @@ -420,7 +420,7 @@ Partial Class AIMMGM_Registro Dim tnombre As String Dim TieneExcursion As Boolean = False 'DdlFiscalMetodoPago.SelectedValue.ToEntero1, - If Venta.AddVenta("Rem", 0, CveCliente, 2069, TmpDT.SUM("Total"), 0, 0, 0, 0, 0, TmpDT.SUM("Total"), 1, 0, CveMetodoPago, 0, 0, Now, "", "", 0, Now, -1, -1, "", "", "", 0, 0, 0, 0, DateTime.MinValue, DateTime.MinValue, DateTime.MinValue, -1, -1, 0, 1, 0, 2069, 43) Then + If Venta.AddVenta("Rem", 0, CveCliente, 2069, TmpDT.SUM("Total"), 0, 0, 0, 0, 0, TmpDT.SUM("Total"), 1, 0, CveMetodoPago, 0, 0, NowADS(), "", "", 0, NowADS(), -1, -1, "", "", "", 0, 0, 0, 0, DateTime.MinValue, DateTime.MinValue, DateTime.MinValue, -1, -1, 0, 1, 0, 2069, 43) Then Dim CveVenta As Integer = Venta.CveVenta For Each dr As DataRow In TmpDT.Rows Dim CveUnidadMedida As Integer @@ -555,7 +555,7 @@ Partial Class AIMMGM_Registro Dim Liga As String = "http://aimmgm.adsistemas.mx/AIMMGM/Portal.aspx" - Dim LigaActivar As String = Liga & "?p=" & Encripta("CveU=" & CveUsr & "&Clave=" & CveCliente & "&Opcion=Activar&Hora=" & DateTime.Now.Ticks) + Dim LigaActivar As String = Liga & "?p=" & Encripta("CveU=" & CveUsr & "&Clave=" & CveCliente & "&Opcion=Activar&Hora=" & NowADS().Ticks) Dim strSQL As New StringBuilder strSQL.Append(" ") diff --git a/AIMMGM/Registro.aspx.vb b/AIMMGM/Registro.aspx.vb index f103fa711..1783c2cbe 100644 --- a/AIMMGM/Registro.aspx.vb +++ b/AIMMGM/Registro.aspx.vb @@ -96,7 +96,7 @@ Partial Class AIMMGM_Registro For Each dr As DataRow In dtExcursiones.Rows Dim AIM As New ClsAIMMGM - If AIM.RepVentasPS(1, -1, -1, -1, "01/01/2014".ToDate, Now, 43) Then + If AIM.RepVentasPS(1, -1, -1, -1, "01/01/2014".ToDate, NowADS(), 43) Then Contador = AIM.DtResultados.COUNT("CvePS", "CvePS = " & dr("CvePS").ToString) If Contador >= 20 Then dr("CvePS") = 0 @@ -387,7 +387,7 @@ Partial Class AIMMGM_Registro If System.Web.HttpContext.Current IsNot Nothing AndAlso System.Web.HttpContext.Current.Handler IsNot Nothing Then Dim Img, Botones As String Dim Titulo As String - Dim Plus As String = DateTime.Now.Ticks.ToString + Dim Plus As String = NowADS().Ticks.ToString Mensaje = Mensaje.Replace("'"c, "\'") JSBtnAceptar = JSBtnAceptar.Replace("'"c, "\'") @@ -423,8 +423,8 @@ Partial Class AIMMGM_Registro Dim Pag As Page = DirectCast(System.Web.HttpContext.Current.Handler, Page) - 'ScriptManager.RegisterStartupScript(Pag, Pag.GetType(), (DateTime.Now.Ticks + 1).ToString(), "MuestraAlert('" & Alerta.ToString() & "', '" & Plus & "');", True) - ScriptManager.RegisterStartupScript(Pag, Pag.GetType(), (DateTime.Now.Ticks + 1).ToString(), String.Format("MuestraAlerta('{0}','{1}','{2}','{3}','{4}');", Titulo, Mensaje, Img, Botones, JSBtnAceptar), True) + 'ScriptManager.RegisterStartupScript(Pag, Pag.GetType(), (NowADS().Ticks + 1).ToString(), "MuestraAlert('" & Alerta.ToString() & "', '" & Plus & "');", True) + ScriptManager.RegisterStartupScript(Pag, Pag.GetType(), (NowADS().Ticks + 1).ToString(), String.Format("MuestraAlerta('{0}','{1}','{2}','{3}','{4}');", Titulo, Mensaje, Img, Botones, JSBtnAceptar), True) Pag = Nothing Catch ex As Exception @@ -597,7 +597,7 @@ Partial Class AIMMGM_Registro Dim tnombre As String Dim TieneExcursion As Boolean = False - If Venta.AddVenta("Rem", 0, CveCliente, 2069, TmpDT.SUM("Total"), 0, 0, 0, 0, 0, TmpDT.SUM("Total"), 1, 0, DdlFiscalMetodoPago.SelectedValue.ToEntero, 0, 0, Now, "", "", 0, Now, -1, -1, "", "", "", 0, 0, 0, 0, DateTime.MinValue, DateTime.MinValue, DateTime.MinValue, -1, -1, 0, 0, 1, 2069, 43) Then + If Venta.AddVenta("Rem", 0, CveCliente, 2069, TmpDT.SUM("Total"), 0, 0, 0, 0, 0, TmpDT.SUM("Total"), 1, 0, DdlFiscalMetodoPago.SelectedValue.ToEntero, 0, 0, NowADS(), "", "", 0, NowADS(), -1, -1, "", "", "", 0, 0, 0, 0, DateTime.MinValue, DateTime.MinValue, DateTime.MinValue, -1, -1, 0, 0, 1, 2069, 43) Then Dim CveVenta As Integer = Venta.CveVenta For Each dr As DataRow In TmpDT.Rows Dim CveUnidadMedida As Integer @@ -715,7 +715,7 @@ Partial Class AIMMGM_Registro Dim tnombre As String Dim TieneExcursion As Boolean = False - If Venta.AddVenta("Rem", 0, CveCliente, 2069, TmpDT.SUM("Total"), 0, 0, 0, 0, 0, TmpDT.SUM("Total"), 1, 0, DdlFiscalMetodoPago.SelectedValue.ToEntero, 0, 0, Now, "", "", 0, Now, -1, -1, "", "", "", 0, 0, 0, 0, DateTime.MinValue, DateTime.MinValue, DateTime.MinValue, -1, -1, 0, 1, 0, 2069, 43) Then + If Venta.AddVenta("Rem", 0, CveCliente, 2069, TmpDT.SUM("Total"), 0, 0, 0, 0, 0, TmpDT.SUM("Total"), 1, 0, DdlFiscalMetodoPago.SelectedValue.ToEntero, 0, 0, NowADS(), "", "", 0, NowADS(), -1, -1, "", "", "", 0, 0, 0, 0, DateTime.MinValue, DateTime.MinValue, DateTime.MinValue, -1, -1, 0, 1, 0, 2069, 43) Then Dim CveVenta As Integer = Venta.CveVenta For Each dr As DataRow In TmpDT.Rows Dim CveUnidadMedida As Integer @@ -745,7 +745,7 @@ Partial Class AIMMGM_Registro If Not Errorr Then - If AIM.AddPago(CveCliente, Venta.CveVentaDetalle, dr("Total").ToString.ToDouble, 1, Now, "", "Pago en terminal", TxtNumeroAsesor.Text.Trim.ToEntero, TxtNumeroAprobacion.Text.Trim.ToEntero) <= 0 Then + If AIM.AddPago(CveCliente, Venta.CveVentaDetalle, dr("Total").ToString.ToDouble, 1, NowADS(), "", "Pago en terminal", TxtNumeroAsesor.Text.Trim.ToEntero, TxtNumeroAprobacion.Text.Trim.ToEntero) <= 0 Then Errorr = True End If @@ -853,7 +853,7 @@ Partial Class AIMMGM_Registro Dim Liga As String = "http://aimmgm.adsistemas.mx/AIMMGM/Portal.aspx" - Dim LigaActivar As String = Liga & "?p=" & Encripta("CveU=" & CveUsr & "&Clave=" & CveCliente & "&Opcion=Activar&Hora=" & DateTime.Now.Ticks) + Dim LigaActivar As String = Liga & "?p=" & Encripta("CveU=" & CveUsr & "&Clave=" & CveCliente & "&Opcion=Activar&Hora=" & NowADS().Ticks) Dim strSQL As New StringBuilder strSQL.Append(" ") @@ -1062,7 +1062,7 @@ Partial Class AIMMGM_Registro Cliente.Dispose() End If - Dim ClavePago As String = String.Format("{0}-{1}", CveCliente, Now.Ticks) + Dim ClavePago As String = String.Format("{0}-{1}", CveCliente, NowADS().Ticks) 'actualizo la clavedel cliente en todos los registros @@ -1079,8 +1079,8 @@ Partial Class AIMMGM_Registro myNameValueCollection.Add("ref", CveCliente.ToString) myNameValueCollection.Add("imp", TmpDT.SUM("Total").ToString) '".01" myNameValueCollection.Add("ema", TxtEmail.Text.Trim) - myNameValueCollection.Add("urlOk", String.Format("http://aimmgm.adsistemas.mx/AIMMGM/ePagos.aspx?p={0}", Encripta(String.Format("Cve={0}&F={1}&CveCliente={2}&P=1", ClavePago, Now, CveCliente)))) - myNameValueCollection.Add("urlKo", String.Format("http://aimmgm.adsistemas.mx/AIMMGM/ePagos.aspx?p={0}", Encripta(String.Format("Cve={0}&F={1}&CveCliente={2}&NP=1", ClavePago, Now, CveCliente)))) + myNameValueCollection.Add("urlOk", String.Format("http://aimmgm.adsistemas.mx/AIMMGM/ePagos.aspx?p={0}", Encripta(String.Format("Cve={0}&F={1}&CveCliente={2}&P=1", ClavePago, NowADS(), CveCliente)))) + myNameValueCollection.Add("urlKo", String.Format("http://aimmgm.adsistemas.mx/AIMMGM/ePagos.aspx?p={0}", Encripta(String.Format("Cve={0}&F={1}&CveCliente={2}&NP=1", ClavePago, NowADS(), CveCliente)))) myNameValueCollection.Add("autoBack", "1") myNameValueCollection.Add("datbloq", "1") @@ -1096,8 +1096,8 @@ Partial Class AIMMGM_Registro 'If Request.Form("__VIEWSTATE_KEY") IsNot Nothing Then Cache.Remove(Request.Form("__VIEWSTATE_KEY")) 'elimino la cachado anteriormente - Dim VSKey As String = String.Format("VIEWSTATE_{0}_{1}_{2}", Session.SessionID, Request.Path, Date.Now.Ticks) - Cache.Add(VSKey, pviewState, Nothing, Date.Now.AddMinutes(60), Cache.NoSlidingExpiration, CacheItemPriority.Default, Nothing) 'Store the ViewState on Cache + Dim VSKey As String = String.Format("VIEWSTATE_{0}_{1}_{2}", Session.SessionID, Request.Path, NowADS().Ticks) + Cache.Add(VSKey, pviewState, Nothing, NowADS().AddMinutes(60), Cache.NoSlidingExpiration, CacheItemPriority.Default, Nothing) 'Store the ViewState on Cache ClientScript.RegisterHiddenField("__VIEWSTATE_KEY", VSKey) End Sub diff --git a/AIMMGM/VentasPS.aspx.vb b/AIMMGM/VentasPS.aspx.vb index 7211c69b9..125350b66 100644 --- a/AIMMGM/VentasPS.aspx.vb +++ b/AIMMGM/VentasPS.aspx.vb @@ -10,8 +10,8 @@ Partial Class AIMMGM_Ventas Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load If Not Page.IsPostBack Then - txtFechaI.Text = "01/01/" & Now.Year - txtFechaF.Text = Now.ToShortDateString + txtFechaI.Text = "01/01/" & NowADS().Year + txtFechaF.Text = NowADS().ToShortDateString Dim dt As DataTable diff --git a/AIMMGM/ePagos.aspx.vb b/AIMMGM/ePagos.aspx.vb index 1e498a877..31874f43c 100644 --- a/AIMMGM/ePagos.aspx.vb +++ b/AIMMGM/ePagos.aspx.vb @@ -64,7 +64,7 @@ Partial Class AIMMGM_ePagos Dim Fecha As String = ClsPaginas.UrlParametros("F").ToString - If Fecha.ToDate > Now.AddHours(-1) AndAlso ClsPaginas.UrlParametros("P") IsNot Nothing AndAlso ClsPaginas.UrlParametros("P").ToString = "1" Then + If Fecha.ToDate > NowADS().AddHours(-1) AndAlso ClsPaginas.UrlParametros("P") IsNot Nothing AndAlso ClsPaginas.UrlParametros("P").ToString = "1" Then ClavePago = ClsPaginas.UrlParametros("CVE").ToString CargaCompra() @@ -124,7 +124,7 @@ Partial Class AIMMGM_ePagos Dim tnombre As String Dim TieneExcursion As Boolean = False - If Venta.AddVenta("Rem", 0, CveCliente, 2069, TmpDT.SUM("Total"), 0, 0, 0, 0, 0, TmpDT.SUM("Total"), 1, 0, CveMetodoPago, 0, 0, Now, "", "", -1, Now, -1, -1, "", "", "", 0, 0, 0, 0, DateTime.MinValue, DateTime.MinValue, DateTime.MinValue, -1, -1, 0, 1, 0, 2069, 43) Then + If Venta.AddVenta("Rem", 0, CveCliente, 2069, TmpDT.SUM("Total"), 0, 0, 0, 0, 0, TmpDT.SUM("Total"), 1, 0, CveMetodoPago, 0, 0, NowADS(), "", "", -1, NowADS(), -1, -1, "", "", "", 0, 0, 0, 0, DateTime.MinValue, DateTime.MinValue, DateTime.MinValue, -1, -1, 0, 1, 0, 2069, 43) Then Dim CveVenta As Integer = Venta.CveVenta For Each dr As DataRow In TmpDT.Rows Dim CveUnidadMedida As Integer @@ -154,7 +154,7 @@ Partial Class AIMMGM_ePagos Next If Not Errorr Then - If AIM.AddPago(CveCliente, -1, TmpDT.SUM("Total"), 1, Now, "", "Pago en línea", 0, 0) <= 0 Then + If AIM.AddPago(CveCliente, -1, TmpDT.SUM("Total"), 1, NowADS(), "", "Pago en línea", 0, 0) <= 0 Then Errorr = True End If If Not Errorr Then @@ -199,7 +199,7 @@ Partial Class AIMMGM_ePagos If System.Web.HttpContext.Current IsNot Nothing AndAlso System.Web.HttpContext.Current.Handler IsNot Nothing Then Dim Img, Botones As String Dim Titulo As String - Dim Plus As String = DateTime.Now.Ticks.ToString + Dim Plus As String = NowADS().Ticks.ToString Mensaje = Mensaje.Replace("'"c, "\'") JSBtnAceptar = JSBtnAceptar.Replace("'"c, "\'") @@ -235,8 +235,8 @@ Partial Class AIMMGM_ePagos Dim Pag As Page = DirectCast(System.Web.HttpContext.Current.Handler, Page) - 'ScriptManager.RegisterStartupScript(Pag, Pag.GetType(), (DateTime.Now.Ticks + 1).ToString(), "MuestraAlert('" & Alerta.ToString() & "', '" & Plus & "');", True) - ScriptManager.RegisterStartupScript(Pag, Pag.GetType(), (DateTime.Now.Ticks + 1).ToString(), String.Format("MuestraAlerta('{0}','{1}','{2}','{3}','{4}');", Titulo, Mensaje, Img, Botones, JSBtnAceptar), True) + 'ScriptManager.RegisterStartupScript(Pag, Pag.GetType(), (NowADS().Ticks + 1).ToString(), "MuestraAlert('" & Alerta.ToString() & "', '" & Plus & "');", True) + ScriptManager.RegisterStartupScript(Pag, Pag.GetType(), (NowADS().Ticks + 1).ToString(), String.Format("MuestraAlerta('{0}','{1}','{2}','{3}','{4}');", Titulo, Mensaje, Img, Botones, JSBtnAceptar), True) Pag = Nothing Catch ex As Exception @@ -312,7 +312,7 @@ Partial Class AIMMGM_ePagos Dim Liga As String = "http://aimmgm.adsistemas.mx/AIMMGM/Portal.aspx" - Dim LigaActivar As String = Liga & "?p=" & Encripta("CveU=" & CveUsr & "&Clave=" & CveCliente & "&Opcion=Activar&Hora=" & DateTime.Now.Ticks) + Dim LigaActivar As String = Liga & "?p=" & Encripta("CveU=" & CveUsr & "&Clave=" & CveCliente & "&Opcion=Activar&Hora=" & NowADS().Ticks) Dim strSQL As New StringBuilder strSQL.Append(" ") diff --git a/Acarreos/AcarreosConcluidos.aspx.vb b/Acarreos/AcarreosConcluidos.aspx.vb index 90a0d30f7..0770ad579 100644 --- a/Acarreos/AcarreosConcluidos.aspx.vb +++ b/Acarreos/AcarreosConcluidos.aspx.vb @@ -13,8 +13,8 @@ Partial Class Acarreos_AcarreosAutoConciliacion CargaDdlTransportista() CargaDdlMaterial() CargaDdlNumContrato() - txtFechaF.Text = Now.AddDays(0).ToShortDateString - txtFechaI.Text = Now.AddYears(-1).ToShortDateString + txtFechaF.Text = NowADS().AddDays(0).ToShortDateString + txtFechaI.Text = NowADS().AddYears(-1).ToShortDateString BtnAgregarAcarreoConcluido.Text = "Vincular" End If End Sub diff --git a/Acarreos/AcarreosPreEstimacion.aspx.vb b/Acarreos/AcarreosPreEstimacion.aspx.vb index 6e76fc51e..8c9f9be4b 100644 --- a/Acarreos/AcarreosPreEstimacion.aspx.vb +++ b/Acarreos/AcarreosPreEstimacion.aspx.vb @@ -14,7 +14,7 @@ Partial Class Acarreos_AcarreosPreEstimacion DdlTransportista.DataBind() DdlMaterial.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlMaterial.DataBind() - TxtFechaPreEstimacion.Text = Now.AddDays(0).ToShortDateString + TxtFechaPreEstimacion.Text = NowADS().AddDays(0).ToShortDateString BtnAgregarPreEstimacion.Text = "Pre-Estimar" CargaDdlNumContrato() End If @@ -65,7 +65,7 @@ Partial Class Acarreos_AcarreosPreEstimacion DdlMaterial.DataBind() CargaDdlNumContrato() TxtNumPreEstimacion.Text = "" - TxtFechaPreEstimacion.Text = Now.AddDays(0).ToShortDateString + TxtFechaPreEstimacion.Text = NowADS().AddDays(0).ToShortDateString GvPreEstimacion.DataSource = Nothing GvPreEstimacion.DataBind() Else diff --git a/Acarreos/RegistroAcarreo.aspx.vb b/Acarreos/RegistroAcarreo.aspx.vb index ec3533883..d3a4f625c 100644 --- a/Acarreos/RegistroAcarreo.aspx.vb +++ b/Acarreos/RegistroAcarreo.aspx.vb @@ -145,7 +145,7 @@ Partial Class Acarreos_EditarAcarreo DdlChofer.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlMaterial.Items.Insert(0, New ListItem("Seleccione", "-1")) CargaDdlNumContrato() - TxtFecha.Text = Now.AddDays(0).ToShortDateString + TxtFecha.Text = NowADS().AddDays(0).ToShortDateString CargaDatos() divEstatus.Visible = False SetPermisos() @@ -325,7 +325,7 @@ Partial Class Acarreos_EditarAcarreo DdlTransportista.Items.Clear() RBDestino.Checked = False RBOrigen.Checked = False - TxtFecha.Text = Now.AddDays(0).ToShortDateString + TxtFecha.Text = NowADS().AddDays(0).ToShortDateString DdlNumContrato.SelectedIndex = -1 DdlTransportista.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlUnidad.Items.Insert(0, New ListItem("Seleccione", "-1")) diff --git a/Acarreos/RegistroContratosAcarreos.aspx.vb b/Acarreos/RegistroContratosAcarreos.aspx.vb index 8f4149a4e..661f28235 100644 --- a/Acarreos/RegistroContratosAcarreos.aspx.vb +++ b/Acarreos/RegistroContratosAcarreos.aspx.vb @@ -74,8 +74,8 @@ Partial Class Acarreos_ContratosAcarreos CargaDdlUnidadMedida() CreaTmpTarifas() CreaTmpMaterialVolumen() - TxtFechaInicio.Text = Now.AddDays(0).ToShortDateString - TxtFechaFin.Text = Now.AddDays(0).ToShortDateString + TxtFechaInicio.Text = NowADS().AddDays(0).ToShortDateString + TxtFechaFin.Text = NowADS().AddDays(0).ToShortDateString CargaDatos() End If End Sub @@ -303,8 +303,8 @@ Partial Class Acarreos_ContratosAcarreos TxtVolumenTipo.Text = "" TxtDescripcion.Text = "" TxtNumContrato.Text = "" - TxtFechaInicio.Text = Now.AddDays(0).ToShortDateString - TxtFechaFin.Text = Now.AddDays(0).ToShortDateString + TxtFechaInicio.Text = NowADS().AddDays(0).ToShortDateString + TxtFechaFin.Text = NowADS().AddDays(0).ToShortDateString DTTarifa.Rows.Clear() DTMaterialVolumen.Rows.Clear() GvTarifa.DataSource = Nothing diff --git a/Acarreos/RepAcarreos.aspx.vb b/Acarreos/RepAcarreos.aspx.vb index c530964bc..0e43a11d2 100644 --- a/Acarreos/RepAcarreos.aspx.vb +++ b/Acarreos/RepAcarreos.aspx.vb @@ -22,8 +22,8 @@ Partial Class Acarreos_RepAcarreos CargaDdlTransportista() CargaDdlMaterial() CargaDdlNumContrato() - txtFechaF.Text = Now.AddDays(0).ToShortDateString - txtFechaI.Text = Now.AddYears(-1).ToShortDateString + txtFechaF.Text = NowADS().AddDays(0).ToShortDateString + txtFechaI.Text = NowADS().AddYears(-1).ToShortDateString End If End Sub diff --git a/Acarreos/RepAcarreosDetalle.aspx.vb b/Acarreos/RepAcarreosDetalle.aspx.vb index b39288317..c62913d3e 100644 --- a/Acarreos/RepAcarreosDetalle.aspx.vb +++ b/Acarreos/RepAcarreosDetalle.aspx.vb @@ -24,8 +24,8 @@ Partial Class Acarreos_RepAcarreosDetalle Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not Page.IsPostBack Then - txtFechaF.Text = Now.AddDays(0).ToShortDateString - txtFechaI.Text = Now.AddYears(-1).ToShortDateString + txtFechaF.Text = NowADS().AddDays(0).ToShortDateString + txtFechaI.Text = NowADS().AddYears(-1).ToShortDateString CargaDdlChofer() CargaDdlSubProyectoOrigen() CargaDdlSubProyectoDestino() diff --git a/Acarreos/RepContratosAcarreos.aspx.vb b/Acarreos/RepContratosAcarreos.aspx.vb index 62f3b8812..6adf28707 100644 --- a/Acarreos/RepContratosAcarreos.aspx.vb +++ b/Acarreos/RepContratosAcarreos.aspx.vb @@ -27,8 +27,8 @@ Partial Class Acarreos_RepContratosAcarreos CargaDdlSubProyectoOrigen() CargaDdlTransportista() CargaDdlProveedor() - txtFechaF.Text = Now.AddDays(0).ToShortDateString - txtFechaI.Text = Now.AddYears(-1).ToShortDateString + txtFechaF.Text = NowADS().AddDays(0).ToShortDateString + txtFechaI.Text = NowADS().AddYears(-1).ToShortDateString End If End Sub @@ -154,14 +154,14 @@ Partial Class Acarreos_RepContratosAcarreos 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("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("Filtros", StrFiltro.ToString)) If Imagen.Exists Then params.Add(New ReportParameter("LogoPath", $"file://{Imagen}")) Else params.Add(New ReportParameter("LogoPath", "")) End If - ImprimirPDF("Empresas/Grales/Formatos/RepContratosAcarreos.rdlc", DTCont, params, String.Format("RepContratosAcarreos-{0}", Now.ToDateTime.ToShortDateString)) + ImprimirPDF("Empresas/Grales/Formatos/RepContratosAcarreos.rdlc", DTCont, params, String.Format("RepContratosAcarreos-{0}", NowADS().ToDateTime.ToShortDateString)) Else Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia) End If @@ -182,10 +182,10 @@ Partial Class Acarreos_RepContratosAcarreos 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("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("Filtros", StrFiltro.ToString)) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) - ImprimirPDF("Empresas/Grales/Formatos/RepContratosAcarreos.rdlc", DTCont, params, String.Format("RepContratosAcarreos-{0}", Now.ToDateTime.ToShortDateString), "Excel") + ImprimirPDF("Empresas/Grales/Formatos/RepContratosAcarreos.rdlc", DTCont, params, String.Format("RepContratosAcarreos-{0}", NowADS().ToDateTime.ToShortDateString), "Excel") Else Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia) End If diff --git a/Acarreos/RepContratosAcarreosDetalle.aspx.vb b/Acarreos/RepContratosAcarreosDetalle.aspx.vb index 3333d3de7..0c148923e 100644 --- a/Acarreos/RepContratosAcarreosDetalle.aspx.vb +++ b/Acarreos/RepContratosAcarreosDetalle.aspx.vb @@ -183,7 +183,7 @@ Partial Class Acarreos_RepContratosAcarreosDetalle 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("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("Contrato", LblContrato.Text)) params.Add(New ReportParameter("FechaInicio", LblFechaInicio.Text)) params.Add(New ReportParameter("FechaFin", LblFechaFin.Text)) @@ -205,7 +205,7 @@ Partial Class Acarreos_RepContratosAcarreosDetalle Else params.Add(New ReportParameter("LogoPath", "")) End If - ImprimirPDF("Empresas/Grales/Formatos/RepContratosAcarreosDetalle.rdlc", DTCont, params, String.Format("RepContratosAcarreosDetalle-{0}", Now.ToDateTime.ToShortDateString)) + ImprimirPDF("Empresas/Grales/Formatos/RepContratosAcarreosDetalle.rdlc", DTCont, params, String.Format("RepContratosAcarreosDetalle-{0}", NowADS().ToDateTime.ToShortDateString)) Else Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia) End If @@ -222,7 +222,7 @@ Partial Class Acarreos_RepContratosAcarreosDetalle 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("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("Contrato", LblContrato.Text)) params.Add(New ReportParameter("FechaInicio", LblFechaInicio.Text)) params.Add(New ReportParameter("FechaFin", LblFechaFin.Text)) @@ -240,7 +240,7 @@ Partial Class Acarreos_RepContratosAcarreosDetalle params.Add(New ReportParameter("VolF", LblVolFaltante.Text)) params.Add(New ReportParameter("PresF", LblPresFaltante.Text)) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) - ImprimirPDF("Empresas/Grales/Formatos/RepContratosAcarreosDetalle.rdlc", DTCont, params, String.Format("RepContratosAcarreosDetalle-{0}", Now.ToDateTime.ToShortDateString), "Excel") + ImprimirPDF("Empresas/Grales/Formatos/RepContratosAcarreosDetalle.rdlc", DTCont, params, String.Format("RepContratosAcarreosDetalle-{0}", NowADS().ToDateTime.ToShortDateString), "Excel") Else Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia) End If diff --git a/Acarreos/RepPreEstimacionDetalle.aspx.vb b/Acarreos/RepPreEstimacionDetalle.aspx.vb index f89d915fc..119866856 100644 --- a/Acarreos/RepPreEstimacionDetalle.aspx.vb +++ b/Acarreos/RepPreEstimacionDetalle.aspx.vb @@ -100,14 +100,14 @@ Partial Class Acarreos_RepPreEstimacionDetalle 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("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("Filtros", StrFiltro.ToString)) If Imagen.Exists Then params.Add(New ReportParameter("LogoPath", $"file://{Imagen}")) Else params.Add(New ReportParameter("LogoPath", "")) End If - ImprimirPDF("Empresas/Grales/Formatos/RepPreEstimacionDetalle.rdlc", DTCont, params, String.Format("RepPreEstimacionDetalle-{0}", Now.ToDateTime.ToShortDateString)) + ImprimirPDF("Empresas/Grales/Formatos/RepPreEstimacionDetalle.rdlc", DTCont, params, String.Format("RepPreEstimacionDetalle-{0}", NowADS().ToDateTime.ToShortDateString)) Else Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia) End If @@ -133,10 +133,10 @@ Partial Class Acarreos_RepPreEstimacionDetalle 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("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("Filtros", StrFiltro.ToString)) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) - ImprimirPDF("Empresas/Grales/Formatos/RepPreEstimacionDetalle.rdlc", DTCont, params, String.Format("RepPreEstimacionDetalle-{0}", Now.ToDateTime.ToShortDateString), "Excel") + ImprimirPDF("Empresas/Grales/Formatos/RepPreEstimacionDetalle.rdlc", DTCont, params, String.Format("RepPreEstimacionDetalle-{0}", NowADS().ToDateTime.ToShortDateString), "Excel") Else Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia) End If diff --git a/Acumuladores/EntradasUsadosResumenRep.aspx.vb b/Acumuladores/EntradasUsadosResumenRep.aspx.vb index ea3a27693..3a33a5241 100644 --- a/Acumuladores/EntradasUsadosResumenRep.aspx.vb +++ b/Acumuladores/EntradasUsadosResumenRep.aspx.vb @@ -35,11 +35,11 @@ Partial Class Acumuladores_RepEntradasUsados End Sub Protected Sub CargarCombos() - Dim fecha As Date = Date.Now.AddMonths(-1) + Dim fecha As Date = NowADS().AddMonths(-1) Dim Años As New ListItem Dim i As Integer If Cargado = 0 Then - For i = Date.Now.Year.ToEntero To (fecha.Year.ToEntero - 5) Step -1 + For i = NowADS().Year.ToEntero To (fecha.Year.ToEntero - 5) Step -1 Años = New ListItem(i.ToString, i.ToString) DdlAño.Items.Add(Años) Next @@ -85,7 +85,7 @@ Partial Class Acumuladores_RepEntradasUsados Dim params As New List(Of ReportParameter) params.Add(New ReportParameter("Direccion", Direccion)) - params.Add(New ReportParameter("FechaConFormato", Date.Now.ToString)) + params.Add(New ReportParameter("FechaConFormato", NowADS().ToString)) params.Add(New ReportParameter("FechaInicial", txtFechaI.Text)) params.Add(New ReportParameter("FechaFinal", txtFechaF.Text)) params.Add(New ReportParameter("Sucursal", "Sucursal")) diff --git a/Acumuladores/RepAcumuladoresVigencia.aspx.cs b/Acumuladores/RepAcumuladoresVigencia.aspx.cs index da9ed60da..aa1e08d0a 100644 --- a/Acumuladores/RepAcumuladoresVigencia.aspx.cs +++ b/Acumuladores/RepAcumuladoresVigencia.aspx.cs @@ -17,7 +17,7 @@ public partial class Acumuladores_RepAcumuladoresVigencia : ClsPaginas { if (Consultado) { - GvAcum.ExportToExcelG("RepAcumuladoresVigencia " + DateTime.Now.ToString("dd-MM-yyyy"), "Reporte de Vigencia de Acumuladores", UsuarioActual); + GvAcum.ExportToExcelG("RepAcumuladoresVigencia " + NowADS().ToString("dd-MM-yyyy"), "Reporte de Vigencia de Acumuladores", UsuarioActual); } else { @@ -53,8 +53,8 @@ public partial class Acumuladores_RepAcumuladoresVigencia : ClsPaginas { Consultado = false; CargaCombos(); - txtFechaI.Text = DateTime.Now.FirstDayOfMonth().AddMonths(-24).ToShortDateString(); - txtFechaF.Text = DateTime.Now.LastDayOfMonth().AddMonths(-6).ToShortDateString(); + txtFechaI.Text = NowADS().FirstDayOfMonth().AddMonths(-24).ToShortDateString(); + txtFechaF.Text = NowADS().LastDayOfMonth().AddMonths(-6).ToShortDateString(); UpFiltros.Update(); } diff --git a/Acumuladores/RepEntradasUsadosClientes.aspx.vb b/Acumuladores/RepEntradasUsadosClientes.aspx.vb index 6a89cc2c4..d77d1166b 100644 --- a/Acumuladores/RepEntradasUsadosClientes.aspx.vb +++ b/Acumuladores/RepEntradasUsadosClientes.aspx.vb @@ -36,8 +36,8 @@ Partial Class Acumuladores_RepEntradasUsadosClientes DdlAlmacen.DataBind() DdlAlmacen.Items.Insert(0, New ListItem("Todos", "-1")) - TxtFechaI.Text = Now.FirstDayOfMonth.ToShortDateString - TxtFechaF.text = now.toshortdatestring + TxtFechaI.Text = NowADS().FirstDayOfMonth.ToShortDateString + TxtFechaF.text = NowADS().toshortdatestring End Sub diff --git a/Acumuladores/RepIndicadorDiario.aspx.vb b/Acumuladores/RepIndicadorDiario.aspx.vb index 1e0fbc7ab..8b9358b27 100644 --- a/Acumuladores/RepIndicadorDiario.aspx.vb +++ b/Acumuladores/RepIndicadorDiario.aspx.vb @@ -63,8 +63,8 @@ Partial Class ACumuladores_RepIndicadorDiario Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not IsPostBack Then - txtFechaI.Text = Now.FirstDayOfMonth().ToString("dd/MM/yyyy") - txtFechaF.Text = Now.ToString("dd/MM/yyyy") + txtFechaI.Text = NowADS().FirstDayOfMonth().ToString("dd/MM/yyyy") + txtFechaF.Text = NowADS().ToString("dd/MM/yyyy") CargaCombos() @@ -119,7 +119,7 @@ Partial Class ACumuladores_RepIndicadorDiario If RblTipoCambio.SelectedValue.ToEntero = 3 Then Dim TipoCambio As Double LiEspecifico.Visible = True - TipoCambio = GlobalTipoCambio(Now) + TipoCambio = GlobalTipoCambio(NowADS()) TxtEspecifico.Text = TipoCambio.ToString Else LiEspecifico.Visible = False @@ -162,7 +162,7 @@ Partial Class ACumuladores_RepIndicadorDiario #Region " IMPRIMIR " Protected Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click - 'GvDatos.ExportToExcel("ReporteComprasClasificacion" & Now.ToShortDateString) + 'GvDatos.ExportToExcel("ReporteComprasClasificacion" & NowADS().ToShortDateString) GenerarPDF("EXCEL") End Sub @@ -193,11 +193,11 @@ Partial Class ACumuladores_RepIndicadorDiario params.Add(New ReportParameter("FechaInicio", FechaI)) params.Add(New ReportParameter("FechaFin", FechaF)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString)) params.Add(New ReportParameter("AgrupadoPor", $"Filtros Por: {FechaIn} {FechaFn} {SubProyecto} ")) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) - ImprimirPDF("Empresas/Grales/Formatos/RepIndicadorDiario.rdlc", DtDatos, params, $"RepIndicadorDiario_{Now.ToString("yyyyMMddhhmmss")}", Opcion) + ImprimirPDF("Empresas/Grales/Formatos/RepIndicadorDiario.rdlc", DtDatos, params, $"RepIndicadorDiario_{NowADS().ToString("yyyyMMddhhmmss")}", Opcion) Else Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia) End If diff --git a/Acumuladores/RepPolizasVirtuales.aspx.vb b/Acumuladores/RepPolizasVirtuales.aspx.vb index 4ce6c4895..58be54395 100644 --- a/Acumuladores/RepPolizasVirtuales.aspx.vb +++ b/Acumuladores/RepPolizasVirtuales.aspx.vb @@ -13,7 +13,7 @@ Partial Class Acumuladores_RepPolizasVirtuales Private Sub CargaCombos() CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto:=LblSubProyecto) - txtFechaI.Text = DateTime.Now.FirstDayOfMonth.ToShortDateString() + txtFechaI.Text = NowADS().FirstDayOfMonth.ToShortDateString() End Sub diff --git a/Acumuladores/RepUsados.aspx.cs b/Acumuladores/RepUsados.aspx.cs index 082d114ee..fce9117cf 100644 --- a/Acumuladores/RepUsados.aspx.cs +++ b/Acumuladores/RepUsados.aspx.cs @@ -14,8 +14,8 @@ public partial class Ventas_RepUsados : ClsPaginas private void InicializaValores() { CargaCliente(); - txtFechaI.Text = DateTime.Now.FirstDayOfMonth().ToShortDateString(); - txtFechaF.Text = DateTime.Now.LastDayOfMonth().ToShortDateString(); + txtFechaI.Text = NowADS().FirstDayOfMonth().ToShortDateString(); + txtFechaF.Text = NowADS().LastDayOfMonth().ToShortDateString(); UpFiltros.Update(); } diff --git a/App_Code/ClsBancos.vb b/App_Code/ClsBancos.vb index 56dc02260..e7a21f5c5 100644 --- a/App_Code/ClsBancos.vb +++ b/App_Code/ClsBancos.vb @@ -987,7 +987,7 @@ Public Class ClsBancos Dim dttpagosimpuestos As DataTable = Nothing Dim dr As Data.DataRow = Nothing - If GetComplementoPagosRep(-1, Now.AddYears(-5), Now, If(CvePrePoliza > 0, -1, CveIE), CveVenta, If(EsRegeneracion, 2, 1), UsuarioActual.CveEmpresa, CvePrePoliza:=CvePrePoliza) Then + If GetComplementoPagosRep(-1, ClsPaginas.NowADS().AddYears(-5), ClsPaginas.NowADS(), If(CvePrePoliza > 0, -1, CveIE), CveVenta, If(EsRegeneracion, 2, 1), UsuarioActual.CveEmpresa, CvePrePoliza:=CvePrePoliza) Then dr = DtResultados.FiltroPrimero("CveVenta IS NULL") dttpagos = DtResultados.FiltraParametros("CveVenta > 0") End If @@ -1000,23 +1000,23 @@ Public Class ClsBancos RowFiltro = dttpagos.FiltroPrimero("") If RowFiltro IsNot Nothing Then - If Now.EsHorarioVerano Then + If ClsPaginas.NowADS().EsHorarioVerano Then Dim UTCOffsetVerano As Integer = RowFiltro("UTCOffsetVerano").ToString().ToEntero() If UTCOffsetVerano <> 0 Then FechaTimbrado = DateTime.UtcNow.AddHours(UTCOffsetVerano) Else - FechaTimbrado = DateTime.Now + FechaTimbrado = ClsPaginas.NowADS() End If Else Dim UTCOffsetInvierno As Integer = RowFiltro("UTCOffsetInvierno").ToString().ToEntero() If UTCOffsetInvierno <> 0 Then FechaTimbrado = DateTime.UtcNow.AddHours(UTCOffsetInvierno) Else - FechaTimbrado = DateTime.Now + FechaTimbrado = ClsPaginas.NowADS() End If End If Else - FechaTimbrado = DateTime.Now + FechaTimbrado = ClsPaginas.NowADS() End If End If diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb index f5eaa75ab..72954ea76 100644 --- a/App_Code/ClsContabilidad.vb +++ b/App_Code/ClsContabilidad.vb @@ -292,7 +292,7 @@ Public Class ClsContabilidad Public Function UpdatePrePolizasDetalle(CvePrePolizaDetalle As Integer, Concepto As String, CveSubProyecto As Integer, IdCtaContable As Integer, TipoMovto As Boolean, ImporteMN As Decimal, Optional CveTipoGasto As Integer = -1, Optional CveConceptoContable As Integer = -1, Optional CveProveedor As Integer = -1, Optional CveCompra As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveCliente As Integer = -1, Optional CveVenta As Integer = -1, - Optional Referencia As String = "-1", Optional CveUsuarioModifico As Integer = -1, Optional CveCuenta As Integer = -1, Optional PorcentajeImpuesto As Decimal = -1, Optional Importe As Decimal = -1, Optional CveIE As Integer = -1) As Boolean + Optional Referencia As String = "-1", Optional CveUsuarioModifico As Integer = -1, Optional CveCuenta As Integer = -1, Optional PorcentajeImpuesto As Decimal = -1, Optional Importe As Decimal = -1, Optional CveIE As Integer = -1, Optional TipoCambio As Decimal = -1) As Boolean Dim Retorno As Boolean = False @@ -305,7 +305,7 @@ Public Class ClsContabilidad .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto .Add("@IdCtaContable", SqlDbType.Int).Value = IdCtaContable .Add("@TipoMovto", SqlDbType.Bit).Value = TipoMovto - '.Add("@Importe", SqlDbType.Money).Value = Importe + .Add("@TipoCambio", SqlDbType.Decimal).Value = TipoCambio .Add("@ImporteMN", SqlDbType.Money).Value = ImporteMN .Add("@CveTipoGasto", SqlDbType.Int).Value = CveTipoGasto .Add("@CveConceptoContable", SqlDbType.Int).Value = CveConceptoContable @@ -968,9 +968,6 @@ Public Class ClsContabilidad .Add("@TCPago", SqlDbType.Decimal).Value = TipoCambioPago .Add("@Referencia", SqlDbType.VarChar).Value = Referencia .Add("@Concepto", SqlDbType.VarChar).Value = Concepto - '.Add("@FechaVencimiento", SqlDbType.Date).Value = FechaVencimiento - '.Add("@IdCtaContable", SqlDbType.Int).Value = IdCtaContable - '.Add("@IdSegmentoNegocio", SqlDbType.Int).Value = IdSegmentoNegocio .Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta .Add("@CveCliente", SqlDbType.Int).Value = CveCliente .Add("@CveVenta", SqlDbType.Int).Value = CveVenta @@ -993,6 +990,7 @@ Public Class ClsContabilidad .Add("@CveCreditoDetalle", SqlDbType.Int).Value = CveCreditoDetalle .Add("@PorcentajeImpuesto", SqlDbType.Money).Value = PorcentajeImpuesto .Add("@CveNominaMovtoPermanente", SqlDbType.Money).Value = CveNominaMovtoPermanente + .Add("@CveColectiva", SqlDbType.Int).Value = CveColectiva .Add("@CvePrePolizaDetalle", SqlDbType.Int).Direction = ParameterDirection.Output End With @@ -5664,7 +5662,7 @@ Public Class ClsContabilidad Public Function AddCuentasAsignaciones(CveConceptoContable As Integer, CveEmpresa As Integer, CveCuenta As Integer, Optional CveProveedor As Integer = -1, Optional CveCliente As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveClasificacion As Integer = -1, Optional CveAlmacen As Integer = -1, Optional PorcentajeIVA As Decimal = -1, Optional CveConceptoNomina As Decimal = -1, Optional CveBancoCuenta As Integer = -1, - Optional CveSubProyecto As Integer = -1, Optional CveActivoFijo As Integer = -1, Optional CveTipoGasto As Integer = -1, Optional CveCredito As Integer = -1, + Optional CveSubProyecto As Integer = -1, Optional CveActivoFijo As Integer = -1, Optional CveTipoGasto As Integer = -1, Optional CveCredito As Integer = -1, Optional CveColectiva As Integer = -1, Optional RegeneraCuenta As Boolean = False, Optional OpActualizarClasificacion As Boolean = False) As Boolean Dim Retorno As Boolean = False @@ -5687,6 +5685,7 @@ Public Class ClsContabilidad .Add("@CveActivoFijo", SqlDbType.Int).Value = CveActivoFijo .Add("@CveTipoGasto", SqlDbType.Int).Value = CveTipoGasto .Add("@CveCredito", SqlDbType.Int).Value = CveCredito + .Add("@CveColectiva", SqlDbType.Int).Value = CveColectiva .Add("@RegeneraCuenta", SqlDbType.Bit).Value = RegeneraCuenta .Add("@OpActualizarClasificacion", SqlDbType.Bit).Value = OpActualizarClasificacion End With @@ -5706,7 +5705,7 @@ Public Class ClsContabilidad Optional CvePersonal As Integer = -1, Optional CveClasificacion As Integer = -1, Optional CveAlmacen As Integer = -1, Optional PorcentajeIVA As Decimal = -1, Optional CveConceptoNomina As Decimal = -1, Optional CveBancoCuenta As Integer = -1, Optional CveSubProyecto As Integer = -1, Optional CveActivoFijo As Integer = -1, Optional CveTipoGasto As Integer = -1, - Optional CveCredito As Integer = -1, Optional RegeneraCuenta As Boolean = False) As Boolean + Optional CveCredito As Integer = -1, Optional CveColectiva As Integer = -1, Optional RegeneraCuenta As Boolean = False) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Conta_CuentasAsignacionesUpdate") @@ -5727,6 +5726,7 @@ Public Class ClsContabilidad .Add("@CveActivoFijo", SqlDbType.Int).Value = CveActivoFijo .Add("@CveTipoGasto", SqlDbType.Int).Value = CveTipoGasto .Add("@CveCredito", SqlDbType.Int).Value = CveCredito + .Add("@CveColectiva", SqlDbType.Int).Value = CveColectiva .Add("@RegeneraCuenta", SqlDbType.Bit).Value = RegeneraCuenta End With @@ -6328,7 +6328,7 @@ Public Class ClsContabilidad Return Retorno End Function - Public Function GetEstadosMensualHorizontal(FechaI As Date, FechaF As Date, CveProyecto As Integer, CveSubProyecto As Integer, Divisor As Integer, CveEmpresa As Integer, CveUsuario As Integer, Optional Tipo As Integer = 1) As Boolean + Public Function GetEstadosMensualHorizontal(FechaI As Date, FechaF As Date, CveProyecto As Integer, CveSubProyecto As Integer, Divisor As Integer, CveEmpresa As Integer, CveUsuario As Integer, Optional Tipo As Integer = 1, Optional VistaPorcentaje As Integer = 1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Conta2_EstadoResultadosMensualHorizontal") @@ -6342,6 +6342,7 @@ Public Class ClsContabilidad .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@Tipo", SqlDbType.Int).Value = Tipo + .Add("@VistaPorcentaje", SqlDbType.Int).Value = VistaPorcentaje End With @@ -6357,7 +6358,7 @@ Public Class ClsContabilidad Return Retorno End Function - Public Function GetEstadosAnualHorizontal(FechaI As Date, FechaF As Date, CveProyecto As Integer, CveSubProyecto As Integer, Divisor As Integer, CveEmpresa As Integer, CveUsuario As Integer, Optional Tipo As Integer = 1, Optional Periodo As Integer = 12) As Boolean + Public Function GetEstadosAnualHorizontal(FechaI As Date, FechaF As Date, CveProyecto As Integer, CveSubProyecto As Integer, Divisor As Integer, CveEmpresa As Integer, CveUsuario As Integer, Optional Tipo As Integer = 1, Optional Periodo As Integer = 12, Optional VistaPorcentaje As Integer = 1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Conta2_EstadoResultadosAnualHorizontal") @@ -6372,6 +6373,7 @@ Public Class ClsContabilidad .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@Tipo", SqlDbType.Int).Value = Tipo .Add("@Periodo", SqlDbType.Int).Value = Periodo + .Add("@VistaPorcentaje", SqlDbType.Int).Value = VistaPorcentaje End With @@ -6388,7 +6390,7 @@ Public Class ClsContabilidad End Function - Public Function GetEstadosSubProyectoHorizontal(FechaI As Date, FechaF As Date, CveProyecto As Integer, CveSubProyecto As Integer, Divisor As Integer, CveEmpresa As Integer, CveUsuario As Integer, Optional Tipo As Integer = 1) As Boolean + Public Function GetEstadosSubProyectoHorizontal(FechaI As Date, FechaF As Date, CveProyecto As Integer, CveSubProyecto As Integer, Divisor As Integer, CveEmpresa As Integer, CveUsuario As Integer, Optional Tipo As Integer = 1, Optional VistaPorcentaje As Integer = 1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Conta2_EstadoResultadosSubProyectolHorizontal") @@ -6402,7 +6404,7 @@ Public Class ClsContabilidad .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@Tipo", SqlDbType.Int).Value = Tipo - + .Add("@VistaPorcentaje", SqlDbType.Int).Value = VistaPorcentaje End With SqlAdapter.SelectCommand.CommandTimeout = 0 diff --git a/App_Code/ClsDG.vb b/App_Code/ClsDG.vb index 9a3f09070..500a506d0 100644 --- a/App_Code/ClsDG.vb +++ b/App_Code/ClsDG.vb @@ -611,7 +611,7 @@ Public Class ClsDG Public Sub GuardaLog(pTexto As String) Dim ArchivoW As StreamWriter Dim strLineaTMP As String - strLineaTMP = String.Format("{0} {1}:{2} {3} {0}", Chr(13), DateTime.Now.ToShortDateString, DateTime.Now.ToShortTimeString, pTexto) + strLineaTMP = String.Format("{0} {1}:{2} {3} {0}", Chr(13), ClsPaginas.NowADS().ToShortDateString, ClsPaginas.NowADS().ToShortTimeString, pTexto) Try ArchivoW = New StreamWriter(String.Format("{0}\LogDG.txt", AppDomain.CurrentDomain), True, System.Text.Encoding.UTF8) diff --git a/App_Code/ClsEncuestas.vb b/App_Code/ClsEncuestas.vb index fb9c893d5..d7a8e0a51 100644 --- a/App_Code/ClsEncuestas.vb +++ b/App_Code/ClsEncuestas.vb @@ -566,7 +566,7 @@ Public Class ClsEncuestas .Add("@CveCliente", SqlDbType.Int).Value = CveCliente .Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario - .Add("@Fecha", SqlDbType.Date).Value = Now + .Add("@Fecha", SqlDbType.Date).Value = ClsPaginas.NowADS() .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEncuestaAplicada", SqlDbType.Int).Direction = ParameterDirection.Output End With diff --git a/App_Code/ClsGenerales.vb b/App_Code/ClsGenerales.vb index 1b98bec8a..a28971f9e 100644 --- a/App_Code/ClsGenerales.vb +++ b/App_Code/ClsGenerales.vb @@ -31,9 +31,7 @@ Public Class ClsGenerales Public Property Direccion As String Public Property Telefono As String Public Property Correo As String - Public Property Tipo As Integer - Public Property IdCtaContable As Integer - Public Property CtaContable As String + Public Property Tipo As Integer Public Property Estatus As Boolean Public Property FechaIng As DateTime Public Property CveUsuario As Integer @@ -1245,18 +1243,17 @@ Public Class ClsGenerales End Try Return Retorno - End Function + End Function #End Region - + #Region "C O L E C T I V A S" - Public Function GetColectivas(Optional CveColectiva As Integer = -1, Optional Colectiva As String = "-1", Optional Codigo As String = "-1", Optional Tipo As String = "-1", Optional CveEmpresa As Integer = -1) As Boolean + Public Function GetColectivas(CveEmpresa As Integer, Optional CveColectiva As Integer = -1, Optional Tipo As String = "-1", Optional CveConceptoContable As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Gral_ColectivasGet") With SqlAdapter.SelectCommand.Parameters - .Add("@CveColectiva", SqlDbType.Int).Value = CveColectiva - .Add("@Colectiva", SqlDbType.VarChar).Value = Colectiva - .Add("@Codigo", SqlDbType.VarChar).Value = Codigo + .Add("@CveColectiva", SqlDbType.Int).Value = CveColectiva + .Add("@CveConceptoContable", SqlDbType.Int).Value = CveConceptoContable .Add("@Tipo", SqlDbType.VarChar).Value = Tipo .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa End With @@ -1270,9 +1267,7 @@ Public Class ClsGenerales Me.Direccion = Data.Rows(0)("Direccion").ToString Me.Telefono = Data.Rows(0)("Telefono").ToString Me.Correo = Data.Rows(0)("Correo").ToString - Me.Tipo = Data.Rows(0)("Tipo").ToString.ToEntero - Me.IdCtaContable = Data.Rows(0)("IdCtaContable").ToString.ToEntero - Me.CtaContable = Data.Rows(0)("CtaContable").ToString + Me.Tipo = Data.Rows(0)("Tipo").ToString.ToEntero Me.Estatus = CBool(Data.Rows(0)("Estatus").ToString) Me.FechaIng = Data.Rows(0)("FechaIng").ToString.ToDateTime Me.Usuario = Data.Rows(0)("Usuario").ToString @@ -1392,7 +1387,7 @@ Public Class ClsGenerales DataAdapter("PA_Gral_ColectivasGetByProveedor") With SqlAdapter.SelectCommand.Parameters - .Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor + .Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa End With Try @@ -1403,10 +1398,10 @@ Public Class ClsGenerales End Try Return Retorno - End Function - + End Function + #End Region - + #Region "C O L E C T I V A S - D E T A L L E S" Public Function GetColectivasDetalles(CveColectiva As Integer, Tipo As String, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False @@ -1728,7 +1723,7 @@ Public Class ClsGenerales .Add("@Estatus", SqlDbType.VarChar).Value = Estatus .Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda .Add("@CveCuentaDeposito", SqlDbType.Int).Value = CveCuentaDeposito - .Add("@FechaIng", SqlDbType.Date).Value = Date.Now + .Add("@FechaIng", SqlDbType.Date).Value = ClsPaginas.NowADS() .Add("@RefCrediProveedor", SqlDbType.VarChar).Value = RefCrediProveedor .Add("@CveUsuarioModifico", SqlDbType.Int).Value = CveUsuarioModifico .Add("@Correo", SqlDbType.VarChar).Value = Correo diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb index c0b1a6eb8..d10630102 100644 --- a/App_Code/ClsInventarios.vb +++ b/App_Code/ClsInventarios.vb @@ -992,7 +992,7 @@ Public Class ClsInventarios DataAdapter("PA_Inv_MovimientosAdd") If FechaMovto.Hour = 0 AndAlso FechaMovto.Minute = 0 AndAlso FechaMovto.Second = 0 Then - FechaMovto = String.Format("{0} {1}:{2}:{3}", FechaMovto.ToShortDateString, Now.Hour, Now.Minute, Now.Second).ToDateTime + FechaMovto = String.Format("{0} {1}:{2}:{3}", FechaMovto.ToShortDateString, ClsPaginas.NowADS().Hour, ClsPaginas.NowADS().Minute, ClsPaginas.NowADS().Second).ToDateTime End If With SqlAdapter.SelectCommand.Parameters @@ -1535,7 +1535,8 @@ Public Class ClsInventarios End Function Public Function GetKardexAlmacenHorizontal(CvePS As Integer, FechaFin As Date, CveAlmacen As Integer, CveUnidadMedida As Integer, CveProveedor As Integer, CveTipoAlmacen As Integer, IncluyeTransitorios As Integer, CveClasificacion As Integer, CveUsuario As Integer, CveEmpresa As Integer, Optional CondicionExistencias As Integer = 0, - Optional Orden As Integer = -1, Optional Marcas As String = "-1", Optional IncluyeProyectado As Integer = -1, Optional CveAlmacenes As String = "-1", Optional GPO As Integer = 1) As Boolean + Optional Orden As Integer = -1, Optional Marcas As String = "-1", Optional IncluyeProyectado As Integer = -1, Optional CveAlmacenes As String = "-1", + Optional GPO As Integer = 1, Optional CodigoPS As String = "-1") As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Inv_KardexAlmacenHorizontalGet") @@ -1558,6 +1559,7 @@ Public Class ClsInventarios .Add("@IncluyeProyectado", SqlDbType.TinyInt).Value = IncluyeProyectado .Add("@CveAlmacenes", SqlDbType.NVarChar).Value = CveAlmacenes .Add("@GPO", SqlDbType.Int).Value = GPO + .Add("@CodigoPS", SqlDbType.VarChar).Value = CodigoPS End With @@ -1981,7 +1983,7 @@ Public Class ClsInventarios Dim Retorno As Decimal = -1 If FechaMovto = "-1" Then - FechaMovto = String.Format("{0} 00:00", Now.AddDays(1).ToString("yyyy/MM/dd")) + FechaMovto = String.Format("{0} 00:00", ClsPaginas.NowADS().AddDays(1).ToString("yyyy/MM/dd")) End If DataAdapter("PA_Inv_ExistenciasPSGet") @@ -2176,7 +2178,7 @@ Public Class ClsInventarios Dim Retorno As Boolean = False If FechaMovto = "-1" Then - FechaMovto = String.Format("{0} 00:00", Now.AddDays(1).ToString("yyyy/MM/dd")) + FechaMovto = String.Format("{0} 00:00", ClsPaginas.NowADS().AddDays(1).ToString("yyyy/MM/dd")) End If DataAdapter("PA_Inv_ExistenciasPSEmpaqueGet") @@ -2216,7 +2218,7 @@ Public Class ClsInventarios Dim Retorno As Boolean = False If Fecha = "-1" Then - Fecha = String.Format("{0} 00:00", Now.AddDays(1).ToString("yyyy/MM/dd")) + Fecha = String.Format("{0} 00:00", ClsPaginas.NowADS().AddDays(1).ToString("yyyy/MM/dd")) End If DataAdapter("PA_Inv_ExistenciasPSXMLGet") @@ -5630,7 +5632,7 @@ Public Class ClsInventarios NumPolizaSeguro As String, CveUsuario As Integer, NombreAseguradoraMedioAmbiente As String, NumPolizaSeguroMedioAmbiente As String, NombreAseguradoraCarga As String, NumPolizaSeguroCarga As String, Optional CveTipoCamion As Integer = 1, Optional LongitudCaja As String = "", Optional LineaTransportacion As String = "", Optional SCAC As String = "", Optional CAAT As String = "", Optional CveTipoRemolque As Integer = -1, Optional NumeroTrailer As String = "", Optional Estatus As Boolean = False, Optional CveProveedor As Integer = -1, - Optional Marca As String = "", Optional Color As String = "") As Boolean + Optional Marca As String = "", Optional Color As String = "", Optional CveChoferAsignado As Integer = -1, Optional CveRemolque1Asignado As Integer = -1, Optional CveRemolque2Asignado As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Inv_CamionesAdd") @@ -5660,6 +5662,9 @@ Public Class ClsInventarios .Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor .Add("@Marca", SqlDbType.VarChar).Value = Marca .Add("@Color", SqlDbType.VarChar).Value = Color + .Add("@CveChoferAsignado", SqlDbType.Int).Value = CveChoferAsignado + .Add("@CveRemolque1Asignado", SqlDbType.Int).Value = CveRemolque1Asignado + .Add("@CveRemolque2Asignado", SqlDbType.Int).Value = CveRemolque2Asignado End With Try SqlAdapter.Fill(Data) @@ -5694,7 +5699,7 @@ Public Class ClsInventarios NumPolizaSeguro As String, CveUsuario As Integer, CveEmpresa As Integer, NombreAseguradoraMedioAmbiente As String, NumPolizaSeguroMedioAmbiente As String, NombreAseguradoraCarga As String, NumPolizaSeguroCarga As String, Optional CveTipoCamion As Integer = -1, Optional LongitudCaja As String = "", Optional LineaTransportacion As String = "", Optional SCAC As String = "", Optional CAAT As String = "", Optional CveTipoRemolque As Integer = -1, Optional NumeroTrailer As String = "", Optional Estatus As Boolean = False, Optional CveProveedor As Integer = -1, - Optional Marca As String = "", Optional Color As String = "") As Boolean + Optional Marca As String = "", Optional Color As String = "", Optional CveChoferAsignado As Integer = -1, Optional CveRemolque1Asignado As Integer = -1, Optional CveRemolque2Asignado As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Inv_CamionesUpdate") With SqlAdapter.SelectCommand.Parameters @@ -5724,6 +5729,9 @@ Public Class ClsInventarios .Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor .Add("@Marca", SqlDbType.VarChar).Value = Marca .Add("@Color", SqlDbType.VarChar).Value = Color + .Add("@CveChoferAsignado", SqlDbType.Int).Value = CveChoferAsignado + .Add("@CveRemolque1Asignado", SqlDbType.Int).Value = CveRemolque1Asignado + .Add("@CveRemolque2Asignado", SqlDbType.Int).Value = CveRemolque2Asignado End With Try SqlAdapter.Fill(Data) diff --git a/App_Code/ClsMovimientos.vb b/App_Code/ClsMovimientos.vb index a63389698..123eec236 100644 --- a/App_Code/ClsMovimientos.vb +++ b/App_Code/ClsMovimientos.vb @@ -120,7 +120,7 @@ Public Class ClsMovimientos Public Function GetCxCClienteDetalle(CveCliente As Integer, FechaI As String, FechaF As String, CveMoneda As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, CveClienteSucursal As Integer, Optional TipoDocto As String = "-1", Optional FechaCorte As Date = MaxFecha, Optional FechaVencimientoI As Date = MinFecha, Optional FechaVencimientoF As Date = MaxFecha) As Boolean Dim Retorno As Boolean = False - FechaCorte = IIf(FechaCorte = Nothing, Date.Now.AddYears(1), FechaCorte).ToString.ToDate + FechaCorte = IIf(FechaCorte = Nothing, ClsPaginas.NowADS().AddYears(1), FechaCorte).ToString.ToDate DataAdapter("PA_Vta_ClienteCxC") With SqlAdapter.SelectCommand.Parameters @@ -684,7 +684,7 @@ Public Class ClsMovimientos Optional TipoDocto As String = "-1", Optional TipoAgrupacion As Integer = -1, Optional CveProyecto As Integer = -1) As Boolean Dim Retorno As Boolean = False - If FechaCorte = Nothing Then FechaCorte = Now + If FechaCorte = Nothing Then FechaCorte = ClsPaginas.NowADS() DataAdapter("PA_Comp_RepCxP") With SqlAdapter.SelectCommand.Parameters @@ -1314,7 +1314,7 @@ Public Class ClsMovimientos Optional Comprobaciones As Integer = -1, Optional AplicaNC As Integer = -1, Optional TipoDocto As String = "-1", Optional CveProyecto As Integer = -1) As Boolean Dim Retorno As Boolean = False - If FechaCorte = Nothing Then FechaCorte = Now + If FechaCorte = Nothing Then FechaCorte = ClsPaginas.NowADS() DataAdapter("PA_Comp_RepCxPDetalle") With SqlAdapter.SelectCommand.Parameters @@ -1481,7 +1481,7 @@ Public Class ClsMovimientos #End Region #Region "Anticipos de Proveedores" - Public Function GetAnticiposProveedor(CveProveedor As Integer, CveProveedorSucursal As Integer, Optional CveMoneda As Integer = -1, Optional SelectTop As Integer = -1, Optional FechaI As String = "-1", Optional FechaF As String = "-1", Optional TipoDocto As String = "-1") As Boolean + Public Function GetAnticiposProveedor(CveProveedor As Integer, CveEmpresa As Integer, Optional CveMoneda As Integer = -1, Optional CveProveedorSucursal As Integer = -1, Optional SelectTop As Integer = -1, Optional FechaI As Date = MinFecha, Optional FechaF As Date = MaxFecha, Optional TipoDocto As String = "-1") As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Comp_ProveedorAnticipos") @@ -1489,13 +1489,13 @@ Public Class ClsMovimientos .Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor .Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda .Add("@CveProveedorSucursal", SqlDbType.Int).Value = CveProveedorSucursal - .Add("@SelectTop", SqlDbType.Int).Value = SelectTop - .Add("@FechaI", SqlDbType.VarChar).Value = FechaI - .Add("@FechaF", SqlDbType.VarChar).Value = FechaF + .Add("@SelectTop", SqlDbType.Int).Value = SelectTop + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@FechaI", SqlDbType.Date).Value = FechaI + .Add("@FechaF", SqlDbType.Date).Value = FechaF .Add("@TipoDocto", SqlDbType.VarChar).Value = TipoDocto End With - Try SqlAdapter.Fill(Data) Retorno = True diff --git a/App_Code/ClsOC.vb b/App_Code/ClsOC.vb index fe4cc82c8..a492db067 100644 --- a/App_Code/ClsOC.vb +++ b/App_Code/ClsOC.vb @@ -706,7 +706,8 @@ Public Class ClsOC Optional CveCliente As Integer = -1, Optional CveVendedor As Integer = -1, Optional PrioridadObservacion As String = "", Optional PorcentajeIVA As Decimal = 0.16D, Optional IVA As Decimal = 0, Optional RetIVA As Decimal = 0, Optional RetISR As Decimal = 0, Optional FechaExpiracion As Date = Nothing, Optional CveCotizacion As Integer = -1, Optional FolioAdicional As String = "", Optional EntregaDirecta As Integer = -1, Optional CveDireccionEnvio As Integer = -1, Optional Guia As String = "-1", Optional IEPS As Decimal = -1, - Optional CveIEAnticipo As Integer = -1, Optional ImporteAnticipo As Decimal = 0, Optional UsoCFDI As Integer = -1, Optional Promocion As String = "-1", Optional CveProveedorContacto As Integer = -1, Optional NumRemision As String = "-1") As Boolean + Optional CveIEAnticipo As Integer = -1, Optional ImporteAnticipo As Decimal = 0, Optional UsoCFDI As Integer = -1, Optional Promocion As String = "-1", Optional CveProveedorContacto As Integer = -1, Optional NumRemision As String = "-1", + Optional CveColectiva As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_OC_OrdenesCompraAdd") @@ -750,6 +751,7 @@ Public Class ClsOC .Add("@Promocion", SqlDbType.VarChar).Value = Promocion .Add("@CveProveedorContacto", SqlDbType.Int).Value = CveProveedorContacto .Add("@NumRemision", SqlDbType.VarChar).Value = NumRemision + .Add("@CveColectiva", SqlDbType.Int).Value = CveColectiva .Add("@vCveOrdenCompra", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@vFolio", SqlDbType.Int).Direction = ParameterDirection.Output @@ -1156,7 +1158,7 @@ Public Class ClsOC pObservacion As String, pCveUsuario As Integer, Optional pCveOrdenCompraPadre As Integer = -1, Optional CvePresupuestoEgreso As Integer = -1, Optional Descuento As Decimal = 0, Optional IEPSPS As Decimal = 0, Optional IEPSPSIVA As Decimal = 0, Optional IVA As Decimal = 0, Optional RetIVA As Decimal = 0, Optional RetISR As Decimal = 0, Optional Total As Decimal = 0, Optional CveContratoDetalle As Integer = -1, Optional IVAPorcentaje As Decimal = 0, Optional RetIVAPorcentaje As Decimal = 0, Optional RetISRPorcentaje As Decimal = 0, Optional IEPSPSPorcentaje As Decimal = 0, - Optional IEPSPSIVAPorcentaje As Decimal = 0, Optional CveVentaDetalleCotizacion As Integer = -1, Optional CveTipoGastoObra As Integer = -1, Optional CveCultivoCuadroDetalle As Integer = -1) As Boolean + Optional IEPSPSIVAPorcentaje As Decimal = 0, Optional CveVentaDetalleCotizacion As Integer = -1, Optional CveTipoGastoObra As Integer = -1, Optional CveCultivoCuadroDetalle As Integer = -1, Optional CveColectiva As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_OC_OrdenesCompraDetalleAdd") @@ -1189,6 +1191,7 @@ Public Class ClsOC .Add("@CveVentaDetalleCotizacion", SqlDbType.Int).Value = CveVentaDetalleCotizacion .Add("@CveTipoGastoObra", SqlDbType.Int).Value = CveTipoGastoObra .Add("@CveCultivoCuadroDetalle", SqlDbType.Int).Value = CveCultivoCuadroDetalle + .Add("@CveColectiva", SqlDbType.Int).Value = CveColectiva End With diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index e8a0fd6bc..7a59a1ea4 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -98,6 +98,21 @@ Public Class ClsPaginas End Try End Set End Property + + Public Shared Function NowADS() As DateTime + Dim tHora As Integer = 0 + 'If UsuarioActual IsNot Nothing AndAlso UsuarioActual.Empresa IsNot Nothing Then tHora = UsuarioActual.Empresa.UTCOffset + Try + If HttpContext.Current.Session("UsuarioSIG") IsNot Nothing AndAlso CType(HttpContext.Current.Session("UsuarioSIG"), Usuario).Empresa IsNot Nothing Then tHora = CType(HttpContext.Current.Session("UsuarioSIG"), Usuario).Empresa.UTCOffset + Catch ex As Exception + + End Try + + + Return If(tHora <> 0, Now.ToUniversalTime.AddMinutes(tHora), Now) + End Function + + #End Region #Region "GlobalDTs" @@ -105,7 +120,7 @@ Public Class ClsPaginas Get If GlobalTipoCambio <= 0 Then 'sino tiene dato lo recargo por si ya esta insertado - If Fecha = MinFecha Then Fecha = Now + If Fecha = MinFecha Then Fecha = NowADS() Dim ObjGral As New ClsGenerales If ObjGral.GetTipoCambio(-1, Fecha) AndAlso ObjGral.DtResultados.Rows.Count > 0 Then HttpContext.Current.Application("GlobalTipoCambio") = ObjGral.DtResultados.Rows(0)("TipoCambio").ToString.ToDouble @@ -124,7 +139,7 @@ Public Class ClsPaginas Get If HttpContext.Current.Application("GlobalTipoCambioUltimaFluctuacion") Is Nothing Then Dim ObjGral As New ClsGenerales - If ObjGral.GetTipoCambioUltimaFluctuacion(-1, Now) AndAlso ObjGral.DtResultados.Rows.Count > 0 Then + If ObjGral.GetTipoCambioUltimaFluctuacion(-1, NowADS()) AndAlso ObjGral.DtResultados.Rows.Count > 0 Then HttpContext.Current.Application("GlobalTipoCambioUltimaFluctuacion") = ObjGral.DtResultados.Copy() Else HttpContext.Current.Application("GlobalTipoCambioUltimaFluctuacion") = Nothing @@ -136,7 +151,7 @@ Public Class ClsPaginas .FechaFluctuacion = MinFecha } 'sino tiene dato lo recargo por si ya esta insertado - If Fecha = MinFecha Then Fecha = Now + If Fecha = MinFecha Then Fecha = NowADS() If HttpContext.Current.Application("GlobalTipoCambioUltimaFluctuacion") IsNot Nothing Then Dim dr As DataRow = DirectCast(HttpContext.Current.Application("GlobalTipoCambioUltimaFluctuacion"), DataTable).FiltroPrimero(String.Format("Fecha < '{0}'", Fecha), Orderby:="Fecha DESC") @@ -159,7 +174,7 @@ Public Class ClsPaginas Get If GlobalTipoCambioEuro <= 0 Then 'sino tiene dato lo recargo por si ya esta insertado - If Fecha = MinFecha Then Fecha = Now + If Fecha = MinFecha Then Fecha = NowADS() Dim ObjGral As New ClsGenerales If ObjGral.GetTipoCambio(-1, Fecha) AndAlso ObjGral.DtResultados.Rows.Count > 0 Then Application("GlobalTipoCambioEuro") = ObjGral.DtResultados.Rows(0)("TipoCambioEuro").ToString.ToDouble @@ -1083,6 +1098,7 @@ Public Class ClsPaginas Application(AppNombre) = value End Set End Property + Public Shared Property GlobalDTClasificacionesPresupuestos(CveEmpresa As Integer) As DataTable Get Dim AppNombre As String = $"GlobalDTClasificacionesPresupuestos-{CveEmpresa}" @@ -1763,7 +1779,7 @@ Public Class ClsPaginas Application(AppNombre) = value End Set End Property - Property GlobalDTInvCamiones(CveEmpresa As Integer, Optional CveCamion As Integer = -1) As DataTable + Property GlobalDTInvCamiones(CveEmpresa As Integer, Optional CveCamion As Integer = -1, Optional CveTipoCamion As Integer = -1) As DataTable Get Dim AppNombre As String = $"GlobalDTInvCamiones-{CveEmpresa}" If Application(AppNombre) Is Nothing Then @@ -1773,6 +1789,7 @@ Public Class ClsPaginas End If Dim Str As New StringBuilder If CveCamion > 0 Then Str.AppendFormat("CveCamion = {0}", CveCamion) + If CveTipoCamion > 0 Then Str.AppendFormat("CveTipoCamion = {0}", CveTipoCamion) Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) GlobalDTInvCamiones = Dv.ToTable Dv.Dispose() @@ -4374,9 +4391,7 @@ Public Class ClsPaginas End If Else LocalStopwatch.Value.Restart() - If EsProduccion Then - If UsuarioActual.CveEmpresa.Contiene(141, 152, 159, 160, 161, 162, 166) Then System.Threading.Thread.Sleep(1100) - End If + If Not Page.IsPostBack Then 'If Not CType(Session("UsuarioSIG"), Usuario).SeleccionoEmpresa AndAlso Request.ServerVariables("URL") <> "/Sistemas/PopUpSeleccionarEmpresa.aspx" Then ' Response.Redirect("/Sistemas/PopUpSeleccionarEmpresa.aspx") @@ -4426,7 +4441,7 @@ Public Class ClsPaginas End Sub Private Shared Function GetCurrentPageViewState() As System.Web.UI.StateBag Dim page As Page = TryCast(HttpContext.Current.CurrentHandler, Page) - Dim viewStateProp = page?.[GetType]().GetProperty("ViewState", Reflection.BindingFlags.FlattenHierarchy Or Reflection.BindingFlags.Instance Or Reflection.BindingFlags.NonPublic) + Dim viewStateProp As Reflection.PropertyInfo = page?.[GetType]().GetProperty("ViewState", Reflection.BindingFlags.FlattenHierarchy Or Reflection.BindingFlags.Instance Or Reflection.BindingFlags.NonPublic) Return CType(viewStateProp?.GetValue(page), System.Web.UI.StateBag) End Function Public Shared Sub Alert(Mensaje As String, Optional pOpcion As TipoMensaje = TipoMensaje.MsgInformacion, Optional JSBtnAceptar As String = "", Optional timeout As Integer = 5, Optional ShowCloseButton As Boolean = True, Optional TextoConfirmacion As String = "", Optional TextoSegundoBoton As String = "", Optional JSBtn2 As String = "") @@ -4499,7 +4514,7 @@ Public Class ClsPaginas Public Shared Sub RegistraScript(Script As String, Optional valuetick As String = "") Dim page As Page = TryCast(HttpContext.Current.CurrentHandler, Page) Script = $"{Script.TrimEnd(";"c)};" 'sino trae ";" al final, se lo agregamos - ScriptManager.RegisterStartupScript(page, page.GetType(), $"{DateTime.Now.Ticks + 1}{ThreadSafeRandom.Next()}{valuetick}", Script, True) + ScriptManager.RegisterStartupScript(page, page.GetType(), $"{NowADS().Ticks + 1}{ThreadSafeRandom.Next()}{valuetick}", Script, True) End Sub Public Sub TabEnabled(Tab As System.Web.UI.HtmlControls.HtmlAnchor, Valor As Boolean) If Valor Then @@ -4521,11 +4536,11 @@ Public Class ClsPaginas End Sub Public Sub NotificacionesPendientes(Nota As String) 'incremento el contador de alertas - Dim Type = Master.GetType - Dim Prop = Type.GetProperty("countNotificaciones") + Dim Type As System.Type = Master.GetType + Dim Prop As Reflection.PropertyInfo = Type.GetProperty("countNotificaciones") Prop.SetValue(Master, 1 + CInt(Prop.GetValue(Master))) 'end incremento contador de alertas - Dim ltl = DirectCast(Master.FindControl("LtlMNotificaciones"), Literal) + Dim ltl As Literal = DirectCast(Master.FindControl("LtlMNotificaciones"), Literal) ltl.Text = String.Format(" {0} {1}", ltl.Text, Nota) End Sub Public Sub Confirmacion(Mensaje As String, Tipo As String, FuncionOK As String, FuncionCancel As String) @@ -4628,7 +4643,7 @@ Public Class ClsPaginas lrds.Add(rds) ImprimirPDF(RutaReporte, lrds, Parametros, NombreArchivo, Formato, MR, Content_Disposition) End Sub - Public Sub ImprimirPDFStimulsoft(RutaReporte As String, DtDatos As DataTable, Parametros As List(Of ReportParameter), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional RDSName As String = "Datos", Optional Content_Disposition As String = "attachment") + Public Sub ImprimirPDFStimul(RutaReporte As String, DtDatos As DataTable, Parametros As List(Of ReportParameter), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional RDSName As String = "Datos", Optional Content_Disposition As String = "attachment") Dim lrds As New List(Of ReportDataSource) Dim rds As New ReportDataSource rds.Name = RDSName @@ -4638,7 +4653,7 @@ Public Class ClsPaginas If Formato.ToLower() = "excel" Then Extension = "xlsx" End If - ImprimirbytesPDF(StreamBytesStimulsoft("Facturas", RutaReporte, lrds, Parametros, NombreArchivo:=NombreArchivo, Formato:=Formato), NombreArchivo, Formato, Content_Disposition:=Content_Disposition, Extension:=Extension) + ImprimirbytesPDF(StreamBytesStimul("Facturas", RutaReporte, lrds, Parametros, NombreArchivo:=NombreArchivo, Formato:=Formato), NombreArchivo, Formato, Content_Disposition:=Content_Disposition, Extension:=Extension) End Sub Public Sub ImprimirPDFMultiDS(RutaReporte As String, lrds As List(Of ReportDataSource), Parametros As List(Of ReportParameter), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional RDSName As String = "DataSet1", Optional MR As ReportViewer = Nothing) ImprimirPDF(RutaReporte, lrds, Parametros, NombreArchivo, Formato, MR) @@ -5110,7 +5125,7 @@ Public Class ClsPaginas #End Region #Region "IMPRIMIR FACTURA" - Public Function PdfFactura(ByRef Vta As Modelos.Factura, Optional AplicaPagare As String = "0", Optional Guardar As Boolean = True, Optional SubReportData As Modelos.MSubReportData = Nothing, Optional UsarStimulsoft As Boolean = False) As Byte() + Public Function PdfFactura(ByRef Vta As Modelos.Factura, Optional AplicaPagare As String = "0", Optional Guardar As Boolean = True, Optional SubReportData As Modelos.MSubReportData = Nothing, Optional UsarStimul As Boolean = False) As Byte() Dim retorno As Byte() = Nothing ' Dim ObjVentas As New ClsVentas 'DATOS GENERALES @@ -5504,7 +5519,7 @@ Public Class ClsPaginas params.Add(New ReportParameter("ClienteDiasCredito", "0")) params.Add(New ReportParameter("MonedaAbreviatura", If(Vta.MonedaAbreviatura.ToString IsNot Nothing, Vta.MonedaAbreviatura.ToString, ""))) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToString)) params.Add(New ReportParameter("Sucursal", Vta.SubProyecto.SubProyecto)) params.Add(New ReportParameter("EstatusFactura", If(Vta.TipoEstatus = 5, Vta.EstatusFactura, ""))) params.Add(New ReportParameter("EstatusEntrega", If(Vta.Inv_CveEstatusEntrega = 1, Vta.Inv_EstatusEntrega, ""))) @@ -5947,7 +5962,7 @@ Public Class ClsPaginas lrds.Add(rds3) Dim rds4 As New ReportDataSource With {.Name = "DataSet4", .Value = If(Vta.DtDocumentosRelacionados IsNot Nothing, Vta.DtDocumentosRelacionados, New DataTable)} ' sino esta creado el objeto, lo creamos, para que no truene el reporte lrds.Add(rds4) - If UsuarioActual.Empresa.Funcionalidad(707) = "1" OrElse UsarStimulsoft Then + If UsuarioActual.Empresa.Funcionalidad(707) = "1" OrElse UsarStimul Then If Vta.Cliente.CodigoRegimenFiscal.ToString.Length > 0 Then params.Add(New ReportParameter("ClienteRegimenFiscal", $"{Vta.Cliente.CodigoRegimenFiscal}-{Vta.Cliente.RegimenFiscal}")) End If @@ -5993,11 +6008,11 @@ Public Class ClsPaginas If UsuarioActual.Empresa.Funcionalidad(707) = "1" Then Dim ArchivoStimulsfot As New System.IO.FileInfo(RutaFormato.Replace(".rdlc", ".mrt")) If ArchivoStimulsfot.Exists Then - UsarStimulsoft = True + UsarStimul = True params.Add(New ReportParameter("RegimenFiscalEmpresa", String.Format("{0} - {1}", UsuarioActual.Empresa.CodigoRegimenFiscal, UsuarioActual.Empresa.RegimenFiscal))) End If End If - If Not UsarStimulsoft Then + If Not UsarStimul Then Dim Archivo As New System.IO.FileInfo(RutaFormato) If Archivo.Exists Then @@ -6029,7 +6044,10 @@ Public Class ClsPaginas End If Else RutaFormato = RutaFormato.Replace(".rdlc", ".mrt") - retorno = StreamBytesStimulsoft("Facturas", RutaFormato, lrds, params, NombreArchivo:=NombreArchivo, Formato:="PDF") + + params.Add(New ReportParameter("SucursalCliente", If(Vta.ClienteSucursal.Sucursal Is Nothing, "", Vta.ClienteSucursal.Sucursal.ToString))) + + retorno = StreamBytesStimul("Facturas", RutaFormato, lrds, params, NombreArchivo:=NombreArchivo, Formato:="PDF") If UsuarioActual.Empresa.Funcionalidad(707) = "1" Then Dim ArchivoPDF As New System.IO.FileInfo(String.Format("{0}PDF\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, Vta.TipoDocto, Vta.SerieFolio)) If Guardar Then @@ -6057,7 +6075,7 @@ Public Class ClsPaginas End Try Return retorno End Function - Protected Function StreamBytesStimulsoft(Opcion As String, RutaReporte As String, DataSource As List(Of ReportDataSource), Parametros As List(Of ReportParameter), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional NombreDataSource As String = "Datos") As Byte() + Protected Function StreamBytesStimul(Opcion As String, RutaReporte As String, DataSource As List(Of ReportDataSource), Parametros As List(Of ReportParameter), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional NombreDataSource As String = "Datos") As Byte() 'limpio ReportViwer Dim sw As Stopwatch = Stopwatch.StartNew() @@ -6119,12 +6137,12 @@ Public Class ClsPaginas New JProperty("parametros", paramsArray), New JProperty("dataSource", dataSourceArray) ) - Dim data = New StringContent(payload.ToString(), Encoding.UTF8, "application/json") - Using httpClient = New HttpClient() - Using request = New HttpRequestMessage(HttpMethod.Post, Url) + Dim data As New StringContent(payload.ToString(), Encoding.UTF8, "application/json") + Using httpClient As New HttpClient() + Using request As New HttpRequestMessage(HttpMethod.Post, Url) 'request.Headers.Add("ADSToken", Encripta(String.Format("CVEEMPRESA={0}&TICKS={1}&CVEUSUARIO=100", CveEmpresa, DateTime.UtcNow.Ticks))) request.Content = New StringContent(payload.ToString(), Encoding.UTF8, "application/json") - Dim response = httpClient.SendAsync(request).Result + Dim response As HttpResponseMessage = httpClient.SendAsync(request).Result If response.StatusCode = Net.HttpStatusCode.OK Then Bytes = response.Content.ReadAsByteArrayAsync().Result End If @@ -6453,7 +6471,7 @@ Public Class ClsPaginas params.Add(New ReportParameter("EntregaDirecta", ObjOC.EntregaDirecta.ToString)) params.Add(New ReportParameter("NombreCliente", ObjOC.NombreCliente.ToString)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToString)) params.Add(New ReportParameter("DomicilioSucursal", DomicilioSucursal)) params.Add(New ReportParameter("ProveedorContacto", ObjOC.ProveedorContacto)) params.Add(New ReportParameter("Comprador", ObjOC.UsuarioAsignado)) @@ -6651,7 +6669,7 @@ Public Class ClsPaginas lista.Add(New CrystalParametro("Empresa", EmpresaActual.Empresa)) lista.Add(New CrystalParametro("TipoCuentas", "Todas")) lista.Add(New CrystalParametro("FechaInicio", "-")) - lista.Add(New CrystalParametro("FechaFin", DateTime.Now.ToShortDateString)) + lista.Add(New CrystalParametro("FechaFin", NowADS().ToShortDateString)) lista.Add(New CrystalParametro("NombreProveedor", NombreProv)) lista.Add(New CrystalParametro("DireccionProveedor", Direccion)) lista.Add(New CrystalParametro("ProveedorRFC", RFC)) @@ -7126,7 +7144,7 @@ Public Class ClsPaginas params.Add(New ReportParameter("EmpresaNoInt", UsuarioActual.Empresa.NoInt)) 'DATOS IMPRESION params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToString)) 'DATOS GENERALES Dim Ruta As String = UsuarioActual.Empresa.Ruta Dim PathXML As String = $"{Ruta}XML\Pag\{Serie}-{Folio}.xml" @@ -7457,9 +7475,9 @@ Public Class ClsPaginas ImporteMovimiento = (PorcentajePago * CompraActual.RetISR).RoundSQL ImporteMN = (ImporteMovimiento * CompraActual.TC).RoundSQL If CompraActual.CveMoneda > 1 Then ImporteME = ImporteMovimiento - Dim ContabilizableISR As Boolean = False - If UsuarioActual.CveEmpresa.Contiene(140, 7, 11, 12, 122, 145, 172, 173, 174) Then - ContabilizableISR = True + Dim ContabilizableISR As Boolean = True + If UsuarioActual.CveEmpresa.Contiene(13, 83, 141, 153, 154, 158) Then + ContabilizableISR = False End If Dim Ret As ConceptosRetenciones = CompraActual.ConceptoPrePolizaRetISR If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, ImporteMN, Ret.CveConceptoxAcreditar, CompraActual.SerieFolio, Concepto, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambio:=CompraActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, Contabilizable:=ContabilizableISR, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True @@ -7865,6 +7883,11 @@ Public Class ClsPaginas Dim Contabilizable As Boolean = True If PorcentajePago > 1 Then PorcentajePago = 1 + ''validación + If Pago.TipoPago = "I" AndAlso Pago.CveClientePago <= 0 Then + Return True + End If + Dim Concepto As String = String.Format("{0} F:{1}", VentaActual.ClienteNombre, VentaActual.SerieFolio) Dim FuncionalidadFluctuacionImpuestos As Boolean = If(VentaActual.UsuarioActual.Empresa.Funcionalidad(159) = "1", True, False) Dim tFecha As Date = Pago.Fecha @@ -8028,12 +8051,12 @@ Public Class ClsPaginas End If If Pago.CveMonedaPago > 1 Then 'Agregamos la Extranjera - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, 92, Pago.Referencia, Concepto, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=VentaActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, 92, Pago.Referencia, Concepto, CveVenta:=VentaActual.CveVenta, CveCliente:=Pago.CveClientePago, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=VentaActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True ImporteMN = (Pago.ImportePago * TCValuacionPago - Pago.ImportePago).RoundSQL - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, ImporteMN, 332, Pago.Referencia, Concepto, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=VentaActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, ImporteMN, 332, Pago.Referencia, Concepto, CveVenta:=VentaActual.CveVenta, CveCliente:=Pago.CveClientePago, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=VentaActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True Else 'Agregamos Nacional - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, 92, Pago.Referencia, Concepto, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CveSubProyecto:=VentaActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, 92, Pago.Referencia, Concepto, CveVenta:=VentaActual.CveVenta, CveCliente:=Pago.CveClientePago, CveIE:=Pago.CveIE, CveSubProyecto:=VentaActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True End If End If 'si tiene otros gastos/ingresos @@ -8106,7 +8129,7 @@ Public Class ClsPaginas Public Property AplicaTraslado As Boolean = True Public Property Referencia As String Public Property CveConceptoPago As Integer = -1 - + Public Property CveClientePago As Integer = -1 Public Property ImporteFluctuacionAdicional As Decimal = 0 Public Property ValorMultiplicador As Decimal = 1 End Class @@ -8465,7 +8488,7 @@ Public Class ClsPaginas PaginaDict.Add("/Bancos/RepCobradoPagadoDetalle.aspx".ToUpper(), -1) PaginaDict.Add("/Bancos/RepCobradoPagado.aspx".ToUpper(), 368) PaginaDict.Add("/Bancos/RepIngresosPorComprobar.aspx".ToUpper(), 381) - PaginaDict.Add("/Bancos/Documentos.aspx".ToUpper(), 319) + 'PaginaDict.Add("/Bancos/Documentos.aspx".ToUpper(), 319) PaginaDict.Add("/Bancos/RepCreditos.aspx".ToUpper(), 320) PaginaDict.Add("/Bancos/RepSaldosDAP.aspx".ToUpper(), 385) PaginaDict.Add("/Bancos/DepositosCaja.aspx".ToUpper(), 560) @@ -9310,7 +9333,7 @@ Public Class ClsPaginas PaginaDict.Add("/Ventas/RepLineasAdicionales.aspx".ToUpper(), 1331) PaginaDict.Add("/Ventas/RepLineasAdicionales.aspx?OP=OP".ToUpper(), 1332) - PaginaDict.Add("/Ventas/FacturacionAcarreos.aspx".ToUpper(), 774) + PaginaDict.Add("/Ventas/FacturacionAcarreos.aspx".ToUpper(), 784) PaginaDict.Add("/Ventas/RepIndicadoresPorProyecto.aspx".ToUpper(), 617) diff --git a/App_Code/ClsProductosServicios.vb b/App_Code/ClsProductosServicios.vb index 77ee44b44..368ab5a2f 100644 --- a/App_Code/ClsProductosServicios.vb +++ b/App_Code/ClsProductosServicios.vb @@ -411,7 +411,8 @@ Public Class ClsProductosServicios Optional ClaveCategoriaToxicidad As String = "", Optional ClaveImpuestoTipoProducto As String = "", Optional Litraje As Double = -1, Optional AplicaSerie As Boolean = False, Optional AplicaLote As Boolean = False, Optional AplicaCaducidad As Boolean = False, Optional AplicaSeccion As Boolean = False, Optional TiempoCaducidad As Integer = -1, Optional CvePSAdicionalVigencia As Integer = -1, Optional PrecioLibre As Boolean = False, Optional CveMaterialPeligroso As Integer = -1, Optional CveEmbalaje As Integer = -1, Optional PesoKg As Decimal = -1, Optional Dimensiones As String = "", Optional CveObjetoImpuesto As Integer = 0, - Optional RegistroRSCO As String = "-1", Optional FechaVigenciaRSCO As Date = MinFecha, Optional VigenciaIndeterminadaRSCO As Boolean = False, Optional CveTipoEmpacado As Integer = -1, Optional CveTipoOrganico As Integer = -1) As Integer + Optional RegistroRSCO As String = "-1", Optional FechaVigenciaRSCO As Date = MinFecha, Optional VigenciaIndeterminadaRSCO As Boolean = False, Optional CveTipoEmpacado As Integer = -1, Optional CveTipoOrganico As Integer = -1, + Optional NombreComercial As String = "", Optional NotasAdicionales As String = "", Optional EcommerceEtiquetas As String = "", Optional ActivoEcommerce As Boolean = False, Optional EcommercePrecio As Decimal = 0) As Integer Dim Retorno As Integer = -1 DataAdapter("PA_ProductosServiciosAdd") @@ -509,6 +510,11 @@ Public Class ClsProductosServicios 'Nuevo MLopez 18/11/2022 .Add("@CveTipoEmpacado", SqlDbType.Int).Value = CveTipoEmpacado .Add("@CveTipoOrganico", SqlDbType.Int).Value = CveTipoOrganico + .Add("@NombreComercial", SqlDbType.VarChar).Value = NombreComercial + .Add("@NotasAdicionales", SqlDbType.VarChar).Value = NotasAdicionales + .Add("@EcommerceEtiquetas", SqlDbType.VarChar).Value = EcommerceEtiquetas + .Add("@ActivoEcommerce", SqlDbType.VarChar).Value = ActivoEcommerce + .Add("@EcommercePrecio", SqlDbType.SmallMoney).Value = EcommercePrecio End With @@ -634,7 +640,7 @@ Public Class ClsProductosServicios Return Retorno End Function Public Function UpdatePS(CveClasificacion As Integer, CveClasificacionCosto As Integer, CveUnidadMedida As Integer, Codigo As String, Codigo2 As String, CodigoBarras As String, PS As String, Precio As Double, IVA As Double, RetIVA As Double, Inventariable As Boolean, CveProveedorCompra As Integer, - AplicaParaConcepto As Boolean, AplicaParaVenta As Boolean, Estado As Boolean, CveUsuario As Integer, CvePS As Integer, CveMetodoInventario As Integer, EsPaquete As Integer, CveSATPS As Integer, Optional CveTipoPS As Integer = -1, Optional TipoServicio As Integer = -1, + AplicaParaConcepto As Boolean, AplicaParaVenta As Boolean, Estado As Boolean, CveUsuario As Integer, CvePS As Integer, CveMetodoInventario As Integer, EsPaquete As Integer, CveSATPS As Integer, CveEmpresa As Integer, Optional CveTipoPS As Integer = -1, Optional TipoServicio As Integer = -1, Optional CveClasificacion2 As Integer = -1, Optional CveMarca As Integer = -1, Optional AlmacenSeccion As String = "", Optional AplicaIEPS As Boolean = False, Optional IEPSPorcentaje As Decimal = -1, Optional CveCompuesto As Integer = -1, Optional IEPSGrabaIVA As Boolean = False, Optional VentaMinima As Decimal = 0, Optional CveMoneda As Integer = 1, Optional RetISR As Double = 0, Optional PrecioMinimo As Decimal = Nothing, Optional CveTipoFactor As Integer = 1, @@ -643,7 +649,8 @@ Public Class ClsProductosServicios Optional ClaveCategoriaToxicidad As String = "", Optional ClaveImpuestoTipoProducto As String = "", Optional Litraje As Double = -1, Optional AplicaSerie As Boolean = False, Optional AplicaLote As Boolean = False, Optional AplicaCaducidad As Boolean = False, Optional AplicaSeccion As Boolean = False, Optional TiempoCaducidad As Integer = -1, Optional CvePSAdicionalVigencia As Integer = -1, Optional PrecioLibre As Boolean = False, Optional CveMaterialPeligroso As Integer = -1, Optional CveEmbalaje As Integer = -1, Optional PesoKg As Decimal = -1, Optional Dimensiones As String = "", Optional CveObjetoImpuesto As Integer = 0, - Optional RegistroRSCO As String = "-1", Optional FechaVigenciaRSCO As Date = MinFecha, Optional VigenciaIndeterminadaRSCO As Boolean = False, Optional CveTipoEmpacado As Integer = -1, Optional CveTipoOrganico As Integer = -1) As Boolean + Optional RegistroRSCO As String = "-1", Optional FechaVigenciaRSCO As Date = MinFecha, Optional VigenciaIndeterminadaRSCO As Boolean = False, Optional CveTipoEmpacado As Integer = -1, Optional CveTipoOrganico As Integer = -1, + Optional NombreComercial As String = "", Optional NotasAdicionales As String = "", Optional EcommerceEtiquetas As String = "", Optional ActivoEcommerce As Boolean = False, Optional EcommercePrecio As Decimal = 0) As Boolean Dim Retorno As Boolean = False @@ -677,6 +684,7 @@ Public Class ClsProductosServicios .Add("@IEPSPorcentaje", SqlDbType.SmallMoney).Value = IEPSPorcentaje .Add("@CveCompuesto", SqlDbType.Int).Value = CveCompuesto .Add("@CveSATPS", SqlDbType.Int).Value = CveSATPS + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa 'Nuevo R: 26/09/2017' .Add("@Inventariable", SqlDbType.Bit).Value = Inventariable @@ -740,6 +748,11 @@ Public Class ClsProductosServicios 'Nuevo MLopez 18/11/2022 .Add("@CveTipoEmpacado", SqlDbType.Int).Value = CveTipoEmpacado .Add("@CveTipoOrganico", SqlDbType.Int).Value = CveTipoOrganico + .Add("@NombreComercial", SqlDbType.VarChar).Value = NombreComercial + .Add("@NotasAdicionales", SqlDbType.VarChar).Value = NotasAdicionales + .Add("@EcommerceEtiquetas", SqlDbType.VarChar).Value = EcommerceEtiquetas + .Add("@ActivoEcommerce", SqlDbType.VarChar).Value = ActivoEcommerce + .Add("@EcommercePrecio", SqlDbType.SmallMoney).Value = EcommercePrecio End With diff --git a/App_Code/ClsProspectos.vb b/App_Code/ClsProspectos.vb index 47fe6ac76..08aa72f85 100644 --- a/App_Code/ClsProspectos.vb +++ b/App_Code/ClsProspectos.vb @@ -658,7 +658,7 @@ Public Class ClsProspectos .Add("@CveProspectoEstatus", SqlDbType.Int).Value = CveProspectoEstatus .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa - .Add("@FechaIng", SqlDbType.DateTime).Value = If(FechaIngreso = "-1", Now, FechaIngreso.ToDate) + .Add("@FechaIng", SqlDbType.DateTime).Value = If(FechaIngreso = "-1", ClsPaginas.NowADS(), FechaIngreso.ToDate) .Add("@CveProspecto", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue End With diff --git a/App_Code/ClsRH.vb b/App_Code/ClsRH.vb index 583e57ad7..fcc6dab3f 100644 --- a/App_Code/ClsRH.vb +++ b/App_Code/ClsRH.vb @@ -7085,7 +7085,7 @@ Public Class ClsRH ListaTagsDocumentost.Add(New TagsDocumentos("{Estatura}", DtResultados(0)("Estatura").ToString)) ListaTagsDocumentost.Add(New TagsDocumentos("{Peso}", DtResultados(0)("Peso").ToString)) ListaTagsDocumentost.Add(New TagsDocumentos("{LugarNacimiento}", DtResultados(0)("LugarNacimiento").ToString)) - ListaTagsDocumentost.Add(New TagsDocumentos("{Edad}", If(DtResultados(0)("Edad").ToString = "", If(DtResultados(0)("FechaNacimiento").ToString = "", "", DateDiff(DateInterval.Year, DtResultados(0)("FechaNacimiento").ToString.ToDate, Now.Date).ToString), DtResultados(0)("Edad").ToString))) + ListaTagsDocumentost.Add(New TagsDocumentos("{Edad}", If(DtResultados(0)("Edad").ToString = "", If(DtResultados(0)("FechaNacimiento").ToString = "", "", DateDiff(DateInterval.Year, DtResultados(0)("FechaNacimiento").ToString.ToDate, ClsPaginas.NowADS().Date).ToString), DtResultados(0)("Edad").ToString))) ListaTagsDocumentost.Add(New TagsDocumentos("{NombreTelEmergencia}", DtResultados(0)("NombreTelEmergencia").ToString)) ListaTagsDocumentost.Add(New TagsDocumentos("{TipoSangre}", DtResultados(0)("TipoSangre").ToString)) ListaTagsDocumentost.Add(New TagsDocumentos("{SubProyecto}", DtResultados(0)("SubProyecto").ToString)) @@ -7137,8 +7137,8 @@ Public Class ClsRH ListaTagsDocumentost.Add(New TagsDocumentos("{FechaNacimiento}", DtResultados(0)("FechaNacimiento").ToString.ToDate.ToString("dd/MM/yyyy"))) - Dim fechaActual As String = $" { Now.Day } de { MesTexto(Now.Month) } del año { Now.Year}" - Dim FechaActualDF As String = Now.ToString("dd/MM/yyyy") + Dim fechaActual As String = $" { ClsPaginas.NowADS().Day } de { MesTexto(ClsPaginas.NowADS().Month) } del año { ClsPaginas.NowADS().Year}" + Dim FechaActualDF As String = ClsPaginas.NowADS().ToString("dd/MM/yyyy") ListaTagsDocumentost.Add(New TagsDocumentos("{FechaActual}", fechaActual)) ListaTagsDocumentost.Add(New TagsDocumentos("{FechaActualDF}", FechaActualDF)) diff --git a/App_Code/ClsSisEmpresas.vb b/App_Code/ClsSisEmpresas.vb index 9e12c8c4c..7218f50ce 100644 --- a/App_Code/ClsSisEmpresas.vb +++ b/App_Code/ClsSisEmpresas.vb @@ -440,6 +440,8 @@ Public Class ClsSisEmpresas _Empresa.FielPassword = Data.Rows(0)("FielPassword").ToString _Empresa.FielPFX = Data.Rows(0)("FielPFX").ToString _Empresa._RutaArchivos = Data.Rows(0)("RutaArchivos").ToString + _Empresa.CveZonaHoraria = Data.Rows(0)("CveZonaHoraria").ToString.ToEntero + _Empresa.UTCOffset = Data.Rows(0)("UTCOffset").ToString.ToEntero Else 'Alert("No se encontró la Empresa solicitada.", TipoMensaje.MsgAdvertencia) @@ -467,7 +469,7 @@ Public Class ClsSisEmpresas CIEC As String, CvePlataforma As Integer, UsaAC As Boolean, PorDepreciacion As Decimal, Extension As String, Localidad As String, MetodoInventario As Integer, PeriodoActual As Integer, EjercicioActual As Integer, RH_DefaultAsistencias As Boolean, DiasPermitidos As Integer, TipoCentroCosto As Integer, RequiereCentroCosto As Boolean, PV_TerminalTipo As Integer, Optional CveMetodoPago As Integer = 0, Optional CvePAC As Integer = 0, - Optional RegistroCompleto As Boolean = False + Optional RegistroCompleto As Boolean = False, Optional CveZonaHoraria As Integer = -1 ) As Boolean Dim Retorno As Boolean = False @@ -562,6 +564,7 @@ Public Class ClsSisEmpresas .Add("@RequiereCentroCosto", SqlDbType.Bit).Value = RequiereCentroCosto .Add("@PV_TerminalTipo", SqlDbType.Int).Value = PV_TerminalTipo .Add("@Importe", SqlDbType.Decimal).Value = Importe + .Add("@CveZonaHoraria", SqlDbType.Int).Value = CveZonaHoraria End With @@ -593,7 +596,7 @@ Public Class ClsSisEmpresas Soporte_Server As String, Soporte_Puerto As Integer, Soporte_SSL As Boolean, Soporte_USR As String, Soporte_PWD As String, Soporte_Tipo As String, RegistroPatronal As String, AreaGeografica As String, NombreCorto As String, CURP As String, CveRegimenFiscal As Integer, CvePAC As Integer, Importe As Decimal, CIEC As String, CvePlataforma As Integer, UsaAC As Boolean, PorDepreciacion As Decimal, Extension As String, Localidad As String, MetodoInventario As Integer, - PeriodoActual As Integer, EjercicioActual As Integer, RH_DefaultAsistencias As Boolean, DiasPermitidos As Integer, TipoCentroCosto As Integer, RequiereCentroCosto As Boolean, PV_TerminalTipo As Integer) As Boolean + PeriodoActual As Integer, EjercicioActual As Integer, RH_DefaultAsistencias As Boolean, DiasPermitidos As Integer, TipoCentroCosto As Integer, RequiereCentroCosto As Boolean, PV_TerminalTipo As Integer, Optional CveZonaHoraria As Integer = -1) As Boolean Dim Retorno As Boolean = False @@ -685,6 +688,8 @@ Public Class ClsSisEmpresas .Add("@RequiereCentroCosto", SqlDbType.Bit).Value = RequiereCentroCosto .Add("@PV_TerminalTipo", SqlDbType.Int).Value = PV_TerminalTipo .Add("@Importe", SqlDbType.Decimal).Value = Importe + .Add("@CveZonaHoraria", SqlDbType.Int).Value = CveZonaHoraria + End With Try @@ -1423,7 +1428,7 @@ Public Class ClsSisEmpresas .Add("@AsuntoPlantilla", SqlDbType.VarChar).Value = NombreCampoBDAsuntoPlantilla .Add("@ValorAsuntoPlantilla", SqlDbType.NVarChar).Value = AsuntoValor .Add("@Plantilla", SqlDbType.VarChar).Value = NombreCampoBDPlantilla - .Add("@ValorPlantilla", SqlDbType.NVarChar).Value = HTMLValorPlantilla + .Add("@ValorPlantilla", SqlDbType.VarChar).Value = HTMLValorPlantilla .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa End With Try diff --git a/App_Code/ClsSisNotificaciones.vb b/App_Code/ClsSisNotificaciones.vb index a7169b443..26574baba 100644 --- a/App_Code/ClsSisNotificaciones.vb +++ b/App_Code/ClsSisNotificaciones.vb @@ -758,7 +758,7 @@ Public Class ClsSisNotificaciones ' RptParametro.Add(New ReportParameter("FechaInicio", RowParada("FechaInicio").ToString)) ' RptParametro.Add(New ReportParameter("FechaFin", RowParada("FechaNotificacion").ToString)) ' RptParametro.Add(New ReportParameter("UsuarioImprimio", RowParada("UsuarioImprimio").ToString)) - ' RptParametro.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToShortDateString)) + ' RptParametro.Add(New ReportParameter("FechaImpresion", NowADS().ToShortDateString)) ' RptParametro.Add(New ReportParameter("Grupo", RowParada("Grupo").ToString)) ' Dim RowRep As DataRow = ObjGPS.DtResultados.FiltroPrimero("TipoColumna=1") @@ -866,7 +866,7 @@ Public Class ClsSisNotificaciones RptParametro.Add(New ReportParameter("FechaFin", FechaF.ToShortDateString)) RptParametro.Add(New ReportParameter("MapaURL", "")) RptParametro.Add(New ReportParameter("UsuarioImprimio", Correos)) - RptParametro.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToShortDateString)) + RptParametro.Add(New ReportParameter("FechaImpresion", ClsPaginas.NowADS().ToShortDateString)) Retorno = StreamPDF(Liga, DataSource, RptParametro, "ReporteUltimaPosicion", "PDF", MR:=Nothing, RDSName:="DsOC") Catch ex As Exception @@ -920,7 +920,7 @@ Public Class ClsSisNotificaciones RptParametro.Add(New CrystalParametro("FechaInicio", FechaI.ToString)) RptParametro.Add(New CrystalParametro("FechaFin", FechaF.ToString)) RptParametro.Add(New CrystalParametro("UsuarioImprimio", Correos)) - RptParametro.Add(New CrystalParametro("FechaImpresion", DateTime.Now.ToShortDateString)) + RptParametro.Add(New CrystalParametro("FechaImpresion", ClsPaginas.NowADS().ToShortDateString)) If DataSource.Rows.Count > 0 Then RptParametro.Add(New CrystalParametro("KMRecorridos", $"{DataSource.Rows(0)("KMRecorridos")} KM")) Else @@ -1002,7 +1002,7 @@ Public Class ClsSisNotificaciones RptParametro.Add(New ReportParameter("FechaInicio", FechaI.ToString)) RptParametro.Add(New ReportParameter("FechaFin", FechaF.ToString)) RptParametro.Add(New ReportParameter("UsuarioImprimio", Correos)) - RptParametro.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToShortDateString)) + RptParametro.Add(New ReportParameter("FechaImpresion", ClsPaginas.NowADS().ToShortDateString)) Retorno = StreamPDF(Liga, DataSource, RptParametro, "ReporteIgnicion", "PDF", MR:=Nothing, RDSName:="DsOC") Catch ex As Exception @@ -1075,7 +1075,7 @@ Public Class ClsSisNotificaciones RptParametro.Add(New CrystalParametro("FechaInicio", FechaI.ToString)) RptParametro.Add(New CrystalParametro("FechaFin", FechaF.ToString)) RptParametro.Add(New CrystalParametro("UsuarioImprimio", Correos)) - RptParametro.Add(New CrystalParametro("FechaImpresion", DateTime.Now.ToShortDateString)) + RptParametro.Add(New CrystalParametro("FechaImpresion", ClsPaginas.NowADS().ToShortDateString)) RptParametro.Add(New CrystalParametro("TiempoMuerto", "10 Min")) Retorno = StreamPDFCrystal(Liga, DataSource, RptParametro, NombreReporte, "PDF") @@ -1120,7 +1120,7 @@ Public Class ClsSisNotificaciones RptParametro.Add(New ReportParameter("FechaInicio", FechaI.ToShortDateString)) RptParametro.Add(New ReportParameter("FechaFin", FechaF.ToShortDateString)) RptParametro.Add(New ReportParameter("UsuarioImprimio", Correos)) - RptParametro.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToShortDateString)) + RptParametro.Add(New ReportParameter("FechaImpresion", ClsPaginas.NowADS().ToShortDateString)) Retorno = StreamPDF(Liga, DataSource, RptParametro, "ReporteRalenti", "PDF", MR:=Nothing, RDSName:="DsOC") Catch ex As Exception @@ -1171,7 +1171,7 @@ Public Class ClsSisNotificaciones RptParametro.Add(New CrystalParametro("FechaInicio", FechaI.ToString)) RptParametro.Add(New CrystalParametro("FechaFin", FechaF.ToString)) RptParametro.Add(New CrystalParametro("UsuarioImprimio", Correos)) - RptParametro.Add(New CrystalParametro("FechaImpresion", DateTime.Now.ToShortDateString)) + RptParametro.Add(New CrystalParametro("FechaImpresion", ClsPaginas.NowADS().ToShortDateString)) Retorno = StreamPDFCrystal(Liga, DataSource, RptParametro, "ReporteEvento", "PDF") Catch ex As Exception @@ -1227,7 +1227,7 @@ Public Class ClsSisNotificaciones RptParametro.Add(New ReportParameter("FechaFin", FechaF.ToShortDateString)) RptParametro.Add(New ReportParameter("UsuarioImprimio", Correos)) RptParametro.Add(New ReportParameter("MapaURL", "")) - RptParametro.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToShortDateString)) + RptParametro.Add(New ReportParameter("FechaImpresion", ClsPaginas.NowADS().ToShortDateString)) Retorno = StreamPDF(Liga, DataSource, RptParametro, "ReporteGeoReferencias", "PDF", MR:=Nothing, RDSName:="DsOC") Catch ex As Exception @@ -1247,7 +1247,7 @@ Public Class ClsSisNotificaciones RptParametro.Add(New ReportParameter("FechaFin", FechaF.ToShortDateString)) RptParametro.Add(New ReportParameter("UsuarioImprimio", Correos)) RptParametro.Add(New ReportParameter("MapaURL", "")) - RptParametro.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToShortDateString)) + RptParametro.Add(New ReportParameter("FechaImpresion", ClsPaginas.NowADS().ToShortDateString)) Retorno = StreamPDF(Liga, DataSource, RptParametro, "ReportePuntosInteres", "PDF", MR:=Nothing, RDSName:="DsOC") Catch ex As Exception @@ -1709,7 +1709,7 @@ Public Class ClsSisNotificaciones .lat = Lat, .lng = Lng }, - .timestamp = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + .timestamp = ClsPaginas.NowADS().ToString("yyyy-MM-dd HH:mm:ss") } } } diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index 56877acac..cfa37b684 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -3387,7 +3387,7 @@ Public Class ClsVentas Dim Resp As RespuestaCancelacionSAT = ObjCancelacion.CFDICancelar(Usuario.Empresa, FolioFiscal, Total, RFCReceptor, Usuario.Empresa.RFC) If Resp.Verificado Then - If Not ObjVentas.UpdateEstatusFactura(5, FolioFiscal, ObjCancelacion.CancelacionAcuse, Now, PCveVenta.ToEntero, -1, CvePAC:=Usuario.Empresa.CvePAC) Then + If Not ObjVentas.UpdateEstatusFactura(5, FolioFiscal, ObjCancelacion.CancelacionAcuse, ClsPaginas.NowADS(), PCveVenta.ToEntero, -1, CvePAC:=Usuario.Empresa.CvePAC) Then CveVentasError.Add(PCveVenta.ToEntero) End If Else diff --git a/App_Code/Empresa.vb b/App_Code/Empresa.vb index f1fa5817d..ff38fa730 100644 --- a/App_Code/Empresa.vb +++ b/App_Code/Empresa.vb @@ -134,6 +134,9 @@ Public Class Empresa Public Property FielPassword As String Public Property FielPFX As String Public Property AsuntoPlantillaMailVentaCotizacion As String + + Public Property UTCOffset As Integer + Public Property CveZonaHoraria As Integer Public Property PlantillaMailVentaCotizacion As String Dim Funcionalidades As HybridDictionary 'HybridDictionary, no se puede serializar, por eso no es propiedad, y se utilizar el setfuncionalidad, para asignarle valor diff --git a/App_Code/LogicNominas.vb b/App_Code/LogicNominas.vb index 1bc6491c8..8d486b968 100644 --- a/App_Code/LogicNominas.vb +++ b/App_Code/LogicNominas.vb @@ -426,7 +426,7 @@ Public Class LogicNominas Dim otrp = New CFDINominaOtrosPagos With {.TipoOtroPago = Row("SATCveConcepto").ToString(), .Clave = Row("Codigo").ToString(), .Concepto = Row("Concepto").ToString(), .Importe = Row("Importe").ToString().ToDecimal().Abs(), .Subsidiocausado = Row("ImporteValor").ToString().ToDecimal().Abs()} If Row("SATCveConcepto").ToString().ToEntero() = 4 Then - otrp.ejercicio = DateTime.Now.Year - If(DateTime.Now.Month = 12, 0, 1) + otrp.ejercicio = ClsPaginas.NowADS().Year - If(ClsPaginas.NowADS().Month = 12, 0, 1) otrp.SaldoAFavor = Row("ImporteValor").ToString().ToDecimal().Abs() otrp.RemanenteSalFav = Row("ImporteValor").ToString().ToDecimal().Abs() - Row("Importe").ToString().ToDecimal().Abs() End If @@ -463,7 +463,7 @@ Public Class LogicNominas cfdi.Comprobante.Version = If(versionTimbre = VersionTimbradoEnum.Version4_0, "4.0", "3.3") cfdi.Comprobante.Serie = Serie cfdi.Comprobante.Folio = Folio - cfdi.Comprobante.Fecha = Now + cfdi.Comprobante.Fecha = ClsPaginas.NowADS() cfdi.Comprobante.SubTotal = subTotalDb 'cfdi.Nomina.TotalPercepciones.ToString().ToDecimal() + cfdi.Nomina.TotalOtrosPagos.ToString().ToDecimal() cfdi.Comprobante.Descuentos = cfdi.Nomina.TotalDeducciones.ToString().ToDecimal() diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb index 7860b5459..4ab7ac9a0 100644 --- a/App_Code/Modelos.vb +++ b/App_Code/Modelos.vb @@ -562,12 +562,12 @@ Namespace Modelos Me.MonedaSAT = ClsPaginas.GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", $"CveMoneda = {CveMoneda} ") Me.RefDocto = "" ' Me.CveMesa = -1 - Me.Fecha = Now + Me.Fecha = ClsPaginas.NowADS() Me.CvePrePoliza = -1 - Me.FechaPago = Now + Me.FechaPago = ClsPaginas.NowADS() Me.MotivoDescuento = "" Me.Observaciones = "" - Me.FechaEjecucion = Now + Me.FechaEjecucion = ClsPaginas.NowADS() Me.CveCondicionEntrega = -1 Me.CondicionEntrega = "" Me.NumeroCuenta = "" @@ -1292,12 +1292,12 @@ Namespace Modelos ObjFactura.CveMoneda = CveMoneda ObjFactura.Moneda = ClsPaginas.GlobalDTMonedas.FiltroPrimeroValor("Moneda", $"CveMoneda = {ObjFactura.CveMoneda} ") ObjFactura.MonedaSAT = ClsPaginas.GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", $"CveMoneda = {ObjFactura.CveMoneda}") - ObjFactura.TipoCambio = If(ObjFactura.CveMoneda = 1, 1, ClsPaginas.GlobalTipoCambio(Now).ToDecimal()) + ObjFactura.TipoCambio = If(ObjFactura.CveMoneda = 1, 1, ClsPaginas.GlobalTipoCambio(ClsPaginas.NowADS()).ToDecimal()) ObjFactura.TipoDocto = "Ing" ObjFactura.RefDocto = "" ObjFactura.Folio = -1 ObjFactura.Serie = "-1" - ObjFactura.Fecha = Now + ObjFactura.Fecha = ClsPaginas.NowADS() ObjFactura.CvePrePoliza = -1 ObjFactura.CveMetodoPago = 1 ObjFactura.MetodoPago = "Efectivo" @@ -2942,7 +2942,7 @@ Namespace Modelos Dim CveMovimiento As Integer = -1 Try Dim CveConceptoSalidaUsado As Integer = 45 - Dim tFecha As DateTime = Now + Dim tFecha As DateTime = ClsPaginas.NowADS() CveMovimiento = ObjInventario.AddMovimiento(CveAlmacenUsado, CveConceptoSalidaUsado, 1, tFecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, factura.CveVenta, factura.CveSubProyecto, CveActivoFijo:=-1, Guia:="", Observaciones:="", CvePersonal:=-1, CveCliente:=factura.CveCliente, CveClienteSucursal:=-1, Modulo:="M/CU") If CveMovimiento <= 0 Then @@ -3140,7 +3140,7 @@ Namespace Modelos Dim TCFluctuacion As Decimal = tipoCambio 'TOMA EL TC DE LA ULTIMA FLUCTUACION If ValorMultiplicador = -1 AndAlso esMesAnterior AndAlso UsuarioActual.Empresa.Funcionalidad(703) = "1" AndAlso ObjFactura.CveMoneda = 2 Then - Dim UltimaFluctuacion As ClsPaginas.MTipoCambioFluctuacion = ClsPaginas.GlobalTipoCambioUltimaFluctuacion(Now) + Dim UltimaFluctuacion As ClsPaginas.MTipoCambioFluctuacion = ClsPaginas.GlobalTipoCambioUltimaFluctuacion(ClsPaginas.NowADS()) If UsuarioActual.Empresa.Funcionalidad(703) = "1" AndAlso UltimaFluctuacion IsNot Nothing Then If UltimaFluctuacion.FechaFluctuacion <= FechaCancelacion Then @@ -4274,7 +4274,7 @@ Namespace Modelos End If ' GENERA EL MOVIMIENTO DE GARANTIA SI TIENE - If Not GenerarMovimientoGarantia(14, "Entrada Garantía", Now, factura, ObjAcum, ObjInventario, ObjConta) Then + If Not GenerarMovimientoGarantia(14, "Entrada Garantía", ClsPaginas.NowADS(), factura, ObjAcum, ObjInventario, ObjConta) Then OcurrioError = True End If @@ -4532,7 +4532,7 @@ Namespace Modelos Dim ContadorMovtosDetalles As Integer = 0 'Creamos el movimiento - Dim CveMovimientoInventario As Integer = ObjInventario.AddMovimiento(CveAlmacen, ConceptoEntrada, CveMoneda, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta, -1, -1, CveMovimientoRelacionado:=CveMovimientoRelacionado, Modulo:="Mod/M2") + Dim CveMovimientoInventario As Integer = ObjInventario.AddMovimiento(CveAlmacen, ConceptoEntrada, CveMoneda, ClsPaginas.NowADS(), -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta, -1, -1, CveMovimientoRelacionado:=CveMovimientoRelacionado, Modulo:="Mod/M2") If CveMovimientoInventario > 0 Then @@ -5061,7 +5061,7 @@ Namespace Modelos End If 'CANCELA FACTURA - If Month(factura.Fecha) = Month(Now) OrElse BanderaGeneraNC = True Then + If Month(factura.Fecha) = Month(ClsPaginas.NowADS()) OrElse BanderaGeneraNC = True Then If CancelarFactura(ObjVentas, ObjConta, ObjBancos) Then Obj.Add(factura) Else @@ -5069,7 +5069,7 @@ Namespace Modelos End If Else FacturaDevolucion.TipoDocto = "Egs" - FacturaDevolucion.Fecha = Now + FacturaDevolucion.Fecha = ClsPaginas.NowADS() If RegistrarNC(ObjVentas, ObjConta, ObjInventario, ObjContr, FacturaDevolucion, ObjBancos, TmpDTconceptos, ObjEventos) Then Obj.Add(FacturaDevolucion) Else @@ -5420,13 +5420,13 @@ Namespace Modelos CancelacionFecha = xmlAcuse.SelectSingleNode("Acuse").Attributes("Fecha").Value.ToDate() CveEstatus = 5 Else - CancelacionFecha = Now.Date + CancelacionFecha = ClsPaginas.NowADS().Date CancelacionAcuse = "" CveEstatus = 5 End If Catch ex As Exception GuardaLog(ex.ToString()) - CancelacionFecha = Now.Date + CancelacionFecha = ClsPaginas.NowADS().Date CancelacionAcuse = "" End Try @@ -5436,7 +5436,7 @@ Namespace Modelos If Resp.Verificado Then 'GENERAMOS EL ACUSE Y MANDAMOS MAIL DE CON EL ACUSE DE CANCELACIÓN If RequiereAceptacion Then - CancelacionFecha = Now.Date + CancelacionFecha = ClsPaginas.NowADS().Date CveEstatus = 20 Else CancelacionFecha = ObjCancelacion.CancelacionFecha @@ -5478,7 +5478,7 @@ Namespace Modelos CveEstatus = 20 ContinuarCancelacion = False RequiereAceptacion = True - CancelacionFecha = Now.Date + CancelacionFecha = ClsPaginas.NowADS().Date CancelacionAcuse = "" End If End If @@ -5491,7 +5491,7 @@ Namespace Modelos Else ObtenerAcuse = False ContinuarCancelacion = True - CancelacionFecha = Now.Date + CancelacionFecha = ClsPaginas.NowADS().Date CancelacionAcuse = "" 'VERICA SI YA SE TIENE EL ESTADO DE CANCELACION, PARA SABER SI REQUIERE ACEPTACION @@ -5502,7 +5502,7 @@ Namespace Modelos RequiereAceptacion = True End If Else - Dim diasTimbrado As Decimal = DateDiff(DateInterval.Day, ObjFactura.FechaCP, Now) + Dim diasTimbrado As Decimal = DateDiff(DateInterval.Day, ObjFactura.FechaCP, ClsPaginas.NowADS()) If ObjFactura.Total < 1000D OrElse diasTimbrado <= 1 OrElse ObjFactura.Cliente.RFC.Contiene("XAXX010101000", "XEXX010101000") Then RequiereAceptacion = False @@ -5517,7 +5517,7 @@ Namespace Modelos If Resp.Verificado Then 'GENERAMOS EL ACUSE Y MANDAMOS MAIL DE CON EL ACUSE DE CANCELACIÓN 'If Resp.cve Then - ' CancelacionFecha = Now.Date + ' CancelacionFecha = ClsPaginas.NowADS().Date ' CveEstatus = 20 'Else ' CancelacionFecha = ObjCancelacion.CancelacionFecha @@ -5534,16 +5534,16 @@ Namespace Modelos Return Retorno End If Else - CancelacionFecha = Now.Date + CancelacionFecha = ClsPaginas.NowADS().Date CancelacionAcuse = "" End If End If Else - CancelacionFecha = Now.Date + CancelacionFecha = ClsPaginas.NowADS().Date CancelacionAcuse = "" End If Else - CancelacionFecha = Now.Date + CancelacionFecha = ClsPaginas.NowADS().Date CancelacionAcuse = "" End If Catch ex As Exception @@ -5558,7 +5558,7 @@ Namespace Modelos End Try Else CveEstatus = CveEstatusFacturaAsignado - CancelacionFecha = If(IsDate(FechaCancelacion), FechaCancelacion, Now.ToString("dd/MM/yyyy")).ToDateTime() + CancelacionFecha = If(IsDate(FechaCancelacion), FechaCancelacion, ClsPaginas.NowADS().ToString("dd/MM/yyyy")).ToDateTime() CancelacionAcuse = AcuseCancelacion End If @@ -5794,7 +5794,7 @@ Namespace Modelos 'SI TIENE SALDO PENDIENTE POR DEVOLVER GENERA UN MOVIMIENTO DE DEVOLUCION If ObjFactura.SaldoAlmacen <> 0 Then 'SALIDA DE ALMACEN - SALIDA POR TRASPASO CUANDO ES REMISION - DEVOLUCION (SI ES TRASPASO Y TIENE CONTRATO NO HACE DEVOLUCIóN) - CveMovimientoDevolucion = ObjInventario.AddMovimiento(CveAlmacenMovimiento, CveConceptoMovimiento, 1, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta, -1, -1, Observaciones:="", Guia:="", CveContrato:=CveContrato, CveAlmacenDestino:=-1, CveMovimientoRelacionado:=CveMovimientoSalida, Modulo:="Mod/CV1") + CveMovimientoDevolucion = ObjInventario.AddMovimiento(CveAlmacenMovimiento, CveConceptoMovimiento, 1, ClsPaginas.NowADS(), -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta, -1, -1, Observaciones:="", Guia:="", CveContrato:=CveContrato, CveAlmacenDestino:=-1, CveMovimientoRelacionado:=CveMovimientoSalida, Modulo:="Mod/CV1") Folio = ObjInventario.Folio If CveMovimientoDevolucion > 0 Then @@ -5837,7 +5837,7 @@ Namespace Modelos End If If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa) Then - Dim Fecha As Date = Now + Dim Fecha As Date = ClsPaginas.NowADS() Dim CveCliente As Integer = ObjVentas.DtResultados(0)("CveCliente").ToString.ToEntero Dim ClienteNombre As String = ObjVentas.DtResultados(0)("ClienteNombre").ToString Dim SerieFolio As String = ObjVentas.DtResultados(0)("SerieFolio").ToString @@ -5890,7 +5890,7 @@ Namespace Modelos End If End If Else - ErrorCancelar = True + ErrorCancelar = True MensajeError = "Ocurrió un Error al ingresar las prepolizas" End If End If @@ -6025,7 +6025,7 @@ Namespace Modelos 'CANCELAR MOVIMIENTOS DE GARANTIA SI TIENE If Not ErrorCancelar AndAlso UsuarioActual.Empresa.Funcionalidad(531) = "1" Then - If Not GenerarMovimientoGarantia(15, "Salida Garantía", Now, ObjRemision, ObjAcum, ObjInventario, ObjConta) Then + If Not GenerarMovimientoGarantia(15, "Salida Garantía", ClsPaginas.NowADS(), ObjRemision, ObjAcum, ObjInventario, ObjConta) Then ErrorCancelar = True End If End If @@ -6134,7 +6134,7 @@ Namespace Modelos 'CANCELAR MOVIMIENTOS DE GARANTIA SI TIENE If Not ErrorCancelar AndAlso UsuarioActual.Empresa.Funcionalidad(531) = "1" Then - If Not GenerarMovimientoGarantia(15, "Salida Garantía", Now, ObjFactura, ObjAcum, ObjInventario, ObjConta) Then + If Not GenerarMovimientoGarantia(15, "Salida Garantía", ClsPaginas.NowADS(), ObjFactura, ObjAcum, ObjInventario, ObjConta) Then ErrorCancelar = True End If End If @@ -6297,7 +6297,7 @@ Namespace Modelos End If Else If Not ObjVentas.UpdateEstatusFactura(CveEstatus, FolioFiscal, CancelacionAcuse, CancelacionFecha, CveVenta, IDPoliza, CvePAC:=CvePACCancelacion, CveEstatusRefacturacion:=CveEstatusRefacturacion, - CveUsuarioCambiaEstatus:=UsuarioActual.CveUsuario, FechaCambioEstatus:=Now.ToString("yyyy-MM-dd HH:mm:ss.mmm"), CveMotivoCancelacion:=CveMotivoCancelacion, + CveUsuarioCambiaEstatus:=UsuarioActual.CveUsuario, FechaCambioEstatus:=ClsPaginas.NowADS().ToString("yyyy-MM-dd HH:mm:ss.mmm"), CveMotivoCancelacion:=CveMotivoCancelacion, MotivoCancelacion:=MotivoCancelacion, EstadoCancelacion:=EstadoCancelacion, CveEstadoCancelacion:=CveEstadoCancelacion, SelloSolicitudDigitalSAT:=SolicitudCancelacionAcuse) Then ErrorCancelar = True MensajeError = "Ocurrió un error al guardar el estatus de cancelación." @@ -6418,7 +6418,7 @@ Namespace Modelos Dim CveMovimientoRelacionadoVirtual As Integer = CveMovimiento If DtPSVirtual IsNot Nothing AndAlso DtPSVirtual.Rows.Count > 0 AndAlso CveAlmacenVirtual > 0 AndAlso CveConceptoMovimientoVirtual > 0 Then - CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, CveConceptoMovimientoVirtual, 1, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta, -1, -1, + CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, CveConceptoMovimientoVirtual, 1, ClsPaginas.NowADS(), -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta, -1, -1, Observaciones:="", Guia:="", CveMovimientoRelacionado:=CveMovimientoRelacionadoVirtual, Modulo:="Modelos/CancelarVirtual") If CveMovimientoVirtual > 0 Then @@ -6497,7 +6497,7 @@ Namespace Modelos Dim CveMovimientoRelacionadoVirtual As Integer = CveMovimientoDevolucion If DtPSVirtual IsNot Nothing AndAlso DtPSVirtual.Rows.Count > 0 AndAlso CveAlmacenVirtual > 0 AndAlso CveConceptoMovimientoVirtual > 0 Then - CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, CveConceptoMovimientoVirtual, 1, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta, -1, -1, + CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, CveConceptoMovimientoVirtual, 1, ClsPaginas.NowADS(), -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta, -1, -1, Observaciones:="", Guia:="", CveMovimientoRelacionado:=CveMovimientoRelacionadoVirtual, Modulo:="Modelos/CancelarVirtual") If CveMovimientoVirtual > 0 Then @@ -6585,11 +6585,11 @@ Namespace Modelos End If 'SALIDA GENERAL - CveMovimientoSalidaDevRem = ObjInventario.AddMovimiento(CveAlmacenDevolucion, 8, 1, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, DrMovtos("CveRem").ToString.ToEntero, -1, -1, Observaciones:="", Guia:="", CveContrato:=CveContrato, CveMovimientoRelacionado:=CveMovimiento, CveAlmacenDestino:=CveAlmacenTraspasoDestinoDevRem, Modulo:="Mod/ExAR1") + CveMovimientoSalidaDevRem = ObjInventario.AddMovimiento(CveAlmacenDevolucion, 8, 1, ClsPaginas.NowADS(), -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, DrMovtos("CveRem").ToString.ToEntero, -1, -1, Observaciones:="", Guia:="", CveContrato:=CveContrato, CveMovimientoRelacionado:=CveMovimiento, CveAlmacenDestino:=CveAlmacenTraspasoDestinoDevRem, Modulo:="Mod/ExAR1") FolioMovimientoSalidaDevRem = ObjInventario.Folio 'ENTRADA ADELANTADO - CveMovimientoEntradaDevRem = ObjInventario.AddMovimiento(CveAlmacenTraspasoDestinoDevRem, 9, 1, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, DrMovtos("CveRem").ToString.ToEntero, -1, -1, Observaciones:="", Guia:="", CveContrato:=CveContrato, CveMovimientoRelacionado:=CveMovimientoSalidaDevRem, CveAlmacenDestino:=CveAlmacenDevolucion, Modulo:="Mod/ExAR2") + CveMovimientoEntradaDevRem = ObjInventario.AddMovimiento(CveAlmacenTraspasoDestinoDevRem, 9, 1, ClsPaginas.NowADS(), -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, DrMovtos("CveRem").ToString.ToEntero, -1, -1, Observaciones:="", Guia:="", CveContrato:=CveContrato, CveMovimientoRelacionado:=CveMovimientoSalidaDevRem, CveAlmacenDestino:=CveAlmacenDevolucion, Modulo:="Mod/ExAR2") FolioMovimientoEntradaDevRem = ObjInventario.Folio If Not (CveMovimientoSalidaDevRem > 0 And CveMovimientoEntradaDevRem > 0) Then @@ -6666,7 +6666,7 @@ Namespace Modelos Dim CveMovimientoEntradaDevRem As Integer = 0 Dim FolioMovimientoEntradaDevRem As Integer = 0 - Dim Fecha As DateTime = Now + Dim Fecha As DateTime = ClsPaginas.NowADS() 'SALIDA DE (ENTREGA POR ADELANTADO) CveMovimientoSalidaDevRem = ObjInventario.AddMovimiento(CveAlmacen, 8, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveRemision, -1, -1, Observaciones:="", Guia:="", CveContrato:=CveContrato, CveAlmacenDestino:=CveAlmacenDestino, Modulo:="Mod/CancExAR1") @@ -6773,7 +6773,7 @@ Namespace Modelos For Each Dr As DataRow In DtTempApartados.Rows If CveMovimientoSalidaApartado = -1 Or CveAlmacenApartado <> Dr("CveAlmacen").ToString.ToEntero Then - CveMovimientoSalidaApartado = ObjInventario.AddMovimiento(CveAlmacenOrigen, 8, 1, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta, -1, -1, Observaciones:="", Guia:="", CveContrato:=CveContrato, CveVendedor:=1, CveCliente:=CveCliente, CveAlmacenDestino:=Dr("CveAlmacen").ToString.ToEntero, Modulo:="Mod/Apar1") + CveMovimientoSalidaApartado = ObjInventario.AddMovimiento(CveAlmacenOrigen, 8, 1, ClsPaginas.NowADS(), -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta, -1, -1, Observaciones:="", Guia:="", CveContrato:=CveContrato, CveVendedor:=1, CveCliente:=CveCliente, CveAlmacenDestino:=Dr("CveAlmacen").ToString.ToEntero, Modulo:="Mod/Apar1") FolioSalida = ObjInventario.Folio CveAlmacenApartado = Dr("CveAlmacen").ToString.ToEntero @@ -6800,7 +6800,7 @@ Namespace Modelos For Each Dr1 As DataRow In DtTraspasos.Rows CveMovimientoSalida = Dr1("CveMovimientoSalida").ToString.ToEntero - CveMovimientoEntradaApartado = ObjInventario.AddMovimiento(Dr1("CveAlmacen").ToString.ToEntero, 9, 1, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta, -1, -1, Observaciones:="", CveAlmacenDestino:=CveAlmacenDevolucion, CveMovimientoRelacionado:=CveMovimientoSalida, Guia:="", CveContrato:=CveContrato, CveVendedor:=-1, CveCliente:=CveCliente, Modulo:="Mod/Apar2") + CveMovimientoEntradaApartado = ObjInventario.AddMovimiento(Dr1("CveAlmacen").ToString.ToEntero, 9, 1, ClsPaginas.NowADS(), -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta, -1, -1, Observaciones:="", CveAlmacenDestino:=CveAlmacenDevolucion, CveMovimientoRelacionado:=CveMovimientoSalida, Guia:="", CveContrato:=CveContrato, CveVendedor:=-1, CveCliente:=CveCliente, Modulo:="Mod/Apar2") FolioEntrada = ObjInventario.Folio If Not CveMovimientoEntradaApartado > 0 Then @@ -6859,7 +6859,7 @@ Namespace Modelos End If - CvePrePoliza = ObjConta.AddPrePolizas("Modelos/GuardaEstatus", CvePlantillaPoliza, Me.Total, Me.Total, Me.CveMoneda, Now, Me.Cliente.NombreComercial, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + CvePrePoliza = ObjConta.AddPrePolizas("Modelos/GuardaEstatus", CvePlantillaPoliza, Me.Total, Me.Total, Me.CveMoneda, ClsPaginas.NowADS(), Me.Cliente.NombreComercial, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) FacturaDevolucion.CveVenta = CveVenta FacturaDevolucion.CvePrePoliza = CvePrePoliza @@ -6879,7 +6879,7 @@ Namespace Modelos If CveEstatus = 4 Then - If ObjVentas.UpdateEstatusFactura(CveEstatus, FolioFiscal, "", Now, CveVenta, IDPoliza) Then + If ObjVentas.UpdateEstatusFactura(CveEstatus, FolioFiscal, "", ClsPaginas.NowADS(), CveVenta, IDPoliza) Then Mensaje = "El nuevo estatus se guardó correctamente" Else ErrorCancelar = True @@ -6901,7 +6901,7 @@ Namespace Modelos Dim Total As Decimal = Me.Total Dim RFCReceptor As String = Me.Cliente.RFC - If Not ObjVentas.UpdateEstatusFactura(13, FolioFiscal, "", Now, CveVenta, IDPoliza) Then 'Marcamos la factura como refacturada, si no se cancelo en el SAT el estatus nos dejara cancelarla despues + If Not ObjVentas.UpdateEstatusFactura(13, FolioFiscal, "", ClsPaginas.NowADS(), CveVenta, IDPoliza) Then 'Marcamos la factura como refacturada, si no se cancelo en el SAT el estatus nos dejara cancelarla despues ErrorCancelar = True End If @@ -6920,7 +6920,7 @@ Namespace Modelos 'End If If Not ErrorCancelar Then - If ObjVentas.UpdateEstatusFactura(CveEstatus, FolioFiscal, ObjCancelacion.CancelacionAcuse, Now, CveVenta, IDPoliza, CvePAC:=UsuarioActual.Empresa.CvePAC) Then + If ObjVentas.UpdateEstatusFactura(CveEstatus, FolioFiscal, ObjCancelacion.CancelacionAcuse, ClsPaginas.NowADS(), CveVenta, IDPoliza, CvePAC:=UsuarioActual.Empresa.CvePAC) Then Mensaje = "El nuevo estatus se guardó correctamente" Else ErrorCancelar = True @@ -7007,7 +7007,7 @@ Namespace Modelos ' Else ' Dim DTPresupuestoIngresos As New DataTable ' Dim AC As New ClsAC - ' If AC.GetPresupuestoIngresos(-1, Now.Year, True, UsuarioActual.CveEmpresa) Then + ' If AC.GetPresupuestoIngresos(-1, ClsPaginas.NowADS().Year, True, UsuarioActual.CveEmpresa) Then ' DTPresupuestoIngresos = AC.DtResultados.Copy() ' End If ' AC.Dispose() @@ -7115,7 +7115,7 @@ Namespace Modelos Public Property CvePAC As Integer Public Property CveAnticipo As Integer Public Property RemisionesLista As List(Of Integer) - Public Property CveAlmacen As Integer + Public Property CveAlmacen As Integer = -1 Public Property GenerarSalidaAlmacen As Boolean = False Public Property CveConceptoMovimiento As Integer Public Property MovimientoObservaciones As String @@ -7202,7 +7202,7 @@ Namespace Modelos Public ReadOnly Property FechaCP As DateTime Get If Me.SubProyecto IsNot Nothing Then - If Now.EsHorarioVerano Then + If ClsPaginas.NowADS().EsHorarioVerano Then Return DateTime.UtcNow.AddHours(Me.SubProyecto.UTCOffsetVerano) Else Return DateTime.UtcNow.AddHours(Me.SubProyecto.UTCOffsetInvierno) @@ -7323,7 +7323,7 @@ Namespace Modelos Public Property TipoCambioDolares As Decimal Public Property ConvertirPesos As Boolean Public Property ConvertirDolares As Boolean - Public Property FormaPago As Integer + Public Property FormaPago As Integer = 0 Public ReadOnly Property FormaPagoText As String Get @@ -7338,7 +7338,7 @@ Namespace Modelos End Get End Property - Public Property CondicionesPago As Integer + Public Property CondicionesPago As Integer = 0 ' 0 - Contado, 1 - Credito (CHECAR) Public ReadOnly Property CondicionesPagoText As String Get @@ -7589,10 +7589,10 @@ Namespace Modelos Public Property NumeroContrato As String = "" Public Property PedidoContrato As String = "" Public Property OrdenCompra As String = "" - Public Property CveMetodoPago As Integer + Public Property CveMetodoPago As Integer = 0 Public Property MetodoPago As String = "" Public Property ClaveMetodoPagoSAT As String = "" - Public Property CveMetodoPago33 As Integer + Public Property CveMetodoPago33 As Integer = 1 Public Property MetodoPago33 As String = "" Public Property CveFormaPago33 As Integer Public Property MetodoPagoSAT33 As String = "" diff --git a/App_Code/Thalamus.vb b/App_Code/Thalamus.vb index a8a3c4468..a5dcde4ca 100644 --- a/App_Code/Thalamus.vb +++ b/App_Code/Thalamus.vb @@ -16,7 +16,7 @@ Public Class Thalamus Public Function GenerarArchivos(CveEmpresa As Integer) As Boolean - Dim RutaArchivoVentas As String = $"C:\Temp\Ventas{Now.ToString("yyyyMMdd")}.xlsx" + Dim RutaArchivoVentas As String = $"C:\Temp\Ventas{ClsPaginas.NowADS().ToString("yyyyMMdd")}.xlsx" Dim DTVentas As New DataTable DTVentas.Columns.Add("systemId") @@ -34,7 +34,7 @@ Public Class Thalamus dr(0) = $"systemId {x}" dr(1) = $"Branch {x}" dr(2) = $"{x}" - dr(3) = $"{Now.ToString("yyyy-MM-dd")}" + dr(3) = $"{ClsPaginas.NowADS().ToString("yyyy-MM-dd")}" dr(4) = $"{x}" dr(5) = $"{x}.00" dr(6) = $"{x}" diff --git a/App_Code/Timbrado.vb b/App_Code/Timbrado.vb index c99190c6a..567b98f93 100644 --- a/App_Code/Timbrado.vb +++ b/App_Code/Timbrado.vb @@ -252,255 +252,6 @@ Public Class Timbrado MsgCancelacion.AppendFormat("CvePAC:{0}", CvePACCancelacion) Select Case CvePACCancelacion - Case 1 - MsgCancelacion.AppendFormat("1.1") - Try - Dim CFDi As New ClbNegBICFDv3_2.ClsNegEDI - Dim Respuesta As New ClbNegBICFDv3_2.ClsNegRespuesta - Respuesta = CFDi.CancelaCFdi(Empresa.BIUsuario, Empresa.BIContraseña, Empresa.Ruta & "Certificados\" & Empresa.ArchivoPfx, Empresa.ContraseñaKey, Empresa.RFC, FolioFiscal, "http://portalbiinform.com.mx/srvCFDi/service1.asmx") - - If Respuesta IsNot Nothing AndAlso Respuesta.SelloSAT <> "" Then - Dim xml64 As String = "" - Dim myXml As String = Respuesta.SelloSAT - Dim resp As XElement = XElement.Parse(myXml) - For Each elem As XElement In resp.Descendants - If elem.Name = "xmlBase64" Then xml64 = elem.Value - Next - - 'If Respuesta.UUDI.Contiene("0", "201", "202") Then - Dim xmlDoc As New System.Xml.XmlDocument() - xmlDoc.LoadXml(If(xml64 = "", Respuesta.SelloSAT, Encoding.UTF8.GetString(Convert.FromBase64String(xml64)))) - Dim AcuseChild = xmlDoc.ChildNodes.Cast(Of XmlNode).Where(Function(a) a.Name.Equals("Acuse", StringComparison.CurrentCultureIgnoreCase)).FirstOrDefault() - - Dim FoliosChild = AcuseChild.ChildNodes.Cast(Of XmlNode).Where(Function(a) a.LocalName.Equals("Folios", StringComparison.CurrentCultureIgnoreCase)).FirstOrDefault() - Dim SignatureChild = AcuseChild.ChildNodes.Cast(Of XmlNode).Where(Function(a) a.LocalName.Equals("Signature", StringComparison.CurrentCultureIgnoreCase)).FirstOrDefault() - - Dim prefixFol As String = FoliosChild.Prefix - If prefixFol <> "" Then prefixFol = $"{prefixFol}:" 'se le agregan los ":" si tiene prefijo - - CancelacionState = xmlDoc.GetElementsByTagName($"{prefixFol}EstatusUUID")(0).InnerText.ToEntero - 'verificación basada en el resultado del xml. - If CancelacionState.Contiene(201, 202) Then - - Dim prefixSig = SignatureChild.Prefix - If prefixSig <> "" Then prefixSig = $"{prefixSig}:" 'se le agregan los ":" si tiene prefijo - Dim SignatureValue = xmlDoc.GetElementsByTagName($"{prefixSig}SignatureValue") - CancelacionAcuse = If(SignatureValue.Count < 1, SignatureValue(0).InnerText, SignatureValue(0).InnerText) - Try - CancelacionFecha = AcuseChild.Attributes("Fecha").Value.ToDate - Catch ex As Exception - CancelacionFecha = xmlDoc.GetElementsByTagName("CancelaCFDResult")(0).Attributes("Fecha").Value.ToDate - End Try - - Retorno.Verificado = True - Retorno.CancelacionFecha = CancelacionFecha - Retorno.CancelacionAcuse = CancelacionAcuse - End If - - 'End If - - Else - Me.GuardaLog(CFDi.MsgError) - End If - Respuesta = Nothing - CFDi = Nothing - Catch ex As Exception - GuardaLog($"{ex.Message}") - End Try - - Case 2 - MsgCancelacion.AppendFormat("2.1") - Dim ArchivoLLave As String = $"{Empresa.Ruta}Certificados\{Empresa.ArchivoKey}" - Dim ArchivoCertificado As String = $"{Empresa.Ruta}Certificados\{Empresa.ArchivoCer}" - Dim UsuarioServicio As String = If(CvePACCancelacion = 2, Empresa.RFC, "rene.molina@adsistemas.mx") - Dim ClaveServicio As String = If(CvePACCancelacion = 2, Empresa.RFC.ToLower, "rene2018") - Dim Clave As String = Empresa.ContraseñaKey - Dim UrlServicio As String = "" ' Produccion - Select Case CvePACCancelacion - Case 2 - UrlServicio = "http://generacfdi.com.mx/rvltimbrado/service1.asmx?WSDL" - Case 4 - UrlServicio = "http://192.168.0.2:8080/ADSistemas/Timbrado.asmx?WSDL" - End Select - - If Not Empresa.FacturaProduccion Then - ArchivoLLave = $"{Empresa.Ruta}Certificados\CSD01_AAA010101AAA.key" - ArchivoCertificado = $"{Empresa.Ruta}Certificados\CSD01_AAA010101AAA.cer" - Select Case CvePACCancelacion - Case 2 - UsuarioServicio = "fgomez" - ClaveServicio = "12121212" - UrlServicio = "http://generacfdi.com.mx/rvltimbrado/service1.asmx?WSDL" - Case 4 - UsuarioServicio = "UserTest" - ClaveServicio = "1234567890" - UrlServicio = "http://192.168.0.2:8080/ADSistemas/Timbrado.asmx?WSDL" - End Select - End If - -#Region "Valida" - If Not File.Exists(ArchivoCertificado) Then - Alert("El archivo de certificado no existe", TipoMensaje.MsgError) - Retorno.Verificado = False - End If - If Not File.Exists(ArchivoLLave) Then - Alert("El archivo de llave privada no existe", TipoMensaje.MsgError) - Retorno.Verificado = False - End If - If Empresa.ContraseñaKey = "" Then - Alert("La clave no puede ser vacía", TipoMensaje.MsgError) - Retorno.Verificado = False - End If -#End Region - -#Region "Variables" - Dim llaveByte As Byte(), certByte As Byte() - Dim llaveBase64 As String = "", certBase64 As String = "" - Dim cfdi As New RVCFDI.GeneraCFDI() - Dim complemento As String = "" - Dim complementoConcepto As String = "" - -#End Region - -#Region "Verifica" - Try - llaveByte = System.IO.File.ReadAllBytes(ArchivoLLave) - llaveBase64 = Convert.ToBase64String(llaveByte) - Catch ex As Exception - Alert($"Error al leer la llave privada: {ex.Message}", TipoMensaje.MsgError) - Retorno.Verificado = False - End Try - - - Try - certByte = System.IO.File.ReadAllBytes(ArchivoCertificado) - certBase64 = Convert.ToBase64String(certByte) - Catch ex As Exception - Alert($"Error al leer el certificado: {ex.Message}", TipoMensaje.MsgError) - Retorno.Verificado = False - End Try -#End Region - - - Dim base64 As String - Dim ObjCancelacion As New RVCancelacion.Cancelacion() - - Dim xmlCancelacion As String = ObjCancelacion.crearXMLCancelacion(certBase64, llaveBase64, Clave, FolioFiscal) - If (ObjCancelacion.MensajeDeError = "") Then - - base64 = CodificarABase64(xmlCancelacion) - - Dim objWS As RVCFDI.WSGeneraCFDI.Service = Nothing - Dim objAuthSoapHD As RVCFDI.WSGeneraCFDI.AuthSoapHd - Dim objResponse As RVCFDI.WSGeneraCFDI.StructCfd - Dim objCancel As RVCFDI.WSGeneraCFDI.StructCancel - - Try - - - 'Variables de consumo de servicio web - objWS = New RVCFDI.WSGeneraCFDI.Service() - objAuthSoapHD = New RVCFDI.WSGeneraCFDI.AuthSoapHd() - 'creacion de Autorizacion de cabecera Soap - objCancel = New RVCFDI.WSGeneraCFDI.StructCancel() - 'Configura el servicio - objWS.Url = UrlServicio - - objAuthSoapHD.strPassword = ClaveServicio - objAuthSoapHD.strUserName = UsuarioServicio - 'Coloca la cabecera - objWS.AuthSoapHdValue = objAuthSoapHD - 'Obtiene el resultado - objCancel = objWS.CancelTicket(base64) - 'Valida la respuesta - ''Codigos del SAT - ''201 - El folio se ha cancelado con éxito. - ''202 - El CFDI ya había sido cancelado previamente. - ''203 - UUID no corresponde al emisor. - ''204 - El CFDI no aplica para cancelación. - ''205 - El UUID no existe o no ha sido procesado por el SAT. - ''402 - El Contribuyente no se encuentra el la LCO o la validez de obligaciones se reporta como negativa. - CancelacionState = objCancel.state - CancelacionMensaje = objCancel.Descripcion - - If objCancel.state.Contiene(0, 201, 202) Then - CancelacionFecha = Now - - Select Case CvePACCancelacion - Case 2 - Dim solicitud As New WSRVConsultas.Service1SoapClient - Dim resp As New WSRVConsultas.resp_Acuse() - resp = solicitud.ConsultarAcuseCancelacion(RFCEmisor, UsuarioServicio, ClaveServicio, FolioFiscal, CancelacionFecha.ToShortDateString) - CancelacionMensaje = objCancel.Descripcion - - If (resp.Estado = 0) Then - - Dim xmlDoc As New System.Xml.XmlDocument() - xmlDoc.LoadXml(Encoding.UTF8.GetString(Convert.FromBase64String(resp.Xml))) - Dim xpath As String = "Acuse/Folios" - Dim nodes As XmlNodeList = xmlDoc.SelectNodes(xpath) - CancelacionState = xmlDoc.GetElementsByTagName("EstatusUUID")(0).InnerText.ToEntero - - xpath = "Acuse/Signature" - nodes = xmlDoc.SelectNodes(xpath) - - CancelacionAcuse = xmlDoc.GetElementsByTagName("SignatureValue")(0).InnerText - CancelacionFecha = xmlDoc.SelectSingleNode("Acuse").Attributes("Fecha").Value.ToDate - Retorno.Verificado = True - Retorno.CancelacionFecha = CancelacionFecha - Retorno.CancelacionAcuse = CancelacionAcuse - Else - CancelacionAcuse = resp.MensajeDeError - Retorno.Verificado = True - Retorno.CancelacionFecha = CancelacionFecha - Retorno.CancelacionAcuse = CancelacionAcuse - End If - solicitud = Nothing - Case 4 - - Dim solicitud As New WSGF.Service1SoapClient - Dim resp As New WSGF.StructXml() - resp = solicitud.GetAcuse(RFCEmisor, UsuarioServicio, ClaveServicio, FolioFiscal) - CancelacionMensaje = objCancel.Descripcion - - If (resp.Estado = 0) Then - - Dim xmlDoc As New System.Xml.XmlDocument() - xmlDoc.LoadXml(Encoding.UTF8.GetString(Convert.FromBase64String(resp.CfdiB64))) - Dim xpath As String = "Acuse/Folios" - Dim nodes As XmlNodeList = xmlDoc.SelectNodes(xpath) - CancelacionState = xmlDoc.GetElementsByTagName("EstatusUUID")(0).InnerText.ToEntero - - xpath = "Acuse/Signature" - nodes = xmlDoc.SelectNodes(xpath) - - CancelacionAcuse = xmlDoc.GetElementsByTagName("SignatureValue")(0).InnerText - CancelacionFecha = xmlDoc.SelectSingleNode("Acuse").Attributes("Fecha").Value.ToDate - Retorno.Verificado = True - Retorno.CancelacionFecha = CancelacionFecha - Retorno.CancelacionAcuse = CancelacionAcuse - Else - CancelacionAcuse = resp.Descripcion - Retorno.Verificado = True - Retorno.CancelacionAcuse = CancelacionAcuse - End If - solicitud = Nothing - End Select - - - End If - Catch ex As Exception - CancelacionMensaje += $" | ex: {ex}" - Retorno.Verificado = False - End Try - - 'Libera memoria - objWS.Dispose() - objResponse = Nothing - objAuthSoapHD = Nothing - GC.Collect() - End If - Case 3 MsgCancelacion.AppendFormat("3.1") @@ -522,7 +273,6 @@ Public Class Timbrado AmbienteProductivo = False End If - #Region "Valida" If Not File.Exists(ArchivoCertificado) Then Alert("El archivo de certificado no existe", TipoMensaje.MsgError) @@ -537,7 +287,6 @@ Public Class Timbrado Retorno.Verificado = False End If #End Region - Dim conector As New Profact.TimbraCFDI40.Conector(AmbienteProductivo) If Not AmbienteProductivo Then @@ -545,16 +294,17 @@ Public Class Timbrado Else conector.EstableceCredenciales("vSGxMFWnNRy/nDoowxqrqw==|Sia123654") End If - MsgCancelacion.AppendFormat("-3.2") - Dim resultadoCancelacion As Profact.TimbraCFDI.ResultadoCancelacion - resultadoCancelacion = conector.CancelaCFDI40(RFCEmisor, FolioFiscal, CodigoSATMotivoCancelacion, FolioSustitucion) - CancelacionFecha = Now Dim resp As Profact.TimbraCFDI.ResultadoConsulta + MsgCancelacion.AppendFormat("-3.2") + Dim resultadoCancelacion As Profact.TimbraCFDI.ResultadoCancelacionAck + resultadoCancelacion = conector.CancelaCFDIAck40(RFCEmisor, FolioFiscal, CodigoSATMotivoCancelacion, FolioSustitucion) + CancelacionFecha = ClsPaginas.NowADS() + resp = conector.ObtieneCFDI(RFCEmisor, FolioFiscal) MsgCancelacion.AppendFormat("-3.3") 'VERIFICA SI SE CANCELO O FUE CANCELADO PREVIAMENTE (CODIGO DE ERROR "330279") - If resultadoCancelacion.Exitoso OrElse resultadoCancelacion.NumeroError.Contiene("202", "330279") Then + If resultadoCancelacion.Exitoso OrElse resultadoCancelacion.NumeroError.Contiene("202", "330279", "330280") Then MsgCancelacion.AppendFormat("-3.4") CancelacionMensaje = resultadoCancelacion.Descripcion Retorno.CancelacionFecha = CancelacionFecha @@ -563,7 +313,7 @@ Public Class Timbrado MsgCancelacion.AppendFormat("-3.4.1") Try - xmlDoc.LoadXml(Encoding.UTF8.GetString(Convert.FromBase64String(resp.Xml))) + xmlDoc.LoadXml(Encoding.UTF8.GetString(Convert.FromBase64String(resultadoCancelacion.Xml))) Catch ex As Exception If resp.NumeroError.ToEntero() > 0 Then CancelacionMensaje = resp.Descripcion @@ -592,13 +342,11 @@ Public Class Timbrado Else Retorno.Verificado = False End If - - Else MsgCancelacion.AppendFormat("-3.5") CancelacionAcuse = resp.NumeroError CancelacionMensaje = resultadoCancelacion.Descripcion - Retorno.Verificado = True + Retorno.Verificado = False End If Case 4 @@ -610,7 +358,6 @@ Public Class Timbrado Dim Clave As String = Empresa.ContraseñaKey Dim UrlServicio As String = "" ' Produccion - 'UrlServicio = "http://alterno.gofac.com.mx/cfdi/timbrado.asmx?WSDL" ' alterno UrlServicio = "https://cfdi.gofac.com.mx/timbrado.asmx?WSDL" If Not Empresa.FacturaProduccion Then @@ -620,9 +367,7 @@ Public Class Timbrado UsuarioServicio = "UserTest" ClaveServicio = "1234567890" 'UrlServicio = "http://juancalderon-001-site6.ftempurl.com/cancelacion.asmx?WSDL" - End If - #Region "Valida" If Not File.Exists(ArchivoCertificado) Then Alert("El archivo de certificado no existe", TipoMensaje.MsgError) @@ -644,8 +389,6 @@ Public Class Timbrado Dim objCan As New GoFac.GoCfdi() Dim complemento As String = "" Dim complementoConcepto As String = "" - - #End Region #Region "Verifica" @@ -656,8 +399,6 @@ Public Class Timbrado Alert($"Error al leer la llave privada: {ex.Message}", TipoMensaje.MsgError) Retorno.Verificado = False End Try - - Try certByte = System.IO.File.ReadAllBytes(ArchivoCertificado) certBase64 = Convert.ToBase64String(certByte) @@ -667,7 +408,7 @@ Public Class Timbrado End Try #End Region objCan.CancelacionCfdi = True - objCan.FechaCancelacion = System.DateTime.Now.AddMinutes(-120) ' operación requerida para que no se presente problemas con fechas adelantadas del PAC + objCan.FechaCancelacion = ClsPaginas.NowADS().AddMinutes(-120) ' operación requerida para que no se presente problemas con fechas adelantadas del PAC MsgCancelacion.AppendFormat("4.3-") objCan.GeneraCancelacionB64(certBase64, llaveBase64, Clave, FolioFiscal, CodigoSATMotivoCancelacion, FolioSustitucion) If (objCan.MensajeError = "") Then @@ -759,11 +500,11 @@ Public Class Timbrado If result IsNot Nothing Then If result.statusOk Then - Dim cancelacion = result.cancelaciones.First() + Dim cancelacion As PADECancelacion = result.cancelaciones.First() If cancelacion IsNot Nothing Then 'EN PROCESO, CANCELABLE SIN ACEPTACION,CANCEALDO PREVIAMENTE If cancelacion.codigo.Contiene("96", "201", "202") Then - CancelacionFecha = Now + CancelacionFecha = ClsPaginas.NowADS() CancelacionAcuse = result.acuseCancelBase64 Retorno.Verificado = True @@ -1549,7 +1290,7 @@ Public Class Timbrado Dim y As Integer = 0 - For Each Tras In ObjCFDITimbre.Traslados + For Each Tras As CFDITraslados In ObjCFDITimbre.Traslados comprobante.Impuestos.Traslados(y) = New Profact.TimbraCFDI40.ComprobanteImpuestosTraslado() comprobante.Impuestos.Traslados(y).Base = Tras.Base.RoundSQL(NumDecimalesImporte) comprobante.Impuestos.Traslados(y).Impuesto = Tras.Impuesto @@ -1588,7 +1329,7 @@ Public Class Timbrado If ObjCFDITimbre.RetencionesLocales.Sum(Function(x) x.Importe) > 0 Then - Dim Imp = New Profact.TimbraCFDI.Complementos.ImpuestoLocal.ImpuestosLocales() + Dim Imp As New Profact.TimbraCFDI.Complementos.ImpuestoLocal.ImpuestosLocales() Imp.version = "1.0" Imp.TotaldeRetenciones = ObjCFDITimbre.RetencionesLocales.Sum(Function(x) x.Importe).FormatoNumero().ToDecimal Imp.TotaldeTraslados = 0 @@ -2064,7 +1805,7 @@ Public Class Timbrado Dim j As Integer = 0 ComCartaPorte.Mercancias.Mercancia(i).CantidadTransporta = New ProfactCartaPorte.CartaPorteMercanciasMercanciaCantidadTransporta(Carta.Mercancias.Mercancias.Count - 1) {} - For Each transp In concep.MercanciasCantidadTransporta + For Each transp As CFDICartaPorteMercanciaTransporta In concep.MercanciasCantidadTransporta ComCartaPorte.Mercancias.Mercancia(i).CantidadTransporta(j) = New ProfactCartaPorte.CartaPorteMercanciasMercanciaCantidadTransporta ComCartaPorte.Mercancias.Mercancia(i).CantidadTransporta(j).Cantidad = transp.Cantidad ComCartaPorte.Mercancias.Mercancia(i).CantidadTransporta(j).IDOrigen = transp.IDOrigen @@ -2484,7 +2225,7 @@ Public Class Timbrado If Not String.IsNullOrEmpty(resultadoTimbre.Detalle) Then Try - Dim Resultados = Newtonsoft.Json.Linq.JArray.Parse(resultadoTimbre.Detalle) + Dim Resultados As JArray = Newtonsoft.Json.Linq.JArray.Parse(resultadoTimbre.Detalle) If Resultados.Count > 0 Then If resultadoTimbre.Descripcion.Contains("RFC del receptor no existe") Then @@ -2620,13 +2361,13 @@ Public Class Timbrado If ObjCFDITimbre.Retenciones.Sum(Function(x) x.Importe) > 0 Then ''se acumulan los importes - For Each Ret In ObjCFDITimbre.Retenciones + For Each Ret As CFDIRetenciones In ObjCFDITimbre.Retenciones cfdi.Retencion(Ret.Impuesto, Ret.Importe) Next End If ''se acumulan los importes - For Each Tras In ObjCFDITimbre.Traslados + For Each Tras As CFDITraslados In ObjCFDITimbre.Traslados cfdi.Traslado(Tras.Base, Tras.Impuesto, Tras.TipoFactor, Tras.TasaOCuota, Tras.Importe) Next #End Region @@ -2791,7 +2532,7 @@ Public Class Timbrado For Each concep As CFDICartaPorteMercancia In Carta.Mercancias.Mercancias If concep.ValorMercancia <= 0 Then concep.Moneda = "" cfdi.CartaPorteMercancia(concep.BienesTransp, concep.ClaveSTCC, concep.Descripción, concep.Cantidad, concep.ClaveUnidad, concep.Unidad, concep.Dimensiones, concep.MaterialPeligroso, concep.ClaveMaterialPeligroso, If(concep.ClaveMaterialPeligroso <> "", concep.Embalaje, ""), If(concep.ClaveMaterialPeligroso <> "", concep.DescripEmbalaje, ""), concep.PesoenKg, concep.ValorMercancia, concep.Moneda, concep.FraccionArrancelaria, concep.UUIDComercioExt) - For Each transp In concep.MercanciasCantidadTransporta + For Each transp As CFDICartaPorteMercanciaTransporta In concep.MercanciasCantidadTransporta cfdi.CartaPorteCantidadTransporta(transp.Cantidad, transp.IDOrigen, transp.IDDestino, transp.CvesTransportes) Next Next @@ -3380,11 +3121,11 @@ Public Class Timbrado #Region "Timbra" If RespGeneracionXML = "" Then 'OBTENER EL XML DE LA VARIABLE PRIVADA "_xml" YA QUE NO ES ACCESIBLE POR MEDIO DE LA PROPIEDAD "XML" ANTES DE TIMBRAR - Dim valorXML = "" + Dim valorXML As String = "" Try - Dim tipo = GetType(GoFac.Cfdi4) - Dim info = tipo.GetField("_xml", BindingFlags.NonPublic Or BindingFlags.Instance) + Dim tipo As Type = GetType(GoFac.Cfdi4) + Dim info As FieldInfo = tipo.GetField("_xml", BindingFlags.NonPublic Or BindingFlags.Instance) valorXML = info?.GetValue(cfdi).ToString() Catch ex As Exception valorXML = "" @@ -3589,8 +3330,8 @@ Public Class Timbrado Dim ArchivoW As StreamWriter Dim strLineaTMP As String - ' strLineaTMP = Chr(13) & Chr(10) & Day(Now) & "/" & Month(Now) & "/" & Year(Now) & " " & Hour(Now) & ":" & Minuto & ". " & Str & Chr(13) & Chr(10) - strLineaTMP = String.Format("{0}{1} .. PAC: {2} - {3} ..{4}:{5}", Chr(13), Chr(10), CvePAC, Str, DateTime.Now.ToShortDateString, DateTime.Now.ToShortTimeString) + ' strLineaTMP = Chr(13) & Chr(10) & Day(NowADS()) & "/" & Month(NowADS()) & "/" & Year(NowADS()) & " " & Hour(NowADS()) & ":" & Minuto & ". " & Str & Chr(13) & Chr(10) + strLineaTMP = String.Format("{0}{1} .. PAC: {2} - {3} ..{4}:{5}", Chr(13), Chr(10), CvePAC, Str, ClsPaginas.NowADS().ToShortDateString, ClsPaginas.NowADS().ToShortTimeString) Try ArchivoW = New StreamWriter(String.Format("{0}\LogTimbrado.txt", AppDomain.CurrentDomain.BaseDirectory), True, System.Text.Encoding.UTF8) Catch ex As UnauthorizedAccessException diff --git a/App_Code/Timbres.vb b/App_Code/Timbres.vb index 70a2d5346..ceee944a6 100644 --- a/App_Code/Timbres.vb +++ b/App_Code/Timbres.vb @@ -56,9 +56,9 @@ Public Class Timbres ObjFactura.TipoDocto = TipoDocto ObjFactura.TipoComprobante = "T" - ObjFactura.Fecha = Now - ObjFactura.FechaPago = Now - ObjFactura.FechaEjecucion = Now + ObjFactura.Fecha = ClsPaginas.NowADS() + ObjFactura.FechaPago = ClsPaginas.NowADS() + ObjFactura.FechaEjecucion = ClsPaginas.NowADS() ObjFactura.UsuarioCreo = UsuarioActual.Usuario ObjFactura.TipoDocumento = "Traspaso" diff --git a/App_Code/Usuario.vb b/App_Code/Usuario.vb index 4cc510cf0..a0adb072c 100644 --- a/App_Code/Usuario.vb +++ b/App_Code/Usuario.vb @@ -71,9 +71,9 @@ Public Class Usuario Public ReadOnly Property FechaActualCliente As DateTime Get If UTCOffset <> 0 Then - FechaActualCliente = DateTime.Now.AddMinutes(UTCOffset + 10) + FechaActualCliente = ClsPaginas.NowADS().AddMinutes(UTCOffset + 10) Else - FechaActualCliente = DateTime.Now + FechaActualCliente = ClsPaginas.NowADS() End If End Get End Property @@ -256,10 +256,10 @@ Namespace ADSSession If Not IsNothing(HttpContext.Current) AndAlso Not IsNothing(HttpContext.Current.Session) AndAlso Not IsNothing(HttpContext.Current.Session(strsessionid)) Then obj = DirectCast(HttpContext.Current.Session(strsessionid), ADSSessionObj) obj.Modulo = modulo - obj.LastPostback = DateTime.Now + obj.LastPostback = ClsPaginas.NowADS() If _dicSessionobj.TryGetValue(obj.SessionID, obj) Then obj.Modulo = modulo - obj.LastPostback = DateTime.Now + obj.LastPostback = ClsPaginas.NowADS() End If retorno = obj End If @@ -321,7 +321,7 @@ Namespace ADSSession Public Sub New(CveUsuario As Integer, CveEmpresa As Integer) Me.CveUsuario = CveUsuario Me.CveEmpresa = CveEmpresa - FechaLogin = DateTime.Now + FechaLogin = ClsPaginas.NowADS() _SessionID = "" _ipAdrres = "" Try diff --git a/App_Code/WS/WSSIGVentas.vb b/App_Code/WS/WSSIGVentas.vb index 981381e7c..6aa25860c 100644 --- a/App_Code/WS/WSSIGVentas.vb +++ b/App_Code/WS/WSSIGVentas.vb @@ -24,8 +24,8 @@ Namespace SIG Dim respuesta As Data.DataTable = Nothing 'New With {.Correcto = False, .Mensaje = "", .Datos = New JObject} Dim CveCliente As Integer = -1 - Dim FechaI As DateTime = DateTime.Now - Dim FechaF As DateTime = DateTime.Now + Dim FechaI As DateTime = ClsPaginas.NowADS() + Dim FechaF As DateTime = ClsPaginas.NowADS() Dim CveIE As Integer = -1 Dim CveVenta As Integer = -1 Dim opcion As Integer = -1 @@ -67,7 +67,7 @@ Namespace SIG respuesta.AcceptChanges() Dim thencommit As Boolean = True Banco.IniciaTransacSQL() - If Banco.AddComplementoPagosSinc(CveUsuario, DateTime.Now.ToString("yyyy/MM/dd"), CveEmpresa) Then + If Banco.AddComplementoPagosSinc(CveUsuario, ClsPaginas.NowADS().ToString("yyyy/MM/dd"), CveEmpresa) Then Dim CveComplementoPagoSinc As Integer = Banco.DtResultados.Rows(0)("CveComplementoPagoSinc").ToString().ToEntero() For Each dr As System.Data.DataRow In respuesta.Select("CveVenta Is NULL") 'CveComplementoPagoTimbre = Banco.AddComplementoPago(dr("CveIE").ToString().ToEntero(), -1, Serie, Folio, Me.CveUsuario, CveEmpresa, CvePrePoliza:=-1, Estatus:=1) diff --git a/App_Code/WS/WSUSer.vb b/App_Code/WS/WSUSer.vb index c6a207031..9f8f2f502 100644 --- a/App_Code/WS/WSUSer.vb +++ b/App_Code/WS/WSUSer.vb @@ -25,7 +25,7 @@ Namespace SIG DateTime.TryParseExact(String.Format("{0} {1}", dataArray(2), dataArray(3)), "ddMMyyyy HHmm", New Globalization.CultureInfo("es-MX"), Globalization.DateTimeStyles.None, FechaPeticion) Dim CveEmpresa As Integer = dataArray(4).ToEntero() - Dim diferencia As Double = (FechaPeticion - DateTime.Now).TotalMinutes + Dim diferencia As Double = (FechaPeticion - ClsPaginas.NowADS()).TotalMinutes Token = diferencia.ToString("N0").ToEntero() End If End If diff --git a/App_Code/WS/WsUtility.vb b/App_Code/WS/WsUtility.vb index f5cd97649..df875f411 100644 --- a/App_Code/WS/WsUtility.vb +++ b/App_Code/WS/WsUtility.vb @@ -25,7 +25,7 @@ ' FechaPeticion = FechaPeticion.AddMinutes(Token) ' Dim CveEmpresa As Integer = dataArray(4) - ' Dim diferencia As Integer = Math.Abs((FechaPeticion - DateTime.Now).TotalMinutes) + ' Dim diferencia As Integer = Math.Abs((FechaPeticion - NowADS()).TotalMinutes) ' If diferencia < 30 Then ' noautorizado = False ' End If diff --git a/App_Code/WsSIGWeb.vb b/App_Code/WsSIGWeb.vb index cee8000b4..d2c3bfe73 100644 --- a/App_Code/WsSIGWeb.vb +++ b/App_Code/WsSIGWeb.vb @@ -19,7 +19,7 @@ Public Class WsSIGWeb End Function Private Function notcurrentdate(fecha As DateTime) As Boolean - Return Not (fecha > (DateTime.Now).AddMinutes(-15) And fecha < (DateTime.Now).AddMinutes(15)) + Return Not (fecha > (ClsPaginas.NowADS()).AddMinutes(-15) And fecha < (ClsPaginas.NowADS()).AddMinutes(15)) End Function diff --git a/App_Code/modExtensiones.vb b/App_Code/modExtensiones.vb index 0f5df56a9..644e8ed38 100644 --- a/App_Code/modExtensiones.vb +++ b/App_Code/modExtensiones.vb @@ -297,8 +297,8 @@ Namespace Extensiones End If Catch End Try - ' strLineaTMP = Chr(13) & Chr(10) & Day(Now) & "/" & Month(Now) & "/" & Year(Now) & " " & Hour(Now) & ":" & Minuto & ". " & Str & Chr(13) & Chr(10) - strLineaTMP = String.Format("{0}{1}Log: {5}{2}{3}:{4}", Chr(13), Chr(10), Str, DateTime.Now.ToShortDateString, DateTime.Now.ToShortTimeString, Urlstring) + ' strLineaTMP = Chr(13) & Chr(10) & Day(NowADS()) & "/" & Month(NowADS()) & "/" & Year(NowADS()) & " " & Hour(NowADS()) & ":" & Minuto & ". " & Str & Chr(13) & Chr(10) + strLineaTMP = String.Format("{0}{1}Log: {5}{2}{3}:{4}", Chr(13), Chr(10), Str, ClsPaginas.NowADS().ToShortDateString, ClsPaginas.NowADS().ToShortTimeString, Urlstring) Try ArchivoW = New StreamWriter(String.Format("{0}\Log\Log.txt", AppDomain.CurrentDomain.BaseDirectory), True, System.Text.Encoding.UTF8) Catch ex As UnauthorizedAccessException @@ -326,7 +326,7 @@ Namespace Extensiones Public Sub GuardaLogAD(Mensaje As String, Optional Archivo As String = "Log") Dim ArchivoW As StreamWriter - Dim MensajeFormato = String.Format("{0}{1}Log: {2} | Fecha:{3}", Chr(13), Chr(10), Mensaje, Now.ToString("dd/MM/yyyy HH:mm")) + Dim MensajeFormato = String.Format("{0}{1}Log: {2} | Fecha:{3}", Chr(13), Chr(10), Mensaje, ClsPaginas.NowADS().ToString("dd/MM/yyyy HH:mm")) Try ArchivoW = New StreamWriter(String.Format("{0}\Log\{1}.txt", AppDomain.CurrentDomain.BaseDirectory, Archivo), True, System.Text.Encoding.UTF8) @@ -352,7 +352,7 @@ Namespace Extensiones Dim strLineaTMP As String - strLineaTMP = String.Format("{0} {0}{3}{2}:{1}{0}", Chr(13), DateTime.Now.ToShortDateString, DateTime.Now.ToShortTimeString, pTexto) + strLineaTMP = String.Format("{0} {0}{3}{2}:{1}{0}", Chr(13), ClsPaginas.NowADS().ToShortDateString, ClsPaginas.NowADS().ToShortTimeString, pTexto) Try ArchivoW = New StreamWriter(String.Format("{0}\Log\Log.txt", AppDomain.CurrentDomain.BaseDirectory), True, System.Text.Encoding.UTF8) Catch ex As Exception @@ -372,7 +372,7 @@ Namespace Extensiones Public Sub GuardaLogMail(pTexto As String) Dim ArchivoW As StreamWriter Dim strLineaTMP As String - strLineaTMP = String.Format("{0} {1}:{2} {3} {0}", Chr(13), DateTime.Now.ToShortDateString, DateTime.Now.ToShortTimeString, pTexto) + strLineaTMP = String.Format("{0} {1}:{2} {3} {0}", Chr(13), ClsPaginas.NowADS().ToShortDateString, ClsPaginas.NowADS().ToShortTimeString, pTexto) Try ArchivoW = New StreamWriter(String.Format("{0}\Log\LogMail.txt", AppDomain.CurrentDomain.BaseDirectory), True, System.Text.Encoding.UTF8) Catch ex As Exception @@ -391,8 +391,8 @@ Namespace Extensiones Dim ArchivoW As StreamWriter Dim strLineaTMP As String - ' strLineaTMP = Chr(13) & Chr(10) & Day(Now) & "/" & Month(Now) & "/" & Year(Now) & " " & Hour(Now) & ":" & Minuto & ". " & Str & Chr(13) & Chr(10) - strLineaTMP = String.Format("{0}{1} .. PAC: {2} - Modulo: {3} ..{4}:{5}", Chr(13), Chr(10), CvePAC, Modulo, Str, DateTime.Now.ToShortDateString, DateTime.Now.ToShortTimeString) + ' strLineaTMP = Chr(13) & Chr(10) & Day(NowADS()) & "/" & Month(NowADS()) & "/" & Year(NowADS()) & " " & Hour(NowADS()) & ":" & Minuto & ". " & Str & Chr(13) & Chr(10) + strLineaTMP = String.Format("{0}{1} .. PAC: {2} - Modulo: {3} ..{4}:{5}", Chr(13), Chr(10), CvePAC, Modulo, Str, ClsPaginas.NowADS().ToShortDateString, ClsPaginas.NowADS().ToShortTimeString) Try ArchivoW = New StreamWriter(String.Format("{0}\Log\LogTimbrado.txt", AppDomain.CurrentDomain.BaseDirectory), True, System.Text.Encoding.UTF8) Catch ex As UnauthorizedAccessException @@ -414,7 +414,7 @@ Namespace Extensiones Public Sub GuardaLogCancelacionSAT(pTexto As String) Dim ArchivoW As StreamWriter Dim strLineaTMP As String - strLineaTMP = String.Format("{0} {1}:{2} {3} {0}", Chr(13), DateTime.Now.ToShortDateString, DateTime.Now.ToShortTimeString, pTexto) + strLineaTMP = String.Format("{0} {1}:{2} {3} {0}", Chr(13), ClsPaginas.NowADS().ToShortDateString, ClsPaginas.NowADS().ToShortTimeString, pTexto) Try ArchivoW = New StreamWriter(String.Format("{0}\Log\LogCancelacionSAT.txt", AppDomain.CurrentDomain.BaseDirectory), True, System.Text.Encoding.UTF8) @@ -458,7 +458,7 @@ Namespace Extensiones If System.Web.HttpContext.Current IsNot Nothing AndAlso System.Web.HttpContext.Current.CurrentHandler IsNot Nothing AndAlso System.Web.HttpContext.Current.CurrentHandler.GetType().IsSubclassOf(GetType(Page)) Then Dim Titulo As String = "" - Dim Plus As String = DateTime.Now.Ticks.ToString + Dim Plus As String = ClsPaginas.NowADS().Ticks.ToString Dim headerclas As String = "" Dim showalert = True @@ -545,7 +545,7 @@ Namespace Extensiones script = String.Format("alertatoast({3},'{0}',function(){{{1}}},{2});", Mensaje, JSBtnAceptar, TimeoutToast, DirectCast(pOpcion, Integer)) End If - ScriptManager.RegisterStartupScript(Pag, Pag.GetType(), String.Format("Alert{0}", (DateTime.Now.Ticks + 1).ToString()), script, True) + ScriptManager.RegisterStartupScript(Pag, Pag.GetType(), String.Format("Alert{0}", (ClsPaginas.NowADS().Ticks + 1).ToString()), script, True) Pag = Nothing Catch ex As Exception Mensaje.GuardaLog(String.Format("Error Alert : {0}", Mensaje)) @@ -561,7 +561,7 @@ Namespace Extensiones If System.Web.HttpContext.Current IsNot Nothing AndAlso System.Web.HttpContext.Current.CurrentHandler IsNot Nothing Then Dim Img, Botones As String Dim Titulo As String - Dim Plus As String = DateTime.Now.Ticks.ToString + Dim Plus As String = ClsPaginas.NowADS().Ticks.ToString Mensaje = Mensaje.Replace("'"c, "\'").Replace(vbCrLf, "") JSBtnAceptar = JSBtnAceptar.Replace("'"c, "\'") @@ -587,8 +587,8 @@ Namespace Extensiones Try Dim Pag As Page = DirectCast(System.Web.HttpContext.Current.CurrentHandler, Page) - 'ScriptManager.RegisterStartupScript(Pag, Pag.GetType(), (DateTime.Now.Ticks + 1).ToString(), "MuestraAlert('" & Alerta.ToString() & "', '" & Plus & "');", True) - ScriptManager.RegisterStartupScript(Pag, Pag.GetType(), (DateTime.Now.Ticks + 1).ToString(), String.Format("MuestraAlerta('{0}','{1}','{2}','{3}','{4}');", Titulo, Mensaje, Img, Botones, JSBtnAceptar), True) + 'ScriptManager.RegisterStartupScript(Pag, Pag.GetType(), (NowADS().Ticks + 1).ToString(), "MuestraAlert('" & Alerta.ToString() & "', '" & Plus & "');", True) + ScriptManager.RegisterStartupScript(Pag, Pag.GetType(), (ClsPaginas.NowADS().Ticks + 1).ToString(), String.Format("MuestraAlerta('{0}','{1}','{2}','{3}','{4}');", Titulo, Mensaje, Img, Botones, JSBtnAceptar), True) Pag = Nothing Catch ex As Exception @@ -1782,7 +1782,7 @@ Namespace Extensiones Public Sub GeneraChequePDF(pCveIE As Integer, tEmpresa As Empresa, Optional IDPoliza As Integer = -1, Optional MuestraAlert As Boolean = True) Dim Folio, Observacion, UsuarioRegistro, TextoImporte, PagueseA, Ruta, Banco, NumCuenta, AbonoCuenta, SubProyecto, NotificarA, RefCrediproveedor As String - Dim FechaExpedicion As Date = Now + Dim FechaExpedicion As Date = ClsPaginas.NowADS() Dim Importe As Double Dim tCveEmpresa As Integer = tEmpresa.CveEmpresa Dim CveTipoTransaccion, CveProveedor, CvePersonal As Integer @@ -2100,7 +2100,7 @@ Namespace Extensiones worksheet.Rows(IndexEndTable + 1).Cells(1).Value = Usuario.Nombre worksheet.Rows(IndexEndTable).Cells(3).Value = "Fecha Impresión" - worksheet.Rows(IndexEndTable + 1).Cells(3).Value = DateTime.Now.ToString("dd/MM/yyyy") + worksheet.Rows(IndexEndTable + 1).Cells(3).Value = ClsPaginas.NowADS().ToString("dd/MM/yyyy") Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", Usuario.Empresa.Ruta)) @@ -2430,7 +2430,7 @@ Namespace Extensiones worksheet.Rows(IndexEndTable + 1).Cells(2).Value = Usuario.Nombre worksheet.Rows(IndexEndTable).Cells(6).Value = "Fecha Impresión" - worksheet.Rows(IndexEndTable + 1).Cells(6).Value = DateTime.Now.ToString("dd/MM/yyyy") + worksheet.Rows(IndexEndTable + 1).Cells(6).Value = ClsPaginas.NowADS().ToString("dd/MM/yyyy") Dim Imagen As New System.IO.FileInfo($"{Usuario.Empresa.Ruta}/Logo.png") @@ -2523,7 +2523,7 @@ Namespace Extensiones worksheet.Rows(IndexEndTable + 1).Cells(2).Value = Usuario.Nombre worksheet.Rows(IndexEndTable).Cells(6).Value = "Fecha Impresión" - worksheet.Rows(IndexEndTable + 1).Cells(6).Value = DateTime.Now.ToString("dd/MM/yyyy") + worksheet.Rows(IndexEndTable + 1).Cells(6).Value = ClsPaginas.NowADS().ToString("dd/MM/yyyy") Dim Imagen As New System.IO.FileInfo($"{Usuario.Empresa.Ruta}/Logo.png") @@ -2889,7 +2889,7 @@ Namespace Extensiones If fechaI IsNot Nothing Or fechaF IsNot Nothing Then table.AddCell(New Element.Paragraph(String.Format("Inicio: {0} Fin: {1}", fechaI, fechaF)).SetFontSize(10)) Else - table.AddCell(New Element.Paragraph(String.Format("Fecha: {0}", Now.ToString("dd/MM/yyyy HH:mm"))).SetFontSize(10)) + table.AddCell(New Element.Paragraph(String.Format("Fecha: {0}", ClsPaginas.NowADS().ToString("dd/MM/yyyy HH:mm"))).SetFontSize(10)) End If document.Add(Borderless(table)) 'FIN ENCABEZADO @@ -2905,7 +2905,7 @@ Namespace Extensiones 'SECCIÓN PIE REPORTE table = New Element.Table(UnitValue.CreatePercentArray(New Single() {2, 1.25})) table.AddCell(New Element.Paragraph("Usuario imprimió: " + usuario.Nombre).SetFontSize(9)) - table.AddCell(New Element.Paragraph("Fecha de impresión: " + Now.ToString("dd/MM/yyyy")).SetTextAlignment(TextAlignment.RIGHT).SetFontSize(9)) + table.AddCell(New Element.Paragraph("Fecha de impresión: " + ClsPaginas.NowADS().ToString("dd/MM/yyyy")).SetTextAlignment(TextAlignment.RIGHT).SetFontSize(9)) document.Add(Borderless(table)) 'FIN PIE @@ -2915,7 +2915,7 @@ Namespace Extensiones If fechaI IsNot Nothing Or fechaF IsNot Nothing Then HttpContext.Current.Response.AddHeader("content-disposition", String.Format("attachment;filename={0} {1} a {2}.pdf", nombreReporte, fechaI.ToDate.ToString("dd-MM-yyyy"), fechaF.ToDate.ToString("dd-MM-yyyy"))) Else - HttpContext.Current.Response.AddHeader("content-disposition", String.Format("attachment;filename={0} {1}.pdf", nombreReporte, Now.ToString("dd-MM-yyyy"))) + HttpContext.Current.Response.AddHeader("content-disposition", String.Format("attachment;filename={0} {1}.pdf", nombreReporte, ClsPaginas.NowADS().ToString("dd-MM-yyyy"))) End If HttpContext.Current.Response.Cache.SetCacheability(HttpCacheability.NoCache) 'HtmlConverter.ConvertToPdf(sw.ToString(), HttpContext.Current.Response.OutputStream) @@ -3892,7 +3892,7 @@ Namespace Extensiones FechaPeticion = FechaPeticion.AddMinutes(Token) Dim CveEmpresa As Integer = dataArray(4).ToEntero() - Dim diferencia As Double = (FechaPeticion - DateTime.Now).TotalMinutes + Dim diferencia As Double = (FechaPeticion - ClsPaginas.NowADS()).TotalMinutes diferencia = Math.Abs(diferencia) If diferencia < 5 Then 'si la fecha que me envía es de cuando menos hace cinco minuto, se permite accesar, para que no se copie ese parámetro y se esté recuperando información "medida de seguridad" diff --git a/App_Code/wsRedes.vb b/App_Code/wsRedes.vb index 23b68792a..f2e9d9462 100644 --- a/App_Code/wsRedes.vb +++ b/App_Code/wsRedes.vb @@ -45,7 +45,7 @@ Public Class wsRedes ' 'si la fecha que me envía es de cuando menos hace un minuto, se permite accesar, para que no se copie ese parámetro y se esté recuperando información "medida de seguridad" - ' If Fecha > Now.AddSeconds(TiempoValido) Then + ' If Fecha > NowADS().AddSeconds(TiempoValido) Then ' Str.Append("-----xwsRed:3") ' 'debemos de saccar la clave electoral @@ -136,7 +136,7 @@ Public Class wsRedes Dim Fecha As DateTime Fecha = ArrCadena(0).ToString.ToDate 'si la fecha que me envía es de cuando menos hace un minuto, se permite accesar, para que no se copie ese parámetro y se esté recuperando información "medida de seguridad" - If Fecha > Now.AddSeconds(TiempoValido) Then + If Fecha > ClsPaginas.NowADS().AddSeconds(TiempoValido) Then Dim Tipo As New ClsProspectos diff --git a/App_Code/wsSIG.vb b/App_Code/wsSIG.vb index 7ca8b9f0e..1991e6c6b 100644 --- a/App_Code/wsSIG.vb +++ b/App_Code/wsSIG.vb @@ -37,7 +37,7 @@ Public Class wsSIG Usuario = ArrCadena(0) : Contrasenia = ArrCadena(1) : IMEI = ArrCadena(2) : Version = ArrCadena(3) : Fecha = ArrCadena(4).ToString.ToDate 'si la fecha que me envía es de cuando menos hace un minuto, se permite accesar, para que no se copie ese parámetro y se esté recuperando información "medida de seguridad" - If Fecha > Now.AddSeconds(TiempoValido) Then + If Fecha > ClsPaginas.NowADS().AddSeconds(TiempoValido) Then Dim ttDato As Usuario Dim tUsuario As New ClsSisUsuarios @@ -88,7 +88,7 @@ Public Class wsSIG validatesubproyecto = True End If 'si la fecha que me envía es de cuando menos hace un minuto, se permite accesar, para que no se copie ese parámetro y se esté recuperando información "medida de seguridad" - If Fecha > Now.AddSeconds(TiempoValido) Then + If Fecha > ClsPaginas.NowADS().AddSeconds(TiempoValido) Then Dim ttDato As Usuario = Nothing Using tUsuario As New ClsSisUsuarios() @@ -141,7 +141,7 @@ Public Class wsSIG ' IMEI = ArrCadena(0) : Tipo = ArrCadena(1).ToEntero : Fecha = ArrCadena(2).ToString.ToDate ' 'si la fecha que me envía es de cuando menos hace un minuto, se permite accesar, para que no se copie ese parámetro y se esté recuperando información "medida de seguridad" - ' If Fecha > Now.Addseconds(TiempoValido) Then + ' If Fecha > NowADS().Addseconds(TiempoValido) Then ' Dim tUsuario As New ClsSisUsuarios @@ -166,7 +166,7 @@ Public Class wsSIG Dim Fecha, FechaColonias As DateTime IMEI = ArrCadena(0) : FechaColonias = ArrCadena(1).ToString.ToDate : Fecha = ArrCadena(2).ToString.ToDate 'si la fecha que me envía es de cuando menos hace un minuto, se permite accesar, para que no se copie ese parámetro y se esté recuperando información "medida de seguridad" - If Fecha > Now.AddSeconds(TiempoValido) Then + If Fecha > ClsPaginas.NowADS().AddSeconds(TiempoValido) Then 'Dim Tipo As New ClsCircuitos 'ds = Tipo.GetTablas(IMEI, FechaColonias) 'Tipo.Dispose() @@ -188,7 +188,7 @@ Public Class wsSIG Dim Fecha As DateTime IMEI = ArrCadena(0) : CveEmpresa = ArrCadena(1).ToString.ToEntero : Fecha = ArrCadena(2).ToString.ToDate 'si la fecha que me envía es de cuando menos hace un minuto, se permite accesar, para que no se copie ese parámetro y se esté recuperando información "medida de seguridad" - If Fecha > Now.AddSeconds(TiempoValido) Then + If Fecha > ClsPaginas.NowADS().AddSeconds(TiempoValido) Then Dim Prosp As New ClsProspectos ds = Prosp.GetProspectosTablas(IMEI, CveEmpresa) @@ -211,7 +211,7 @@ Public Class wsSIG Dim Fecha As DateTime CveUsuario = ArrCadena(0).ToEntero : IMEI = ArrCadena(1) : CveEmpresa = ArrCadena(2).ToString.ToEntero : Fecha = ArrCadena(3).ToString.ToDate 'si la fecha que me envía es de cuando menos hace un minuto, se permite accesar, para que no se copie ese parámetro y se esté recuperando información "medida de seguridad" - If Fecha > Now.AddSeconds(TiempoValido) Then + If Fecha > ClsPaginas.NowADS().AddSeconds(TiempoValido) Then Dim Evento As New ClsOIEventos If Evento.GetAgendas(CveUsuario, CveEmpresa) Then @@ -248,7 +248,7 @@ Public Class wsSIG CveUsuarioIng = ArrCadena(26).ToEntero : CveEmpresa = ArrCadena(27).ToString.ToEntero : FechaEnvio = ArrCadena(28).ToString.ToDate FechaEnvio = ArrCadena(29).ToString.ToDate 'si la fecha que me envía es de cuando menos hace un minuto, se permite accesar, para que no se copie ese parámetro y se esté recuperando información "medida de seguridad" - If FechaEnvio > Now.AddSeconds(TiempoValido) Then + If FechaEnvio > ClsPaginas.NowADS().AddSeconds(TiempoValido) Then Dim Evento As New ClsOIEventos If Evento.AddEvento(CveTipoEvento, CveAgendaTipo, Asunto, Descripcion, Prioridad, CveUsuarioDe, CveUsuarioPara, FechaInicio, FechaFin, 0, CveRevision, Archivo, CveUsuarioIng, CveEmpresa, @@ -278,7 +278,7 @@ Public Class wsSIG FechaFin = ArrCadena(0).ToDate : CveEstatusEvento = ArrCadena(1).ToEntero : Geom = ArrCadena(2) : CveEvento = ArrCadena(3).ToEntero : Fecha = ArrCadena(4).ToDate 'si la fecha que me envía es de cuando menos hace un minuto, se permite accesar, para que no se copie ese parámetro y se esté recuperando información "medida de seguridad" - If Fecha > Now.AddSeconds(TiempoValido) Then + If Fecha > ClsPaginas.NowADS().AddSeconds(TiempoValido) Then Dim Evento As New ClsOIEventos Retorno = Evento.FinalizaEvento(FechaFin, CveEstatusEvento, Geom, CveEvento) @@ -306,7 +306,7 @@ Public Class wsSIG Imagen = ArrCadena(0) : TipoImagen = ArrCadena(1).ToEntero : Cve = ArrCadena(2).ToEntero : pCveUsuario = ArrCadena(3).ToEntero : pCveEmpresa = ArrCadena(4).ToEntero : pIMEI = ArrCadena(5) Fecha = ArrCadena(6).ToString.ToDate Fecha.ToShortDateString().GuardaLog() - If Fecha > Now.AddSeconds(TiempoValido) Then + If Fecha > ClsPaginas.NowADS().AddSeconds(TiempoValido) Then Dim Dir As String = String.Format("{0}Empresas\{1}\", ModExtensiones.DirectorioBaseEmpresas, pCveEmpresa) Dim Ruta As String = "" Dim RutaDB3 As String = "" @@ -412,7 +412,7 @@ Public Class wsSIG CveProspectoTipo = ArrCadena(34).ToEntero : Geom = ArrCadena(35) : CveVendedor = ArrCadena(36).ToEntero : CveUsuario = ArrCadena(37).ToEntero : CveEmpresa = ArrCadena(38).ToEntero : FechaCaptura = ArrCadena(39).ToString.ToDate : FechaEnvio = ArrCadena(40).ToString.ToDate 'si la fecha que me envía es de cuando menos hace un minuto, se permite accesar, para que no se copie ese parámetro y se esté recuperando información "medida de seguridad" - If FechaEnvio > Now.AddSeconds(TiempoValido) Then + If FechaEnvio > ClsPaginas.NowADS().AddSeconds(TiempoValido) Then Str.Append("-----xwsAdd:3") @@ -478,7 +478,7 @@ Public Class wsSIG 'si la fecha que me envía es de cuando menos hace un minuto, se permite accesar, para que no se copie ese parámetro y se esté recuperando información "medida de seguridad" - If FechaEnvio > Now.AddSeconds(TiempoValido) Then + If FechaEnvio > ClsPaginas.NowADS().AddSeconds(TiempoValido) Then Str.Append("-----xwsAdd:3") @@ -524,7 +524,7 @@ Public Class wsSIG CveProspecto = ArrCadena(0).ToEntero : Nombres = ArrCadena(1) : CveVendedor = ArrCadena(2).ToEntero() : CveEmpresa = ArrCadena(5).ToEntero : FechaEnvio = ArrCadena(6).ToString.ToDate 'si la fecha que me envía es de cuando menos hace un minuto, se permite accesar, para que no se copie ese parámetro y se esté recuperando información "medida de seguridad" - If FechaEnvio > Now.AddSeconds(TiempoValido) Then + If FechaEnvio > ClsPaginas.NowADS().AddSeconds(TiempoValido) Then Str.Append("-----xwsAdd:3") @@ -579,7 +579,7 @@ Public Class wsSIG CveProspecto = ArrCadena(0).ToEntero : CveEmpresa = ArrCadena(1).ToEntero : FechaEnvio = ArrCadena(2).ToString.ToDate 'si la fecha que me envía es de cuando menos hace un minuto, se permite accesar, para que no se copie ese parámetro y se esté recuperando información "medida de seguridad" - If FechaEnvio > Now.AddSeconds(TiempoValido) Then + If FechaEnvio > ClsPaginas.NowADS().AddSeconds(TiempoValido) Then Dim Prosp As New ClsProspectos @@ -616,7 +616,7 @@ Public Class wsSIG CveContrato = ArrCadena(0).ToEntero : CveEmpresa = ArrCadena(1).ToEntero : FechaEnvio = ArrCadena(2).ToString.ToDate 'si la fecha que me envía es de cuando menos hace un minuto, se permite accesar, para que no se copie ese parámetro y se esté recuperando información "medida de seguridad" - If FechaEnvio > Now.AddSeconds(TiempoValido) Then + If FechaEnvio > ClsPaginas.NowADS().AddSeconds(TiempoValido) Then Dim Cont As New ClsContratos @@ -650,7 +650,7 @@ Public Class wsSIG CveContratoSeccion = ArrCadena(0).ToEntero : Geom = ArrCadena(1) : FechaEnvio = ArrCadena(2).ToString.ToDate 'si la fecha que me envía es de cuando menos hace un minuto, se permite accesar, para que no se copie ese parámetro y se esté recuperando información "medida de seguridad" - If FechaEnvio > Now.AddSeconds(TiempoValido) Then + If FechaEnvio > ClsPaginas.NowADS().AddSeconds(TiempoValido) Then Dim Cont As New ClsContratos Cadena.GuardaLog() diff --git a/Ashx/CargaEventos.ashx b/Ashx/CargaEventos.ashx index 60ef44198..d40007c3b 100644 --- a/Ashx/CargaEventos.ashx +++ b/Ashx/CargaEventos.ashx @@ -238,7 +238,7 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState If Not cevent.recurrenciatipo > 0 Then 'AGREGAMOS CUANDO NO ES RECURRENTE - Dim tFecha As DateTime = DateAdd(DateInterval.Month, -6, Date.Now) + Dim tFecha As DateTime = DateAdd(DateInterval.Month, -6, ClsPaginas.NowADS()) 'SI LA FECHA DEL EVENTO ES MENOR DE 6 MESES DE LA FECHA ACTUAL NO LO AGREGA If dr("FechaFin").ToString.ToDateTime > tFecha Or dr("FechaInicio").ToString.ToDateTime > tFecha Then events.Add(cevent) @@ -319,7 +319,7 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState End If 'SI LA FECHA DEL EVENTO ES MENOR DE 6 MESES DE LA FECHA ACTUAL Y/0 SI LA FECHA INICIAL DE LA RECURRENCIA ES MENOR A LA FECHA QUE SE CREO EL EVENTO NO LO AGREGA - If FIT > DateAdd(DateInterval.Month, -6, Date.Now) And FIT >= dr("FechaInicio").ToString.ToDateTime Then + If FIT > DateAdd(DateInterval.Month, -6, ClsPaginas.NowADS()) And FIT >= dr("FechaInicio").ToString.ToDateTime Then events.Add(cevent) End If Next @@ -359,7 +359,7 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState End If 'SI LA FECHA DEL EVENTO ES MENOR DE 6 MESES DE LA FECHA ACTUAL NO LO AGREGA - If FI > DateAdd(DateInterval.Month, -6, Date.Now) Then + If FI > DateAdd(DateInterval.Month, -6, ClsPaginas.NowADS()) Then events.Add(cevent) End If End If diff --git a/Ashx/E119.ashx b/Ashx/E119.ashx index 1928e7701..0a53e84c6 100644 --- a/Ashx/E119.ashx +++ b/Ashx/E119.ashx @@ -55,8 +55,8 @@ Public Class E119 : Implements IHttpHandler Dim ObjUsuarios As New ClsSisUsuarios If ObjUsuarios.GetUsuarios(CveUsuario) Then If ObjUsuarios.DtResultados.Rows.Count > 0 Then - Dim Usuario = ObjUsuarios.DtResultados.Rows(0)("Usuario").ToString() - Dim Contrasenia = ObjUsuarios.DtResultados.Rows(0)("Contraseña").ToString() + Dim Usuario As String = ObjUsuarios.DtResultados.Rows(0)("Usuario").ToString() + Dim Contrasenia As String = ObjUsuarios.DtResultados.Rows(0)("Contraseña").ToString() UsuarioActual = ObjUsuarios.ValidaUsuario(Usuario, Contrasenia, IMEI, CveEmpresa) UsuarioActual.CveEmpresa = CveEmpresa CreaObjetoEmpresa(UsuarioActual) @@ -87,11 +87,11 @@ Public Class E119 : Implements IHttpHandler Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest Dim retorno As String = "" Try - Dim Metodo = If(context.Request("Metodo") = Nothing, "", context.Request("Metodo").ToString()) + Dim Metodo As String = If(context.Request("Metodo") = Nothing, "", context.Request("Metodo").ToString()) If Metodo = "BASF_POG40" Then context.Response.ContentType = "application/json" - Dim Auth = ValidarSolicitud(context) + Dim Auth As AuthMessage = ValidarSolicitud(context) If Auth.IsSucces Then retorno = ConsultaDatos(context) @@ -104,7 +104,7 @@ Public Class E119 : Implements IHttpHandler If Metodo = "ConsultarProductos" Then context.Response.ContentType = "application/json" - Dim Auth = ValidarSolicitud(context) + Dim Auth As AuthMessage = ValidarSolicitud(context) If Auth.IsSucces Then retorno = ConsultaProductos(context) @@ -116,7 +116,7 @@ Public Class E119 : Implements IHttpHandler If Metodo = "ConsultarClasificaciones" Then context.Response.ContentType = "application/json" - Dim Auth = ValidarSolicitud(context) + Dim Auth As AuthMessage = ValidarSolicitud(context) If Auth.IsSucces Then retorno = ConsultaClasificaciones(context) @@ -181,7 +181,7 @@ Public Class E119 : Implements IHttpHandler Dim RespuestaError As New ResponseMsgError Dim TieneError As Boolean = False - Dim strFecha = If(context.Request("Fecha") = Nothing, "", context.Request("Fecha").ToString()) + Dim strFecha As String = If(context.Request("Fecha") = Nothing, "", context.Request("Fecha").ToString()) If String.IsNullOrEmpty(strFecha) Then RespuestaError.message = "Debe especificar una fecha" @@ -238,7 +238,7 @@ Public Class E119 : Implements IHttpHandler Dim RespuestaError As New ResponseMsgError Dim TieneError As Boolean = False - Dim CveClasificacion = If(context.Request("CveClasificacion") = Nothing, "", context.Request("CveClasificacion").ToString()) + Dim CveClasificacion As String = If(context.Request("CveClasificacion") = Nothing, "", context.Request("CveClasificacion").ToString()) If String.IsNullOrEmpty(CveClasificacion) Then CveClasificacion = "-1" @@ -255,7 +255,7 @@ Public Class E119 : Implements IHttpHandler End If End Using - Dim Msg As String = "Información día " & Now.ToShortDateString & If(RespuestaError.message <> "", " Error: " & RespuestaError.message, "") + Dim Msg As String = "Información día " & ClsPaginas.NowADS().ToShortDateString & If(RespuestaError.message <> "", " Error: " & RespuestaError.message, "") Msg.GuardaLogAD("LogE119") If TieneError Then @@ -288,7 +288,7 @@ Public Class E119 : Implements IHttpHandler TieneError = True End Try - Dim Msg As String = "Información día " & Now.ToShortDateString & If(RespuestaError.message <> "", " Error: " & RespuestaError.message, "") + Dim Msg As String = "Información día " & ClsPaginas.NowADS().ToShortDateString & If(RespuestaError.message <> "", " Error: " & RespuestaError.message, "") Msg.GuardaLogAD("LogE119") If TieneError Then diff --git a/Ashx/E140.ashx b/Ashx/E140.ashx index 464c49e33..25a99bd7f 100644 --- a/Ashx/E140.ashx +++ b/Ashx/E140.ashx @@ -139,7 +139,7 @@ Public Class E140 : Implements IHttpHandler, IRequiresSessionState Dim RutaRDLC As String = If(File.Exists($"{RutaEmpresa}\Formatos\MetasVendedores.rdlc"), $"{RutaEmpresa}\Formatos\MetasVendedores.rdlc", $"{DirectorioBaseEmpresas}\Empresas\Grales\Formatos\MetasVendedores.rdlc") - If ObjGen.GetRepMetasVendedores(DateTime.Now, CveEmpresa, -1, -1, -1, -1, -1, CveSubProyecto, -1, -1, 0) Then + If ObjGen.GetRepMetasVendedores(ClsPaginas.NowADS(), CveEmpresa, -1, -1, -1, -1, -1, CveSubProyecto, -1, -1, 0) Then Dim Imagen As System.IO.FileInfo = New System.IO.FileInfo(String.Format("{0}/Logo.png", RutaEmpresa)) @@ -153,7 +153,7 @@ Public Class E140 : Implements IHttpHandler, IRequiresSessionState End If parametros.Add(New ReportParameter("UsuarioImprimio", "Sistema")) - parametros.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + parametros.Add(New ReportParameter("FechaImpresion", ClsPaginas.NowADS().ToString("dd/MM/yyyy"))) parametros.Add(New ReportParameter("SubProyecto", Sucursal)) parametros.Add(New ReportParameter("Agente", Vendedor)) @@ -216,7 +216,7 @@ Public Class E140 : Implements IHttpHandler, IRequiresSessionState End If - MandaCorreo(CorreoSupervisor, $"Envió de estado de scorecard sucursal {Sucursal} a {Now.ToString("dd/MM/yyyy")}", bytes) + MandaCorreo(CorreoSupervisor, $"Envió de estado de scorecard sucursal {Sucursal} a {ClsPaginas.NowADS().ToString("dd/MM/yyyy")}", bytes) bytes = Nothing End If diff --git a/Ashx/E141.ashx b/Ashx/E141.ashx index 648919343..493fb9767 100644 --- a/Ashx/E141.ashx +++ b/Ashx/E141.ashx @@ -797,11 +797,11 @@ Public Class E141 : Implements IHttpHandler ObjFactura.TipoDocto = TipoDocto ObjFactura.RefDocto = "" 'ObjFactura.CveMesa = -1 - ObjFactura.Fecha = Now + ObjFactura.Fecha = ClsPaginas.NowADS() ObjFactura.CvePrePoliza = -1 - ObjFactura.FechaPago = Now + ObjFactura.FechaPago = ClsPaginas.NowADS() ObjFactura.MotivoDescuento = "" - ObjFactura.FechaEjecucion = Now + ObjFactura.FechaEjecucion = ClsPaginas.NowADS() ObjFactura.UsuarioCreo = UsuarioActual.Usuario ObjFactura.CveCondicionEntrega = -1 ObjFactura.CondicionEntrega = "" @@ -1236,7 +1236,7 @@ Public Class E141 : Implements IHttpHandler TmpDT.Columns.Add("TotalImporte", GetType(Decimal)) TmpDT.Columns.Add("Total", GetType(Decimal)) 'Para uso del módulo contable - TmpDT.Columns.Add("AsientoContableVentas", GetType(Integer)) + TmpDT.Columns.Add("AsientoContableVentas", GetType(Integer)) TmpDT.Columns.Add("AplicaParaConcepto", GetType(Boolean)) TmpDT.Columns.Add("CveProyecto", GetType(Integer)) TmpDT.Columns.Add("Proyecto", GetType(String)) @@ -1780,9 +1780,9 @@ Public Class E141 : Implements IHttpHandler Dim msg As String = "" If sb.Length > 0 Then - msg = $"Se enviaron los siguientes productos:
{sb.ToString()}
Fecha y hora: {Now.ToString("dd/MM/yyyy hh:mm:ss tt")}" + msg = $"Se enviaron los siguientes productos:
{sb.ToString()}
Fecha y hora: {ClsPaginas.NowADS().ToString("dd/MM/yyyy hh:mm:ss tt")}" Else - msg = $"No se enviaron productos esta semana
Fecha y hora: {Now.ToString("dd/MM/yyyy hh:mm:ss tt")}" + msg = $"No se enviaron productos esta semana
Fecha y hora: {ClsPaginas.NowADS().ToString("dd/MM/yyyy hh:mm:ss tt")}" End If EnviarCorreoNotificacion("SIG - Productos enviados en la semana", msg) @@ -1873,7 +1873,7 @@ Public Class E141 : Implements IHttpHandler End While End If If DtPS.Rows.Count > 0 Then - EnviarCorreoNotificacion("SIG - Actualización de productos", $"Se ejecuto la tarea de actualización de productos.
Fecha y hora: {Now.ToString("dd/MM/yyyy hh:mm:ss tt")}") + EnviarCorreoNotificacion("SIG - Actualización de productos", $"Se ejecuto la tarea de actualización de productos.
Fecha y hora: {ClsPaginas.NowADS().ToString("dd/MM/yyyy hh:mm:ss tt")}") End If End If @@ -1957,7 +1957,7 @@ Public Class E141 : Implements IHttpHandler Private Function ActualizarPrecios(Todos As Boolean) As Boolean Dim Retorno As Boolean = False 'ENVIAR PRECIOS SOLO DE 8am a 7pm - If Now.Hour < 7 OrElse Now.Hour > 21 Then + If ClsPaginas.NowADS().Hour < 7 OrElse ClsPaginas.NowADS().Hour > 21 Then Retorno = True Return Retorno End If @@ -2040,7 +2040,7 @@ Public Class E141 : Implements IHttpHandler End If If DtPS.Rows.Count > 0 Then - EnviarCorreoNotificacion("SIG - Actualización de precios", $"Se ejecuto la tarea de actualización de precios.
Fecha y hora: {Now.ToString("dd/MM/yyyy hh:mm:ss tt")}") + EnviarCorreoNotificacion("SIG - Actualización de precios", $"Se ejecuto la tarea de actualización de precios.
Fecha y hora: {ClsPaginas.NowADS().ToString("dd/MM/yyyy hh:mm:ss tt")}") End If End If @@ -2097,7 +2097,7 @@ Public Class E141 : Implements IHttpHandler Dim CountPeticiones As Integer = 0, CountPeticionesExitosas As Integer = 0 'ENVIAR SOLO DE 8am a 8pm - If Now.Hour < 7 OrElse Now.Hour > 21 Then + If ClsPaginas.NowADS().Hour < 7 OrElse ClsPaginas.NowADS().Hour > 21 Then Retorno = True Return Retorno End If @@ -2176,7 +2176,7 @@ Public Class E141 : Implements IHttpHandler End If If DtPS.Rows.Count > 0 Then - EnviarCorreoNotificacion("SIG - Actualización de existencias", $"Se ejecuto la tarea de actualización de existencias.
Fecha y hora: {Now.ToString("dd/MM/yyyy hh:mm:ss tt")}") + EnviarCorreoNotificacion("SIG - Actualización de existencias", $"Se ejecuto la tarea de actualización de existencias.
Fecha y hora: {ClsPaginas.NowADS().ToString("dd/MM/yyyy hh:mm:ss tt")}") End If End If diff --git a/Ashx/E72.ashx b/Ashx/E72.ashx index 4068c10cd..c662e25d1 100644 --- a/Ashx/E72.ashx +++ b/Ashx/E72.ashx @@ -30,10 +30,10 @@ Public Class E72 : Implements IHttpHandler, IRequiresSessionState Dim ObjInv As New ClsInventarios Try Dim DtPS As DataTable = CreaDT() - ObjInv.GetRepEntradasSalidasXContrato(72, -1, MinFecha, Date.Now, -1, -1, 17, -1, -1, 3, -1, 1158) + ObjInv.GetRepEntradasSalidasXContrato(72, -1, MinFecha, ClsPaginas.NowADS(), -1, -1, 17, -1, -1, 3, -1, 1158) Dim DtRepEntradasSalidasXContrato As DataTable = ObjInv.DtResultados.FiltraParametros("CvePS > 0") - ObjInv.ApartadosRep(-1, 70437, 259, 72, -1, MinFecha, Date.Now) + ObjInv.ApartadosRep(-1, 70437, 259, 72, -1, MinFecha, ClsPaginas.NowADS()) Dim DtApartados As DataTable = ObjInv.DtResultados.FiltraParametros("CvePS > 0", "", {"CvePS", "Codigo", "Cantidad"}) Dim asd As Integer = DtApartados.Rows.Count diff --git a/Ashx/MHRedes.ashx b/Ashx/MHRedes.ashx index 3a4cb5172..49649d0f9 100644 --- a/Ashx/MHRedes.ashx +++ b/Ashx/MHRedes.ashx @@ -62,7 +62,7 @@ Public Class MobileHandler : Implements IHttpHandler If User IsNot Nothing Then - Dim Token As String = String.Format("{0}*{1}*{2}", Now.ToString, IP, User.CveUsuario) + Dim Token As String = String.Format("{0}*{1}*{2}", ClsPaginas.NowADS().ToString, IP, User.CveUsuario) Token = Encripta(Token) json.AppendFormat("{{ ""CveUsuario"" : ""{0}"", ""Nombre"" : ""{1}"", ""Token"" : ""{2}"" }} ", User.CveUsuario, User.Nombre, Token) Else diff --git a/Ashx/SIGFacturacion.ashx b/Ashx/SIGFacturacion.ashx index 988214be8..70cfe6ec9 100644 --- a/Ashx/SIGFacturacion.ashx +++ b/Ashx/SIGFacturacion.ashx @@ -63,7 +63,7 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState 'EnviarCorreoFactura(New Modelos.Factura(Usuario, 844966, 1, context.ModExtensiones.DirectorioBaseEmpresas), Usuario) If String.IsNullOrEmpty(pFechaI) AndAlso String.IsNullOrEmpty(pFechaF) Then - Dim FechaReferencia = Now + Dim FechaReferencia = ClsPaginas.NowADS() If FechaReferencia.DayOfWeek = DayOfWeek.Sunday Then Dim Sabado = FechaReferencia.AddDays(-1) Dim DomingoAnterior = FechaReferencia.AddDays(-7) @@ -290,11 +290,11 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState ObjFactura.TipoDocto = "Ing" ObjFactura.RefDocto = "" 'ObjFactura.CveMesa = -1 - ObjFactura.Fecha = Now + ObjFactura.Fecha = ClsPaginas.NowADS() ObjFactura.CvePrePoliza = -1 - ObjFactura.FechaPago = Now + ObjFactura.FechaPago = ClsPaginas.NowADS() ObjFactura.MotivoDescuento = "" - ObjFactura.FechaEjecucion = Now + ObjFactura.FechaEjecucion = ClsPaginas.NowADS() ObjFactura.UsuarioCreo = UsuarioActual.Usuario ObjFactura.CveCondicionEntrega = -1 ObjFactura.CondicionEntrega = "" @@ -384,7 +384,7 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState 'VALIDA PROMOCIONES Y EXISTENCIAS Dim ObjVentas As New ClsVentas - If ObjVentas.GetPromocionesPS(-1, Now, CveSubProyecto, ObjFactura.CveCliente, ObjFactura.CveVendedor, 1, UsuarioActual.CveEmpresa) Then + If ObjVentas.GetPromocionesPS(-1, ClsPaginas.NowADS(), CveSubProyecto, ObjFactura.CveCliente, ObjFactura.CveVendedor, 1, UsuarioActual.CveEmpresa) Then ObjFactura.DtPromociones = ObjVentas.DtResultados.Copy() End If @@ -905,8 +905,8 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState Dim ArchivoW As StreamWriter Dim strLineaTMP As String - ' strLineaTMP = Chr(13) & Chr(10) & Day(Now) & "/" & Month(Now) & "/" & Year(Now) & " " & Hour(Now) & ":" & Minuto & ". " & Str & Chr(13) & Chr(10) - strLineaTMP = String.Format("{0}{1}Log: {2}{3}:{4}", Chr(13), Chr(10), Str, DateTime.Now.ToShortDateString, DateTime.Now.ToShortTimeString) + ' strLineaTMP = Chr(13) & Chr(10) & Day(NowADS()) & "/" & Month(NowADS()) & "/" & Year(NowADS()) & " " & Hour(NowADS()) & ":" & Minuto & ". " & Str & Chr(13) & Chr(10) + strLineaTMP = String.Format("{0}{1}Log: {2}{3}:{4}", Chr(13), Chr(10), Str, ClsPaginas.NowADS().ToShortDateString, ClsPaginas.NowADS().ToShortTimeString) Try ArchivoW = New StreamWriter(String.Format("{0}\LogFacturacion.txt", ModExtensiones.DirectorioBaseEmpresas), True, System.Text.Encoding.UTF8) Catch ex As UnauthorizedAccessException diff --git a/Ashx/SIGFacturacionCiclica.ashx b/Ashx/SIGFacturacionCiclica.ashx index 6f8b1e66e..8e5998a6a 100644 --- a/Ashx/SIGFacturacionCiclica.ashx +++ b/Ashx/SIGFacturacionCiclica.ashx @@ -94,7 +94,7 @@ Public Class SIGFacturacionCiclica : Implements IHttpHandler, IRequiresSessionSt Private Function IniciaFacturacionMasiva() As Boolean Dim Retorno As Boolean = True - Dim FechaRef As DateTime = DateTime.Now + Dim FechaRef As DateTime = ClsPaginas.NowADS() Dim DTCicloComercial As DataTable = Nothing Using ObjContratos As New ClsContratos @@ -123,11 +123,11 @@ Public Class SIGFacturacionCiclica : Implements IHttpHandler, IRequiresSessionSt For Each Row As DataRow In DTCicloComercial.Rows If Row("Observaciones").ToString().Contains("{DIA}") Then - Row("Observaciones") = Row("Observaciones").ToString().Replace("{DIA}", DateTime.Now.Day.ToString()) + Row("Observaciones") = Row("Observaciones").ToString().Replace("{DIA}", ClsPaginas.NowADS().Day.ToString()) End If If Row("Observaciones").ToString().Contains("{MES}") Then - Dim fecha As DateTime = DateTime.Now + Dim fecha As DateTime = ClsPaginas.NowADS() Dim formatoFecha = Globalization.CultureInfo.CurrentCulture.DateTimeFormat Dim nombreMes = formatoFecha.GetMonthName(fecha.Month).ToUpper() @@ -135,11 +135,11 @@ Public Class SIGFacturacionCiclica : Implements IHttpHandler, IRequiresSessionSt End If If Row("Observaciones").ToString().Contains("{AÑO}") Then - Row("Observaciones") = Row("Observaciones").ToString().Replace("{AÑO}", DateTime.Now.Year.ToString()) + Row("Observaciones") = Row("Observaciones").ToString().Replace("{AÑO}", ClsPaginas.NowADS().Year.ToString()) End If If Row("Observaciones").ToString().Contains("{TC}") Then - Row("Observaciones") = Row("Observaciones").ToString().Replace("{TC}", ClsPaginas.GlobalTipoCambio(Now).FormatoNumero) + Row("Observaciones") = Row("Observaciones").ToString().Replace("{TC}", ClsPaginas.GlobalTipoCambio(ClsPaginas.NowADS()).FormatoNumero) End If Dim Resp = EmitirImprimir(UsuarioActual, Row) @@ -291,7 +291,7 @@ Public Class SIGFacturacionCiclica : Implements IHttpHandler, IRequiresSessionSt ObjFactura.CveMoneda = DR("CveMoneda").ToString.ToEntero ObjFactura.Moneda = ClsPaginas.GlobalDTMonedas.FiltroPrimeroValor("Moneda", $"CveMoneda = {ObjFactura.CveMoneda} ") ObjFactura.MonedaSAT = ClsPaginas.GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", $"CveMoneda = {DR("CveMoneda").ToString.ToEntero}") - ObjFactura.TipoCambio = If(ObjFactura.CveMoneda = 1, 1, ClsPaginas.GlobalTipoCambio(Now)).ToDecimal + ObjFactura.TipoCambio = If(ObjFactura.CveMoneda = 1, 1, ClsPaginas.GlobalTipoCambio(ClsPaginas.NowADS())).ToDecimal ObjFactura.TipoDocto = "Ing" ObjFactura.RefDocto = "" ObjFactura.Folio = -1 diff --git a/Ashx/SIGPolizaVirtual.ashx b/Ashx/SIGPolizaVirtual.ashx index 21d2372c7..f0d8daa67 100644 --- a/Ashx/SIGPolizaVirtual.ashx +++ b/Ashx/SIGPolizaVirtual.ashx @@ -468,7 +468,7 @@ Public Class SIGPolizaVirtual : Implements IHttpHandler, IRequiresSessionState obj.customer_car_year = ObjFactura.Fecha.Year 'DATOS DE VENTA - obj.sale_date = Now + obj.sale_date = ClsPaginas.NowADS() obj.sale_paidby = "01" obj.sale_type = "01" 'PISO obj.sale_type_service = "01" 'PARTICULAR @@ -499,7 +499,7 @@ Public Class SIGPolizaVirtual : Implements IHttpHandler, IRequiresSessionState obj.customer_name = "JOSE ENRIQUE" obj.customer_last_name1 = "VIZCARA" obj.customer_last_name2 = "RENDON" - obj.customer_birthday = Now + obj.customer_birthday = ClsPaginas.NowADS() obj.customer_phone = "8186545256" obj.customer_email = "mail@mail.com" obj.customer_gender = "02" @@ -509,7 +509,7 @@ Public Class SIGPolizaVirtual : Implements IHttpHandler, IRequiresSessionState obj.customer_car_year = 2015 'DATOS DE VENTA - obj.sale_date = Now + obj.sale_date = ClsPaginas.NowADS() obj.sale_paidby = "01" obj.sale_type = "01" obj.sale_type_service = "01" @@ -527,7 +527,7 @@ Public Class SIGPolizaVirtual : Implements IHttpHandler, IRequiresSessionState obj.used_bci = "25" obj.used_month = 1 obj.used_year = 2015 - obj.used_sale_date = Now + obj.used_sale_date = ClsPaginas.NowADS() EnviarPolizaVentaLTHWSD(context, obj) End Sub diff --git a/Ashx/SIGWeb.ashx b/Ashx/SIGWeb.ashx index 4c09b06b8..b7689a08c 100644 --- a/Ashx/SIGWeb.ashx +++ b/Ashx/SIGWeb.ashx @@ -58,13 +58,13 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState ActualizaPrePoliza(context) Dim obj As New MResponseModel(Of Object)() - obj.Result = DateTime.Now.ToString() + obj.Result = ClsPaginas.NowADS().ToString() Dim retorno = JsonConvert.SerializeObject(obj).ToString() context.Response.Write(retorno) context.Response.StatusCode = 200 Case "RevisaConexion" Dim obj As New MResponseModel(Of Object)() - obj.Result = DateTime.Now.ToString() + obj.Result = ClsPaginas.NowADS().ToString() Dim retorno = JsonConvert.SerializeObject(obj).ToString() context.Response.Write(retorno) context.Response.StatusCode = 200 @@ -282,7 +282,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState Dim tokenDescriptor = New Microsoft.IdentityModel.Tokens.SecurityTokenDescriptor With { .Subject = New System.Security.Claims.ClaimsIdentity(New System.Security.Claims.Claim() {New System.Security.Claims.Claim("CvePlataforma", usuario.CvePlataforma.ToString()), New System.Security.Claims.Claim("CveUsuario", usuario.CveUsuario.ToString()), New System.Security.Claims.Claim("CveEmpresa", usuario.CveEmpresa.ToString()), - New System.Security.Claims.Claim("CveRol", usuario.CveRol.ToString()), New System.Security.Claims.Claim("Fecha", Date.Now.ToLongDateString())}), + New System.Security.Claims.Claim("CveRol", usuario.CveRol.ToString()), New System.Security.Claims.Claim("Fecha", ClsPaginas.NowADS().ToLongDateString())}), .Expires = Date.UtcNow.AddHours(3), .SigningCredentials = New Microsoft.IdentityModel.Tokens.SigningCredentials( New Microsoft.IdentityModel.Tokens.SymmetricSecurityKey(Encoding.ASCII.GetBytes("*_AsistenciaDesarrolloSistemas-SIGAPI_*17-06-2020")), @@ -488,7 +488,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState savepath = context.Server.MapPath(tempPath) Dim filename As String Dim tick As String - tick = (DateTime.Now.Ticks + 1).ToString() + tick = (ClsPaginas.NowADS().Ticks + 1).ToString() If Not Directory.Exists(savepath) Then Directory.CreateDirectory(savepath) End If diff --git a/Ashx/TareasProgramadas.ashx b/Ashx/TareasProgramadas.ashx index 3e01ccf00..3334c5d08 100644 --- a/Ashx/TareasProgramadas.ashx +++ b/Ashx/TareasProgramadas.ashx @@ -70,7 +70,7 @@ Public Class TareasProgramadas : Implements IHttpHandler Dim retorno As String = "no se encontro la variable" Try Dim metodo As String = "" - Dim FechaActual As DateTime = Now + Dim FechaActual As DateTime = ClsPaginas.NowADS() Dim FechaEnvio As DateTime = FechaActual If context.Request("var") IsNot Nothing Then @@ -387,7 +387,7 @@ Public Class TareasProgramadas : Implements IHttpHandler Dim Json As New JObject( New JProperty("Empresa", UsuarioActual.Empresa.Empresa), New JProperty("Usuario", UsuarioActual.Usuario), - New JProperty("Fecha", DateTime.Now.ToString("dd/MM/yyy HH:mm:ss")) + New JProperty("Fecha", ClsPaginas.NowADS().ToString("dd/MM/yyy HH:mm:ss")) ) Dim DTClientes As DataTable = Nothing Dim EnviarPendientes As Boolean = False @@ -414,7 +414,7 @@ Public Class TareasProgramadas : Implements IHttpHandler Dim Grupo As Integer = 5 Dim TipoCambio As Integer = 1 Dim TipoDocto As String = "Ing" - Dim FechaCorte As DateTime = New DateTime(Now.Year, 12, 31) + Dim FechaCorte As DateTime = New DateTime(ClsPaginas.NowADS().Year, 12, 31) If ObjMov.GetCxC(FechaI, FechaF, CveCliente, CveSubProyecto, CveVendedor, -1, -1, "-1", UsuarioActual.CveEmpresa, Grupo, -1, TipoCambio, TCEspecifico, TipoDocto, FechaVI, FechaVF, FechaCorte:=FechaCorte, EstatusCliente:=1, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveCobranzaEstatus:=CveCobranzaEstatus, CveClienteClasificacion:=-1, TipoCliente:=-1, AplicaAnticiposPagados:=AplicaAnticipos) Then @@ -677,7 +677,7 @@ Public Class TareasProgramadas : Implements IHttpHandler lista.Add(New CrystalParametro("TipoCuentas", "Con Saldo")) lista.Add(New CrystalParametro("NombreCliente", Cliente.Nombre)) lista.Add(New CrystalParametro("FechaInicio", If(FI = "-1", "-", FI))) - lista.Add(New CrystalParametro("FechaFin", If(FF = "-1", DateTime.Now.ToShortDateString, FF))) + lista.Add(New CrystalParametro("FechaFin", If(FF = "-1", ClsPaginas.NowADS().ToShortDateString, FF))) lista.Add(New CrystalParametro("UsuarioImprimio", UsuarioActual.Nombre)) lista.Add(New CrystalParametro("DireccionCliente", String.Format("Calle {0} #{1} Colonia {2}", Cliente.Direccion, If(Cliente.NoExt = "", "S/N", Cliente.NoExt), Cliente.Colonia))) lista.Add(New CrystalParametro("ClienteCP", Cliente.CP)) @@ -719,7 +719,7 @@ Public Class TareasProgramadas : Implements IHttpHandler lista.Add(New CrystalParametro("TipoCuentas", "Con Saldo")) lista.Add(New CrystalParametro("NombreCliente", Cliente.Nombre)) lista.Add(New CrystalParametro("FechaInicio", If(FI = "-1", "-", FI))) - lista.Add(New CrystalParametro("FechaFin", If(FF = "-1", DateTime.Now.ToShortDateString, FF))) + lista.Add(New CrystalParametro("FechaFin", If(FF = "-1", ClsPaginas.NowADS().ToShortDateString, FF))) lista.Add(New CrystalParametro("UsuarioImprimio", UsuarioActual.Nombre)) lista.Add(New CrystalParametro("DireccionCliente", String.Format("Calle {0} #{1} Colonia {2}", Cliente.Direccion, If(Cliente.NoExt = "", "S/N", Cliente.NoExt), Cliente.Colonia))) lista.Add(New CrystalParametro("ClienteCP", Cliente.CP)) @@ -870,8 +870,8 @@ Public Class TareasProgramadas : Implements IHttpHandler Dim ArchivoW As StreamWriter Dim strLineaTMP As String - ' strLineaTMP = Chr(13) & Chr(10) & Day(Now) & "/" & Month(Now) & "/" & Year(Now) & " " & Hour(Now) & ":" & Minuto & ". " & Str & Chr(13) & Chr(10) - strLineaTMP = String.Format("{0}{1}Log: {2}{3}:{4}", Chr(13), Chr(10), Str, DateTime.Now.ToShortDateString, DateTime.Now.ToShortTimeString) + ' strLineaTMP = Chr(13) & Chr(10) & Day(NowADS()) & "/" & Month(NowADS()) & "/" & Year(NowADS()) & " " & Hour(NowADS()) & ":" & Minuto & ". " & Str & Chr(13) & Chr(10) + strLineaTMP = String.Format("{0}{1}Log: {2}{3}:{4}", Chr(13), Chr(10), Str, ClsPaginas.NowADS().ToShortDateString, ClsPaginas.NowADS().ToShortTimeString) Try ArchivoW = New StreamWriter(String.Format("{0}\Log\LogEdoCuenta.txt", ModExtensiones.DirectorioBaseEmpresas), True, System.Text.Encoding.UTF8) Catch ex As UnauthorizedAccessException @@ -1066,7 +1066,7 @@ Public Class TareasProgramadas : Implements IHttpHandler If Not String.IsNullOrEmpty(Mail) Then Try - Dim Asunto As String = $"ScoreCard: {Now.ToString("dd/MM/yyyy")}" + Dim Asunto As String = $"ScoreCard: {ClsPaginas.NowADS().ToString("dd/MM/yyyy")}" Dim Cuerpo As String = String.Empty Dim ResultadoMail As Integer = 0 diff --git a/Bancos/CIF.aspx.vb b/Bancos/CIF.aspx.vb index 2bcbfe125..1a47dfc6f 100644 --- a/Bancos/CIF.aspx.vb +++ b/Bancos/CIF.aspx.vb @@ -45,8 +45,8 @@ Partial Class Bancos_CIF 'For Each x As DataRow In GlobalDTContaPlantillasPolizasDetalle(DdlTipoMovimiento.SelectedValue.ToEntero).Rows ' TipoMovto = CBool(x("TipoMovto")) - ' 'If ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Importe, TxtConcepto.Text, DdlTipoMovimiento.SelectedValue.ToEntero, TxtObservacion.Text, Now, 0, -1, CveIE) Then - ' If ObjMov.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovto, Importe, TxtConcepto.Text, 30, TxtObservacion.Text, Now, 0, -1, CveIE) Then + ' 'If ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Importe, TxtConcepto.Text, DdlTipoMovimiento.SelectedValue.ToEntero, TxtObservacion.Text, NowADS(), 0, -1, CveIE) Then + ' If ObjMov.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovto, Importe, TxtConcepto.Text, 30, TxtObservacion.Text, NowADS(), 0, -1, CveIE) Then ' ''End If ' Else ' Alert("No se pudo insertar el Detalle de la Póliza", TipoMensaje.MsgAdvertencia) diff --git a/Bancos/CargarConciliacionesBancarias.aspx.vb b/Bancos/CargarConciliacionesBancarias.aspx.vb index e9b722155..3fd69f3ab 100644 --- a/Bancos/CargarConciliacionesBancarias.aspx.vb +++ b/Bancos/CargarConciliacionesBancarias.aspx.vb @@ -46,8 +46,8 @@ Partial Class Bancos_CargarConciliacionesBancarias DdlCuentaModal.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlCuentaModal.DataBind() - txtFechaI.Text = Now.FirstDayOfMonth.ToShortDateString - txtFechaF.Text = Now.ToShortDateString + txtFechaI.Text = NowADS().FirstDayOfMonth.ToShortDateString + txtFechaF.Text = NowADS().ToShortDateString Modalidad = "" End Sub @@ -237,7 +237,7 @@ Partial Class Bancos_CargarConciliacionesBancarias Protected Sub LnkAgregarMovimiento_Click(sender As Object, e As EventArgs) Modalidad = "A" TxtReferencia.Text = "" - TxtFecha.Text = Now.ToShortDateString + TxtFecha.Text = NowADS().ToShortDateString TxtImporte.Text = "" DdlTipo.SelectedIndex = 0 DdlCuentaModal.SelectedIndex = 0 diff --git a/Bancos/ConciliacionesBancarias.aspx.vb b/Bancos/ConciliacionesBancarias.aspx.vb index 584d740c0..a52804d80 100644 --- a/Bancos/ConciliacionesBancarias.aspx.vb +++ b/Bancos/ConciliacionesBancarias.aspx.vb @@ -78,8 +78,8 @@ Partial Class Bancos_ConciliacionesBancariasaspx DdlCuenta.Items.Insert(0, New ListItem("Todos", "-1")) DdlCuenta.DataBind() - txtFechaI.Text = Now.FirstDayOfMonth.ToShortDateString - txtFechaF.Text = Now.ToShortDateString + txtFechaI.Text = NowADS().FirstDayOfMonth.ToShortDateString + txtFechaF.Text = NowADS().ToShortDateString ModalidadConciliacion = "" ModalidadDesconciliar = "" @@ -398,7 +398,7 @@ Partial Class Bancos_ConciliacionesBancariasaspx Protected Sub LnkDesconciliarTodos_Click(sender As Object, e As EventArgs) ModalidadDesconciliar = "DT" - TxtFechaDesconciliado.Text = Now.ToShortDateString + TxtFechaDesconciliado.Text = NowADS().ToShortDateString CveIEDesconciliar = 0 UpDesconciliar.Update() RegistraScript("$('#DModalDesconciliar').modal()") @@ -563,7 +563,7 @@ Partial Class Bancos_ConciliacionesBancariasaspx 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", DateTime.Now.ToString())) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString())) Dim FormatoFecha As DateTimeFormatInfo = CultureInfo.CurrentCulture.DateTimeFormat Dim NombreMes As String = FormatoFecha.GetMonthName(txtFechaI.Text.ToDate.Month).ToUpper params.Add(New ReportParameter("Encabezado", $"{DdlCuenta.SelectedItem.Text} {NombreMes} {txtFechaI.Text.ToDate.Year}")) diff --git a/Bancos/Creditos.aspx.vb b/Bancos/Creditos.aspx.vb index e7a644c22..57f66289e 100644 --- a/Bancos/Creditos.aspx.vb +++ b/Bancos/Creditos.aspx.vb @@ -160,7 +160,7 @@ Partial Class Bancos_Creditos RegeneraTablaAmortizacion = False 'Fecha Default - TxtFechaInicio.Text = DateTime.Now().ToString("dd/MM/yyyy") + TxtFechaInicio.Text = NowADS().ToString("dd/MM/yyyy") 'Carga Proveedores | Entidad Financiera DdlProveedores.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa) @@ -688,7 +688,7 @@ Partial Class Bancos_Creditos ' If CveIE < 0 Then ' ErrorCredito = True ' End If - ' 'If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtCSTotalCredito.Text.ToString.ToDouble, "Crédito", 50, "", Now, 0, -1, CveIE, ImporteMX:=TxtCSTotalCredito.Text.ToString.ToDouble) Then + ' 'If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtCSTotalCredito.Text.ToString.ToDouble, "Crédito", 50, "", NowADS(), 0, -1, CveIE, ImporteMX:=TxtCSTotalCredito.Text.ToString.ToDouble) Then ' ' ErrorCredito = True ' 'End If ' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtCSTotalCredito.Text.ToDecimal, TxtCSTotalCredito.Text.ToDecimal, 30, "Crédito", "", CveIE:=CveIE) Then @@ -878,19 +878,19 @@ Partial Class Bancos_Creditos 'If Not ErrorCredito AndAlso CveIE > 0 Then ' If CvePrePoliza > 0 Then - ' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtVehiculoAnticipo.Text.ToDouble, "Enganche", 53, "", Now, 0, -1, CveIE) Then + ' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtVehiculoAnticipo.Text.ToDouble, "Enganche", 53, "", NowADS(), 0, -1, CveIE) Then ' ErrorCredito = True ' End If - ' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtComisionAnticipo.Text.ToDouble, "Comisión", 54, "", Now, 0, -1, CveIE) Then + ' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtComisionAnticipo.Text.ToDouble, "Comisión", 54, "", NowADS(), 0, -1, CveIE) Then ' ErrorCredito = True ' End If - ' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtSeguroAnticipo.Text.ToDouble, "Seguro", 55, "", Now, 0, -1, CveIE) Then + ' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtSeguroAnticipo.Text.ToDouble, "Seguro", 55, "", NowADS(), 0, -1, CveIE) Then ' ErrorCredito = True ' End If - ' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtFondoGarantia.Text.ToDouble, "Fondo en Garantía", 58, "", Now, 0, -1, CveIE) Then + ' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtFondoGarantia.Text.ToDouble, "Fondo en Garantía", 58, "", NowADS(), 0, -1, CveIE) Then ' ErrorCredito = True ' End If - ' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, TotalAnticipo, "Banco", 30, "", Now, 0, -1, CveIE) Then + ' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, TotalAnticipo, "Banco", 30, "", NowADS(), 0, -1, CveIE) Then ' ErrorCredito = True ' End If ' Else @@ -1573,7 +1573,7 @@ Partial Class Bancos_Creditos Dim TipoMovimiento As Boolean = False Dim Concepto As String = "" Dim Referencia As String = $"Crédito: {TxtReferencia.Text}" - Dim FechaMovimiento As Date = Now.ToDate + Dim FechaMovimiento As Date = NowADS().ToDate Dim MsgError As String = "" CvePrePoliza = ObjContabilidad.AddPrePolizas("Creditos/RegistrodeRegistro", 69, TxtCSTotalCredito.Text.ToDouble, TxtCSTotalCredito.Text.ToDouble, DdlCSTipoMoneda.SelectedValue.ToEntero, FechaMovimiento, $"Crédito: {TxtReferencia.Text}", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) @@ -1585,7 +1585,7 @@ Partial Class Bancos_Creditos importeMovimiento = TxtVehiculoValor.Text.ToDecimal - TxtVehiculoAnticipo.Text.ToDecimal 'importe financiado Concepto = $"Crédito: {TxtReferencia.Text}" Dim Pago As New CompraPago - Pago.Fecha = Now + Pago.Fecha = NowADS() Pago.CveIE = CveIE Dim ObjCompra As New ClsCompras diff --git a/Bancos/CreditosPagoMultiple.aspx.vb b/Bancos/CreditosPagoMultiple.aspx.vb index 815b6f688..7efd21e80 100644 --- a/Bancos/CreditosPagoMultiple.aspx.vb +++ b/Bancos/CreditosPagoMultiple.aspx.vb @@ -28,7 +28,7 @@ Partial Class Bancos_CreditosPagoMultiple CveMoneda = 1 CargaTipoTransaccion() CargaCuentas(DdlTipoTransaccion.SelectedValue.ToEntero) - TxtFechaDocumento.Text = Now.ToShortDateString + TxtFechaDocumento.Text = NowADS().ToShortDateString CargaProveedores() ' CveProveedor = 19994 TxtPagueseA.Enabled = False diff --git a/Bancos/CuentasBancariasDetalle.aspx.vb b/Bancos/CuentasBancariasDetalle.aspx.vb index 3d5b641a6..f6a001b2e 100644 --- a/Bancos/CuentasBancariasDetalle.aspx.vb +++ b/Bancos/CuentasBancariasDetalle.aspx.vb @@ -59,7 +59,7 @@ Partial Class Bancos_CuentasBancariasDetalle InicializaConvenio() Else 'Configuración de Modalidad Insert - LblFecha.Text = Now.ToShortDateString() + LblFecha.Text = NowADS().ToShortDateString() LtlTitulo.Text = "Agregar Nueva Cuenta Bancaria" ViewState("CveCuenta") = -1 BtnEliminar.Visible = False diff --git a/Bancos/DepositoTerminal.aspx.vb b/Bancos/DepositoTerminal.aspx.vb index 555cba4c2..db7dfa7ec 100644 --- a/Bancos/DepositoTerminal.aspx.vb +++ b/Bancos/DepositoTerminal.aspx.vb @@ -20,7 +20,7 @@ Partial Class Bancos_DepositoTerminal Private Sub Bancos_DepositoTerminal_Load(sender As Object, e As EventArgs) Handles Me.Load If Not IsPostBack Then - TxtFecha.Text = Now.ToShortDateString + TxtFecha.Text = NowADS().ToShortDateString CargaCuentas() If UsuarioActual.CveEmpresa.Contiene(1, 4, 7, 11, 12, 72, 80, 119) Then diff --git a/Bancos/DepositosCaja.aspx.vb b/Bancos/DepositosCaja.aspx.vb index e6f789a9d..b3150609e 100644 --- a/Bancos/DepositosCaja.aspx.vb +++ b/Bancos/DepositosCaja.aspx.vb @@ -18,9 +18,9 @@ Partial Class Bancos_DepositosCaja Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not IsPostBack Then FacturasCheckadas = 0 - TxtFecha.Text = Now.ToShortDateString - txtFechaI.Text = Now.AddDays(-1).ToShortDateString - txtFechaF.Text = Now.ToShortDateString + TxtFecha.Text = NowADS().ToShortDateString + txtFechaI.Text = NowADS().AddDays(-1).ToShortDateString + txtFechaF.Text = NowADS().ToShortDateString TxtComision.Attributes.Add("onKeyUp", "txtSuma(this);") TxtDescuento.Attributes.Add("onKeyUp", "txtSumaDescuento(this);") TxtIVA.Attributes.Add("onKeyUp", "txtSumaIVA(this);") diff --git a/Bancos/Devoluciones.aspx.cs b/Bancos/Devoluciones.aspx.cs index 18763f816..3155be9f3 100644 --- a/Bancos/Devoluciones.aspx.cs +++ b/Bancos/Devoluciones.aspx.cs @@ -199,7 +199,7 @@ public partial class Bancos_Devoluciones : ClsPaginas ClsMovimientos ObjMov = new ClsMovimientos(); ClsClientes clsClientes = new ClsClientes(); - if (ObjMov.GetMovimientosIE(1, CveCliente, DdlCuenta.SelectedValue.ToEntero(), MinFecha, DateTime.Now, 1, -1, UsuarioActual.CveEmpresa)) + if (ObjMov.GetMovimientosIE(1, CveCliente, DdlCuenta.SelectedValue.ToEntero(), MinFecha, NowADS(), 1, -1, UsuarioActual.CveEmpresa)) { GvDevoluciones.DataSource = ObjMov.DtResultados.FiltraParametros("Saldo > 0 "); GvDevoluciones.DataBind(); @@ -419,7 +419,7 @@ public partial class Bancos_Devoluciones : ClsPaginas int vecesAplicar = TxtVecesAplicar.Text.ToEntero(); decimal montoLimite = 0; - string fechaInicioAplicacion = DateTime.Now.ToString("yyyy/MM/dd"); + string fechaInicioAplicacion = NowADS().ToString("yyyy/MM/dd"); bool estatus = true; int CveCuenta = -1; int CveMovtoPermanente = ObjNom.AddMovtoPermanente(cveConcepto, cvePersonal, descripcion, tipoDescuento, valor, vecesAplicar, montoLimite, fechaInicioAplicacion, estatus, CveCuenta); diff --git a/Bancos/FluctuacionCambiaria.aspx.vb b/Bancos/FluctuacionCambiaria.aspx.vb index 7a4eb6aee..b356bd7b9 100644 --- a/Bancos/FluctuacionCambiaria.aspx.vb +++ b/Bancos/FluctuacionCambiaria.aspx.vb @@ -47,9 +47,9 @@ Partial Class Bancos_FluctuacionCambiaria #Region "CARGAS" Private Sub CargaFechas() 'Año actual - DdlAnio.Items.Add(New ListItem(Now.Year.ToString(), Now.Year.ToString())) + DdlAnio.Items.Add(New ListItem(NowADS().Year.ToString(), NowADS().Year.ToString())) 'Año Anterior - DdlAnio.Items.Add(New ListItem(Now.AddYears(-1).Year.ToString(), Now.AddYears(-1).Year.ToString())) + DdlAnio.Items.Add(New ListItem(NowADS().AddYears(-1).Year.ToString(), NowADS().AddYears(-1).Year.ToString())) For i As Integer = 1 To 12 Dim fecha As DateTime = New DateTime(DdlAnio.SelectedValue.ToEntero(), i, 1) @@ -59,7 +59,7 @@ Partial Class Bancos_FluctuacionCambiaria DdlMes.Items.Add(New ListItem(mesStr, i.ToString())) Next - Dim UltimaFluctuacion As MTipoCambioFluctuacion = GlobalTipoCambioUltimaFluctuacion(Now) + Dim UltimaFluctuacion As MTipoCambioFluctuacion = GlobalTipoCambioUltimaFluctuacion(NowADS()) If UltimaFluctuacion IsNot Nothing Then DdlMes.SelectedValueExist(UltimaFluctuacion.FechaFluctuacion.Month) DdlMes.SelectedValueExist(UltimaFluctuacion.FechaFluctuacion.Year) @@ -98,17 +98,17 @@ Partial Class Bancos_FluctuacionCambiaria Private Sub CargaUltimaFluctuacion() - Dim UltimaFluctuacion As MTipoCambioFluctuacion = GlobalTipoCambioUltimaFluctuacion(Now) + Dim UltimaFluctuacion As MTipoCambioFluctuacion = GlobalTipoCambioUltimaFluctuacion(NowADS()) If UltimaFluctuacion IsNot Nothing Then LtlUltimaFluctuacion.Text = String.Format("Ultima Fluctuación : {0}", UltimaFluctuacion.FechaFluctuacion.ToShortDateString) 'si la ultima fluctuacion es mayor o igual al fin de mes anterior, entonces pon la fecha actual - If UltimaFluctuacion.FechaFluctuacion >= Now.AddMonths(-1).LastDayOfMonth Then - DdlMes.SelectedValueExist(Now.Month) - DdlAnio.SelectedValueExist(Now.Year) + If UltimaFluctuacion.FechaFluctuacion >= NowADS().AddMonths(-1).LastDayOfMonth Then + DdlMes.SelectedValueExist(NowADS().Month) + DdlAnio.SelectedValueExist(NowADS().Year) Else - DdlMes.SelectedValueExist(Now.AddMonths(-1).Month) - DdlAnio.SelectedValueExist(Now.AddMonths(-1).Year) + DdlMes.SelectedValueExist(NowADS().AddMonths(-1).Month) + DdlAnio.SelectedValueExist(NowADS().AddMonths(-1).Year) End If End If @@ -1238,7 +1238,7 @@ Partial Class Bancos_FluctuacionCambiaria StrFiltro.AppendFormat("TC: {0}", LtTipoCambioActual.Text) If (T.ActiveTabIndex = 0) Then - 'GvProveedores.ExportToExcelGembox("FluctuacionCambiariaProveedores_" & Now.ToShortDateString) + 'GvProveedores.ExportToExcelGembox("FluctuacionCambiariaProveedores_" & NowADS().ToShortDateString) GvProveedores.ExportToExcelGembox("Fluctuacion." + T.ActiveTab.HeaderText + "." + DdlMes.SelectedItem.ToString + "." + DdlAnio.SelectedValue, UsuarioActual, "Fluctuación Cambiaria - Proveedores", DatosFiltros:=StrFiltro.ToString()) ElseIf (T.ActiveTabIndex = 1) Then GvProveedoresAnt.ExportToExcelGembox("Fluctuacion." + T.ActiveTab.HeaderText + "." + DdlMes.SelectedItem.ToString + "." + DdlAnio.SelectedValue, UsuarioActual, "Fluctuación Cambiaria - Proveedores Anticipos", DatosFiltros:=StrFiltro.ToString()) diff --git a/Bancos/FlujoDiario.aspx.vb b/Bancos/FlujoDiario.aspx.vb index 0b80f2f92..23aa78957 100644 --- a/Bancos/FlujoDiario.aspx.vb +++ b/Bancos/FlujoDiario.aspx.vb @@ -44,7 +44,7 @@ Partial Class Bancos_FlujoDiario Private Sub Bancos_FlujoDiario_Load(sender As Object, e As EventArgs) Handles Me.Load If Not IsPostBack Then - TxtFecha.Text = Now.ToString + TxtFecha.Text = NowADS().ToString End If End Sub @@ -55,7 +55,7 @@ Partial Class Bancos_FlujoDiario 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("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("Fecha", TxtFecha.Text.ToDate.ToLongDateString)) If Imagen.Exists Then diff --git a/Bancos/IE.aspx b/Bancos/IE.aspx index d9a7799a7..9106c2511 100644 --- a/Bancos/IE.aspx +++ b/Bancos/IE.aspx @@ -269,8 +269,8 @@ - -
+ +
$ @@ -512,7 +512,7 @@ - @@ -1784,6 +1784,17 @@ if ($get('TxtImporte')) $get('TxtImporte').value = ToDouble($get('TxtDevolución').value) + Ot; } + function ValidarCantidadDevCompras() { + var Ot = 0.00; + var Dev = 0.00; + debugger; //valida importe + //if ($get('TxtDevolución') && (ToDouble($get('TxtDevolución').value) > s)) $get('TxtDevolución').value = s; + FCSumaTotalesNotas(); + // considera importe de OT ingresos, para que se peuda exceder + if ($get('TxtOtrosIngresosEgresos')) { Ot = ToDouble($get('TxtOtrosIngresosEgresos').value); } + if ($get('TxtImporte')) $get('TxtImporte').value = ToDouble($get('TxtImporte').value) + Ot; + } + var TipoCambioActual = 0.0; function CambiaTC(txt) { let TipoCambioTxt = ToDouble(txt.value) diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb index 972139eaa..1746f7e3f 100644 --- a/Bancos/IE.aspx.vb +++ b/Bancos/IE.aspx.vb @@ -582,7 +582,7 @@ Partial Class Bancos_IE Folio = "" DirectCast(Master.FindControl("TSM"), ScriptManager).EnablePageMethods = True TxtImporte.Attributes.Add("onblur", "upIE(this);FncImporteCuenta(this);") - 'Calendario.StartDate = Now.AddMonths(-2).FirstDayOfMonth() + 'Calendario.StartDate = NowADS().AddMonths(-2).FirstDayOfMonth() ViewState("IDPoliza") = "-1" CveIEDeposito = -1 CveIEDeposito2 = -1 @@ -591,8 +591,8 @@ Partial Class Bancos_IE CvePrePoliza = -1 CveSolicitudViatico = -1 ComplementoSerieFolio = "" - 'TxtFechaDevuelto.Text = Now.ToShortDateString - TxtFechaCancelacion.Text = Now.ToShortDateString + 'TxtFechaDevuelto.Text = NowADS().ToShortDateString + TxtFechaCancelacion.Text = NowADS().ToShortDateString CveCompraDeCDin = -1 'If UsuarioActual.CveEmpresa.Contiene(66) Then trNotificar.Visible = True @@ -638,7 +638,9 @@ Partial Class Bancos_IE 'CargaNotas() DVDevolucion.Visible = True HdnCveProveedor.Value = Request("CveProveedor") - DivOtrosIngresosEgresos.Visible = False + DivOtrosIngresosEgresos.Visible = True + TxtOtrosIngresosEgresos.Attributes.Add("onkeyup", $"ValidarCantidadDevCompras();") + End If TxtImporte.Attributes.Add("onkeypress", "javascript: return false;") End If @@ -647,10 +649,8 @@ Partial Class Bancos_IE If UsuarioActual.Empresa.Funcionalidad(590) = "1" Then DivOtrosIngresosEgresos.Visible = True End If - End If - If Request("Opcion") IsNot Nothing AndAlso Request("Opcion").ToString.Contiene("EGSCREDITO") Then LblPagueseA.Text = "" LblPagueseA.Visible = False @@ -736,7 +736,7 @@ Partial Class Bancos_IE 'Configuración de Modalidad Insert ImgAddObs.Visible = False CveIE = -1 - TxtFechaDocumento.Text = Now.ToShortDateString + TxtFechaDocumento.Text = NowADS().ToShortDateString ImgUpdateCuentaDeposito.Visible = False TxtFechaDocumento.Attributes.Add("onchange", "CambiaTC(this);") End If @@ -1177,43 +1177,8 @@ Partial Class Bancos_IE If ObjIE.CveIECancelacion > 0 Then CveIECancelacion = ObjIE.CveIECancelacion End If - UpCancelacion.Update() - 'OTROS DATOS - DATOS COMPLEMENTO SUSTITUCION - 'Dim CveIESustitucion As Integer = ObjIE.DtResultados(0)("CveIESustitucion").ToString.ToEntero - 'If CveIESustitucion > 0 Then - ' TRComplementoSustitucion.Visible = True - - ' If ObjIE.GetBancosIE(CveIESustitucion, UsuarioActual.CveEmpresa) And ObjIE.DtResultados.Rows.Count > 0 Then - ' ARefIESustitucion.HRef = String.Format("/Bancos/IE.aspx?CveIE={0}", CveIESustitucion) - ' ARefIESustitucion.InnerText = ObjIE.Folio - ' End If - - 'End If - - ' codigo se reubicó a linea 969 - ''DETALLES - MOVIMIENTOS - 'If ObjIE.GetBancosIEMovimientos(CveIE, UsuarioActual.CveEmpresa) Then - ' GvM.DataSource = ObjIE.DtResultados.FiltraParametros("CveConceptoContable <> 30") - - ' If UsuarioActual.TienePermisoProceso(277) AndAlso Not TabCancelacion.Visible Then - ' GvM.Columns(8).Visible = True - ' End If - - ' If ObjIE.DtResultados.FiltraParametros("TCPago > 1").Rows.Count.ToEntero() > 0 Then - ' GvM.Columns(7).Visible = True - ' End If - - ' If ObjIE.DtResultados.FiltraParametros("CveMonedaIE <> CveMoneda").Rows.Count.ToEntero > 0 Then - ' GvM.Columns(5).Visible = True - ' GvM.Columns(6).Visible = True - ' End If - - ' GvM.DataBind() - - 'End If - 'Movimientos Relacionados Padre If ObjIE.GetBancosIEMovimientosPadre(CveIE, UsuarioActual.CveEmpresa) Then If ObjIE.DtResultados.FiltraParametros("TCPago > 1").Rows.Count.ToEntero() > 0 Then @@ -1358,26 +1323,20 @@ Partial Class Bancos_IE End Sub #End Region - - Private Sub CargaNotas(CvemonedaInterna As Integer) Dim ObjMovtos As New ClsMovimientos() If CvemonedaInterna > 0 Then - If ObjMovtos.GetAnticiposProveedor(CveProveedor, -1, CvemonedaInterna, -1) AndAlso ObjMovtos.DtResultados.FiltraParametros("TipoDocto = 'NC'").Rows.Count > 0 Then + If ObjMovtos.GetAnticiposProveedor(CveProveedor, UsuarioActual.CveEmpresa, CveMoneda:=CvemonedaInterna, TipoDocto:="NC") AndAlso ObjMovtos.DtResultados.Rows.Count > 0 Then GvA.DataSource = ObjMovtos.DtResultados.FiltraParametros("TipoDocto = 'NC' and Saldo > 0 and CveCompra > 0") - Else GvA.DataSource = Nothing End If Else GvA.DataSource = Nothing End If - - ObjMovtos.Dispose() - GvA.DataBind() UpGvNotas.Update() End Sub @@ -2108,7 +2067,7 @@ Partial Class Bancos_IE If CveCliente > 0 AndAlso Not DivIvaIxC.Visible AndAlso TxtIvaIxC.Text.ToDouble = 0 Then 'RMF- CASO DONDE HAY UNA DEVOLUCION Y TENGO QUE AFECTAR LAS FACTURAS QUE SE HABIAN MARCADO COMO PAGADAS TENGO QUE REGRESARLAS A PENDIENTES Dim Mov As New ClsMovimientos - If Mov.GetMovimientosIE(2, DdlIEDevolucion.SelectedValue.ToEntero, -1, Now, Now, 1, 0, UsuarioActual.CveEmpresa) Then + If Mov.GetMovimientosIE(2, DdlIEDevolucion.SelectedValue.ToEntero, -1, NowADS(), NowADS(), 1, 0, UsuarioActual.CveEmpresa) Then Dim DtIE As DataTable = Mov.DtResultados For Each dr As DataRow In DtIE.Rows @@ -2154,7 +2113,7 @@ Partial Class Bancos_IE Dim ConceptoContable As Integer Dim TipoMovimiento As Boolean Dim importeMovimiento As Decimal - Dim FechaMovimiento As Date = Now + Dim FechaMovimiento As Date = NowADS() Dim Concepto As String = "" Dim Referencia As String = PagueseA @@ -2413,15 +2372,10 @@ Partial Class Bancos_IE Dim FechaCompraNota As Date = GvRow.DataKey("Fecha").ToDate If tCveMoneda > 1 Then - TCCompra = GlobalTipoCambio(FechaCompraNota).ToDecimal + TCCompra = GvRow.DataKey("TipoCambio").ToDecimal TCDocumento = GlobalTipoCambio(TxtFechaDocumento.Text.ToDate).ToDecimal - - If TCCompra <= 0 Then - Alert("No se pudo obtener el tipo de cambio de la nota de crédito.", TipoMensaje.MsgAdvertencia) - End If - If TCDocumento <= 0 Then - Alert("No se pudo obtener el tipo de cambio del documentpo.", TipoMensaje.MsgAdvertencia) + Alert("No se pudo obtener el tipo de cambio del documento.", TipoMensaje.MsgAdvertencia) End If End If ImporteAplicar = GvRow.DataKey("Saldo").ToDecimal @@ -2433,23 +2387,9 @@ Partial Class Bancos_IE Else ImporteAplicarMN = (ImporteAplicar * If(tCveMoneda = 1, 1, TxtTipoCambio.Text.ToDecimal)).RoundSQL() End If - - If tCveMoneda > 1 Then - - TCCompra = GlobalTipoCambio(GvRow.DataKey("Fecha").ToDate).ToDecimal - TCDocumento = GlobalTipoCambio(TxtFechaDocumento.Text.ToDate).ToDecimal - - If TCCompra <= 0 Then - Alert("No se pudo obtener el tipo de cambio de la nota de crédito.", TipoMensaje.MsgAdvertencia) - End If - - If TCDocumento <= 0 Then - Alert("No se pudo obtener el tipo de cambio del documentpo.", TipoMensaje.MsgAdvertencia) - End If - End If - ConceptoAplicar = $"Devolución de Proveedor {PagueseA} {ImporteAplicar} NC:{GvRow.DataKey("SerieFolio")}" CveCompraDeCDin = GvRow.DataKey("CveCompra").ToEntero + Dim tCveTipoConcepto As Integer = GvRow.DataKey("CveTipoConcepto").ToEntero 'BANCOS COMPLEMENTARIA If tCveMoneda > 1 Then @@ -2462,22 +2402,19 @@ Partial Class Bancos_IE 'CANCELA NC ImporteAplicar = ImporteAplicar '- TxtOtrosIngresosEgresos.Text.ToDecimal ImporteAplicarMN = ImporteAplicar ' (ImporteAplicar * If(DdlMoneda.SelectedValue.ToEntero = 1, 1, TxtTipoCambio.Text.ToDecimal)).RoundSQL() + Dim ConPreP As ConceptosTipoSaldo = ClsPaginas.ObtenerCveConceptoPrePoliza(15, tCveMoneda, False, tCveTipoConcepto) - If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, -(ImporteAplicar), (ImporteAplicarMN), 18, ReferenciaAplicar, ConceptoAplicar, CveIE:=CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteME:=ImporteAplicarME, TipoCambio:=TCCompra) Then + If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, -(ImporteAplicar), (ImporteAplicarMN), ConPreP.CveConcepto, ReferenciaAplicar, ConceptoAplicar, CveIE:=CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteME:=ImporteAplicarME, TipoCambio:=TCCompra) Then MsgError = "Ocurrió un error al registrar el asiento de pago de devolución" Exit Select End If - - - - 'NC COMPLEMENTARIA If tCveMoneda > 1 Then ImporteAplicarMN = ((ImporteAplicar * If(tCveMoneda = 1, 1, TCCompra)) - ImporteAplicar).RoundSQL() - If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, -(ImporteAplicar), -(ImporteAplicarMN), 201, ReferenciaAplicar, ConceptoAplicar, CveIE:=CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteME:=-(ImporteAplicarME), TipoCambio:=TCCompra) Then + If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, -(ImporteAplicar), -(ImporteAplicarMN), ConPreP.CveConceptoComplementario, ReferenciaAplicar, ConceptoAplicar, CveIE:=CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteME:=-(ImporteAplicarME), TipoCambio:=TCCompra) Then MsgError = "Ocurrió un error al registrar el asiento de bancos complementaria de devolución" End If @@ -2508,72 +2445,79 @@ Partial Class Bancos_IE 'IMPUESTOS Dim PorcentajePagoDevDin As Decimal = (ImporteAplicar / ImporteAplicar).RoundSQL(6) - Dim CveConceptoContableAplciar As Integer = -1 - 'Dim TipoMovtoAplicar = False + Dim CveConceptoContableAplicar As Integer = -1 + Dim CveMonedaDev As Integer = GvRow.DataKey("CveMoneda").ToEntero + Dim TotalCompraDev As Decimal = GvRow.DataKey("Original").ToDecimal + Dim IVADev As Decimal = GvRow.DataKey("IVA").ToDecimal + Dim IEPSDev As Decimal = GvRow.DataKey("IEPS").ToDecimal + PorcentajeCompraDevDinC = GvRow.DataKey("PorcentajeIVA").ToDecimal - Dim ObjCompras As New ClsCompras() - If ObjCompras.GetCompras(CveCompraDeCDin, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa) Then + Dim IVADevMN As Decimal = 0 + Dim IEPSDevMN As Decimal = 0 + Dim PorcentajeDevolucion As Decimal = ((ImporteAplicar * 100D / TotalCompraDev) / 100).RoundSQL(2) - Dim dr As DataRow = ObjCompras.DtResultados.Rows(0) - If dr IsNot Nothing Then + IVADev = Math.Round(IVADev * PorcentajeDevolucion, 2) + IEPSDev = Math.Round(IEPSDev * PorcentajeDevolucion, 2) - Dim CveMonedaDev As Integer = dr("CveMoneda").ToString.ToEntero - Dim TotalCompraDev As Decimal = dr("Total").ToString.ToDecimal + If tCveMoneda > 1 Then + IVADevMN = IVADev + IEPSDevMN = IEPSDev + Else + IVADevMN = (IVADev * If(CveMonedaDev = 1, 1, TxtTipoCambio.Text.ToDecimal)).RoundSQL(2) + IEPSDevMN = (IEPSDev * If(CveMonedaDev = 1, 1, TxtTipoCambio.Text.ToDecimal)).RoundSQL(2) + End If - Dim IVADev As Decimal = dr("IVA").ToString.ToDecimal - Dim IEPSDev As Decimal = dr("IEPS").ToString.ToDecimal - PorcentajeCompraDevDinC = ObjCompras.DtResultados.Rows(0)("PorcentajeIVA").ToString.ToDecimal + Dim ErrorDevolucionImpuestos As Boolean = False + If IVADev > 0 Then + If ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, -IVADev, -IVADevMN, 14, ReferenciaAplicar, ConceptoAplicar, CveIE:=CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteME:=-IVADev, PorcentajeImpuesto:=PorcentajeCompraDevDinC) Then - Dim IVADevMN As Decimal = 0 - Dim IEPSDevMN As Decimal = 0 - Dim PorcentajeDevolucion As Decimal = ((ImporteAplicar * 100D / TotalCompraDev) / 100).RoundSQL(2) - - IVADev = Math.Round(IVADev * PorcentajeDevolucion, 2) - IEPSDev = Math.Round(IEPSDev * PorcentajeDevolucion, 2) - - If tCveMoneda > 1 Then - IVADevMN = IVADev - IEPSDevMN = IEPSDev - Else - IVADevMN = (IVADev * If(CveMonedaDev = 1, 1, TxtTipoCambio.Text.ToDecimal)).RoundSQL(2) - IEPSDevMN = (IEPSDev * If(CveMonedaDev = 1, 1, TxtTipoCambio.Text.ToDecimal)).RoundSQL(2) - End If - - Dim ErrorDevolucionImpuestos As Boolean = False - - If IVADev > 0 Then - - If ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, -IVADev, -IVADevMN, 14, ReferenciaAplicar, ConceptoAplicar, CveIE:=CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteME:=-IVADev, PorcentajeImpuesto:=PorcentajeCompraDevDinC) Then - - If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, -IVADev, -IVADevMN, 19, ReferenciaAplicar, ConceptoAplicar, CveIE:=CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteME:=-IVADev, PorcentajeImpuesto:=PorcentajeCompraDevDinC) Then - MsgError = "Ocurrió un error al registrar el asiento de impuestos de devolución" - ErrorDevolucionImpuestos = True - End If - Else - MsgError = "Ocurrió un error al registrar el asiento de impuestos de devolución" - ErrorDevolucionImpuestos = True - End If - End If - - If ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, -IEPSDev, -IEPSDevMN, 25, ReferenciaAplicar, ConceptoAplicar, CveIE:=CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteME:=-IEPSDev) Then - - If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, -IEPSDev, -IEPSDevMN, 26, ReferenciaAplicar, ConceptoAplicar, CveIE:=CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteME:=-IEPSDev) Then - MsgError = "Ocurrió un error al registrar el asiento de impuestos de devolución" - ErrorDevolucionImpuestos = True - End If - Else + If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, -IVADev, -IVADevMN, 19, ReferenciaAplicar, ConceptoAplicar, CveIE:=CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteME:=-IVADev, PorcentajeImpuesto:=PorcentajeCompraDevDinC) Then MsgError = "Ocurrió un error al registrar el asiento de impuestos de devolución" ErrorDevolucionImpuestos = True End If - - If ErrorDevolucionImpuestos Then - MsgError = MsgError & " Error en devolución compra." - End If + Else + MsgError = "Ocurrió un error al registrar el asiento de impuestos de devolución" + ErrorDevolucionImpuestos = True End If End If + If IEPSDevMN <> 0 Then + If ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, -IEPSDev, -IEPSDevMN, 25, ReferenciaAplicar, ConceptoAplicar, CveIE:=CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteME:=-IEPSDev) Then + If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, -IEPSDev, -IEPSDevMN, 26, ReferenciaAplicar, ConceptoAplicar, CveIE:=CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteME:=-IEPSDev) Then + MsgError = "Ocurrió un error al registrar el asiento de impuestos de devolución" + ErrorDevolucionImpuestos = True + End If + Else + MsgError = "Ocurrió un error al registrar el asiento de impuestos de devolución" + ErrorDevolucionImpuestos = True + End If + End If + If ErrorDevolucionImpuestos Then + MsgError = MsgError & " Error en devolución compra." + End If + + End If Next + If TxtOtrosIngresosEgresos.Text.ToDecimal <> 0 Then + Dim Impo As Decimal = TxtOtrosIngresosEgresos.Text.ToDecimal + Dim TipoMovtoIE As Boolean + Dim CveConcIE As Integer + If Impo > 0 Then + TipoMovtoIE = True + Impo = Math.Abs(Impo) + CveConcIE = 78 + Else + TipoMovtoIE = False + Impo = Math.Abs(Impo) + CveConcIE = 211 + End If + + If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoIE, Impo, Impo, CveConcIE, ReferenciaAplicar, ConceptoAplicar, CveIE:=CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteME:=0, TipoCambio:=TCDocumento, CveSubProyecto:=CveSubProyecto) Then + MsgError = "Ocurrió un error al registrar el asiento de pago de devolución" + Exit Select + End If + End If Else If tCveMoneda > 1 Then @@ -2624,6 +2568,7 @@ Partial Class Bancos_IE 'CANCELA NC ImporteAplicar = ImporteAplicar - TxtOtrosIngresosEgresos.Text.ToDecimal ImporteAplicarMN = ImporteAplicar ' (ImporteAplicar * If(DdlMoneda.SelectedValue.ToEntero = 1, 1, TxtTipoCambio.Text.ToDecimal)).RoundSQL() + Dim ConPreP As ConceptosTipoSaldo = ClsPaginas.ObtenerCveConceptoPrePoliza(15, tCveMoneda, False, 1) If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, -(ImporteAplicar), (ImporteAplicarMN), 18, ReferenciaAplicar, ConceptoAplicar, CveIE:=CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteME:=ImporteAplicarME, TipoCambio:=TCCompra) Then MsgError = "Ocurrió un error al registrar el asiento de pago de devolución" @@ -2664,9 +2609,7 @@ Partial Class Bancos_IE End If 'IMPUESTOS - Dim PorcentajePagoDevDin = (TxtImporte.Text.ToDecimal / ImporteOriginalDevDin).RoundSQL(6) - Dim CveConceptoContableAplciar = -1 - + Dim PorcentajePagoDevDin As Decimal = (TxtImporte.Text.ToDecimal / ImporteOriginalDevDin).RoundSQL(6) Dim ObjCompras As New ClsCompras() If ObjCompras.GetCompras(CveCompraDeCDin, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa) Then @@ -2737,7 +2680,7 @@ Partial Class Bancos_IE Dim ConceptoContable As Integer Dim TipoMovimiento As Boolean Dim importeMovimiento As Decimal = TxtImporte.Text.ToDecimal - Dim FechaMovimiento As Date = Now + Dim FechaMovimiento As Date = NowADS() Dim Concepto As String = "" Dim Referencia As String = PagueseA Dim CveCredito As Integer @@ -3563,7 +3506,7 @@ Partial Class Bancos_IE Dim ObjCancelacion As New Timbrado If EstatusSATCancelado(FolioFiscalCancelar, UsuarioActual.Empresa.RFC, RFCReceptorCancelar) Then - If Banc.UpdateComplementoPagoCancelado(CveComplementoPagoCancelar, 2, CvePACCancelacion, UsuarioActual.CveEmpresa, Date.Now, "", 1) Then + If Banc.UpdateComplementoPagoCancelado(CveComplementoPagoCancelar, 2, CvePACCancelacion, UsuarioActual.CveEmpresa, NowADS(), "", 1) Then CargaComplementosPago() RegistraScript("$('#ModalCancelarComplemetno').modal('hide');") ErrorCancelarComplemento = False @@ -3571,9 +3514,8 @@ Partial Class Bancos_IE Else ErrorCancelarComplemento = True End If - Else - Dim respCancelacion = ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscalCancelar, 0, RFCReceptorCancelar, UsuarioActual.Empresa.RFC, CvePACCancelacion, CveSATMotivoCancelacion:=CveSATMotivoCancelacion) + Dim respCancelacion As RespuestaCancelacionSAT = ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscalCancelar, 0, RFCReceptorCancelar, UsuarioActual.Empresa.RFC, CvePACCancelacion, CveSATMotivoCancelacion:=CveSATMotivoCancelacion) If respCancelacion.Verificado Then If Banc.UpdateComplementoPagoCancelado(CveComplementoPagoCancelar, 2, CvePACCancelacion, UsuarioActual.CveEmpresa, FechaCancelacion:=ObjCancelacion.CancelacionFecha, SelloCancelacion:=ObjCancelacion.CancelacionAcuse, CveSATMotivoCancelacion:=CveSATMotivoCancelacion) Then @@ -3582,7 +3524,6 @@ Partial Class Bancos_IE ErrorCancelarComplemento = False Alert("El complemento se cancelo correctamente.") End If - Else Alert("Se presento un error al cancelar el complemento.", TipoMensaje.MsgAdvertencia) ErrorCancelarComplemento = True @@ -3852,7 +3793,7 @@ Partial Class Bancos_IE End Sub Protected Sub BtnDescontabilizar_Click(sender As Object, e As EventArgs) Dim ObjConta As New ClsContabilidad - Dim Movimientos = ObjConta.GetMovimientosPoliza(IDPoliza, UsuarioActual.CveEmpresa) + Dim Movimientos As Integer = ObjConta.GetMovimientosPoliza(IDPoliza, UsuarioActual.CveEmpresa) 'Verifica que solo exista 1 compra asociada If Movimientos = 1 Then @@ -3892,7 +3833,7 @@ Partial Class Bancos_IE Dim ObjConta As New ClsContabilidad ObjConta.IniciaTransacSQL() - Dim ErrorCompra = False + Dim ErrorCompra As Boolean = False 'Elimina la poliza If (UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.Funcionalidad(200).ToString = "1") AndAlso IDPoliza > 0 Then @@ -3937,15 +3878,15 @@ Partial Class Bancos_IE #Region " CARGAR - COMPROBANTE " Protected Sub BtnConfirmaComprobante_Click(sender As Object, e As EventArgs) - Dim DirectorioGuardar = String.Format("{0}IE", UsuarioActual.Empresa.Ruta) - Dim ArchivoTemporal = String.Format("{0}Temp\{1}", UsuarioActual.Empresa.Ruta, Session("FileUpload").ToString) + Dim DirectorioGuardar As String = String.Format("{0}IE", UsuarioActual.Empresa.Ruta) + Dim ArchivoTemporal As String = String.Format("{0}Temp\{1}", UsuarioActual.Empresa.Ruta, Session("FileUpload").ToString) If Session("FileUpload").ToString <> String.Empty AndAlso File.Exists(ArchivoTemporal) Then Dim Extension As String = Path.GetExtension(ArchivoTemporal) Dim ObjIE As New ClsBancos ObjIE.IniciaTransacSQL() - Dim TieneError = False + Dim TieneError As Boolean = False If ObjIE.UpdateComprobanteIE(Extension.Replace("."c, ""), CveIE) Then If Not Directory.Exists(DirectorioGuardar) Then Directory.CreateDirectory(DirectorioGuardar) @@ -4055,7 +3996,7 @@ Partial Class Bancos_IE If HdnCveCliente.Value.ToEntero > 0 Then trIEDevolucion.Visible = True - If ObjMov.GetMovimientosIE(1, HdnCveCliente.Value.ToEntero, DdlCuenta.SelectedValue.ToEntero, Now.AddMonths(-24), Now, CveMoneda, -1, UsuarioActual.CveEmpresa) Then + If ObjMov.GetMovimientosIE(1, HdnCveCliente.Value.ToEntero, DdlCuenta.SelectedValue.ToEntero, NowADS().AddMonths(-24), NowADS(), CveMoneda, -1, UsuarioActual.CveEmpresa) Then DtIEDevolucion = ObjMov.DtResultados.FiltraParametros("Saldo > 0 ") Else Alert("Ocurrió un error al cargar los Egresos del Proveedor seleccionado. Por favor vuelva a intetar.", TipoMensaje.MsgError) @@ -4098,8 +4039,6 @@ Partial Class Bancos_IE #Region "PAGO ACREEDORES" Private Sub CargaIEIngresos() Dim ObjMov As New ClsMovimientos - - If HdnCveProveedor.Value.ToEntero > 0 Then DivIEAcreedor.Visible = True DdlIEDevolucion.Items.Clear() @@ -4258,8 +4197,6 @@ Partial Class Bancos_IE If DdlCuentaDeposito.SelectedValue.ToEntero > 0 Then If Dep.GetCuentasDepositos(CveProveedor:=CveProveedor, CveCuentaDeposito:=DdlCuentaDeposito.SelectedValue.ToEntero) AndAlso Dep.DtResultados.Rows.Count = 1 Then - - If Dep.DtResultados.Rows.Count > 0 Then If Dep.DtResultados.Rows(0)("TieneCIE").ToString.ToEntero = 1 Then @@ -4270,41 +4207,28 @@ Partial Class Bancos_IE OriReferenciaCIE = Dep.DtResultados.Rows(0)("Referencia").ToString OriConceptoCIE = Dep.DtResultados.Rows(0)("ConceptoCIE").ToString - - Else TrReferenciaCIE.Visible = False End If - - If Boolean.Parse(Dep.DtResultados.Rows(0)("EstatusPagoElectronicoGrupos").ToString) AndAlso Dep.DtResultados.Rows(0)("CveSATBanco").ToString.ToEntero <= 0 Then Alert("Es necesario establecer el banco de la cuenta deposito", TipoMensaje.MsgAdvertencia) BtnGuardar.Enabled = False Else BtnGuardar.Enabled = True End If - Else TrReferenciaCIE.Visible = False End If - Else TrReferenciaCIE.Visible = False End If - - Else TrReferenciaCIE.Visible = False End If - - - Dep.Dispose() UpCuentaDeposito.Update() UpGuardar.Update() - - End Sub #End Region @@ -4322,15 +4246,12 @@ Partial Class Bancos_IE Private Sub BtnRemove_Click(sender As Object, e As EventArgs) Handles BtnRemove.Click - - If Not TxtDescripcion.Text = "" Then If ChkConciliado.Checked Then Alert("El documento seleccionado no se puede eliminar porque se encuentra conciliado.", TipoMensaje.MsgError) Exit Sub End If - Dim ObjAC As ClsContPAQi = Nothing Dim Banc As New ClsBancos Dim ObjConta As New ClsContabilidad(Banc.IniciaTransacSQL()) @@ -4360,7 +4281,7 @@ Partial Class Bancos_IE End If If Borrar = True Then - Dim ErrorCompra = False + Dim ErrorCompra As Boolean = False Dim MsgEliminar As String = "" 'VERIFICA SI EL IES ESTA VINCULADO A UNA SOLICITUD VIATICO @@ -4452,7 +4373,7 @@ Partial Class Bancos_IE If ObjOC.GetSolicitudAnticipo(CveOCSolicitudAnticipo, UsuarioActual.CveEmpresa) AndAlso ObjOC.DtResultados.Rows.Count > 0 Then - Dim DrOC = ObjOC.DtResultados.FiltroPrimero("") + Dim DrOC As DataRow = ObjOC.DtResultados.FiltroPrimero("") If DrOC("TipoTermino").ToString.ToEntero.Contiene(0, 3) Then TxtObservaciones.Text = DrOC("Descripcion").ToString @@ -4836,6 +4757,8 @@ Partial Class Bancos_IE ImporteOriginalDevDin = UrlParametros("ORIGINAL").ToString.ToDecimal.RoundSQL(6) TxtImporte.Text = UrlParametros("SALDO").ToString.FormatoNumero() TxtDevolución.Text = UrlParametros("SALDO").ToString.FormatoNumero() + divTxtDevolucion.Visible = True + lblDevolucion.Visible = True 'TxtImporte.Attributes.Add("onkeyup", $"FormatoMoneda(this);ValidarCantidad(this,{UrlParametros("SALDO").ToString});") TxtDevolución.Attributes.Add("onkeyup", $"FormatoMoneda(this);ValidarCantidadDev( {UrlParametros("SALDO").ToString});") TxtOtrosIngresosEgresos.Attributes.Add("onkeyup", $"ValidarCantidadDev();") @@ -4909,7 +4832,7 @@ Partial Class Bancos_IE Protected Sub LnkCancelar_Click(sender As Object, e As EventArgs) If ChkConciliado.Checked AndAlso UsuarioActual.CveEmpresa = 119 Then - 'TxtFechaDesconciliado.Text = Now.ToShortDateString + 'TxtFechaDesconciliado.Text = NowADS().ToShortDateString 'UpDesconciliar.Update() 'RegistraScript("$('#DModalDesconciliar').modal()") Dim fechaCancelacion As String = TxtFechaAplicado.Text.ToDate.AddMonths(1).FirstDayOfMonth.ToShortDateString @@ -4958,7 +4881,7 @@ Partial Class Bancos_IE Dim Banco As New ClsBancos - If Banco.GetComplementoPagosRep(-1, Now.AddYears(-2), Now, CveIE, -1, 1, UsuarioActual.CveEmpresa, -1) Then + If Banco.GetComplementoPagosRep(-1, NowADS().AddYears(-2), NowADS(), CveIE, -1, 1, UsuarioActual.CveEmpresa, -1) Then If Not Banco.DtResultados.Rows.Count > 0 Then Banco.Dispose() Alert("No se generaron complementos de pago porque no hay facturas con método de pago PPD", TipoMensaje.MsgAdvertencia) @@ -5045,10 +4968,9 @@ Partial Class Bancos_IE End Try End Sub - Protected Sub LnkEliminaMovComprobacion_Click(sender As Object, e As EventArgs) Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow) - Dim TieneError = False + Dim TieneError As Boolean = False If GvRH.Rows(gvRow.RowIndex).DataKey("CveIE").ToEntero > 0 Then Dim ObjBancos As New ClsBancos ObjBancos.IniciaTransacSQL() @@ -5424,13 +5346,13 @@ Partial Class Bancos_IE If EstatusSATCancelado(FolioFiscalCancelar, UsuarioActual.Empresa.RFC, RFCReceptorCancelar) Then - If ObjBanco.UpdateComplementoPagoCancelado(CveComplementoPagoCancelar, 2, CvePACCancelacion, UsuarioActual.CveEmpresa, Date.Now, "", 1) Then + If ObjBanco.UpdateComplementoPagoCancelado(CveComplementoPagoCancelar, 2, CvePACCancelacion, UsuarioActual.CveEmpresa, NowADS(), "", 1) Then CargaComplementosPago() Alert("El complemento se cancelo correctamente.") End If Else - Dim resp = ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscalCancelar, 0, RFCReceptorCancelar, UsuarioActual.Empresa.RFC, CvePACCancelacion, CveSATMotivoCancelacion:=CveSATMotivoCancelacion) + Dim resp As RespuestaCancelacionSAT = ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscalCancelar, 0, RFCReceptorCancelar, UsuarioActual.Empresa.RFC, CvePACCancelacion, CveSATMotivoCancelacion:=CveSATMotivoCancelacion) If resp.Verificado Then If ObjBanco.UpdateComplementoPagoCancelado(CveComplementoPagoCancelar, 2, CvePACCancelacion, UsuarioActual.CveEmpresa, FechaCancelacion:=ObjCancelacion.CancelacionFecha, SelloCancelacion:=ObjCancelacion.CancelacionAcuse, CveSATMotivoCancelacion:=CveSATMotivoCancelacion) Then @@ -5598,7 +5520,7 @@ Partial Class Bancos_IE Dim respuesta As Boolean = False - Dim Vigencia = Timbrado.VerificarVigenciaSAT(FolioFiscal, RFCDe, RFCReceptor, "0", True) + Dim Vigencia As Timbrado.AcuseCancelacionSAT = Timbrado.VerificarVigenciaSAT(FolioFiscal, RFCDe, RFCReceptor, "0", True) If Vigencia IsNot Nothing Then If Vigencia.Estado.ToUpper = "CANCELADO" Then @@ -5655,8 +5577,8 @@ Partial Class Bancos_IE UpEliminarCotizacion.Update() End Sub Private Sub RVTxtFechaDocumento_Init(sender As Object, e As EventArgs) Handles RVTxtFechaDocumento.Init - RVTxtFechaDocumento.MaximumValue = DateTime.Now.ToShortDateString - Calendario.EndDate = DateTime.Now + RVTxtFechaDocumento.MaximumValue = NowADS().ToShortDateString + Calendario.EndDate = NowADS() End Sub Private Sub CargaOCRelacionadas() diff --git a/Bancos/IE2.aspx.vb b/Bancos/IE2.aspx.vb index c8a8bba77..caf5f55d1 100644 --- a/Bancos/IE2.aspx.vb +++ b/Bancos/IE2.aspx.vb @@ -94,7 +94,7 @@ Partial Class Bancos_IE DirectCast(Master.FindControl("TSM"), ScriptManager).EnablePageMethods = True TxtImporte.Attributes.Add("onblur", "upIE(this);") - Calendario.StartDate = Now.AddMonths(-1) + Calendario.StartDate = NowADS().AddMonths(-1) ' rbPagueseA.Attributes.Add("onchange", "upPagueseA(this);") 'If UsuarioActual.CveRol = 1 Then 'rbPagueseAFuncionarioEmpleado.Visible = True : lblPagueseAFuncionarioEmpleado.Visible = True : rbPagueseAProveedor.Visible = True : lblPagueseAProveedor.Visible = True @@ -210,7 +210,7 @@ Partial Class Bancos_IE 'Configuración de Modalidad Insert ImgAddObs.Visible = False CveIE = -1 - TxtFechaDocumento.Text = Now.ToShortDateString + TxtFechaDocumento.Text = NowADS().ToShortDateString End If @@ -889,14 +889,14 @@ Partial Class Bancos_IE If Not Opcion.Contiene("DEV", "ANTC") AndAlso MsgError = "" Then 'MOVIMIENTOS EGRESOS - If ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, TxtImporte.Text.ToDouble, TxtObservaciones.Text, CveConceptoContable, TxtObservaciones.Text, Now, 0, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle) Then + If ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, TxtImporte.Text.ToDouble, TxtObservaciones.Text, CveConceptoContable, TxtObservaciones.Text, NowADS(), 0, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle) Then Dim IVA As Double = 0 ' TxtImporte.Text.ToDouble * HdnProvPorIVA.Value.ToDouble - If ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtImporte.Text.ToDouble - IVA - CIF, TxtObservaciones.Text, CveConceptoCompra, TxtObservaciones.Text, Now, 0, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle) Then - If IVA > 0 AndAlso Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, IVA, TxtObservaciones.Text, 19, TxtObservaciones.Text, Now, 0, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle) Then + If ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtImporte.Text.ToDouble - IVA - CIF, TxtObservaciones.Text, CveConceptoCompra, TxtObservaciones.Text, NowADS(), 0, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle) Then + If IVA > 0 AndAlso Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, IVA, TxtObservaciones.Text, 19, TxtObservaciones.Text, NowADS(), 0, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle) Then MsgError = "Detalle" End If 'intereses pagados - If CIF > 0 AndAlso Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, CIF, TxtObservaciones.Text, 46, TxtObservaciones.Text, Now, 0, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle) Then + If CIF > 0 AndAlso Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, CIF, TxtObservaciones.Text, 46, TxtObservaciones.Text, NowADS(), 0, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle) Then MsgError = "Detalle" End If Else @@ -910,8 +910,8 @@ Partial Class Bancos_IE 'MOVIMIENTOS INGRESOS - DEVOLUCIONES ElseIf Opcion.Contiene("DEV", "ANTC") AndAlso MsgError = "" Then - 'If ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtImporte.Text.ToDouble, TxtObservaciones.Text, CveConceptoContable, TxtObservaciones.Text, Now, 0, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCliente:=CveCliente, CveCreditoDetalle:=CveCreditoDetalle) Then - ' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, TxtImporte.Text.ToDouble, TxtObservaciones.Text, CveConceptoCompra, TxtObservaciones.Text, Now, 0, -1, If(CveProveedor > 0, DdlIEDevolucion.SelectedValue.ToEntero, CveIE), CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCliente:=CveCliente, CveCreditoDetalle:=CveCreditoDetalle) Then + 'If ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtImporte.Text.ToDouble, TxtObservaciones.Text, CveConceptoContable, TxtObservaciones.Text, NowADS(), 0, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCliente:=CveCliente, CveCreditoDetalle:=CveCreditoDetalle) Then + ' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, TxtImporte.Text.ToDouble, TxtObservaciones.Text, CveConceptoCompra, TxtObservaciones.Text, NowADS(), 0, -1, If(CveProveedor > 0, DdlIEDevolucion.SelectedValue.ToEntero, CveIE), CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCliente:=CveCliente, CveCreditoDetalle:=CveCreditoDetalle) Then ' MsgError = "no se pudo insertar el detalle de la póliza 2" ' End If 'Else @@ -922,7 +922,7 @@ Partial Class Bancos_IE Dim tipoCambio As Decimal If DdlMoneda.SelectedValue.ToString.ToEntero = 2 Then - tipoCambio = GlobalTipoCambio(Now).ToString.ToDecimal + tipoCambio = GlobalTipoCambio(NowADS()).ToString.ToDecimal Else tipoCambio = 1 End If @@ -958,8 +958,8 @@ Partial Class Bancos_IE Else 'EMpresa Prueba - If ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtImporte.Text.ToDouble, TxtObservaciones.Text, CveConceptoContable, TxtObservaciones.Text, Now, 0, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle) Then - If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, TxtImporte.Text.ToDouble, TxtObservaciones.Text, CveConceptoCompra, TxtObservaciones.Text, Now, 0, -1, If(CveProveedor > 0, DdlIEDevolucion.SelectedValue.ToEntero, CveIE), CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle) Then + If ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtImporte.Text.ToDouble, TxtObservaciones.Text, CveConceptoContable, TxtObservaciones.Text, NowADS(), 0, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle) Then + If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, TxtImporte.Text.ToDouble, TxtObservaciones.Text, CveConceptoCompra, TxtObservaciones.Text, NowADS(), 0, -1, If(CveProveedor > 0, DdlIEDevolucion.SelectedValue.ToEntero, CveIE), CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle) Then MsgError = "no se pudo insertar el detalle de la póliza 2" End If Else diff --git a/Bancos/MovimientosBancarios.aspx.vb b/Bancos/MovimientosBancarios.aspx.vb index ff1c36c07..e12ee58a9 100644 --- a/Bancos/MovimientosBancarios.aspx.vb +++ b/Bancos/MovimientosBancarios.aspx.vb @@ -178,9 +178,9 @@ Partial Class Bancos_MovimientosBancarios '''''' LLENADO HEADER Dim convenio As String = "000775770" 'Campos #1-4 del Header - HeaderTexto = String.Format("H{0}{1}GRUPO01 ", convenio.PadLeft(9, PadCeros), DateTime.Now().ToString("yyyy-MM-dd")) + HeaderTexto = String.Format("H{0}{1}GRUPO01 ", convenio.PadLeft(9, PadCeros), NowADS().ToString("yyyy-MM-dd")) 'Campo #5 del Header - HeaderTexto &= String.Format("{0}{1}", DTProveedorActual(0)("CveProveedor"), DateTime.Now().ToString("yyyyMMdd")).PadRight(20) + HeaderTexto &= String.Format("{0}{1}", DTProveedorActual(0)("CveProveedor"), NowADS().ToString("yyyyMMdd")).PadRight(20) 'Campos #6-8 del Header HeaderTexto &= String.Format("00").PadRight(586) Dim HeaderLength = HeaderTexto.Length @@ -209,7 +209,7 @@ Partial Class Bancos_MovimientosBancarios 'Llenamos en blanco datos de otros bancos 'Campos 8-17 del detalle --- 64 de otros bancos y 45 para FILLER --- Fecha de Alta - DetalleTexto &= String.Format("{0}{1}", Vacio.PadLeft(109), DateTime.Now().ToString("yyyy-MM-dd")) + DetalleTexto &= String.Format("{0}{1}", Vacio.PadLeft(109), NowADS().ToString("yyyy-MM-dd")) 'Otros Bancos NACIONAL!! Else @@ -218,7 +218,7 @@ Partial Class Bancos_MovimientosBancarios 'Llenamos datos de otros bancos 'Campos 8- 17 del detalle --- 44 de otros bancos --- 20 de internacional --- 45 Filler -- Fecha de Alta - DetalleTexto &= String.Format("MXP40{0}0014{1}{2}{3}", RowBanco("CLABE").ToString.PadLeft(35, PadCeros), Vacio.PadRight(20), Vacio.PadRight(45), DateTime.Now().ToString("yyyy-MM-dd")) + DetalleTexto &= String.Format("MXP40{0}0014{1}{2}{3}", RowBanco("CLABE").ToString.PadLeft(35, PadCeros), Vacio.PadRight(20), Vacio.PadRight(45), NowADS().ToString("yyyy-MM-dd")) End If 'Llenamos datos de Tipo de Persona - Fisica o Moral @@ -282,7 +282,7 @@ Partial Class Bancos_MovimientosBancarios ' 'Campos 19-21 --- 60 Tipo Persona Moral y 10 FILLER ' DetalleTexto &= Vacio.PadLeft(70) ' 'Campos 22-26 --- Tipo Persona Fisica y #26 RFC - ' DetalleTexto &= String.Format("{0}{1}{2}{3}{4}", TxtNombrePF.Text.ToUpper.PadRight(20), TxtApellidoPPF.Text.ToUpper.PadRight(20), TxtApellidoMPF.Text.ToUpper.PadRight(20), DateTime.Now().ToString("yyyy-MM-dd"), TxtRFC.Text.ToUpper.PadRight(14)) + ' DetalleTexto &= String.Format("{0}{1}{2}{3}{4}", TxtNombrePF.Text.ToUpper.PadRight(20), TxtApellidoPPF.Text.ToUpper.PadRight(20), TxtApellidoMPF.Text.ToUpper.PadRight(20), NowADS().ToString("yyyy-MM-dd"), TxtRFC.Text.ToUpper.PadRight(14)) ' End If 'End Sub @@ -337,9 +337,9 @@ Partial Class Bancos_MovimientosBancarios '''''' LLENADO HEADER 'Campos #1-4 del Header - HeaderTexto = String.Format("H{0}{1}01", convenio.PadLeft(9, PadCeros), DateTime.Now().ToString("yyyy-MM-dd")) + HeaderTexto = String.Format("H{0}{1}01", convenio.PadLeft(9, PadCeros), NowADS().ToString("yyyy-MM-dd")) 'Campo #5 del Header - HeaderTexto &= String.Format("P{0}{1}", DateTime.Now().ToString("s").Replace("-", "").Replace(":", ""), Vacio.PadRight(14)) + HeaderTexto &= String.Format("P{0}{1}", NowADS().ToString("s").Replace("-", "").Replace(":", ""), Vacio.PadRight(14)) 'Campos #6-11 del Header HeaderTexto &= String.Format("00").PadRight(1314) @@ -377,7 +377,7 @@ Partial Class Bancos_MovimientosBancarios End If 'Campos 24-50 del Detalle 0 1 2 3 4 5 6 7 8 9 - DetalleTexto &= String.Format("{0}{1}FA{2}{3}01{4}N{5}{6}{7}{7}{7}{6}N {7}700{8}{9}{7}", Divisa, Vacio.PadLeft(20), Importe.FormatoNumero.Replace(",", "").Replace(".", "").PadLeft(15, PadCeros), Vacio.PadRight(15, PadCeros), Vacio.PadRight(50), Vacio.PadRight(12, PadCeros), DateTime.Now.ToString("yyyy-MM-dd"), "0001-01-01", Datos.PadRight(700), Vacio.PadRight(52)) + DetalleTexto &= String.Format("{0}{1}FA{2}{3}01{4}N{5}{6}{7}{7}{7}{6}N {7}700{8}{9}{7}", Divisa, Vacio.PadLeft(20), Importe.FormatoNumero.Replace(",", "").Replace(".", "").PadLeft(15, PadCeros), Vacio.PadRight(15, PadCeros), Vacio.PadRight(50), Vacio.PadRight(12, PadCeros), NowADS().ToString("yyyy-MM-dd"), "0001-01-01", Datos.PadRight(700), Vacio.PadRight(52)) TotalAcumulado += Importe.ToEntero End Sub #End Region diff --git a/Bancos/NotificacionCheques.aspx.vb b/Bancos/NotificacionCheques.aspx.vb index 76f991f84..4273f09c5 100644 --- a/Bancos/NotificacionCheques.aspx.vb +++ b/Bancos/NotificacionCheques.aspx.vb @@ -31,8 +31,8 @@ Partial Class Bancos_NotificacionCheques Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load If Not Page.IsPostBack Then - txtFechaI.Text = Now.AddMonths(-1).FirstDayOfMonth.ToShortDateString - txtFechaF.Text = Now.ToShortDateString + txtFechaI.Text = NowADS().AddMonths(-1).FirstDayOfMonth.ToShortDateString + txtFechaF.Text = NowADS().ToShortDateString CargaTipoTransaccion("Egs") CargaPorNotificar() CargaPorEntregar() @@ -470,7 +470,7 @@ Partial Class Bancos_NotificacionCheques Dim objIE As New ClsBancos - If objIE.UpdateBancos_IENotificaciones(2, Now.ToString("dd/MM/yyyy"), gvr.FCTextBox("txtObservacionEntrega").Text, gvr.DataKey("CveIE").ToEntero) Then + If objIE.UpdateBancos_IENotificaciones(2, NowADS().ToString("dd/MM/yyyy"), gvr.FCTextBox("txtObservacionEntrega").Text, gvr.DataKey("CveIE").ToEntero) Then Alert("Cheque marcado como Entregado") End If diff --git a/Bancos/OtrosIE.aspx.vb b/Bancos/OtrosIE.aspx.vb index 263f9eff2..36f7c0632 100644 --- a/Bancos/OtrosIE.aspx.vb +++ b/Bancos/OtrosIE.aspx.vb @@ -565,7 +565,7 @@ Partial Class Bancos_OtrosIE End If If TipoBeneficiario > 0 And TipoBeneficiario < 7 Then - If ObjColectiva.GetColectivas(CveColectiva, "-1", "-1", "-1", UsuarioActual.CveEmpresa) Then + If ObjColectiva.GetColectivas(UsuarioActual.CveEmpresa, CveColectiva:=CveColectiva) Then If ObjColectiva.DtResultados.Rows.Count > 0 Then TxtPagueseA.Text = ObjColectiva.Colectiva Else diff --git a/Bancos/PagoAcreedor.aspx.cs b/Bancos/PagoAcreedor.aspx.cs index b8b2856c6..42b3d4f01 100644 --- a/Bancos/PagoAcreedor.aspx.cs +++ b/Bancos/PagoAcreedor.aspx.cs @@ -44,10 +44,10 @@ public partial class Bancos_PagoAcreedor : ClsPaginas CargaProveedores(); CargaReporte(); CargaSubproyectos(); - TxtFechaDocumento.Text = DateTime.Now.ToShortDateString(); - TxtFechaPrestamo.Text = DateTime.Now.ToShortDateString(); - txtFechaI.Text = DateTime.Now.FirstDayOfMonth().ToShortDateString(); - txtFechaF.Text = DateTime.Now.ToShortDateString(); + TxtFechaDocumento.Text = NowADS().ToShortDateString(); + TxtFechaPrestamo.Text = NowADS().ToShortDateString(); + txtFechaI.Text = NowADS().FirstDayOfMonth().ToShortDateString(); + txtFechaF.Text = NowADS().ToShortDateString(); TxtImporte.Attributes.Add("disabled", "disabled"); } diff --git a/Bancos/PagoDeudor.aspx.cs b/Bancos/PagoDeudor.aspx.cs index 0330a0c2e..6bd3aeda1 100644 --- a/Bancos/PagoDeudor.aspx.cs +++ b/Bancos/PagoDeudor.aspx.cs @@ -47,10 +47,10 @@ public partial class Bancos_PagoDeudor : ClsPaginas CveMonedaPrestamo = 1; UsaComplementaria = false; if (UsuarioActual.CveEmpresa.Contiene(1, 119)) { UsaComplementaria = true; } - TxtFechaDocumento.Text = DateTime.Now.ToShortDateString(); - TxtFechaPrestamo.Text = DateTime.Now.ToShortDateString(); - txtFechaI.Text = DateTime.Now.FirstDayOfMonth().ToShortDateString(); - txtFechaF.Text = DateTime.Now.ToShortDateString(); + TxtFechaDocumento.Text = NowADS().ToShortDateString(); + TxtFechaPrestamo.Text = NowADS().ToShortDateString(); + txtFechaI.Text = NowADS().FirstDayOfMonth().ToShortDateString(); + txtFechaF.Text = NowADS().ToShortDateString(); TxtTCDolaresPrestamo.Text = get_GlobalTipoCambio(TxtFechaPrestamo.Text.ToDateTime()).FormatoNumero(4); TxtTCDolaresPago.Text = get_GlobalTipoCambio(TxtFechaDocumento.Text.ToDateTime()).FormatoNumero(4); TxtImporte.Attributes.Add("disabled", "disabled"); diff --git a/Bancos/PagoElectronico.aspx.vb b/Bancos/PagoElectronico.aspx.vb index 5288e77e4..707da915e 100644 --- a/Bancos/PagoElectronico.aspx.vb +++ b/Bancos/PagoElectronico.aspx.vb @@ -174,8 +174,8 @@ Partial Class Bancos_PagoElectronico CveCuenta = -1 TipoMasiva = 1 - txtFechaI.Text = Date.Now.ToShortDateString - txtFechaF.Text = Date.Now.ToShortDateString + txtFechaI.Text = NowADS().ToShortDateString + txtFechaF.Text = NowADS().ToShortDateString CargaCuentas() CargaProveedores() @@ -309,7 +309,7 @@ Partial Class Bancos_PagoElectronico .Clear() .Buffer = True .ContentType = "textplain" - .AddHeader("Content-Disposition", String.Format("attachment;filename={0}{1}.txt", NombreArchivo, Date.Now.ToString("ddMMyyyy"))) + .AddHeader("Content-Disposition", String.Format("attachment;filename={0}{1}.txt", NombreArchivo, NowADS().ToString("ddMMyyyy"))) .Charset = "UTF-8" .ContentEncoding = Encoding.Default .Write(TextoCompleto) @@ -337,7 +337,7 @@ Partial Class Bancos_PagoElectronico DirectoryExistsCreate(String.Format("{0}Layout", UsuarioActual.Empresa.Ruta)) - NombreArchivo = String.Format("{2}{1}{0}.txt", UsuarioActual.CveUsuario, Date.Now.ToString("yyyyMMdd-HH-mm"), If(Tipo = 1, "LAYOUTPAGO", "LAYOUTALTA")) + NombreArchivo = String.Format("{2}{1}{0}.txt", UsuarioActual.CveUsuario, NowADS().ToString("yyyyMMdd-HH-mm"), If(Tipo = 1, "LAYOUTPAGO", "LAYOUTALTA")) Dim path As String = String.Format("{0}Layout\{1}", UsuarioActual.Empresa.Ruta, NombreArchivo) Dim fs As FileStream = File.Create(path) @@ -350,9 +350,9 @@ Partial Class Bancos_PagoElectronico Return True End Function Private Function GuardaTXT() As Boolean - Dim Retorno = True + Dim Retorno As Boolean = True Try - Dim Ruta = "" + Dim Ruta As String = "" Dim FileName As String = Path.GetFileName(FUTxt.PostedFile.FileName) NombreArchivo = FileName Dim Extension As String = Path.GetExtension(FUTxt.PostedFile.FileName) @@ -412,7 +412,7 @@ Partial Class Bancos_PagoElectronico 'Si la fecha de generacion del archivo es diferente de hoy activamos el boton REGENERAR - 'If e.Row.DBCampo("Fecha").ToDate.ToShortDateString <> Date.Now.ToShortDateString Then + 'If e.Row.DBCampo("Fecha").ToDate.ToShortDateString <> NowADS().ToShortDateString Then ' e.Row.FCLinkButton("LBRegenerar").Visible = True 'End If If DTEnviadas.MAX("FueConciliado", String.Format("CveLayoutEnvio = {0}", e.Row.DBCampo("CveLayoutEnvio"))).ToEntero > 0 Then @@ -438,7 +438,7 @@ Partial Class Bancos_PagoElectronico End If End Sub Protected Sub LBRegenerar_Click(sender As Object, e As EventArgs) - Dim CveBLE = CType(sender, LinkButton).CommandArgument.ToEntero + Dim CveBLE As Integer = CType(sender, LinkButton).CommandArgument.ToEntero Dim DtRegenerar As New DataTable Dim ObjBancos As New ClsBancos @@ -523,11 +523,11 @@ Partial Class Bancos_PagoElectronico TotalAcumulado = 0 ''VALIDA CUENTAS DEPOSITOS - Dim ErrorCuenta = False + Dim ErrorCuenta As Boolean = False Dim ProveedoresError As StringBuilder = New StringBuilder ProveedoresError.AppendFormat("") Dim TotalDetalles As Integer = 0 - Dim EsBancomer = False + Dim EsBancomer As Boolean = False For Each gvr As DataRow In DtTemp.Rows If gvr("CveCuentaDeposito").ToString <> "" AndAlso gvr("EstatusPagoElectronico").ToString <> "True" AndAlso gvr("AltaCuenta").ToString = "1" Then DTPendienteActual = DtTemp.FiltraParametros(String.Format("CveCuentaDeposito = {0}", gvr("CveCuentaDeposito").ToString)) @@ -626,7 +626,7 @@ Partial Class Bancos_PagoElectronico Descargas.AppendFormat("
  • Descargar Reporte
  • ", NombreArchivo) - Dim TextoErrorProveedores = "" + Dim TextoErrorProveedores As String = "" If ProveedoresError.Length > 160 Then TextoErrorProveedores = String.Format("


    Proveedores con Error:

    ------------------------------------------------------------------
    {0}

    ", ProveedoresError.ToString) Alert(String.Format("
    El Layout fue creado satisfactoriamente.{1}
    Descargas:
      {0}
    ", Descargas, TextoErrorProveedores), TipoMensaje.MsgInformacion) @@ -639,7 +639,7 @@ Partial Class Bancos_PagoElectronico End Sub Protected Sub CrearDetalle() - Dim Resultado = True + Dim Resultado As Boolean = True Dim CuentaDeposito As String = "" Dim TipoCuentaDeposito As String = "" Dim TipoCuenta As String = "" @@ -673,7 +673,7 @@ Partial Class Bancos_PagoElectronico 'Llenamos en blanco datos de otros bancos 'Campos 8-17 del detalle --- 64 de otros bancos y 45 para FILLER --- Fecha de Alta - DetalleTexto &= String.Format("{0}{1}", Vacio.PadLeft(109), DateTime.Now().ToString("yyyy-MM-dd")) + DetalleTexto &= String.Format("{0}{1}", Vacio.PadLeft(109), NowADS().ToString("yyyy-MM-dd")) 'Otros Bancos NACIONAL!! @@ -687,7 +687,7 @@ Partial Class Bancos_PagoElectronico 'Llenamos datos de otros bancos 'Campos 8- 17 del detalle --- 44 de otros bancos --- 20 de internacional --- 45 Filler -- Fecha de Alta - DetalleTexto &= String.Format("{0}40{1}{2}{3}{4}{5}", DTPendienteActual(0)("Abreviatura").ToString, DTPendienteActual(0)("CLABE").ToString.PadLeft(35, PadCeros), DTPendienteActual(0)("CLABE").ToString.Substring(0, 3).PadLeft(4, PadCeros), Vacio.PadRight(20), Vacio.PadRight(45), DateTime.Now().ToString("yyyy-MM-dd")) + DetalleTexto &= String.Format("{0}40{1}{2}{3}{4}{5}", DTPendienteActual(0)("Abreviatura").ToString, DTPendienteActual(0)("CLABE").ToString.PadLeft(35, PadCeros), DTPendienteActual(0)("CLABE").ToString.Substring(0, 3).PadLeft(4, PadCeros), Vacio.PadRight(20), Vacio.PadRight(45), NowADS().ToString("yyyy-MM-dd")) End If 'Llenamos datos de Tipo de Persona - Fisica o Moral @@ -710,7 +710,7 @@ Partial Class Bancos_PagoElectronico ''LLENA DT PARA REPORTE - Dim Row = DtAlta.NewRow() + Dim Row As DataRow = DtAlta.NewRow() Row("Proveedor") = DTPendienteActual(0)("RazonSocial").ToString Row("Banco") = DTPendienteActual(0)("BancoNombre").ToString Row("TipoCuenta") = TipoCuentaDeposito @@ -722,7 +722,7 @@ Partial Class Bancos_PagoElectronico 'Persona Moral If DTPendienteActual(0)("RFC").ToString.Length = 12 Then Dim fecha As String = DTPendienteActual(0)("FechaIng").ToString - Dim NombreProveedor = DTPendienteActual(0)("RazonSocial").ToString.Replace("‚"c, Vacio).Replace("‚"c, Vacio).ToUpper.PadRight(50) + Dim NombreProveedor As String = DTPendienteActual(0)("RazonSocial").ToString.Replace("‚"c, Vacio).Replace("‚"c, Vacio).ToUpper.PadRight(50) NombreProveedor = If(NombreProveedor.Length > 50, NombreProveedor.Substring(0, 50), NombreProveedor) 'Campo 18-20 del detalle @@ -759,7 +759,7 @@ Partial Class Bancos_PagoElectronico Dim NombreComplejo As New List(Of String) 'ignoramos cualquier palabra del nombre que tenga un length igual o menor a 2 - For index = 0 To Nombre.Length - 1 + For index As Integer = 0 To Nombre.Length - 1 If Nombre(index).Length > 2 Then NombreComplejo.Add(Nombre(index)) End If @@ -772,10 +772,10 @@ Partial Class Bancos_PagoElectronico ElseIf NombreComplejo.Count = 4 Then DetalleTexto &= String.Format("F{0}{1}{2}{3}", Vacio.PadRight(70), (NombreComplejo.Item(0) & " " & NombreComplejo.Item(1)).PadRight(20).Substring(0, 20), NombreComplejo.Item(2).PadRight(20).Substring(0, 20), NombreComplejo.Item(3).PadRight(20).Substring(0, 20)) ElseIf NombreComplejo.Count > 4 Then - Dim Nombres = "" + Dim Nombres As String = "" 'todas las palabras menos las 2 ultimas forman parte del nombre - For index = 0 To NombreComplejo.Count - 3 + For index As Integer = 0 To NombreComplejo.Count - 3 If Nombres <> "" Then Nombres += " " Nombres += NombreComplejo.Item(index) Next @@ -800,17 +800,17 @@ Partial Class Bancos_PagoElectronico '''''' LLENADO HEADER Dim convenio As String = DTPendienteActual(0)("ConvenioPagoElectronico").ToString 'Campos #1-4 del Header - HeaderTexto = String.Format("H{0}{1}GRUPO01 ", convenio.PadLeft(9, PadCeros), DateTime.Now().ToString("yyyy-MM-dd")) + HeaderTexto = String.Format("H{0}{1}GRUPO01 ", convenio.PadLeft(9, PadCeros), NowADS().ToString("yyyy-MM-dd")) 'Campo #5 del Header Dim IdentificadoUsuario As String = UsuarioActual.Usuario.Replace(" ", "").Replace(".", "").Replace("@", "").Replace("/", "").Replace("\", "").Replace("-", "").Replace("&", "").Replace(",", "").Replace("+", "").Replace("_", "").ToUpper.Trim IdentificadoUsuario = If(IdentificadoUsuario.Length > 12, IdentificadoUsuario.Substring(0, 12), IdentificadoUsuario) - ' Dim Identificado As String = String.Format("{0}{1}", UsuarioActual.Usuario, DateTime.Now().ToString("yyyyMMdd"))) + ' Dim Identificado As String = String.Format("{0}{1}", UsuarioActual.Usuario, NowADS().ToString("yyyyMMdd"))) - HeaderTexto &= String.Format("{0}{1}", IdentificadoUsuario, DateTime.Now().ToString("yyyyMMdd")).PadRight(20) + HeaderTexto &= String.Format("{0}{1}", IdentificadoUsuario, NowADS().ToString("yyyyMMdd")).PadRight(20) 'Campos #6-8 del Header HeaderTexto &= String.Format("00").PadRight(586) - Dim HeaderLength = HeaderTexto.Length + Dim HeaderLength As Integer = HeaderTexto.Length ''''' LLENADO DE TRAILER TrailerTexto = String.Format("T{0}{1}{2}", Registros.ToString.PadLeft(10, PadCeros), Vacio.PadRight(50, PadCeros), Vacio.PadRight(575)) @@ -873,18 +873,18 @@ Partial Class Bancos_PagoElectronico 'Insertar en LayoutEnvios Dim ObjBancos As New ClsBancos ObjBancos.IniciaTransacSQL() - Dim ErrorLayout = False + Dim ErrorLayout As Boolean = False Dim TotalDetalles As Integer = 0 'CREA CARPETA SI NO EXISTE Dim path As String = Server.MapPath(String.Format("~/Empresas/{0}/Layout/", UsuarioActual.CveEmpresa)) - Dim exists = System.IO.Directory.Exists(path) + Dim exists As Boolean = System.IO.Directory.Exists(path) If Not exists Then System.IO.Directory.CreateDirectory(path) End If - Dim CveIEs = "" + Dim CveIEs As String = "" CreaDtPago() For Each gvr As DataRow In DTTemp.Rows @@ -893,7 +893,7 @@ Partial Class Bancos_PagoElectronico 'ACTUALIZA FECHADOCUMENTO DEL IE 'If CveBLE > 0 Then - ' ObjBancos.UpdateBancos_IE(Date.Now, Date.Now, DTPendienteActual(0)("CveIE").ToString.ToEntero) + ' ObjBancos.UpdateBancos_IE(NowADS(), NowADS(), DTPendienteActual(0)("CveIE").ToString.ToEntero) 'End If If TotalDetalles > 0 Then @@ -909,13 +909,13 @@ Partial Class Bancos_PagoElectronico If CveBLE > 0 Then 'ACTUALIZAMOS EL ENVIO SI ES REGENERACION - If Not ObjBancos.UpdateLayoutEnvios(CveBLE, Date.Now) Then + If Not ObjBancos.UpdateLayoutEnvios(CveBLE, NowADS()) Then ErrorLayout = True End If 'GUARDAMOS EL ENVIO SI NO ES REGENERACION Else - Dim CveLayoutEnvio = ObjBancos.AddLayoutEnvios(NombreArchivo, Date.Now, CveCuenta) + Dim CveLayoutEnvio As Integer = ObjBancos.AddLayoutEnvios(NombreArchivo, NowADS(), CveCuenta) If CveLayoutEnvio > 0 Then For Each dr As DataRow In DTTemp.Rows @@ -937,7 +937,7 @@ Partial Class Bancos_PagoElectronico ObjBancos.Dispose() - Dim Des = String.Format("{0}Layout\{1}", UsuarioActual.Empresa.Ruta, NombreArchivo) + Dim Des As String = String.Format("{0}Layout\{1}", UsuarioActual.Empresa.Ruta, NombreArchivo) Dim Descargas As New StringBuilder() Descargas.AppendFormat("
  • TXT
  • ", NombreArchivo) ' Descargas.AppendFormat("
  • Reporte
  • ", NombreArchivo) @@ -978,7 +978,7 @@ Partial Class Bancos_PagoElectronico ''CLAVE DE REGISTRO PARA CONTROL PROPIO ADSISTEMAS -- orita se esta guardando en el campo #9 - Dim Cve = String.Format("CVEIE{0}", DTPendienteActual(0)("CveIE").ToString).ToUpper 'cveIE + Dim Cve As String = String.Format("CVEIE{0}", DTPendienteActual(0)("CveIE").ToString).ToUpper 'cveIE ''''' LLENADO DE DETALLE @@ -1002,17 +1002,15 @@ Partial Class Bancos_PagoElectronico End If 'OBTENEMOS EL CORREO DEL PROVEEDOR - Dim Correo = CorreoNotificacionesEmpresa.ToUpper.PadRight(50) + Dim Correo As String = CorreoNotificacionesEmpresa.ToUpper.PadRight(50) 'Correo = If(Correo.Length > 0, Correo.ToUpper.PadRight(50), Vacio.PadRight(50)) 'Campos 24-50 del Detalle 0 1 2 3 4 5 6 7 8 9 - DetalleTexto &= String.Format("{0}{1}FA{2}{3}01{4}N{5}{6}{7}{7}{7}{6}N {7}700{8}{9}{7}", Divisa, Vacio.PadLeft(20), Importe.FormatoNumero.Replace(",", "").Replace(".", "").PadLeft(15, PadCeros), Vacio.PadRight(15, PadCeros), Correo, Vacio.PadRight(12, PadCeros), DateTime.Now.ToString("yyyy-MM-dd"), "0001-01-01", Observaciones.PadRight(700), Vacio.PadRight(52)) + DetalleTexto &= String.Format("{0}{1}FA{2}{3}01{4}N{5}{6}{7}{7}{7}{6}N {7}700{8}{9}{7}", Divisa, Vacio.PadLeft(20), Importe.FormatoNumero.Replace(",", "").Replace(".", "").PadLeft(15, PadCeros), Vacio.PadRight(15, PadCeros), Correo, Vacio.PadRight(12, PadCeros), NowADS().ToString("yyyy-MM-dd"), "0001-01-01", Observaciones.PadRight(700), Vacio.PadRight(52)) TotalAcumulado += Importe.ToDouble - - ''LLENA DTPAGOS PARA REPORTE - Dim Row = DtPago.NewRow() + Dim Row As DataRow = DtPago.NewRow() Row("Proveedor") = DTPendienteActual(0)("RazonSocial").ToString If DTPendienteActual(0)("CIE").ToString <> "" Then @@ -1034,9 +1032,9 @@ Partial Class Bancos_PagoElectronico '''''' LLENADO HEADER 'Campos #1-4 del Header - HeaderTexto = String.Format("H{0}{1}01", convenio.PadLeft(9, PadCeros), DateTime.Now().ToString("yyyy-MM-dd")) + HeaderTexto = String.Format("H{0}{1}01", convenio.PadLeft(9, PadCeros), NowADS().ToString("yyyy-MM-dd")) 'Campo #5 del Header - HeaderTexto &= String.Format("P{0}{1}", DateTime.Now().ToString("s").Replace("-", "").Replace(":", ""), Vacio.PadRight(14)) + HeaderTexto &= String.Format("P{0}{1}", NowADS().ToString("s").Replace("-", "").Replace(":", ""), Vacio.PadRight(14)) 'Campos #6-11 del Header HeaderTexto &= String.Format("00").PadRight(1314) @@ -1070,7 +1068,7 @@ Partial Class Bancos_PagoElectronico Protected Sub BtnCargarAlta_Click(sender As Object, e As EventArgs) - Dim ErrorArchivo = False + Dim ErrorArchivo As Boolean = False If FUTxt.HasFile Then If Not GuardaTXT() Then @@ -1090,18 +1088,18 @@ Partial Class Bancos_PagoElectronico Texto = sr.ReadToEnd() sr.Close() - Dim TextoArreglo() = Texto.Split(CChar(vbCrLf)) + Dim TextoArreglo As String() = Texto.Split(CChar(vbCrLf)) 'Alert(TextoArreglo.Length.ToString) 'LEE LINEA POR LINEA - Dim RespuestaHeader = "", RespuestaDetalle = "", RespuestaTrailer = "", CveCuentasDeposito = "" + Dim RespuestaHeader As String = "", RespuestaDetalle As String = "", RespuestaTrailer As String = "", CveCuentasDeposito As String = "" CreaDtAlta() Dim ObjGrales As New ClsGenerales Dim Row As DataRow = Nothing - Dim TipoCuentaDeposito = "" + Dim TipoCuentaDeposito As String = "" - For i = 0 To TextoArreglo.Length - 1 Step 1 + For i As Integer = 0 To TextoArreglo.Length - 1 Step 1 'Valida que el primer renglon sea el HEADER If i = 0 Then If TextoArreglo(i).Substring(0, 1) <> "H" Then @@ -1211,10 +1209,10 @@ Partial Class Bancos_PagoElectronico End If 'DIVIDE DETALLE - Dim Detalle() = RespuestaDetalle.Split(CChar(vbCrLf)) + Dim Detalle As String() = RespuestaDetalle.Split(CChar(vbCrLf)) 'DIVIDE TRAILER - Dim Trailer() = RespuestaTrailer.Split(CChar(vbCrLf)) + Dim Trailer As String() = RespuestaTrailer.Split(CChar(vbCrLf)) 'ARMADO DE RESPUESTA Respuesta.AppendFormat("
    Resumen de respuesta: {0}
    ", RespuestaHeader) @@ -1225,9 +1223,9 @@ Partial Class Bancos_PagoElectronico 'For i = 0 To Detalle.Length - 1 ' Respuesta.AppendFormat("{1}", i + 1, Detalle(i).Trim) 'Next - Dim i = 1 - Dim Style = "" - Dim TotalExitos = 0, TotalFracasos = 0 + Dim i As Integer = 1 + Dim Style As String = "" + Dim TotalExitos As Integer = 0, TotalFracasos As Integer = 0 For Each dr As DataRow In DtAlta.Rows If dr("estatus").ToString.Trim.Contiene("OPERACION EXITOSA", "ALTA TERCERO EXITOSO") Then @@ -1258,11 +1256,11 @@ Partial Class Bancos_PagoElectronico If CveCuentasDeposito <> "" Then Dim ObjIE As New ClsBancos - Dim ErrorDB = False + Dim ErrorDB As Boolean = False ObjIE.IniciaTransacSQL() - Dim ArrayCuentasDeposito() = CveCuentasDeposito.Split(","c) + Dim ArrayCuentasDeposito As String() = CveCuentasDeposito.Split(","c) - For index = 0 To ArrayCuentasDeposito.Length - 1 + For index As Integer = 0 To ArrayCuentasDeposito.Length - 1 If Not ObjIE.UpdateCuentaDepositoPagoElectronico(ArrayCuentasDeposito(index).ToEntero) Then ErrorDB = True End If @@ -1323,8 +1321,8 @@ Partial Class Bancos_PagoElectronico Protected Sub BtnCargarPago_Click(sender As Object, e As System.EventArgs) - Dim ErrorArchivo = False - Dim TextoErrorArchivo = "Ocurrió un problema al leer el archivo, por favor revise que el archivo sea el correcto e intente de nuevo." + Dim ErrorArchivo As Boolean = False + Dim TextoErrorArchivo As String = "Ocurrió un problema al leer el archivo, por favor revise que el archivo sea el correcto e intente de nuevo." If FUTxt.HasFile Then If Not GuardaTXT() Then @@ -1342,17 +1340,17 @@ Partial Class Bancos_PagoElectronico Dim sr As New System.IO.StreamReader(NombreArchivo) Texto = sr.ReadToEnd() sr.Close() - Dim TextoArreglo() = Texto.Split(CChar(vbCrLf)) + Dim TextoArreglo As String() = Texto.Split(CChar(vbCrLf)) 'INICIALIZA VARIABLES Dim ObjBancos As New ClsBancos - Dim RespuestaHeader = "", RespuestaDetalle = "", RespuestaTrailer = "", Proveedor = "", CuentaAbono = "", Estatus = "", CveIEs = "", EstatusIEs = "", FechaMovto = "", Correos = "" + Dim RespuestaHeader As String = "", RespuestaDetalle As String = "", RespuestaTrailer As String = "", Proveedor As String = "", CuentaAbono As String = "", Estatus As String = "", CveIEs As String = "", EstatusIEs As String = "", FechaMovto As String = "", Correos As String = "" Dim Row As DataRow = Nothing - Dim Convenio = "" + Dim Convenio As String = "" CreaDtPago() 'LEE LINEA POR LINEA - For i = 0 To TextoArreglo.Length - 1 + For i As Integer = 0 To TextoArreglo.Length - 1 'Valida que el primer renglon sea el HEADER If i = 0 Then If TextoArreglo(i).Substring(0, 1) <> "H" Then @@ -1504,7 +1502,7 @@ Partial Class Bancos_PagoElectronico If Not ErrorArchivo Then 'DIVIDE HEADER - Dim Header() = RespuestaHeader.Split(CChar("|")) + Dim Header As String() = RespuestaHeader.Split(CChar("|")) 'TRADUCE CODIGO RESPUESTA HEADER If Header(0) = "01" Then RespuestaHeader = "ACEPTADO TOTAL" @@ -1516,14 +1514,14 @@ Partial Class Bancos_PagoElectronico RespuestaHeader += String.Format("
    Cuenta Cargo: {0}", Header(1)) 'DIVIDE DETALLE - Dim Detalle() = RespuestaDetalle.Split(CChar(vbCrLf)) + Dim Detalle As String() = RespuestaDetalle.Split(CChar(vbCrLf)) 'ARMADO DE RESPUESTA Respuesta.AppendFormat("
    Resumen de respuesta: {0}
    ", RespuestaHeader) Respuesta.AppendFormat("Numero de movimientos: {0}

    ", Detalle.Length.ToString) Respuesta.Append("----------------------------------------------------- Detalle de los movimientos --------------------------------------------------
    ") Respuesta.Append("
    ProveedorCuentaError
    {0}
    ") - For i = 0 To Detalle.Length - 1 + For i As Integer = 0 To Detalle.Length - 1 Respuesta.AppendFormat("{1}", i + 1, Detalle(i).Trim) Next Respuesta.Append("
    #ProveedorImporte($)MonedaEstatus
    {0}
    ----------------------------------------------------------------------------------------------------------------------
    ") @@ -1535,17 +1533,17 @@ Partial Class Bancos_PagoElectronico If Not ErrorArchivo Then If CveIEs <> "" Then Dim ObjIE As New ClsBancos - Dim ErrorDB = False + Dim ErrorDB As Boolean = False ObjIE.IniciaTransacSQL() - Dim ArrayCveIEs() = CveIEs.Split(","c) - Dim ArrayEstatusIEs() = EstatusIEs.Split(","c) - Dim ArrayFechasMovto() = FechaMovto.Split(","c) - Dim ArrayCorreos() = Correos.Split("|"c) + Dim ArrayCveIEs As String() = CveIEs.Split(","c) + Dim ArrayEstatusIEs As String() = EstatusIEs.Split(","c) + Dim ArrayFechasMovto As String() = FechaMovto.Split(","c) + Dim ArrayCorreos As String() = Correos.Split("|"c) Dim ArregloHilos As New Generic.List(Of System.Threading.Thread) Dim ArregloParametros As New Generic.List(Of List(Of String)) - For index = 0 To ArrayCveIEs.Length - 1 + For index As Integer = 0 To ArrayCveIEs.Length - 1 If ObjIE.UpdatePagoElectronicoCarga(ArrayCveIEs(index).ToEntero, ArrayEstatusIEs(index).ToEntero) Then 'Cuando salio exitoso actualizamos el IE @@ -1613,11 +1611,6 @@ Partial Class Bancos_PagoElectronico EnviarCorreoNotificacion(CveIENotificar, NotificarA, "", UsuarioActual, False) Next - - - - - Respuesta.Append("

    NOTA: El archivo se analizo correctamente y se efectuaron todos los cambios en el sistema.") Alert(Respuesta.ToString, TipoMensaje.MsgInformacion) @@ -1679,12 +1672,12 @@ Partial Class Bancos_PagoElectronico DtTemp = DTFyE ''VALIDA CUENTAS DEPOSITOS - Dim ErrorCuenta = False + Dim ErrorCuenta As Boolean = False Dim FyEError As StringBuilder = New StringBuilder FyEError.AppendFormat("") Dim TotalDetalles As Integer = 0 - Dim EsBancomer = False + Dim EsBancomer As Boolean = False For Each gvr As DataRow In DtTemp.Rows If gvr("CvePersonal").ToString <> "" AndAlso gvr("EstatusPagoElectronico").ToString <> "True" AndAlso gvr("AltaCuenta").ToString = "1" Then DTPendienteActual = DtTemp.FiltraParametros(String.Format("CveCuentaDeposito = {0}", gvr("CveCuentaDeposito").ToString)) @@ -1758,7 +1751,7 @@ Partial Class Bancos_PagoElectronico Descargas.AppendFormat("
  • Descargar Reporte
  • ", NombreArchivo) - Dim TextoErrorProveedores = "" + Dim TextoErrorProveedores As String = "" If FyEError.Length > 160 Then TextoErrorProveedores = String.Format("


    Proveedores con Error:

    ------------------------------------------------------------------
    {0}

    ", FyEError.ToString) Alert(String.Format("
    El Layout fue creado satisfactoriamente.{1}
    Descargas:
      {0}
    ", Descargas, TextoErrorProveedores), TipoMensaje.MsgInformacion) @@ -1772,7 +1765,7 @@ Partial Class Bancos_PagoElectronico End Sub Private Sub GeneraAltaDetalleFyE() - Dim Resultado = True + Dim Resultado As Boolean = True Dim CuentaDeposito As String = "" Dim TipoCuentaDeposito As String = "" Dim TipoCuenta As String = "" @@ -1806,7 +1799,7 @@ Partial Class Bancos_PagoElectronico 'Llenamos en blanco datos de otros bancos 'Campos 8-17 del detalle --- 64 de otros bancos y 45 para FILLER --- Fecha de Alta - DetalleTexto &= String.Format("{0}{1}", Vacio.PadLeft(109), DateTime.Now().ToString("yyyy-MM-dd")) + DetalleTexto &= String.Format("{0}{1}", Vacio.PadLeft(109), NowADS().ToString("yyyy-MM-dd")) 'Otros Bancos NACIONAL!! @@ -1820,7 +1813,7 @@ Partial Class Bancos_PagoElectronico 'Llenamos datos de otros bancos 'Campos 8- 17 del detalle --- 44 de otros bancos --- 20 de internacional --- 45 Filler -- Fecha de Alta - DetalleTexto &= String.Format("{0}40{1}{2}{3}{4}{5}", DTPendienteActual(0)("Abreviatura").ToString, DTPendienteActual(0)("CLABE").ToString.PadLeft(35, PadCeros), DTPendienteActual(0)("CLABE").ToString.Substring(0, 3).PadLeft(4, PadCeros), Vacio.PadRight(20), Vacio.PadRight(45), DateTime.Now().ToString("yyyy-MM-dd")) + DetalleTexto &= String.Format("{0}40{1}{2}{3}{4}{5}", DTPendienteActual(0)("Abreviatura").ToString, DTPendienteActual(0)("CLABE").ToString.PadLeft(35, PadCeros), DTPendienteActual(0)("CLABE").ToString.Substring(0, 3).PadLeft(4, PadCeros), Vacio.PadRight(20), Vacio.PadRight(45), NowADS().ToString("yyyy-MM-dd")) End If 'Llenamos datos de Tipo de Persona - Fisica @@ -1845,9 +1838,8 @@ Partial Class Bancos_PagoElectronico 'Campos 37-39 -- FILLER DetalleTexto &= String.Format("00{0}", Vacio.PadRight(38)) - ''LLENA DT PARA REPORTE - Dim Row = DtAlta.NewRow() + Dim Row As DataRow = DtAlta.NewRow() Row("Proveedor") = DTPendienteActual(0)("RazonSocial").ToString Row("Banco") = DTPendienteActual(0)("BancoNombre").ToString Row("TipoCuenta") = TipoCuentaDeposito @@ -1858,12 +1850,12 @@ Partial Class Bancos_PagoElectronico '''''' LLENADO HEADER Dim convenio As String = DTPendienteActual(0)("ConvenioPagoElectronico").ToString 'Campos #1-4 del Header - HeaderTexto = String.Format("H{0}{1}GRUPO01 ", convenio.PadLeft(9, PadCeros), DateTime.Now().ToString("yyyy-MM-dd")) + HeaderTexto = String.Format("H{0}{1}GRUPO01 ", convenio.PadLeft(9, PadCeros), NowADS().ToString("yyyy-MM-dd")) 'Campo #5 del Header - HeaderTexto &= String.Format("{0}{1}", UsuarioActual.CveUsuario, DateTime.Now().ToString("yyyyMMdd")).PadRight(20) + HeaderTexto &= String.Format("{0}{1}", UsuarioActual.CveUsuario, NowADS().ToString("yyyyMMdd")).PadRight(20) 'Campos #6-8 del Header HeaderTexto &= String.Format("00").PadRight(586) - Dim HeaderLength = HeaderTexto.Length + Dim HeaderLength As Integer = HeaderTexto.Length ''''' LLENADO DE TRAILER TrailerTexto = String.Format("T{0}{1}{2}", Registros.ToString.PadLeft(10, PadCeros), Vacio.PadRight(50, PadCeros), Vacio.PadRight(575)) @@ -1883,8 +1875,8 @@ Partial Class Bancos_PagoElectronico Private Sub CargaReporte() Dim ObjBancos As New ClsBancos - Dim FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim(), "-1") - Dim FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), "-1") + Dim FechaI As String = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim(), "-1") + Dim FechaF As String = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), "-1") If ObjBancos.GetLayoutPagosEnviados(DdlCuentaReportes.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, DdlTipoReportes.SelectedValue, FechaI, DateAdd(DateInterval.Day, 1, FechaF.ToDate).ToShortDateString) Then DTReportes = ObjBancos.DtResultados @@ -2297,7 +2289,7 @@ Partial Class Bancos_PagoElectronico ' strBody.Append("
    ") - ' strBody.AppendFormat(" Enviado el: {0} {1}
    ", Date.Now.ToLongDateString, Date.Now.ToShortTimeString) + ' strBody.AppendFormat(" Enviado el: {0} {1}
    ", NowADS().ToLongDateString, NowADS().ToShortTimeString) ' strBody.AppendFormat(" Para:{0}
    ", If(UsuarioActual.CveEmpresa = 66, "PAGOS@GLUYASCONSTRUCCIONES.COM", "")) ' strBody.Append(" Asunto: CONFIRMACION SIT DISPERSION ") ' strBody.Append("

    ") @@ -2759,7 +2751,7 @@ Partial Class Bancos_PagoElectronico params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("Direccion", UsuarioActual.Empresa.Direccion)) params.Add(New ReportParameter("RFC", UsuarioActual.Empresa.RFC)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) ImprimirPDF("Empresas/Grales/Formatos/LayoutAltaProveedor.rdlc", DtAlta, params, "LayoutAltaProveedor", RDSName:="DsPagoElectronico") @@ -2782,7 +2774,7 @@ Partial Class Bancos_PagoElectronico params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("Direccion", UsuarioActual.Empresa.Direccion)) params.Add(New ReportParameter("RFC", UsuarioActual.Empresa.RFC)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) ImprimirPDF("Empresas/Grales/Formatos/LayoutAltaProveedor.rdlc", DtAlta, params, "LayoutAltaProveedor", RDSName:="DsPagoElectronico") End If @@ -2803,7 +2795,7 @@ Partial Class Bancos_PagoElectronico params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("Direccion", UsuarioActual.Empresa.Direccion)) params.Add(New ReportParameter("RFC", UsuarioActual.Empresa.RFC)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) diff --git a/Bancos/PagoElectronicoGrupos.aspx b/Bancos/PagoElectronicoGrupos.aspx index ace3d67ef..2fa368e82 100644 --- a/Bancos/PagoElectronicoGrupos.aspx +++ b/Bancos/PagoElectronicoGrupos.aspx @@ -574,7 +574,7 @@ Prefijo Folio:
    - +
    @@ -606,7 +606,7 @@ - + @@ -928,17 +928,6 @@ } - function validaLongitudFolio(v) { - var TamanioS = String(v.value); - var Tamanio = TamanioS.lenght; - alert(Tamanio); - - if (Tamanio >= 14) { - alert("El folio especificado es demaciado grande"); - } - - } - diff --git a/Bancos/PagoElectronicoGrupos.aspx.vb b/Bancos/PagoElectronicoGrupos.aspx.vb index 96344b11f..08c376bfb 100644 --- a/Bancos/PagoElectronicoGrupos.aspx.vb +++ b/Bancos/PagoElectronicoGrupos.aspx.vb @@ -298,8 +298,8 @@ Partial Class Bancos_PagoElectronicoGrupos CveCuenta = -1 TipoMasiva = 1 - txtFechaI.Text = Date.Now.ToShortDateString - txtFechaF.Text = Date.Now.ToShortDateString + txtFechaI.Text = NowADS().ToShortDateString + txtFechaF.Text = NowADS().ToShortDateString CargaCuentas() CargaProveedores() @@ -451,7 +451,7 @@ Partial Class Bancos_PagoElectronicoGrupos .Clear() .Buffer = True .ContentType = "textplain" - .AddHeader("Content-Disposition", String.Format("attachment;filename={0}{1}.txt", NombreArchivo, Date.Now.ToString("ddMMyyyy"))) + .AddHeader("Content-Disposition", String.Format("attachment;filename={0}{1}.txt", NombreArchivo, NowADS().ToString("ddMMyyyy"))) .Charset = "UTF-8" .ContentEncoding = Encoding.Default .Write(TextoCompleto) @@ -478,12 +478,12 @@ Partial Class Bancos_PagoElectronicoGrupos DirectoryExistsCreate(String.Format("{0}Layout", UsuarioActual.Empresa.Ruta)) - NombreArchivo = String.Format("{2}{1}{0}.txt", UsuarioActual.CveUsuario, Date.Now.ToString("yyyyMMdd-HH-mm-ss"), If(Tipo = 1, "LAYOUTPAGO", "LAYOUTALTA")) + NombreArchivo = String.Format("{2}{1}{0}.txt", UsuarioActual.CveUsuario, NowADS().ToString("yyyyMMdd-HH-mm-ss"), If(Tipo = 1, "LAYOUTPAGO", "LAYOUTALTA")) If Tipo = 1 Then - NombreArchivo = String.Format("{2}{1}{0}.txt", UsuarioActual.CveUsuario, Date.Now.ToString("yyyyMMdd-HH-mm-ss"), "LAYOUTPAGO") + NombreArchivo = String.Format("{2}{1}{0}.txt", UsuarioActual.CveUsuario, NowADS().ToString("yyyyMMdd-HH-mm-ss"), "LAYOUTPAGO") Else - NombreArchivo = String.Format("{2}{1}{0}{3}.txt", UsuarioActual.CveUsuario, Date.Now.ToString("yyyyMMdd-HH-mm-ss"), "LAYOUTALTA", If(MismoBanco, "BANCOMER", "INTERBANCARIO")) + NombreArchivo = String.Format("{2}{1}{0}{3}.txt", UsuarioActual.CveUsuario, NowADS().ToString("yyyyMMdd-HH-mm-ss"), "LAYOUTALTA", If(MismoBanco, "BANCOMER", "INTERBANCARIO")) End If If NombreArchivoEnviado.Length > 0 Then @@ -600,7 +600,7 @@ Partial Class Bancos_PagoElectronicoGrupos e.Row.FCLabel("LblArchivo").Text = e.Row.DataKey("Archivo") 'Si la fecha de generacion del archivo es diferente de hoy activamos el boton REGENERAR - 'If e.Row.DBCampo("Fecha").ToDate.ToShortDateString <> Date.Now.ToShortDateString Then + 'If e.Row.DBCampo("Fecha").ToDate.ToShortDateString <> NowADS().ToShortDateString Then ' e.Row.FCLinkButton("LBRegenerar").Visible = True 'End If If DTEnviadas.MAX("FueConciliado", String.Format("CveLayoutEnvio = {0}", e.Row.DBCampo("CveLayoutEnvio"))).ToEntero > 0 Then @@ -630,7 +630,7 @@ Partial Class Bancos_PagoElectronicoGrupos e.Row.FCHyperLink("HLDetalle").NavigateUrl = String.Format("IE.aspx?CveIE={0}", e.Row.DBCampo("CveIE")) - If e.Row.DataKey("Estatus").ToEntero.contiene(2, 3) Then + If e.Row.DataKey("Estatus").ToEntero.Contiene(2, 3) Then e.Row.FCLinkButton("ImgUpload").Visible = False e.Row.FCLinkButton("LnkGvCancelar").Visible = False @@ -1029,7 +1029,7 @@ Partial Class Bancos_PagoElectronicoGrupos ' 'Llenamos en blanco datos de otros bancos ' 'Campos 8-17 del detalle --- 64 de otros bancos y 45 para FILLER --- Fecha de Alta - ' DetalleTexto &= String.Format("{0}{1}", Vacio.PadLeft(109), DateTime.Now().ToString("yyyy-MM-dd")) + ' DetalleTexto &= String.Format("{0}{1}", Vacio.PadLeft(109), NowADS()().ToString("yyyy-MM-dd")) ' 'Otros Bancos NACIONAL!! @@ -1043,7 +1043,7 @@ Partial Class Bancos_PagoElectronicoGrupos ' 'Llenamos datos de otros bancos ' 'Campos 8- 17 del detalle --- 44 de otros bancos --- 20 de internacional --- 45 Filler -- Fecha de Alta - ' DetalleTexto &= String.Format("{0}40{1}{2}{3}{4}{5}", DTPendienteActual(0)("Abreviatura").ToString, DTPendienteActual(0)("CLABE").ToString.PadLeft(35, PadCeros), DTPendienteActual(0)("CLABE").ToString.Substring(0, 3).PadLeft(4, PadCeros), Vacio.PadRight(20), Vacio.PadRight(45), DateTime.Now().ToString("yyyy-MM-dd")) + ' DetalleTexto &= String.Format("{0}40{1}{2}{3}{4}{5}", DTPendienteActual(0)("Abreviatura").ToString, DTPendienteActual(0)("CLABE").ToString.PadLeft(35, PadCeros), DTPendienteActual(0)("CLABE").ToString.Substring(0, 3).PadLeft(4, PadCeros), Vacio.PadRight(20), Vacio.PadRight(45), NowADS()().ToString("yyyy-MM-dd")) ' End If ' 'Llenamos datos de Tipo de Persona - Fisica o Moral @@ -1157,14 +1157,14 @@ Partial Class Bancos_PagoElectronicoGrupos '''''' LLENADO HEADER Dim convenio As String = DTPendienteActual(0)("ConvenioPagoElectronico").ToString 'Campos #1-4 del Header - HeaderTexto = String.Format("H{0}{1}GRUPO01 ", convenio.PadLeft(9, PadCeros), DateTime.Now().ToString("yyyy-MM-dd")) + HeaderTexto = String.Format("H{0}{1}GRUPO01 ", convenio.PadLeft(9, PadCeros), NowADS().ToString("yyyy-MM-dd")) 'Campo #5 del Header Dim IdentificadoUsuario As String = UsuarioActual.Usuario.Replace(" ", "").Replace(".", "").Replace("@", "").Replace("/", "").ToUpper.Trim IdentificadoUsuario = If(IdentificadoUsuario.Length > 12, IdentificadoUsuario.Substring(0, 12), IdentificadoUsuario) - ' Dim Identificado As String = String.Format("{0}{1}", UsuarioActual.Usuario, DateTime.Now().ToString("yyyyMMdd"))) + ' Dim Identificado As String = String.Format("{0}{1}", UsuarioActual.Usuario, NowADS()().ToString("yyyyMMdd"))) - HeaderTexto &= String.Format("{0}{1}", IdentificadoUsuario, DateTime.Now().ToString("yyyyMMdd")).PadRight(20) + HeaderTexto &= String.Format("{0}{1}", IdentificadoUsuario, NowADS().ToString("yyyyMMdd")).PadRight(20) 'Campos #6-8 del Header HeaderTexto &= String.Format("00").PadRight(586) Dim HeaderLength = HeaderTexto.Length @@ -1422,7 +1422,7 @@ Partial Class Bancos_PagoElectronicoGrupos ObjBancos.IniciaTransacSQL() - Dim CveLayoutEnvio = ObjBancos.AddLayoutEnvios(NombreArchivo, Date.Now, CveCuenta, PorGrupos:=True) + Dim CveLayoutEnvio = ObjBancos.AddLayoutEnvios(NombreArchivo, NowADS(), CveCuenta, PorGrupos:=True) If CveLayoutEnvio > 0 Then For Each dr As DataRow In DTPendientesTemp.Rows @@ -1558,7 +1558,7 @@ Partial Class Bancos_PagoElectronicoGrupos ' 'ACTUALIZA FECHADOCUMENTO DEL IE ' 'If CveBLE > 0 Then - ' ' ObjBancos.UpdateBancos_IE(Date.Now, Date.Now, DTPendienteActual(0)("CveIE").ToString.ToEntero) + ' ' ObjBancos.UpdateBancos_IE(NowADS(), NowADS(), DTPendienteActual(0)("CveIE").ToString.ToEntero) ' 'End If ' If TotalDetalles > 0 Then @@ -1574,14 +1574,14 @@ Partial Class Bancos_PagoElectronicoGrupos ' If CveBLE > 0 Then ' 'ACTUALIZAMOS EL ENVIO SI ES REGENERACION - ' If Not ObjBancos.UpdateLayoutEnvios(CveBLE, Date.Now) Then + ' If Not ObjBancos.UpdateLayoutEnvios(CveBLE, NowADS()) Then ' ErrorLayout = True ' End If ' 'GUARDAMOS EL ENVIO SI NO ES REGENERACION ' Else - ' Dim CveLayoutEnvio = ObjBancos.AddLayoutEnvios(NombreArchivo, Date.Now, CveCuenta) + ' Dim CveLayoutEnvio = ObjBancos.AddLayoutEnvios(NombreArchivo, NowADS(), CveCuenta) ' If CveLayoutEnvio > 0 Then ' For Each dr As DataRow In DTTemp.Rows @@ -1674,7 +1674,7 @@ Partial Class Bancos_PagoElectronicoGrupos 'Correo = If(Correo.Length > 0, Correo.ToUpper.PadRight(50), Vacio.PadRight(50)) 'Campos 24-50 del Detalle 0 1 2 3 4 5 6 7 8 9 - DetalleTexto &= String.Format("{0}{1}FA{2}{3}01{4}N{5}{6}{7}{7}{7}{6}N {7}700{8}{9}{7}", Divisa, Vacio.PadLeft(20), Importe.FormatoNumero.Replace(",", "").Replace(".", "").PadLeft(15, PadCeros), Vacio.PadRight(15, PadCeros), Correo, Vacio.PadRight(12, PadCeros), DateTime.Now.ToString("yyyy-MM-dd"), "0001-01-01", Observaciones.PadRight(700), Vacio.PadRight(52)) + DetalleTexto &= String.Format("{0}{1}FA{2}{3}01{4}N{5}{6}{7}{7}{7}{6}N {7}700{8}{9}{7}", Divisa, Vacio.PadLeft(20), Importe.FormatoNumero.Replace(",", "").Replace(".", "").PadLeft(15, PadCeros), Vacio.PadRight(15, PadCeros), Correo, Vacio.PadRight(12, PadCeros), NowADS().ToString("yyyy-MM-dd"), "0001-01-01", Observaciones.PadRight(700), Vacio.PadRight(52)) TotalAcumulado += Importe.ToDouble @@ -1703,9 +1703,9 @@ Partial Class Bancos_PagoElectronicoGrupos '''''' LLENADO HEADER 'Campos #1-4 del Header - HeaderTexto = String.Format("H{0}{1}01", convenio.PadLeft(9, PadCeros), DateTime.Now().ToString("yyyy-MM-dd")) + HeaderTexto = String.Format("H{0}{1}01", convenio.PadLeft(9, PadCeros), NowADS().ToString("yyyy-MM-dd")) 'Campo #5 del Header - HeaderTexto &= String.Format("P{0}{1}", DateTime.Now().ToString("s").Replace("-", "").Replace(":", ""), Vacio.PadRight(14)) + HeaderTexto &= String.Format("P{0}{1}", NowADS().ToString("s").Replace("-", "").Replace(":", ""), Vacio.PadRight(14)) 'Campos #6-11 del Header HeaderTexto &= String.Format("00").PadRight(1314) @@ -2332,7 +2332,7 @@ Partial Class Bancos_PagoElectronicoGrupos params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("Direccion", UsuarioActual.Empresa.Direccion)) params.Add(New ReportParameter("RFC", UsuarioActual.Empresa.RFC)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) ImprimirPDF("Empresas/Grales/Formatos/LayoutAltaProveedor.rdlc", DtAlta, params, "LayoutAltaProveedor", RDSName:="DsPagoElectronico") @@ -2360,7 +2360,7 @@ Partial Class Bancos_PagoElectronicoGrupos params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("Direccion", UsuarioActual.Empresa.Direccion)) params.Add(New ReportParameter("RFC", UsuarioActual.Empresa.RFC)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) ImprimirPDF("Empresas/Grales/Formatos/LayoutAltaProveedor.rdlc", DtAlta, params, "LayoutAltaProveedor", RDSName:="DsPagoElectronico") End If @@ -2370,7 +2370,7 @@ Partial Class Bancos_PagoElectronicoGrupos Protected Sub BtnReportePago_Click(sender As Object, e As EventArgs) - + Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/LayoutAltaProveedor.rdlc", UsuarioActual.Empresa.Ruta)) Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png") @@ -2394,7 +2394,7 @@ Partial Class Bancos_PagoElectronicoGrupos params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("Direccion", UsuarioActual.Empresa.Direccion)) params.Add(New ReportParameter("RFC", UsuarioActual.Empresa.RFC)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) params.Add(New ReportParameter("Titulo", "Reporte Pago Proveedor Layout Grupos")) @@ -2777,7 +2777,7 @@ Partial Class Bancos_PagoElectronicoGrupos ObjAC.IniciaTransacSQL() End If - Dim FechaCancelacion As Date = Now + Dim FechaCancelacion As Date = NowADS() Dim ErrorCancelar = False Dim MensajeError = "" @@ -2990,7 +2990,7 @@ Partial Class Bancos_PagoElectronicoGrupos params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("Direccion", UsuarioActual.Empresa.Direccion)) params.Add(New ReportParameter("RFC", UsuarioActual.Empresa.RFC)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) params.Add(New ReportParameter("Titulo", "Reporte Pago Proveedor Layout")) diff --git a/Bancos/PolizaCheque.aspx.vb b/Bancos/PolizaCheque.aspx.vb index b1ff1319a..7fda562fd 100644 --- a/Bancos/PolizaCheque.aspx.vb +++ b/Bancos/PolizaCheque.aspx.vb @@ -487,7 +487,7 @@ Partial Class Bancos_PolizaCheque Private Function CreaArchivo() As Boolean DirectoryExistsCreate(String.Format("{0}Layout", UsuarioActual.Empresa.Ruta)) - NombreArchivo = String.Format("{2}{1}{0}.txt", UsuarioActual.CveUsuario, Date.Now.ToString("yyyyMMdd-HH-mm"), "LAYOUTPAGONOMINA") + NombreArchivo = String.Format("{2}{1}{0}.txt", UsuarioActual.CveUsuario, NowADS().ToString("yyyyMMdd-HH-mm"), "LAYOUTPAGONOMINA") Dim path As String = String.Format("{0}Layout\{1}", UsuarioActual.Empresa.Ruta, NombreArchivo) Dim fs As FileStream = File.Create(path) @@ -515,7 +515,7 @@ Partial Class Bancos_PolizaCheque Dim CodigoPago As String = "R23" Dim TipoServicio As String = "110" Dim ClaveEntrada As String = "1" - Dim FechaArchivo As String = Date.Now.ToString("yyyyMMdd") + Dim FechaArchivo As String = NowADS().ToString("yyyyMMdd") Dim FechaPago As String = TxtFechaDocumento.ToDate.ToString("yyyyMMdd") Dim Filler As String = GeneraCampo("", 142) diff --git a/Bancos/PopIECompras.aspx.vb b/Bancos/PopIECompras.aspx.vb index f7927997a..a093792e9 100644 --- a/Bancos/PopIECompras.aspx.vb +++ b/Bancos/PopIECompras.aspx.vb @@ -304,7 +304,7 @@ Partial Class Bancos_PopIECompras ArrIEFuncionariosEmpleados = New ArrayList() RFCProveedor = "" - TxtFechaDocumento.Text = Now.ToShortDateString + TxtFechaDocumento.Text = NowADS().ToShortDateString If Request("CveProveedor") IsNot Nothing Then HdnCveProveedor.Value = Request("CveProveedor").ToString @@ -345,10 +345,10 @@ Partial Class Bancos_PopIECompras If CveMoneda = 2 Then ChkPagarPesos.Visible = True - TxtTipoCambio.Text = GlobalTipoCambio(Now).FormatoNumero(4) + TxtTipoCambio.Text = GlobalTipoCambio(NowADS()).FormatoNumero(4) Else ChkPagarDolares.Visible = True - TxtTipoCambio.Text = GlobalTipoCambio(Now).FormatoNumero(4) + TxtTipoCambio.Text = GlobalTipoCambio(NowADS()).FormatoNumero(4) End If UpDatos.Update() End If @@ -515,8 +515,8 @@ Partial Class Bancos_PopIECompras CompraActual.IEPS = dr("IEPS").ToString.ToDecimal CompraActual.RetIVA = dr("RetIVA").ToString.ToDecimal CompraActual.RetISR = dr("RetISR").ToString.ToDecimal - CompraActual.CveConceptoRetISR = dr("CveRetIVAConcepto").ToString.ToEntero - CompraActual.CveConceptoRetIVA = dr("CveRetISRConcepto").ToString.ToEntero + CompraActual.CveConceptoRetIVA = dr("CveRetIVAConcepto").ToString.ToEntero + CompraActual.CveConceptoRetISR = dr("CveRetISRConcepto").ToString.ToEntero CompraActual.PorcentajeIVA = dr("PorcentajeIVA").ToString.ToDecimal CompraActual.UsuarioActual = UsuarioActual CompraActual.CveSubProyecto = dr("CveSubProyecto").ToString.ToEntero @@ -868,7 +868,7 @@ Partial Class Bancos_PopIECompras Dim Folio As Long Dim dr As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("CveCuenta = " & DdlCuenta.SelectedValue) - Dim TCveMoneda = -1 + Dim TCveMoneda As Integer = -1 If dr IsNot Nothing Then If ChkPagarPesos.Checked Then @@ -925,10 +925,6 @@ Partial Class Bancos_PopIECompras 'For Each Row As DataRow In objGastosXComprobar.DtResultados.FiltraParametros("CvePersonal > 0 AND FechaDocumento IS NOT NULL").Rows ' ArrIE.Add(New Anticipos With {.CveIE = Row("CveIE").ToString.ToEntero, .Importe = Row("Saldo").ToString.ToDecimal, .CvePersonal = Row("CvePersonal").ToString.ToEntero}) 'Next - - - - Dim ObjMovtos As New ClsMovimientos RowCheque.Visible = True @@ -945,17 +941,9 @@ Partial Class Bancos_PopIECompras ObjMovtos.Dispose() DDlCheques.DataBind() 'EstaAsociadoAPersonal = True - - DDlCheques_SelectedIndexChanged(DDlCheques, EventArgs.Empty) - - UpDatos.Update() - 'End If - - - End Sub Protected Sub DDlCheques_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DDlCheques.SelectedIndexChanged @@ -1224,7 +1212,7 @@ Partial Class Bancos_PopIECompras Dim dtc As DataTable = GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, CveProveedor:=CveProveedor, CveCuentaDeposito:=DdlCuentaDeposito.SelectedValue.ToEntero) If dtc IsNot Nothing Then - Dim Row = dtc.FiltroPrimero("") + Dim Row As DataRow = dtc.FiltroPrimero("") If Row IsNot Nothing AndAlso Row("Estatus").ToString = "False" Then Alert("La cuenta depósito del proveedor esta inactiva.", TipoMensaje.MsgAdvertencia) Exit Sub @@ -1245,7 +1233,7 @@ Partial Class Bancos_PopIECompras Dim CvePlantillaPoliza As Integer = 2 Dim ConceptoPoliza As String = String.Format("{0} {1}", NombreProveedor, SerieFolio) Dim CveCuentaDeposito As Integer = If(DdlCuentaDeposito.Items.Count > 0, DdlCuentaDeposito.SelectedValue.ToEntero, 0) - Dim FechaDocumento = FechaCompra + Dim FechaDocumento As Date = FechaCompra 'Saca moneda en que se va a pagar segun metodo de pago Select Case RBLContado.SelectedValue @@ -1262,8 +1250,10 @@ Partial Class Bancos_PopIECompras End Select 'cuando es pago con ventas, debe de ser de Diario - Dim CveTipoPoliza As Integer = ObjMov.ObtenerTipoPoliza(DdlTipoTransaccion.SelectedValue, "-1", UsuarioActual.CveEmpresa) + Dim CveTipoPoliza As Integer = -1 If RBLContado.SelectedValue = "6" Then CveTipoPoliza = 3 + 'cuando es la cuenta es tipo cajachica,el tipo de póliza es diario + If GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveCuenta:=DdlCuenta.SelectedValue.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveTipoCuenta") = "1" Then CveTipoPoliza = 3 Dim CvePrePoliza As Integer = ObjMov.AddPrePolizas("Bancos/PopIECompras", CvePlantillaPoliza, ImportePagado, ImportePagado, CveMoneda, Fecha, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=CveTipoPoliza) @@ -1688,8 +1678,8 @@ Partial Class Bancos_PopIECompras End Sub Private Sub RVTxtFechaDocumento_Init(sender As Object, e As EventArgs) Handles RVTxtFechaDocumento.Init - RVTxtFechaDocumento.MaximumValue = DateTime.Now.ToShortDateString - Calendario.EndDate = DateTime.Now + RVTxtFechaDocumento.MaximumValue = NowADS().ToShortDateString + Calendario.EndDate = NowADS() End Sub diff --git a/Bancos/PopIEVentas.aspx b/Bancos/PopIEVentas.aspx index 2a93043a1..078ca609f 100644 --- a/Bancos/PopIEVentas.aspx +++ b/Bancos/PopIEVentas.aspx @@ -35,14 +35,9 @@ - - - +   - - - - + @@ -222,7 +217,7 @@
    - @@ -541,7 +536,6 @@

    -
    diff --git a/Bancos/PopIEVentas.aspx.vb b/Bancos/PopIEVentas.aspx.vb index ffc69a6d8..d037f2d73 100644 --- a/Bancos/PopIEVentas.aspx.vb +++ b/Bancos/PopIEVentas.aspx.vb @@ -311,7 +311,7 @@ Partial Class Bancos_PopIEVentas ArrIEFuncionariosEmpleados = New ArrayList() RFCCliente = "-1" - TxtFechaDocumento.Text = Now.ToShortDateString + TxtFechaDocumento.Text = NowADS().ToShortDateString If Request("CveVenta") IsNot Nothing AndAlso IsNumeric(Request("CveVenta")) AndAlso Request("CveVenta").ToEntero > 0 Then CveVenta = Request("CveVenta").ToEntero @@ -349,8 +349,8 @@ Partial Class Bancos_PopIEVentas - Dim dia As Integer = If(UsuarioActual.CveEmpresa = 13, Now.Day - 1, Now.Day) - Fecha = (dia.ToString + "/" + Now.Month.ToString + "/" + Now.Year.ToString).ToDate + Dim dia As Integer = If(UsuarioActual.CveEmpresa = 13, NowADS().Day - 1, NowADS().Day) + Fecha = (dia.ToString + "/" + NowADS().Month.ToString + "/" + NowADS().Year.ToString).ToDate If CveMoneda = 2 Then ChkPagarPesos.Visible = True @@ -1264,8 +1264,11 @@ Partial Class Bancos_PopIEVentas CveIE = rw.DataKey("CveIE").ToEntero Pago.CveMonedaPago = rw.DataKey("CveMoneda").ToEntero Pago.ImportePago = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal + Pago.ImportePagoVenta = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal Pago.TCPago = rw.DataKey("TipoCambio").ToDecimal - Pago.FechaDocumentoRelacionado = rw.DataKey("Fecha").ToDate + Pago.FechaDocumentoRelacionado = rw.DataKey("FechaDocumento").ToDate + Pago.CveIE = CveIE + Pago.CveClientePago = rw.DataKey("CveCliente").ToEntero If ChkPagarPesos.Checked Then Pago.TCPago = 1 / rw.DataKey("TipoCambio").ToDecimal If ChkPagarDolares.Checked Then Pago.TCPago = rw.DataKey("TipoCambio").ToDecimal @@ -1389,7 +1392,7 @@ Partial Class Bancos_PopIEVentas TxtFolio.Text = "" TxtObservaciones.Text = "" TxtImporte.Text = "" - TxtFechaDocumento.Text = Now.ToShortDateString + TxtFechaDocumento.Text = NowADS().ToShortDateString ChkComplementoPago.Checked = False UpDatos.Update() @@ -1408,7 +1411,7 @@ Partial Class Bancos_PopIEVentas 'For i = 0 To CveVentas.Count - 1 Dim ObjBancos As New ClsBancos - If ObjBancos.GetComplementoPagosRep(-1, Now.AddYears(-2), Now, CveIE, -1, 1, UsuarioActual.CveEmpresa, -1) Then + If ObjBancos.GetComplementoPagosRep(-1, NowADS().AddYears(-2), NowADS(), CveIE, -1, 1, UsuarioActual.CveEmpresa, -1) Then If Not ObjBancos.DtResultados.Rows.Count > 0 Then ObjBancos.Dispose() Alert("No se generaron complementos de pago porque no hay facturas con método de pago PPD", TipoMensaje.MsgAdvertencia) @@ -1465,8 +1468,8 @@ Partial Class Bancos_PopIEVentas #End Region Private Sub RVTxtFechaDocumento_Init(sender As Object, e As EventArgs) Handles RVTxtFechaDocumento.Init - RVTxtFechaDocumento.MaximumValue = DateTime.Now.ToShortDateString - Calendario.EndDate = DateTime.Now + RVTxtFechaDocumento.MaximumValue = NowADS().ToShortDateString + Calendario.EndDate = NowADS() End Sub diff --git a/Bancos/PopUpBuscarColectiva.aspx.vb b/Bancos/PopUpBuscarColectiva.aspx.vb index aade4936d..6946ceda2 100644 --- a/Bancos/PopUpBuscarColectiva.aspx.vb +++ b/Bancos/PopUpBuscarColectiva.aspx.vb @@ -46,7 +46,7 @@ Partial Class Bancos_PopUpBuscarColectiva If TxtColectiva.Text.Trim <> String.Empty Then Colectiva = TxtColectiva.Text.Trim If TxtCodigo.Text.Trim <> String.Empty Then Codigo = TxtCodigo.Text.Trim - If ObjColectiva.GetColectivas(-1, Colectiva, Codigo, DdlTipo.SelectedValue, UsuarioActual.CveEmpresa) Then + If ObjColectiva.GetColectivas(UsuarioActual.CveEmpresa, Tipo:=DdlTipo.SelectedValue) Then If ObjColectiva.DtResultados.Rows.Count > 0 Then LtlTotalRegistros.Text = ObjColectiva.DtResultados.Rows.Count.ToString.FormatoNumero(0) diff --git a/Bancos/PopUpBuscarIE.aspx.vb b/Bancos/PopUpBuscarIE.aspx.vb index 52515e79c..9b40e213d 100644 --- a/Bancos/PopUpBuscarIE.aspx.vb +++ b/Bancos/PopUpBuscarIE.aspx.vb @@ -37,7 +37,7 @@ Partial Class Bancos_PopUpBuscarIE Opcion = Request("OPCION").ToString End If - txtFechaI.Text = Date.Now.AddMonths(-1).FirstDayOfMonth.ToShortDateString + txtFechaI.Text = NowADS().AddMonths(-1).FirstDayOfMonth.ToShortDateString CargaDatos() diff --git a/Bancos/PrestamoPersonal.aspx.cs b/Bancos/PrestamoPersonal.aspx.cs index ab7330f98..00075eb97 100644 --- a/Bancos/PrestamoPersonal.aspx.cs +++ b/Bancos/PrestamoPersonal.aspx.cs @@ -40,10 +40,10 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas CargaReporte(); CargaConceptos(); - TxtFechaDocumento.Text = DateTime.Now.ToShortDateString(); - TxtFechaPrestamo.Text = DateTime.Now.ToShortDateString(); - txtFechaI.Text = DateTime.Now.FirstDayOfMonth().ToShortDateString(); - txtFechaF.Text = DateTime.Now.ToShortDateString(); + TxtFechaDocumento.Text = NowADS().ToShortDateString(); + TxtFechaPrestamo.Text = NowADS().ToShortDateString(); + txtFechaI.Text = NowADS().FirstDayOfMonth().ToShortDateString(); + txtFechaF.Text = NowADS().ToShortDateString(); TxtImporte.Attributes.Add("disabled", "disabled"); //if (UsuarioActual.Empresa.Funcionalidad(281).ToEntero() == 1) diff --git a/Bancos/ProductosFinancieros.aspx.vb b/Bancos/ProductosFinancieros.aspx.vb index 0be160c8b..142179554 100644 --- a/Bancos/ProductosFinancieros.aspx.vb +++ b/Bancos/ProductosFinancieros.aspx.vb @@ -335,7 +335,7 @@ Partial Class Bancos_ProductosFinancieros Dim ConceptoContable As Integer = Row("CveConcepto").ToString.ToEntero Dim TipoMovimiento As Boolean = If(Row("TipoMovto").ToString = "True", True, False) Dim importeMovimiento As Decimal = 0 - Dim FechaMovimiento As Date = Now + Dim FechaMovimiento As Date = NowADS() Dim IdCtaContablePP As Integer = 0 Select Case ConceptoContable diff --git a/Bancos/ProveedoresAbonar.aspx b/Bancos/ProveedoresAbonar.aspx index 9d42267a6..20835831c 100644 --- a/Bancos/ProveedoresAbonar.aspx +++ b/Bancos/ProveedoresAbonar.aspx @@ -79,15 +79,7 @@ -
    -
    - T.C: - - - - -
    -
    @@ -461,8 +453,8 @@ % Desc. - - + + @@ -578,19 +570,21 @@ var chkPesosBancos = $get("ChkPagarPesos"); var chkDolaresBancos = $get("ChkPagarDolares"); - if (t.checked) { txt.value = FormatoNumero(importe, 2); } else { txt.value = ""; } - if (chkPesosBancos) { + if (chkPesosBancos && chkPesosBancos.checked) { CambiaPesosDolares() - } else if (chkDolaresBancos) { + } else if (chkDolaresBancos && chkDolaresBancos.checked) { CambiaDolaresPesos() } - + else { + var Suma = SumaValores(); + $get('TxtImporte').value = FormatoNumero(Suma, 2); + } } function SumaValores(aplicaTC) { @@ -645,6 +639,8 @@ function FnCambia(chk, txt, saldo, op, text, Tipo) { debugger; + var chkPesosBancos = $get("ChkPagarPesos"); + var chkDolaresBancos = $get("ChkPagarDolares"); if (op == 1) { if (txt.value != '') { chk.checked = true; @@ -667,8 +663,12 @@ $get('TxtTotal').value = FormatoNumero(Suma + (ToDouble($get('TxtOtrosImportes').value * -1)), 2); } - CambiaPesosDolares() - CambiaDolaresPesos() + if (chkPesosBancos && chkPesosBancos.checked) { + CambiaPesosDolares() + } else if (chkDolaresBancos && chkDolaresBancos.checked) { + CambiaDolaresPesos() + } + } diff --git a/Bancos/ProveedoresAbonar.aspx.vb b/Bancos/ProveedoresAbonar.aspx.vb index e2b7b3d4f..2a8781769 100644 --- a/Bancos/ProveedoresAbonar.aspx.vb +++ b/Bancos/ProveedoresAbonar.aspx.vb @@ -224,7 +224,7 @@ Partial Class Bancos_ProveedoresAbonar End If PermiteModificarImporte = True - TxtFechaIncobrable.Text = Now.ToShortDateString + TxtFechaIncobrable.Text = NowADS().ToShortDateString If Request("CveProveedor") IsNot Nothing AndAlso Request("CveProveedor").ToString.ToEntero > 0 Then @@ -252,13 +252,13 @@ Partial Class Bancos_ProveedoresAbonar If UsuarioActual.TienePermisoProceso(98) Then PermiteModificarImporte = False End If - Calendario.StartDate = Now.AddMonths(-18) + Calendario.StartDate = NowADS().AddMonths(-18) 'proceso que restringue solo el pago de apartir del dia de hoy y como limite fin de mes If UsuarioActual.TienePermisoProceso(105) Then - Calendario.StartDate = Now - Calendario.EndDate = Now.LastDayOfMonth - MEVCalendario.MinimumValue = Now.ToShortDateString - MEVCalendario.MaximumValue = Now.LastDayOfMonth.ToShortDateString + Calendario.StartDate = NowADS() + Calendario.EndDate = NowADS().LastDayOfMonth + MEVCalendario.MinimumValue = NowADS().ToShortDateString + MEVCalendario.MaximumValue = NowADS().LastDayOfMonth.ToShortDateString MEVCalendario.Enabled = True End If @@ -293,16 +293,14 @@ Partial Class Bancos_ProveedoresAbonar If CveMoneda = 2 Then ChkPagarPesos.Visible = True - TxtTC.Text = GlobalTipoCambio(Now).FormatoNumero(4) - TxtTCDolaresDolares.Text = GlobalTipoCambio(Now).FormatoNumero(4) - DivDolaresDolares.Visible = True + TxtTC.Text = GlobalTipoCambio(NowADS()).FormatoNumero(4) TxtFechaDocumento.Attributes.Add("onchange", "CambiaTC(this);") Else ChkPagarDolares.Visible = True - TxtTCDolares.Text = GlobalTipoCambio(Now).FormatoNumero(4) + TxtTCDolares.Text = GlobalTipoCambio(NowADS()).FormatoNumero(4) End If - RegistraScript($"TipoCambioActual = {GlobalTipoCambio(Now).FormatoNumero(4)}") + RegistraScript($"TipoCambioActual = {GlobalTipoCambio(NowADS()).FormatoNumero(4)}") UpDatos.Update() If UsuarioActual.TienePermisoProceso(215) Or UsuarioActual.TienePermisoProceso(204) Then @@ -338,10 +336,6 @@ Partial Class Bancos_ProveedoresAbonar RegistraScript("CambiaDolaresPesos();") End If - If DivDolaresDolares.Visible Then - TxtTCDolaresDolares.Text = GlobalTipoCambio(TxtFechaDocumento.Text.ToDate).FormatoNumero(4) - End If - UpDatos.Update() End Sub #Region " CARGA DATOS " @@ -379,7 +373,7 @@ Partial Class Bancos_ProveedoresAbonar CargaTipoTransaccion() CargaCuentas(DdlTipoTransaccion.SelectedValue.ToEntero) - TxtFechaDocumento.Text = Now.ToShortDateString + TxtFechaDocumento.Text = NowADS().ToShortDateString TxtPagueseA.Enabled = False @@ -615,7 +609,7 @@ Partial Class Bancos_ProveedoresAbonar End If 'proceso que restringue solo el pago de apartir del dia de hoy y como limite fin de mes - If UsuarioActual.TienePermisoProceso(105) AndAlso (TxtFechaDocumento.Text.ToDate < Now.Date Or TxtFechaDocumento.Text.ToDate > Now.LastDayOfMonth) Then + If UsuarioActual.TienePermisoProceso(105) AndAlso (TxtFechaDocumento.Text.ToDate < NowADS().Date Or TxtFechaDocumento.Text.ToDate > NowADS().LastDayOfMonth) Then Alert("Fecha No permitida", TipoMensaje.MsgAdvertencia) Exit Sub End If @@ -728,11 +722,7 @@ Partial Class Bancos_ProveedoresAbonar CvePrePoliza = ObjMov.AddPrePolizas("Bancos/ProveedoresAbonar", 2, ImporteSeleccionado, ImporteSeleccionado, 1, TxtFechaDocumento.Text.ToDate, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FolioFijo:=FolioFijo, ReglaFolioPoliza:=ObjComp.ObtenerReglaFolio(DdlTipoTransaccion.SelectedValue, Nothing, UsuarioActual.CveEmpresa), CveTipoPoliza:=ObjMov.ObtenerTipoPoliza(DdlTipoTransaccion.SelectedValue, "-1", UsuarioActual.CveEmpresa)) If CveMoneda = 2 Then - If TxtTCDolares.Visible Then - TipoCambio = TxtTCDolares.Text.ToDecimal - Else - TipoCambio = TxtTCDolaresDolares.Text.ToDecimal - End If + TipoCambio = TxtTCDolares.Text.ToDecimal Else If TxtTC.Visible Then TipoCambio = TxtTC.Text.ToDecimal @@ -837,40 +827,26 @@ Partial Class Bancos_ProveedoresAbonar Dim tImporteMN As Decimal = TxtImporte.Text.ToDecimal Pago.ImportePago = tImporteMN - If DivTarjeta.Visible AndAlso DdlTarjeta.SelectedValue.ToEntero > 0 Then - Dim ObjCredito As New ClsBancos - If ObjCredito.GetTarjetasCreditos(DdlCuenta.SelectedValue.ToEntero, DdlTarjeta.SelectedValue.ToEntero) Then - CveProveedor = ObjCredito.DtResultados.FiltroPrimeroValor("CveProveedor", "").ToEntero - End If - ObjCredito.Dispose() + Dim ImporteME As Decimal = 0 + If Pago.CveMonedaPago = 2 Then ImporteME = Pago.ImportePago + If Not UsaComplementariaBancos And Pago.CveMonedaPago = 2 Then + ImporteME = tImporteMN + tImporteMN = (tImporteMN * Pago.TCPago).RoundSQL + End If - Dim Importe42 As Decimal = Pago.ImportePago - tImporteMN = If(Pago.CveMonedaPago = 2, If(DivTC.Visible, Importe42 / TxtTC.Text.ToDecimal * Pago.TCPago, Importe42 * Pago.TCPago), Importe42) - If MsgError = "" AndAlso Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, Importe42, tImporteMN, 42, Referencia, ConceptoMovimiento, CveIE:=CveIE, CveProveedor:=CveProveedor, TipoCambio:=Pago.TCPago, CveSubProyecto:=CveSubProyecto) Then + + If MsgError = "" AndAlso Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, tImporteMN, 30, Referencia, ConceptoMovimiento, CveIE:=CveIE, CveProveedor:=CveProveedor, TipoCambio:=Pago.TCPago, CveSubProyecto:=CveSubProyecto, ImporteME:=ImporteME) Then + MsgError = "No se pudo insertar la póliza" + End If + + If Pago.CveMonedaPago = 2 AndAlso UsaComplementariaBancos Then + If MsgError = "" AndAlso Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, (Pago.ImportePago * Pago.TCPago - Pago.ImportePago).RoundSQL, 204, Referencia, ConceptoMovimiento, CveIE:=CveIE, CveProveedor:=CveProveedor, ImporteME:=Pago.ImportePago, TipoCambio:=Pago.TCPago, CveSubProyecto:=CveSubProyecto) Then MsgError = "No se pudo insertar la póliza" End If - - Else - Dim ImporteME As Decimal = 0 - If Pago.CveMonedaPago = 2 Then ImporteME = Pago.ImportePago - If Not UsaComplementariaBancos And Pago.CveMonedaPago = 2 Then - ImporteME = tImporteMN - tImporteMN = (tImporteMN * Pago.TCPago).RoundSQL - End If - - If MsgError = "" AndAlso Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, tImporteMN, 30, Referencia, ConceptoMovimiento, CveIE:=CveIE, CveProveedor:=CveProveedor, TipoCambio:=Pago.TCPago, CveSubProyecto:=CveSubProyecto, ImporteME:=ImporteME) Then - MsgError = "No se pudo insertar la póliza" - End If - - If Pago.CveMonedaPago = 2 AndAlso UsaComplementariaBancos Then - If MsgError = "" AndAlso Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, (Pago.ImportePago * Pago.TCPago - Pago.ImportePago).RoundSQL, 204, Referencia, ConceptoMovimiento, CveIE:=CveIE, CveProveedor:=CveProveedor, ImporteME:=Pago.ImportePago, TipoCambio:=Pago.TCPago, CveSubProyecto:=CveSubProyecto) Then - MsgError = "No se pudo insertar la póliza" - End If - End If End If - If MsgError = "" AndAlso ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 5) Then + If MsgError = "" AndAlso ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 5) Then If ObjMov.ValorPolizaDescuadre > 0 Then MsgError = ObjMov.MensajePolizaDescuadre + " " + ObjMov.ValorDiferencia GuardaLogAD($"Bancos/ProveedoresAbonar | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas") @@ -1026,7 +1002,7 @@ Partial Class Bancos_ProveedoresAbonar TxtObservaciones.Text = "" TxtImporte.Text = "" TxtTotal.Text = "" - TxtFechaDocumento.Text = Now.ToShortDateString + TxtFechaDocumento.Text = NowADS().ToShortDateString DdlSelectedValue(DdlCuenta, "-1") DdlSelectedValue(DdlTipoTransaccion, "-1") Anexo.Text = "[]" @@ -1159,16 +1135,7 @@ Partial Class Bancos_ProveedoresAbonar 'recargo la moneda con la que se va a pagar Dim dr As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveCuenta = {0}", DdlCuenta.SelectedValue)) If dr IsNot Nothing Then - - - If dr("CveMoneda").ToString.ToEntero >= 2 Then - DivDolaresDolares.Visible = True - TxtFechaDocumento.Attributes.Add("onchange", "CambiaTC(this);") - BtnCambiaTipoMoneda_Click(Nothing, Nothing) - Else - DivDolaresDolares.Visible = False - TxtFechaDocumento.Attributes.Remove("onchange") - End If + TxtFechaDocumento.Attributes.Remove("onchange") UpDatos.Update() If ChkPagarPesos.Checked Then @@ -1176,7 +1143,15 @@ Partial Class Bancos_ProveedoresAbonar RegistraScript("CambiaPesosDolares();") Else CveMoneda = dr("CveMoneda").ToString.ToEntero - RegistraScript("CambiaDolaresPesos();") + If CveMoneda = 1 Then + RegistraScript("CambiaDolaresPesos();") + End If + + End If + If CveMoneda = 2 Then + DivTCDolares.Visible = True + TxtFechaDocumento.Attributes.Add("onchange", "CambiaTC(this);") + TxtTCDolares.Text = GlobalTipoCambio(TxtFechaDocumento.Text.ToDate).FormatoNumero(4) End If End If @@ -1193,29 +1168,29 @@ Partial Class Bancos_ProveedoresAbonar TxtFolio.Text = "" End If - Dim dr2 As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("CveCuenta = " & DdlCuenta.SelectedValue) - If dr2 IsNot Nothing Then + 'Dim dr2 As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("CveCuenta = " & DdlCuenta.SelectedValue) + 'If dr2 IsNot Nothing Then - If dr("UsaTarjeta").ToString = "True" Then - CargaGridTarjetas() - Else - DivTarjeta.Visible = False - End If - End If + ' If dr("UsaTarjeta").ToString = "True" Then + ' CargaGridTarjetas() + ' Else + ' DivTarjeta.Visible = False + ' End If + 'End If End Sub - Private Sub CargaGridTarjetas() - Dim ObjCreditos As New ClsBancos - ObjCreditos.GetTarjetasCreditos(DdlCuenta.SelectedValue.ToEntero) - DdlTarjeta.Items.Clear() - DdlTarjeta.DataSource = ObjCreditos.DtResultados - DdlTarjeta.DataBind() - DdlTarjeta.Items.Insert(0, New ListItem("Seleccione", "-1")) - ObjCreditos.Dispose() - DivTarjeta.Visible = True - End Sub + 'Private Sub CargaGridTarjetas() + ' Dim ObjCreditos As New ClsBancos + ' ObjCreditos.GetTarjetasCreditos(DdlCuenta.SelectedValue.ToEntero) + ' DdlTarjeta.Items.Clear() + ' DdlTarjeta.DataSource = ObjCreditos.DtResultados + ' DdlTarjeta.DataBind() + ' DdlTarjeta.Items.Insert(0, New ListItem("Seleccione", "-1")) + ' ObjCreditos.Dispose() + ' DivTarjeta.Visible = True + 'End Sub #End Region #Region " CUENTAS DEPOSITOS" @@ -1381,13 +1356,12 @@ Partial Class Bancos_ProveedoresAbonar Protected Sub ChkPagarPesos_CheckedChanged(sender As Object, e As EventArgs) If ChkPagarPesos.Checked Then DivTC.Visible = True - DivDolaresDolares.Visible = False + DivTCDolares.Visible = False CargaCuentas(DdlTipoTransaccion.SelectedValue.ToEntero) TxtFechaDocumento.Attributes.Add("onchange", "CambiaTC(this);") TxtTC.Text = GlobalTipoCambio(TxtFechaDocumento.Text.ToDate).FormatoNumero(4) Else DivTC.Visible = False - DivDolaresDolares.Visible = True CargaCuentas(DdlTipoTransaccion.SelectedValue.ToEntero) TxtFechaDocumento.Attributes.Remove("onchange") End If @@ -1401,13 +1375,13 @@ Partial Class Bancos_ProveedoresAbonar Protected Sub ChkPagarDolares_CheckedChanged(sender As Object, e As EventArgs) If ChkPagarDolares.Checked Then DivTCDolares.Visible = True - DivDolaresDolares.Visible = False + 'DivDolaresDolares.Visible = False CargaCuentas(DdlTipoTransaccion.SelectedValue.ToEntero) TxtFechaDocumento.Attributes.Add("onchange", "CambiaTC(this);") TxtTCDolares.Text = GlobalTipoCambio(TxtFechaDocumento.Text.ToDate).FormatoNumero(4) Else DivTCDolares.Visible = False - DivDolaresDolares.Visible = False + 'DivDolaresDolares.Visible = False CargaCuentas(DdlTipoTransaccion.SelectedValue.ToEntero) TxtFechaDocumento.Attributes.Remove("onchange") End If @@ -1616,7 +1590,7 @@ Partial Class Bancos_ProveedoresAbonar 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.ToString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToString)) params.Add(New ReportParameter("Sucursal", DtDatos.Rows(1)("SubProyecto").ToString)) params.Add(New ReportParameter("Importe", $"${StrImporte}")) params.Add(New ReportParameter("RazonSocial", TxtPagueseA.Text)) @@ -1649,10 +1623,10 @@ Partial Class Bancos_ProveedoresAbonar #End Region Private Sub RVTxtFechaDocumento_Init(sender As Object, e As EventArgs) Handles RVTxtFechaDocumento.Init - RVTxtFechaDocumento.MaximumValue = DateTime.Now.ToShortDateString - RVTxtFechaDocumentoMenor.MinimumValue = DateTime.Now.AddMonths(-18).ToShortDateString - RVTxtFechaDocumentoMenor.MaximumValue = DateTime.Now.ToShortDateString - Calendario.EndDate = DateTime.Now + RVTxtFechaDocumento.MaximumValue = NowADS().ToShortDateString + RVTxtFechaDocumentoMenor.MinimumValue = NowADS().AddMonths(-18).ToShortDateString + RVTxtFechaDocumentoMenor.MaximumValue = NowADS().ToShortDateString + Calendario.EndDate = NowADS() End Sub diff --git a/Bancos/ProveedoresCreditos.aspx.vb b/Bancos/ProveedoresCreditos.aspx.vb index e86949a0c..99759eb43 100644 --- a/Bancos/ProveedoresCreditos.aspx.vb +++ b/Bancos/ProveedoresCreditos.aspx.vb @@ -339,7 +339,7 @@ Partial Class Bancos_ProveedoresCreditos DirectCast(Master.FindControl("TSM"), ScriptManager).EnablePageMethods = True TxtImporte.Attributes.Add("onblur", $"upIE(this,{CveMoneda});FncImporteCuenta(this);") - Calendario.StartDate = Now.AddMonths(-1).FirstDayOfMonth() + Calendario.StartDate = NowADS().AddMonths(-1).FirstDayOfMonth() ViewState("IDPoliza") = "-1" CveIEDeposito = -1 ' rbPagueseA.Attributes.Add("onchange", "upPagueseA(this);") @@ -482,7 +482,7 @@ Partial Class Bancos_ProveedoresCreditos 'Configuración de Modalidad Insert CveIE = -1 - TxtFechaDocumento.Text = Now.ToShortDateString + TxtFechaDocumento.Text = NowADS().ToShortDateString ImgUpdateCuentaDeposito.Visible = False End If @@ -657,9 +657,9 @@ Partial Class Bancos_ProveedoresCreditos If dr IsNot Nothing Then CveMoneda = dr("CveMoneda").ToString.ToEntero If CveMoneda = 2 Then - TipoCambio = GlobalTipoCambio(Now).ToDecimal + TipoCambio = GlobalTipoCambio(NowADS()).ToDecimal ElseIf CveMoneda = 3 Then - TipoCambio = GlobalTipoCambioEuro(Now).ToDecimal + TipoCambio = GlobalTipoCambioEuro(NowADS()).ToDecimal Else TipoCambio = 0 End If @@ -993,7 +993,7 @@ Partial Class Bancos_ProveedoresCreditos Dim TipoMovimiento = False Dim Concepto = "" Dim Referencia = $"Crédito: {TxtFolio.Text}" - Dim FechaMovimiento = Now.ToDate + Dim FechaMovimiento = NowADS().ToDate For Each Row As DataRow In DtPlantilla.Rows diff --git a/Bancos/Reembolsos.aspx.vb b/Bancos/Reembolsos.aspx.vb index abdcb9314..210095b54 100644 --- a/Bancos/Reembolsos.aspx.vb +++ b/Bancos/Reembolsos.aspx.vb @@ -718,7 +718,7 @@ Partial Class Bancos_Reembolsos If CvePrePolizaNueva > 0 Then Str.AppendFormat("
    Cheque: {1} ", CveIE, Folio) 'Str.AppendFormat("
    Imprimir Cheque ") - Str.AppendFormat("
  • Imprimir Cheque
  • ", UsuarioActual.CveEmpresa, CveIE, Now.Ticks) + Str.AppendFormat("
  • Imprimir Cheque
  • ", UsuarioActual.CveEmpresa, CveIE, NowADS().Ticks) End If Alert(Str.ToString, TipoMensaje.MsgInformacion) @@ -936,7 +936,7 @@ Partial Class Bancos_Reembolsos TxtObservaciones.Text = "" TxtImporte.Text = "" TxtImporteVinculado.Text = "" - TxtFechaDocumento.Text = Date.Now.ToShortDateString + TxtFechaDocumento.Text = NowADS().ToShortDateString 'DdlCuenta.SelectedValue = "-1" DdlTipoTransaccion.SelectedValue = "-1" DdlTipoTransaccionDiferencia_SelectedIndexChanged(DdlTipoTransaccion, EventArgs.Empty) @@ -1046,7 +1046,7 @@ Partial Class Bancos_Reembolsos DDlCheques_SelectedIndexChanged(DDlCheques, EventArgs.Empty) If GvCxP.Rows.Count > 0 Then - TxtFechaDocumento.Text = Now.ToShortDateString + TxtFechaDocumento.Text = NowADS().ToShortDateString 'BtnIEGuardar.Enabled = True If Not DdlPersonal.SelectedValue = "-2" Then diff --git a/Bancos/RegistroPagoIntermediario.aspx.vb b/Bancos/RegistroPagoIntermediario.aspx.vb index 939ade0a5..b36642082 100644 --- a/Bancos/RegistroPagoIntermediario.aspx.vb +++ b/Bancos/RegistroPagoIntermediario.aspx.vb @@ -27,7 +27,7 @@ Partial Class Bancos_PagosIntermediarios Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not IsPostBack Then FacturasCheckadas = 0 - TxtFecha.Text = Now.ToShortDateString + TxtFecha.Text = NowADS().ToShortDateString CargaCuentas() CargaFiltros() End If @@ -193,7 +193,7 @@ Partial Class Bancos_PagosIntermediarios TxtObservaciones.Text = "" TxtTotalBancos.Text = "" TxtTotalComisiones.Text = "" - TxtFecha.Text = Now.ToShortDateString + TxtFecha.Text = NowADS().ToShortDateString CargaDatos() Alert(String.Format("El Depósito se ha registrado correctamente."), TipoMensaje.MsgInformacion) Else diff --git a/Bancos/RepClientesAnticipo.aspx.vb b/Bancos/RepClientesAnticipo.aspx.vb index d39a7f328..1a3d2eaff 100644 --- a/Bancos/RepClientesAnticipo.aspx.vb +++ b/Bancos/RepClientesAnticipo.aspx.vb @@ -167,7 +167,7 @@ Partial Class Bancos_RepClientesAnticipo params.Add(New ReportParameter("FechaInicio", FechaI)) params.Add(New ReportParameter("FechaFin", FechaF)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) diff --git a/Bancos/RepCobrado.aspx.vb b/Bancos/RepCobrado.aspx.vb index c6e43162a..5acea6733 100644 --- a/Bancos/RepCobrado.aspx.vb +++ b/Bancos/RepCobrado.aspx.vb @@ -52,8 +52,8 @@ Partial Class Ventas_RepRecuperacion DdlBanco.Items.Insert(0, New ListItem("Todos", "-1")) DdlBanco.DataBind() - txtFechaI.Text = $"01/{Now.Month}/{Now.Year}" - txtFechaF.Text = Now.ToShortDateString + txtFechaI.Text = $"01/{NowADS().Month}/{NowADS().Year}" + txtFechaF.Text = NowADS().ToShortDateString End Sub Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click @@ -148,10 +148,10 @@ Partial Class Ventas_RepRecuperacion 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("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("Filtros", StrFiltro.ToString)) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) - ImprimirPDF(RutaPDF, DtDatos, params, "RepRecuperacion" & Now.ToString("yyyyMMddhhmmss"), Formato) + ImprimirPDF(RutaPDF, DtDatos, params, "RepRecuperacion" & NowADS().ToString("yyyyMMddhhmmss"), Formato) End Sub End Class diff --git a/Bancos/RepCobradoDetalle.aspx.vb b/Bancos/RepCobradoDetalle.aspx.vb index e70927ee4..52ee35b89 100644 --- a/Bancos/RepCobradoDetalle.aspx.vb +++ b/Bancos/RepCobradoDetalle.aspx.vb @@ -71,8 +71,8 @@ Partial Class Ventas_RepRecuperacionDetalle DdlBanco.Items.Insert(0, New ListItem("Todos", "-1")) DdlBanco.DataBind() - txtFechaI.Text = $"01/{Now.Month}/{Now.Year}" - txtFechaF.Text = Now.ToShortDateString + txtFechaI.Text = $"01/{NowADS().Month}/{NowADS().Year}" + txtFechaF.Text = NowADS().ToShortDateString 'Cargamos las fechas @@ -204,9 +204,9 @@ Partial Class Ventas_RepRecuperacionDetalle 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("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("Filtros", StrFiltro.ToString)) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) - ImprimirPDF(RutaPDF, DtDatos, params, "RepRecuperacionDetalle" & Now.ToString("yyyyMMddhhmmss"), Formato) + ImprimirPDF(RutaPDF, DtDatos, params, "RepRecuperacionDetalle" & NowADS().ToString("yyyyMMddhhmmss"), Formato) End Sub End Class diff --git a/Bancos/RepCobradoPagado.aspx.vb b/Bancos/RepCobradoPagado.aspx.vb index 1c18b9c41..a9a301a3a 100644 --- a/Bancos/RepCobradoPagado.aspx.vb +++ b/Bancos/RepCobradoPagado.aspx.vb @@ -50,8 +50,8 @@ Partial Class Bancos_RepCobradoPagado #Region "CARGA DATOS" Private Sub CargaCombos() DdlGrupo.Items.Clear() - txtFechaI.Text = DateTime.Now.FirstDayOfMonth.ToShortDateString - txtFechaF.Text = DateTime.Now.LastDayOfMonth.ToShortDateString + txtFechaI.Text = NowADS().FirstDayOfMonth.ToShortDateString + txtFechaF.Text = NowADS().LastDayOfMonth.ToShortDateString If DdlModalidad.SelectedValue = "2" Then DdlGrupo.Items.Insert(0, New ListItem("Año", "1")) DdlGrupo.Items.Insert(1, New ListItem("Año/Mes", "2")) @@ -91,7 +91,7 @@ Partial Class Bancos_RepCobradoPagado If ObjBancos.GetCobradoPagado(DdlModalidad.SelectedValue.ToEntero, DdlGrupo.SelectedValue.ToEntero, If(txtFechaI.Text = "" Or txtFechaI.Text = "__/__/____", MinFecha, txtFechaI.Text.ToDate), - If(txtFechaF.Text = "" Or txtFechaF.Text = "__/__/____", Now, txtFechaF.Text.ToDate), + If(txtFechaF.Text = "" Or txtFechaF.Text = "__/__/____", NowADS(), txtFechaF.Text.ToDate), DdlProyecto.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, RblTipoCambio.SelectedValue.ToEntero, TCEspecifico) Then DtDatos = ObjBancos.DtResultados If DtDatos.Rows.Count > 0 Then @@ -128,13 +128,13 @@ Partial Class Bancos_RepCobradoPagado Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then 'If PrendeLink Then - ' e.Row.FCLiteral("Gpo").Text = $"{e.Row.DBCampo("GPO")}" + ' e.Row.FCLiteral("Gpo").Text = $"{e.Row.DBCampo("GPO")}" 'End If If e.Row.DBCampo("Orden") = "" Then e.Row.CssClass = "Totales" Else - e.Row.FCLiteral("Gpo").Text = $"{e.Row.DBCampo("GPO")}" + e.Row.FCLiteral("Gpo").Text = $"{e.Row.DBCampo("GPO")}" End If If e.Row.DBCampo("Grupo") = "10" Then If e.Row.DBCampo("CveSubProyecto") <> "" AndAlso e.Row.DBCampo("CveClasificacion") = "" Then @@ -157,7 +157,7 @@ Partial Class Bancos_RepCobradoPagado If RblTipoCambio.SelectedValue.ToEntero = 3 Then Dim TipoCambio As Double LiEspecifico.Visible = True - TipoCambio = GlobalTipoCambio(Now) + TipoCambio = GlobalTipoCambio(NowADS()) TxtEspecifico.Text = TipoCambio.ToString Else LiEspecifico.Visible = False @@ -171,7 +171,7 @@ Partial Class Bancos_RepCobradoPagado #Region "I M P R I M I R " Protected Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click - GvDatos.ExportToExcel("ReporteCobrado-Pagado" & Now.ToShortDateString) + GvDatos.ExportToExcel("ReporteCobrado-Pagado" & NowADS().ToShortDateString) End Sub Private Sub GenerarPDF() @@ -197,7 +197,7 @@ Partial Class Bancos_RepCobradoPagado params.Add(New ReportParameter("FechaFin", FechaF)) params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString)) params.Add(New ReportParameter("AgrupadoPor", $"Agrupado Por: {Grupo}{Moneda}{FechaIn}{FechaFn}")) params.Add(New ReportParameter("FUltimaSemana", FUltimaSemana)) params.Add(New ReportParameter("FUltimoMes", FUltimoMes)) diff --git a/Bancos/RepComplementoPago.aspx.vb b/Bancos/RepComplementoPago.aspx.vb index 603e2c53b..a22070ac6 100644 --- a/Bancos/RepComplementoPago.aspx.vb +++ b/Bancos/RepComplementoPago.aspx.vb @@ -80,8 +80,8 @@ Partial Class Bancos_RepComplementoPago If Not Page.IsPostBack Then - txtFechaI.Text = $"{New DateTime(Now.Year, Now.Month, 1).ToString("dd/MM/yyyy")}" - txtFechaF.Text = DateTime.Now.ToString("dd/MM/yyyy") + txtFechaI.Text = $"{New DateTime(NowADS().Year, NowADS().Month, 1).ToString("dd/MM/yyyy")}" + txtFechaF.Text = NowADS().ToString("dd/MM/yyyy") DdlCliente.setEsWebService(True) DdlMotivoCancelacion.DataSource = GlobalDTMotivosCancelacionEmpresa(UsuarioActual.CveEmpresa).FiltraParametros("CveSATMotivoCancelacion = 2 or CveSATMotivoCancelacion = 3 ") @@ -139,11 +139,11 @@ Partial Class Bancos_RepComplementoPago For Each gvr As GridViewRow In GvD.Rows If gvr.FCCheckBox("Chk").Checked Then - Dim FechaTimbrado As DateTime = DateTime.Now + Dim FechaTimbrado As DateTime = NowADS() Dim UTCOffset As Integer = 0 - If Now.EsHorarioVerano Then + If NowADS().EsHorarioVerano Then If gvr.DataKey("UTCOffsetVerano").ToEntero() <> 0 Then UTCOffset = gvr.DataKey("UTCOffsetVerano").ToEntero() End If @@ -218,6 +218,7 @@ Partial Class Bancos_RepComplementoPago e.Row.ForeColor = Drawing.Color.Red e.Row.FCCheckBox("Chk").Enabled = False e.Row.FCCheckBox("Chk").ToolTip = Mensaje + e.Row.Attributes.Add("title", Mensaje) End If Else @@ -341,57 +342,58 @@ Partial Class Bancos_RepComplementoPago ' no tiene restricciones Case "2" If CuentaPago <> "" AndAlso Not CuentaPago.Length.Contiene(11, 18) Then - Mensaje = "La cuenta ordenante no cumple con el formato esperado." + Mensaje = "La cuenta ordenante no cumple con el formato esperado. El tamaño debe de ser de 11 o 18 caracteres." End If If CuentaBeneficiario <> "" AndAlso Not (CuentaBeneficiario.Length.Contiene(10, 11, 15, 16, 18, 50)) Then - Mensaje = $"{Mensaje} La Cuenta Beneficiario no cumple con el formato esperado." + Mensaje = $"{Mensaje} La Cuenta Beneficiario no cumple con el formato esperado. El tamaño debe de ser de 10, 11, 15, 16, 18 o 50 caracteres." End If Case "3" - If CuentaPago <> "" AndAlso Not CuentaPago.Length.Contiene(10, 16, 18) Then - Mensaje = "La cuenta ordenante no cumple con el formato esperado." + If CuentaPago <> "" AndAlso Not CuentaPago.Length.Contiene(10, 16, 18) Then + + Mensaje = "La cuenta ordenante no cumple con el formato esperado. El tamaño debe de ser de caracteres." End If If CuentaBeneficiario <> "" AndAlso Not (CuentaBeneficiario.Length.Contiene(10, 18)) Then - Mensaje = $"{Mensaje} La Cuenta Beneficiario no cumple con el formato esperado." + Mensaje = $"{Mensaje} La Cuenta Beneficiario no cumple con el formato esperado. El tamaño debe de ser de 10 o 18 caracteres." End If Case "4" If CuentaPago <> "" AndAlso Not CuentaPago.Length.Contiene(16) Then - Mensaje = "La cuenta ordenante no cumple con el formato esperado." + Mensaje = "La cuenta ordenante no cumple con el formato esperado. El tamaño debe de ser de 16 caracteres." End If If CuentaBeneficiario <> "" AndAlso Not (CuentaBeneficiario.Length.Contiene(10, 11, 15, 16, 18, 50)) Then - Mensaje = $"{Mensaje} La Cuenta Beneficiario no cumple con el formato esperado." + Mensaje = $"{Mensaje} La Cuenta Beneficiario no cumple con el formato esperado. El tamaño debe de ser de 10, 11, 15, 16, 18 o 50 caracteres." End If Case "5" If CuentaPago <> "" AndAlso Not CuentaPago.Length.Contiene(10, 11, 15, 16, 18, 50) Then - Mensaje = "La cuenta ordenante no cumple con el formato esperado." + Mensaje = "La cuenta ordenante no cumple con el formato esperado. El tamaño debe de ser de 10, 11, 15, 16, 18 o 50 caracteres." End If If CuentaBeneficiario <> "" AndAlso Not (CuentaBeneficiario.Length.Contiene(10, 11, 15, 16, 18, 50)) Then - Mensaje = $"{Mensaje} La Cuenta Beneficiario no cumple con el formato esperado." + Mensaje = $"{Mensaje} La Cuenta Beneficiario no cumple con el formato esperado. El tamaño debe de ser de 10, 11, 15, 16, 18 o 50 caracteres." End If Case "6" If CuentaPago <> "" AndAlso Not CuentaPago.Length.Contiene(10) Then - Mensaje = "La cuenta ordenante no cumple con el formato esperado." + Mensaje = "La cuenta ordenante no cumple con el formato esperado. El tamaño debe de ser de 10 caracteres." End If CuentaBeneficiario = "" Case "28" If CuentaPago <> "" AndAlso Not CuentaPago.Length.Contiene(16) Then - Mensaje = "La cuenta ordenante no cumple con el formato esperado." + Mensaje = "La cuenta ordenante no cumple con el formato esperado. El tamaño debe de ser de 16 caracteres." End If If CuentaBeneficiario <> "" AndAlso Not (CuentaBeneficiario.Length.Contiene(10, 11, 15, 16, 18, 50)) Then - Mensaje = $"{Mensaje} La Cuenta Beneficiario no cumple con el formato esperado." + Mensaje = $"{Mensaje} La Cuenta Beneficiario no cumple con el formato esperado. El tamaño debe de ser de 10, 11, 15, 16, 18 o 50 caracteres." End If Case "29" If CuentaPago <> "" AndAlso Not CuentaPago.Length.Contiene(15, 16) Then - Mensaje = "La cuenta ordenante no cumple con el formato esperado." + Mensaje = "La cuenta ordenante no cumple con el formato esperado. El tamaño debe de ser de 15 o 16 caracteres." End If If CuentaBeneficiario <> "" AndAlso Not (CuentaBeneficiario.Length.Contiene(10, 11, 15, 16, 18, 50)) Then - Mensaje = $"{Mensaje} La Cuenta Beneficiario no cumple con el formato esperado." + Mensaje = $"{Mensaje} La Cuenta Beneficiario no cumple con el formato esperado. El tamaño debe de ser de 10, 11, 15, 16, 18 o 50 caracteres." End If Case Else Mensaje = "Forma de Pago no valida, no tiene una forma de pago SAT" @@ -543,7 +545,7 @@ Partial Class Bancos_RepComplementoPago worksheet.Rows(IndexEndTable + 1).Cells(2).Value = Usuario.Nombre worksheet.Rows(IndexEndTable).Cells(6).Value = "Fecha Impresión" - worksheet.Rows(IndexEndTable + 1).Cells(6).Value = DateTime.Now.ToString("dd/MM/yyyy") + worksheet.Rows(IndexEndTable + 1).Cells(6).Value = NowADS().ToString("dd/MM/yyyy") Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", Usuario.Empresa.Ruta)) @@ -590,7 +592,7 @@ Partial Class Bancos_RepComplementoPago If EstatusSATCancelado(Can_FolioFiscalCancelar, UsuarioActual.Empresa.RFC, Can_RFCReceptorCancelar) Then - If ObjBanco.UpdateComplementoPagoCancelado(Can_CveComplementoPagoCancelar, 2, UsuarioActual.CveEmpresa, Can_CvePACCancelacion, Date.Now, "", CveSATMotivoCancelacion) Then + If ObjBanco.UpdateComplementoPagoCancelado(Can_CveComplementoPagoCancelar, 2, UsuarioActual.CveEmpresa, Can_CvePACCancelacion, NowADS(), "", CveSATMotivoCancelacion) Then Alert("El complemento se cancelo correctamente.") ErrorProceso = False End If diff --git a/Bancos/RepComprobaciones.aspx.cs b/Bancos/RepComprobaciones.aspx.cs index b71a3d400..9c8cb4dc8 100644 --- a/Bancos/RepComprobaciones.aspx.cs +++ b/Bancos/RepComprobaciones.aspx.cs @@ -81,7 +81,7 @@ public partial class Bancos_RepComprobaciones : ClsPaginas @params.Add(new ReportParameter("FechaInicio", TxtFechaInicio.Text)); @params.Add(new ReportParameter("FechaFin", TxtFechaFin.Text)); @params.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)); - @params.Add(new ReportParameter("FechaImpresion", DateTime.Now.ToString())); + @params.Add(new ReportParameter("FechaImpresion", NowADS().ToString())); @params.Add(new ReportParameter("Cuenta", DdlCuentas.SelectedItem.Text)); @params.Add(new ReportParameter("LogoPath", Imagen.Exists ? $"file://{Imagen.FullName}" : "")); diff --git a/Bancos/RepCortes.aspx.vb b/Bancos/RepCortes.aspx.vb index b6ba10c25..f5e4ccba6 100644 --- a/Bancos/RepCortes.aspx.vb +++ b/Bancos/RepCortes.aspx.vb @@ -63,8 +63,8 @@ Partial Class Bancos_RepCortes Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not Page.IsPostBack Then - txtFechaVI.Text = Now.ToShortDateString - txtFechaVF.Text = Now.ToShortDateString + txtFechaVI.Text = NowADS().ToShortDateString + txtFechaVF.Text = NowADS().ToShortDateString Me.Form.DefaultButton = BtnConsultar.UniqueID CargarCentrosDeCosto(Nothing, DdlSubProyectos, Nothing, LblSubProyecto) End If diff --git a/Bancos/RepCreditos.aspx.vb b/Bancos/RepCreditos.aspx.vb index 3ada99106..dc011d19c 100644 --- a/Bancos/RepCreditos.aspx.vb +++ b/Bancos/RepCreditos.aspx.vb @@ -270,7 +270,7 @@ Partial Class Bancos_RepCreditos e.Row.Cells(1).Text = e.Row.DBCampo("Contador") End If - If e.Row.DBCampo("FechaVencimiento") <> "" AndAlso e.Row.DBCampo("FechaVencimiento").ToDate <= Now Then + If e.Row.DBCampo("FechaVencimiento") <> "" AndAlso e.Row.DBCampo("FechaVencimiento").ToDate <= NowADS() Then e.Row.ForeColor = System.Drawing.Color.Red e.Row.ToolTip = "Fecha Vencida" End If @@ -309,7 +309,7 @@ Partial Class Bancos_RepCreditos ''Exportar Excel 'Protected Sub ImgExcel_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs) Handles ImgExcel.Click - ' GvDatos.ExportToExcel("RepClientes_" & Now.ToShortDateString) + ' GvDatos.ExportToExcel("RepClientes_" & NowADS().ToShortDateString) 'End Sub #Region "A C T U A L I Z A R - E X C E L" @@ -614,7 +614,7 @@ Partial Class Bancos_RepCreditos fs = File.Create(path) 'NombreArchivo = "hola.excel" ' Add text to the file. - Dim info As Byte() = New UTF8Encoding(True).GetBytes(String.Format("{0}|{1}", NombreArchivo, Date.Now.ToShortDateString)) + Dim info As Byte() = New UTF8Encoding(True).GetBytes(String.Format("{0}|{1}", NombreArchivo, NowADS().ToShortDateString)) fs.Write(info, 0, info.Length) fs.Close() Catch ex As Exception diff --git a/Bancos/RepCxCCliente.aspx.vb b/Bancos/RepCxCCliente.aspx.vb index c977428fc..87d5a678c 100644 --- a/Bancos/RepCxCCliente.aspx.vb +++ b/Bancos/RepCxCCliente.aspx.vb @@ -158,7 +158,7 @@ Partial Class Bancos_RepCxCCliente params.Add(New ReportParameter("FechaInicio", FI)) params.Add(New ReportParameter("FechaFin", FF)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToString)) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) ImprimirPDF("Empresas/Grales/Formatos/RepPagoClientes.rdlc", DTpp, params, "ReportePagoClientes") @@ -172,7 +172,7 @@ Partial Class Bancos_RepCxCCliente Protected Sub ImgExcel_Click(sender As Object, e As System.EventArgs) Handles ImgExcel.Click - GvCxC.ExportToExcel("CxC Cliente" & Now.ToShortDateString) + GvCxC.ExportToExcel("CxC Cliente" & NowADS().ToShortDateString) End Sub diff --git a/Bancos/RepEgresosSinComprobante.aspx.vb b/Bancos/RepEgresosSinComprobante.aspx.vb index fbf30577c..decc73eb3 100644 --- a/Bancos/RepEgresosSinComprobante.aspx.vb +++ b/Bancos/RepEgresosSinComprobante.aspx.vb @@ -168,7 +168,7 @@ Partial Class Bancos_RepEgresosSinComprobante Next TxtConcepto.Text = "Saldado de Egresos por comprobar" - TxtFechaSaldar.Text = Now.ToShortDateString + TxtFechaSaldar.Text = NowADS().ToShortDateString DVSaldar.Visible = True UpSaldar.Update() @@ -319,7 +319,7 @@ Partial Class Bancos_RepEgresosSinComprobante CveConceptoContable = 37 End Select - CvePrePoliza = ObjConta.AddPrePolizas("Bancos/RepEgresosSinComprobante", 6, gr.DataKey("Saldo").ToDecimal, gr.DataKey("Saldo").ToDecimal, gr.DataKey("CveMoneda").ToEntero, Now, + CvePrePoliza = ObjConta.AddPrePolizas("Bancos/RepEgresosSinComprobante", 6, gr.DataKey("Saldo").ToDecimal, gr.DataKey("Saldo").ToDecimal, gr.DataKey("CveMoneda").ToEntero, NowADS(), "Saldo de ExC por Sistema", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoConcepto, gr.DataKey("Saldo").ToDecimal, gr.DataKey("Saldo").ToDecimal, CveConceptoContable, "", "Saldo de ExC por Sistema", @@ -379,10 +379,10 @@ Partial Class Bancos_RepEgresosSinComprobante params.Add(New ReportParameter("FechaInicio", FechaI)) params.Add(New ReportParameter("FechaFin", FechaF)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("Filtros", StrFiltro.ToString)) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) - ImprimirPDF($"Empresas/Grales/Formatos/{Archivo}", DtDatos, params, String.Format("EgresosSinComprovante-{0}", Now.ToDateTime.ToShortDateString), Formato:=Formato) + ImprimirPDF($"Empresas/Grales/Formatos/{Archivo}", DtDatos, params, String.Format("EgresosSinComprovante-{0}", NowADS().ToDateTime.ToShortDateString), Formato:=Formato) End If End Sub diff --git a/Bancos/RepIE.aspx.vb b/Bancos/RepIE.aspx.vb index 15ad4ecba..f594d28de 100644 --- a/Bancos/RepIE.aspx.vb +++ b/Bancos/RepIE.aspx.vb @@ -46,8 +46,8 @@ Partial Class Bancos_RepIE If Not Page.IsPostBack Then GvDatos.DataBind() Me.Form.DefaultButton = BtnConsultar.UniqueID - txtFechaI.Text = Now.ToShortDateString - txtFechaF.Text = Now.ToShortDateString + txtFechaI.Text = NowADS().ToShortDateString + txtFechaF.Text = NowADS().ToShortDateString CargaGvBitacora() TipoPagina = "" ViewState("Orden") = "" @@ -84,8 +84,8 @@ Partial Class Bancos_RepIE GvDatos.Columns(15).Visible = True GvDatos.Columns(18).Visible = False - txtFechaI.Text = DateSerial(Year(Date.Now), Month(Date.Now), 1).ToShortDateString - txtFechaF.Text = Date.Now.ToShortDateString + txtFechaI.Text = DateSerial(Year(NowADS()), Month(NowADS()), 1).ToShortDateString + txtFechaF.Text = NowADS().ToShortDateString ImgConciliacion.Visible = True LblTitulo.Text = "Conciliación Bancaria" End If @@ -99,7 +99,7 @@ Partial Class Bancos_RepIE CargaUsuarioConcilio() DdlUsuarioRegistro.DataSource = GlobalDTUsuarios(CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros("", DistinctColumns:={"Nombre", "CveUsuario"}) DdlUsuarioRegistro.databind - txtFechaI.Text = Now.ToShortDateString + txtFechaI.Text = NowADS().ToShortDateString DivDdlTarjeta.Visible = False DivLabelTarjeta.Visible = False @@ -159,7 +159,7 @@ Partial Class Bancos_RepIE End If If ChkTotalizar.Checked Then - Dim SaldoDolares As Decimal = DtDatos.SUMD("Importe", "CveMoneda = 2") * GlobalTipoCambio(Now).ToDecimal + Dim SaldoDolares As Decimal = DtDatos.SUMD("Importe", "CveMoneda = 2") * GlobalTipoCambio(NowADS()).ToDecimal SaldoTotal.Text = DtDatos.SUM("ImporteMN").ToString.FormatoNumero '(DtDatos.SUM("Importe") + SaldoDolares).ToString.FormatoNumero LtlSaldo.Text = DtDatos.SUM("Importe", "CveMoneda = 1").ToString.FormatoNumero LtlSaldoDolares.Text = DtDatos.SUM("Importe", "CveMoneda = 2").ToString.FormatoNumero @@ -176,7 +176,7 @@ Partial Class Bancos_RepIE If GvDatos.Rows.Count > 0 AndAlso TipoPagina = "Conciliaciones" Then BtnGuardar.Visible = True - GvDatos.HeaderRow.FCTextBox("TxtFechaAplicadoHeader").Text = DateAdd("d", -1, Date.Now).ToShortDateString + GvDatos.HeaderRow.FCTextBox("TxtFechaAplicadoHeader").Text = DateAdd("d", -1, NowADS()).ToShortDateString If AceptaOtrosIngresos Then Dim ObjProveedores As New ClsCompProveedores @@ -214,7 +214,7 @@ Partial Class Bancos_RepIE If Row.FCCheckBox("ChkFueConciliado").Checked <> CBool(Row.FCHiddenField("HdnConciliado").Value) Then If Not CBool(Row.FCHiddenField("HdnConciliado").Value) Then - If Row.FCTextBox("TxtFechaAplicado").Text.Trim.ToDate >= Row.FCLiteral("LtlFechaDocumento").Text.Trim.ToDate AndAlso Row.FCTextBox("TxtFechaAplicado").Text.Trim.ToDate < Date.Now Then ' + If Row.FCTextBox("TxtFechaAplicado").Text.Trim.ToDate >= Row.FCLiteral("LtlFechaDocumento").Text.Trim.ToDate AndAlso Row.FCTextBox("TxtFechaAplicado").Text.Trim.ToDate < NowADS() Then ' Fecha = Row.FCTextBox("TxtFechaAplicado").Text.Trim.ToDate Else FolioError = Row.DataKey("Folio").ToString @@ -348,7 +348,7 @@ Partial Class Bancos_RepIE e.Row.Cells(13).Style.Add("background-color", "#dddddd") e.Row.Cells(15).Style.Add("background-color", "#dddddd") If Not CBool(e.Row.DBCampo("FueConciliado").ToString) Then - e.Row.FCTextBox("TxtFechaAplicado").Text = If(TipoTrasaccion, e.Row.DBCampo("FechaDocumento"), DateAdd("d", -1, Date.Now).ToShortDateString) + e.Row.FCTextBox("TxtFechaAplicado").Text = If(TipoTrasaccion, e.Row.DBCampo("FechaDocumento"), DateAdd("d", -1, NowADS()).ToShortDateString) e.Row.FCTextBox("TxtFechaAplicado").Style.Add("display", "none") If AceptaOtrosIngresos Then e.Row.FCTextBox("TxtOtIng").Style.Add("display", "none") e.Row.FCCalendarExtender("Calendario").StartDate = e.Row.DBCampo("FechaDocumento").ToDate @@ -451,7 +451,7 @@ Partial Class Bancos_RepIE GvDatos.Columns(14).Visible = True 'visualizo la columna oculta de fecha aplicacion cuando es conciliacion GvDatos.Columns(15).Visible = False 'oculto columna de fecha de aplicacion, en modo de registro - GvDatos.ExportToExcel("ReporteSaldos" & Now.ToShortDateString) + GvDatos.ExportToExcel("ReporteSaldos" & NowADS().ToShortDateString) 'Imprimir("EXCEL") GvDatos.Columns(13).Visible = True GvDatos.Columns(14).Visible = False @@ -545,7 +545,7 @@ Partial Class Bancos_RepIE params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToString)) Dim ParametrosReporte As String = "Caja chica: " & DdlCuenta.SelectedItem.Text & " Fecha inicio: " & txtFechaI.Text & " Fecha fin: " & txtFechaF.Text diff --git a/Bancos/RepIngresosPorComprobar.aspx.vb b/Bancos/RepIngresosPorComprobar.aspx.vb index 9644a1792..7f88b0a8e 100644 --- a/Bancos/RepIngresosPorComprobar.aspx.vb +++ b/Bancos/RepIngresosPorComprobar.aspx.vb @@ -53,7 +53,7 @@ Partial Class Bancos_RepIngresosPorComprobar DdlMoneda.DataSource = GlobalDTMonedas DdlMoneda.DataBind() - TxtFecha.Text = Now.ToShortDateString + TxtFecha.Text = NowADS().ToShortDateString CargaDatos() diff --git a/Bancos/RepProgramaciones.aspx.vb b/Bancos/RepProgramaciones.aspx.vb index 0a7d19d3d..77b92bd02 100644 --- a/Bancos/RepProgramaciones.aspx.vb +++ b/Bancos/RepProgramaciones.aspx.vb @@ -44,10 +44,10 @@ Partial Class Bancos_RepProgramaciones Dim drBC As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("CveTipoCuenta = 7") If drBC IsNot Nothing Then CveCuenta = drBC("CveCuenta").ToString.ToEntero - Dim CveCredito As Integer = ObjCredito.AddCreditos(1, Gvr.DataKey("Folio"), "", CveCuenta, Gvr.DataKey("CveCompra").ToEntero, -1, 1, Now, Now, 0, 0, 0.16, 0, -1, Gvr.DataKey("Total").ToDouble, 0, 0, -1, Gvr.DataKey("CveProveedor").ToEntero, 1, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + Dim CveCredito As Integer = ObjCredito.AddCreditos(1, Gvr.DataKey("Folio"), "", CveCuenta, Gvr.DataKey("CveCompra").ToEntero, -1, 1, NowADS(), NowADS(), 0, 0, 0.16, 0, -1, Gvr.DataKey("Total").ToDouble, 0, 0, -1, Gvr.DataKey("CveProveedor").ToEntero, 1, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) If CveCredito > 0 Then - If Not ObjCredito.AddCreditosDetalle(CveCredito, Now, + If Not ObjCredito.AddCreditosDetalle(CveCredito, NowADS(), Gvr.DataKey("Total").ToDouble, 0, 0.0, 0, 0.0, 0.0, 101) Then ErrorCompra = True End If @@ -99,11 +99,11 @@ Partial Class Bancos_RepProgramaciones Dim drBC As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("CveTipoCuenta = 7") If drBC IsNot Nothing Then CveCuenta = drBC("CveCuenta").ToString.ToEntero - Dim CveCredito As Integer = ObjCredito.AddCreditos(1, Gvr.DataKey("Folio"), "", CveCuenta, Gvr.DataKey("CveCompra").ToEntero, -1, 1, Now, Now, 0, 0, 0.16, 0, + Dim CveCredito As Integer = ObjCredito.AddCreditos(1, Gvr.DataKey("Folio"), "", CveCuenta, Gvr.DataKey("CveCompra").ToEntero, -1, 1, NowADS(), NowADS(), 0, 0, 0.16, 0, -1, Gvr.DataKey("Total").ToDouble, 0, 0, -1, Gvr.DataKey("CveProveedor").ToEntero, 1, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) If CveCredito > 0 Then - If Not ObjCredito.AddCreditosDetalle(CveCredito, Now, + If Not ObjCredito.AddCreditosDetalle(CveCredito, NowADS(), Gvr.DataKey("Total").ToDouble, 0, 0.0, 0, 0.0, 0.0, 101) Then ErrorCompra = True End If @@ -152,11 +152,11 @@ Partial Class Bancos_RepProgramaciones Dim drBC As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("CveTipoCuenta = 7") If drBC IsNot Nothing Then CveCuenta = drBC("CveCuenta").ToString.ToEntero - Dim CveCredito As Integer = ObjCredito.AddCreditos(1, Gvr.DataKey("Folio"), "", CveCuenta, Gvr.DataKey("CveCompra").ToEntero, -1, 1, Now, Now, 0, 0, 0.16, 0, + Dim CveCredito As Integer = ObjCredito.AddCreditos(1, Gvr.DataKey("Folio"), "", CveCuenta, Gvr.DataKey("CveCompra").ToEntero, -1, 1, NowADS(), NowADS(), 0, 0, 0.16, 0, -1, Gvr.DataKey("Total").ToDouble, 0, 0, -1, Gvr.DataKey("CveProveedor").ToEntero, 1, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) If CveCredito > 0 Then - If Not ObjCredito.AddCreditosDetalle(CveCredito, Now, + If Not ObjCredito.AddCreditosDetalle(CveCredito, NowADS(), Gvr.DataKey("Total").ToDouble, 0, 0.0, 0, 0.0, 0.0, 101) Then ErrorCompra = True End If diff --git a/Bancos/RepProgramarRecursos.aspx.vb b/Bancos/RepProgramarRecursos.aspx.vb index 1b4313d6a..a64e834f9 100644 --- a/Bancos/RepProgramarRecursos.aspx.vb +++ b/Bancos/RepProgramarRecursos.aspx.vb @@ -795,7 +795,7 @@ Partial Class Bancos_RepProgramarRecursos 'params.Add(New ReportParameter("Agrupador", DdlAgrupador.SelectedValue)) 'params.Add(New ReportParameter("LogoUrl", String.Format("{0}/Empresas/{1}/Logo.png", Request.Url.AbsoluteUri.Replace(Request.Url.AbsolutePath, ""), UsuarioActual.CveEmpresa))) 'params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - 'params.Add(New ReportParameter("FechaImpresion", Now.ToShortDateString)) + 'params.Add(New ReportParameter("FechaImpresion", NowADS().ToShortDateString)) 'params.Add(New ReportParameter("AgrupadoPor", $"{Programo} {Proveedor} {Registro} {Responsable} {Clasificacion} {Moneda} {Estatus} {SubProyecto} {FechaIn} {FechaFn}")) 'ImprimirPDF("Empresas/Grales/Formatos/ProgramarRecursos.rdlc", DtDatos, params, "Programación de Recursos") End Sub @@ -868,7 +868,7 @@ Partial Class Bancos_RepProgramarRecursos params.Add(New ReportParameter("LogoUrl", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToShortDateString)) params.Add(New ReportParameter("AgrupadoPor", $"{Programo}{Proveedor}{Clasificacion}{AplicaNC}{TipoProv}{FechaIn}{FechaFn}{FechaInV}{FechaFnV}{Moneda}{Registro}{Responsable}{Estatus}{Proyecto}{SubProyecto}{Comprobacion}")) Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos\ProgramarRecursos.rdlc", UsuarioActual.Empresa.Ruta)) diff --git a/Bancos/RepProveedoresPagos.aspx.vb b/Bancos/RepProveedoresPagos.aspx.vb index 210523456..c753e1c40 100644 --- a/Bancos/RepProveedoresPagos.aspx.vb +++ b/Bancos/RepProveedoresPagos.aspx.vb @@ -306,7 +306,7 @@ Partial Class Bancos_RepProveedoresPagos params.Add(New ReportParameter("FechaInicio", FI)) params.Add(New ReportParameter("FechaFin", FF)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToString)) params.Add(New ReportParameter("AgrupadoPor", $"{Programo} {Proveedor} {Registro} {Responsable} {Clasificacion} {Moneda} {Estatus} {SubProyecto} {FechaIn} {FechaFn}{FVI}{FVF}")) params.Add(New ReportParameter("Programadas", If(ChkProgramadas.Checked, "1", "0"))) diff --git a/Bancos/RepSaldos.aspx.vb b/Bancos/RepSaldos.aspx.vb index 7e182632d..5cc179836 100644 --- a/Bancos/RepSaldos.aspx.vb +++ b/Bancos/RepSaldos.aspx.vb @@ -21,8 +21,8 @@ Partial Class Bancos_RepSaldos 'CargaBanco() CargaCuenta() DdlCuenta.Items.Insert(0, New ListItem("Todas", "-1")) - txtFechaI.Text = Now.FirstDayOfMonth().ToShortDateString - txtFechaF.Text = Now.LastDayOfMonth().ToShortDateString + txtFechaI.Text = NowADS().FirstDayOfMonth().ToShortDateString + txtFechaF.Text = NowADS().LastDayOfMonth().ToShortDateString CargaMoneda() CargaDatos() @@ -139,7 +139,7 @@ Partial Class Bancos_RepSaldos #Region " EXPORTA EXCEL " Protected Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click - ' GvS.ExportToExcel("ReporteSaldos" & Now.ToShortDateString) + ' GvS.ExportToExcel("ReporteSaldos" & NowADS().ToShortDateString) ImprimirReportePdf("Excel") End Sub @@ -191,7 +191,7 @@ Partial Class Bancos_RepSaldos params.Add(New ReportParameter("RFC", UsuarioActual.Empresa.RFC)) params.Add(New ReportParameter("DireccionEmpresa", UsuarioActual.Empresa.Direccion)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToString())) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToString())) params.Add(New ReportParameter("FechaInicio", FechaI)) params.Add(New ReportParameter("FechaFin", FechaF)) diff --git a/Bancos/RepSaldosDetalle.aspx.vb b/Bancos/RepSaldosDetalle.aspx.vb index 1be4ef330..6a67ea3b1 100644 --- a/Bancos/RepSaldosDetalle.aspx.vb +++ b/Bancos/RepSaldosDetalle.aspx.vb @@ -206,7 +206,7 @@ Partial Class Bancos_RepSaldosDetalle params.Add(New ReportParameter("RFC", UsuarioActual.Empresa.RFC)) params.Add(New ReportParameter("DireccionEmpresa", UsuarioActual.Empresa.Direccion)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToString())) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToString())) params.Add(New ReportParameter("FechaInicio", FechaI)) params.Add(New ReportParameter("FechaFin", FechaF)) @@ -251,8 +251,8 @@ Partial Class Bancos_RepSaldosDetalle 'End Sub 'Protected Sub ImgExcel_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs) Handles ImgExcel.Click - ' 'GvS.ExportToExcel("ReporteSaldos" & Now.ToShortDateString) - ' 'GvRepConciliaciones.ExportToExcel("ReporteConciliacionBancaria" & Now.ToShortDateString) + ' 'GvS.ExportToExcel("ReporteSaldos" & NowADS().ToShortDateString) + ' 'GvRepConciliaciones.ExportToExcel("ReporteConciliacionBancaria" & NowADS().ToShortDateString) ' ExportExcel() 'End Sub @@ -273,7 +273,7 @@ Partial Class Bancos_RepSaldosDetalle ' Excel.ScreenUpdating = True ' Excel.DisplayAlerts = True - ' Dim NombreArchivo = String.Format("Conciliacion-{0}-{1}", Cuenta, Date.Now.ToShortDateString.Replace("/", "")) + ' Dim NombreArchivo = String.Format("Conciliacion-{0}-{1}", Cuenta, NowADS().ToShortDateString.Replace("/", "")) ' Dim ArchivoBase As New System.IO.FileInfo(String.Format("{0}Formatos\ReporteConciliaciones.xlsm", UsuarioActual.Empresa.Ruta)) ' ArchivoBase.CopyTo(String.Format("{0}Formatos\{1}.xlsm", UsuarioActual.Empresa.Ruta, NombreArchivo), True) @@ -346,7 +346,7 @@ Partial Class Bancos_RepSaldosDetalle ' ArchivoTemp.Delete() ' Dim Descargas As New StringBuilder() - ' Descargas.AppendFormat("
  • PDF
  • ", UsuarioActual.CveEmpresa, NombreArchivo, now.Ticks) + ' Descargas.AppendFormat("
  • PDF
  • ", UsuarioActual.CveEmpresa, NombreArchivo, NowADS().Ticks) ' Alert(String.Format("
    El reporte se generó correctamente.


    Descargas:
      {0}
    ", Descargas), TipoMensaje.MsgInformacion) diff --git a/Bancos/RepSaldosPeriodo.aspx.cs b/Bancos/RepSaldosPeriodo.aspx.cs index f2c72eafc..48ebfeba1 100644 --- a/Bancos/RepSaldosPeriodo.aspx.cs +++ b/Bancos/RepSaldosPeriodo.aspx.cs @@ -36,7 +36,7 @@ public partial class Bancos_RepSaldosPeriodo : ClsPaginas TipoCambio = 1; TCEspecifico = -1; - txtFechaF.Text = DateTime.Now.LastDayOfMonth().ToShortDateString(); + txtFechaF.Text = NowADS().LastDayOfMonth().ToShortDateString(); DdlCuenta.DataSource = get_GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:UsuarioActual.CveEmpresa); DdlCuenta.DataBind(); @@ -103,7 +103,7 @@ public partial class Bancos_RepSaldosPeriodo : ClsPaginas List para = new List(); para.Add(new ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)); para.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)); - para.Add(new ReportParameter("FechaImpresion", DateTime.Now.ToString())); + para.Add(new ReportParameter("FechaImpresion", NowADS().ToString())); para.Add(new ReportParameter("Filtros", $"Filtros: {NoCuenta}{Moneda}{FechaCorte}{Agrupador}")); if (Imagen.Exists) { @@ -159,7 +159,7 @@ public partial class Bancos_RepSaldosPeriodo : ClsPaginas if (TipoCambio == 3) { LiEspecifico.Visible = true; - TCEspecifico = get_GlobalTipoCambio(DateTime.Now).ToString().ToDouble(); + TCEspecifico = get_GlobalTipoCambio(NowADS()).ToString().ToDouble(); TxtEspecifico.Text = TCEspecifico.ToString(); } else diff --git a/Bancos/SaldarCajaChica.aspx.cs b/Bancos/SaldarCajaChica.aspx.cs index 2225b90f7..6a2e5c05c 100644 --- a/Bancos/SaldarCajaChica.aspx.cs +++ b/Bancos/SaldarCajaChica.aspx.cs @@ -64,7 +64,7 @@ public partial class Bancos_SaldarCajaChica : ClsPaginas Boolean TieneError = false; decimal Importe = 0; - CvePrePoliza = ObjMov.AddPrePolizas("Compras/Comprobaciones", 9, 0, 0, 1, DateTime.Now, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa); + CvePrePoliza = ObjMov.AddPrePolizas("Compras/Comprobaciones", 9, 0, 0, 1, NowADS(), "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa); foreach (GridViewRow row in GvDatos.Rows) { @@ -78,7 +78,7 @@ public partial class Bancos_SaldarCajaChica : ClsPaginas Importe += row.DataKey("Saldo").ToDecimal(); String FolioIENew = ObjIE.GetNextFolio(CveCajaChica, 6).ToString(); - CveIEPago = ObjIE.AddBancos_IE(CveCajaChica, 6, DateTime.Now, FolioIENew, DdlCajaChica.SelectedItem.ToString(), TxtImporteIE, 1, 0.0, "SALDADA POR SISTEMA", "", false, true, -1, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa); + CveIEPago = ObjIE.AddBancos_IE(CveCajaChica, 6, NowADS(), FolioIENew, DdlCajaChica.SelectedItem.ToString(), TxtImporteIE, 1, 0.0, "SALDADA POR SISTEMA", "", false, true, -1, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa); if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, TxtImporte, TxtImporte, 30, DdlCajaChica.SelectedItem.ToString(),"SALDADA POR SISTEMA", CveIE: CveIEPago, CveIEDevolucion: row.DataKey("CveIE").ToEntero(), CvePrePolizaOriginal: CvePrePoliza)) { diff --git a/Bancos/Transferencias.aspx.vb b/Bancos/Transferencias.aspx.vb index e813dc9e2..16b0c62be 100644 --- a/Bancos/Transferencias.aspx.vb +++ b/Bancos/Transferencias.aspx.vb @@ -72,7 +72,7 @@ Partial Class Bancos_Transferencias CargaFolio(DdlCuentaOrigen.SelectedValue.ToEntero, DdlTipoMovto.SelectedValue.ToEntero) End If - TxtFechaDocumento.Text = Now.ToShortDateString + TxtFechaDocumento.Text = NowADS().ToShortDateString DdlTipoMovto_SelectedIndexChanged(Nothing, Nothing) @@ -364,23 +364,29 @@ Partial Class Bancos_Transferencias For Each row As GridViewRow In GvTC.Rows - FolioDestino = GetFolio(row.DataKey("CveCuenta").ToEntero, If(DdlTipoMovto.SelectedValue = "2", 8, 3), TransaccioSQL:=ObjIE.IniciaTransacSQL()) + If row.FCTextBox("TxtAbono").Text.ToDecimal > 0 Then + FolioDestino = GetFolio(row.DataKey("CveCuenta").ToEntero, If(DdlTipoMovto.SelectedValue = "2", 8, 3), TransaccioSQL:=ObjIE.IniciaTransacSQL()) - If FolioDestino.Trim.Length = 0 Then - MsgError = "Ocurrio un error al obtener el folio destino." - Exit For + If FolioDestino.Trim.Length = 0 Then + MsgError = "Ocurrio un error al obtener el folio destino." + Exit For + End If + + Dim PagueseA As String = $"Transferencia Cta: {If(DdlCuentaOrigen.SelectedItem Is Nothing, DdlCuentaDestino.SelectedItem.Text, DdlCuentaOrigen.SelectedItem.Text)}" + + CveIEDestino = ObjIE.AddBancos_IE(row.DataKey("CveCuenta").ToEntero, If(DdlTipoMovto.SelectedValue = "2", 8, 3), TxtFechaDocumento.Text.Trim.ToDate, FolioDestino, PagueseA, row.FCTextBox("TxtAbono").Text.ToDecimal, CveMonedaDestino, TipoCambio, TxtObservaciones.Text.Trim, "", False, False, -1, CvePrePoliza, Comprobante, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovtoDetalle, row.FCTextBox("TxtAbono").Text.ToDecimal, row.FCTextBox("TxtAbono").Text.ToDecimal, 30, + $"Transferencia entre cuentas {TxtObservaciones.Text}", $"Transferencia entre cuentas {TxtObservaciones.Text}", + CveIE:=CveIEDestino) Then + + MsgError = "Ocurrio un error al ingresar la prepoliza" + Exit For + Else + AlertaGlobal.AppendFormat("{1}
    ", CveIEDestino, FolioDestino) + End If End If - CveIEDestino = ObjIE.AddBancos_IE(row.DataKey("CveCuenta").ToEntero, If(DdlTipoMovto.SelectedValue = "2", 8, 3), TxtFechaDocumento.Text.Trim.ToDate, FolioDestino, String.Format("Transferencia Cta: {0}", DdlCuentaOrigen.SelectedItem.Text), row.FCTextBox("TxtAbono").Text.ToDecimal, CveMonedaDestino, TipoCambio, TxtObservaciones.Text.Trim, "", False, False, -1, CvePrePoliza, Comprobante, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) - If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovtoDetalle, row.FCTextBox("TxtAbono").Text.ToDecimal, row.FCTextBox("TxtAbono").Text.ToDecimal, 30, - $"Transferencia entre cuentas {TxtObservaciones.Text}", $"Transferencia entre cuentas {TxtObservaciones.Text}", - CveIE:=CveIEDestino) Then - MsgError = "Ocurrio un error al ingresar la prepoliza" - Exit For - Else - AlertaGlobal.AppendFormat("{1}
    ", CveIEDestino, FolioDestino) - End If Next diff --git a/CGame/AsignacionEmpaque.aspx.cs b/CGame/AsignacionEmpaque.aspx.cs index 59cdd1b65..fc4331e0c 100644 --- a/CGame/AsignacionEmpaque.aspx.cs +++ b/CGame/AsignacionEmpaque.aspx.cs @@ -372,7 +372,7 @@ public partial class CGame_AsignacionEmpaque : ClsPaginas para.Add(new ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)); para.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)); - para.Add(new ReportParameter("FechaImpresion", DateTime.Now.ToString())); + para.Add(new ReportParameter("FechaImpresion", NowADS().ToString())); para.Add(new ReportParameter("Huerta", DdlHuerta.SelectedItem.Text)); para.Add(new ReportParameter("Fruto", DdlFruto.SelectedItem.Text)); diff --git a/CGame/AsignacionEmpaque2.aspx.cs b/CGame/AsignacionEmpaque2.aspx.cs index 39d1f632a..1f404259f 100644 --- a/CGame/AsignacionEmpaque2.aspx.cs +++ b/CGame/AsignacionEmpaque2.aspx.cs @@ -518,7 +518,7 @@ public partial class CGame_AsignacionEmpaque2 : ClsPaginas para.Add(new ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)); para.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)); - para.Add(new ReportParameter("FechaImpresion", DateTime.Now.ToString())); + para.Add(new ReportParameter("FechaImpresion", NowADS().ToString())); para.Add(new ReportParameter("Huerta", DdlHuerta.SelectedItem.Text)); para.Add(new ReportParameter("Fruto", DdlFruto.SelectedItem.Text)); diff --git a/CGame/CatCGameClientes.aspx.vb b/CGame/CatCGameClientes.aspx.vb index 32588f93f..4d65285a0 100644 --- a/CGame/CatCGameClientes.aspx.vb +++ b/CGame/CatCGameClientes.aspx.vb @@ -132,7 +132,7 @@ Partial Class CGame_CatCGameClientes Dim cliente As String = TxtCGamcliente.Text Dim estatus As Boolean = ChkCGamestatus.Checked - Dim fechaIng As DateTime = Now + Dim fechaIng As DateTime = NowADS() Dim cveUsuario As Int32 = UsuarioActual.CveUsuario Dim cveEmpresa As Int32 = UsuarioActual.CveEmpresa Dim ObjCGam As New ClsCGame() @@ -159,7 +159,7 @@ Partial Class CGame_CatCGameClientes Dim cveUsuario As Int32 = UsuarioActual.CveUsuario Dim ObjCGam As New ClsCGame() ObjCGam.IniciaTransacSQL() - Dim Continuar As Boolean = ObjCGam.UpdateCliente(CveCliente, cliente, estatus, DateTime.Now, cveUsuario, UsuarioActual.CveEmpresa) + Dim Continuar As Boolean = ObjCGam.UpdateCliente(CveCliente, cliente, estatus, NowADS(), cveUsuario, UsuarioActual.CveEmpresa) Continuar = ObjCGam.RemoveCargoFijoCliente(CveCliente) For Each Dr As DataRow In DtCargosFijos.Rows Continuar = ObjCGam.AddCargoFijoCliente(Dr("CveCargoFijo").ToString.ToEntero, CveCliente, Dr("Importe").ToString.ToDouble) diff --git a/CGame/CatHuerta.aspx b/CGame/CatHuerta.aspx index 1c2590f53..94527050c 100644 --- a/CGame/CatHuerta.aspx +++ b/CGame/CatHuerta.aspx @@ -71,7 +71,7 @@ - + @@ -86,12 +86,12 @@ - + - + @@ -116,7 +116,7 @@ - + @@ -163,7 +163,7 @@
    - +
    diff --git a/CGame/CatHuerta.aspx.cs b/CGame/CatHuerta.aspx.cs index 4041dd853..b5fc61ddb 100644 --- a/CGame/CatHuerta.aspx.cs +++ b/CGame/CatHuerta.aspx.cs @@ -9,21 +9,32 @@ ddlOrigen.DataSource = ogame.DtResultados; ddlOrigen.DataBind(); } - ClsCompProveedores ObjProv = new ClsCompProveedores(); if (ObjProv.GetProveedores(ClsCompProveedores.TipoConsulta.ParaUsoEnEmpresa, -1, "-1", "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa)) - { - DdlProveedor.DataSource = ObjProv.DtResultados; - DdlProveedor.Items.Insert(0, new ListItem("Seleccione", "-1")); - DdlProveedor.DataBind(); - if (DdlProveedor.Items.Count > 2) - { - DdlProveedor.SelectedIndex = 2; - } - } ObjProv.Dispose(); } protected void LimpiaHuerta() { TxtHuerhuerta.Text= ""; TxtImporte.Text = ""; TxtCostoXTonelada.Text = ""; DdlProveedor.SelectedIndex = 0; - if (DdlProveedor.Items.Count > 2) - { - DdlProveedor.SelectedIndex = 2; - } DdlTipoCobro.SelectedIndex = 0; UPModalHuer.Update(); } protected void LnkEditarHuer_Click(object sender, EventArgs e) { LimpiaHuerta(); GridViewRow gvRow = (GridViewRow)(((LinkButton)sender).NamingContainer); CveHuerta = gvRow.DataKey("CveHuerta").ToEntero(); TxtHuerhuerta.Text = gvRow.DataKey("Huerta"); TxtImporte.Text = gvRow.DataKey("Importe"); TxtCostoXTonelada.Text = gvRow.DataKey("CostoXTonelada"); TxtNombreRegistro.Text = gvRow.DataKey("NombreRegistro"); - TxtNumeroRegistro.Text = gvRow.DataKey("NumeroRegistro"); DdlProveedor.SelectedValueExist(gvRow.DataKey("CveProveedor").ToEntero()); DdlTipoCobro.SelectedValueExist(gvRow.DataKey("TipoCobro").ToEntero()); ChkHuerestatus.Checked= Convert.ToBoolean(gvRow.DataKey("Estatus")); RegistraScript("$('#DModalHuerta').modal();"); BtnHuerADD.Visible=false; BtnHuerEdit.Visible=true; DivEstatus.Visible = true; UPModalHuer.Update(); } protected void LnkAgregarHuer_Click(object sender, EventArgs e) { RegistraScript("$('#DModalHuerta').modal();"); LimpiaHuerta(); BtnHuerADD.Visible=true; BtnHuerEdit.Visible=false; DivEstatus.Visible = false; UPModalHuer.Update(); } protected void BtnHuerADD_Click(object sender, EventArgs e) { if (DdlProveedor.SelectedValue=="-1") + // ClsCompProveedores ObjProv = new ClsCompProveedores(); //if (ObjProv.GetProveedores(ClsCompProveedores.TipoConsulta.ParaUsoEnEmpresa, -1, "-1", "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa)) + //{ + // DdlProveedor.DataSource = ObjProv.DtResultados; + // //DdlProveedor.Items.Insert(0, new ListItem("Seleccione", "-1")); + // DdlProveedor.DataBind(); + // if (DdlProveedor.Items.Count > 2) + // { + // DdlProveedor.SelectedIndex = 2; + // } + //} //ObjProv.Dispose(); } protected void LimpiaHuerta() { TxtHuerhuerta.Text= ""; TxtImporte.Text = ""; TxtCostoXTonelada.Text = ""; //DdlProveedor.SelectedIndex = 0; + //if (DdlProveedor.Items.Count > 2) + //{ + // DdlProveedor.SelectedIndex = 2; + //} DdlTipoCobro.SelectedIndex = 0; UPModalHuer.Update(); } protected void LnkEditarHuer_Click(object sender, EventArgs e) { LimpiaHuerta(); GridViewRow gvRow = (GridViewRow)(((LinkButton)sender).NamingContainer); CveHuerta = gvRow.DataKey("CveHuerta").ToEntero(); TxtHuerhuerta.Text = gvRow.DataKey("Huerta"); TxtImporte.Text = gvRow.DataKey("Importe"); TxtCostoXTonelada.Text = gvRow.DataKey("CostoXTonelada"); TxtNombreRegistro.Text = gvRow.DataKey("NombreRegistro"); + TxtNumeroRegistro.Text = gvRow.DataKey("NumeroRegistro"); + + //DdlProveedor.SelectedValue = objOC.CveProveedor.ToString + // if (gvRow.DataKey("CveProveedor").ToEntero() > 0) + // { + // DdlProveedor.SelectedValueExist(gvRow.DataKey("CveProveedor").ToEntero()); + //} + // CveProveedorOriginal = objOC.CveProveedor + // DdlProveedores.SelectedText = GlobalDTCompProveedores(UsuarioActual.CveEmpresa).FiltraParametros($"CveProveedor = {objOC.CveProveedor}").Rows(0)("RazonSocial").ToString + //Else + // DdlProveedores.SelectedText = "-" + //End If DdlTipoCobro.SelectedValueExist(gvRow.DataKey("TipoCobro").ToEntero()); ChkHuerestatus.Checked= Convert.ToBoolean(gvRow.DataKey("Estatus")); RegistraScript("$('#DModalHuerta').modal();"); BtnHuerADD.Visible=false; BtnHuerEdit.Visible=true; DivEstatus.Visible = true; UPModalHuer.Update(); } protected void LnkAgregarHuer_Click(object sender, EventArgs e) { RegistraScript("$('#DModalHuerta').modal();"); LimpiaHuerta(); BtnHuerADD.Visible=true; BtnHuerEdit.Visible=false; DivEstatus.Visible = false; UPModalHuer.Update(); } protected void BtnHuerADD_Click(object sender, EventArgs e) { if (DdlProveedor.SelectedValue=="-1") { Alert("Tiene que seleccionar un proveedor."); return; diff --git a/CGame/CatTipoEmpaque.aspx.vb b/CGame/CatTipoEmpaque.aspx.vb index 1d28be033..94d320c84 100644 --- a/CGame/CatTipoEmpaque.aspx.vb +++ b/CGame/CatTipoEmpaque.aspx.vb @@ -104,7 +104,7 @@ Partial Class CGame_CatTipoEmpaque Dim tipoEmpaque As String = TxtCGamtipoEmpaque.Text Dim estatus As Boolean = ChkCGamestatus.Checked - Dim fechaIng As DateTime = Now + Dim fechaIng As DateTime = NowADS() Dim cveUsuario As Int32 = UsuarioActual.CveUsuario Dim cveEmpresa As Int32 = UsuarioActual.CveEmpresa Dim ObjCGam As New ClsCGame() @@ -122,7 +122,7 @@ Partial Class CGame_CatTipoEmpaque Dim tipoEmpaque As String = TxtCGamtipoEmpaque.Text Dim estatus As Boolean = ChkCGamestatus.Checked - Dim fechaIng As DateTime = Now + Dim fechaIng As DateTime = NowADS() Dim cveUsuario As Int32 = UsuarioActual.CveUsuario Dim cveEmpresa As Int32 = UsuarioActual.CveEmpresa Dim ObjCGam As New ClsCGame() diff --git a/CGame/CatTipoMaduracion.aspx.vb b/CGame/CatTipoMaduracion.aspx.vb index eece2936c..8ad704cdb 100644 --- a/CGame/CatTipoMaduracion.aspx.vb +++ b/CGame/CatTipoMaduracion.aspx.vb @@ -111,7 +111,7 @@ Partial Class CGame_CatTipoMaduracion Dim tipoMaduracion As String = TxtCGamtipoMaduracion.Text Dim estatus As Boolean = ChkCGamestatus.Checked - Dim fechaIng As DateTime = Now + Dim fechaIng As DateTime = NowADS() Dim cveUsuario As Int32 = UsuarioActual.CveUsuario Dim cveEmpresa As Int32 = UsuarioActual.CveEmpresa Dim ObjCGam As New ClsCGame() @@ -129,7 +129,7 @@ Partial Class CGame_CatTipoMaduracion Dim tipoMaduracion As String = TxtCGamtipoMaduracion.Text Dim estatus As Boolean = ChkCGamestatus.Checked - Dim fechaIng As DateTime = Now + Dim fechaIng As DateTime = NowADS() Dim cveUsuario As Int32 = UsuarioActual.CveUsuario Dim cveEmpresa As Int32 = UsuarioActual.CveEmpresa Dim ObjCGam As New ClsCGame() diff --git a/CGame/CorteGasto.aspx.cs b/CGame/CorteGasto.aspx.cs index 2106cd00e..7b3c1e1d1 100644 --- a/CGame/CorteGasto.aspx.cs +++ b/CGame/CorteGasto.aspx.cs @@ -59,8 +59,8 @@ public partial class CGame_CorteGasto : ClsPaginas else { - TxtFechaRegistro.Text = DateTime.Now.ToShortDateString(); - txtFechaI.Text = DateTime.Now.ToShortDateString(); + TxtFechaRegistro.Text = NowADS().ToShortDateString(); + txtFechaI.Text = NowADS().ToShortDateString(); lblNombreUsuario.Text = UsuarioActual.Usuario; UpDatosCorteGasto.Update(); UpDatosRegistro.Update(); @@ -139,9 +139,9 @@ public partial class CGame_CorteGasto : ClsPaginas protected void Limpia() { - TxtFechaRegistro.Text = DateTime.Now.ToShortDateString(); + TxtFechaRegistro.Text = NowADS().ToShortDateString(); lblNombreUsuario.Text = UsuarioActual.Usuario; - TxtFechaRegistro.Text = DateTime.Now.ToShortDateString(); + TxtFechaRegistro.Text = NowADS().ToShortDateString(); DdlOrdenCorte.SelectedIndex = 0; UpDatosCorteGasto.Update(); UpDatosRegistro.Update(); diff --git a/CGame/Empaque.aspx.cs b/CGame/Empaque.aspx.cs index de1fa8c1b..2c989aba7 100644 --- a/CGame/Empaque.aspx.cs +++ b/CGame/Empaque.aspx.cs @@ -704,7 +704,7 @@ public partial class Empaque : ClsPaginas DdlTipoEmpaque.SelectedIndex = 0; CargaTipoMaduracion(DdlPS.SelectedValue.ToEntero()); DdlTipoProducto.SelectedIndex = 0; - TxtFecha.Text = DateTime.Now.ToString(); + TxtFecha.Text = NowADS().ToString(); TxtPeso.Text = ""; TxtCantidad.Text = ""; DdlCalidad.SelectedIndex = 0; @@ -717,8 +717,8 @@ public partial class Empaque : ClsPaginas { DdlHuerta.SelectedValue = "-1"; lblNombreUsuario.Text = UsuarioActual.Nombre; - TxtFechaRegistro.Text = DateTime.Now.ToShortDateString(); - TxtFecha.Text = DateTime.Now.ToString(); + TxtFechaRegistro.Text = NowADS().ToShortDateString(); + TxtFecha.Text = NowADS().ToString(); CargaFolio(); LimpiarGvCorteShowHeader(); LimpiarGvResultadoShowHeader(); @@ -959,7 +959,7 @@ public partial class Empaque : ClsPaginas ClsInventarios ObjInv = new ClsInventarios(ObjProd.IniciaTransacSQL()); var CveAlmacen = DdlAlmacen.SelectedValue.ToEntero(); var Concepto = 3; - var Fecha = DateTime.Now; + var Fecha = NowADS(); var CveCorte = 0; StringBuilder MensajeExistencias = new StringBuilder(); var ExistenciaActual = 0.0; @@ -1284,7 +1284,7 @@ public partial class Empaque : ClsPaginas List para = new List(); para.Add(new ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)); para.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)); - para.Add(new ReportParameter("FechaImpresion", DateTime.Now.ToString())); + para.Add(new ReportParameter("FechaImpresion", NowADS().ToString())); para.Add(new ReportParameter("Folio", Folio)); para.Add(new ReportParameter("Huerta", DdlHuerta.SelectedItem.Text)); para.Add(new ReportParameter("Observaciones", TxtObservacion.Text)); diff --git a/CGame/EntradaMateriaPrima.aspx.cs b/CGame/EntradaMateriaPrima.aspx.cs index 54d0fb485..32e4e81f1 100644 --- a/CGame/EntradaMateriaPrima.aspx.cs +++ b/CGame/EntradaMateriaPrima.aspx.cs @@ -31,8 +31,8 @@ public partial class CATCorte : ClsPaginas { { CveOrdenCorte = Request["CveOrdenCorte"] == null ? -1 : Request["CveOrdenCorte"].ToString().ToEntero(); CveHuerta = Request["CveHuerta"] == null ? 0 : Request["CveHuerta"].ToString().ToEntero(); - txtFechaI.Text = DateTime.Now.AddMonths(-1).ToShortDateString(); - txtFechaF.Text = DateTime.Now.ToShortDateString(); + txtFechaI.Text = NowADS().AddMonths(-1).ToShortDateString(); + txtFechaF.Text = NowADS().ToShortDateString(); CargaMotivo(); CargaOrdenCorte(); CargaHuerta(); CargaEmpaque(); CargaBitacora(); CargaFletes(); @@ -143,7 +143,7 @@ public partial class CATCorte : ClsPaginas { #endregion #region Limpia Modal protected void LimpiaCorte() { - TxtFecha.Text = DateTime.Now.ToString(); TxtPeso.Text = ""; + TxtFecha.Text = NowADS().ToString(); TxtPeso.Text = ""; DdlOrdenCorte.SelectedIndex = 0; TxtObservacion.Text = ""; TxtModalAdjuntoArchivo.Text = ""; TxtTicketBascula.Text = ""; TxtPesoMerma.Text = ""; DdlMotivo.SelectedIndex = 0; DdlFlete.SelectedIndex = 0; DdlEmpaque.SelectedIndex = 0; UPModalCort.Update(); } @@ -413,7 +413,7 @@ public partial class CATCorte : ClsPaginas { List para = new List(); para.Add(new ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)); para.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)); - para.Add(new ReportParameter("FechaImpresion", DateTime.Now.ToString())); + para.Add(new ReportParameter("FechaImpresion", NowADS().ToString())); para.Add(new ReportParameter("FolioOC",Dt.Rows[0]["FolioOC"].ToString())); para.Add(new ReportParameter("TicketBascula", Dt.Rows[0]["TicketBascula"].ToString())); para.Add(new ReportParameter("Peso", Dt.Rows[0]["Peso"].ToString().FormatoNumero())); diff --git a/CGame/Fletes.aspx.cs b/CGame/Fletes.aspx.cs index 12d1cad18..a3d898b74 100644 --- a/CGame/Fletes.aspx.cs +++ b/CGame/Fletes.aspx.cs @@ -88,8 +88,8 @@ public partial class CGame_Fletes : ClsPaginas protected void InicializaValores() { - TxtFiltrosFechaInicio.Text = DateTime.Now.FirstDayOfMonth().ToShortDateString(); - TxtFiltrosFechaFin.Text = DateTime.Now.ToShortDateString(); + TxtFiltrosFechaInicio.Text = NowADS().FirstDayOfMonth().ToShortDateString(); + TxtFiltrosFechaFin.Text = NowADS().ToShortDateString(); CveOrdenCorteOpcion = Request["CveOrdenCorte"] == null ? 0 : Request["CveOrdenCorte"].ToString().ToEntero(); CveOrdenProduccionOpcion = Request["CveOrdenProduccion"] == null ? 0 : Request["CveOrdenProduccion"].ToString().ToEntero(); CveHuerta = Request["CveHuerta"] == null ? 0 : Request["CveHuerta"].ToString().ToEntero(); @@ -275,7 +275,7 @@ public partial class CGame_Fletes : ClsPaginas TxtChofer.Text = ""; TxtColor.Text = ""; TxtPlaca.Text = ""; - TxtFecha.Text = DateTime.Now.ToString(); + TxtFecha.Text = NowADS().ToString(); ChkConCruce.Checked = false; ChkCalculaImporte.Checked = false; UpModalFleteAdd.Update(); @@ -475,7 +475,7 @@ public partial class CGame_Fletes : ClsPaginas if (DdlTipo.SelectedValue == "1" && DdlTipoFlete.SelectedValue == "2") { int CveCorteGasto = 0; - if (ObjCGame.AddCorteGasto(CveOrdenCorte, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DateTime.Now, 0.0)) + if (ObjCGame.AddCorteGasto(CveOrdenCorte, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, NowADS(), 0.0)) { CveCorteGasto = ObjCGame.CveCorteGasto; if (ObjCGame.AddCorteGastoDetalle(CveCorteGasto, 16, 1, TxtImporte.Text.ToDouble()) == false) @@ -1002,7 +1002,7 @@ public partial class CGame_Fletes : ClsPaginas worksheet.Rows[IndexEndTable + 1].Cells[2].Value = Usuario.Nombre; worksheet.Rows[IndexEndTable].Cells[6].Value = "Fecha Impresión"; - worksheet.Rows[IndexEndTable + 1].Cells[6].Value = DateTime.Now.ToString("dd/MM/yyyy"); + worksheet.Rows[IndexEndTable + 1].Cells[6].Value = NowADS().ToString("dd/MM/yyyy"); } } htw.Dispose(); diff --git a/CGame/GenerarOrdenCorte.aspx.cs b/CGame/GenerarOrdenCorte.aspx.cs index 52917b5e7..bb17f04b4 100644 --- a/CGame/GenerarOrdenCorte.aspx.cs +++ b/CGame/GenerarOrdenCorte.aspx.cs @@ -109,7 +109,7 @@ public partial class CGame_GenerarOrdenCorte : ClsPaginas protected void LimpiaModal() { - TxtFechaCorte.Text = DateTime.Now.ToShortDateString(); + TxtFechaCorte.Text = NowADS().ToShortDateString(); DdlHuerta.SelectedIndex = 0; TxtCuadro.Text = ""; TxtPeso.Text = ""; diff --git a/CGame/Liquidacion.aspx.cs b/CGame/Liquidacion.aspx.cs index e57a6ba03..39055f314 100644 --- a/CGame/Liquidacion.aspx.cs +++ b/CGame/Liquidacion.aspx.cs @@ -227,8 +227,8 @@ public partial class CGame_Liquidacion : ClsPaginas private void InicializaValores() { CargaHuerta(); - txtFechaI.Text = DateTime.Now.FirstDayOfMonth().ToShortDateString(); - txtFechaF.Text = DateTime.Now.ToShortDateString(); + txtFechaI.Text = NowADS().FirstDayOfMonth().ToShortDateString(); + txtFechaF.Text = NowADS().ToShortDateString(); UPFiltros.Update(); } @@ -279,7 +279,7 @@ public partial class CGame_Liquidacion : ClsPaginas List para = new List(); para.Add(new ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)); para.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)); - para.Add(new ReportParameter("FechaImpresion", DateTime.Now.ToString())); + para.Add(new ReportParameter("FechaImpresion", NowADS().ToString())); para.Add(new ReportParameter("Huerta", DdlHuerta.SelectedItem.Text)); para.Add(new ReportParameter("TotPrecioPri", TotIngresosPri.FormatoNumero())); para.Add(new ReportParameter("TotPrecioSeg", TotIngresosSeg.FormatoNumero())); diff --git a/CGame/OrdenProduccion.aspx.vb b/CGame/OrdenProduccion.aspx.vb index 6556d3e22..27f74b826 100644 --- a/CGame/OrdenProduccion.aspx.vb +++ b/CGame/OrdenProduccion.aspx.vb @@ -226,7 +226,7 @@ Partial Class CGame_OrdenProduccion #Region "CARGAS" Protected Sub CargaDatos() - TxtFechaFlete.Text = Now.AddDays(0).ToShortDateString + TxtFechaFlete.Text = NowADS().AddDays(0).ToShortDateString If CveOrdenProduccion > -1 Then Dim ObjOP As New ClsCGame() If ObjOP.GetOrdenProduccion(CveOrdenProduccion, UsuarioActual.CveEmpresa, -1, "-1", MinFecha, MaxFecha, -1) Then @@ -918,7 +918,7 @@ Partial Class CGame_OrdenProduccion Protected Sub LnkEditarMasivo_Click(sender As Object, e As EventArgs) RegistraScript("$('#DivUpdateMasivo').modal()") - TxtFechaUpdate.Text = Now.ToShortDateString() + TxtFechaUpdate.Text = NowADS().ToShortDateString() UpMasivo.Update() End Sub @@ -982,8 +982,8 @@ Partial Class CGame_OrdenProduccion Protected Sub LimpiaPagina() lblNombreUsuario.Text = UsuarioActual.Nombre - TxtFecha.Text = Now.AddDays(0).ToShortDateString - TxtFechaEntrega.Text = Now.AddDays(0).ToShortDateString + TxtFecha.Text = NowADS().AddDays(0).ToShortDateString + TxtFechaEntrega.Text = NowADS().AddDays(0).ToShortDateString TxtObservacion.Text = "" DdlCliente.SelectedValue = "-1" UPDatosOrden.Update() @@ -1117,7 +1117,7 @@ Partial Class CGame_OrdenProduccion 'Protected Sub GvOrdenCorte_RowDataBound(sender As Object, e As GridViewRowEventArgs) ' If e.Row.RowType = DataControlRowType.DataRow Then ' If CveOrdenProduccion > 0 Then - ' e.Row.FCTextBox("TxtFechaCorte").Text = Date.Now.ToShortDateString() + ' e.Row.FCTextBox("TxtFechaCorte").Text = NowADS().ToShortDateString() ' Dim ObjCGame As New ClsCGame ' If ObjCGame.GetHuerta(UsuarioActual.CveEmpresa) Then ' e.Row.FCDropDownList("DdlHuerta").DataSource = ObjCGame.DtResultados @@ -1176,8 +1176,8 @@ Partial Class CGame_OrdenProduccion Private Sub BtnCreaPartir_Click(sender As Object, e As EventArgs) Handles BtnCreaPartir.Click CargaFolio() lblNombreUsuario.Text = UsuarioActual.Nombre - TxtFecha.Text = Now.AddDays(0).ToShortDateString - TxtFechaEntrega.Text = Now.AddDays(0).ToShortDateString + TxtFecha.Text = NowADS().AddDays(0).ToShortDateString + TxtFechaEntrega.Text = NowADS().AddDays(0).ToShortDateString TrEstatus.Visible = False CveOrdenProduccion = -1 LnkEliminarOrdenProduccion.Visible = False @@ -1251,7 +1251,7 @@ Partial Class CGame_OrdenProduccion ' DrNew("Peso") = 0.0 ' DrNew("Cuadro") = 0 ' DrNew("Observacion") = "" - ' DrNew("FechaCorte") = Date.Now.ToShortDateString + ' DrNew("FechaCorte") = NowADS().ToShortDateString ' DtDetalleCorte.Rows.InsertAt(DrNew, Index) ' DtDetalleCorte.AcceptChanges() @@ -1660,7 +1660,7 @@ Partial Class CGame_OrdenProduccion TxtNombreManifiesto.Text = "" TxtDireccionManifiesto.Text = "" TxtCiudadManifiesto.Text = "" - TxtFechaManifiesto.Text = Now.ToShortDateString() + TxtFechaManifiesto.Text = NowADS().ToShortDateString() UpManifiesto.Update() End Sub @@ -1681,7 +1681,7 @@ Partial Class CGame_OrdenProduccion 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("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("Folio", ObjCGame.DtResultados.Rows(0)("Folio").ToString)) params.Add(New ReportParameter("Nombre", ObjCGame.DtResultados.Rows(0)("Nombre").ToString)) params.Add(New ReportParameter("Direccion", ObjCGame.DtResultados.Rows(0)("Direccion").ToString)) @@ -1696,7 +1696,7 @@ Partial Class CGame_OrdenProduccion params.Add(New ReportParameter("CantidadConLetra", Texto2Letras(Dt.SUM("Importe").ToString.ToDouble, 2))) End If End If - ImprimirPDF("Empresas/Grales/Formatos/Manifiesto.rdlc", Dt, params, String.Format("Manifiesto -{0}", Now.ToDateTime.ToShortDateString)) + ImprimirPDF("Empresas/Grales/Formatos/Manifiesto.rdlc", Dt, params, String.Format("Manifiesto -{0}", NowADS().ToDateTime.ToShortDateString)) Else Alert("No se encontraron resultados", TipoMensaje.MsgAdvertencia) End If diff --git a/CGame/PopUpBuscarCorteGasto.aspx.cs b/CGame/PopUpBuscarCorteGasto.aspx.cs index d7c7ee027..4fa90fb89 100644 --- a/CGame/PopUpBuscarCorteGasto.aspx.cs +++ b/CGame/PopUpBuscarCorteGasto.aspx.cs @@ -14,8 +14,8 @@ public partial class CGame_PopUpBuscarProduccion :ClsPaginas if (!IsPostBack) { ((BaseMasterPage) this.Master).EsPopup = true; - TxtFechaEntregaI.Text = DateTime.Now.ToString(); - TxtFechaEntregaF.Text = DateTime.Now.ToString(); + TxtFechaEntregaI.Text = NowADS().ToString(); + TxtFechaEntregaF.Text = NowADS().ToString(); CargaHuerta(); } diff --git a/CGame/PopUpBuscarEmpaque.aspx.cs b/CGame/PopUpBuscarEmpaque.aspx.cs index e6e304158..50c44b797 100644 --- a/CGame/PopUpBuscarEmpaque.aspx.cs +++ b/CGame/PopUpBuscarEmpaque.aspx.cs @@ -7,8 +7,8 @@ public partial class CGame_PopUpBuscarProduccion :ClsPaginas if (!IsPostBack) { ((BaseMasterPage) this.Master).EsPopup = true; - TxtFechaEntregaI.Text = DateTime.Now.ToString(); - TxtFechaEntregaF.Text = DateTime.Now.ToString(); + TxtFechaEntregaI.Text = NowADS().ToString(); + TxtFechaEntregaF.Text = NowADS().ToString(); CargaHuerta(); } diff --git a/CGame/PopUpBuscarOrdenProduccion.aspx.vb b/CGame/PopUpBuscarOrdenProduccion.aspx.vb index ce1cd631e..4df68e1fd 100644 --- a/CGame/PopUpBuscarOrdenProduccion.aspx.vb +++ b/CGame/PopUpBuscarOrdenProduccion.aspx.vb @@ -8,8 +8,8 @@ Partial Class CGame_PopUpBuscarOrdenProduccion Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not IsPostBack Then CType(Me.Master, BaseMasterPage).EsPopup = True - TxtFechaEntregaI.Text = Now.AddDays(0).ToShortDateString - TxtFechaEntregaF.Text = Now.AddDays(0).ToShortDateString + TxtFechaEntregaI.Text = NowADS().AddDays(0).ToShortDateString + TxtFechaEntregaF.Text = NowADS().AddDays(0).ToShortDateString CargaCliente() CargaEstatus() End If diff --git a/CGame/RepAvance.aspx.cs b/CGame/RepAvance.aspx.cs index 2674fee72..2bbb2818e 100644 --- a/CGame/RepAvance.aspx.cs +++ b/CGame/RepAvance.aspx.cs @@ -221,7 +221,7 @@ public partial class CGame_RepAvance : ClsPaginas // List para = new List(); // para.Add(new ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)); // para.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)); - // para.Add(new ReportParameter("FechaImpresion", DateTime.Now.ToString())); + // para.Add(new ReportParameter("FechaImpresion", NowADS().ToString())); // para.Add(new ReportParameter("Huerta", DdlHuerta.SelectedItem.Text)); // para.Add(new ReportParameter("UtilidadPrimera", (TotIngresosPrimera - TotGastosPrimera).FormatoNumero())); // para.Add(new ReportParameter("UtilidadSegunda", (TotIngresosSegunda - TotGastosSegunda).FormatoNumero())); diff --git a/CGame/RepCorte.aspx.cs b/CGame/RepCorte.aspx.cs index 2fa15bc8d..b258a0fd0 100644 --- a/CGame/RepCorte.aspx.cs +++ b/CGame/RepCorte.aspx.cs @@ -18,8 +18,8 @@ public partial class CGame_RepCorte : ClsPaginas { InicializaValores(); DdlHuerta.SelectedValueExist(Request["CveHuerta"] == null ? "-1" : Request["CveHuerta"].ToString()); - txtFechaI.Text = Request["FechaI"] == null ? DateTime.Now.ToString() : Request["FechaI"].ToString(); - txtFechaF.Text = Request["FechaF"] == null ? DateTime.Now.ToString() : Request["FechaF"].ToString(); + txtFechaI.Text = Request["FechaI"] == null ? NowADS().ToString() : Request["FechaI"].ToString(); + txtFechaF.Text = Request["FechaF"] == null ? NowADS().ToString() : Request["FechaF"].ToString(); if (DdlHuerta.SelectedValue.ToEntero() > 0) { Consulta(); } } } @@ -27,8 +27,8 @@ public partial class CGame_RepCorte : ClsPaginas private void InicializaValores() { CargaHuerta(); - txtFechaI.Text = DateTime.Now.FirstDayOfMonth().ToShortDateString(); - txtFechaF.Text = DateTime.Now.ToShortDateString(); + txtFechaI.Text = NowADS().FirstDayOfMonth().ToShortDateString(); + txtFechaF.Text = NowADS().ToShortDateString(); UPFiltros.Update(); } diff --git a/CGame/RepCorteGasto.aspx.cs b/CGame/RepCorteGasto.aspx.cs index 61f5abd0c..98aef7d05 100644 --- a/CGame/RepCorteGasto.aspx.cs +++ b/CGame/RepCorteGasto.aspx.cs @@ -29,8 +29,8 @@ public partial class CGame_RepCorteGasto : ClsPaginas { CargaConceptos(); CargaHuerta(); - txtFechaI.Text = DateTime.Now.ToShortDateString(); - txtFechaF.Text = DateTime.Now.ToShortDateString(); + txtFechaI.Text = NowADS().ToShortDateString(); + txtFechaF.Text = NowADS().ToShortDateString(); CveHuerta = Request["CveHuerta"] == null ? 0 : Request["CveHuerta"].ToString().ToEntero(); Modalidad = Request["Modalidad"] == null ? 0 : Request["Modalidad"].ToString().ToEntero(); if (CveHuerta > 0) diff --git a/CGame/RepEmpaque.aspx.cs b/CGame/RepEmpaque.aspx.cs index cf82758c2..bb419f77d 100644 --- a/CGame/RepEmpaque.aspx.cs +++ b/CGame/RepEmpaque.aspx.cs @@ -26,12 +26,12 @@ public partial class CGame_RepEmpaque : ClsPaginas { if (!IsPostBack) { - txtFechaI.Text = DateTime.Now.ToString(); - txtFechaF.Text = DateTime.Now.ToString(); + txtFechaI.Text = NowADS().ToString(); + txtFechaF.Text = NowADS().ToString(); CveHuerta = Request["CveHuerta"] == null ? 0 : Request["CveHuerta"].ToString().ToEntero(); Modalidad = Request["Modalidad"] == null ? 0 : Request["Modalidad"].ToString().ToEntero(); - txtFechaI.Text = Request["FechaI"] == null ? DateTime.Now.ToString() : Request["FechaI"].ToString(); - txtFechaF.Text = Request["FechaF"] == null ? DateTime.Now.ToString() : Request["FechaF"].ToString(); + txtFechaI.Text = Request["FechaI"] == null ? NowADS().ToString() : Request["FechaI"].ToString(); + txtFechaF.Text = Request["FechaF"] == null ? NowADS().ToString() : Request["FechaF"].ToString(); CargaHuerta(); if (CveHuerta > 0) { DdlHuerta.SelectedValueExist(CveHuerta); } if (Modalidad > 0) { DdlModalidad.SelectedValueExist(Modalidad); } @@ -125,7 +125,7 @@ public partial class CGame_RepEmpaque : ClsPaginas List para = new List(); para.Add(new ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)); para.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)); - para.Add(new ReportParameter("FechaImpresion", DateTime.Now.ToString())); + para.Add(new ReportParameter("FechaImpresion", NowADS().ToString())); para.Add(new ReportParameter("AgrupadoPor", $"Agrupado Por: {Folio}{Huerta}{FechaI}{FechaF}")); if (Imagen.Exists) { diff --git a/CGame/RepEmpaqueDetalle.aspx.cs b/CGame/RepEmpaqueDetalle.aspx.cs index 0a10260fc..bb030fadf 100644 --- a/CGame/RepEmpaqueDetalle.aspx.cs +++ b/CGame/RepEmpaqueDetalle.aspx.cs @@ -23,8 +23,8 @@ public partial class CGame_RepEmpaque : ClsPaginas if (!IsPostBack) { CargaHuerta(); - txtFechaI.Text = Request["FechaInicial"] == null ? DateTime.Now.ToShortDateString() : Request["FechaInicial"].ToString().ToString(); - txtFechaF.Text = Request["FechaFinal"] == null ? DateTime.Now.ToShortDateString() : Request["FechaFinal"].ToString().ToString(); + txtFechaI.Text = Request["FechaInicial"] == null ? NowADS().ToShortDateString() : Request["FechaInicial"].ToString().ToString(); + txtFechaF.Text = Request["FechaFinal"] == null ? NowADS().ToShortDateString() : Request["FechaFinal"].ToString().ToString(); DdlHuerta.SelectedValueExist(Request["CveHuerta"] == null ? -1 : Request["CveHuerta"].ToString().ToEntero()); TxtFolio.Text = Request["Folio"] == null ? "" : Request["Folio"].ToString().ToString(); CveProduccion = Request["CveProduccion"] == null ? -1 : Request["CveProduccion"].ToString().ToEntero(); diff --git a/CGame/RepFletes.aspx.cs b/CGame/RepFletes.aspx.cs index 5a1bc61c7..9515f3847 100644 --- a/CGame/RepFletes.aspx.cs +++ b/CGame/RepFletes.aspx.cs @@ -8,8 +8,8 @@ public partial class CGame_RepFletes : ClsPaginas { InicializaValores(); DdlHuerta.SelectedValueExist(Request["CveHuerta"] == null ? "-1" : Request["CveHuerta"].ToString()); - txtFechaI.Text = Request["FechaI"] == null ? DateTime.Now.ToString() : Request["FechaI"].ToString(); - txtFechaF.Text = Request["FechaF"] == null ? DateTime.Now.ToString() : Request["FechaF"].ToString(); + txtFechaI.Text = Request["FechaI"] == null ? NowADS().ToString() : Request["FechaI"].ToString(); + txtFechaF.Text = Request["FechaF"] == null ? NowADS().ToString() : Request["FechaF"].ToString(); DdlTipo.SelectedValueExist(Request["Tipo"] == null ? "-1" : Request["Tipo"].ToString()); if (DdlHuerta.SelectedValue.ToEntero() > 0) { Consulta(); } } @@ -18,8 +18,8 @@ public partial class CGame_RepFletes : ClsPaginas private void InicializaValores() { CargaHuerta(); - txtFechaI.Text = DateTime.Now.FirstDayOfMonth().ToShortDateString(); - txtFechaF.Text = DateTime.Now.ToShortDateString(); + txtFechaI.Text = NowADS().FirstDayOfMonth().ToShortDateString(); + txtFechaF.Text = NowADS().ToShortDateString(); UPFiltros.Update(); } diff --git a/CGame/RepIngresos.aspx.cs b/CGame/RepIngresos.aspx.cs index fc75aeeae..0ef0629e8 100644 --- a/CGame/RepIngresos.aspx.cs +++ b/CGame/RepIngresos.aspx.cs @@ -8,8 +8,8 @@ public partial class CGame_RepIngresos : ClsPaginas { InicializaValores(); DdlHuerta.SelectedValueExist(Request["CveHuerta"] == null ? "-1" : Request["CveHuerta"].ToString()); - txtFechaI.Text = Request["FechaI"] == null ? DateTime.Now.ToString() : Request["FechaI"].ToString(); - txtFechaF.Text = Request["FechaF"] == null ? DateTime.Now.ToString() : Request["FechaF"].ToString(); + txtFechaI.Text = Request["FechaI"] == null ? NowADS().ToString() : Request["FechaI"].ToString(); + txtFechaF.Text = Request["FechaF"] == null ? NowADS().ToString() : Request["FechaF"].ToString(); if (DdlHuerta.SelectedValue.ToEntero() > 0) { Consulta(); } } } @@ -17,8 +17,8 @@ public partial class CGame_RepIngresos : ClsPaginas private void InicializaValores() { CargaHuerta(); - txtFechaI.Text = DateTime.Now.FirstDayOfMonth().ToShortDateString(); - txtFechaF.Text = DateTime.Now.ToShortDateString(); + txtFechaI.Text = NowADS().FirstDayOfMonth().ToShortDateString(); + txtFechaF.Text = NowADS().ToShortDateString(); UPFiltros.Update(); } diff --git a/CGame/RepMaquila.aspx.cs b/CGame/RepMaquila.aspx.cs index af0f46588..032b12705 100644 --- a/CGame/RepMaquila.aspx.cs +++ b/CGame/RepMaquila.aspx.cs @@ -8,8 +8,8 @@ public partial class CGame_RepMaquila : ClsPaginas { InicializaValores(); DdlHuerta.SelectedValueExist(Request["CveHuerta"] == null ? "-1" : Request["CveHuerta"].ToString()); - txtFechaI.Text = Request["FechaI"] == null ? DateTime.Now.ToString() : Request["FechaI"].ToString(); - txtFechaF.Text = Request["FechaF"] == null ? DateTime.Now.ToString() : Request["FechaF"].ToString(); + txtFechaI.Text = Request["FechaI"] == null ? NowADS().ToString() : Request["FechaI"].ToString(); + txtFechaF.Text = Request["FechaF"] == null ? NowADS().ToString() : Request["FechaF"].ToString(); if (DdlHuerta.SelectedValue.ToEntero() > 0) { Consulta(); } } } @@ -17,8 +17,8 @@ public partial class CGame_RepMaquila : ClsPaginas private void InicializaValores() { CargaHuerta(); - txtFechaI.Text = DateTime.Now.FirstDayOfMonth().ToShortDateString(); - txtFechaF.Text = DateTime.Now.ToShortDateString(); + txtFechaI.Text = NowADS().FirstDayOfMonth().ToShortDateString(); + txtFechaF.Text = NowADS().ToShortDateString(); UPFiltros.Update(); } diff --git a/CGame/RepMateriales.aspx.cs b/CGame/RepMateriales.aspx.cs index 2cb6eb3e8..0683bebed 100644 --- a/CGame/RepMateriales.aspx.cs +++ b/CGame/RepMateriales.aspx.cs @@ -9,8 +9,8 @@ public partial class CGame_RepMateriales : ClsPaginas { InicializaValores(); DdlHuerta.SelectedValueExist(Request["CveHuerta"] == null ? "-1" : Request["CveHuerta"].ToString()); - txtFechaI.Text = Request["FechaI"] == null ? DateTime.Now.ToString() : Request["FechaI"].ToString(); - txtFechaF.Text = Request["FechaF"] == null ? DateTime.Now.ToString() : Request["FechaF"].ToString(); + txtFechaI.Text = Request["FechaI"] == null ? NowADS().ToString() : Request["FechaI"].ToString(); + txtFechaF.Text = Request["FechaF"] == null ? NowADS().ToString() : Request["FechaF"].ToString(); if (DdlHuerta.SelectedValue.ToEntero() > 0) { Consulta(); } } } @@ -18,8 +18,8 @@ public partial class CGame_RepMateriales : ClsPaginas private void InicializaValores() { CargaHuerta(); - txtFechaI.Text = DateTime.Now.FirstDayOfMonth().ToShortDateString(); - txtFechaF.Text = DateTime.Now.ToShortDateString(); + txtFechaI.Text = NowADS().FirstDayOfMonth().ToShortDateString(); + txtFechaF.Text = NowADS().ToShortDateString(); UPFiltros.Update(); } diff --git a/CGame/RepOrdenCorte.aspx.cs b/CGame/RepOrdenCorte.aspx.cs index e46fb67f9..22c22ae8e 100644 --- a/CGame/RepOrdenCorte.aspx.cs +++ b/CGame/RepOrdenCorte.aspx.cs @@ -18,12 +18,12 @@ public partial class CGame_RepOrdenCorte : ClsPaginas { if (!IsPostBack) { - txtFechaI.Text = DateTime.Now.ToString(); - txtFechaF.Text = DateTime.Now.ToString(); + txtFechaI.Text = NowADS().ToString(); + txtFechaF.Text = NowADS().ToString(); CargaHuerta(); DdlHuerta.SelectedValueExist(Request["CveHuerta"] == null ? "-1" : Request["CveHuerta"].ToString()); - txtFechaI.Text = Request["FechaI"] == null ? DateTime.Now.ToString() : Request["FechaI"].ToString(); - txtFechaF.Text = Request["FechaF"] == null ? DateTime.Now.ToString() : Request["FechaF"].ToString(); + txtFechaI.Text = Request["FechaI"] == null ? NowADS().ToString() : Request["FechaI"].ToString(); + txtFechaF.Text = Request["FechaF"] == null ? NowADS().ToString() : Request["FechaF"].ToString(); if (DdlHuerta.SelectedValue.ToEntero() > 0) { Consultar(); } } } @@ -76,7 +76,7 @@ public partial class CGame_RepOrdenCorte : ClsPaginas List para = new List(); para.Add(new ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)); para.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)); - para.Add(new ReportParameter("FechaImpresion", DateTime.Now.ToString())); + para.Add(new ReportParameter("FechaImpresion", NowADS().ToString())); para.Add(new ReportParameter("AgrupadoPor", $"Agrupado Por: {Folio}{Huerta}{FechaI}{FechaF}")); if (Imagen.Exists) { diff --git a/CGame/RepOrdenCorteDetalle.aspx.cs b/CGame/RepOrdenCorteDetalle.aspx.cs index 189822bfe..681972547 100644 --- a/CGame/RepOrdenCorteDetalle.aspx.cs +++ b/CGame/RepOrdenCorteDetalle.aspx.cs @@ -32,7 +32,7 @@ public partial class CGame_RepOrdenCorteDetalle : ClsPaginas { if (!IsPostBack) { - TxtFechaFlete.Text = DateTime.Now.ToShortDateString(); + TxtFechaFlete.Text = NowADS().ToShortDateString(); CveOrdenCorte = Request["CveOrdenCorte"] == null ? 0 : Request["CveOrdenCorte"].ToString().ToEntero(); CargaDatos(); } @@ -383,7 +383,7 @@ public partial class CGame_RepOrdenCorteDetalle : ClsPaginas } EnviarCorreo(CveOrdenCorte, Body, Descripcion); Alert("La fecha del flete se asigno correctamente"); - TxtFechaFlete.Text = DateTime.Now.ToShortDateString(); + TxtFechaFlete.Text = NowADS().ToShortDateString(); DdlEmpaque.SelectedIndex = 0; LnkFletes.Visible = true; UpAcciones.Update(); diff --git a/CGame/RepOrdenProduccion.aspx.cs b/CGame/RepOrdenProduccion.aspx.cs index c466d2a9f..f96183645 100644 --- a/CGame/RepOrdenProduccion.aspx.cs +++ b/CGame/RepOrdenProduccion.aspx.cs @@ -42,8 +42,8 @@ public partial class CGame_RepOrdenProduccion :ClsPaginas } else { - txtFechaI.Text = DateTime.Now.ToString(); - txtFechaF.Text = DateTime.Now.ToString(); + txtFechaI.Text = NowADS().ToString(); + txtFechaF.Text = NowADS().ToString(); } } @@ -128,7 +128,7 @@ public partial class CGame_RepOrdenProduccion :ClsPaginas List para = new List(); para.Add(new ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)); para.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)); - para.Add(new ReportParameter("FechaImpresion", DateTime.Now.ToString())); + para.Add(new ReportParameter("FechaImpresion", NowADS().ToString())); para.Add(new ReportParameter("AgrupadoPor", $"Agrupado Por: {Folio}{Estatus}{Cliente}{FechaI}{FechaF}")); if (Imagen.Exists) { diff --git a/CGame/RepOrdenProduccionXHuerta.aspx.cs b/CGame/RepOrdenProduccionXHuerta.aspx.cs index f8b194355..7d641a328 100644 --- a/CGame/RepOrdenProduccionXHuerta.aspx.cs +++ b/CGame/RepOrdenProduccionXHuerta.aspx.cs @@ -15,8 +15,8 @@ public partial class CGame_RepOrdenProduccionXHuerta : ClsPaginas private void InicializaValores() { CargaHuerta(); - txtFechaI.Text = DateTime.Now.FirstDayOfMonth().ToShortDateString(); - txtFechaF.Text = DateTime.Now.ToShortDateString(); + txtFechaI.Text = NowADS().FirstDayOfMonth().ToShortDateString(); + txtFechaF.Text = NowADS().ToShortDateString(); UPFiltros.Update(); } diff --git a/CGame/RepOtrosGastos.aspx.cs b/CGame/RepOtrosGastos.aspx.cs index f72dc7ae5..079931f0a 100644 --- a/CGame/RepOtrosGastos.aspx.cs +++ b/CGame/RepOtrosGastos.aspx.cs @@ -9,8 +9,8 @@ public partial class CGame_RepOtrosGastos : ClsPaginas { InicializaValores(); DdlHuerta.SelectedValueExist(Request["CveHuerta"] == null ? "-1" : Request["CveHuerta"].ToString()); - txtFechaI.Text = Request["FechaI"] == null ? DateTime.Now.ToString() : Request["FechaI"].ToString(); - txtFechaF.Text = Request["FechaF"] == null ? DateTime.Now.ToString() : Request["FechaF"].ToString(); + txtFechaI.Text = Request["FechaI"] == null ? NowADS().ToString() : Request["FechaI"].ToString(); + txtFechaF.Text = Request["FechaF"] == null ? NowADS().ToString() : Request["FechaF"].ToString(); if (DdlHuerta.SelectedValue.ToEntero() > 0) { Consulta(); } } } @@ -18,8 +18,8 @@ public partial class CGame_RepOtrosGastos : ClsPaginas private void InicializaValores() { CargaHuerta(); - txtFechaI.Text = DateTime.Now.FirstDayOfMonth().ToShortDateString(); - txtFechaF.Text = DateTime.Now.ToShortDateString(); + txtFechaI.Text = NowADS().FirstDayOfMonth().ToShortDateString(); + txtFechaF.Text = NowADS().ToShortDateString(); UPFiltros.Update(); } diff --git a/CGame/RepPreEnfriado.aspx.cs b/CGame/RepPreEnfriado.aspx.cs index 6d4b3b9db..72e2c9ddc 100644 --- a/CGame/RepPreEnfriado.aspx.cs +++ b/CGame/RepPreEnfriado.aspx.cs @@ -9,8 +9,8 @@ public partial class CGame_RepPreEnfriado : ClsPaginas { InicializaValores(); DdlHuerta.SelectedValueExist(Request["CveHuerta"] == null ? "-1" : Request["CveHuerta"].ToString()); - txtFechaI.Text = Request["FechaI"] == null ? DateTime.Now.ToString() : Request["FechaI"].ToString(); - txtFechaF.Text = Request["FechaF"] == null ? DateTime.Now.ToString() : Request["FechaF"].ToString(); + txtFechaI.Text = Request["FechaI"] == null ? NowADS().ToString() : Request["FechaI"].ToString(); + txtFechaF.Text = Request["FechaF"] == null ? NowADS().ToString() : Request["FechaF"].ToString(); ChkLiquidado.Checked= Convert.ToBoolean(Request["Liquidado"] == null ? 0 : Request["Liquidado"].ToString().ToEntero()); if (DdlHuerta.SelectedValue.ToEntero() > 0) { Consulta(); } } @@ -19,8 +19,8 @@ public partial class CGame_RepPreEnfriado : ClsPaginas private void InicializaValores() { CargaHuerta(); - txtFechaI.Text = DateTime.Now.FirstDayOfMonth().ToShortDateString(); - txtFechaF.Text = DateTime.Now.ToShortDateString(); + txtFechaI.Text = NowADS().FirstDayOfMonth().ToShortDateString(); + txtFechaF.Text = NowADS().ToShortDateString(); UPFiltros.Update(); } diff --git a/CRM/Acercamiento.aspx.cs b/CRM/Acercamiento.aspx.cs index 0962862e8..4a2f24e5d 100644 --- a/CRM/Acercamiento.aspx.cs +++ b/CRM/Acercamiento.aspx.cs @@ -410,7 +410,7 @@ public partial class CRM_Acercamiento : ClsPaginas DdlMedioCaptacion.SelectedValueExist(objAcercamiento.Result[0].CveMedioCaptacion); //CARGA MODAL CIERRE-CANCELACION - TxtFechaCierreRechazo.Text = (objAcercamiento.Result[0].FechaCierre.ToString() == "") ? DateTime.Now.ToShortDateString() : objAcercamiento.Result[0].FechaCierre.ToDateTime().ToShortDateString(); + TxtFechaCierreRechazo.Text = (objAcercamiento.Result[0].FechaCierre.ToString() == "") ? NowADS().ToShortDateString() : objAcercamiento.Result[0].FechaCierre.ToDateTime().ToShortDateString(); DdlRechazoMotivo.SelectedValueExist(objAcercamiento.Result[0].CveRechazoMotivo); TxtObservacionRechazo.Text = objAcercamiento.Result[0].ObservacionRechazo; @@ -538,7 +538,7 @@ public partial class CRM_Acercamiento : ClsPaginas CveEncuestaAplicadaProceso = -1; RecuperaCve(); - TxtFechaApertura.Text = DateTime.Now.ToShortDateString(); + TxtFechaApertura.Text = NowADS().ToShortDateString(); } protected void RecuperaCve() @@ -694,7 +694,7 @@ public partial class CRM_Acercamiento : ClsPaginas { if (ActivaFechaCierre(DdlEtapaProceso.SelectedValue.ToEntero())) { - TxtFechaCierre.Text = DateTime.Now.ToShortDateString(); + TxtFechaCierre.Text = NowADS().ToShortDateString(); } else { @@ -816,7 +816,7 @@ public partial class CRM_Acercamiento : ClsPaginas if (DTEtapasProceso.FiltraParametros(String.Format("CveEtapaProceso = {0} AND CveTipoEtapa IN(3, 4)", CveEtapaProcesoActualActualizar)).Rows.Count > 0) { - FechaCierre = TxtFechaCierre.Text != "" ? TxtFechaCierre.Text.ToDateTime() : DateTime.Now; + FechaCierre = TxtFechaCierre.Text != "" ? TxtFechaCierre.Text.ToDateTime() : NowADS(); } Double Importe = TxtImporte.Text.ToDouble(); @@ -903,7 +903,7 @@ public partial class CRM_Acercamiento : ClsPaginas if (DTEtapasProceso.FiltraParametros(String.Format("CveEtapaProceso = {0} AND CveTipoEtapa IN(3, 4)", CveEtapaProcesoActualActualizar)).Rows.Count > 0) { - FechaCierre = TxtFechaCierre.Text != "" ? TxtFechaCierre.Text.ToDateTime() : DateTime.Now; + FechaCierre = TxtFechaCierre.Text != "" ? TxtFechaCierre.Text.ToDateTime() : NowADS(); } Double Importe = TxtImporte.Text.ToDouble(); @@ -1357,7 +1357,7 @@ public partial class CRM_Acercamiento : ClsPaginas DdlPrioridadAgenda.SelectedValueExist("1"); TxtAsuntoAgenda.Text = ""; TxtDescripcionAgenda.Text = ""; - TxtFechaInicioAgenda.Text = DateTime.Now.ToString("dd/MM/yyyy HH:mm"); + TxtFechaInicioAgenda.Text = NowADS().ToString("dd/MM/yyyy HH:mm"); UpModalAgenda.Update(); } diff --git a/CRM/CatMetas.aspx.vb b/CRM/CatMetas.aspx.vb index 0c7e96214..49f5db1fb 100644 --- a/CRM/CatMetas.aspx.vb +++ b/CRM/CatMetas.aspx.vb @@ -34,8 +34,8 @@ Partial Class CRM_CatMetas Private Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load If Not Page.IsPostBack Then - txtFechaIF.Text = Now.ToShortDateString - txtFechaFF.Text = Now.Day.ToString + "/" + (Now.Month + 1).ToString + "/" + Now.Year.ToString + txtFechaIF.Text = NowADS().ToShortDateString + txtFechaFF.Text = NowADS().Day.ToString + "/" + (NowADS().Month + 1).ToString + "/" + NowADS().Year.ToString CargadatosGvMeta() End If @@ -63,8 +63,8 @@ Partial Class CRM_CatMetas BtnAgregarMetaModal.Text = "Agregar" CargaVendedores() - txtFechaI.Text = Now.ToShortDateString - txtFechaF.Text = (Now.Day + 1).ToString + "/" + Now.Month.ToString + "/" + Now.Year.ToString + txtFechaI.Text = NowADS().ToShortDateString + txtFechaF.Text = (NowADS().Day + 1).ToString + "/" + NowADS().Month.ToString + "/" + NowADS().Year.ToString Actualizar = False UpGral.Update() diff --git a/CRM/CatProbabilidadAcercamiento.aspx.cs b/CRM/CatProbabilidadAcercamiento.aspx.cs index 33bf7da58..9f9fee55e 100644 --- a/CRM/CatProbabilidadAcercamiento.aspx.cs +++ b/CRM/CatProbabilidadAcercamiento.aspx.cs @@ -252,7 +252,7 @@ public partial class CRM_CatProbabilidadAcercamiento : ClsPaginas param.Add(new ReportParameter("LogoPath", "")); } param.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)); - param.Add(new ReportParameter("FechaImpresion", DateTime.Now.ToString())); + param.Add(new ReportParameter("FechaImpresion", NowADS().ToString())); ImprimirPDF("Empresas/Grales/Formatos/RepCatProbabilidadAcercamiento.rdlc", TmpDT, param, "Report Cat Probabilidad Acercamiento", formato); } diff --git a/CRM/CatTipoProceso.aspx.cs b/CRM/CatTipoProceso.aspx.cs index bc92beb33..3d669f253 100644 --- a/CRM/CatTipoProceso.aspx.cs +++ b/CRM/CatTipoProceso.aspx.cs @@ -328,7 +328,7 @@ public partial class CRM_CatTipoProceso : ClsPaginas param.Add(new ReportParameter("LogoPath", "")); } param.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)); - param.Add(new ReportParameter("FechaImpresion", DateTime.Now.ToString())); + param.Add(new ReportParameter("FechaImpresion", NowADS().ToString())); ImprimirPDF("Empresas/Grales/Formatos/RepCatTipoProceso.rdlc", TmpDT, param, "Report Cat Tipo Proceso", formato, RDSName: "DataSet1"); } @@ -403,7 +403,7 @@ public partial class CRM_CatTipoProceso : ClsPaginas if(CveCampanaVal > 0 && CveTipoEncuestaVal > 0 && CveTema > 0 && CveEncuesta <= 0) { - if(objEcuesta.AddEncuesta(CveCampanaVal, -1,$"CRM {TipoProcesEnc}", $"CRM {TipoProcesEnc}",0, CveTipoEncuestaVal, false, DateTime.Now, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoProceso: CveTipoProcesoEnc)) + if(objEcuesta.AddEncuesta(CveCampanaVal, -1,$"CRM {TipoProcesEnc}", $"CRM {TipoProcesEnc}",0, CveTipoEncuestaVal, false, NowADS(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoProceso: CveTipoProcesoEnc)) { CveEncuesta = objEcuesta.CveEncuesta; respuesta = true; diff --git a/CRM/EmpresaCRM.aspx b/CRM/EmpresaCRM.aspx index c1a340b30..3e666d862 100644 --- a/CRM/EmpresaCRM.aspx +++ b/CRM/EmpresaCRM.aspx @@ -781,7 +781,7 @@
    - + diff --git a/CRM/EmpresaCRM.aspx.cs b/CRM/EmpresaCRM.aspx.cs index 3b5dcd835..d6304d5f2 100644 --- a/CRM/EmpresaCRM.aspx.cs +++ b/CRM/EmpresaCRM.aspx.cs @@ -1224,7 +1224,7 @@ public partial class CRM_EmpresaCRM : ClsPaginas rowContacto["Celular"] = TxtCelular.Text; rowContacto["Correo"] = TxtCorreo.Text; rowContacto["CveUsuarioIng"] = UsuarioActual.CveUsuario; - rowContacto["FechaIng"] = DateTime.Now; + rowContacto["FechaIng"] = NowADS(); if (EsEditarContacto) TempDTContactos.Rows.RemoveAt(IndexDTContacto); @@ -1427,7 +1427,7 @@ public partial class CRM_EmpresaCRM : ClsPaginas DdlPrioridadAgenda.SelectedValueExist("1"); TxtAsuntoAgenda.Text = ""; TxtDescripcionAgenda.Text = ""; - TxtFechaInicioAgenda.Text = DateTime.Now.ToString("dd/MM/yyyy HH:mm"); + TxtFechaInicioAgenda.Text = NowADS().ToString("dd/MM/yyyy HH:mm"); UpModalAgenda.Update(); } @@ -1642,11 +1642,11 @@ public partial class CRM_EmpresaCRM : ClsPaginas protected void LimitaFechasAcercamiento() { //ACTIVAMOS RANGO DE FECHAS PARA CAPTURA DE ACERCAMIENTO - CETxtFechaApertura.StartDate = DateTime.Now.AddDays(-1); - CETxtFechaApertura.EndDate = DateTime.Now; + CETxtFechaApertura.StartDate = NowADS().AddDays(-1); + CETxtFechaApertura.EndDate = NowADS(); - RVFechaApertura.MinimumValue = DateTime.Now.AddDays(-1).ToShortDateString(); - RVFechaApertura.MaximumValue = DateTime.Now.ToShortDateString(); + RVFechaApertura.MinimumValue = NowADS().AddDays(-1).ToShortDateString(); + RVFechaApertura.MaximumValue = NowADS().ToShortDateString(); } protected void InicializaAcercamientos() @@ -1703,7 +1703,7 @@ public partial class CRM_EmpresaCRM : ClsPaginas { TxtAcercamiento.Text = ""; TxtDescripcionAcercamiento.Text = ""; - TxtFechaApertura.Text = DateTime.Now.ToShortDateString(); + TxtFechaApertura.Text = NowADS().ToShortDateString(); TxtFechaCierre.Text = ""; TxtImporte.Text = "0.00"; TxtComision.Text = "0.00"; diff --git a/CRM/RepAcercamientos.aspx.cs b/CRM/RepAcercamientos.aspx.cs index 59bc658e8..d1459a74e 100644 --- a/CRM/RepAcercamientos.aspx.cs +++ b/CRM/RepAcercamientos.aspx.cs @@ -101,8 +101,8 @@ public partial class CRM_RepAcercamientos : ClsPaginas DdlVendedor.SelectedValueExist(CveVendedor); //CALCULAMOS EL INTERVALO DE LA SEMANA ACTUAL - TxtFechaInicio.Text = DateTime.Now.AddDays(-((int)DateTime.Now.DayOfWeek) + 1).ToShortDateString(); - TxtFechaFin.Text = DateTime.Now.AddDays((7 - (int)DateTime.Now.DayOfWeek)).ToShortDateString(); + TxtFechaInicio.Text = NowADS().AddDays(-((int)NowADS().DayOfWeek) + 1).ToShortDateString(); + TxtFechaFin.Text = NowADS().AddDays((7 - (int)NowADS().DayOfWeek)).ToShortDateString(); DdlPS.setEsWebService(true); DdlPS.SelectedValue = "-1"; DdlPS.SelectedText = "Todos"; diff --git a/CRM/RepAcercamientosProcesosDetalle.aspx.cs b/CRM/RepAcercamientosProcesosDetalle.aspx.cs index 4ab577c0a..4c21beba7 100644 --- a/CRM/RepAcercamientosProcesosDetalle.aspx.cs +++ b/CRM/RepAcercamientosProcesosDetalle.aspx.cs @@ -378,7 +378,7 @@ public partial class CRM_RepAcercamientosProcesosDetalle : ClsPaginas parametros.Add(new ReportParameter("FechaFin", FechaF)); parametros.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)); parametros.Add(new ReportParameter("Filtros", StrFiltro.ToString())); - parametros.Add(new ReportParameter("FechaImprimio", DateTime.Now.ToShortDateString())); + parametros.Add(new ReportParameter("FechaImprimio", NowADS().ToShortDateString())); if (Imagen.Exists) { @@ -391,7 +391,7 @@ public partial class CRM_RepAcercamientosProcesosDetalle : ClsPaginas } - ImprimirPDF("Empresas/Grales/Formatos/RepAcercamientoProcesoDetalle.rdlc", DTRepAcercamientosDetalle, parametros, String.Format("RepTraspasoAlmacen-{0}", DateTime.Now.ToShortDateString()), formato); + ImprimirPDF("Empresas/Grales/Formatos/RepAcercamientoProcesoDetalle.rdlc", DTRepAcercamientosDetalle, parametros, String.Format("RepTraspasoAlmacen-{0}", NowADS().ToShortDateString()), formato); } else diff --git a/CRM/RepAgendasBitacoras.aspx.cs b/CRM/RepAgendasBitacoras.aspx.cs index 8b725b80c..7c0a5ab22 100644 --- a/CRM/RepAgendasBitacoras.aspx.cs +++ b/CRM/RepAgendasBitacoras.aspx.cs @@ -69,8 +69,8 @@ public partial class CRM_AgendasBitacoras : ClsPaginas DdlVendedor.SelectedValueExist(UsuarioActual.CveVendedor); //CALCULAMOS EL INTERVALO DE LA SEMANA ACTUAL - TxtFechaInicio.Text = DateTime.Now.AddDays(-((int)DateTime.Now.DayOfWeek) + 1).ToShortDateString(); - TxtFechaFin.Text = DateTime.Now.AddDays((7 - (int)DateTime.Now.DayOfWeek)).ToShortDateString(); + TxtFechaInicio.Text = NowADS().AddDays(-((int)NowADS().DayOfWeek) + 1).ToShortDateString(); + TxtFechaFin.Text = NowADS().AddDays((7 - (int)NowADS().DayOfWeek)).ToShortDateString(); //DdlPS.setEsWebService(true); //DdlPS.SelectedValue = "-1"; //DdlPS.SelectedText = "Todos"; diff --git a/Compras/CatEstatusFactura.aspx.vb b/Compras/CatEstatusFactura.aspx.vb index 12668a36e..14a1e8361 100644 --- a/Compras/CatEstatusFactura.aspx.vb +++ b/Compras/CatEstatusFactura.aspx.vb @@ -153,7 +153,7 @@ Partial Class Compras_CatEstatusFactura 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("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) diff --git a/Compras/CatProveedores.aspx.vb b/Compras/CatProveedores.aspx.vb index 1d3b0b87c..3d70e4a42 100644 --- a/Compras/CatProveedores.aspx.vb +++ b/Compras/CatProveedores.aspx.vb @@ -213,7 +213,7 @@ Partial Class Compras_CatProveedores #End Region Private Sub ImgExcel2_Click(sender As Object, e As EventArgs) Handles ImgExcel2.Click - GvDatos.ExportToExcel("RepProveedores_" & Now.ToShortDateString) + GvDatos.ExportToExcel("RepProveedores_" & NowADS().ToShortDateString) End Sub Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) Dim ObjProveedores As New ClsCompProveedores diff --git a/Compras/CatTipoGasto.aspx.cs b/Compras/CatTipoGasto.aspx.cs index 37dfc5d8f..a14663c5f 100644 --- a/Compras/CatTipoGasto.aspx.cs +++ b/Compras/CatTipoGasto.aspx.cs @@ -87,7 +87,7 @@ public partial class Compras_CatTipoGasto : ClsPaginas ClsCompras ObjCompras = new ClsCompras(); if (BtnAgregarTipoGasto.Text == "Agregar") { - if (ObjCompras.AddTipoGasto(TxtTipoGasto.Text,ChkEstatus.Checked,DateTime.Now.ToString(),UsuarioActual.CveUsuario,UsuarioActual.CveEmpresa)) + if (ObjCompras.AddTipoGasto(TxtTipoGasto.Text,ChkEstatus.Checked,NowADS().ToString(),UsuarioActual.CveUsuario,UsuarioActual.CveEmpresa)) { Alert("Se agregó el Tipo de Gasto correctamente"); } diff --git a/Compras/Compras.aspx b/Compras/Compras.aspx index 5180079d9..64e8b39ec 100644 --- a/Compras/Compras.aspx +++ b/Compras/Compras.aspx @@ -245,6 +245,7 @@
    @@ -3505,7 +3506,7 @@
    - +
    @@ -3519,7 +3520,7 @@
    - +
    @@ -6180,10 +6181,11 @@ //ORDENES DE COMPRA --- OC - function VinculaOC(CveOC, Folio, CveEstatus) { + function VinculaOC(CveOC, Folio, CveEstatus, CveProveedor) { $get("TxtOC").value = Folio; $get("HdnVCveOC").value = CveOC; $get("HdnCveEstatusOC").value = CveEstatus; + $get("HdnCveProveedorOC").value = CveProveedor; $get("BtnVOC").click(); } diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 812832042..e80e88a24 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -1161,8 +1161,8 @@ Partial Class Compras_Compras ArrIE = New ArrayList() ArrIEFuncionariosEmpleados = New ArrayList() ClavesBorradas = New ArrayList() - TxtFecha.Text = Now.ToShortDateString - TxtFechaEjecucion.Text = Now.ToShortDateString + TxtFecha.Text = NowADS().ToShortDateString + TxtFechaEjecucion.Text = NowADS().ToShortDateString ViewState("CveFactura") = "0" ViewState("IdPoliza") = "0" ViewState("CveCompra") = -1 @@ -1348,6 +1348,7 @@ Partial Class Compras_Compras End If If UsuarioActual.TienePermisoProceso(360) Then BtnProrateoDeducible.Visible = True + If UsuarioActual.TienePermisoProceso(365) AndAlso IfNull(Request("CveFactura"), "").ToString = "" Then BtnGuardar.Visible = False If Not CveCompra > 0 Then LIContratos.Visible = True @@ -1584,7 +1585,7 @@ Partial Class Compras_Compras Private Function CargaFactura(CveFactura As Integer) As String Dim ObjeFacturas As New ClsCompras Dim RFC As String = "" - If ObjeFacturas.GetFacturas(CveFactura, "-1", Now.AddYears(-4), Now, "-1", "-1", -1, -1, -1, -1, "-1", UsuarioActual.CveEmpresa) AndAlso ObjeFacturas.DtResultados.Rows.Count > 0 Then + If ObjeFacturas.GetFacturas(CveFactura, "-1", NowADS().AddYears(-4), NowADS(), "-1", "-1", -1, -1, -1, -1, "-1", UsuarioActual.CveEmpresa) AndAlso ObjeFacturas.DtResultados.Rows.Count > 0 Then Dim dr As DataRow = ObjeFacturas.DtResultados.Rows(0) ' no toma la cero, porque es el totalizador ViewState("CveTipoProveedor") = dr("CveTipoProveedor").ToString.ToEntero @@ -1652,7 +1653,7 @@ Partial Class Compras_Compras XMLDoc.LoadXml(File.ReadAllText(Archivo).Replace("<br>", "").Replace("<", "").Replace("o;?", "")) Catch ex As Exception Try - Dim oReader as New StreamReader(Archivo, Encoding.GetEncoding("ISO-8859-1")) + Dim oReader As New StreamReader(Archivo, Encoding.GetEncoding("ISO-8859-1")) XMLDoc.Load(oReader) oReader.Dispose() Catch ex2 As Exception @@ -1976,14 +1977,17 @@ Partial Class Compras_Compras TxtFechaPago.Text = (TxtFecha.Text.ToDate.AddDays(LblDiasCredito.Text.ToEntero)).ToShortDateString Dim drMon As DataRow = GlobalDTMonedas.FiltroPrimero(String.Format(" (Abreviatura LIKE '%{0}%' OR Moneda LIKE '%{0}%' )", Moneda)) + If drMon IsNot Nothing Then DdlMoneda.SelectedValue = drMon("CveMoneda").ToString + CveMoneda = drMon("CveMoneda").ToString.ToEntero Else 'sino busco en la tabla de alias drMon = GlobalDTMonedasAlias.FiltroPrimero(String.Format("MonedaAlias LIKE '%{0}%' ", Moneda)) If drMon IsNot Nothing Then DdlMoneda.SelectedValue = drMon("CveMoneda").ToString + CveMoneda = drMon("CveMoneda").ToString.ToEntero Else LblMoneda.Text = Moneda LblMoneda.ForeColor = Drawing.Color.Red @@ -2220,8 +2224,9 @@ Partial Class Compras_Compras ChkIEPS.Visible = True ChkIEPS.Checked = True DdlConceptoIEPS.Visible = True - CargaProductos(DdlConceptoIEPS, If(UsuarioActual.Empresa.Funcionalidad(112).ToString.ToEntero > 0, UsuarioActual.Empresa.Funcionalidad(112).ToString.ToEntero, -1)) + CargaProductos(DdlConceptoIEPS, If(UsuarioActual.Empresa.Funcionalidad(112).ToString.ToEntero > 0, UsuarioActual.Empresa.Funcionalidad(112).ToString.ToEntero, -1), True) LbImporte.Text = "$" + TrasladoIEPS.ToString + End If If OtrosImpuestos > 0 Then ChkOtrosI.Visible = True @@ -2344,7 +2349,7 @@ Partial Class Compras_Compras End If End If - Dim SubTotalIEPS = TmpDT.SUM("Total").ToString.ToDecimal + Dim SubTotalIEPS As Decimal = TmpDT.SUMD("Total") SubTotal = Math.Round(SubTotalIEPS, 2) SubTotalConceptos = Math.Round(SubTotalIEPS, 2) @@ -5197,7 +5202,7 @@ Partial Class Compras_Compras indice += 1 'agregamos la entrada - If Not UsuarioActual.Empresa.UsaAC Then fecha = Now + If Not UsuarioActual.Empresa.UsaAC Then fecha = NowADS() folio = ObjInventario.GetFolioSiguiente(2, UsuarioActual.CveEmpresa) cvemovimientoentrada = ObjInventario.AddMovimiento(tcvealmacen, 2, 1, fecha, folio, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompra, -1, -1, -1, TipoCambio:=If(DdlMoneda.SelectedValue.ToEntero = 1, -1, TipoCambioGuardar), Modulo:="Comp/G4") @@ -5284,7 +5289,7 @@ Partial Class Compras_Compras indice += 1 Dim fecha As Date = TxtFecha.Text.ToDate - If Not UsuarioActual.Empresa.UsaAC Then fecha = Now + If Not UsuarioActual.Empresa.UsaAC Then fecha = NowADS() CveMovimientoInventario = ObjInventario.AddMovimiento(tCveAlmacen, CveConceptoMovimiento, 1, fecha, 0, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompra, -1, -1, -1, TipoCambio:=If(DdlMoneda.SelectedValue.ToEntero = 1, -1, TipoCambioGuardar), CveFolioGarantia:=tCveFolioGarantia, Modulo:="Comp/G2") @@ -5322,7 +5327,6 @@ Partial Class Compras_Compras ErrorMovInv = True Exit For End If - Next End If Else @@ -5431,7 +5435,7 @@ Partial Class Compras_Compras End If Case "4" ' Deudores CveProveedorLocal = CveProveedor - CveProveedorConcepto = DdlDeudor.SelectedValue.ToEntero + CveProveedorConcepto = CveProveedor For Each row As GridViewRow In GvDeudores.Rows If row.FCCheckBox("Chk").Checked Then CveIE = row.DataKey("CveIE").ToString.ToEntero @@ -5443,7 +5447,7 @@ Partial Class Compras_Compras CveConceptoAfectacion = 37 Case "5" ' Acreedores CveProveedorLocal = CveProveedor - CveProveedorConcepto = DdlAcreedor.SelectedValue.ToEntero + CveProveedorConcepto = CveProveedor ' DdlAcreedor.SelectedValue.ToEntero CveConceptoAfectacion = 41 CveIE = If(DdlAcreedorDetalle.SelectedValue.ToEntero = -2, -1, DdlAcreedorDetalle.SelectedValue.ToEntero) @@ -6064,13 +6068,13 @@ Partial Class Compras_Compras If importeMN <> 0 Then - If (TxtFecha.Text <> Now.ToString("dd/MM/yyyy")) And Not EntradaComoGastoConAlmacen Then + If (TxtFecha.Text <> NowADS().ToString("dd/MM/yyyy")) And Not EntradaComoGastoConAlmacen Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMN.RoundSQL(2), importeMN.RoundSQL(2), 205, Referencia, Concepto, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CvePersonal:=CvePersonal, CveMovimientoAlmacen:=CveMovimientoInventario, CveCreditoDetalle:=CveCreditoDetalle, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, Contabilizable:=ContabilizableAlmacen) Then ErrorPrepoliza = True End If - Dim CvePrePoliza2Almacen As Integer = ObjConta.AddPrePolizas("Compras/Registrar/Almacen", If(EsContado And CvePlantillaPrePoliza = 1, 2, CvePlantillaPrePoliza), ImporteCompra, TxtTotal.Text.ToDouble, DdlMoneda.SelectedValue.ToEntero, Now, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FolioFijo:=FolioFijo, ReglaFolioPoliza:=ObjCompras.ObtenerReglaFolio(DdlTipoTransaccion.SelectedValue, DdlTipoTransaccionCaja.SelectedValue, UsuarioActual.CveEmpresa), CveTipoPoliza:=ObjConta.ObtenerTipoPoliza(DdlTipoTransaccion.SelectedValue, DdlTipoTransaccionCaja.SelectedValue, UsuarioActual.CveEmpresa)) + Dim CvePrePoliza2Almacen As Integer = ObjConta.AddPrePolizas("Compras/Registrar/Almacen", If(EsContado And CvePlantillaPrePoliza = 1, 2, CvePlantillaPrePoliza), ImporteCompra, TxtTotal.Text.ToDouble, DdlMoneda.SelectedValue.ToEntero, NowADS(), ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FolioFijo:=FolioFijo, ReglaFolioPoliza:=ObjCompras.ObtenerReglaFolio(DdlTipoTransaccion.SelectedValue, DdlTipoTransaccionCaja.SelectedValue, UsuarioActual.CveEmpresa), CveTipoPoliza:=ObjConta.ObtenerTipoPoliza(DdlTipoTransaccion.SelectedValue, DdlTipoTransaccionCaja.SelectedValue, UsuarioActual.CveEmpresa)) If CvePrePoliza2Almacen > 0 Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza2Almacen, True, importeMN.RoundSQL(2), importeMN.RoundSQL(2), 205, Referencia, Concepto, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CvePersonal:=CvePersonal, CveMovimientoAlmacen:=CveMovimientoInventario, CveCreditoDetalle:=CveCreditoDetalle, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, Contabilizable:=ContabilizableAlmacen) Then @@ -6180,6 +6184,7 @@ Partial Class Compras_Compras Importe228 = ObjOC.DtResultados.FiltroPrimeroValor("Importe228").ToDecimal * Dr("Cantidad").ToString.ToDecimal : ImporteME228 = ObjOC.DtResultados.FiltroPrimeroValor("ImporteME228").ToDecimal * Dr("Cantidad").ToString.ToDecimal : ImporteMN228 = ObjOC.DtResultados.FiltroPrimeroValor("ImporteMN228").ToDecimal * Dr("Cantidad").ToString.ToDecimal Importe229 = ObjOC.DtResultados.FiltroPrimeroValor("Importe229").ToDecimal * Dr("Cantidad").ToString.ToDecimal : ImporteME229 = ObjOC.DtResultados.FiltroPrimeroValor("ImporteME229").ToDecimal * Dr("Cantidad").ToString.ToDecimal : ImporteMN229 = ObjOC.DtResultados.FiltroPrimeroValor("ImporteMN229").ToDecimal * Dr("Cantidad").ToString.ToDecimal ImporteCI176 = ObjOC.DtResultados.FiltroPrimeroValor("ImporteCI176").ToDecimal + Dim tCveColectiva As Integer = ObjOC.DtResultados.FiltroPrimeroValor("CveColectiva").ToEntero CveMovimientoAlmacen = ObjOC.DtResultados.FiltroPrimeroValor("CveMovimientoAlmacen").ToEntero Dim TCAjuste As Decimal = ObjOC.DtResultados.FiltroPrimeroValor("TipoCambioAjuste").ToDecimal 'RMF. falta verificar el costo indirecto de la OC @@ -6190,8 +6195,8 @@ Partial Class Compras_Compras SumatoriaInventario += Importe228 + Importe229 'se considera costoindirecto, para que la factura tiene en un concepto tipo servicio SumatoriaOCINV += (Dr(If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 AndAlso TxtTotal.Text.ToDecimal = 0, "ImporteSinImpuestos", "Total")).ToString.ToDecimal * tipoCambioActual) - (ImporteMN228 + ImporteMN229 - ImporteCI176) - If ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, Importe228, ImporteMN228, ConceptoContabilizacionME, Referencia, Concepto, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteME:=ImporteME228, CveOCDetalle:=Dr("CveOrdenCompraDetalle").ToString.ToEntero, TipoCambio:=TCAjuste, CveMovimientoAlmacen:=CveMovimientoAlmacen, Contabilizable:=SeContabiliza) Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, Importe229, ImporteMN229, ConceptoContabilizacionMEComp, Referencia, Concepto, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteME:=ImporteME229, CveOCDetalle:=Dr("CveOrdenCompraDetalle").ToString.ToEntero, TipoCambio:=TCAjuste, CveMovimientoAlmacen:=CveMovimientoAlmacen, Contabilizable:=SeContabiliza) Then + If ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, Importe228, ImporteMN228, ConceptoContabilizacionME, Referencia, Concepto, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteME:=ImporteME228, CveOCDetalle:=Dr("CveOrdenCompraDetalle").ToString.ToEntero, TipoCambio:=TCAjuste, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveColectiva:=tCveColectiva, Contabilizable:=SeContabiliza) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, Importe229, ImporteMN229, ConceptoContabilizacionMEComp, Referencia, Concepto, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteME:=ImporteME229, CveOCDetalle:=Dr("CveOrdenCompraDetalle").ToString.ToEntero, TipoCambio:=TCAjuste, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveColectiva:=tCveColectiva, Contabilizable:=SeContabiliza) Then ErrorPrepoliza = True Exit For End If @@ -6204,7 +6209,7 @@ Partial Class Compras_Compras SumatoriaInventario += Importe176 'se considera costoindirecto, para que la factura tiene en un concepto tipo servicio SumatoriaOCINV += (Dr(If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 AndAlso TxtTotal.Text.ToDecimal = 0, "ImporteSinImpuestos", "Total")).ToString.ToDecimal * tipoCambioActual) - (ImporteMN176 - ImporteCI176) - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, Importe176, ImporteMN176, ConceptoContabilizacion, Referencia, Concepto, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteME:=ImporteME176, CveOCDetalle:=Dr("CveOrdenCompraDetalle").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimientoAlmacen, Contabilizable:=SeContabiliza) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, Importe176, ImporteMN176, ConceptoContabilizacion, Referencia, Concepto, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteME:=ImporteME176, CveOCDetalle:=Dr("CveOrdenCompraDetalle").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveColectiva:=tCveColectiva, Contabilizable:=SeContabiliza) Then ErrorPrepoliza = True Exit For End If @@ -6242,7 +6247,7 @@ Partial Class Compras_Compras tTipoMovto = False SumatoriaOCINV = -SumatoriaOCINV End If - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, tTipoMovto, SumatoriaOCINV, SumatoriaOCINV, 69, Referencia, Concepto, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveClasificacion:=CveClasificacionCostoOC, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza, CveSubProyecto:=CveSubProyecto69) Then + If Not ErrorPrepoliza AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, tTipoMovto, SumatoriaOCINV, SumatoriaOCINV, 69, Referencia, Concepto, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveClasificacion:=CveClasificacionCostoOC, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza, CveSubProyecto:=CveSubProyecto69) Then ErrorPrepoliza = True Exit For End If @@ -7007,52 +7012,52 @@ Partial Class Compras_Compras End If If HdnVCveOC.Value <> "-1" AndAlso HdnCveEstatusOC.Value <> "-1" Then - Dim ArrayCveOC As String() = HdnVCveOC.Value.Split(New Char() {","c}) - Dim ArrayCveEstatusOC As String() = HdnCveEstatusOC.Value.Split(New Char() {","c}) + Dim ArrayCveOC As String() = HdnVCveOC.Value.Split(New Char() {","c}) + Dim ArrayCveEstatusOC As String() = HdnCveEstatusOC.Value.Split(New Char() {","c}) - If ArrayCveEstatusOC.Count = ArrayCveOC.Count Then - For i As Integer = 0 To ArrayCveEstatusOC.Count - 1 - If Not ObjOC.UpdateOrdenCompraCompletada(ArrayCveEstatusOC(i).ToEntero, ArrayCveOC(i).ToEntero, UsuarioActual.CveUsuario, "Se vinculó Compra", CveCompra) Then - ErrorOC = True - Exit For + If ArrayCveEstatusOC.Count = ArrayCveOC.Count Then + For i As Integer = 0 To ArrayCveEstatusOC.Count - 1 + If Not ObjOC.UpdateOrdenCompraCompletada(ArrayCveEstatusOC(i).ToEntero, ArrayCveOC(i).ToEntero, UsuarioActual.CveUsuario, "Se vinculó Compra", CveCompra) Then + ErrorOC = True + Exit For + End If + Next + Else + ErrorOC = True + End If + + End If + + If ChkNCInvNC.Checked Then + For Each Gvr As GridViewRow In GVNCInv.Rows + If Gvr.FCTextBox("TxtCantidadNCInv").Text.ToDouble > 0 Then + If Not ObjCompras.ComprasDetalleDevolucionesAdd(Gvr.DataKey("CveCompraDetalle").ToEntero, CveCompra, Gvr.FCTextBox("TxtCantidadNCInv").Text.ToDouble, UsuarioActual.CveEmpresa) Then + ErrorMovInv = True + Exit For + End If + End If + Next + + For Each Gvr As GridViewRow In GVNCInvAlmacen.Rows + If Gvr.FCTextBox("TxtCantidadNCInv").Text.ToDouble > 0 Then + If Not ObjCompras.ComprasDetalleDevolucionesAdd(Gvr.DataKey("CveCompraDetalle").ToEntero, CveCompra, Gvr.FCTextBox("TxtCantidadNCInv").Text.ToDouble, UsuarioActual.CveEmpresa) Then + ErrorMovInv = True + Exit For + End If End If Next - Else - ErrorOC = True End If - End If - - If ChkNCInvNC.Checked Then - For Each Gvr As GridViewRow In GVNCInv.Rows - If Gvr.FCTextBox("TxtCantidadNCInv").Text.ToDouble > 0 Then - If Not ObjCompras.ComprasDetalleDevolucionesAdd(Gvr.DataKey("CveCompraDetalle").ToEntero, CveCompra, Gvr.FCTextBox("TxtCantidadNCInv").Text.ToDouble, UsuarioActual.CveEmpresa) Then - ErrorMovInv = True - Exit For - End If + 'GUARDA BITACORA TIPO CAMBIO OC + If Not ErrorOC And TipoCambioOC > 0 Then + If Not ObjEventos.AddEventoBitacora(String.Format("La vinculación con la orden de compra fue con un tipo de cambio de ${0}", TipoCambioOC.ToString), "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompra:=CveCompra) Then + ErrorOC = True End If - Next - - For Each Gvr As GridViewRow In GVNCInvAlmacen.Rows - If Gvr.FCTextBox("TxtCantidadNCInv").Text.ToDouble > 0 Then - If Not ObjCompras.ComprasDetalleDevolucionesAdd(Gvr.DataKey("CveCompraDetalle").ToEntero, CveCompra, Gvr.FCTextBox("TxtCantidadNCInv").Text.ToDouble, UsuarioActual.CveEmpresa) Then - ErrorMovInv = True - Exit For - End If - End If - Next - End If - - 'GUARDA BITACORA TIPO CAMBIO OC - If Not ErrorOC And TipoCambioOC > 0 Then - If Not ObjEventos.AddEventoBitacora(String.Format("La vinculación con la orden de compra fue con un tipo de cambio de ${0}", TipoCambioOC.ToString), "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompra:=CveCompra) Then - ErrorOC = True End If - End If 'AGREGAR OTROS GASTOS A ORDEN DE CORTE 'If CveOrdenCorte > 0 And UsuarioActual.CveEmpresa = 126 Then - ' If ObjCGame.AddCorteGasto(CveOrdenCorte, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Now, 0, CveCompra) Then + ' If ObjCGame.AddCorteGasto(CveOrdenCorte, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, NowADS(), 0, CveCompra) Then ' If Not ObjCGame.AddCorteGastoDetalle(ObjCGame.CveCorteGasto, 32, 1, TxtSubTotal.Text.ToDouble()) Then ' ErrorOtrosGastos = True ' End If @@ -7063,263 +7068,263 @@ Partial Class Compras_Compras 'CREDITO COMPRA Dim CvePrePolizaCredito As Integer = 0 - If RBLPago.SelectedValue.ToEntero = 2 AndAlso RBLContado.SelectedValue.ToEntero = 3 AndAlso DdlTipoCredito.SelectedValue.ToEntero = 1 AndAlso DdlCredito.SelectedValue.ToEntero > 0 Then + If RBLPago.SelectedValue.ToEntero = 2 AndAlso RBLContado.SelectedValue.ToEntero = 3 AndAlso DdlTipoCredito.SelectedValue.ToEntero = 1 AndAlso DdlCredito.SelectedValue.ToEntero > 0 Then - If Not ObjIE.UpdateCreditosCompra(DdlCredito.SelectedValue.ToEntero, CveCompra, UsuarioActual.CveEmpresa) Then - ErrorCreditosCompra = True - End If - - If Not ErrorCreditosCompra Then - - Dim CveConceptoPago As Integer = 17 - If CveTipoConcepto = 2 Then CveConceptoPago = 308 'cuando es acreedor - If CveMoneda > 1 Then - Select Case CveConceptoPago - Case 17 - CveConceptoPago = 312 - Case 308 - CveConceptoPago = 309 - Case Else - End Select + If Not ObjIE.UpdateCreditosCompra(DdlCredito.SelectedValue.ToEntero, CveCompra, UsuarioActual.CveEmpresa) Then + ErrorCreditosCompra = True End If - If ObjIE.GetCreditos(DdlCredito.SelectedValue.ToEntero, -1, -1, -1, -1, UsuarioActual.CveEmpresa) Then - CvePrePolizaCredito = ObjConta.AddPrePolizas("Compras/RegistrarCredito", -1, ObjIE.TotalFinanciado, ObjIE.TotalFinanciado, 1, TxtFecha.Text.ToDate, "Vinculación crédito con factura", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) - If ObjConta.AddPrePolizasDetalle(CvePrePolizaCredito, False, ObjIE.TotalFinanciado, ObjIE.TotalFinanciado, CveConceptoPago, "", "Vinculación crédito con factura", CveProveedor:=CveProveedor, CveCompra:=CveCompra) Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaCredito, True, ObjIE.TotalFinanciado, ObjIE.TotalFinanciado, 50, "", "Vinculación crédito con factura", CveProveedor:=CveProveedor, CveCompra:=CveCompra) Then + If Not ErrorCreditosCompra Then + + Dim CveConceptoPago As Integer = 17 + If CveTipoConcepto = 2 Then CveConceptoPago = 308 'cuando es acreedor + If CveMoneda > 1 Then + Select Case CveConceptoPago + Case 17 + CveConceptoPago = 312 + Case 308 + CveConceptoPago = 309 + Case Else + End Select + End If + + If ObjIE.GetCreditos(DdlCredito.SelectedValue.ToEntero, -1, -1, -1, -1, UsuarioActual.CveEmpresa) Then + CvePrePolizaCredito = ObjConta.AddPrePolizas("Compras/RegistrarCredito", -1, ObjIE.TotalFinanciado, ObjIE.TotalFinanciado, 1, TxtFecha.Text.ToDate, "Vinculación crédito con factura", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + If ObjConta.AddPrePolizasDetalle(CvePrePolizaCredito, False, ObjIE.TotalFinanciado, ObjIE.TotalFinanciado, CveConceptoPago, "", "Vinculación crédito con factura", CveProveedor:=CveProveedor, CveCompra:=CveCompra) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaCredito, True, ObjIE.TotalFinanciado, ObjIE.TotalFinanciado, 50, "", "Vinculación crédito con factura", CveProveedor:=CveProveedor, CveCompra:=CveCompra) Then + ErrorCreditosCompra = True + End If + Else ErrorCreditosCompra = True End If - Else - ErrorCreditosCompra = True - End If - - If Not ErrorCreditosCompra Then - ObjConta.PrePolizaUnificacion(CvePrePoliza, CvePrePolizaCredito) - End If - - End If - End If - - End If - - 'VALIDAR ERRORES - If ErrorAC OrElse ErrorPrepoliza OrElse ErrorPrepolizaDescuadre OrElse ErrorDetalles OrElse ErrorMovDev OrElse ErrorMovtosCxP OrElse ErrorMovtosRetIVA OrElse ErrorMovtosRetISR OrElse ErrorMovtosEstimaciones OrElse ErrorMovtosIE OrElse ErrorMovtosIVA OrElse ErrorMovInv OrElse TieneError OrElse ErrorAF OrElse ErrorOC OrElse ErrorBitacora OrElse ErrorAddAcarreos OrElse ErrorCreditosCompra Then - If ErrorDetalles Then - Alert("Ocurrió un Error al agregar un Producto o Servicio a la Factura.
    Revise su factura y cualquier detalle comuníquese a Soporte Técnico", TipoMensaje.MsgAdvertencia) - ElseIf ErrorMovtosCxP Then - Alert("Ocurrió un Error al agregar las CxP.
    Revise su factura y cualquier detalle comuníquese a Soporte Técnico", TipoMensaje.MsgAdvertencia) - ElseIf ErrorMovtosRetIVA Then - Alert("Ocurrió un Error al agregar las Retenciones de IVA.
    Revise su factura y cualquier detalle comuníquese a Soporte Técnico", TipoMensaje.MsgAdvertencia) - ElseIf ErrorMovtosRetISR Then - Alert("Ocurrió un Error al agregar las Retenciones de ISR.
    Revise su factura y cualquier detalle comuníquese a Soporte Técnico", TipoMensaje.MsgAdvertencia) - ElseIf ErrorMovtosEstimaciones Then - Alert("Ocurrió un Error al agregar las Estimaciones.
    Revise su factura y cualquier detalle comuníquese a Soporte Técnico", TipoMensaje.MsgAdvertencia) - ElseIf ErrorMovtosIE Then - Alert("Ocurrió un Error al agregar el movimiento bancario.
    Revise sus datos y cualquier detalle comuníquese a Soporte Técnico", TipoMensaje.MsgAdvertencia) - ElseIf ErrorMovtosIVA Then - Alert("Ocurrió un Error al agregar el IVA.
    Revise su factura y cualquier detalle comuníquese a Soporte Técnico", TipoMensaje.MsgAdvertencia) - ElseIf ErrorMovInv Then - Alert("Ocurrió un Error al agregar el Producto o Servicio al Inventario.
    Revise su factura y cualquier detalle comuníquese a Soporte Técnico", TipoMensaje.MsgAdvertencia) - ElseIf TieneError Then - Alert("El total de los IMPORTES del FINANCIAMIENTO debe ser mayor que 0 y menor o igual al total de la compra", TipoMensaje.MsgAdvertencia) - ElseIf ErrorAF Then - Alert("Error al actualizar la vinculacion del Activo Fijo", TipoMensaje.MsgAdvertencia) - ElseIf ErrorAC Then - Alert("Ocurrió un Error al insertar los movimientos contables.", TipoMensaje.MsgError) - GuardaLog($" Error Compras DESCRIPCIÓN DETALLADA {ErrorACMEnsaje.ToString} {vbCrLf} Usuario={UsuarioActual.CveUsuario}, Empresa={UsuarioActual.CveEmpresa}, CveFactura={CveFactura}, CveProveedor={CveProveedor}") - ElseIf ErrorPrepolizaDescuadre Then - Alert(ObjConta.MensajePolizaDescuadre, TipoMensaje.MsgError) - ElseIf ErrorPrepoliza Then - Alert("Ocurrió un Error al verificar los movimientos contables", TipoMensaje.MsgError) - ElseIf ErrorOC Then - Alert("Ocurrió un Error al vincular la Orden(es) de Compra. Por favor vuelva intentar.", TipoMensaje.MsgError) - ElseIf ErrorBitacora Then - Alert("Ocurrió un Error al guardar la refacturación.", TipoMensaje.MsgError) - ElseIf ErrorAddAcarreos Then - Alert("Ocurrio un Error al momento de agregar los acarreos.", TipoMensaje.MsgError) - ElseIf ErrorCreditosCompra Then - Alert("Ocurrió un Error al vincular la compra con el crédito.", TipoMensaje.MsgError) - ElseIf ErrorOtrosGastos Then - Alert("Ocurrió un Error al vincular la compra con la orden de corte.", TipoMensaje.MsgError) - ElseIf ErrorSATPS Then - Alert("Ocurrió un Error al actualizar el producto/servicio SAT.", TipoMensaje.MsgError) - ElseIf ErrorSaldosInvComp Then - Alert("Ocurrió un Error al validar la mercancía recibida por adelantado.", TipoMensaje.MsgError) - End If - - ViewState("CveCompra") = -1 - ObjCompras.RollBack() - If ObjContaAC IsNot Nothing Then ObjContaAC.RollBack() - CargaProveedor(CveProveedor, "-1") - Else - Dim MsgAccionAceptar As String = "" - Dim Msg As New StringBuilder - Msg.Append("La compra se registró correctamente") - - If Not ErrorPrepoliza AndAlso UsuarioActual.Empresa.TipoContabilidad = 1 AndAlso ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 4) Then - If ObjConta.ValorPolizaDescuadre > 0 Then - GuardaLogAD($"Compras/Compras-Guardar | Error{ObjConta.MensajePolizaDescuadre} Diferencia{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas") - ErrorPrepolizaDescuadre = True - End If - End If - - 'ACTUALIZA CVEFACTURA - If Request("CveFactura") IsNot Nothing Then - - If Not ObjCompras.UpdateCompraFactura(CveCompra, Request("CveFactura").ToEntero, TxtSerie.Text.Trim, TxtFolio.Text.Trim) Then - TieneError = True - End If - - If UsuarioActual.Empresa.UsaAC Then - MsgAccionAceptar = String.Format("window.opener.location.href = window.opener.location.href; window.open(""/Contabilidad/RegPoliza.aspx?IdPoliza={0}""); window.close();", IdPoliza) - Else - MsgAccionAceptar = "if (window.opener){window.opener.location.href = window.opener.location.href; window.close();}" - End If - Else - MsgAccionAceptar = "location.href =""Compras.aspx""" - End If - - 'CUANDO ES REEMBOLSO COMPROBACION Y CAJA CHICA - If UsuarioActual.CveEmpresa.Contiene(1, 119, 141, 172, 173, 174, 13, 83) AndAlso TxtNumeroReembolso.Text.Trim <> "" AndAlso (DdlPersonalReembolso.SelectedValue.ToEntero > 0 Or DdlCuentaCajaChicaReembolso.SelectedValue.ToEntero > 0) Then - If ObjCompras.GetComprobacion(DdlPersonalReembolso.SelectedValue.ToEntero, DdlCuentaCajaChicaReembolso.SelectedValue.ToEntero, TxtNumeroReembolso.Text.Trim, UsuarioActual.CveEmpresa) Then - Dim CvePreComprobacion As Integer - If ObjCompras.DtResultados.Rows.Count = 0 Then - 'sino existe, creamos la comprobacion - Dim tConcepto As String = If(DdlPersonalReembolso.SelectedValue.ToEntero > 0, DdlPersonalReembolso.SelectedItem.Text, DdlCuentaCajaChicaReembolso.SelectedItem.Text) - tConcepto = String.Format("{0}-{1}", tConcepto, TxtNumeroReembolso.Text.Trim) - - CvePreComprobacion = ObjConta.AddPrePolizas("Compras Comproba", 1, 0, 0, 1, TxtFecha.Text.ToDate, tConcepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) - - If ObjCompras.AddComprobacion(DdlPersonalReembolso.SelectedValue.ToEntero, DdlCuentaCajaChicaReembolso.SelectedValue.ToEntero, TxtNumeroReembolso.Text.Trim, CvePreComprobacion, UsuarioActual.CveEmpresa) > 0 Then + If Not ErrorCreditosCompra Then + ObjConta.PrePolizaUnificacion(CvePrePoliza, CvePrePolizaCredito) End If - Else - 'si ya existe, obtenemos la prepóliza - CvePreComprobacion = ObjCompras.DtResultados.FiltroPrimeroValor("CvePrePoliza").ToEntero + End If - - ObjConta.PrePolizaUnificacion(CvePreComprobacion, CvePrePoliza) - End If - End If - - 'AJUSTA POLIZA - If IdPoliza > 0 Then - PolizaFolio = ObjContaAC.Folio - ObjContaAC.AjustaPoliza(IdPoliza) - Msg.AppendFormat("

    Ver Póliza", IdPoliza) - End If - - If UsuarioActual.TienePermisoProceso(354) Then 'visualizar la póliza al registros - Msg.AppendFormat("

    Ver Póliza   ", CvePrePoliza) - Dim TempParametros As String = Encripta(String.Format("OP=PREPO&CvePrePoliza={0}", CvePrePoliza)) - Msg.Append($" Imprimir ") - - End If - - If CveMovimientoInventario > 0 Then - Dim TempParametros As String = Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoInventario)) - Msg.AppendFormat("
    Ver Movimiento de Almacen", CveMovimientoInventario) - Msg.AppendFormat("
    Imprimir Entrada Almacen", TempParametros) - End If - - If UsuarioActual.Empresa.TipoContabilidad = 2 Then - If Not ObjCompras.UpdateCompraPrePoliza(TxtFecha.Text.ToDate, PolizaFolio.ToString, IdPoliza, CvePrePoliza, CveCompra, 0) Then - TieneError = True - End If - End If - - If EntregaDirecta Then - Msg.AppendFormat($"
    Recibir mercancía de entrega directa.") - End If - - Dim AutoConta As Boolean = True - If (DdlPersonalReembolso.SelectedValue.ToEntero > 0 Or DdlCuentaCajaChicaReembolso.SelectedValue.ToEntero > 0 Or DdlTipoComprobante.SelectedValue = "Ant") Then - AutoConta = False - End If - - If Not ErrorPrepoliza AndAlso Not ObjConta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, Opcion:=4, AutoConta:=AutoConta) Then - TieneError = True - 'If ObjConta.ValorPolizaDescuadre > 0 Then - ' GuardaLogAD($"Compras/Compras-Guardar | Error{ObjConta.MensajePolizaDescuadre} Diferencia{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas") - ' ErrorPrepolizaDescuadre = True - 'End If - End If - - If Not TieneError Then - ObjCompras.Commit() - If ObjContaAC IsNot Nothing Then ObjContaAC.Commit() - - Dim CveEvaluacionProveedor As Integer = -1 - - If Me.RequiereEvaluacion Then - Dim ObjPro As New ClsCompProveedores() - CveEvaluacionProveedor = ObjPro.AddEvaluacionProveedor(CveProveedor, CveCompra, Now, "", Me.CveUsuarioEvaluador, "", "", UsuarioActual.CveEmpresa) - ObjPro.Dispose() End If - 'ENVIO DE CORREO NOTIFICACION A VENDEDORES DE OC - MandaCorreoOCVendedores(CveCompra) - If Not ErrorMovInv Then - For Each intMovimientoAlmacen As Integer In ListaMovimientosAlmacen - MandaCorreoOCVendedoresRecepcionAlmacen(CveCompra, intMovimientoAlmacen) - Next + End If + + 'VALIDAR ERRORES + If ErrorAC OrElse ErrorPrepoliza OrElse ErrorPrepolizaDescuadre OrElse ErrorDetalles OrElse ErrorMovDev OrElse ErrorMovtosCxP OrElse ErrorMovtosRetIVA OrElse ErrorMovtosRetISR OrElse ErrorMovtosEstimaciones OrElse ErrorMovtosIE OrElse ErrorMovtosIVA OrElse ErrorMovInv OrElse TieneError OrElse ErrorAF OrElse ErrorOC OrElse ErrorBitacora OrElse ErrorAddAcarreos OrElse ErrorCreditosCompra Then + If ErrorDetalles Then + Alert("Ocurrió un Error al agregar un Producto o Servicio a la Factura.
    Revise su factura y cualquier detalle comuníquese a Soporte Técnico", TipoMensaje.MsgAdvertencia) + ElseIf ErrorMovtosCxP Then + Alert("Ocurrió un Error al agregar las CxP.
    Revise su factura y cualquier detalle comuníquese a Soporte Técnico", TipoMensaje.MsgAdvertencia) + ElseIf ErrorMovtosRetIVA Then + Alert("Ocurrió un Error al agregar las Retenciones de IVA.
    Revise su factura y cualquier detalle comuníquese a Soporte Técnico", TipoMensaje.MsgAdvertencia) + ElseIf ErrorMovtosRetISR Then + Alert("Ocurrió un Error al agregar las Retenciones de ISR.
    Revise su factura y cualquier detalle comuníquese a Soporte Técnico", TipoMensaje.MsgAdvertencia) + ElseIf ErrorMovtosEstimaciones Then + Alert("Ocurrió un Error al agregar las Estimaciones.
    Revise su factura y cualquier detalle comuníquese a Soporte Técnico", TipoMensaje.MsgAdvertencia) + ElseIf ErrorMovtosIE Then + Alert("Ocurrió un Error al agregar el movimiento bancario.
    Revise sus datos y cualquier detalle comuníquese a Soporte Técnico", TipoMensaje.MsgAdvertencia) + ElseIf ErrorMovtosIVA Then + Alert("Ocurrió un Error al agregar el IVA.
    Revise su factura y cualquier detalle comuníquese a Soporte Técnico", TipoMensaje.MsgAdvertencia) + ElseIf ErrorMovInv Then + Alert("Ocurrió un Error al agregar el Producto o Servicio al Inventario.
    Revise su factura y cualquier detalle comuníquese a Soporte Técnico", TipoMensaje.MsgAdvertencia) + ElseIf TieneError Then + Alert("El total de los IMPORTES del FINANCIAMIENTO debe ser mayor que 0 y menor o igual al total de la compra", TipoMensaje.MsgAdvertencia) + ElseIf ErrorAF Then + Alert("Error al actualizar la vinculacion del Activo Fijo", TipoMensaje.MsgAdvertencia) + ElseIf ErrorAC Then + Alert("Ocurrió un Error al insertar los movimientos contables.", TipoMensaje.MsgError) + GuardaLog($" Error Compras DESCRIPCIÓN DETALLADA {ErrorACMEnsaje.ToString} {vbCrLf} Usuario={UsuarioActual.CveUsuario}, Empresa={UsuarioActual.CveEmpresa}, CveFactura={CveFactura}, CveProveedor={CveProveedor}") + ElseIf ErrorPrepolizaDescuadre Then + Alert(ObjConta.MensajePolizaDescuadre, TipoMensaje.MsgError) + ElseIf ErrorPrepoliza Then + Alert("Ocurrió un Error al verificar los movimientos contables", TipoMensaje.MsgError) + ElseIf ErrorOC Then + Alert("Ocurrió un Error al vincular la Orden(es) de Compra. Por favor vuelva intentar.", TipoMensaje.MsgError) + ElseIf ErrorBitacora Then + Alert("Ocurrió un Error al guardar la refacturación.", TipoMensaje.MsgError) + ElseIf ErrorAddAcarreos Then + Alert("Ocurrio un Error al momento de agregar los acarreos.", TipoMensaje.MsgError) + ElseIf ErrorCreditosCompra Then + Alert("Ocurrió un Error al vincular la compra con el crédito.", TipoMensaje.MsgError) + ElseIf ErrorOtrosGastos Then + Alert("Ocurrió un Error al vincular la compra con la orden de corte.", TipoMensaje.MsgError) + ElseIf ErrorSATPS Then + Alert("Ocurrió un Error al actualizar el producto/servicio SAT.", TipoMensaje.MsgError) + ElseIf ErrorSaldosInvComp Then + Alert("Ocurrió un Error al validar la mercancía recibida por adelantado.", TipoMensaje.MsgError) End If - If CveEvaluacionProveedor > 0 Then - Msg.Append("

    El proveedor tiene evaluaciones pendientes
    ") - Msg.Append("¿Desea realizar una evaluacion al proveedor?") - Msg.AppendFormat($"
    Evaluar Proveedor.") - End If - - BtnGuardar.Enabled = False - UpFacturar.Update() - - Alert(Msg.ToString, TipoMensaje.MsgInformacion, MsgAccionAceptar) - Else + ViewState("CveCompra") = -1 ObjCompras.RollBack() If ObjContaAC IsNot Nothing Then ObjContaAC.RollBack() - Alert("Ocurrio un error al guardar la compra. Por favor intente nuevamente.", TipoMensaje.MsgError) + CargaProveedor(CveProveedor, "-1") + Else + Dim MsgAccionAceptar As String = "" + Dim Msg As New StringBuilder + Msg.Append("La compra se registró correctamente") + + If Not ErrorPrepoliza AndAlso UsuarioActual.Empresa.TipoContabilidad = 1 AndAlso ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 4) Then + If ObjConta.ValorPolizaDescuadre > 0 Then + GuardaLogAD($"Compras/Compras-Guardar | Error{ObjConta.MensajePolizaDescuadre} Diferencia{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas") + ErrorPrepolizaDescuadre = True + End If + End If + + 'ACTUALIZA CVEFACTURA + If Request("CveFactura") IsNot Nothing Then + + If Not ObjCompras.UpdateCompraFactura(CveCompra, Request("CveFactura").ToEntero, TxtSerie.Text.Trim, TxtFolio.Text.Trim) Then + TieneError = True + End If + + If UsuarioActual.Empresa.UsaAC Then + MsgAccionAceptar = String.Format("window.opener.location.href = window.opener.location.href; window.open(""/Contabilidad/RegPoliza.aspx?IdPoliza={0}""); window.close();", IdPoliza) + Else + MsgAccionAceptar = "if (window.opener){window.opener.location.href = window.opener.location.href; window.close();}" + End If + Else + MsgAccionAceptar = "location.href =""Compras.aspx""" + End If + + 'CUANDO ES REEMBOLSO COMPROBACION Y CAJA CHICA + If UsuarioActual.CveEmpresa.Contiene(1, 119, 141, 172, 173, 174, 13, 83) AndAlso TxtNumeroReembolso.Text.Trim <> "" AndAlso (DdlPersonalReembolso.SelectedValue.ToEntero > 0 Or DdlCuentaCajaChicaReembolso.SelectedValue.ToEntero > 0) Then + If ObjCompras.GetComprobacion(DdlPersonalReembolso.SelectedValue.ToEntero, DdlCuentaCajaChicaReembolso.SelectedValue.ToEntero, TxtNumeroReembolso.Text.Trim, UsuarioActual.CveEmpresa) Then + Dim CvePreComprobacion As Integer + If ObjCompras.DtResultados.Rows.Count = 0 Then + 'sino existe, creamos la comprobacion + Dim tConcepto As String = If(DdlPersonalReembolso.SelectedValue.ToEntero > 0, DdlPersonalReembolso.SelectedItem.Text, DdlCuentaCajaChicaReembolso.SelectedItem.Text) + tConcepto = String.Format("{0}-{1}", tConcepto, TxtNumeroReembolso.Text.Trim) + + CvePreComprobacion = ObjConta.AddPrePolizas("Compras Comproba", 1, 0, 0, 1, TxtFecha.Text.ToDate, tConcepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + + If ObjCompras.AddComprobacion(DdlPersonalReembolso.SelectedValue.ToEntero, DdlCuentaCajaChicaReembolso.SelectedValue.ToEntero, TxtNumeroReembolso.Text.Trim, CvePreComprobacion, UsuarioActual.CveEmpresa) > 0 Then + + End If + Else + 'si ya existe, obtenemos la prepóliza + CvePreComprobacion = ObjCompras.DtResultados.FiltroPrimeroValor("CvePrePoliza").ToEntero + End If + + ObjConta.PrePolizaUnificacion(CvePreComprobacion, CvePrePoliza) + End If + End If + + 'AJUSTA POLIZA + If IdPoliza > 0 Then + PolizaFolio = ObjContaAC.Folio + ObjContaAC.AjustaPoliza(IdPoliza) + Msg.AppendFormat("

    Ver Póliza", IdPoliza) + End If + + If UsuarioActual.TienePermisoProceso(354) Then 'visualizar la póliza al registros + Msg.AppendFormat("

    Ver Póliza   ", CvePrePoliza) + Dim TempParametros As String = Encripta(String.Format("OP=PREPO&CvePrePoliza={0}", CvePrePoliza)) + Msg.Append($" Imprimir ") + + End If + + If CveMovimientoInventario > 0 Then + Dim TempParametros As String = Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoInventario)) + Msg.AppendFormat("
    Ver Movimiento de Almacen", CveMovimientoInventario) + Msg.AppendFormat("
    Imprimir Entrada Almacen", TempParametros) + End If + + If UsuarioActual.Empresa.TipoContabilidad = 2 Then + If Not ObjCompras.UpdateCompraPrePoliza(TxtFecha.Text.ToDate, PolizaFolio.ToString, IdPoliza, CvePrePoliza, CveCompra, 0) Then + TieneError = True + End If + End If + + If EntregaDirecta Then + Msg.AppendFormat($"
    Recibir mercancía de entrega directa.") + End If + + Dim AutoConta As Boolean = True + If (DdlPersonalReembolso.SelectedValue.ToEntero > 0 Or DdlCuentaCajaChicaReembolso.SelectedValue.ToEntero > 0 Or DdlTipoComprobante.SelectedValue = "Ant") Then + AutoConta = False + End If + + If Not ErrorPrepoliza AndAlso Not ObjConta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, Opcion:=4, AutoConta:=AutoConta) Then + TieneError = True + 'If ObjConta.ValorPolizaDescuadre > 0 Then + ' GuardaLogAD($"Compras/Compras-Guardar | Error{ObjConta.MensajePolizaDescuadre} Diferencia{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas") + ' ErrorPrepolizaDescuadre = True + 'End If + End If + + If Not TieneError Then + ObjCompras.Commit() + If ObjContaAC IsNot Nothing Then ObjContaAC.Commit() + + Dim CveEvaluacionProveedor As Integer = -1 + + If Me.RequiereEvaluacion Then + Dim ObjPro As New ClsCompProveedores() + CveEvaluacionProveedor = ObjPro.AddEvaluacionProveedor(CveProveedor, CveCompra, NowADS(), "", Me.CveUsuarioEvaluador, "", "", UsuarioActual.CveEmpresa) + ObjPro.Dispose() + End If + + 'ENVIO DE CORREO NOTIFICACION A VENDEDORES DE OC + MandaCorreoOCVendedores(CveCompra) + If Not ErrorMovInv Then + For Each intMovimientoAlmacen As Integer In ListaMovimientosAlmacen + MandaCorreoOCVendedoresRecepcionAlmacen(CveCompra, intMovimientoAlmacen) + Next + End If + + If CveEvaluacionProveedor > 0 Then + Msg.Append("

    El proveedor tiene evaluaciones pendientes
    ") + Msg.Append("¿Desea realizar una evaluacion al proveedor?") + Msg.AppendFormat($"
    Evaluar Proveedor.") + End If + + BtnGuardar.Enabled = False + UpFacturar.Update() + + Alert(Msg.ToString, TipoMensaje.MsgInformacion, MsgAccionAceptar) + Else + ObjCompras.RollBack() + If ObjContaAC IsNot Nothing Then ObjContaAC.RollBack() + Alert("Ocurrio un error al guardar la compra. Por favor intente nuevamente.", TipoMensaje.MsgError) + End If + End If + Else + ObjCompras.RollBack() + If ObjContaAC IsNot Nothing Then ObjContaAC.RollBack() + Alert("Ocurrio un error al guardar la compra. Por favor intente nuevamente.", TipoMensaje.MsgError) End If + Else + Alert("Debe seleccionar un Funcionario/Empleado o Caja Chica para Reembolsos. Por favor vuelva a intentar.", TipoMensaje.MsgError) ObjCompras.RollBack() If ObjContaAC IsNot Nothing Then ObjContaAC.RollBack() - Alert("Ocurrio un error al guardar la compra. Por favor intente nuevamente.", TipoMensaje.MsgError) End If - Else - Alert("Debe seleccionar un Funcionario/Empleado o Caja Chica para Reembolsos. Por favor vuelva a intentar.", TipoMensaje.MsgError) + Alert("Ocurrió un error al agregar el movimiento bancario.
    Revise sus datos de pago y cualquier detalle comuníquese a Soporte Técnico", TipoMensaje.MsgAdvertencia) ObjCompras.RollBack() - If ObjContaAC IsNot Nothing Then ObjContaAC.RollBack() End If - Else - Alert("Ocurrió un error al agregar el movimiento bancario.
    Revise sus datos de pago y cualquier detalle comuníquese a Soporte Técnico", TipoMensaje.MsgAdvertencia) - ObjCompras.RollBack() End If - End If - - Catch ex As Exception - ObjCompras.RollBack() - If ObjContaAC IsNot Nothing Then ObjContaAC.RollBack() - Alert("Ocurrió un error al registrar la compra. Cualquier detalle comuníquese a Soporte Técnico", TipoMensaje.MsgError) - GuardaLog($"Ocurrió un error al registrar la compra. Cualquier detalle comuníquese a Soporte Técnico : {ex}") - ViewState("CveCompra") = -1 - End Try - ObjAcar.Dispose() - ObjCompras.Dispose() - ObjConta.Dispose() - ObjIE.Dispose() - ObjInventario.Dispose() - ObjAF.Dispose() - ObjOC.Dispose() - ObjProveedores.Dispose() - ObjCGame.Dispose() - ObjProductosServicios.Dispose() + Catch ex As Exception + ObjCompras.RollBack() + If ObjContaAC IsNot Nothing Then ObjContaAC.RollBack() + Alert("Ocurrió un error al registrar la compra. Cualquier detalle comuníquese a Soporte Técnico", TipoMensaje.MsgError) + GuardaLog($"Ocurrió un error al registrar la compra. Cualquier detalle comuníquese a Soporte Técnico : {ex}") + ViewState("CveCompra") = -1 + End Try + ObjAcar.Dispose() + ObjCompras.Dispose() + ObjConta.Dispose() + ObjIE.Dispose() + ObjInventario.Dispose() + ObjAF.Dispose() + ObjOC.Dispose() + ObjProveedores.Dispose() + ObjCGame.Dispose() + ObjProductosServicios.Dispose() End If End Sub @@ -9444,7 +9449,7 @@ Partial Class Compras_Compras If ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 Then Dim Entro As Boolean = False - For Each Documento In ListaDocumentos + For Each Documento As String In ListaDocumentos If e.Row.DBCampo("UUID").ToString = Documento Then Entro = True End If @@ -9685,7 +9690,7 @@ Partial Class Compras_Compras End Sub Private Function notienepresupuesto() As Boolean - Dim notienerecursos = False + Dim notienerecursos As Boolean = False Dim SinRecursos As New StringBuilder SinRecursos.AppendFormat("No se cuenta con los Recursos Suficientes en los siguientes subproyectos ") Dim subproyectosSr As New List(Of Integer) @@ -10040,7 +10045,7 @@ Partial Class Compras_Compras End Sub Private Sub SetValues() 'Dim um As New ClsUnidadesMedida - TxtFecha.Text = Now.ToShortDateString() + TxtFecha.Text = NowADS().ToShortDateString() LblUsuarioCaptura.Text = UsuarioActual.Usuario DdlProveedor.Attributes.Add("onclick", "CargaProveedores();") 'DdlFuncionarioEmpleado.Attributes.Add("onclick", "CargaFuncionariosEmpleados();") @@ -12608,7 +12613,7 @@ Partial Class Compras_Compras If ObjInventario.GetExistenciasProducto(Dr.DataKey("CvePS").ToString.ToEntero, Dr.DataKey("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, CveAlmacen, - FechaMovto:=TxtFecha.Text.ToDateTime.AddHours(Now.Hour).AddMinutes(Now.Minute).AddSeconds(Now.Second).ToString("yyyy/MM/dd HH:mm")) Then + FechaMovto:=TxtFecha.Text.ToDateTime.AddHours(NowADS().Hour).AddMinutes(NowADS().Minute).AddSeconds(NowADS().Second).ToString("yyyy/MM/dd HH:mm")) Then Dim Existencia As Decimal = ObjInventario.DtResultados.FiltroPrimeroValor("ExistenciaFinal", String.Format("CveAlmacen = {0}", CveAlmacen)).ToDecimal @@ -12699,7 +12704,7 @@ Partial Class Compras_Compras ' Dim ObjInventario As New ClsInventarios() ' Dim cvecompra As Integer = 5221 ' Dim subtotal As Double = TextBox1.Text.ToDouble - ' guardardevolucion(ObjInventario, cvecompra, subtotal, Now.ToDate) + ' guardardevolucion(ObjInventario, cvecompra, subtotal, NowADS().ToDate) 'End Sub Protected Sub BtnVinculaDevolucion_Click(sender As Object, e As EventArgs) Try @@ -13562,6 +13567,12 @@ Partial Class Compras_Compras Alert("Debe de Seleccionar un proveedor") Exit Sub End If + Dim tCveProveedor As Integer = CveProveedor + + 'código para cambiar de proveedor a la oc, para caso 172 + If UsuarioActual.Empresa.Funcionalidad(267) = "1" AndAlso HdnCveProveedorOC.Value.ToEntero > 0 Then + tCveProveedor = HdnCveProveedorOC.Value.ToEntero + End If 'BANDERA DE SURTIDO If UsuarioActual.Empresa.Funcionalidad(131).ToEntero > 0 Then @@ -13581,7 +13592,7 @@ Partial Class Compras_Compras If PopUpOC Then Dim ArrayCveOC As String() = CvesOC.Split(New Char() {","c}) For i As Integer = 0 To ArrayCveOC.Count - 1 - If OC.GetOrdenesCompraRep("OC", -1, -1, -1, -1, MinFecha, MaxFecha, ArrayCveOC(i).ToEntero, CveProveedor, -1, -1, -1, UsuarioActual.CveEmpresa, -1) Then + If OC.GetOrdenesCompraRep("OC", -1, -1, -1, -1, MinFecha, MaxFecha, ArrayCveOC(i).ToEntero, tCveProveedor, -1, -1, -1, UsuarioActual.CveEmpresa, -1) Then If OC.DtResultados.FiltraParametros("TipoTermino = 3").Rows.Count = 1 Or DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") Then HdnVCveOC.Value += String.Format("{0}{1}", If(HdnVCveOC.Value <> "", ",", ""), OC.DtResultados.Rows(0)("CveOrdenCompra").ToString) HdnCveEstatusOC.Value += String.Format("{0}{1}", If(HdnCveEstatusOC.Value <> "", ",", ""), OC.DtResultados.Rows(0)("CveEstatusSiguiente").ToString) @@ -15395,15 +15406,15 @@ Partial Class Compras_Compras #Region " CIERRE PERIODO " Private Function ValidaCierrePeriodo() As Boolean 'solo se permiten, mes actual, mes anterior <= #dias - Dim mesesTrans As Integer = DateDiff(DateInterval.Month, TxtFecha.Text.ToDate, Now).ToEntero + Dim mesesTrans As Integer = DateDiff(DateInterval.Month, TxtFecha.Text.ToDate, NowADS()).ToEntero - If mesesTrans = 0 OrElse (mesesTrans = 1 AndAlso Day(Now) <= UsuarioActual.Empresa.Funcionalidad(123).ToEntero) Then + If mesesTrans = 0 OrElse (mesesTrans = 1 AndAlso Day(NowADS()) <= UsuarioActual.Empresa.Funcionalidad(123).ToEntero) Then Return True End If Return False - 'Dim mesesTrans As Integer = DateDiff(DateInterval.Month, TxtFecha.Text.ToDate, Now).ToEntero - 'If mesesTrans > 1 OrElse Day(Now) >= UsuarioActual.Empresa.Funcionalidad(123).ToEntero Then + 'Dim mesesTrans As Integer = DateDiff(DateInterval.Month, TxtFecha.Text.ToDate, NowADS()).ToEntero + 'If mesesTrans > 1 OrElse Day(NowADS()) >= UsuarioActual.Empresa.Funcionalidad(123).ToEntero Then ' Return True 'End If 'Return False @@ -15495,7 +15506,7 @@ Partial Class Compras_Compras DtDatosDetalle.Rows.Add(Row) TxtSerieLote.Text = "" - TxtFechaCaducidad.Text = Now.ToShortDateString + TxtFechaCaducidad.Text = NowADS().ToShortDateString CargaSerie() End Sub @@ -16450,7 +16461,7 @@ Partial Class Compras_Compras Autorizado = ObjCon.DtResultados.FiltraParametros($"CveClasificacion = {DdlClasificacion.SelectedValue.ToEntero} AND CveTipoGasto = {DdlTipoGasto.SelectedValue.ToEntero} AND Importe > 0").Rows(0)("Importe").ToString.ToDouble End If End If - If ObjCon.GetPresupuestosRep(CvePresupuesto, DdlTipoGasto.SelectedValue.ToEntero, 1, $"01/09/{DateTime.Now.Year - 1}".ToDate, Now, UsuarioActual.CveEmpresa, DdlProyecto.SelectedValue.ToEntero, + If ObjCon.GetPresupuestosRep(CvePresupuesto, DdlTipoGasto.SelectedValue.ToEntero, 1, $"01/09/{NowADS().Year - 1}".ToDate, NowADS(), UsuarioActual.CveEmpresa, DdlProyecto.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveUsuario, DdlClasificacion.SelectedValue.ToEntero) Then If ObjCon.DtResultados.Rows.Count > 0 Then Ejercido = ObjCon.DtResultados.Rows(0)("Ejercido").ToString.ToDouble @@ -16600,7 +16611,7 @@ Partial Class Compras_Compras End If Dim CveCompraDetalleDesvicnualarAF As Integer = TmpDT.FiltroPrimeroValor("CveCompraDetalle", $"Consec={Index}").ToEntero - 'If ObjAF.UpdateActivosFijosCompra(-1, CveCompraDetalleDesvicnualarAF, -1, 0, Now, Opcion:=2) Then + 'If ObjAF.UpdateActivosFijosCompra(-1, CveCompraDetalleDesvicnualarAF, -1, 0, NowADS(), Opcion:=2) Then For Each dRow As DataRow In TmpDT.Rows @@ -17792,7 +17803,7 @@ Partial Class Compras_Compras Dim ObjCompras As New ClsCompras Dim ObjConta As New ClsContabilidad(ObjCompras.IniciaTransacSQL) - Dim TieneError = False + Dim TieneError As Boolean = False For Each Gvr As GridViewRow In GVNCInv.Rows If Gvr.FCTextBox("TxtCantidadNCInv").Text.ToDouble > 0 Then @@ -17820,18 +17831,18 @@ Partial Class Compras_Compras Protected Sub BtnNCInvAlmacen_Click(sender As Object, e As EventArgs) ' se comenta RMF.2023/09/08, genera negativos en el rep recibir oc - 'Dim i As Integer = 0 - 'For Each Gvr As GridViewRow In GVNCInvAlmacen.Rows - ' If Gvr.FCTextBox("TxtCantidadNCInv").Text.ToDouble > 0 Then - ' If i < TmpDT.Rows.Count Then - ' TmpDT.Rows(i)("CveOrdenCompraDetalle") = Gvr.DataKey("CveOrdenCompraDetalle") - ' End If - ' 'If Not ObjCompras.ComprasDetalleDevolucionesAdd(Gvr.DataKey("CveCompraDetalle").ToEntero, Gvr.DataKey("CveCompra").ToEntero, Gvr.FCTextBox("TxtCantidadNCInv").Text.ToDouble, UsuarioActual.CveEmpresa) Then - ' ' TieneError = True - ' ' Exit For - ' 'End If - ' End If - 'Next + Dim i As Integer = 0 + For Each Gvr As GridViewRow In GVNCInvAlmacen.Rows + If Gvr.FCTextBox("TxtCantidadNCInv").Text.ToDouble > 0 Then + If i < TmpDT.Rows.Count Then + TmpDT.Rows(i)("CveOrdenCompraDetalle") = Gvr.DataKey("CveOrdenCompraDetalle") + End If + 'If Not ObjCompras.ComprasDetalleDevolucionesAdd(Gvr.DataKey("CveCompraDetalle").ToEntero, Gvr.DataKey("CveCompra").ToEntero, Gvr.FCTextBox("TxtCantidadNCInv").Text.ToDouble, UsuarioActual.CveEmpresa) Then + ' TieneError = True + ' Exit For + 'End If + End If + Next RegistraScript("$('#FacturaNC').modal('hide');", "ModalNCInv") End Sub @@ -17956,8 +17967,8 @@ Partial Class Compras_Compras 'CTA PROVEEDOR Select Case RBLContado.SelectedValue - Case "4" ' Deudores - CveProveedorConcepto = DdlDeudor.SelectedValue.ToEntero + 'Case "4" ' Deudores + ' CveProveedorConcepto = DdlDeudor.SelectedValue.ToEntero Case "5" ' Acreedores CveProveedorConcepto = DdlAcreedor.SelectedValue.ToEntero Case Else ' Proveedores - F y E - Doctos @@ -18057,7 +18068,7 @@ Partial Class Compras_Compras For Each Row2 As DataRow In DT.Rows ImporteMovimiento = DtTemporal.SUM("Total", String.Format("ISNULL(TipoAF,0) <> 2 AND ISNULL(CveAlmacen,0) = 0 AND ISNULL(AplicaCostoIndirecto,0) <> 1 AND CveClasificacion = {0} AND CveSubProyecto = {1}", Row2("CveClasificacion"), Row2("CveSubProyecto"))).ToString.ToDecimal - ImporteAlmacen = DtTemporal.SUM("ImporteEnAlmacen", String.Format("ISNULL(TipoAF,0) <> 2 AND CveClasificacion = {0} AND CveSubProyecto = {1}", Row2("CveClasificacion"), Row2("CveSubProyecto"))).ToString.ToDecimal + ImporteAlmacen = DtTemporal.SUM("ImporteEnAlmacen", String.Format("ISNULL(TipoAF,0) <> 2 AND CveClasificacion = {0} AND CveSubProyecto = {1}", Row2("CveClasificacion"), Row2("CveSubProyecto"))).ToString.ToDecimal ImporteMovimiento = (ImporteMovimiento - ImporteAlmacen) * Multiplicador importeMN = ImporteMovimiento * TipoCambioActual @@ -18140,14 +18151,18 @@ Partial Class Compras_Compras #End Region #Region "DEDUCCIONES IEPS / OTROS IMPUESTOS" - Protected Sub CargaProductos(Ddl As DropDownList, CvePS As Integer) + Protected Sub CargaProductos(Ddl As DropDownList, CvePS As Integer, Optional OpIncluirIEPSEnProducto As Boolean = False) Ddl.DataSource = TmpDT Ddl.DataBind() Ddl.Items.Insert(0, New ListItem("Seleccione un concepto", "-1")) Ddl.SelectedValueExist("-1") If CvePS > 0 Then - Ddl.Items.Insert(1, New ListItem(GlobalDTPS(UsuarioActual.CveEmpresa, CvePS).FiltroPrimeroValor("PS"), CvePS.ToString)) + Ddl.Items.Insert(1, New ListItem(GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS).FiltroPrimeroValor("PSCodigo"), CvePS.ToString)) + End If + + If OpIncluirIEPSEnProducto Then + Ddl.Items.Add(New ListItem("Incluir en Producto", "-2")) End If 'Ddl.Items.Insert(1, New ListItem(Concepto, "-1")) @@ -18166,15 +18181,28 @@ Partial Class Compras_Compras If IEPSGasto Then Dim CvePS As Integer = DdlConceptoIEPS.SelectedValue.ToEntero ' If CvePS = -1 Then CvePS = UsuarioActual.Empresa.Funcionalidad(112).ToString.ToEntero - AgregarConceptoIEPS(TrasladoIEPS, CvePS) + If CvePS = -2 Then 'opción Incluir en producto + For Each Dr As DataRow In TmpDT.Rows + If Dr("IVA").ToString.ToDecimal = 0 Then + Dr("PU") = ((Dr("IEPSPS").ToString.ToDecimal / Dr("Cantidad").ToString.ToDecimal) + Dr("Pu").ToString.ToDecimal).RoundSQL(6) + Dr("IEPSPS") = 0 + Dr("IEPSPSPorcentaje") = 0 + Dr("Total") = (Dr("PU").ToString.ToDecimal * Dr("Cantidad").ToString.ToDecimal - Dr("Descuento").ToString.ToDecimal) + End If + Next + CalculaTotales(True) + Else + AgregarConceptoIEPS(TrasladoIEPS, CvePS) + + For Each Dr As DataRow In TmpDT.Rows + Dr("IEPSPS") = 0 + Dr("IEPSPSPorcentaje") = 0 + Next + End If TrasladoIEPS = 0 TxtIEPS.Text = 0.ToString.FormatoNumero TrIEPS.Visible = False - For Each Dr As DataRow In TmpDT.Rows - Dr("IEPSPS") = 0 - Dr("IEPSPSPorcentaje") = 0 - Next TmpDT.AcceptChanges() End If 'AGREGA OTROS IMPUESTOS COMO CONCEPTO @@ -18182,7 +18210,6 @@ Partial Class Compras_Compras Dim CvePS As Integer = DdlConceptoOI.SelectedValue.ToEntero 'If CvePS = -1 Then CvePS = UsuarioActual.Empresa.Funcionalidad(305).ToString.ToEntero AgregarConceptoIEPS(OtrosImpuestos, CvePS) - OtrosImpuestos = 0 TxtOtrosImpuestos.Text = 0.ToString.FormatoNumero TrOtrosImpuestos.Visible = False @@ -18195,7 +18222,6 @@ Partial Class Compras_Compras Alert("Debe seleccionar al menos un impuesto", TipoMensaje.MsgAdvertencia) End If - MostrarOcultarColumnaIEPS() AddPS2() End Sub @@ -18453,7 +18479,7 @@ Partial Class Compras_Compras Private Sub CargaModalFletesImportaciones() - TxtFechaModalImportacionesFletes.Text = Now.ToShortDateString + TxtFechaModalImportacionesFletes.Text = NowADS().ToShortDateString TxtDescripcionModalFletesImportacion.Text = "" TxtPedimento.Text = "" RblTipo.SelectedValue = "1" @@ -18532,7 +18558,7 @@ Partial Class Compras_Compras Case 240 DdlImportaciones.SelectedValueExist(CveImportacion) End Select - TxtFechaModalImportacionesFletes.Text = Now.ToShortDateString + TxtFechaModalImportacionesFletes.Text = NowADS().ToShortDateString TxtDescripcionModalFletesImportacion.Text = "" TxtPedimento.Text = "" UpModalFletesImportaciones.Update() @@ -18592,7 +18618,7 @@ Partial Class Compras_Compras Dim CveProveedorSucursal As Integer = -1 Dim CveProveedorContacto As Integer = -1 Dim Retorno As Boolean = True - Dim CveProveedor As Integer = -1 + Dim tCveProveedor As Integer = -1 Dim GeneraReq As Boolean = False Dim IDPoliza As Integer = 0 @@ -18613,6 +18639,8 @@ Partial Class Compras_Compras DtInvOCDiferencias.Columns.Add("FolioAlmacen", GetType(String)) DtInvOCDiferencias.Columns.Add("TipoCambioAjuste", GetType(Double)) DtInvOCDiferencias.Columns.Add("ConceptoSalida", GetType(Integer)) + DtInvOCDiferencias.Columns.Add("CveClasificacion", GetType(Integer)) + DtInvOCDiferencias.Columns.Add("CveColectiva", GetType(Integer)) DtInvOCDiferencias.Columns.Add("PS", GetType(String)) @@ -18631,6 +18659,8 @@ Partial Class Compras_Compras DrInvOCDiferencias("Diferencia") = diferencia.RoundSQL() DrInvOCDiferencias("PUCompra") = Math.Round(gvr.FCTextBox("TxtPU").Text.ToDecimal, 6) DrInvOCDiferencias("CveMoneda") = dr2("CveMoneda").ToString.ToEntero + DrInvOCDiferencias("CveClasificacion") = dr2("CveClasificacion").ToString.ToEntero + DrInvOCDiferencias("CveColectiva") = dr2("CveColectiva").ToString.ToEntero DrInvOCDiferencias("FolioOC") = dr2("FolioOC").ToString DrInvOCDiferencias("CveProveedor") = dr2("CveProveedorOC").ToString.ToEntero DrInvOCDiferencias("PS") = dr2("PS").ToString @@ -18684,6 +18714,7 @@ Partial Class Compras_Compras Dim DiferenciaInvOC As Decimal = 0.0D Dim CveMovimientoAlmacen As Integer = -1 Dim CveOCDetalle As Integer = -1 + Dim CveColectiva As Integer = -1 Dim CveAlmacen As Integer = -1 Dim Fecha As Date = TxtFecha.Text.ToDate Dim CveProveedorInvOC As Integer = -1 @@ -18700,55 +18731,65 @@ Partial Class Compras_Compras Dim PUCompra As Decimal = 0.0D Dim CveMoneda As Integer = 1 Dim PS As String = "" + Dim TipoMovtoCosto As Boolean = True + + tCveProveedor = DtInvOCDiferencias.MAX("CveProveedor").ToEntero + ProveedorNombre = GlobalDTCompProveedores(UsuarioActual.CveEmpresa).FiltroPrimeroValor("RazonSocial", $"CveProveedor = {tCveProveedor}").ToString + Fecha = TxtFecha.Text.ToDate + CvePrePoliza = ObjConta.AddPrePolizas("Compras/OC-(OCAlmacen)", 74, 0, 0, 1, Fecha, ProveedorNombre, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + + If CvePrePoliza > 0 Then + + 'AJUSTES EN PREPOLIZA - SALIDA CONTABLE (CON SALIDA DE VENTA O SIN SALIDA) + For Each DrDiferencias As DataRow In DtInvOCDiferencias.FiltraParametros("ConceptoSalida IN (0,1)").Rows + CveOrdenCompra = DrDiferencias("CveOrdenCompra").ToString.ToEntero + CveOCDetalle = DrDiferencias("CveOrdenCompraDetalle").ToString.ToEntero + CveMoneda = DrDiferencias("CveMoneda").ToString.ToEntero + DiferenciaInvOC = DrDiferencias("Diferencia").ToString.ToDecimal.RoundSQL() + PUCompra = DrDiferencias("PUCompra").ToString.ToDecimal + CveColectiva = DrDiferencias("CveColectiva").ToString.ToEntero + PS = DrDiferencias("PS").ToString - 'AJUSTES EN PREPOLIZA - SALIDA CONTABLE (CON SALIDA DE VENTA O SIN SALIDA) - For Each DrDiferencias As DataRow In DtInvOCDiferencias.FiltraParametros("ConceptoSalida IN (0,1)").Rows - CveOrdenCompra = DrDiferencias("CveOrdenCompra").ToString.ToEntero - CveOCDetalle = DrDiferencias("CveOrdenCompraDetalle").ToString.ToEntero - CveMoneda = DrDiferencias("CveMoneda").ToString.ToEntero - DiferenciaInvOC = DrDiferencias("Diferencia").ToString.ToDecimal.RoundSQL() - PUCompra = DrDiferencias("PUCompra").ToString.ToDecimal - PS = DrDiferencias("PS").ToString + SerieFolio = $"OC: {DrDiferencias("FolioOC").ToString}" + tCveProveedor = DrDiferencias("CveProveedor").ToString.ToEntero + Dim ConceptoPartida As String = String.Format("{0} OC: {1} Inv: {2}", ProveedorNombre, DrDiferencias("FolioOC"), DrDiferencias("FolioAlmacen")) - Fecha = TxtFecha.Text.ToDate - SerieFolio = $"OC: {DrDiferencias("FolioOC").ToString}" - CveProveedor = DrDiferencias("CveProveedor").ToString.ToEntero - ProveedorNombre = GlobalDTCompProveedores(UsuarioActual.CveEmpresa).FiltroPrimeroValor("RazonSocial", $"CveProveedor = {CveProveedor}").ToString - Dim ConceptoPartida As String = String.Format("{0} OC: {1} Inv: {2}", ProveedorNombre, DrDiferencias("FolioOC"), DrDiferencias("FolioAlmacen")) + ConceptoSalida = DrDiferencias("ConceptoSalida").ToString.ToEntero + CveAlmacen = DrDiferencias("CveAlmacen").ToString.ToEntero + CveMovimientoAlmacen = DrDiferencias("CveMovimiento").ToString.ToEntero + TCInvOC = DrDiferencias("TipoCambioAjuste").ToString.ToDecimal - ConceptoSalida = DrDiferencias("ConceptoSalida").ToString.ToEntero - CveAlmacen = DrDiferencias("CveAlmacen").ToString.ToEntero - CveMovimientoAlmacen = DrDiferencias("CveMovimiento").ToString.ToEntero - TCInvOC = DrDiferencias("TipoCambioAjuste").ToString.ToDecimal + Dim CveClasificacionCostoOC As Integer = TmpDT.FiltroPrimeroValor("CveClasificacion", "ISNULL(TipoAF, 0) <> 2 And ISNULL(CveAlmacen, 0) = 0 And ISNULL(AplicaCostoIndirecto, 0) <> 1 And ISNULL(CveTipoPS, 0) = 2").ToEntero + Dim CveSubProyecto As Integer = TmpDT.MAX("CveSubProyecto").ToEntero - Dim CveClasificacionCostoOC As Integer = TmpDT.FiltroPrimeroValor("CveClasificacion", "ISNULL(TipoAF, 0) <> 2 And ISNULL(CveAlmacen, 0) = 0 And ISNULL(AplicaCostoIndirecto, 0) <> 1 And ISNULL(CveTipoPS, 0) = 2").ToEntero - Dim CveSubProyecto As Integer = TmpDT.MAX("CveSubProyecto").ToEntero + If DiferenciaInvOC.RoundSQL() <> 0 Then - If DiferenciaInvOC.RoundSQL() <> 0 Then + If CveSubProyecto <= 0 Then + Alert("Debe de asignar un sub proyecto o centro de costos.", TipoMensaje.MsgAdvertencia) + Retorno = False + End If - If CveSubProyecto <= 0 Then - Alert("Debe de asignar un sub proyecto o centro de costos.", TipoMensaje.MsgAdvertencia) - Retorno = False - End If + If CvePrePoliza > 0 Then - CvePrePoliza = ObjConta.AddPrePolizas("Compras/OC-(OCAlmacen)", 74, DiferenciaInvOC, DiferenciaInvOC, 1, Fecha, ConceptoPartida, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) - If CvePrePoliza > 0 Then + If CveMoneda = 2 Then + ImporteME = (DiferenciaInvOC / TCInvOC).RoundAD() + ImporteMEComp = ((ImporteME * TCInvOC) - ImporteME).RoundAD() - If CveMoneda = 2 Then - ImporteME = (DiferenciaInvOC / TCInvOC).RoundAD() - ImporteMEComp = ((ImporteME * TCInvOC) - ImporteME).RoundAD() + Dim DifImporte As Decimal = DiferenciaInvOC - (ImporteME + ImporteMEComp) - Dim DifImporte As Decimal = DiferenciaInvOC - (ImporteME + ImporteMEComp) + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoCosto, -DiferenciaInvOC, -DiferenciaInvOC, 177, SerieFolio, ConceptoPartida, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveOC:=CveOrdenCompra, CveOCDetalle:=CveOCDetalle, CveSubProyecto:=CveSubProyecto) Then + Retorno = False + Exit For + End If - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, -DiferenciaInvOC, -DiferenciaInvOC, 177, SerieFolio, ConceptoPartida, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveOC:=CveOrdenCompra, CveOCDetalle:=CveOCDetalle, CveSubProyecto:=CveSubProyecto) Then - Retorno = False - Exit For - End If - - If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteME, ImporteME, 228, SerieFolio, ConceptoPartida, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveOC:=CveOrdenCompra, ImporteME:=ImporteME, TipoCambio:=TCInvOC, CveOCDetalle:=CveOCDetalle) Then - If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMEComp, ImporteMEComp, 229, SerieFolio, ConceptoPartida, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveOC:=CveOrdenCompra, ImporteME:=ImporteME, TipoCambio:=TCInvOC, CveOCDetalle:=CveOCDetalle) Then - If DifImporte <> 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, DifImporte, DifImporte, 69, SerieFolio, ConceptoPartida, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveOC:=CveOrdenCompra, ImporteME:=DifImporte, TipoCambio:=TCInvOC, CveOCDetalle:=CveOCDetalle, CveClasificacion:=CveClasificacionCostoOC, CveSubProyecto:=CveSubProyecto) Then + If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteME, ImporteME, 228, SerieFolio, ConceptoPartida, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveOC:=CveOrdenCompra, ImporteME:=ImporteME, TipoCambio:=TCInvOC, CveOCDetalle:=CveOCDetalle) Then + If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMEComp, ImporteMEComp, 229, SerieFolio, ConceptoPartida, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveOC:=CveOrdenCompra, ImporteME:=ImporteME, TipoCambio:=TCInvOC, CveOCDetalle:=CveOCDetalle) Then + If DifImporte <> 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoCosto, DifImporte, DifImporte, 69, SerieFolio, ConceptoPartida, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveOC:=CveOrdenCompra, ImporteME:=DifImporte, TipoCambio:=TCInvOC, CveOCDetalle:=CveOCDetalle, CveClasificacion:=CveClasificacionCostoOC, CveSubProyecto:=CveSubProyecto) Then + Retorno = False + Exit For + End If + Else Retorno = False Exit For End If @@ -18757,35 +18798,34 @@ Partial Class Compras_Compras Exit For End If Else - Retorno = False - Exit For - End If - Else - '2018.11.24 se cambia concepto 177, de cargo a abono negativo., petición MALL - If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, -DiferenciaInvOC, -DiferenciaInvOC, If(ConceptoSalida = 0, 177, 177), SerieFolio, ConceptoPartida, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveOC:=CveOrdenCompra, CveOCDetalle:=CveOCDetalle, CveSubProyecto:=CveSubProyecto) Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, DiferenciaInvOC, DiferenciaInvOC, 176, SerieFolio, ConceptoPartida, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveOC:=CveOrdenCompra, CveOCDetalle:=CveOCDetalle) Then + '2018.11.24 se cambia concepto 177, de cargo a abono negativo., petición MALL + If ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoCosto, -DiferenciaInvOC, -DiferenciaInvOC, If(ConceptoSalida = 0, 177, 177), SerieFolio, ConceptoPartida, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveOC:=CveOrdenCompra, CveOCDetalle:=CveOCDetalle, CveSubProyecto:=CveSubProyecto, CveClasificacion:=CveClasificacionCostoOC) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, DiferenciaInvOC, DiferenciaInvOC, 176, SerieFolio, ConceptoPartida, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveOC:=CveOrdenCompra, CveOCDetalle:=CveOCDetalle, CveColectiva:=CveColectiva) Then + Retorno = False + Exit For + End If + Else Retorno = False Exit For End If - Else + End If + If Not OC.UpdateOrdenCompraDetalleAjuste(CveOrdenCompra, CveOCDetalle, PUCompra, UsuarioActual.CveUsuario) Then Retorno = False Exit For End If - End If - If Not OC.UpdateOrdenCompraDetalleAjuste(CveOrdenCompra, CveOCDetalle, PUCompra, UsuarioActual.CveUsuario) Then - Retorno = False - Exit For - End If - If Retorno Then - If Not OCBitacora.AddEventoBitacora(String.Format("Se registró una póliza de ajuste por cambio de precio en producto: {0}", PS), "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveOC:=CveOrdenCompra) Then - Retorno = False + If Retorno Then + If Not OCBitacora.AddEventoBitacora(String.Format("Se registró una póliza de ajuste por cambio de precio en producto: {0}", PS), "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveOC:=CveOrdenCompra) Then + Retorno = False + End If End If End If End If - End If - Next - + Next + Else + Alert("prepóliza de ajuste no registrada.", TipoMensaje.MsgAdvertencia) + Retorno = False + End If End If End If diff --git a/Compras/EvaluacionProveedor.aspx.vb b/Compras/EvaluacionProveedor.aspx.vb index 517bedcec..d755d2df7 100644 --- a/Compras/EvaluacionProveedor.aspx.vb +++ b/Compras/EvaluacionProveedor.aspx.vb @@ -85,7 +85,7 @@ Partial Class Compras_EvaluacionProveedor TxtSerieFolio.Text = "" TxtPS.Text = "" TxtCodigo.Text = "" - TxtFecha.Text = Now.ToString("dd/MM/yyyy") + TxtFecha.Text = NowADS().ToString("dd/MM/yyyy") TxtFirma.Text = UsuarioActual.Nombre TxtCalificacion.Text = "" @@ -147,14 +147,14 @@ Partial Class Compras_EvaluacionProveedor TxtRS.Text = Row.DataKey("RazonSocial") TxtCodigo.Text = Row.DataKey("Codigo") - TxtFecha.Text = Now.ToString("dd/MM/yyyy") + TxtFecha.Text = NowADS().ToString("dd/MM/yyyy") UpEvaluacion.Update() RegistraScript("$('#DvEvaluacion').modal('show');IniciarCalculo();") End Sub Protected Sub BtnEvaluarProveedor_Click(sender As Object, e As EventArgs) CalcularCalificacion() - Dim Fecha = Now + Dim Fecha = NowADS() Dim Mes = Fecha.ToString("MMMM", New CultureInfo("es-MX")) Dim Obs = TxtObs.Text.Trim() @@ -287,7 +287,7 @@ Partial Class Compras_EvaluacionProveedor Dim PathRoot As String = ModExtensiones.DirectorioBaseEmpresas Dim Documento As String = "CartaProveedor.docx" Dim PathSource As String = $"{UsuarioActual.Empresa.Ruta}\Formatos\Plantillas\{Documento}" - Dim PathDestino As String = PathRoot & "Temp\" & Now.Ticks & Documento + Dim PathDestino As String = PathRoot & "Temp\" & NowADS().Ticks & Documento If File.Exists(PathDestino) Then File.Delete(PathDestino) @@ -321,7 +321,7 @@ Partial Class Compras_EvaluacionProveedor Dim PathRoot As String = ModExtensiones.DirectorioBaseEmpresas Dim Documento As String = "FormatoEvaluacionProveedor.docx" Dim PathSource As String = $"{UsuarioActual.Empresa.Ruta}\Formatos\Plantillas\{Documento}" - Dim PathDestino As String = PathRoot & "Temp\" & Now.Ticks & Documento + Dim PathDestino As String = PathRoot & "Temp\" & NowADS().Ticks & Documento If File.Exists(PathDestino) Then File.Delete(PathDestino) @@ -354,7 +354,7 @@ Partial Class Compras_EvaluacionProveedor ListaTagsDocumentost.Add(New TagsDocumentos("{{Proveedor}}", Proveedor)) ListaTagsDocumentost.Add(New TagsDocumentos("{{Dia}}", Dia)) ListaTagsDocumentost.Add(New TagsDocumentos("{{Mes}}", Mes)) - ListaTagsDocumentost.Add(New TagsDocumentos("{{Anio}}", Now.Year.ToString)) + ListaTagsDocumentost.Add(New TagsDocumentos("{{Anio}}", NowADS().Year.ToString)) ListaTagsDocumentost.Add(New TagsDocumentos("{{Calificacion}}", Calificacion)) ListaTagsDocumentost.Add(New TagsDocumentos("{{Resultado}}", Resultado)) 'ListaTagsDocumentost.Add(New TagsDocumentos("{{Usuario}}", UsuarioActual.Nombre)) diff --git a/Compras/Importaciones.aspx.vb b/Compras/Importaciones.aspx.vb index 6b3621f02..cc2a0d2a9 100644 --- a/Compras/Importaciones.aspx.vb +++ b/Compras/Importaciones.aspx.vb @@ -65,7 +65,7 @@ Partial Class Compras_Importaciones DdlProveedores.SelectedText = "Todos" DdlProveedores.SelectedValue = "-1" - TxtFecha.Text = Now.ToShortDateString + TxtFecha.Text = NowADS().ToShortDateString End Sub #End Region diff --git a/Compras/PopUpBuscarFolioC.aspx.vb b/Compras/PopUpBuscarFolioC.aspx.vb index 40c5d023f..b567dfaf0 100644 --- a/Compras/PopUpBuscarFolioC.aspx.vb +++ b/Compras/PopUpBuscarFolioC.aspx.vb @@ -28,8 +28,8 @@ Partial Class Compras_PopUpBuscarFolioC 'RegistraScript("$get('tdContenido').style.height='470px'") CargaProveedor() - txtFechaI.Text = Now.AddDays(-30).ToShortDateString - txtFechaI.Text = Now.AddYears(-1).ToShortDateString + txtFechaI.Text = NowADS().AddDays(-30).ToShortDateString + txtFechaI.Text = NowADS().AddYears(-1).ToShortDateString If Request("Opt") = "Fact" Then ViewState("Opt") = "MandaCveCompra" diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index 5ab388631..fc8cd8d8b 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -1338,9 +1338,9 @@ Partial Class PopUpVerFactura Dim AplicaPagare As String = If(UrlParametros("PAG") IsNot Nothing AndAlso UrlParametros("PAG").ToString <> "", UrlParametros("PAG").ToString, "0") Dim Guardar As Boolean = UrlParametros("GUARDAR") IsNot Nothing AndAlso UrlParametros("GUARDAR").ToString() = "1" Dim RegenerarPDF As Boolean = UrlParametros("REGENERAR") IsNot Nothing AndAlso UrlParametros("REGENERAR").ToString() = "1" - Dim STIMULSOFT As Boolean = UrlParametros("STIMULSOFT") IsNot Nothing AndAlso UrlParametros("STIMULSOFT").ToString() = "1" + Dim STIMUL As Boolean = UrlParametros("STIMULSOFT") IsNot Nothing AndAlso UrlParametros("STIMULSOFT").ToString() = "1" - imprimirFacturaVenta(UrlParametros("CVEVENTA").ToString.ToEntero, AplicaPagare, GuardarPDF:=Guardar, RegenerarPDF:=RegenerarPDF, UsarStimulsoft:=STIMULSOFT) + imprimirFacturaVenta(UrlParametros("CVEVENTA").ToString.ToEntero, AplicaPagare, GuardarPDF:=Guardar, RegenerarPDF:=RegenerarPDF, UsarStimul:=STIMUL) End If End If @@ -1578,7 +1578,7 @@ Partial Class PopUpVerFactura 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("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("AgrupoPor", $"{FechaCorte}{Usuario}")) params.Add(New ReportParameter("LogoPath", RutaImagenLogo)) Dim lrds As New List(Of ReportDataSource) @@ -1692,7 +1692,7 @@ Partial Class PopUpVerFactura 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("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("Contrato", $"{ObjContratos.NumeroContrato} - {ObjContratos.DescripcionContrato} ")) params.Add(New ReportParameter("Proveedor", If(ObjContratos.CveProveedor > 0, ObjContratos.RazonSocial.ToString, ObjContratos.NombreComercial.ToString))) params.Add(New ReportParameter("FechaInicio", ObjContratos.FechaInicial.ToShortDateString)) @@ -1748,13 +1748,13 @@ Partial Class PopUpVerFactura 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("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("EnvioContacto", EnvioContacto)) params.Add(New ReportParameter("SerieFolio", SerieFolio)) params.Add(New ReportParameter("PedidoContrato", PedidoContrato)) params.Add(New ReportParameter("EnvioDireccion", EnvioDireccion)) params.Add(New ReportParameter("Guia", Guia)) - ImprimirPDF("Empresas/Grales/Formatos/Cicovisa.rdlc", Dt, params, String.Format("Formato Cicovisa -{0}", Now.ToDateTime.ToShortDateString)) + ImprimirPDF("Empresas/Grales/Formatos/Cicovisa.rdlc", Dt, params, String.Format("Formato Cicovisa -{0}", NowADS().ToDateTime.ToShortDateString)) End If End If End Sub @@ -2066,7 +2066,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("LogoPath", RutaImagenLogo)) 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("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("DomicilioFiscal", $"{UsuarioActual.Empresa.Direccion}, {UsuarioActual.Empresa.Colonia}, {UsuarioActual.Empresa.Localidad}, {UsuarioActual.Empresa.Estado}, Tel. {Telefono}")) params.Add(New ReportParameter("SerieFolio", SerieFolio)) params.Add(New ReportParameter("DomicilioSucursal", DomicilioSucursal)) @@ -2093,7 +2093,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("Ciudad", Ciudad)) params.Add(New ReportParameter("Licencia", Licencia)) - ImprimirPDF($"Empresas/Grales/Formatos/{FormatoRDLC}", Dt, params, String.Format("Carta Porte -{0}", Now.ToDateTime.ToShortDateString)) + ImprimirPDF($"Empresas/Grales/Formatos/{FormatoRDLC}", Dt, params, String.Format("Carta Porte -{0}", NowADS().ToDateTime.ToShortDateString)) End If @@ -2525,7 +2525,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("RegimenFiscal", UsuarioActual.Empresa.Regimen)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("DomicilioFiscal", $"{UsuarioActual.Empresa.Direccion}, {UsuarioActual.Empresa.Colonia}, {UsuarioActual.Empresa.Localidad}, {UsuarioActual.Empresa.Estado}, Tel. {Telefono}")) params.Add(New ReportParameter("SerieFolio", SerieFolio)) params.Add(New ReportParameter("RFC", UsuarioActual.Empresa.RFC)) @@ -2736,12 +2736,12 @@ Partial Class PopUpVerFactura ObjFactura.Folio = Folio ObjFactura.Serie = "Tra" 'ObjFactura.CveMesa = -1 - ObjFactura.Fecha = Now + ObjFactura.Fecha = NowADS() ObjFactura.CvePrePoliza = -1 - ObjFactura.FechaPago = Now + ObjFactura.FechaPago = NowADS() ObjFactura.MotivoDescuento = "" ObjFactura.Observaciones = "" - ObjFactura.FechaEjecucion = Now + ObjFactura.FechaEjecucion = NowADS() ObjFactura.UsuarioCreo = UsuarioActual.Usuario ObjFactura.CveCondicionEntrega = -1 ObjFactura.CondicionEntrega = "" @@ -2762,7 +2762,7 @@ Partial Class PopUpVerFactura ObjFactura.Amortizacion = 0 ObjFactura.CveContrato = 0 ObjFactura.CveVendedor = 0 - ObjFactura.FechaVencimiento = Now + ObjFactura.FechaVencimiento = NowADS() ObjFactura.TipoEstatus = 0 ObjFactura.Det_OrdenCompra = "" ObjFactura.Inv_CveEstatusEntrega = 0 @@ -2923,7 +2923,7 @@ Partial Class PopUpVerFactura Archivo = Nothing End If End Sub - Public Sub imprimirFacturaVenta(CveVenta As Integer, AplicaPagare As String, Optional GuardarPDF As Boolean = False, Optional RegenerarPDF As Boolean = False, Optional UsarStimulsoft As Boolean = False) + Public Sub imprimirFacturaVenta(CveVenta As Integer, AplicaPagare As String, Optional GuardarPDF As Boolean = False, Optional RegenerarPDF As Boolean = False, Optional UsarStimul As Boolean = False) Dim ObjVentas As New ClsVentas Dim Vta As Modelos.Factura = Nothing @@ -2952,7 +2952,7 @@ Partial Class PopUpVerFactura Dim Archivo As New System.IO.FileInfo(PathArchivo) 'SI EL ARCHIVO NO EXISTE O SE VA REGENERA EL PDF, SE DEBEN LLENAR LOS DATOS - If Not Archivo.Exists OrElse RegenerarPDF OrElse UsarStimulsoft Then + If Not Archivo.Exists OrElse RegenerarPDF OrElse UsarStimul Then Vta.MonedaAbreviatura = dtVentas(0)("Abreviatura").ToString 'se rellena la sucursal 'Vta.Subproyecto = ObjVentas.DtResultados.Rows(0).DataRowToObject(Of Modelos.SucursalModel) @@ -3128,7 +3128,7 @@ Partial Class PopUpVerFactura End If End If - If Vta.Version.ToEntero() = 4 AndAlso dr1("CodigoObjetoImpuesto").ToString() = "02" AndAlso Now.Date >= New DateTime(2022, 11, 1) AndAlso dr1("Descuento").ToString().ToDecimal().RoundSQL(2) = dr1("Total").ToString().ToDecimal().RoundSQL(2) Then + If Vta.Version.ToEntero() = 4 AndAlso dr1("CodigoObjetoImpuesto").ToString() = "02" AndAlso NowADS().Date >= New DateTime(2022, 11, 1) AndAlso dr1("Descuento").ToString().ToDecimal().RoundSQL(2) = dr1("Total").ToString().ToDecimal().RoundSQL(2) Then dr1("CodigoObjetoImpuesto") = "04" End If @@ -3261,7 +3261,7 @@ Partial Class PopUpVerFactura Dim CveTimbreCartaPorteVenta As Integer = -1 Dim CartaPorte As Modelos.MSubReportData = Nothing 'SI EL ARCHIVO NO EXISTE O SE VA REGENERA EL PDF, SE DEBEN LLENAR LOS DATOS - If Not Archivo.Exists OrElse RegenerarPDF OrElse UsarStimulsoft Then + If Not Archivo.Exists OrElse RegenerarPDF OrElse UsarStimul Then If UsuarioActual.CveEmpresa = 13 AndAlso Vta.TipoDocto = "Ing" Then Using ObjGral As New ClsGenerales If ObjGral.GetGralTimbre(-1, "Ing", MinFecha, MaxFecha, 0, UsuarioActual.CveEmpresa, -1, CveVenta:=CveVenta) AndAlso ObjGral.DtResultados.Rows.Count > 0 Then @@ -3289,8 +3289,8 @@ Partial Class PopUpVerFactura End If End If - If UsarStimulsoft Then - ImprimirbytesPDF(PdfFactura(Vta, AplicaPagare:=AplicaPagare, Guardar:=True, SubReportData:=CartaPorte, UsarStimulsoft:=UsarStimulsoft), Vta.SerieFolio, "PDF") + If UsarStimul Then + ImprimirbytesPDF(PdfFactura(Vta, AplicaPagare:=AplicaPagare, Guardar:=True, SubReportData:=CartaPorte, UsarStimul:=UsarStimul), Vta.SerieFolio, "PDF") Else If Archivo.Exists Then If RegenerarPDF Then @@ -3602,7 +3602,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("Concepto", "Inventario Inicial")) params.Add(New ReportParameter("Almacen", Almacen)) params.Add(New ReportParameter("Fecha", Fecha)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("Folio", Folio)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) 'params.Add(New ReportParameter("Descuentos", (dr("Descuentos").ToString.ToDouble).FormatoNumero(2))) @@ -3662,7 +3662,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("Concepto", ConceptoFormato)) params.Add(New ReportParameter("Almacen", Almacen)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("Folio", Folio)) @@ -3714,7 +3714,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("Concepto", concepto)) params.Add(New ReportParameter("Almacen", Almacen)) params.Add(New ReportParameter("Fecha", Fecha)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("Folio", Folio)) params.Add(New ReportParameter("FacturadoA", NombreCliente)) params.Add(New ReportParameter("FacturaProveedor", If(CveCompra > 0 AndAlso dr IsNot Nothing, dr("SerieFolio").ToString, ""))) @@ -3766,7 +3766,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("Concepto", "ENTRADA DE ALMACÉN")) params.Add(New ReportParameter("Almacen", Almacen)) params.Add(New ReportParameter("Fecha", Fecha)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("Folio", Folio)) params.Add(New ReportParameter("FacturadoA", NombreCliente)) params.Add(New ReportParameter("FacturaProveedor", If(CveCompra > 0 AndAlso dr IsNot Nothing, dr("SerieFolio").ToString, ""))) @@ -3781,7 +3781,7 @@ Partial Class PopUpVerFactura End If If UsuarioActual.CveEmpresa.Contiene(172, 173) Then - ImprimirPDFStimulsoft("Empresas/Grales/Formatos/EntradaSalida.mrt", DtMovimientos, params, String.Format("Entrada de Almacen - {0}", Folio.ToString)) + ImprimirPDFStimul("Empresas/Grales/Formatos/EntradaSalida.mrt", DtMovimientos, params, String.Format("Entrada de Almacen - {0}", Folio.ToString)) Else ImprimirPDF("Empresas/Grales/Formatos/EntradaSalida.rdlc", DtMovimientos, params, String.Format("Entrada de Almacen - {0}", Folio.ToString), RDSName:="DsInventarios") End If @@ -3836,7 +3836,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("Telefono", DtMovimientos(0)("Telefono").ToString)) params.Add(New ReportParameter("Correo", DtMovimientos(0)("Correo").ToString)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("NombreEntrego", Capturo)) params.Add(New ReportParameter("NombreRecibio", Recibio)) @@ -3916,7 +3916,7 @@ Partial Class PopUpVerFactura End If params.Add(New ReportParameter("Concepto", concepto)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("Folio", Folio)) params.Add(New ReportParameter("Almacen", Almacen)) params.Add(New ReportParameter("FacturaProveedor", FolioVenta)) @@ -3948,7 +3948,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("FacturaProveedor", FolioVenta)) params.Add(New ReportParameter("FacturadoA", If(DtMovimientos(0)("Nombre").ToString <> "", DtMovimientos(0)("Nombre").ToString, NombreCliente))) params.Add(New ReportParameter("Observaciones", Observaciones)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("Folio", Folio)) params.Add(New ReportParameter("Descuentos", "")) params.Add(New ReportParameter("IVA", "")) @@ -3984,7 +3984,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("FacturaProveedor", FolioVenta)) params.Add(New ReportParameter("FacturadoA", If(DtMovimientos(0)("Nombre").ToString <> "", DtMovimientos(0)("Nombre").ToString, NombreCliente))) params.Add(New ReportParameter("Observaciones", Observaciones)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("Folio", Folio)) params.Add(New ReportParameter("Descuentos", "")) params.Add(New ReportParameter("IVA", "")) @@ -4041,7 +4041,7 @@ Partial Class PopUpVerFactura ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/EntradaSalida.rdlc", DtMovimientos, params, String.Format("Salida de Almacen - {0}", Folio.ToString), RDSName:="DsInventarios") Else If UsuarioActual.CveEmpresa.Contiene(172, 173) Then - ImprimirPDFStimulsoft("Empresas/Grales/Formatos/EntradaSalida.mrt", DtMovimientos, params, String.Format("Salida de Almacen - {0}", Folio.ToString)) + ImprimirPDFStimul("Empresas/Grales/Formatos/EntradaSalida.mrt", DtMovimientos, params, String.Format("Salida de Almacen - {0}", Folio.ToString)) Else ImprimirPDF("Empresas/Grales/Formatos/EntradaSalida.rdlc", DtMovimientos, params, String.Format("Salida de Almacen - {0}", Folio.ToString), RDSName:="DsInventarios") End If @@ -4059,7 +4059,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("Concepto", "Entrada por Desarmado de Paquete")) params.Add(New ReportParameter("Almacen", Almacen)) params.Add(New ReportParameter("Fecha", Fecha)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("Folio", Folio)) params.Add(New ReportParameter("Descuentos", "")) params.Add(New ReportParameter("IVA", "")) @@ -4083,7 +4083,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("Concepto", "Salida por Armado de Paquete")) params.Add(New ReportParameter("Almacen", Almacen)) params.Add(New ReportParameter("Fecha", Fecha)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("Folio", Folio)) params.Add(New ReportParameter("Descuentos", "")) params.Add(New ReportParameter("IVA", "")) @@ -4126,7 +4126,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("AlmacenDestino", AlmacenDestino)) params.Add(New ReportParameter("NombreProveedor", Proveedor)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) End If ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/Resguardo.rdlc", DtMovimientos, params, String.Format("Resguardo - {0}", Folio.ToString), RDSName:="DsInventarios") @@ -4198,7 +4198,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("AlmacenDestino", AlmacenDestino)) params.Add(New ReportParameter("NombreProveedor", Proveedor)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) End If @@ -4359,7 +4359,7 @@ Partial Class PopUpVerFactura If UsuarioActual.CveEmpresa = 140 Then params.Add(New ReportParameter("Origen", Almacen)) params.Add(New ReportParameter("Destino", AlmacenDestino)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("CantidadProductos", CantidadProductos.ToString())) @@ -4369,7 +4369,7 @@ Partial Class PopUpVerFactura ElseIf UsuarioActual.CveEmpresa = 153 Then params.Add(New ReportParameter("Origen", Almacen)) params.Add(New ReportParameter("Destino", AlmacenDestino)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("Observaciones", Observaciones)) 'TxtObservaciones.Text @@ -4388,7 +4388,7 @@ Partial Class PopUpVerFactura End If If UsuarioActual.CveEmpresa = 72 Or UsuarioActual.CveEmpresa = 119 Then - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) params.Add(New ReportParameter("AlmacenOrigen", Almacen)) params.Add(New ReportParameter("AlmacenDestino", AlmacenDestino)) @@ -4404,11 +4404,11 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("LogoPath", RutaImagenLogo)) params.Add(New ReportParameter("Origen", Almacen)) params.Add(New ReportParameter("Destino", AlmacenDestino)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) If UsuarioActual.CveEmpresa.Contiene(172, 173) Then - ImprimirPDFStimulsoft(String.Format("Empresas/Grales/Formatos/Traslado.mrt", UsuarioActual.Empresa.Ruta), DtMovimientos, params, String.Format("Aviso de Traslado - {0}", Folio), RDSName:="DsInventarios") + ImprimirPDFStimul(String.Format("Empresas/Grales/Formatos/Traslado.mrt", UsuarioActual.Empresa.Ruta), DtMovimientos, params, String.Format("Aviso de Traslado - {0}", Folio), RDSName:="DsInventarios") Else ImprimirPDF(String.Format("Empresas/Grales/Formatos/Traslado.rdlc", UsuarioActual.Empresa.Ruta), DtMovimientos, params, String.Format("Aviso de Traslado - {0}", Folio), RDSName:="DsInventarios") End If @@ -4439,7 +4439,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("Factura", DtMovimientos(0)("SerieFolio").ToString)) If UsuarioActual.CveEmpresa = 72 Or UsuarioActual.CveEmpresa = 119 Then - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) params.Add(New ReportParameter("AlmacenOrigen", Almacen)) params.Add(New ReportParameter("AlmacenDestino", AlmacenDestino)) @@ -4451,7 +4451,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("Origen", AlmacenDestino)) ' se invierte params.Add(New ReportParameter("Destino", Almacen)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("CveConceptoMovRelacionado", CveConceptoMovRelacionado.ToString())) @@ -4460,7 +4460,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("LogoPath", RutaImagenLogo)) params.Add(New ReportParameter("Origen", AlmacenDestino)) ' se invierte params.Add(New ReportParameter("Destino", Almacen)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) End If @@ -4473,7 +4473,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("Origen", Almacen)) params.Add(New ReportParameter("Destino", AlmacenDestino)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) ImprimirPDF(String.Format("Empresas/Grales/Formatos/Traslado.rdlc", UsuarioActual.Empresa.Ruta), DtMovimientos, params, String.Format("Recepción de Traslado - {0}", Folio), RDSName:="DsInventarios") @@ -4544,7 +4544,7 @@ Partial Class PopUpVerFactura End If If UsuarioActual.CveEmpresa = 119 Then - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) End If 'ObjInventarios.Dispose() @@ -4660,7 +4660,7 @@ Partial Class PopUpVerFactura End If params.Add(New ReportParameter("Concepto", "Entrada por garantia")) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("Folio", Folio)) params.Add(New ReportParameter("Fecha", Fecha)) params.Add(New ReportParameter("Almacen", Almacen)) @@ -4693,7 +4693,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("Concepto", "Salida Garantía")) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("Folio", Folio)) params.Add(New ReportParameter("Fecha", Fecha)) params.Add(New ReportParameter("Almacen", Almacen)) @@ -4740,7 +4740,7 @@ Partial Class PopUpVerFactura CiudadSucursal = String.Format("{0}, {1}", DtMovimientos(0)("Municipio").ToString, DtMovimientos(0)("Estado").ToString) DomicilioSucursal = String.Format("{0} #{1}, {2}, Col. {3}, CP: {4}, {5}, {6}", DtMovimientos(0)("Calle").ToString, DtMovimientos(0)("NoExt").ToString, DtMovimientos(0)("NoInt").ToString, DtMovimientos(0)("Colonia"), DtMovimientos(0)("CP").ToString, CiudadSucursal, DtMovimientos(0)("Pais").ToString) End If - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("Folio", Folio)) params.Add(New ReportParameter("Concepto", "DEVOLUCIÓN DEL CLIENTE")) params.Add(New ReportParameter("Fecha", Fecha)) @@ -4752,7 +4752,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("FacturadoA", DtMovimientos(0)("Nombre").ToString)) params.Add(New ReportParameter("EnviarA", DtMovimientos(0)("Mail").ToString)) params.Add(New ReportParameter("Entrega", DtMovimientos(0)("Entrega").ToString)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) If UsuarioActual.CveEmpresa = 72 Or UsuarioActual.CveEmpresa = 119 Then params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) @@ -4780,7 +4780,7 @@ Partial Class PopUpVerFactura CiudadSucursal = String.Format("{0}, {1}", DtMovimientos(0)("Municipio").ToString, DtMovimientos(0)("Estado").ToString) DomicilioSucursal = String.Format("{0} #{1}, {2}, Col. {3}, CP: {4}, {5}, {6}", DtMovimientos(0)("Calle").ToString, DtMovimientos(0)("NoExt").ToString, DtMovimientos(0)("NoInt").ToString, DtMovimientos(0)("Colonia"), DtMovimientos(0)("CP").ToString, CiudadSucursal, DtMovimientos(0)("Pais").ToString) End If - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("Folio", Folio)) params.Add(New ReportParameter("Concepto", "DEVOLUCIÓN DEL CLIENTE")) params.Add(New ReportParameter("Fecha", Fecha)) @@ -4792,7 +4792,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("FacturadoA", DtMovimientos(0)("Nombre").ToString)) params.Add(New ReportParameter("EnviarA", DtMovimientos(0)("Mail").ToString)) params.Add(New ReportParameter("Entrega", DtMovimientos(0)("Entrega").ToString)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) ImprimirPDF("Empresas/Grales/Formatos/DevolucionCliente.rdlc", DtMovimientos, params, String.Format("Devolucion del Cliente - {0}", Folio.ToString), RDSName:="DsInventarios") @@ -4810,7 +4810,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("Concepto", "Armado de Paquete")) params.Add(New ReportParameter("Almacen", Almacen)) params.Add(New ReportParameter("Fecha", Fecha)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("Folio", Folio)) params.Add(New ReportParameter("Descuentos", "")) params.Add(New ReportParameter("IVA", "")) @@ -4835,7 +4835,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("Concepto", "Desarmado de Paquete")) params.Add(New ReportParameter("Almacen", Almacen)) params.Add(New ReportParameter("Fecha", Fecha)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("Folio", Folio)) params.Add(New ReportParameter("Descuentos", "")) params.Add(New ReportParameter("IVA", "")) @@ -4861,7 +4861,7 @@ Partial Class PopUpVerFactura End If params.Add(New ReportParameter("Almacen", Almacen)) params.Add(New ReportParameter("Fecha", Fecha)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("Folio", Folio)) params.Add(New ReportParameter("Descuentos", "")) params.Add(New ReportParameter("IVA", "")) @@ -4888,7 +4888,7 @@ Partial Class PopUpVerFactura ' params.Add(New ReportParameter("Concepto", "Entrada por Prestamo")) ' params.Add(New ReportParameter("Almacen", Almacen)) ' params.Add(New ReportParameter("Fecha", Fecha)) - ' params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + ' params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) ' params.Add(New ReportParameter("Folio", Folio)) ' params.Add(New ReportParameter("Descuentos", "")) ' params.Add(New ReportParameter("IVA", "")) @@ -4915,7 +4915,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("Concepto", "Salida por resguardo")) params.Add(New ReportParameter("Almacen", Almacen)) params.Add(New ReportParameter("Fecha", Fecha)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("Folio", Folio)) params.Add(New ReportParameter("Descuentos", "")) params.Add(New ReportParameter("IVA", "")) @@ -4997,7 +4997,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("Concepto", ConceptoReporte)) params.Add(New ReportParameter("Almacen", Almacen)) params.Add(New ReportParameter("Fecha", Fecha)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("Folio", Folio)) params.Add(New ReportParameter("Proveedor", Proveedor)) params.Add(New ReportParameter("NombreRecibio", String.Format("RECIBIÓ{0}{1}", vbCrLf, Recibio))) @@ -5037,7 +5037,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("Telefono", DtMovimientos(0)("Telefono").ToString)) params.Add(New ReportParameter("Correo", DtMovimientos(0)("Correo").ToString)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("NombreEntrego", Capturo)) params.Add(New ReportParameter("NombreRecibio", Recibio)) params.Add(New ReportParameter("LogoPath", RutaImagenLogo)) @@ -5057,7 +5057,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("Observaciones", Observaciones)) params.Add(New ReportParameter("Almacen", Almacen)) params.Add(New ReportParameter("NombreRecibio", Recibio)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/SalidaDemostracion.rdlc", DtMovimientos, params, String.Format("Salida por Demostración - {0}", Folio.ToString), RDSName:="DsInventarios") End If @@ -5100,7 +5100,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("Telefono", DtMovimientos(0)("Telefono").ToString)) params.Add(New ReportParameter("Correo", DtMovimientos(0)("Correo").ToString)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("NombreEntrego", Capturo)) params.Add(New ReportParameter("NombreRecibio", Recibio)) @@ -5184,7 +5184,7 @@ Partial Class PopUpVerFactura End If params.Add(New ReportParameter("Concepto", ConceptoReporte)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("Folio", Folio)) params.Add(New ReportParameter("Almacen", Almacen)) params.Add(New ReportParameter("FacturaProveedor", FolioVenta)) @@ -5207,7 +5207,7 @@ Partial Class PopUpVerFactura Else If UsuarioActual.CveEmpresa = 140 Then params.Add(New ReportParameter("Concepto", ConceptoReporte)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("UsuarioRegistro", UsuarioRegistro)) End If params.Add(New ReportParameter("Folio", Folio)) @@ -5230,7 +5230,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("FacturaProveedor", FolioVenta)) params.Add(New ReportParameter("FacturadoA", DtMovimientos(0)("Nombre").ToString)) params.Add(New ReportParameter("Observaciones", Observaciones)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("Folio", Folio)) params.Add(New ReportParameter("Descuentos", "")) params.Add(New ReportParameter("IVA", "")) @@ -5306,7 +5306,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("Sucursal", "Sucursal")) params.Add(New ReportParameter("Cliente", NombreCliente)) params.Add(New ReportParameter("Folio", Folio)) - params.Add(New ReportParameter("FechaImpresion", Now.ToString("dd/MM/yyyy hh:mm tt"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy hh:mm tt"))) params.Add(New ReportParameter("Recibio", Recibio)) params.Add(New ReportParameter("Observaciones", Observaciones)) 'params.Add(New ReportParameter("Observaciones", "Observaciones con un tamaño mas grande para ver como se ve en el ticket chico.")) @@ -5331,7 +5331,7 @@ Partial Class PopUpVerFactura CiudadSucursal = String.Format("{0}, {1}", DtMovimientos(0)("Municipio").ToString, DtMovimientos(0)("Estado").ToString) DomicilioSucursal = String.Format("{0} #{1}, {2}, Col. {3}, CP: {4}, {5}, {6}", DtMovimientos(0)("Calle").ToString, DtMovimientos(0)("NoExt").ToString, DtMovimientos(0)("NoInt").ToString, DtMovimientos(0)("Colonia"), DtMovimientos(0)("CP").ToString, CiudadSucursal, DtMovimientos(0)("Pais").ToString) End If - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("Folio", Folio)) params.Add(New ReportParameter("Concepto", "DEVOLUCIÓN DEL CLIENTE")) params.Add(New ReportParameter("Fecha", Fecha)) @@ -5343,7 +5343,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("FacturadoA", DtMovimientos(0)("Nombre").ToString)) params.Add(New ReportParameter("EnviarA", DtMovimientos(0)("Mail").ToString)) params.Add(New ReportParameter("Entrega", DtMovimientos(0)("Entrega").ToString)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/DevolucionCliente.rdlc", DtMovimientos, params, String.Format("Devolucion del Cliente - {0}", Folio.ToString), RDSName:="DsInventarios") @@ -5479,7 +5479,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("Año", dr("Año").ToString)) params.Add(New ReportParameter("TelefonoContacto", dr("TelefonoContacto").ToString)) - params.Add(New ReportParameter("FechaImpresion", Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario)) params.Add(New ReportParameter("Condiciones", dr("Condiciones").ToString)) params.Add(New ReportParameter("FechaAtencion", If(dr("FechaInicio").ToString.Length > 0, dr("FechaInicio").ToString.ToDate.ToString("dd/MM/yyyy hh:mm tt"), ""))) @@ -5503,7 +5503,7 @@ Partial Class PopUpVerFactura 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("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("LogoPath", RutaImagenLogo)) @@ -5956,9 +5956,7 @@ Partial Class PopUpVerFactura DtAcuse.Rows.Add(RowCFDI) End If - - - ImprimirPDFStimulsoft(DirectorioArchivo, DtAcuse, params, "AcuseCancelacion" & CveVenta) + ImprimirPDFStimul(DirectorioArchivo, DtAcuse, params, "AcuseCancelacion" & CveVenta) End If @@ -5978,7 +5976,7 @@ Partial Class PopUpVerFactura Tabla = ObjIE.DtResultados Dim params As New List(Of ReportParameter) - params.Add(New ReportParameter("Fecha", Now.ToDateTime.ToString)) + params.Add(New ReportParameter("Fecha", NowADS().ToDateTime.ToString)) params.Add(New ReportParameter("FechaIE", ObjIE.DtResultados(0)("FechaDocumento").ToString.ToDate.ToShortDateString)) params.Add(New ReportParameter("CuentaCaja", CuentaCaja)) params.Add(New ReportParameter("CuentaDeposito", CuentaDeposito)) @@ -6107,7 +6105,7 @@ Partial Class PopUpVerFactura ElseIf CveTipoTransaccion.Contiene(2, 8, 9, 10) Then Dim Folio, Observacion, UsuarioRegistro, TextoImporte, PagueseA, Ruta, Banco, NumCuenta, AbonoCuenta, SubProyecto, NotificarA, RefCrediproveedor As String - Dim FechaExpedicion As Date = Now + Dim FechaExpedicion As Date = NowADS() Dim Importe As Double Dim FormatoCheque As String = "" @@ -6220,7 +6218,7 @@ Partial Class PopUpVerFactura 'IMPRESION DE FORMATO DE IE PAGO EN EFECTIVO PARA COMPU - VIATICOS Dim Folio As String = "", Observacion As String = "", UsuarioRegistro As String = "", TextoImporte As String = "", PagueseA As String = "" Dim Ruta As String = UsuarioActual.Empresa.Ruta - Dim FechaExpedicion As Date = Now + Dim FechaExpedicion As Date = NowADS() Dim Importe As Double Dim FormatoCheque As String = "" @@ -6304,7 +6302,7 @@ Partial Class PopUpVerFactura If UsuarioActual.CveEmpresa = 72 Then params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToString)) params.Add(New ReportParameter("CveCajaChica", DtComprobacion.Rows(0)("CveCajaChica").ToString)) params.Add(New ReportParameter("CveFyE", "0")) ' @@ -6321,7 +6319,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("Numero", "")) ' params.Add(New ReportParameter("Anio", DtComprobacion.FiltraParametros("CveCompra > 0").MAX("Fecha").ToDate.Year.ToString)) params.Add(New ReportParameter("Nombre", DtComprobacion.MAX("SubProyecto"))) - params.Add(New ReportParameter("Fecha", Now.Date.ToString)) + params.Add(New ReportParameter("Fecha", NowADS().Date.ToString)) params.Add(New ReportParameter("Elaboro", "")) params.Add(New ReportParameter("Autorizo", "")) params.Add(New ReportParameter("ElaboroPuesto", "")) @@ -6331,7 +6329,7 @@ Partial Class PopUpVerFactura Else params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToString)) params.Add(New ReportParameter("cuentaRetiro", "Cuenta retiro: " & ParamComprobacion.Rows(0)("BancoNumCuentaMoneda").ToString)) params.Add(New ReportParameter("CajaChica", "Caja chica: " & ParamComprobacion.Rows(0)("BancoNumCuentaMoneda").ToString)) @@ -6384,7 +6382,7 @@ Partial Class PopUpVerFactura Dim paramList As New List(Of ReportParameter) With paramList .Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - .Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + .Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) .Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) .Add(New ReportParameter("Cuenta", ObjIE.NumCuenta, True)) .Add(New ReportParameter("Fecha", ObjIE.FechaDocumento.ToString("dd/MM/yyyy"), True)) diff --git a/Compras/Proveedores.aspx.vb b/Compras/Proveedores.aspx.vb index 8cfa32948..ffd74af0e 100644 --- a/Compras/Proveedores.aspx.vb +++ b/Compras/Proveedores.aspx.vb @@ -8,8 +8,6 @@ Imports System.Xml Imports Microsoft.Reporting.WebForms Imports System.IO Imports System.Globalization -Imports System.Data.SqlClient -'Imports VBIDE Partial Class Compras_Proveedores Inherits ClsPaginas @@ -451,7 +449,7 @@ Partial Class Compras_Proveedores Private Property FechaLimite As Date Get If ViewState("FechaLimite") Is Nothing Then - Return Date.Now.AddDays(15) + Return NowADS().AddDays(15) Else Return ViewState("FechaLimite").ToString.ToDate End If @@ -548,7 +546,7 @@ Partial Class Compras_Proveedores ImgAddObs.Visible = False ChkEstado.Checked = True : ChkEstado.Enabled = False - LblFechaCaptura.Text = Now.ToShortDateString() + LblFechaCaptura.Text = NowADS().ToShortDateString() LblUsuarioCapturo.Text = UsuarioActual.Usuario ViewState("CveProveedor") = -1 DivSucursales.Visible = False @@ -627,8 +625,8 @@ Partial Class Compras_Proveedores End If - TxtFechaICredito.Text = Now.AddYears(-2).ToShortDateString - TxtFechaFCredito.Text = Now.ToShortDateString + TxtFechaICredito.Text = NowADS().AddYears(-2).ToShortDateString + TxtFechaFCredito.Text = NowADS().ToShortDateString If UsuarioActual.Empresa.Funcionalidad(560) = "1" Then TabEvaluacion.Visible = True @@ -736,7 +734,7 @@ Partial Class Compras_Proveedores Private Function CargadeFactura(CveFactura As Integer) As Integer Dim ObjeFacturas As New ClsCompras - If ObjeFacturas.GetFacturas(CveFactura, "-1", Now.AddYears(-2), Now, "-1", "-1", -1, -1, -1, -1, "-1", UsuarioActual.CveEmpresa) Then + If ObjeFacturas.GetFacturas(CveFactura, "-1", NowADS().AddYears(-2), NowADS(), "-1", "-1", -1, -1, -1, -1, "-1", UsuarioActual.CveEmpresa) Then Dim XMLDoc As New XmlDocument Try @@ -1119,10 +1117,9 @@ Partial Class Compras_Proveedores Private Sub CargaAnticipos(CveProveedorSucursal As Integer, Optional SelectTop As Integer = -1) Dim ObjMovtos As New ClsMovimientos() - If ObjMovtos.GetAnticiposProveedor(CveProveedor, If(CveProveedorSucursal = 0, -1, CveProveedorSucursal), CveMonedaFiltro, -1) AndAlso ObjMovtos.DtResultados.Rows.Count > 0 Then + If ObjMovtos.GetAnticiposProveedor(CveProveedor, UsuarioActual.CveEmpresa, CveMoneda:=CveMonedaFiltro, CveProveedorSucursal:=If(CveProveedorSucursal = 0, -1, CveProveedorSucursal)) AndAlso ObjMovtos.DtResultados.Rows.Count > 0 Then CountAnticipos = ObjMovtos.DtResultados.FiltraParametros(" Tipo = 'Act' AND TipoDocto <> '' AND (CveCompra > 0 OR CveIE > 0) ").Rows.Count - LblVencidoPesosAnt.Text = String.Format("{0}", ObjMovtos.DtResultados.SUM("Saldo", "CveMoneda = 1 And DiasVencidos > 0")).FormatoNumero LblTotalPesosAnt.Text = String.Format("{0}", ObjMovtos.DtResultados.SUM("Saldo", "CveMoneda = 1 ")).FormatoNumero LblPorVencerPesosAnt.Text = CType(LblTotalPesosAnt.Text.ToDouble - LblVencidoPesosAnt.Text.ToDouble, String).FormatoNumero @@ -1134,7 +1131,6 @@ Partial Class Compras_Proveedores LblTipoCambioAnt.Text = GlobalTipoCambio.ToString.FormatoNumero LblTotalAnt.Text = (LblTotalPesosAnt.Text.ToDouble + (LblTotalDolaresAnt.Text.ToDouble * LblTipoCambioAnt.Text.ToDouble)).ToString.FormatoNumero - If SelectTop > 0 Then If ObjMovtos.DtResultados.FiltraParametros("Tipo = 'Act'").Rows.Count > 0 Then DtAntNC = ObjMovtos.DtResultados.FiltraParametros("Tipo = 'Act'") @@ -2032,7 +2028,7 @@ Partial Class Compras_Proveedores End Sub - Private Function AltaCuentaContabilidadSIG(CodigoCuentaAltaCompaq As String, NombreCuentaCuentaAltaCompaq As String, IdCuentaAltaCompaq As Integer, CveConceptoContable As Integer, Optional Transaccion As SqlTransaction = Nothing, Optional IdCompaqPadre As Integer = -1, Optional CveProveedorCuenta As Integer = -1) As Boolean + Private Function AltaCuentaContabilidadSIG(CodigoCuentaAltaCompaq As String, NombreCuentaCuentaAltaCompaq As String, IdCuentaAltaCompaq As Integer, CveConceptoContable As Integer, Optional Transaccion As SqlClient.SqlTransaction = Nothing, Optional IdCompaqPadre As Integer = -1, Optional CveProveedorCuenta As Integer = -1) As Boolean If Not UsuarioActual.CveEmpresa.Contiene(7, 11, 145, 122) Then Return True @@ -2233,7 +2229,7 @@ Partial Class Compras_Proveedores Dim Para As String = TxtCorreoCobranza.Text.Trim Dim Liga As String = ObjParametro.Cadena1 & "LogIn.aspx" - Dim LigaActivar As String = Liga & "?p=" & Encripta("CveU=" & CveUsuario & "&Clave=" & "-acceso-" & "&Opcion=Activar&Hora=" & DateTime.Now.Ticks & "&CveE=" & UsuarioActual.CveEmpresa) + Dim LigaActivar As String = Liga & "?p=" & Encripta("CveU=" & CveUsuario & "&Clave=" & "-acceso-" & "&Opcion=Activar&Hora=" & NowADS().Ticks & "&CveE=" & UsuarioActual.CveEmpresa) Dim ObjMail As New ClsSisMail() @@ -3734,7 +3730,7 @@ Partial Class Compras_Proveedores lista.Add(New CrystalParametro("Empresa", UsuarioActual.Empresa.Empresa)) lista.Add(New CrystalParametro("TipoCuentas", DdlTipoCuentasCxP.SelectedItem.Text)) lista.Add(New CrystalParametro("FechaInicio", If(FI = "-1", "-", FI))) - lista.Add(New CrystalParametro("FechaFin", If(FF = "-1", DateTime.Now.ToShortDateString, FF))) + lista.Add(New CrystalParametro("FechaFin", If(FF = "-1", NowADS().ToShortDateString, FF))) lista.Add(New CrystalParametro("NombreProveedor", LtlProveedor.Text)) lista.Add(New CrystalParametro("DireccionProveedor", TxtDireccion.Text)) lista.Add(New CrystalParametro("ProveedorRFC", TxtRFC.Text)) @@ -3889,7 +3885,7 @@ Partial Class Compras_Proveedores ' ' ArchivoTemp.Delete() ' ' Dim Descargas As New StringBuilder() - ' ' Descargas.AppendFormat("
  • Reporte
  • ", UsuarioActual.CveEmpresa, CveProveedor, Now.Ticks) + ' ' Descargas.AppendFormat("
  • Reporte
  • ", UsuarioActual.CveEmpresa, CveProveedor, NowADS().Ticks) ' ' Dim Msg As String = String.Format("
    El Documento se generó correctamente.


    Descargas:
      {0}
    ", Descargas.ToString) 'TipoMensaje.MsgInformacion ' ' Msg.Alert(Msg, TipoMensaje.MsgInformacion) ' 'Catch ex As Exception @@ -4014,7 +4010,7 @@ Partial Class Compras_Proveedores ' ' ArchivoTemp.Delete() ' ' Dim Descargas As New StringBuilder() - ' ' Descargas.AppendFormat("
  • Reporte
  • ", UsuarioActual.CveEmpresa, CveProveedor, Now.Ticks) + ' ' Descargas.AppendFormat("
  • Reporte
  • ", UsuarioActual.CveEmpresa, CveProveedor, NowADS().Ticks) ' ' Dim Msg As String = String.Format("
    El Documento se generó correctamente.


    Descargas:
      {0}
    ", Descargas.ToString) 'TipoMensaje.MsgInformacion ' ' Msg.Alert(Msg, TipoMensaje.MsgInformacion) ' 'Catch ex As Exception @@ -4085,7 +4081,7 @@ Partial Class Compras_Proveedores params.Add(New ReportParameter("FechaInicio", FI)) params.Add(New ReportParameter("FechaFin", FF)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToString)) params.Add(New ReportParameter("NombreProveedor", LtlProveedor.Text)) params.Add(New ReportParameter("DireccionProveedor", TxtDireccion.Text)) params.Add(New ReportParameter("ProveedorRFC", TxtRFC.Text)) @@ -4105,10 +4101,10 @@ Partial Class Compras_Proveedores 'OBTENEMOS LOS DATOS Dim DtANC As DataTable - Dim FI As String = If(TxtFechaInicioCXP.Text = "" Or TxtFechaInicioCXP.Text = "__/__/____", "-1", TxtFechaInicioCXP.Text) - Dim FF As String = If(TxtFechaFinCXP.Text = "" Or TxtFechaFinCXP.Text = "__/__/____", "-1", TxtFechaFinCXP.Text) + Dim FI As Date = If(TxtFechaInicioCXP.Text = "" Or TxtFechaInicioCXP.Text = "__/__/____", MinFecha, TxtFechaInicioCXP.Text.ToDate) + Dim FF As Date = If(TxtFechaFinCXP.Text = "" Or TxtFechaFinCXP.Text = "__/__/____", MaxFecha, TxtFechaFinCXP.Text.ToDate) Dim CveProveedorSucursal As Integer = RBSucursal.SelectedValue.ToEntero() - If ObjMovtos.GetAnticiposProveedor(CveProveedor, If(CveProveedorSucursal = 0, -1, CveProveedorSucursal), CveMoneda, -1, FI, FF) Then + If ObjMovtos.GetAnticiposProveedor(CveProveedor, UsuarioActual.CveEmpresa, CveMoneda:=CveMoneda, CveProveedorSucursal:=If(CveProveedorSucursal = 0, -1, CveProveedorSucursal), FechaI:=FI, FechaF:=FF) Then DtANC = If(DdlTipoCuentasCxP.SelectedValue = "-1", ObjMovtos.DtResultados, ObjMovtos.DtResultados.FiltraParametros("Tipo = 'Act'", "Moneda, FechaVencimiento")) Else DtANC = Nothing @@ -4123,8 +4119,8 @@ Partial Class Compras_Proveedores params.Add(New ReportParameter("DireccionEmpresa", UsuarioActual.Empresa.Direccion)) params.Add(New ReportParameter("TipoCuentas", DdlTipoCuentasCxP.SelectedItem.Text)) params.Add(New ReportParameter("NombreProveedor", LtlProveedor.Text)) - params.Add(New ReportParameter("FechaInicio", FI)) - params.Add(New ReportParameter("FechaFin", FF)) + params.Add(New ReportParameter("FechaInicio", FI.ToShortDateString)) + params.Add(New ReportParameter("FechaFin", FF.ToShortDateString)) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) ImprimirPDF("Empresas/Grales/Formatos/RepAntNC.rdlc", DtANC, params, "RepAnticiposProveedor", Formato) @@ -4486,7 +4482,7 @@ Partial Class Compras_Proveedores params.Add(New ReportParameter("NombreProveedor", TxtRazonSocial.Text)) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) - ImprimirPDF("Empresas/Grales/Formatos/ProveedorConciliacion.rdlc", ObjProveedores.DtResultados, params, String.Format("ProveedorConciliacion-{0}", Now.ToDateTime.ToShortDateString)) + ImprimirPDF("Empresas/Grales/Formatos/ProveedorConciliacion.rdlc", ObjProveedores.DtResultados, params, String.Format("ProveedorConciliacion-{0}", NowADS().ToDateTime.ToShortDateString)) End If ObjProveedores.Dispose() @@ -4953,7 +4949,7 @@ Partial Class Compras_Proveedores DtVencido = ObjProveedores.DtResultados End If - If ObjFinanzas.GetRotacionCarteraProveedores(TxtFechaICredito.Text.ToDate, TxtFechaFCredito.Text.ToDate, UsuarioActual.CveEmpresa, 1, "-1", " -1", CveProveedor, Now) Then + If ObjFinanzas.GetRotacionCarteraProveedores(TxtFechaICredito.Text.ToDate, TxtFechaFCredito.Text.ToDate, UsuarioActual.CveEmpresa, 1, "-1", " -1", CveProveedor, NowADS()) Then DtRotacion = ObjFinanzas.DtResultados End If @@ -5381,7 +5377,7 @@ Partial Class Compras_Proveedores TxtSerieFolio.Text = "" TxtPS.Text = "" TxtCodigoE.Text = "" - TxtFechaE.Text = Now.ToString("dd/MM/yyyy") + TxtFechaE.Text = NowADS().ToString("dd/MM/yyyy") TxtFirma.Text = "" TxtCalificacion.Text = "" @@ -6054,7 +6050,7 @@ Partial Class Compras_Proveedores params.Add(New ReportParameter("AgrupadoPor", "Proveedor: " & LtlProveedor.Text)) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) - ImprimirPDF("Empresas\Grales\Formatos\" & NombreFormato & ".rdlc", DtTemp, params, NombreFormato & "_" & Now.ToString("yyyyMMddhhmmss"), Formato:=Formato) + ImprimirPDF("Empresas\Grales\Formatos\" & NombreFormato & ".rdlc", DtTemp, params, NombreFormato & "_" & NowADS().ToString("yyyyMMddhhmmss"), Formato:=Formato) Else Alert("No se encontró información.", TipoMensaje.MsgAdvertencia) End If diff --git a/Compras/ProveedoresAuxiliar.aspx.vb b/Compras/ProveedoresAuxiliar.aspx.vb index 8524e6916..d2f406b5c 100644 --- a/Compras/ProveedoresAuxiliar.aspx.vb +++ b/Compras/ProveedoresAuxiliar.aspx.vb @@ -70,8 +70,8 @@ Partial Class Compras_ProveedoresAuxiliar 'DdlConceptosContables.Items.Insert(0, New ListItem("Todos", "-1")) - txtFechaI.Text = Now.AddDays(-30).ToString("dd/MM/yyyy") - txtFechaF.Text = Now.ToString("dd/MM/yyyy") + txtFechaI.Text = NowADS().AddDays(-30).ToString("dd/MM/yyyy") + txtFechaF.Text = NowADS().ToString("dd/MM/yyyy") End Sub @@ -123,7 +123,7 @@ Partial Class Compras_ProveedoresAuxiliar 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.ToString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString)) params.Add(New ReportParameter("Filtros", $"Filtros: {Proveedor}{FechaIn}{FechaFn}{OpcionP}{TipoProv}{ContaP}")) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) ImprimirPDF("Empresas/Grales/Formatos/AuxiliarProveedor.rdlc", DtDatos, params, "AuxiliarProveedor", Opcion) diff --git a/Compras/Reembolsos.aspx.vb b/Compras/Reembolsos.aspx.vb index ae77d15b6..bdafaa1c6 100644 --- a/Compras/Reembolsos.aspx.vb +++ b/Compras/Reembolsos.aspx.vb @@ -443,7 +443,7 @@ Partial Class Compras_Reembolsos TxtFolio.Text = "" TxtObservaciones.Text = "" TxtImporte.Text = "" - TxtFechaDocumento.Text = Date.Now.ToShortDateString + TxtFechaDocumento.Text = NowADS().ToShortDateString 'DdlCuenta.SelectedValue = "-1" DdlTipoTransaccion.SelectedValue = "-1" DdlTipoTransaccionDiferencia_SelectedIndexChanged(DdlTipoTransaccion, EventArgs.Empty) @@ -500,7 +500,7 @@ Partial Class Compras_Reembolsos DDlCheques.Items.Insert(0, New ListItem("Expedir Cheque", "-1")) If GvCxP.Rows.Count > 0 Then - TxtFechaDocumento.Text = Now.ToShortDateString + TxtFechaDocumento.Text = NowADS().ToShortDateString BtnIEGuardar.Enabled = True If Not DdlPersonal.SelectedValue = "-2" Then diff --git a/Compras/ReembolsosComprobaciones.aspx.vb b/Compras/ReembolsosComprobaciones.aspx.vb index 0f7b0acbd..6fdb67d3c 100644 --- a/Compras/ReembolsosComprobaciones.aspx.vb +++ b/Compras/ReembolsosComprobaciones.aspx.vb @@ -123,7 +123,7 @@ Partial Class Compras_ReembolsosComprobaciones If UsuarioActual.CveEmpresa = 119 Then ChkReembolsarSinBancos.Visible = True - TxtFechaPrePoliza.Text = Date.Now.ToShortDateString + TxtFechaPrePoliza.Text = NowADS().ToShortDateString End If @@ -886,7 +886,7 @@ Partial Class Compras_ReembolsosComprobaciones TxtObservaciones.Text = "" TxtImporte.Text = "" TxtImporteVinculado.Text = "" - TxtFechaDocumento.Text = Date.Now.ToShortDateString + TxtFechaDocumento.Text = NowADS().ToShortDateString 'DdlCuenta.SelectedValue = "-1" DdlTipoTransaccion.SelectedValue = "-1" DdlTipoTransaccionDiferencia_SelectedIndexChanged(DdlTipoTransaccion, EventArgs.Empty) @@ -1004,7 +1004,7 @@ Partial Class Compras_ReembolsosComprobaciones DDlCheques_SelectedIndexChanged(DDlCheques, EventArgs.Empty) If GvCxP.Rows.Count > 0 Then - TxtFechaDocumento.Text = Now.ToShortDateString + TxtFechaDocumento.Text = NowADS().ToShortDateString 'Valida Proceso 120 para ROL Administrador de obra - Si tiene el proceso no puede guardar If Not UsuarioActual.TienePermisoProceso(120) Then @@ -1161,7 +1161,7 @@ Partial Class Compras_ReembolsosComprobaciones If UsuarioActual.CveEmpresa = 72 Then params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToString)) params.Add(New ReportParameter("CveCajaChica", CveCajaChica.ToString)) params.Add(New ReportParameter("CveFyE", CvePersonal.ToString)) params.Add(New ReportParameter("CajaChica", If(DdlCajaChica.SelectedValue.ToEntero > 0, "Caja chica: " & DdlCajaChica.SelectedItem.Text, "Funcionario/Empleado: " & DdlPersonal.SelectedItem.Text))) @@ -1171,7 +1171,7 @@ Partial Class Compras_ReembolsosComprobaciones params.Add(New ReportParameter("Numero", NumeroReembolso)) params.Add(New ReportParameter("Anio", DtDatos.FiltraParametros("CveCompra > 0").MAX("Fecha").ToDate.Year.ToString)) params.Add(New ReportParameter("Nombre", DtDatos.MAX("SubProyecto"))) - params.Add(New ReportParameter("Fecha", Now.Date.ToString)) + params.Add(New ReportParameter("Fecha", NowADS().Date.ToString)) params.Add(New ReportParameter("Elaboro", "")) params.Add(New ReportParameter("Autorizo", "")) params.Add(New ReportParameter("ElaboroPuesto", "")) @@ -1181,7 +1181,7 @@ Partial Class Compras_ReembolsosComprobaciones Else params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToString)) params.Add(New ReportParameter("CajaChica", If(DdlCajaChica.SelectedValue.ToEntero > 0, "Caja chica: " & DdlCajaChica.SelectedItem.Text, "Funcionario/Empleado: " & DdlPersonal.SelectedItem.Text))) @@ -1242,8 +1242,8 @@ Partial Class Compras_ReembolsosComprobaciones #End Region Private Sub RVTxtFechaDocumento_Init(sender As Object, e As EventArgs) Handles RVTxtFechaDocumento.Init - RVTxtFechaDocumento.MaximumValue = DateTime.Now.ToShortDateString - Calendario.EndDate = DateTime.Now + RVTxtFechaDocumento.MaximumValue = NowADS().ToShortDateString + Calendario.EndDate = NowADS() End Sub End Class diff --git a/Compras/RepAnt-NC-EXC.aspx.cs b/Compras/RepAnt-NC-EXC.aspx.cs index aa51e72bf..b5ae1d458 100644 --- a/Compras/RepAnt-NC-EXC.aspx.cs +++ b/Compras/RepAnt-NC-EXC.aspx.cs @@ -115,7 +115,7 @@ public partial class Compras_RepAnt_NC_EXC : ClsPaginas List para = new List(); para.Add(new ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)); para.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)); - para.Add(new ReportParameter("FechaImpresion", DateTime.Now.ToString())); + para.Add(new ReportParameter("FechaImpresion", NowADS().ToString())); para.Add(new ReportParameter("AgrupadoPor", $"Agrupado Por: {Proveedor}{Sucursal}{FechaI}{FechaF}{FechaICorte}{FechaFCorte}")); if (Imagen.Exists) { @@ -181,7 +181,7 @@ public partial class Compras_RepAnt_NC_EXC : ClsPaginas if (TipoCambio == 3) { LiEspecifico.Visible = true; - TCEspecifico = get_GlobalTipoCambio(DateTime.Now).ToString().ToDouble(); + TCEspecifico = get_GlobalTipoCambio(NowADS()).ToString().ToDouble(); TxtEspecifico.Text = TCEspecifico.ToString(); } else diff --git a/Compras/RepAnt-NC-EXCDetalle.aspx.cs b/Compras/RepAnt-NC-EXCDetalle.aspx.cs index 26077cb2f..8ffc6d98d 100644 --- a/Compras/RepAnt-NC-EXCDetalle.aspx.cs +++ b/Compras/RepAnt-NC-EXCDetalle.aspx.cs @@ -59,8 +59,8 @@ public partial class Compras_RepAnt_NC_EXCDetalle : ClsPaginas DdlSucursal.SelectedValueExist(Request["CveSubProyecto"] == null ? "-1" : Request["CveSubProyecto"].ToString()); DdlTipo.SelectedValueExist(Request["Tipo"] == null ? "-1" : Request["Tipo"].ToString()); CveMoneda = Request["CveMoneda"] == null ? -1 : Request["CveMoneda"].ToString().ToEntero(); - txtFechaI.Text = Request["FechaI"] == null ? DateTime.Now.ToString() : Request["FechaI"].ToString(); - txtFechaF.Text = Request["FechaF"] == null ? DateTime.Now.ToString() : Request["FechaF"].ToString(); + txtFechaI.Text = Request["FechaI"] == null ? NowADS().ToString() : Request["FechaI"].ToString(); + txtFechaF.Text = Request["FechaF"] == null ? NowADS().ToString() : Request["FechaF"].ToString(); TipoCambio = Request["TipoCambio"] == null ? 1 : Request["TipoCambio"].ToString().ToEntero(); TCEspecifico = Request["TCEspecifico"] == null ? -1 : Request["TCEspecifico"].ToString().ToDouble(); RblTipoCambio.SelectedValue = TipoCambio.ToString(); @@ -152,7 +152,7 @@ public partial class Compras_RepAnt_NC_EXCDetalle : ClsPaginas List para = new List(); para.Add(new ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)); para.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)); - para.Add(new ReportParameter("FechaImpresion", DateTime.Now.ToString())); + para.Add(new ReportParameter("FechaImpresion", NowADS().ToString())); para.Add(new ReportParameter("Tipo", Tipo.ToString())); para.Add(new ReportParameter("AgrupadoPor", $"Agrupado Por: {Proveedor}{Sucursal}{ConSaldo}{Tipo2}{FechaI}{FechaF}{FechaICorte}{FechaFCorte}")); if (Imagen.Exists) @@ -252,7 +252,7 @@ public partial class Compras_RepAnt_NC_EXCDetalle : ClsPaginas if (TipoCambio == 3) { LiEspecifico.Visible = true; - TCEspecifico = get_GlobalTipoCambio(DateTime.Now).ToString().ToDouble(); + TCEspecifico = get_GlobalTipoCambio(NowADS()).ToString().ToDouble(); TxtEspecifico.Text = TCEspecifico.ToString(); } else diff --git a/Compras/RepComplementoPago.aspx.vb b/Compras/RepComplementoPago.aspx.vb index c6ec19c62..fe617bac8 100644 --- a/Compras/RepComplementoPago.aspx.vb +++ b/Compras/RepComplementoPago.aspx.vb @@ -33,8 +33,8 @@ Partial Class Compras_RepComplementoPago #Region " INICIALIZA VALORES " Private Sub InicializaValores() - TxtFiltrosFechaInicio.Text = Now.FirstDayOfMonth.ToShortDateString - TxtFiltrosFechaFin.Text = Now.ToShortDateString + TxtFiltrosFechaInicio.Text = NowADS().FirstDayOfMonth.ToShortDateString + TxtFiltrosFechaFin.Text = NowADS().ToShortDateString DdlProveedores.setEsWebService(True) DdlProveedores.Attributes.Add("data-metodo", "getproveedores") diff --git a/Compras/RepCompras.aspx.vb b/Compras/RepCompras.aspx.vb index 29c071940..dc5b5fb03 100644 --- a/Compras/RepCompras.aspx.vb +++ b/Compras/RepCompras.aspx.vb @@ -65,7 +65,7 @@ Partial Class Compras_RepCompras End Sub Private Sub CargaCombos() - txtFechaI.Text = $"01/01/{Now.Year}" + txtFechaI.Text = $"01/01/{NowADS().Year}" 'Carga Tipo Centro de Costo CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyecto, LblSubProyecto, divProyecto:=DivProyecto) @@ -114,7 +114,7 @@ Partial Class Compras_RepCompras If RblTipoCambio.SelectedValue.ToEntero = 3 Then Dim TipoCambio As Double LiEspecifico.Visible = True - TipoCambio = GlobalTipoCambio(Now) + TipoCambio = GlobalTipoCambio(NowADS()) TxtEspecifico.Text = TipoCambio.ToString Else LiEspecifico.Visible = False @@ -298,7 +298,7 @@ Partial Class Compras_RepCompras #Region "I M P R I M I R" Protected Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click - GvDatos.ExportToExcel("ReporteCompras" & Now.ToShortDateString) + GvDatos.ExportToExcel("ReporteCompras" & NowADS().ToShortDateString) End Sub Private Sub GenerarPDF() @@ -328,7 +328,7 @@ Partial Class Compras_RepCompras params.Add(New ReportParameter("FechaFin", FechaF)) params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString)) params.Add(New ReportParameter("AgrupadoPor", $"Agrupado Por: {Grupo}{Proveedor}{Capturo}{Moneda}{FechaIn}{FechaFn}{Proyecto}{SubProyecto}{TipoGasto}{TipoProveedor}{FechaICaptura}{FechaFCaptura}{TipoDocto}")) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) ImprimirPDF("Empresas/Grales/Formatos/RepCompras.rdlc", DtCompras, params, "ReporteCompras") diff --git a/Compras/RepComprasAF.aspx.vb b/Compras/RepComprasAF.aspx.vb index 781f65a9a..360e706c8 100644 --- a/Compras/RepComprasAF.aspx.vb +++ b/Compras/RepComprasAF.aspx.vb @@ -56,7 +56,7 @@ Partial Class Compras_RepComprasAF #Region "CARGAS" Private Sub CargaCombos() - txtFechaI.Text = $"01/{Now.Month}/{Now.Year}" + txtFechaI.Text = $"01/{NowADS().Month}/{NowADS().Year}" DdlProveedores.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa) DdlProveedores.DataBind() @@ -199,10 +199,10 @@ Partial Class Compras_RepComprasAF params.Add(New ReportParameter("FechaInicio", FechaI)) params.Add(New ReportParameter("FechaFin", FechaF)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) - ImprimirPDF("Empresas\Grales\Formatos\RepComprasAF.rdlc", DTDatos, params, "ReporteComprasAF_" & Now.ToString("yyyyMMddmmss"), Formato:=Formato) + ImprimirPDF("Empresas\Grales\Formatos\RepComprasAF.rdlc", DTDatos, params, "ReporteComprasAF_" & NowADS().ToString("yyyyMMddmmss"), Formato:=Formato) End Sub #End Region @@ -212,7 +212,7 @@ Partial Class Compras_RepComprasAF If RblTipoCambio.SelectedValue.ToEntero = 3 Then Dim TipoCambio As Double LiEspecifico.Visible = True - TipoCambio = GlobalTipoCambio(Now) + TipoCambio = GlobalTipoCambio(NowADS()) TxtEspecifico.Text = TipoCambio.ToString Else LiEspecifico.Visible = False diff --git a/Compras/RepComprasAFDetalle.aspx.vb b/Compras/RepComprasAFDetalle.aspx.vb index d475ebca4..74d1da9fb 100644 --- a/Compras/RepComprasAFDetalle.aspx.vb +++ b/Compras/RepComprasAFDetalle.aspx.vb @@ -304,7 +304,7 @@ Partial Class Compras_RepComprasAFDetalle GenerarPDF() End Sub Private Sub LnkExcelPersonalizado_Click(sender As Object, e As EventArgs) Handles LnkExcelPersonalizado.Click - GvDatos.ExportToExcel("ComprasDetalle_" + DdlPS.txtValue.Value + Now.ToShortDateString) + GvDatos.ExportToExcel("ComprasDetalle_" + DdlPS.txtValue.Value + NowADS().ToShortDateString) End Sub Private Sub GenerarPDF(Optional Formato As String = "PDF") @@ -331,10 +331,10 @@ Partial Class Compras_RepComprasAFDetalle params.Add(New ReportParameter("FechaInicio", FechaI)) params.Add(New ReportParameter("FechaFin", FechaF)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) - ImprimirPDF(RutaPDF, DTDatos, params, "ReporteComprasAFDetalle_" & Now.ToString("yyyyMMddmmss"), Formato:=Formato) + ImprimirPDF(RutaPDF, DTDatos, params, "ReporteComprasAFDetalle_" & NowADS().ToString("yyyyMMddmmss"), Formato:=Formato) End Sub @@ -344,7 +344,7 @@ Partial Class Compras_RepComprasAFDetalle If RblTipoCambio.SelectedValue.ToEntero = 3 Then Dim TipoCambio As Double LiEspecifico.Visible = True - TipoCambio = GlobalTipoCambio(Now) + TipoCambio = GlobalTipoCambio(NowADS()) TxtEspecifico.Text = TipoCambio.ToString Else LiEspecifico.Visible = False diff --git a/Compras/RepComprasDetalle.aspx.vb b/Compras/RepComprasDetalle.aspx.vb index 25c891941..b7e7c2946 100644 --- a/Compras/RepComprasDetalle.aspx.vb +++ b/Compras/RepComprasDetalle.aspx.vb @@ -229,7 +229,7 @@ Partial Class Compras_RepComprasDetalle Dim SubProyectos As String = IIf(DdlSubProyecto.GetSelectedValuesM = "", "-1", DdlSubProyecto.GetSelectedValuesM).ToString Dim TipoGasto As String = IIf(DdlTipoGasto.GetSelectedValuesM = "", "-1", DdlTipoGasto.GetSelectedValuesM).ToString - If ObjCompras.GetRepComprasDetalle(DdlGrupo.SelectedValue.ToEntero, IfNull(Request("Anio"), Now.Year).ToString.ToEntero, IfNull(Request("Mes"), "-1").ToString.ToEntero, AnioMes, IfNull(Request("Fecha"), "-1").ToString(), + If ObjCompras.GetRepComprasDetalle(DdlGrupo.SelectedValue.ToEntero, IfNull(Request("Anio"), NowADS().Year).ToString.ToEntero, IfNull(Request("Mes"), "-1").ToString.ToEntero, AnioMes, IfNull(Request("Fecha"), "-1").ToString(), DdlProveedores.SelectedValue.ToEntero, CveMoneda, DdlUsuario.SelectedValue.ToEntero, FechaI, FechaF, DDlUsuarioCaptura.SelectedValue.ToEntero, IfNull(Request("NumeroRemesa"), "-1").ToString.ToEntero, IfNull(Request("CveUsuarioRemesa"), "-1").ToString.ToEntero, FechaICaptura, FechaFCaptura, IfNull(Request("FechaCaptura"), "-1").ToString, SubProyectos, DdlTipoDocto.SelectedValue, UsuarioActual.CveEmpresa, @@ -264,7 +264,7 @@ Partial Class Compras_RepComprasDetalle If RblTipoCambio.SelectedValue.ToEntero = 3 Then Dim TipoCambio As Double LiEspecifico.Visible = True - TipoCambio = GlobalTipoCambio(Now) + TipoCambio = GlobalTipoCambio(NowADS()) TxtEspecifico.Text = TipoCambio.ToString Else LiEspecifico.Visible = False @@ -317,7 +317,7 @@ Partial Class Compras_RepComprasDetalle params.Add(New ReportParameter("Numero", NumeroRemesa)) params.Add(New ReportParameter("Anio", DtDatos.FiltraParametros("CveCompra > 0").MAX("Fecha").ToDate.Year.ToString)) params.Add(New ReportParameter("Nombre", DtDatos.MAX("SubProyecto"))) - params.Add(New ReportParameter("Fecha", Now.Date.ToString)) + params.Add(New ReportParameter("Fecha", NowADS().Date.ToString)) params.Add(New ReportParameter("Elaboro", Elaboro)) params.Add(New ReportParameter("Autorizo", "")) params.Add(New ReportParameter("ElaboroPuesto", "")) @@ -325,7 +325,7 @@ Partial Class Compras_RepComprasDetalle ImprimirPDF(String.Format("{0}Formatos\Remesa.rdlc", UsuarioActual.Empresa.Ruta), DtDatos.FiltraParametros("CveCompra > 0"), params, "Remesa", RDSName:="DsCompras") End Sub Protected Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click - 'GvDatos.ExportToExcel("ReporteComprasDetalles" & Now.ToShortDateString) + 'GvDatos.ExportToExcel("ReporteComprasDetalles" & NowADS().ToShortDateString) GenerarPDF("EXCEL") End Sub @@ -374,7 +374,7 @@ Partial Class Compras_RepComprasDetalle params.Add(New ReportParameter("FechaFin", FechaF)) params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString)) params.Add(New ReportParameter("AgrupadoPor", $"Agrupado Por: {Grupo}{Proveedor}{Capturo}{FechaIn}{FechaFn}{FechaCIn}{FechaCFn}{Proyecto}{SubProyecto}{TipoGasto}{TipoProveedor}{TipoDocto}")) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) ImprimirPDF("Empresas/Grales/Formatos/RepComprasDetalle.rdlc", DtDatos, params, "ReporteComprasDetalles", Opcion) diff --git a/Compras/RepComprasG.aspx.vb b/Compras/RepComprasG.aspx.vb index 29e787bee..4d2055c75 100644 --- a/Compras/RepComprasG.aspx.vb +++ b/Compras/RepComprasG.aspx.vb @@ -27,8 +27,8 @@ Partial Class Compras_RepComprasG DdlProveedores.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa) DdlProveedores.DataBind() - 'TxtFechaICaptura.Text = Now.AddMonths(-1).FirstDayOfMonth.ToShortDateString - 'TxtFechaFCaptura.Text = Now.ToShortDateString + 'TxtFechaICaptura.Text = NowADS().AddMonths(-1).FirstDayOfMonth.ToShortDateString + 'TxtFechaFCaptura.Text = NowADS().ToShortDateString DDlUsuarioCaptura.DataSource = GlobalDTUsuarioResponsable(UsuarioActual.CveEmpresa) DDlUsuarioCaptura.DataBind() @@ -89,7 +89,7 @@ Partial Class Compras_RepComprasG End If End Sub Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click - GvDatos.ExportToExcel("ReporteCompras" & Now.ToShortDateString) + GvDatos.ExportToExcel("ReporteCompras" & NowADS().ToShortDateString) End Sub End Class diff --git a/Compras/RepComprasInventarios.aspx.cs b/Compras/RepComprasInventarios.aspx.cs index 9fb9350fa..18a7fb9b4 100644 --- a/Compras/RepComprasInventarios.aspx.cs +++ b/Compras/RepComprasInventarios.aspx.cs @@ -37,10 +37,10 @@ public partial class Compras_RepComprasInventarios : ClsPaginas protected void InicializaDatos() { - txtFechaIC.Text = new DateTime(DateTime.Now.Year, DateTime.Now.Month - 1, DateTime.Now.Day).ToShortDateString(); - txtFechaFC.Text = DateTime.Now.ToShortDateString(); - txtFechaI.Text = new DateTime(DateTime.Now.Year, DateTime.Now.Month - 1, DateTime.Now.Day).ToShortDateString(); - txtFechaF.Text = DateTime.Now.ToShortDateString(); + txtFechaIC.Text = new DateTime(NowADS().Year, NowADS().Month - 1, NowADS().Day).ToShortDateString(); + txtFechaFC.Text = NowADS().ToShortDateString(); + txtFechaI.Text = new DateTime(NowADS().Year, NowADS().Month - 1, NowADS().Day).ToShortDateString(); + txtFechaF.Text = NowADS().ToShortDateString(); CargaCombos(); @@ -63,9 +63,9 @@ public partial class Compras_RepComprasInventarios : ClsPaginas ClsCompras ObjCompras = new ClsCompras(); DateTime FechaIC = (txtFechaIC.Text.ToString() != "" ? txtFechaIC.Text.ToDateTime() : MinFecha); - DateTime FechaFC = (txtFechaFC.Text.ToString() != "" ? txtFechaFC.Text.ToDateTime() : DateTime.Now); + DateTime FechaFC = (txtFechaFC.Text.ToString() != "" ? txtFechaFC.Text.ToDateTime() : NowADS()); DateTime FechaI = (txtFechaI.Text.ToString() != "" ? txtFechaI.Text.ToDateTime() : MinFecha); - DateTime FechaF = (txtFechaF.Text.ToString() != "" ? txtFechaF.Text.ToDateTime() : DateTime.Now); + DateTime FechaF = (txtFechaF.Text.ToString() != "" ? txtFechaF.Text.ToDateTime() : NowADS()); if (ObjCompras.GetRepComprasInventarios(FechaIC, FechaFC, FechaI, FechaF, UsuarioActual.CveEmpresa, DdlSubProyecto.SelectedValue.ToEntero(), DdlProveedor.SelectedValue.ToEntero())) { diff --git a/Compras/RepComprasPeriodo.aspx.vb b/Compras/RepComprasPeriodo.aspx.vb index 868cc3b53..dd1dc4b00 100644 --- a/Compras/RepComprasPeriodo.aspx.vb +++ b/Compras/RepComprasPeriodo.aspx.vb @@ -124,7 +124,7 @@ Partial Class Compras_RepComprasPeriodo If RblTipoCambio.SelectedValue.ToEntero = 3 Then Dim TipoCambio As Double LiEspecifico.Visible = True - TipoCambio = GlobalTipoCambio(Now) + TipoCambio = GlobalTipoCambio(NowADS()) TxtEspecifico.Text = TipoCambio.ToString Else LiEspecifico.Visible = False @@ -208,7 +208,7 @@ Partial Class Compras_RepComprasPeriodo #Region "IMPRIMIR" Protected Sub ImgExcel_Click(sender As Object, e As System.EventArgs) Handles LnkExportar.Click - GvDatos.ExportToExcel("ReporteComprasPeriodo_" & Now.ToShortDateString) + GvDatos.ExportToExcel("ReporteComprasPeriodo_" & NowADS().ToShortDateString) End Sub Private Sub ImgImprimir_Click(sender As Object, e As EventArgs) Handles LnkPdf.Click Dim ObjCompras As New ClsCompras() @@ -252,7 +252,7 @@ Partial Class Compras_RepComprasPeriodo params.Add(New ReportParameter("FechaFin", FechaF)) params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString)) params.Add(New ReportParameter("AgrupadoPor", $"Agrupado Por: {Proveedor}{Capturo}{Grupo}{Moneda}{FechaIn}{FechaFn}{Proyecto}{SubProyecto}")) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) ImprimirPDF("Empresas/Grales/Formatos/RepComprasPeriodo.rdlc", dt, params, "RepComprasPeriodo") diff --git a/Compras/RepComprasPersonal.aspx.vb b/Compras/RepComprasPersonal.aspx.vb index 064ec21c0..fa58a0fe8 100644 --- a/Compras/RepComprasPersonal.aspx.vb +++ b/Compras/RepComprasPersonal.aspx.vb @@ -197,10 +197,10 @@ Partial Class Compras_RepComprasPersonal params.Add(New ReportParameter("FechaInicio", FechaI)) params.Add(New ReportParameter("FechaFin", FechaF)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) - ImprimirPDF("Empresas\Grales\Formatos\RepComprasPersonal.rdlc", DTDatos, params, "ReporteComprasPersonal_" & Now.ToString("yyyyMMddmmss"), Formato:=Formato) + ImprimirPDF("Empresas\Grales\Formatos\RepComprasPersonal.rdlc", DTDatos, params, "ReporteComprasPersonal_" & NowADS().ToString("yyyyMMddmmss"), Formato:=Formato) End Sub #End Region @@ -210,7 +210,7 @@ Partial Class Compras_RepComprasPersonal If RblTipoCambio.SelectedValue.ToEntero = 3 Then Dim TipoCambio As Double LiEspecifico.Visible = True - TipoCambio = GlobalTipoCambio(Now) + TipoCambio = GlobalTipoCambio(NowADS()) TxtEspecifico.Text = TipoCambio.ToString Else LiEspecifico.Visible = False diff --git a/Compras/RepComprasPersonalDetalle.aspx.vb b/Compras/RepComprasPersonalDetalle.aspx.vb index 74cc74e0e..57e71572f 100644 --- a/Compras/RepComprasPersonalDetalle.aspx.vb +++ b/Compras/RepComprasPersonalDetalle.aspx.vb @@ -329,12 +329,12 @@ Partial Class Compras_RepComprasPersonalDetalle params.Add(New ReportParameter("FechaInicio", FechaI)) params.Add(New ReportParameter("FechaFin", FechaF)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) - ImprimirPDF("Empresas\Grales\Formatos\RepComprasPersonalDetalle.rdlc", DTDatos, params, "ReporteComprasPersonalDetalle_" & Now.ToString("yyyyMMddmmss"), Formato:=Formato) + ImprimirPDF("Empresas\Grales\Formatos\RepComprasPersonalDetalle.rdlc", DTDatos, params, "ReporteComprasPersonalDetalle_" & NowADS().ToString("yyyyMMddmmss"), Formato:=Formato) End Sub @@ -347,7 +347,7 @@ Partial Class Compras_RepComprasPersonalDetalle If RblTipoCambio.SelectedValue.ToEntero = 3 Then Dim TipoCambio As Double LiEspecifico.Visible = True - TipoCambio = GlobalTipoCambio(Now) + TipoCambio = GlobalTipoCambio(NowADS()) TxtEspecifico.Text = TipoCambio.ToString Else LiEspecifico.Visible = False diff --git a/Compras/RepCxP.aspx.vb b/Compras/RepCxP.aspx.vb index b312e35e6..18fc3d0ee 100644 --- a/Compras/RepCxP.aspx.vb +++ b/Compras/RepCxP.aspx.vb @@ -165,7 +165,7 @@ Partial Class Compras_RepCxP DdlUsuarioRegistro.DataBind() DdlUsuarioRegistro.Items.Insert(0, New ListItem("Todos", "-1")) - txtCorteA.Text = $"31/12/{Now.Year}" + txtCorteA.Text = $"31/12/{NowADS().Year}" 'Dim ObjSisUsuarios As New ClsSisUsuarios() @@ -557,7 +557,7 @@ Partial Class Compras_RepCxP FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim(), "-1") FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), "-1") FechaVI = If(IsDate(txtFechaVI.Text.Trim()), txtFechaVI.Text.Trim(), "-1") - FechaVF = If(IsDate(txtFechaVF.Text.Trim()), txtFechaVF.Text.Trim(), Date.Now.ToShortDateString) + FechaVF = If(IsDate(txtFechaVF.Text.Trim()), txtFechaVF.Text.Trim(), NowADS().ToShortDateString) If DdlGrupo.SelectedValue.ToEntero = 11 Then If e.Row.DBCampo("CveSubProyecto") = "-1" Then e.Row.CssClass = "Totales" @@ -1499,7 +1499,7 @@ Partial Class Compras_RepCxP params.Add(New ReportParameter("FechaInicio", FechaI)) params.Add(New ReportParameter("FechaFin", FechaF)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("Grupo", DdlGrupo.SelectedItem.Text)) params.Add(New ReportParameter("AgrupadoPor", $"{Grupo}{Proveedor}{Clasificacion}{FechaIn}{FechaFn}{Registro}{Responsable}{Proyecto}{Sucursal}{TipoMoneda}{FVI}{FVF}")) params.Add(New ReportParameter("CantColumnas", CantidadColumnas.ToString)) @@ -1519,7 +1519,7 @@ Partial Class Compras_RepCxP If RblTipoCambio.SelectedValue = "3" Then Dim TipoCambio As Double LiEspecifico.Visible = True - TipoCambio = GlobalTipoCambio(Now) + TipoCambio = GlobalTipoCambio(NowADS()) TxtEspecifico.Text = TipoCambio.ToString Else LiEspecifico.Visible = False diff --git a/Compras/RepCxPDetalle.aspx.vb b/Compras/RepCxPDetalle.aspx.vb index 76f381319..505901391 100644 --- a/Compras/RepCxPDetalle.aspx.vb +++ b/Compras/RepCxPDetalle.aspx.vb @@ -286,8 +286,8 @@ Partial Class RepCxPDetalle FechaFin = IfNull(Request("FechaF"), "-1").ToString FechaVInicio = IfNull(Request("FechaVI"), "-1").ToString FechaVFin = IfNull(Request("FechaVF"), "-1").ToString - FechaCorte = IfNull(Request("FechaCorte"), Now.ToDate.ToString).ToString - txtCorteA.Text = $"31/12/{Now.Year}" + FechaCorte = IfNull(Request("FechaCorte"), NowADS().ToDate.ToString).ToString + txtCorteA.Text = $"31/12/{NowADS().Year}" If Request("FechaI") <> "-1" AndAlso IsDate(Request("FechaI")) Then txtFechaI.Text = Request("FechaI") If Request("FechaF") <> "-1" AndAlso IsDate(Request("FechaF")) Then txtFechaF.Text = Request("FechaF") @@ -653,10 +653,10 @@ Partial Class RepCxPDetalle Protected Sub ImgExcelPersonalizado_Click(sender As Object, e As EventArgs) Handles ImgExcelPersonalizado.Click 'GvVsh.Visible = True - 'GvVsh.ExportToExcel("DetalleVentas_" & Now.ToShortDateString) + 'GvVsh.ExportToExcel("DetalleVentas_" & NowADS().ToShortDateString) 'GvVsh.Visible = False - GvDatos.ExportToExcel("DetalleCompras_" & Now.ToShortDateString & ".xls") - 'GvDatos.ExportToExcelG("DetalleVentas_" & Now.ToShortDateString & ".xlsx") + GvDatos.ExportToExcel("DetalleCompras_" & NowADS().ToShortDateString & ".xls") + 'GvDatos.ExportToExcelG("DetalleVentas_" & NowADS().ToShortDateString & ".xlsx") End Sub @@ -684,7 +684,7 @@ Partial Class RepCxPDetalle params.Add(New ReportParameter("FechaInicio", FechaI)) params.Add(New ReportParameter("FechaFin", FechaF)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) 'PARA REPORTE Dim Sucursal = If(DdlSubProyecto.SelectedValue = "-1", "", $" Sucursal: {DdlSubProyecto.SelectedItem.Text}") Dim Proveedor = If(DdlProveedores.SelectedValue = "-1", "", $" Proveedor: {DdlProveedores.SelectedText}") @@ -714,7 +714,7 @@ Partial Class RepCxPDetalle If RblTipoCambio.SelectedValue.ToEntero = 3 Then Dim TipoCambio As Double LiEspecifico.Visible = True - TipoCambio = GlobalTipoCambio(Now) + TipoCambio = GlobalTipoCambio(NowADS()) TxtEspecifico.Text = TipoCambio.ToString Else LiEspecifico.Visible = False diff --git a/Compras/RepCxPPeriodo.aspx.cs b/Compras/RepCxPPeriodo.aspx.cs index 95766a42b..a72690cca 100644 --- a/Compras/RepCxPPeriodo.aspx.cs +++ b/Compras/RepCxPPeriodo.aspx.cs @@ -85,7 +85,7 @@ public partial class Compras_RepCxPPeriodo : ClsPaginas DdlUsuarioRegistro.DataBind(); DdlUsuarioRegistro.Items.Insert(0, new ListItem("Todos", "-1")); - txtCorteA.Text = $"31/12/{DateTime.Now.Year}"; + txtCorteA.Text = $"31/12/{NowADS().Year}"; } private void Consulta() @@ -122,7 +122,7 @@ public partial class Compras_RepCxPPeriodo : ClsPaginas if (TipoCambio == 3) { LiEspecifico.Visible = true; - TCEspecifico = get_GlobalTipoCambio(DateTime.Now); + TCEspecifico = get_GlobalTipoCambio(NowADS()); TxtEspecifico.Text = TCEspecifico.ToString(); } else @@ -285,7 +285,7 @@ public partial class Compras_RepCxPPeriodo : ClsPaginas List para = new List(); para.Add(new ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)); para.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)); - para.Add(new ReportParameter("FechaImpresion", DateTime.Now.ToShortDateString())); + para.Add(new ReportParameter("FechaImpresion", NowADS().ToShortDateString())); para.Add(new ReportParameter("Filtros", StrFiltro.ToString())); if (Imagen.Exists) { @@ -295,7 +295,7 @@ public partial class Compras_RepCxPPeriodo : ClsPaginas { para.Add(new ReportParameter("LogoPath", "")); } - ImprimirPDF(RutaPDF, DtDatos, para, "RepCxPPeriodo" + DateTime.Now.ToString("yyyyMMddhhmmss"), Opcion); + ImprimirPDF(RutaPDF, DtDatos, para, "RepCxPPeriodo" + NowADS().ToString("yyyyMMddhhmmss"), Opcion); } protected void GvDatos_RowDataBound(object sender, GridViewRowEventArgs e) { diff --git a/Compras/RepDocumentacionProveedor.aspx.vb b/Compras/RepDocumentacionProveedor.aspx.vb index 5e8e053ac..31d5e5ed8 100644 --- a/Compras/RepDocumentacionProveedor.aspx.vb +++ b/Compras/RepDocumentacionProveedor.aspx.vb @@ -164,7 +164,7 @@ Partial Class Proveedores_RepDocumentacionProveedor Private Property FechaLimite As Date Get If ViewState("FechaLimite") Is Nothing Then - Return Date.Now.AddDays(15) + Return NowADS().AddDays(15) Else Return ViewState("FechaLimite").ToString.ToDate End If @@ -195,8 +195,8 @@ Partial Class Proveedores_RepDocumentacionProveedor If Not Page.IsPostBack Then CargaCombos() - 'TxtFechaI.Text = Now.AddMonths(-3).ToString("dd/MM/yyyy") - 'TxtFechaF.Text = Now.ToString("dd/MM/yyyy") + 'TxtFechaI.Text = NowADS().AddMonths(-3).ToString("dd/MM/yyyy") + 'TxtFechaF.Text = NowADS().ToString("dd/MM/yyyy") TxtFechaI.Text = "" TxtFechaF.Text = "" diff --git a/Compras/RepEvaluacionProveedor.aspx.vb b/Compras/RepEvaluacionProveedor.aspx.vb index 924970f9e..360411879 100644 --- a/Compras/RepEvaluacionProveedor.aspx.vb +++ b/Compras/RepEvaluacionProveedor.aspx.vb @@ -13,7 +13,7 @@ Partial Class RepEvaluacionProveedor DdlProveedor.DataBind() DdlProveedor.Items.Insert(0, New ListItem("Todos", "-1")) - Dim dNow As Date = Now + Dim dNow As Date = NowADS() TxtFechaF.Text = dNow.ToString("dd/MM/yyyy") dNow = dNow.AddDays(-30) TxtFechaI.Text = dNow.ToString("dd/MM/yyyy") diff --git a/Compras/RepEvaluacionesProveedores.aspx.vb b/Compras/RepEvaluacionesProveedores.aspx.vb index 1b7b7baa2..64da0dceb 100644 --- a/Compras/RepEvaluacionesProveedores.aspx.vb +++ b/Compras/RepEvaluacionesProveedores.aspx.vb @@ -27,7 +27,7 @@ Partial Class RepEvaluacionesProveedores DdlProveedor.DataBind() DdlProveedor.Items.Insert(0, New ListItem("Todos", "-1")) - Dim dNow As Date = Now + Dim dNow As Date = NowADS() TxtFechaF.Text = dNow.ToString("dd/MM/yyyy") dNow = dNow.AddDays(-30) TxtFechaI.Text = dNow.ToString("dd/MM/yyyy") @@ -65,6 +65,6 @@ Partial Class RepEvaluacionesProveedores End Sub Public Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click - GV.ExportToExcel("Evaluaciones de Proveedores" & Now.ToShortDateString & ".xls") + GV.ExportToExcel("Evaluaciones de Proveedores" & NowADS().ToShortDateString & ".xls") End Sub End Class \ No newline at end of file diff --git a/Compras/RepGastos.aspx.vb b/Compras/RepGastos.aspx.vb index 3b0b50dc7..72c6b1d71 100644 --- a/Compras/RepGastos.aspx.vb +++ b/Compras/RepGastos.aspx.vb @@ -33,8 +33,8 @@ Partial Class RepGastos Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not IsPostBack Then - TxtPA_VfechaInicio.Text = FirstDayOfMonth(Now).ToShortDateString - TxtPA_VfechaFin.Text = LastDayOfMonth(Now).ToShortDateString + TxtPA_VfechaInicio.Text = FirstDayOfMonth(NowADS()).ToShortDateString + TxtPA_VfechaFin.Text = LastDayOfMonth(NowADS()).ToShortDateString CargaPA_Vta_ReporteGastosCentroCostoGet() End If diff --git a/Compras/RepGastosFijos.aspx.cs b/Compras/RepGastosFijos.aspx.cs index d9d6c30bc..3092eaf99 100644 --- a/Compras/RepGastosFijos.aspx.cs +++ b/Compras/RepGastosFijos.aspx.cs @@ -96,8 +96,8 @@ public partial class Compras_RepGastosFijos : ClsPaginas protected void InicializaDatos() { - DateTime FI = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1); - DateTime FF = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.DaysInMonth(DateTime.Now.Year, DateTime.Now.Month)); + DateTime FI = new DateTime(NowADS().Year, NowADS().Month, 1); + DateTime FF = new DateTime(NowADS().Year, NowADS().Month, DateTime.DaysInMonth(NowADS().Year, NowADS().Month)); FechaInicio = FI.ToShortDateString(); FechaFin = FF.ToShortDateString(); TxtFechaI.Text = FechaInicio; @@ -236,7 +236,7 @@ public partial class Compras_RepGastosFijos : ClsPaginas @params.Add(new ReportParameter("FechaFin", FechaFinal)); @params.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)); - @params.Add(new ReportParameter("FechaImpresion", DateTime.Now.ToShortDateString())); + @params.Add(new ReportParameter("FechaImpresion", NowADS().ToShortDateString())); if (Imagen.Exists) { @@ -247,7 +247,7 @@ public partial class Compras_RepGastosFijos : ClsPaginas @params.Add(new ReportParameter("LogoPath", "")); } - ImprimirPDF(RutaPDF, DTDatos, @params, "RepGastosFijos " + DateTime.Now.ToString("yyyy-MM-dd"), Formato); + ImprimirPDF(RutaPDF, DTDatos, @params, "RepGastosFijos " + NowADS().ToString("yyyy-MM-dd"), Formato); } #endregion diff --git a/Compras/RepGastosSemanal.aspx.cs b/Compras/RepGastosSemanal.aspx.cs index 9e86f14ca..79b00b3c1 100644 --- a/Compras/RepGastosSemanal.aspx.cs +++ b/Compras/RepGastosSemanal.aspx.cs @@ -40,8 +40,8 @@ public partial class Compras_RepGastosSemanal : ClsPaginas private void InicializaValores() { - txtFechaI.Text = DateTime.Now.FirstDayOfMonth().ToShortDateString(); - txtFechaF.Text = DateTime.Now.ToShortDateString(); + txtFechaI.Text = NowADS().FirstDayOfMonth().ToShortDateString(); + txtFechaF.Text = NowADS().ToShortDateString(); } private void Consulta() @@ -170,7 +170,7 @@ public partial class Compras_RepGastosSemanal : ClsPaginas List para = new List(); para.Add(new ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)); para.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)); - para.Add(new ReportParameter("FechaImpresion", DateTime.Now.ToString())); + para.Add(new ReportParameter("FechaImpresion", NowADS().ToString())); para.Add(new ReportParameter("Filtros",$"Semana del {txtFechaI.Text} al {txtFechaF.Text}")); if (Imagen.Exists) diff --git a/Compras/RepImportaciones.aspx.vb b/Compras/RepImportaciones.aspx.vb index d95c5e716..8afa31c9f 100644 --- a/Compras/RepImportaciones.aspx.vb +++ b/Compras/RepImportaciones.aspx.vb @@ -26,8 +26,8 @@ Partial Class Compras_RepImportaciones End Sub Private Sub InicializaValores() - TxtFechaI.Text = Date.Now.AddDays(-Now.DayOfYear + 1).ToShortDateString - TxtFechaF.Text = Date.Now.ToShortDateString + TxtFechaI.Text = NowADS().AddDays(-NowADS().DayOfYear + 1).ToShortDateString + TxtFechaF.Text = NowADS().ToShortDateString DdlProveedores.setEsWebService(True) DdlProveedores.Attributes.Add("data-metodo", "getproveedores") diff --git a/Compras/RepNotasCredito.aspx.vb b/Compras/RepNotasCredito.aspx.vb index ba92ac5c9..02a971121 100644 --- a/Compras/RepNotasCredito.aspx.vb +++ b/Compras/RepNotasCredito.aspx.vb @@ -25,7 +25,7 @@ Partial Class Compras_RepNotasCredito DdlProveedores.SelectedText = "Todos" DdlProveedores.SelectedValue = "-1" - TxtFechaSaldar.Text = Now.ToShortDateString + TxtFechaSaldar.Text = NowADS().ToShortDateString CargaDatos() End If End Sub @@ -61,7 +61,7 @@ Partial Class Compras_RepNotasCredito End Sub Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click - GvDatos.ExportToExcel("RepNotasCredito." & Now.ToShortDateString) + GvDatos.ExportToExcel("RepNotasCredito." & NowADS().ToShortDateString) End Sub @@ -90,11 +90,11 @@ Partial Class Compras_RepNotasCredito params.Add(New ReportParameter("FechaInicio", FechaI)) params.Add(New ReportParameter("FechaFin", FechaF)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("Filtros", StrFiltro.ToString)) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) - ImprimirPDF("Empresas/Grales/Formatos/RepNotasCredito.rdlc", DtDatos, params, String.Format("ReporteVentas-{0}", Now.ToDateTime.ToShortDateString), Formato:=Formato) + ImprimirPDF("Empresas/Grales/Formatos/RepNotasCredito.rdlc", DtDatos, params, String.Format("ReporteVentas-{0}", NowADS().ToDateTime.ToShortDateString), Formato:=Formato) Else Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia) End If diff --git a/Compras/RepPUESinPago.aspx.vb b/Compras/RepPUESinPago.aspx.vb index a405e4c01..30acba57f 100644 --- a/Compras/RepPUESinPago.aspx.vb +++ b/Compras/RepPUESinPago.aspx.vb @@ -24,8 +24,8 @@ Partial Class Compras_RepPUESinPago End Sub Private Sub InicializaValores() - TxtFechaI.Text = FirstDayOfMonth(Now).ToShortDateString - TxtFechaF.Text = Now.LastDayOfMonth.ToShortDateString + TxtFechaI.Text = FirstDayOfMonth(NowADS()).ToShortDateString + TxtFechaF.Text = NowADS().LastDayOfMonth.ToShortDateString DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa) DdlSubProyecto.DataBind() diff --git a/Compras/RepPagado.aspx.cs b/Compras/RepPagado.aspx.cs index 77cf1f13a..9e6ec15c5 100644 --- a/Compras/RepPagado.aspx.cs +++ b/Compras/RepPagado.aspx.cs @@ -67,11 +67,11 @@ public partial class Compras_RepPagado : ClsPaginas CargaCuentasBancarias(); - txtFechaI.Text = $"01/{DateTime.Now.Month}/{DateTime.Now.Year}"; - txtFechaF.Text = DateTime.Now.ToShortDateString(); + txtFechaI.Text = $"01/{NowADS().Month}/{NowADS().Year}"; + txtFechaF.Text = NowADS().ToShortDateString(); - TxtFechaICompra.Text = MinFecha.ToShortDateString(); //$"01/01/{DateTime.Now.Year}"; - TxtFechaFCompra.Text = DateTime.Now.ToShortDateString(); + TxtFechaICompra.Text = MinFecha.ToShortDateString(); //$"01/01/{NowADS().Year}"; + TxtFechaFCompra.Text = NowADS().ToShortDateString(); } @@ -250,7 +250,7 @@ public partial class Compras_RepPagado : ClsPaginas List para = new List(); para.Add(new ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)); para.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)); - para.Add(new ReportParameter("FechaImpresion", DateTime.Now.ToShortDateString())); + para.Add(new ReportParameter("FechaImpresion", NowADS().ToShortDateString())); para.Add(new ReportParameter("Filtros", StrFiltro.ToString())); if (Imagen.Exists) @@ -262,7 +262,7 @@ public partial class Compras_RepPagado : ClsPaginas para.Add(new ReportParameter("LogoPath", "")); } - ImprimirPDF(RutaPDF,DtPagado, para, "RepPagado" + DateTime.Now.ToString("yyyyMMddhhmmss"), Opcion); + ImprimirPDF(RutaPDF,DtPagado, para, "RepPagado" + NowADS().ToString("yyyyMMddhhmmss"), Opcion); } protected void LnkVerGrafica_Click(object sender, EventArgs e) diff --git a/Compras/RepPagadoDetalle.aspx.cs b/Compras/RepPagadoDetalle.aspx.cs index 217deb3a5..7ad32a7a9 100644 --- a/Compras/RepPagadoDetalle.aspx.cs +++ b/Compras/RepPagadoDetalle.aspx.cs @@ -71,8 +71,8 @@ public partial class Compras_RepPágadoDetalle : ClsPaginas CargaCuentasBancarias(); - txtFechaI.Text = $"01/{DateTime.Now.Month}/{DateTime.Now.Year}"; - txtFechaF.Text = DateTime.Now.ToShortDateString(); + txtFechaI.Text = $"01/{NowADS().Month}/{NowADS().Year}"; + txtFechaF.Text = NowADS().ToShortDateString(); txtFechaI.Text = Request["FechaI"] == null ? "" : Request["FechaI"].ToString(); txtFechaF.Text = Request["FechaF"] == null ? "" : Request["FechaF"].ToString(); TxtFechaICompra.Text = Request["FechaICompra"] == null ? "" : Request["FechaICompra"].ToString(); @@ -245,7 +245,7 @@ public partial class Compras_RepPágadoDetalle : ClsPaginas List para = new List(); para.Add(new ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)); para.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)); - para.Add(new ReportParameter("FechaImpresion", DateTime.Now.ToShortDateString())); + para.Add(new ReportParameter("FechaImpresion", NowADS().ToShortDateString())); para.Add(new ReportParameter("Filtros", StrFiltro.ToString())); para.Add(new ReportParameter("TipoCentroCosto", UsuarioActual.Empresa.Tipo_CentroCosto.ToString())); if (Imagen.Exists) @@ -256,6 +256,6 @@ public partial class Compras_RepPágadoDetalle : ClsPaginas { para.Add(new ReportParameter("LogoPath", "")); } - ImprimirPDF(RutaPDF, DtPagado, para, "RepPagadoDetalle" + DateTime.Now.ToString("yyyyMMddhhmmss"), Opcion); + ImprimirPDF(RutaPDF, DtPagado, para, "RepPagadoDetalle" + NowADS().ToString("yyyyMMddhhmmss"), Opcion); } } \ No newline at end of file diff --git a/Compras/RepPagadoPeriodo.aspx.cs b/Compras/RepPagadoPeriodo.aspx.cs index 93e7839e1..977ffbc39 100644 --- a/Compras/RepPagadoPeriodo.aspx.cs +++ b/Compras/RepPagadoPeriodo.aspx.cs @@ -72,11 +72,11 @@ public partial class Compras_RepPagadoPeriodo : ClsPaginas CargaCuentasBancarias(); - txtFechaI.Text = $"01/{DateTime.Now.Month}/{DateTime.Now.Year}"; - txtFechaF.Text = DateTime.Now.ToShortDateString(); + txtFechaI.Text = $"01/{NowADS().Month}/{NowADS().Year}"; + txtFechaF.Text = NowADS().ToShortDateString(); - TxtFechaICompra.Text = MinFecha.ToShortDateString(); //'$"01/01/{DateTime.Now.Year}"; - TxtFechaFCompra.Text = DateTime.Now.ToShortDateString(); + TxtFechaICompra.Text = MinFecha.ToShortDateString(); //'$"01/01/{NowADS().Year}"; + TxtFechaFCompra.Text = NowADS().ToShortDateString(); CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyecto, LblSubProyecto, divProyecto:DivProyecto); } @@ -252,7 +252,7 @@ public partial class Compras_RepPagadoPeriodo : ClsPaginas List para = new List(); para.Add(new ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)); para.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)); - para.Add(new ReportParameter("FechaImpresion", DateTime.Now.ToShortDateString())); + para.Add(new ReportParameter("FechaImpresion", NowADS().ToShortDateString())); para.Add(new ReportParameter("Filtros", StrFiltro.ToString())); if (Imagen.Exists) { @@ -262,7 +262,7 @@ public partial class Compras_RepPagadoPeriodo : ClsPaginas { para.Add(new ReportParameter("LogoPath", "")); } - ImprimirPDF(RutaPDF, DtDatos, para, "RepPagadoPeriodo" + DateTime.Now.ToString("yyyyMMddhhmmss"), Opcion); + ImprimirPDF(RutaPDF, DtDatos, para, "RepPagadoPeriodo" + NowADS().ToString("yyyyMMddhhmmss"), Opcion); } protected void GvDatos_RowDataBound(object sender, GridViewRowEventArgs e) @@ -318,7 +318,7 @@ public partial class Compras_RepPagadoPeriodo : ClsPaginas if (TipoCambio == 3) { LiEspecifico.Visible = true; - TCEspecifico = get_GlobalTipoCambio(DateTime.Now); + TCEspecifico = get_GlobalTipoCambio(NowADS()); TxtEspecifico.Text = TCEspecifico.ToString(); } else diff --git a/Compras/RepProductosServicios.aspx.vb b/Compras/RepProductosServicios.aspx.vb index a916a4d5c..c663aa5a3 100644 --- a/Compras/RepProductosServicios.aspx.vb +++ b/Compras/RepProductosServicios.aspx.vb @@ -156,8 +156,8 @@ Partial Class Compras_RepProductosServicios RowActivoFijo.Visible = True 'Carga Fechas - txtFechaI.Text = FirstDayOfMonth(Now.AddMonths(-5)).ToShortDateString - txtFechaF.Text = Now.ToShortDateString + txtFechaI.Text = FirstDayOfMonth(NowADS().AddMonths(-5)).ToShortDateString + txtFechaF.Text = NowADS().ToShortDateString TipoCambio = 1 TCEspecifico = 0 @@ -390,7 +390,7 @@ Partial Class Compras_RepProductosServicios If RblTipoCambio.SelectedValue.ToEntero = 3 Then Dim TipoCambio As Double LiEspecifico.Visible = True - TipoCambio = GlobalTipoCambio(Now) + TipoCambio = GlobalTipoCambio(NowADS()) TxtEspecifico.Text = TipoCambio.ToString Else LiEspecifico.Visible = False @@ -416,7 +416,7 @@ Partial Class Compras_RepProductosServicios Private Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click GeneraPDF("Excel") - 'GvDatos.ExportToExcel("ReporteProductosServicios" & Now.ToShortDateString) + 'GvDatos.ExportToExcel("ReporteProductosServicios" & NowADS().ToShortDateString) End Sub Protected Sub GeneraPDF(Optional Formato As String = "PDF") @@ -439,7 +439,7 @@ Partial Class Compras_RepProductosServicios 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", DateTime.Now.ToString())) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString())) params.Add(New ReportParameter("Filtros", $"{Grupo}{Proveedor}{FechaInicio}{FechaFin}{TipoGasto}{Categoria}{Clasificacion}{PS}{Proyecto}{Estatus}{Usuario}{TipoAF}{SubTipoAF}{AF}")) 'params.Add(New ReportParameter("Proveedor", DdlProveedor.SelectedItem.Text)) diff --git a/Compras/RepProductosServiciosDetalle.aspx.vb b/Compras/RepProductosServiciosDetalle.aspx.vb index c35b95215..b15d64676 100644 --- a/Compras/RepProductosServiciosDetalle.aspx.vb +++ b/Compras/RepProductosServiciosDetalle.aspx.vb @@ -263,8 +263,8 @@ Partial Class Compras_RepProductosServiciosDetalle RowActivoFijo.Visible = True 'Carga Fechas - txtFechaI.Text = FirstDayOfMonth(Now.AddMonths(-5)).ToShortDateString - txtFechaF.Text = Now.ToShortDateString + txtFechaI.Text = FirstDayOfMonth(NowADS().AddMonths(-5)).ToShortDateString + txtFechaF.Text = NowADS().ToShortDateString TipoCambio = 1 TCEspecifico = 0 @@ -461,7 +461,7 @@ Partial Class Compras_RepProductosServiciosDetalle If RblTipoCambio.SelectedValue.ToEntero = 3 Then Dim TipoCambio As Double LiEspecifico.Visible = True - TipoCambio = GlobalTipoCambio(Now) + TipoCambio = GlobalTipoCambio(NowADS()) TxtEspecifico.Text = TipoCambio.ToString Else LiEspecifico.Visible = False @@ -520,7 +520,7 @@ Partial Class Compras_RepProductosServiciosDetalle 'params.Add(New ReportParameter("FechaInicio", FechaI)) 'params.Add(New ReportParameter("FechaFin", FechaF)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("AgrupoPor", $"{Grupo}{Proyecto}{TipoGasto}{SubProyecto}{Categoria}{Clasificacion}{PS}{Proveedor}{Estatus}{TipoAF}{SubTipoAF}{FechaIn}{FechaFn}")) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) diff --git a/Compras/RepProductosServiciosPeriodo.aspx.cs b/Compras/RepProductosServiciosPeriodo.aspx.cs index 132450a9d..5fd674633 100644 --- a/Compras/RepProductosServiciosPeriodo.aspx.cs +++ b/Compras/RepProductosServiciosPeriodo.aspx.cs @@ -192,7 +192,7 @@ public partial class Compras_RepProductosServiciosPeriodo : ClsPaginas if (RblTipoCambio.SelectedValue.ToEntero() == 3) { double TipoCambio=0; LiEspecifico.Visible = true; - TipoCambio = get_GlobalTipoCambio(DateTime.Now); + TipoCambio = get_GlobalTipoCambio(NowADS()); TxtEspecifico.Text = TipoCambio.ToString(); } else @@ -335,7 +335,7 @@ public partial class Compras_RepProductosServiciosPeriodo : ClsPaginas para.Add(new ReportParameter("FechaFin", FechaF)); para.Add(new ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)); para.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)); - para.Add(new ReportParameter("FechaImpresion", DateTime.Now.ToString())); + para.Add(new ReportParameter("FechaImpresion", NowADS().ToString())); para.Add(new ReportParameter("AgrupadoPor", $"Agrupado Por: {Proveedor}{Capturo}{Grupo}{Moneda}{FechaIn}{FechaFn}{Proyecto}{SubProyecto}")); if (Imagen.Exists) { @@ -355,7 +355,7 @@ public partial class Compras_RepProductosServiciosPeriodo : ClsPaginas protected void LnkExportar_Click(object sender, EventArgs e) { - GvDatos.ExportToExcel($"ReporteComprasPeriodo_{DateTime.Now.ToShortDateString()}"); + GvDatos.ExportToExcel($"ReporteComprasPeriodo_{NowADS().ToShortDateString()}"); } #endregion diff --git a/Compras/RepRembolsoComprobaciones.aspx.vb b/Compras/RepRembolsoComprobaciones.aspx.vb index 23e243447..4f611595d 100644 --- a/Compras/RepRembolsoComprobaciones.aspx.vb +++ b/Compras/RepRembolsoComprobaciones.aspx.vb @@ -301,7 +301,7 @@ Partial Class Compras_RepRembolsoComprobaciones params.Add(New ReportParameter("Numero", NumeroReembolso)) params.Add(New ReportParameter("Anio", DtDatos.FiltraParametros("CveCompra > 0").MAX("Fecha").ToDate.Year.ToString)) params.Add(New ReportParameter("Nombre", DtDatos.MAX("SubProyecto"))) - params.Add(New ReportParameter("Fecha", Now.Date.ToString)) + params.Add(New ReportParameter("Fecha", NowADS().Date.ToString)) params.Add(New ReportParameter("Elaboro", "")) params.Add(New ReportParameter("Autorizo", "")) params.Add(New ReportParameter("ElaboroPuesto", "")) @@ -309,7 +309,7 @@ Partial Class Compras_RepRembolsoComprobaciones params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToString)) params.Add(New ReportParameter("CveCajaChica", DtDatos.Rows(0)("CveCajaChica").ToString)) params.Add(New ReportParameter("CveFyE", "0")) ' @@ -325,7 +325,7 @@ Partial Class Compras_RepRembolsoComprobaciones Else params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToString)) params.Add(New ReportParameter("FechaInicio", txtFechaI.Text)) params.Add(New ReportParameter("FechaFin", txtFechaF.Text)) diff --git a/Compras/RepReqOCCompraInv.aspx.vb b/Compras/RepReqOCCompraInv.aspx.vb index 546b79131..24ddccc60 100644 --- a/Compras/RepReqOCCompraInv.aspx.vb +++ b/Compras/RepReqOCCompraInv.aspx.vb @@ -53,8 +53,8 @@ Partial Class RepReqOCCompraInv #End Region Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not Page.IsPostBack Then - txtFechaI.Text = Now.ToShortDateString - txtFechaF.Text = Now.ToShortDateString + txtFechaI.Text = NowADS().ToShortDateString + txtFechaF.Text = NowADS().ToShortDateString CargaSucursal() CargaProveedor() @@ -145,7 +145,7 @@ Partial Class RepReqOCCompraInv ' Else ' params.Add(New ReportParameter("LogoPath", "")) ' End If - ' ImprimirPDF("Empresas/Grales/Formatos/RepTraspasoAlmacen.rdlc", DtInventarios, params, String.Format("RepTraspasoAlmacen-{0}", Now.ToDateTime.ToShortDateString), Formato) + ' ImprimirPDF("Empresas/Grales/Formatos/RepTraspasoAlmacen.rdlc", DtInventarios, params, String.Format("RepTraspasoAlmacen-{0}", NowADS().ToDateTime.ToShortDateString), Formato) ' Else ' Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia) ' End If diff --git a/Compras/RepTopCompras.aspx b/Compras/RepTopCompras.aspx index 55c72e2cf..273a13e9d 100644 --- a/Compras/RepTopCompras.aspx +++ b/Compras/RepTopCompras.aspx @@ -80,7 +80,7 @@ - + @@ -88,7 +88,7 @@ - + @@ -96,7 +96,7 @@ - + diff --git a/Compras/RepTopCompras.aspx.vb b/Compras/RepTopCompras.aspx.vb index 586eff8c3..5c6338527 100644 --- a/Compras/RepTopCompras.aspx.vb +++ b/Compras/RepTopCompras.aspx.vb @@ -49,7 +49,7 @@ Partial Class Compras_RepTopCompras If RblTipoCambio.SelectedValue.ToEntero = 3 Then Dim TipoCambio As Double LiEspecifico.Visible = True - TipoCambio = GlobalTipoCambio(Now) + TipoCambio = GlobalTipoCambio(NowADS()) TxtEspecifico.Text = TipoCambio.ToString Else LiEspecifico.Visible = False diff --git a/Compras/eFacturas.aspx.vb b/Compras/eFacturas.aspx.vb index 10dd8f6d3..92b07f197 100644 --- a/Compras/eFacturas.aspx.vb +++ b/Compras/eFacturas.aspx.vb @@ -747,9 +747,9 @@ Partial Class Compras_eFacturas If UsuarioActual.CveEmpresa.Contiene(141, 152, 153, 160, 161, 162) Then System.Threading.Thread.Sleep(2000) - txtFechaI.Text = Now.AddMonths(-1).FirstDayOfMonth().ToShortDateString ' String.Format("01/01/{0}", If(Now.Month > 6, Now.Year, Now.Year - 1)) + txtFechaI.Text = NowADS().AddMonths(-1).FirstDayOfMonth().ToShortDateString ' String.Format("01/01/{0}", If(NowADS().Month > 6, NowADS().Year, NowADS().Year - 1)) - txtFechaF.Text = Now.ToShortDateString 'txtFechaI.Text.ToDate.AddMonths(1).AddDays(-1).ToShortDateString + txtFechaF.Text = NowADS().ToShortDateString 'txtFechaI.Text.ToDate.AddMonths(1).AddDays(-1).ToShortDateString Destino = String.Format("{0}Compras\", UsuarioActual.Empresa.Ruta) Ejecutable = "F:\Proyectos\wwwSIG\Utilerias\ADSUtilerias.exe" @@ -763,8 +763,8 @@ Partial Class Compras_eFacturas DdlClasificacionProv.DataBind() DdlClasificacionProv.Items.Insert(0, New ListItem("Todos", "-1")) - TxtFechaBitInicio.Text = Now.ToString("dd/MM/yyyy") - TxtFechaBitFin.Text = Now.ToString("dd/MM/yyyy") + TxtFechaBitInicio.Text = NowADS().ToString("dd/MM/yyyy") + TxtFechaBitFin.Text = NowADS().ToString("dd/MM/yyyy") TxtFolio.Focus() @@ -841,7 +841,7 @@ Partial Class Compras_eFacturas FechaI = MinFecha FechaF = MaxFecha txtFechaI.Text = MinFecha.ToString - txtFechaF.Text = Now.ToShortDateString + txtFechaF.Text = NowADS().ToShortDateString End If Dim DtPagos As DataTable = Nothing @@ -1488,7 +1488,7 @@ Partial Class Compras_eFacturas params.Add(New ReportParameter("FechaInicio", FechaI)) params.Add(New ReportParameter("FechaFin", FechaF)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) If Imagen.Exists Then params.Add(New ReportParameter("LogoPath", $"file//:{Imagen.FullName}")) @@ -1499,9 +1499,9 @@ Partial Class Compras_eFacturas If Tab.ActiveTabIndex = 2 Then - ImprimirPDF("Empresas/Grales/Formatos/RepFacturas.rdlc", DTTraslados, params, $"FacturasBuzon_{Now.ToString("yyyyMMyyddmmss")}", Tipo) + ImprimirPDF("Empresas/Grales/Formatos/RepFacturas.rdlc", DTTraslados, params, $"FacturasBuzon_{NowADS().ToString("yyyyMMyyddmmss")}", Tipo) Else - ImprimirPDF("Empresas/Grales/Formatos/RepFacturas.rdlc", dt, params, $"FacturasBuzon_{Now.ToString("yyyyMMyyddmmss")}", Tipo) + ImprimirPDF("Empresas/Grales/Formatos/RepFacturas.rdlc", dt, params, $"FacturasBuzon_{NowADS().ToString("yyyyMMyyddmmss")}", Tipo) End If @@ -1577,7 +1577,7 @@ Partial Class Compras_eFacturas 'ListaComprimidos.Add(filePath) ''CREO DIRECTORIO ALEATORIO 'Dim Aleatorio As New Random - 'Dim TempDirectorio As String = String.Format("{0}{1}\{2}{3}", UsuarioActual.Empresa.Ruta, "Temp\Facturas", Date.Now.Ticks, Aleatorio.Next(100, 999)) + 'Dim TempDirectorio As String = String.Format("{0}{1}\{2}{3}", UsuarioActual.Empresa.Ruta, "Temp\Facturas", NowADS().Ticks, Aleatorio.Next(100, 999)) 'Directory.CreateDirectory(TempDirectorio) 'ListaDirectoriosTemporales.Add(TempDirectorio) ''AGREGA DIRECTORIO A LA LISTA @@ -1631,12 +1631,12 @@ Partial Class Compras_eFacturas Dim Correo As New ClsSisMail - 'If Correo.SendMail(UsuarioActual.Empresa, "sig.buzon@gmail.com", "Facturas Efacturas " & Now.ToString("yyyyMMddhhmmss"), "Facturas", Archivos:=ListaArchivosMail) Then + 'If Correo.SendMail(UsuarioActual.Empresa, "sig.buzon@gmail.com", "Facturas Efacturas " & NowADS().ToString("yyyyMMddhhmmss"), "Facturas", Archivos:=ListaArchivosMail) Then - If Correo.SendMail(UsuarioActual.Empresa, UsuarioActual.Empresa.Buzon_Mail, "Facturas Efacturas " & Now.ToString("yyyyMMddhhmmss"), "Facturas", Archivos:=ListaArchivosMail) Then + If Correo.SendMail(UsuarioActual.Empresa, UsuarioActual.Empresa.Buzon_Mail, "Facturas Efacturas " & NowADS().ToString("yyyyMMddhhmmss"), "Facturas", Archivos:=ListaArchivosMail) Then sw.Stop() swTiempo.AppendFormat("EnvioCorreo: ({0}) {1} ", sw.ElapsedMilliseconds - swmili, sw.ElapsedMilliseconds) @@ -1776,8 +1776,8 @@ Partial Class Compras_eFacturas Dim ArchivoW As StreamWriter Dim strLineaTMP As String - ' strLineaTMP = Chr(13) & Chr(10) & Day(Now) & "/" & Month(Now) & "/" & Year(Now) & " " & Hour(Now) & ":" & Minuto & ". " & Str & Chr(13) & Chr(10) - strLineaTMP = String.Format("{0}{1}Log: {2}{3}:{4}", Chr(13), Chr(10), Str, DateTime.Now.ToShortDateString, DateTime.Now.ToShortTimeString) + ' strLineaTMP = Chr(13) & Chr(10) & Day(NowADS()) & "/" & Month(NowADS()) & "/" & Year(NowADS()) & " " & Hour(NowADS()) & ":" & Minuto & ". " & Str & Chr(13) & Chr(10) + strLineaTMP = String.Format("{0}{1}Log: {2}{3}:{4}", Chr(13), Chr(10), Str, NowADS().ToShortDateString, NowADS().ToShortTimeString) Try ArchivoW = New StreamWriter(String.Format("{0}\Logefacturas.txt", ModExtensiones.DirectorioBaseEmpresas), True, System.Text.Encoding.UTF8) Catch ex As UnauthorizedAccessException @@ -1957,7 +1957,7 @@ Partial Class Compras_eFacturas Catch exx As XmlException Valor = Nothing 'Using file__1 As New System.IO.StreamWriter([String].Format("{0}\UtileriasLOG.txt", Path.GetDirectoryName(Application.StartupPath)), True, System.Text.Encoding.UTF8) - ' file__1.WriteLine("{DateTime.Now}: {exx.Message}") + ' file__1.WriteLine("{NowADS()}: {exx.Message}") ' file__1.Close() ' file__1.Dispose() 'End Using @@ -2106,7 +2106,7 @@ Partial Class Compras_eFacturas 'Mensajes.AppendFormat("{0}|{1}|{2}|{3}|{4}|{5}{6}&", ValorXML(nodo, "serie"), ValorXML(nodo, "folio"), ValorXML(nodo, "fecha").ToDate().ToShortDateString(), Fact.EmisorNombre, ValorXML(nodo, "total").ToDouble().FormatoNumero(), '"Factura no timbrada correctamente.", "") 'CargaMensaje(ValorXML(nodo, "serie"), ValorXML(nodo, "folio"), ValorXML(nodo, "fecha").ToDate(), Fact.EmisorNombre, ValorXML(nodo, "total").ToDouble(), "Factura no timbrada correctamente.", - '"", DateTime.Now) + '"", NowADS()) End If 'limpio los valores porque realmente no es una factura @@ -2432,7 +2432,7 @@ Partial Class Compras_eFacturas Dim NombreArchivo As String = TmpArchivoPDF Dim CadenaOriginal As String = (Convert.ToString((Convert.ToString((Convert.ToString("||1.0|") & FolioFiscal) + "|" + FechaCertificacion.ToString("yyyy-MM-dd") + "T" + FechaCertificacion.ToString("HH:mm:ss") + "|") & SelloCFDi) + "|") & NoSerieCertificado) + "||" Dim RutaFormato As String = String.Format("{0}Empresas\Grales\Formatos\CFDI.rdlc", ModExtensiones.DirectorioBaseEmpresas) - 'Dim ArchivoTempXLS As String = String.Format("{0}\GenSis{1}-{2}", Path.GetDirectoryName(ArchivoBaseXLS), Now.Ticks, Path.GetFileName(ArchivoBaseXLS)) + 'Dim ArchivoTempXLS As String = String.Format("{0}\GenSis{1}-{2}", Path.GetDirectoryName(ArchivoBaseXLS), NowADS().Ticks, Path.GetFileName(ArchivoBaseXLS)) Dim Fiscal As String = String.Format("Domicilio Fiscal {0}{1} {2}{0}Col.{3}{0}CP. {4} {5},{6},{7}", vbCr, DomFisCalle, DomFisNoExt, DomFisCol, DomFisCP, DomFisMun, DomFisEst, DomFisPais) @@ -4335,7 +4335,7 @@ Partial Class Compras_eFacturas 'ModExtensiones.GuardaLog(" '--------PDF GenGoPdf Inicia ") Dim Respuesta As Boolean = False - Dim Inicio As DateTime = DateTime.Now + Dim Inicio As DateTime = NowADS() Dim goPdf As GoPdf.GoPdf = New GoPdf.GoPdf() Dim logotipo As Byte() = Nothing @@ -4343,7 +4343,7 @@ Partial Class Compras_eFacturas Dim result = goPdf.ExportarPdf(XmlRutaArchivo, logotipo, "", RutaRDLC, New GoPdf.Modelos.DatosAdicionales() With { .DomicilioReceptor = "" }) - Dim Fin As DateTime = DateTime.Now + Dim Fin As DateTime = NowADS() If result IsNot Nothing Then File.WriteAllBytes(PDFRutaArchivo, result) diff --git a/Contabilidad/AuxiliarPrePolizas.aspx.cs b/Contabilidad/AuxiliarPrePolizas.aspx.cs index 6b3a11e38..2bbd69ac8 100644 --- a/Contabilidad/AuxiliarPrePolizas.aspx.cs +++ b/Contabilidad/AuxiliarPrePolizas.aspx.cs @@ -29,8 +29,8 @@ public partial class Contabilidad_AuxiliarPrePolizas : ClsPaginas private void InicializaValores() { CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyecto, LblSubProyecto, divProyecto:DivProyecto); - txtFechaI.Text = DateTime.Now.FirstDayOfMonth().ToShortDateString(); - txtFechaF.Text = DateTime.Now.ToShortDateString(); + txtFechaI.Text = NowADS().FirstDayOfMonth().ToShortDateString(); + txtFechaF.Text = NowADS().ToShortDateString(); DdlPlantillaPoliza.DataSource = get_GlobalDTContaPlantillasPolizas(UsuarioActual.CveEmpresa); DdlPlantillaPoliza.Items.Insert(0, new ListItem("Seleccione", "-1")); DdlPlantillaPoliza.DataBind(); @@ -62,7 +62,7 @@ public partial class Contabilidad_AuxiliarPrePolizas : ClsPaginas List para = new List(); para.Add(new ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)); para.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)); - para.Add(new ReportParameter("FechaImpresion", DateTime.Now.ToString())); + para.Add(new ReportParameter("FechaImpresion", NowADS().ToString())); para.Add(new ReportParameter("AgrupadoPor", $"Agrupado Por: {PlantillaPoliza}{Concepto}{Proyecto}{SubProyecto}{FechaI}{FechaF}")); if (Imagen.Exists) { diff --git a/Contabilidad/CatCuentas.aspx.vb b/Contabilidad/CatCuentas.aspx.vb index a6b11098c..36f391f24 100644 --- a/Contabilidad/CatCuentas.aspx.vb +++ b/Contabilidad/CatCuentas.aspx.vb @@ -309,10 +309,10 @@ Partial Class Contabilidad_CatCuentas 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("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) - ImprimirPDF("Empresas/Grales/Formatos/CatCuentas.rdlc", DtDatos.FiltraParametros("", "Orden ASC"), params, String.Format("Catalogo Cuentas-{0}", Now.ToDateTime.ToShortDateString)) + ImprimirPDF("Empresas/Grales/Formatos/CatCuentas.rdlc", DtDatos.FiltraParametros("", "Orden ASC"), params, String.Format("Catalogo Cuentas-{0}", NowADS().ToDateTime.ToShortDateString)) End Sub End Class \ No newline at end of file diff --git a/Contabilidad/ContabilidadElectronica.aspx.vb b/Contabilidad/ContabilidadElectronica.aspx.vb index a7ea5854d..7c2a2e4b8 100644 --- a/Contabilidad/ContabilidadElectronica.aspx.vb +++ b/Contabilidad/ContabilidadElectronica.aspx.vb @@ -34,8 +34,8 @@ Partial Class Contabilidad_ContabilidadElectronica #Region " INICIALIZA VALORES " Private Sub InicializaValores() - 'TxtFechaI.Text = String.Format("01/01/{0}", Now.Year) - 'TxtFechaI.Text = Now.ToShortDateString + 'TxtFechaI.Text = String.Format("01/01/{0}", NowADS().Year) + 'TxtFechaI.Text = NowADS().ToShortDateString 'If Not UsuarioActual.Empresa.UsaContabilidad Then ' BtnGenerar.Enabled = False @@ -63,8 +63,8 @@ Partial Class Contabilidad_ContabilidadElectronica End If - DdlEjercicio.SelectedValue = Now.Year.ToString - DdlPeriodo.SelectedValue = Now.Month.ToString + DdlEjercicio.SelectedValue = NowADS().Year.ToString + DdlPeriodo.SelectedValue = NowADS().Month.ToString End Sub #End Region diff --git a/Contabilidad/ContabilizacionCompras.aspx.cs b/Contabilidad/ContabilizacionCompras.aspx.cs index c4e68f737..37af9c6f3 100644 --- a/Contabilidad/ContabilizacionCompras.aspx.cs +++ b/Contabilidad/ContabilizacionCompras.aspx.cs @@ -65,8 +65,8 @@ public partial class Contabilidad_ContabilizacionCompras : ClsPaginas DdlPlantillasPolizas.Items.Insert(0, new ListItem("Todos", "-1")); DdlPlantillasPolizas.DataBind(); - txtFechaI.Text = DateTime.Now.FirstDayOfMonth().AddMonths(-1).ToShortDateString(); - txtFechaF.Text = DateTime.Now.ToShortDateString(); + txtFechaI.Text = NowADS().FirstDayOfMonth().AddMonths(-1).ToShortDateString(); + txtFechaF.Text = NowADS().ToShortDateString(); if (UsuarioActual.CveRol == 1 || UsuarioActual.CveUsuario == 17 || UsuarioActual.CveUsuario == 171 || UsuarioActual.TienePermisoProceso(221)) { @@ -74,8 +74,8 @@ public partial class Contabilidad_ContabilizacionCompras : ClsPaginas TienePermisoVerPoliza = true; } - txtFechaI.Text = DateTime.Now.ToShortDateString(); - txtFechaF.Text = DateTime.Now.ToShortDateString(); + txtFechaI.Text = NowADS().ToShortDateString(); + txtFechaF.Text = NowADS().ToShortDateString(); //else //{ // Alert("Este módulo requiere el uso de Contabilidad.", ModExtensiones.TipoMensaje.MsgAdvertencia); diff --git a/Contabilidad/ContabilizacionVentas.aspx.cs b/Contabilidad/ContabilizacionVentas.aspx.cs index 3232a689d..2549a4512 100644 --- a/Contabilidad/ContabilizacionVentas.aspx.cs +++ b/Contabilidad/ContabilizacionVentas.aspx.cs @@ -71,8 +71,8 @@ public partial class Contabilidad_ContabilizacionVentas : ClsPaginas DdlSubProyecto.Items.Insert(0, new ListItem("Todos", "-1")); DdlSubProyecto.DataBind(); - txtFechaI.Text = DateTime.Now.AddMonths(-1).FirstDayOfMonth().ToShortDateString(); - txtFechaF.Text = DateTime.Now.ToShortDateString(); + txtFechaI.Text = NowADS().AddMonths(-1).FirstDayOfMonth().ToShortDateString(); + txtFechaF.Text = NowADS().ToShortDateString(); //cargaPolizas(); } @@ -406,7 +406,7 @@ public partial class Contabilidad_ContabilizacionVentas : ClsPaginas protected void ImgExcel2_Click(object sender, EventArgs e) { - GvV.ExportToExcel("DiarioVentas_" + DateTime.Now.ToShortDateString()); + GvV.ExportToExcel("DiarioVentas_" + NowADS().ToShortDateString()); } protected void LnkSimplificarCompra_Click(object sender, EventArgs e) diff --git a/Contabilidad/DiarioAmortizaciones.aspx.vb b/Contabilidad/DiarioAmortizaciones.aspx.vb index 9ab699646..6d14073d2 100644 --- a/Contabilidad/DiarioAmortizaciones.aspx.vb +++ b/Contabilidad/DiarioAmortizaciones.aspx.vb @@ -99,8 +99,8 @@ Partial Class Contabilidad_DiarioAmortizaciones TxtFecha.AutoPostBack = True DtTiposPoliza = Nothing - txtFechaI.Text = Now.AddMonths(0).FirstDayOfMonth.ToShortDateString - txtFechaF.Text = Now.ToShortDateString + txtFechaI.Text = NowADS().AddMonths(0).FirstDayOfMonth.ToShortDateString + txtFechaF.Text = NowADS().ToShortDateString If UsuarioActual.Sesion("DiarioPagos-CveProveedor").ToString <> "" Then DdlProveedores.SelectedValue = UsuarioActual.Sesion("DiarioPagos-CveProveedor").ToString.Trim If UsuarioActual.Sesion("DiarioPagos-FI").ToString <> "" Then txtFechaI.Text = UsuarioActual.Sesion("DiarioPagos-FI").ToString.Trim diff --git a/Contabilidad/DiarioCompras.aspx.vb b/Contabilidad/DiarioCompras.aspx.vb index cb24916fa..3d3477894 100644 --- a/Contabilidad/DiarioCompras.aspx.vb +++ b/Contabilidad/DiarioCompras.aspx.vb @@ -34,8 +34,8 @@ Partial Class Contabilidad_DiarioCompras DdlProveedores.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa) DdlProveedores.DataBind() - txtFechaI.Text = Now.AddMonths(0).FirstDayOfMonth.ToShortDateString - txtFechaF.Text = Now.ToShortDateString + txtFechaI.Text = NowADS().AddMonths(0).FirstDayOfMonth.ToShortDateString + txtFechaF.Text = NowADS().ToShortDateString If UsuarioActual.Sesion("DiarioCompras-CveProveedor").ToString <> "" Then DdlProveedores.SelectedValue = UsuarioActual.Sesion("DiarioCompras-CveProveedor").ToString.Trim If UsuarioActual.Sesion("DiarioCompras-FI").ToString <> "" Then txtFechaI.Text = UsuarioActual.Sesion("DiarioCompras-FI").ToString.Trim diff --git a/Contabilidad/DiarioPagos.aspx.vb b/Contabilidad/DiarioPagos.aspx.vb index b3915c3a5..c903edb12 100644 --- a/Contabilidad/DiarioPagos.aspx.vb +++ b/Contabilidad/DiarioPagos.aspx.vb @@ -92,8 +92,8 @@ Partial Class Contabilidad_DiarioPagos DdlProveedores.DataBind() TxtFecha.AutoPostBack = True - txtFechaI.Text = Now.AddMonths(0).FirstDayOfMonth.ToShortDateString - txtFechaF.Text = Now.ToShortDateString + txtFechaI.Text = NowADS().AddMonths(0).FirstDayOfMonth.ToShortDateString + txtFechaF.Text = NowADS().ToShortDateString If UsuarioActual.Sesion("DiarioPagos-CveProveedor").ToString <> "" Then DdlProveedores.SelectedValue = UsuarioActual.Sesion("DiarioPagos-CveProveedor").ToString.Trim If UsuarioActual.Sesion("DiarioPagos-FI").ToString <> "" Then txtFechaI.Text = UsuarioActual.Sesion("DiarioPagos-FI").ToString.Trim diff --git a/Contabilidad/FiltraPolizas.aspx.vb b/Contabilidad/FiltraPolizas.aspx.vb index 88f7945d5..db5b664b3 100644 --- a/Contabilidad/FiltraPolizas.aspx.vb +++ b/Contabilidad/FiltraPolizas.aspx.vb @@ -38,9 +38,9 @@ Partial Class Contabilidad_FiltraPolizas If Not Page.IsPostBack Then ViewState("Orden") = "" - DdlPeriodo.SelectedValue = Now.Month.ToString - TxtFechaICredito.Text = Now.FirstDayOfMonth.ToShortDateString - TxtFechaFCredito.Text = Now.LastDayOfMonth.ToShortDateString + DdlPeriodo.SelectedValue = NowADS().Month.ToString + TxtFechaICredito.Text = NowADS().FirstDayOfMonth.ToShortDateString + TxtFechaFCredito.Text = NowADS().LastDayOfMonth.ToShortDateString If UsuarioActual.Empresa.UsaContabilidad OrElse UsuarioActual.Empresa.TipoContabilidad > 0 Then @@ -227,7 +227,7 @@ Partial Class Contabilidad_FiltraPolizas params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("Ejercicio", DdlEjercicio.SelectedItem.ToString)) params.Add(New ReportParameter("Periodo", DdlPeriodo.SelectedItem.ToString)) @@ -295,7 +295,7 @@ Partial Class Contabilidad_FiltraPolizas Dim ObjIE As New ClsBancos() Dim pathPoliza As String = "" Dim TieneComprobante As String = "" - Tick = DateTime.Now.Ticks.ToString + Tick = NowADS().Ticks.ToString Dim ObjContabilidad As New ClsContabilidad Dim CvePrePoliza As Integer Dim PolizasSinComprobante As String = "Polizas sin comprobante:
    " diff --git a/Contabilidad/FisImpuestos.aspx.vb b/Contabilidad/FisImpuestos.aspx.vb index 0b8cd716e..23aff67ea 100644 --- a/Contabilidad/FisImpuestos.aspx.vb +++ b/Contabilidad/FisImpuestos.aspx.vb @@ -402,7 +402,7 @@ Partial Class Contabilidad_FisImpuestos objConta.IniciaTransacSQL() - CvePrepoliza = objConta.AddPrePolizas("Contabilidad/Impuestos", 62, 0, 0, DdlMoneda.SelectedValue.ToEntero, Now, TxtConcepto.Text.Trim.ToUpper, UsuarioActual.CveUsuario, UsuarioActual.Empresa.CveEmpresa) + CvePrepoliza = objConta.AddPrePolizas("Contabilidad/Impuestos", 62, 0, 0, DdlMoneda.SelectedValue.ToEntero, NowADS(), TxtConcepto.Text.Trim.ToUpper, UsuarioActual.CveUsuario, UsuarioActual.Empresa.CveEmpresa) If CvePrepoliza > 0 Then If objConta.AddUpdateFisImpuestos(-1, DdlTipoImpuesto.SelectedValue.ToEntero, CvePrepoliza, DdlProveedores.SelectedValue.ToEntero, TxtFechaImpuesto.Text.ToDate, TxtFolio.Text.Trim.ToUpper, NombreArchivo, UsuarioActual.CveUsuario, UsuarioActual.Empresa.CveEmpresa) Then diff --git a/Contabilidad/LibroDiario.aspx.vb b/Contabilidad/LibroDiario.aspx.vb index e62f95577..3ba05710a 100644 --- a/Contabilidad/LibroDiario.aspx.vb +++ b/Contabilidad/LibroDiario.aspx.vb @@ -63,8 +63,8 @@ Partial Class Contabilidad_LibroDiario Private Sub InicializaValores() - TxtFechaDel.Text = $"01/01/{Now.Year}" - TxtFechaAl.Text = Now.ToShortDateString + TxtFechaDel.Text = $"01/01/{NowADS().Year}" + TxtFechaAl.Text = NowADS().ToShortDateString End Sub Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) @@ -230,15 +230,15 @@ Partial Class Contabilidad_LibroDiario #Region " IMPRIMIR " Protected Sub Imprimir_click(sender As Object, e As EventArgs) Handles Imprimir.Click - 'FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate) - 'FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate) + 'FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate) + 'FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate) 'DtDatos = DtDatos ImprimirReporte() End Sub Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click - 'FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate) - 'FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate) + 'FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate) + 'FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate) 'DtDatos = DtDatos ImprimirReporte("EXCEL") End Sub diff --git a/Contabilidad/LibroMayor.aspx.vb b/Contabilidad/LibroMayor.aspx.vb index ac374cbd7..10399300b 100644 --- a/Contabilidad/LibroMayor.aspx.vb +++ b/Contabilidad/LibroMayor.aspx.vb @@ -60,8 +60,8 @@ Partial Class Contabilidad_LibroMayor Private Sub InicializaValores() - TxtFechaDel.Text = $"01/01/{Now.Year}" - TxtFechaAl.Text = Now.ToShortDateString + TxtFechaDel.Text = $"01/01/{NowADS().Year}" + TxtFechaAl.Text = NowADS().ToShortDateString 'DdlMoneda.DataSource = GlobalDTMonedas 'DdlMoneda.DataBind() @@ -188,15 +188,15 @@ Partial Class Contabilidad_LibroMayor #End Region Protected Sub Imprimir_click(sender As Object, e As EventArgs) Handles Imprimir.Click - FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate) - FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate) + FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate) + FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate) DtDatos = DtDatos ImprimirReporte() End Sub Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click - FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate) - FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate) + FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate) + FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate) DtDatos = DtDatos ImprimirReporte("EXCEL") End Sub diff --git a/Contabilidad/Poliza.aspx.vb b/Contabilidad/Poliza.aspx.vb index 9c7535ba9..55c79cb4e 100644 --- a/Contabilidad/Poliza.aspx.vb +++ b/Contabilidad/Poliza.aspx.vb @@ -87,7 +87,7 @@ Partial Class Contabilidad_Poliza End Sub 'Protected Sub cmdExcel_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs) Handles cmdExcel.Click - ' tbl.ExportToExcel("Poliza_" & Now.Year & If(Now.Month.ToString.Length = 1, "0" & Now.Month.ToString, Now.Month.ToString) & If(Now.Day.ToString.Length = 1, "0" & Now.Day.ToString, Now.Day.ToString)) + ' tbl.ExportToExcel("Poliza_" & NowADS().Year & If(NowADS().Month.ToString.Length = 1, "0" & NowADS().Month.ToString, NowADS().Month.ToString) & If(NowADS().Day.ToString.Length = 1, "0" & NowADS().Day.ToString, NowADS().Day.ToString)) 'End Sub Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click diff --git a/Contabilidad/PolizasImpresion.aspx.vb b/Contabilidad/PolizasImpresion.aspx.vb index 0ea6f1bfa..4b3e80111 100644 --- a/Contabilidad/PolizasImpresion.aspx.vb +++ b/Contabilidad/PolizasImpresion.aspx.vb @@ -30,8 +30,8 @@ Partial Class Contabilidad_PolizasImpresion ContabilidadSIG = UsuarioActual.Empresa.TipoContabilidad = 1 OrElse UsuarioActual.CveEmpresa = 119 - TxtFechaInicio.Text = Now.AddDays(-1).ToShortDateString - TxtFechaFin.Text = Now.ToShortDateString + TxtFechaInicio.Text = NowADS().AddDays(-1).ToShortDateString + TxtFechaFin.Text = NowADS().ToShortDateString DdlUsuarioRegistro.DataSource = GlobalDTUsuarios(CveEmpresa:=UsuarioActual.CveEmpresa) DdlUsuarioRegistro.DataBind() diff --git a/Contabilidad/PopUpAuxiliar.aspx.vb b/Contabilidad/PopUpAuxiliar.aspx.vb index 72c7cfed2..02ec5fce4 100644 --- a/Contabilidad/PopUpAuxiliar.aspx.vb +++ b/Contabilidad/PopUpAuxiliar.aspx.vb @@ -177,16 +177,6 @@ Partial Class PopUpAuxiliar e.Row.Cells(7).Visible = False e.Row.Cells(8).Visible = False e.Row.Cells(12).Visible = False - 'ElseIf e.Row.RowIndex = 1 Then - ' e.Row.Cells(0).Width = Unit.Pixel(95) - ' e.Row.Cells(1).Width = Unit.Pixel(180) - ' e.Row.Cells(2).Width = Unit.Pixel(80) - ' e.Row.Cells(3).Width = Unit.Pixel(80) - ' e.Row.Cells(4).Width = Unit.Pixel(83) - ' e.Row.Cells(5).Width = Unit.Pixel(93) - ' e.Row.Cells(6).Width = Unit.Pixel(85) - ' e.Row.Cells(7).Width = Unit.Pixel(95) - ' e.Row.Cells(8).Width = Unit.Pixel(70) End If e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Left @@ -274,10 +264,10 @@ Partial Class PopUpAuxiliar Dim Conta As New ClsContabilidad() Conta.IniciaTransacSQL() - Dim ClavePrePoliza = GVAuxiliar.Rows(e.RowIndex).DataKey("CvePrePolizaOriginal").ToEntero - Dim IdPoliza = GVAuxiliar.Rows(e.RowIndex).DataKey("IdPoliza").ToEntero + Dim ClavePrePoliza As Integer = GVAuxiliar.Rows(e.RowIndex).DataKey("CvePrePolizaOriginal").ToEntero + Dim IdPoliza As Integer = GVAuxiliar.Rows(e.RowIndex).DataKey("IdPoliza").ToEntero - Dim TieneError = False + Dim TieneError As Boolean = False If Not Conta.UpdatePrePolizasDetalleBloquear(ClavePrePoliza, False) Then TieneError = True @@ -337,7 +327,7 @@ Partial Class PopUpAuxiliar If CveCliente > 0 Then CvePlantillaPoliza = 11 If CveProveedor > 0 Then CvePlantillaPoliza = 2 - CvePrePoliza = ObjConta.AddPrePolizas("Contabilidad/PopUpAuxiliar", CvePlantillaPoliza, Importe, Importe, 1, Now, "Cancelacion de Pago", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + CvePrePoliza = ObjConta.AddPrePolizas("Contabilidad/PopUpAuxiliar", CvePlantillaPoliza, Importe, Importe, 1, NowADS(), "Cancelacion de Pago", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) If CvePlantillaPoliza = 2 Then If Not ObjConta.CancelarPagoCompraConAnticipo(CvePrePoliza, CveCompra, GVAuxiliar.Rows(e.RowIndex).DataKey("CveReferencia").ToEntero) Then @@ -460,7 +450,7 @@ Partial Class PopUpAuxiliar If e.CommandName = "DesAplicar" Then Dim CvePrePoliza, CveVenta, CveVentaAmortizacion As Integer - Dim TieneError = False + Dim TieneError As Boolean = False Dim St As String() = e.CommandArgument.ToString.Split("|"c) If St.Length > 0 Then @@ -495,7 +485,7 @@ Partial Class PopUpAuxiliar If e.CommandName = "DesAplicarCompra" Then Dim CvePrePoliza, CveCompra, CveCompraAmortizacion As Integer - Dim TieneError = False + Dim TieneError As Boolean = False Dim St As String() = e.CommandArgument.ToString.Split("|"c) If St.Length > 0 Then @@ -530,7 +520,7 @@ Partial Class PopUpAuxiliar If e.CommandName = "DesAplicarAnticipoCompra" Then Dim CvePrePoliza, CveCompra, CveIE As Integer - Dim TieneError = False + Dim TieneError As Boolean = False Dim St As String() = e.CommandArgument.ToString.Split("|"c) If St.Length > 0 Then diff --git a/Contabilidad/RegPoliza.aspx.vb b/Contabilidad/RegPoliza.aspx.vb index 71221cb6f..d7d9dd9a5 100644 --- a/Contabilidad/RegPoliza.aspx.vb +++ b/Contabilidad/RegPoliza.aspx.vb @@ -157,8 +157,8 @@ Partial Class RegPoliza CvePrePoliza = -1 Me.Form.DefaultButton = BtnConsultar.UniqueID - TxtFecha.Text = Now.ToShortDateString - TxtFechaPoliza.Text = Now.ToShortDateString + TxtFecha.Text = NowADS().ToShortDateString + TxtFechaPoliza.Text = NowADS().ToShortDateString If UsuarioActual.Empresa.UsaAC Then @@ -258,7 +258,7 @@ Partial Class RegPoliza End If Else - TxtFechaPoliza.Text = Date.Now.ToShortDateString + TxtFechaPoliza.Text = NowADS().ToShortDateString IDPoliza = -1 End If @@ -559,7 +559,7 @@ Partial Class RegPoliza ' If TmpDT.Rows.Count = 0 Then ' Alert("Debe consultar una póliza antes de imprimir ...", TipoMensaje.MsgAdvertencia) ' Else - ' 'GeneraPDF(Now, "Sin Timbrar", "Sin Timbrar", New Date(1, 1, 1), "Sin Timbrar", TmpDT, "Sin Timbrar", "Sin Timbrar", RutaCBB, If(LblSerie.Text.Trim = String.Empty, TxtFolio.Text.Trim, LblSerie.Text.Trim & "-" & TxtFolio.Text.Trim), "", True, False) + ' 'GeneraPDF(NowADS(), "Sin Timbrar", "Sin Timbrar", New Date(1, 1, 1), "Sin Timbrar", TmpDT, "Sin Timbrar", "Sin Timbrar", RutaCBB, If(LblSerie.Text.Trim = String.Empty, TxtFolio.Text.Trim, LblSerie.Text.Trim & "-" & TxtFolio.Text.Trim), "", True, False) ' GeneraPDF() ' End If 'End Sub @@ -568,7 +568,7 @@ Partial Class RegPoliza 'If TmpDT.Rows.Count = 0 Then ' Alert("Debe consultar una póliza antes de imprimir ...", TipoMensaje.MsgAdvertencia) 'Else - ' 'GeneraPDF(Now, "Sin Timbrar", "Sin Timbrar", New Date(1, 1, 1), "Sin Timbrar", TmpDT, "Sin Timbrar", "Sin Timbrar", RutaCBB, If(LblSerie.Text.Trim = String.Empty, TxtFolio.Text.Trim, LblSerie.Text.Trim & "-" & TxtFolio.Text.Trim), "", True, False) + ' 'GeneraPDF(NowADS(), "Sin Timbrar", "Sin Timbrar", New Date(1, 1, 1), "Sin Timbrar", TmpDT, "Sin Timbrar", "Sin Timbrar", RutaCBB, If(LblSerie.Text.Trim = String.Empty, TxtFolio.Text.Trim, LblSerie.Text.Trim & "-" & TxtFolio.Text.Trim), "", True, False) ' GeneraPDF() 'End If End Sub @@ -639,7 +639,7 @@ Partial Class RegPoliza ChkPolizaComplementaria.Checked = True If DT.Rows.Count = 0 Then - TxtFechaPoliza.Text = Now.ToShortDateString + TxtFechaPoliza.Text = NowADS().ToShortDateString TxtNumeroPoliza.Text = "" LblCargo.Text = "" LblAbono.Text = "" @@ -821,7 +821,7 @@ Partial Class RegPoliza BtnGuardar.OnClientClick = "FncVerifica();" If DT.Rows.Count = 0 Then - TxtFechaPoliza.Text = Now.ToShortDateString + TxtFechaPoliza.Text = NowADS().ToShortDateString TxtNumeroPoliza.Text = "" LblCargo.Text = "" LblAbono.Text = "" @@ -1185,7 +1185,7 @@ Partial Class RegPoliza Dim tCveSub As Integer = If(drt("IdSegNeg").ToString <> "", GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"SubProyecto ='{drt("SegNeg")}'").ToEntero, -1) 'If tCveSub <= 0 AndAlso drt("IdSegNeg").ToString.ToEntero = 0 Then 'toma el primero ' tCveSub = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto").ToEntero - 'End If ' Now, drt("IdCuenta").ToString.ToEntero, 0, + 'End If ' NowADS(), drt("IdCuenta").ToString.ToEntero, 0, If ObjConta.AddPrePolizasDetalle(tCvePrePoliza, drt("TipoMovto").ToString = "True", drt("Importe").ToString.ToDecimal, drt("Importe").ToString.ToDecimal, 299, @@ -1312,7 +1312,7 @@ Partial Class RegPoliza If ObjConta.UpdateDevolucionesIVA(gvr.DataKey("Id").ToEntero, IDPoliza, DdlCuenta.SelectedValue.ToEntero, gvr.FCDropDownList("DdlProveedor").SelectedValue.ToEntero, gvr.FCDropDownList("DdlTasa").SelectedValue.ToDouble, gvr.FCTextBox("TxtImporteBase").Text.ToDouble, gvr.FCTextBox("TxtImporteIVA").Text.ToDouble, - gvr.FCTextBox("TxtRetIVA").Text.ToDouble, gvr.FCTextBox("TxtRetISR").Text.ToDouble, Date.Now, + gvr.FCTextBox("TxtRetIVA").Text.ToDouble, gvr.FCTextBox("TxtRetISR").Text.ToDouble, NowADS(), gvr.FCTextBox("TxtReferenciaDevolucion").Text, gvr.FCTextBox("TxtSerie").Text, gvr.FCTextBox("TxtFolio").Text.ToEntero) Then Alert("Devolución Actualizada con Éxito", TipoMensaje.MsgInformacion) Else diff --git a/Contabilidad/RegPrePoliza.aspx.vb b/Contabilidad/RegPrePoliza.aspx.vb index b859e5ddb..222bc4852 100644 --- a/Contabilidad/RegPrePoliza.aspx.vb +++ b/Contabilidad/RegPrePoliza.aspx.vb @@ -213,7 +213,7 @@ Partial Class ContabilidadC_RegPrePoliza Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load If Not Page.IsPostBack Then - Tick = DateTime.Now.Ticks.ToString() + Tick = NowADS().Ticks.ToString() If UsuarioActual.Empresa.TipoContabilizacion = 1 OrElse UsuarioActual.Empresa.TipoContabilidad = 1 OrElse UsuarioActual.CveEmpresa = 119 Then Response.Redirect(Request.Url.PathAndQuery.Replace("RegPrePoliza", "RegPrePolizaS")) @@ -2255,7 +2255,7 @@ Partial Class ContabilidadC_RegPrePoliza 'If YaExiste = False Then ' If IdCuenta > 0 Then - ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Importe, "", CveConceptoContable, Concepto, Now.ToDate(), IdCtaContable, -1, ImporteMX:=Importe, CveSubProyecto:=CveSubProyecto, CveCuenta:=IdCuenta) Then + ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Importe, "", CveConceptoContable, Concepto, NowADS().ToDate(), IdCtaContable, -1, ImporteMX:=Importe, CveSubProyecto:=CveSubProyecto, CveCuenta:=IdCuenta) Then ' TieneError = True ' Exit For ' End If diff --git a/Contabilidad/RegPrePolizaS.aspx b/Contabilidad/RegPrePolizaS.aspx index 7e702103e..73804e4da 100644 --- a/Contabilidad/RegPrePolizaS.aspx +++ b/Contabilidad/RegPrePolizaS.aspx @@ -210,16 +210,16 @@ +
    + +
    + Si +
    +
    - -
    - -
    - Si -
    -
    +
    diff --git a/Contabilidad/RegPrePolizaS.aspx.vb b/Contabilidad/RegPrePolizaS.aspx.vb index 8901c767e..7c8cb4597 100644 --- a/Contabilidad/RegPrePolizaS.aspx.vb +++ b/Contabilidad/RegPrePolizaS.aspx.vb @@ -254,13 +254,14 @@ Partial Class ContabilidadC_RegPrePolizaS ' LnkImprimeExcelResumen.Visible = True 'End If - Tick = DateTime.Now.Ticks.ToString + Tick = NowADS().Ticks.ToString TxtTotalCargos.Attributes.Add("readonly", "readonly") TxtTotalAbonos.Attributes.Add("readonly", "readonly") CveMoneda = 1 ViewState("CvePrePoliza") = 0 ViewState("CvePeriodo") = "0" + ViewState("CvePeriodo") = "0" CveTipoTransaccion = -1 CveCuenta = -1 @@ -270,7 +271,6 @@ Partial Class ContabilidadC_RegPrePolizaS Beneficiario = "-1" Actualizar = False IdPoliza = -1 - CargaCtaContableE() CargaConceptosContablesE() CargaModalConceptoCuentas() @@ -310,8 +310,8 @@ Partial Class ContabilidadC_RegPrePolizaS LnkExcel.Visible = True DvPlantilla.Visible = True - TxtFechaDocumento.Text = Now.ToString("dd/MM/yyyy") - TxtFechaelaboracion.Text = Now.ToString("dd/MM/yyyy") + TxtFechaDocumento.Text = NowADS().ToString("dd/MM/yyyy") + TxtFechaelaboracion.Text = NowADS().ToString("dd/MM/yyyy") TxtConcepto.Enabled = True TxtUsuarioElaboro.Text = UsuarioActual.Usuario End If @@ -319,7 +319,6 @@ Partial Class ContabilidadC_RegPrePolizaS ElseIf Request("CvePrePolizaOrigen") IsNot Nothing AndAlso IsNumeric(Request("CvePrePolizaOrigen")) AndAlso Request("CvePrePolizaOrigen").ToEntero > 0 Then - CvePrePolizaOrigen = Request("CvePrePolizaOrigen").ToEntero CreaDT() CargaPrePolizaOrigen() @@ -335,14 +334,13 @@ Partial Class ContabilidadC_RegPrePolizaS LnkExcel.Visible = True DvPlantilla.Visible = True - TxtFechaDocumento.Text = Now.ToString("dd/MM/yyyy") - TxtFechaelaboracion.Text = Now.ToString("dd/MM/yyyy") + TxtFechaDocumento.Text = NowADS().ToString("dd/MM/yyyy") + TxtFechaelaboracion.Text = NowADS().ToString("dd/MM/yyyy") TxtConcepto.Enabled = True TxtUsuarioElaboro.Text = UsuarioActual.Usuario End If - TipoPlantilla = -1 If IfNull(Request("Tipo"), "").ToString = "Ing" Then TipoPlantilla = 1 @@ -355,13 +353,10 @@ Partial Class ContabilidadC_RegPrePolizaS CargaConceptos() CargaSubProyectos() - CargaCuentasContables() + CargaCuentasBancos() 'crea tabla temporal ArregloMovs = New ArrayList - - CargaCuentas() - If IfNull(Request("Tipo"), "").ToString <> "NOMPROV" Then GvPrePoliza.Columns(5).Visible = False GvMov.Columns(5).Visible = False @@ -563,7 +558,7 @@ Partial Class ContabilidadC_RegPrePolizaS Dim CveConceptoContable As Integer = e.Row.DataKey("CveConceptoContable").ToEntero If CveConceptoContable.Contiene(1, 2, 12, 91, 13, 38, 207, 203, 39, 61, 62, 63, 4, 278, 291, 292, 293, 294, 272, 150, 251, 301) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Ventas/Ventas.aspx?CveVenta={0}", e.Row.DataKey("CveVenta")) - If CveConceptoContable.Contiene(5, 6, 17, 18, 14, 19, 25, 26, 60, 205, 225, 234, 235, 240, 305, 306, 307, 308, 309, 310, 311, 312, 201, 206, 341, 342, 343, 344, 304, 272, 259) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Compras/Compras.aspx?CveCompra={0}", e.Row.DataKey("CveCompra")) + If CveConceptoContable.Contiene(5, 6, 17, 18, 14, 19, 25, 26, 60, 205, 225, 234, 235, 240, 305, 306, 307, 308, 309, 310, 311, 312, 201, 206, 341, 342, 343, 344, 304, 272, 259, 287, 288) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Compras/Compras.aspx?CveCompra={0}", e.Row.DataKey("CveCompra")) If CveConceptoContable.Contiene(68) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}", e.Row.DBCampo("CveMovimientoAlmacen")) If CveConceptoContable.Contiene(30, 204, 66, 92, 202, 10, 21, 48, 56, 338, 339, 340, 345, 346, 347) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Bancos/IE.aspx?CveIE={0}", e.Row.DBCampo("CveIE")) @@ -663,17 +658,20 @@ Partial Class ContabilidadC_RegPrePolizaS End Sub Private Sub CargaCuentasContables() - Dim ObjConta As New ClsContabilidad - If ObjConta.GetCuentas(-1, "-1", 1, UsuarioActual.CveEmpresa) Then - DdlCuentaContableE.DataSource = ObjConta.DtResultados - DdlCuentaContable.DataSource = ObjConta.DtResultados - DtCuentasContables = ObjConta.DtResultados + + If DdlCuentaContable.Items.Count = 0 Then + Dim ObjConta As New ClsContabilidad + If ObjConta.GetCuentas(-1, "-1", 1, UsuarioActual.CveEmpresa) Then + DdlCuentaContableE.DataSource = ObjConta.DtResultados + DdlCuentaContable.DataSource = ObjConta.DtResultados + DtCuentasContables = ObjConta.DtResultados + End If + ObjConta.Dispose() + DdlCuentaContable.DataBind() + DdlCuentaContable.Items.Insert(0, New ListItem("Seleccione", "0")) + DdlCuentaContableE.DataBind() + DdlCuentaContableE.Items.Insert(0, New ListItem("Sin Asignar", "0")) End If - ObjConta.Dispose() - DdlCuentaContable.DataBind() - DdlCuentaContable.Items.Insert(0, New ListItem("Seleccione", "0")) - DdlCuentaContableE.DataBind() - DdlCuentaContableE.Items.Insert(0, New ListItem("Sin Asignar", "0")) End Sub Private Sub CargaTiposGasto() @@ -1170,7 +1168,9 @@ Partial Class ContabilidadC_RegPrePolizaS CveTipoGasto:=If(DdlTipoGasto.Visible, row.DataKey("CveTipoGasto").ToEntero, row.DataKey("CveTipoGasto").ToEntero), CveConceptoContable:=row.DataKey("CveConceptoContable").ToEntero, CveProveedor:=row.DataKey("CveProveedor").ToEntero, CveCompra:=row.DataKey("CveCompra").ToEntero, CveCliente:=row.DataKey("CveCliente").ToEntero, CveVenta:=row.DataKey("CveVenta").ToEntero, - CvePersonal:=row.DataKey("CvePersonal").ToEntero, Referencia:=row.FCLiteral("TxtRef").Text, CveCuenta:=row.DataKey("CveCuenta").ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario, CveIE:=CveIEAgregado) Then + CvePersonal:=row.DataKey("CvePersonal").ToEntero, Referencia:=row.FCLiteral("TxtRef").Text, + TipoCambio:=row.DataKey("TC").ToDecimal, + CveCuenta:=row.DataKey("CveCuenta").ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario, CveIE:=CveIEAgregado) Then OcurrioError = True Exit For End If @@ -1218,6 +1218,14 @@ Partial Class ContabilidadC_RegPrePolizaS OnError("Ocurrío un error al actualizar la PrePoliza", ex) End Try + If ObjContabilidad.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual) Then + If ObjContabilidad.ValorPolizaDescuadre > 0 Then + OcurrioError = True + Alert("Error en validacion de prepoliza cuadre", TipoMensaje.MsgAdvertencia) + GuardaLogAD($"Compras/Compras-Actualizar | Error:{ObjContabilidad.MensajePolizaDescuadre} Diferencia:{ObjContabilidad.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas") + End If + End If + If Not OcurrioError Then ObjContabilidad.Commit() Alert("La PrePoliza se actualizó correctamente.", TipoMensaje.MsgInformacion, JSBtnAceptar:=$"window.location.href=""./RegPrePolizaS.aspx?CvePrePoliza={Me.CvePrePoliza}""", ShowCloseButton:=False) @@ -1241,6 +1249,7 @@ Partial Class ContabilidadC_RegPrePolizaS LtlTitulo.Text = "Agregar Concepto" BtnAceptar.Text = "Agregar" LimpiaCampos() + CargaCuentasContables() 'CargaConceptosContablesE() CargaSubProyectoE() @@ -1282,7 +1291,6 @@ Partial Class ContabilidadC_RegPrePolizaS DdlConceptosContablesE.SelectedValueExist(CveConceptoContable) DdlConceptosContablesE_SelectedIndexChanged(DdlConceptosContablesE, e) - TxtTipoCambio.Text = GvPrePoliza.Rows(IndiceGrid).DataKey("TC").ToString.ToDecimal.ToString("###,###,###.####") TxtME.Text = GvPrePoliza.Rows(IndiceGrid).DataKey("ImporteME").ToDecimal.FormatoNumero @@ -1318,7 +1326,7 @@ Partial Class ContabilidadC_RegPrePolizaS DdlSubProyectoE.SelectedValueExist(CveSubProyecto) CargaTipoGastoE() DdlTipoGastoE.SelectedValueExist(CveTipoGasto) - + CargaCuentasContables() DdlCuentaContableE.SelectedValueExist(CveCuenta) If Cargo <> 0 Then TxtCargoE.Text = Cargo.FormatoNumero @@ -1339,7 +1347,6 @@ Partial Class ContabilidadC_RegPrePolizaS End If - If DdlConceptosContablesE.SelectedValue.ToEntero = 30 AndAlso CvePrePoliza > 0 Then DdlConceptosContablesE.Enabled = False Else @@ -1371,16 +1378,16 @@ Partial Class ContabilidadC_RegPrePolizaS DdlTipoGastoE.DataBind() DdlTipoGastoE.Items.Insert(0, New ListItem("Sin Asignar", "0")) End Sub - Private Sub CargaCtaContableE() - Dim ObjConta As New ClsContabilidad - If ObjConta.GetCuentas(-1, "-1", 1, UsuarioActual.CveEmpresa) Then - DdlCuentaContableE.DataSource = ObjConta.DtResultados - End If - ObjConta.Dispose() + 'Private Sub CargaCtaContableE() + ' Dim ObjConta As New ClsContabilidad + ' If ObjConta.GetCuentas(-1, "-1", 1, UsuarioActual.CveEmpresa) Then + ' DdlCuentaContableE.DataSource = ObjConta.DtResultados + ' End If + ' ObjConta.Dispose() - DdlCuentaContableE.DataBind() - DdlCuentaContableE.Items.Insert(0, New ListItem("Sin Asignar", "0")) - End Sub + ' DdlCuentaContableE.DataBind() + ' DdlCuentaContableE.Items.Insert(0, New ListItem("Sin Asignar", "0")) + 'End Sub Private Sub DdlConceptosContablesE_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlConceptosContablesE.SelectedIndexChanged @@ -1982,7 +1989,7 @@ Partial Class ContabilidadC_RegPrePolizaS DdlTipoTransaccion.DataBind() DdlTipoTransaccion.Items.Insert(0, New ListItem("Seleccione Tipo Movimiento", "-1")) End Sub - Private Sub CargaCuentas() + Private Sub CargaCuentasBancos() DdlCuenta.Items.Clear() DdlCuenta.DataSource = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa) '.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta <> 1", DdlMoneda.SelectedValue)) DdlCuenta.DataBind() @@ -2102,11 +2109,11 @@ Partial Class ContabilidadC_RegPrePolizaS Actualizar = True GvMov.DataKeys(e.NewEditIndex).Value.ToString.ToEntero Dim idMov As Integer = GvMov.DataKeys(e.NewEditIndex).Value.ToString.ToEntero - Dim DrM As DataRow = DtMovimientos.Rows(e.NewEditIndex) If DrM IsNot Nothing Then HdnCve.Value = idMov.ToString + CargaCuentasContables() DdlCuentaContable.SelectedValueExist(DrM("CveCuenta").ToString) TxtReferencia.Text = DrM("Referencia").ToString @@ -2644,8 +2651,8 @@ Partial Class ContabilidadC_RegPrePolizaS GvMov.Columns(5).Visible = False TxtConcepto.Enabled = True - TxtFechaDocumento.Text = Now.ToString("dd/MM/yyyy") - TxtFechaelaboracion.Text = Now.ToString("dd/MM/yyyy") + TxtFechaDocumento.Text = NowADS().ToString("dd/MM/yyyy") + TxtFechaelaboracion.Text = NowADS().ToString("dd/MM/yyyy") TxtUsuarioElaboro.Text = UsuarioActual.Usuario diff --git a/Contabilidad/RepAnexoCatalogo.aspx.vb b/Contabilidad/RepAnexoCatalogo.aspx.vb index 5941f821a..e3dd29e2a 100644 --- a/Contabilidad/RepAnexoCatalogo.aspx.vb +++ b/Contabilidad/RepAnexoCatalogo.aspx.vb @@ -87,8 +87,8 @@ Partial Class AC_RepAnexoCatalogo DtDatos = Nothing CargaTipoCuentas() CargaSegmentosNegocio() - FechaInicio = DateSerial(Year(Now), Month(Now), 1) - FechaFin = Date.Now + FechaInicio = DateSerial(Year(NowADS()), Month(NowADS()), 1) + FechaFin = NowADS() If UsuarioActual.Empresa.UsaAC Then TipoReporte = -1 @@ -204,8 +204,8 @@ Partial Class AC_RepAnexoCatalogo If DdlTipoCuentas.SelectedValue.ToEntero = -2 AndAlso TxtCuenta.Text.Trim = "" Then Alert("El campo Cuenta es obligatorio.", TipoMensaje.MsgError) Else - FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate) - FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate) + FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate) + FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate) IdCuenta = If(DdlTipoCuentas.SelectedValue.ToEntero = -2, HdnCveCuenta.Value.ToEntero, DdlTipoCuentas.SelectedValue.ToEntero) CargaDatos() diff --git a/Contabilidad/RepAnexoCatalogoMes.aspx.vb b/Contabilidad/RepAnexoCatalogoMes.aspx.vb index 63ad7eedc..099414cd3 100644 --- a/Contabilidad/RepAnexoCatalogoMes.aspx.vb +++ b/Contabilidad/RepAnexoCatalogoMes.aspx.vb @@ -87,8 +87,8 @@ Partial Class AC_RepAnexoCatalogoMes DtDatos = Nothing CargaTipoCuentas() CargaSegmentosNegocio() - FechaInicio = DateSerial(Year(Now), Month(Now), 1) - FechaFin = Date.Now + FechaInicio = DateSerial(Year(NowADS()), Month(NowADS()), 1) + FechaFin = NowADS() If UsuarioActual.Empresa.UsaAC Then TipoReporte = -1 @@ -206,8 +206,8 @@ Partial Class AC_RepAnexoCatalogoMes If DdlTipoCuentas.SelectedValue.ToEntero = -2 AndAlso TxtCuenta.Text.Trim = "" Then Alert("El campo Cuenta es obligatorio.", TipoMensaje.MsgError) Else - FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate) - FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate) + FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate) + FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate) IdCuenta = If(DdlTipoCuentas.SelectedValue.ToEntero = -2, HdnCveCuenta.Value.ToEntero, DdlTipoCuentas.SelectedValue.ToEntero) CargaDatos() diff --git a/Contabilidad/RepAnexoCatalogoSegmento.aspx.vb b/Contabilidad/RepAnexoCatalogoSegmento.aspx.vb index c22931cc4..0ea1427a3 100644 --- a/Contabilidad/RepAnexoCatalogoSegmento.aspx.vb +++ b/Contabilidad/RepAnexoCatalogoSegmento.aspx.vb @@ -112,8 +112,8 @@ Partial Class AC_RepAnexoCatalogoSegmento DtDatos = Nothing CargaTipoCuentas() CargaSegmentosNegocio() - FechaInicio = DateSerial(Year(Now), Month(Now), 1) - FechaFin = Date.Now + FechaInicio = DateSerial(Year(NowADS()), Month(NowADS()), 1) + FechaFin = NowADS() If UsuarioActual.Empresa.UsaAC Then TipoReporte = -1 @@ -230,8 +230,8 @@ Partial Class AC_RepAnexoCatalogoSegmento End Sub Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) - FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate) - FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate) + FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate) + FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate) 'IdCuenta = If(DdlTipoCuentas.SelectedValue.ToEntero = -2, HdnCveCuenta.Value.ToEntero, DdlTipoCuentas.SelectedValue.ToEntero) CargaDatos() @@ -345,7 +345,7 @@ Partial Class AC_RepAnexoCatalogoSegmento SbFiltros.Append($"Fecha Inicio: {TxtFechaDel.Text} Fecha Fin: {TxtFechaAl.Text} ") SbFiltros.Append($" Cuenta: {TxtCuenta.Text}") - GvDatos.ExportToExcelGembox($"RepAnexoCatalogoSegmento{Now.ToString("yyyyMMddhhss")}", UsuarioActual, "Anexo del Catálogo Por Segmento", DatoTituloExtra:=$"", DatosFiltros:=SbFiltros.ToString()) + GvDatos.ExportToExcelGembox($"RepAnexoCatalogoSegmento{NowADS().ToString("yyyyMMddhhss")}", UsuarioActual, "Anexo del Catálogo Por Segmento", DatoTituloExtra:=$"", DatosFiltros:=SbFiltros.ToString()) End Sub diff --git a/Contabilidad/RepBalanceGeneral.aspx.vb b/Contabilidad/RepBalanceGeneral.aspx.vb index 01c5e437c..2d320e959 100644 --- a/Contabilidad/RepBalanceGeneral.aspx.vb +++ b/Contabilidad/RepBalanceGeneral.aspx.vb @@ -341,7 +341,7 @@ Partial Class Contabilidad_RepBalanceGeneral CargaEjercicios() - DdlEjercicio.SelectedValue = Now.Year.ToString + DdlEjercicio.SelectedValue = NowADS().Year.ToString 'Anual Anos = 0 @@ -461,7 +461,7 @@ Partial Class Contabilidad_RepBalanceGeneral Private Sub CargaDatos() Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) - Dim FechaI = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, CChar("0")), If(DdlEjercicio.SelectedValue.Length = 0, Now.Year.ToString, DdlEjercicio.SelectedValue)).ToDate + Dim FechaI = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, CChar("0")), If(DdlEjercicio.SelectedValue.Length = 0, NowADS().Year.ToString, DdlEjercicio.SelectedValue)).ToDate Dim FechaF = FechaI.ToDate.LastDayOfMonth TipoReporte = If(TipoReporte = -1, -1, DdlTipoReporte.SelectedValue.ToEntero) Dim IdCuentaAhorroDesahorro = If(UsuarioActual.CveEmpresa = 48, 87, 9999) @@ -828,7 +828,7 @@ Partial Class Contabilidad_RepBalanceGeneral End If ObjConta.Dispose() - Anos = (Year(Date.Now) - DdlEjercicio.SelectedValue.ToEntero) + 1 + Anos = (Year(NowADS()) - DdlEjercicio.SelectedValue.ToEntero) + 1 'Esconde todo For index = 1 To 20 @@ -1034,7 +1034,7 @@ Partial Class Contabilidad_RepBalanceGeneral End Sub Private Sub ProcesaImpresion() - Dim FechaI = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, CChar("0")), If(DdlEjercicio.SelectedValue.Length = 0, Now.Year.ToString, DdlEjercicio.SelectedValue)).ToDate + Dim FechaI = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, CChar("0")), If(DdlEjercicio.SelectedValue.Length = 0, NowADS().Year.ToString, DdlEjercicio.SelectedValue)).ToDate Dim FechaF = FechaI.ToDate.LastDayOfMonth TipoReporte = If(TipoReporte = -1, -1, DdlTipoReporte.SelectedValue.ToEntero) Dim IdCuentaAhorroDesahorro = If(UsuarioActual.CveEmpresa = 48, 87, 9999) @@ -1134,7 +1134,7 @@ Partial Class Contabilidad_RepBalanceGeneral params.Add(New ReportParameter("pFechaFin", FechaF)) params.Add(New ReportParameter("pSubtotal", DdlSubtotales.SelectedValue.ToString)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario)) - params.Add(New ReportParameter("FechaImpresion", Now.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToShortDateString)) ImprimirPDF(reportpath, DtDatosMensual, params, fileName, Formato) End Sub @@ -1157,7 +1157,7 @@ Partial Class Contabilidad_RepBalanceGeneral params.Add(New ReportParameter("pImg", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) params.Add(New ReportParameter("pFechaI", DdlEjercicio.SelectedValue)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario)) - params.Add(New ReportParameter("FechaImpresion", Now.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToShortDateString)) ImprimirPDF(reportpath, DtDatosAnual, params, fileName, Formato) End Sub diff --git a/Contabilidad/RepBalanceGeneralAnual.aspx.vb b/Contabilidad/RepBalanceGeneralAnual.aspx.vb index 36f691fff..756ef827b 100644 --- a/Contabilidad/RepBalanceGeneralAnual.aspx.vb +++ b/Contabilidad/RepBalanceGeneralAnual.aspx.vb @@ -54,7 +54,7 @@ Partial Class Contabilidad_RepBalanceGeneralAnual TipoReporte = 1 End If - DdlEjercicio.SelectedValue = Now.Year.ToString + DdlEjercicio.SelectedValue = NowADS().Year.ToString Anos = 0 CargaDatos() @@ -73,7 +73,7 @@ Partial Class Contabilidad_RepBalanceGeneralAnual End If ObjConta.Dispose() - Anos = (Year(Date.Now) - DdlEjercicio.SelectedValue.ToEntero) + 1 + Anos = (Year(NowADS()) - DdlEjercicio.SelectedValue.ToEntero) + 1 'Esconde todo For index = 1 To 20 diff --git a/Contabilidad/RepBalanceGeneralMensual.aspx.vb b/Contabilidad/RepBalanceGeneralMensual.aspx.vb index 380f5db62..0286662a9 100644 --- a/Contabilidad/RepBalanceGeneralMensual.aspx.vb +++ b/Contabilidad/RepBalanceGeneralMensual.aspx.vb @@ -38,7 +38,7 @@ Partial Class Contabilidad_RepBalanceGeneralMensual tdTipoReporte.Visible = True End If - DdlEjercicio.SelectedValue = Now.Year.ToString + DdlEjercicio.SelectedValue = NowADS().Year.ToString CargaDatos() End If diff --git a/Contabilidad/RepBalanceGeneralProForma.aspx.vb b/Contabilidad/RepBalanceGeneralProForma.aspx.vb index fe9c260c5..eedde2576 100644 --- a/Contabilidad/RepBalanceGeneralProForma.aspx.vb +++ b/Contabilidad/RepBalanceGeneralProForma.aspx.vb @@ -60,15 +60,15 @@ Partial Class Contabilidad_RepBalanceGeneralProForma - GvDatos.Columns(1).HeaderText = (Year(Date.Now) - 1).ToString - GvDatos.Columns(2).HeaderText = (Year(Date.Now) + 0).ToString - GvDatos.Columns(3).HeaderText = (Year(Date.Now) + 0).ToString - GvDatos.Columns(4).HeaderText = (Year(Date.Now) + 0).ToString - GvDatos.Columns(6).HeaderText = (Year(Date.Now) + 1).ToString - GvDatos.Columns(7).HeaderText = (Year(Date.Now) + 2).ToString - GvDatos.Columns(8).HeaderText = (Year(Date.Now) + 3).ToString + GvDatos.Columns(1).HeaderText = (Year(NowADS()) - 1).ToString + GvDatos.Columns(2).HeaderText = (Year(NowADS()) + 0).ToString + GvDatos.Columns(3).HeaderText = (Year(NowADS()) + 0).ToString + GvDatos.Columns(4).HeaderText = (Year(NowADS()) + 0).ToString + GvDatos.Columns(6).HeaderText = (Year(NowADS()) + 1).ToString + GvDatos.Columns(7).HeaderText = (Year(NowADS()) + 2).ToString + GvDatos.Columns(8).HeaderText = (Year(NowADS()) + 3).ToString - 'Anos = (Year(Date.Now) - DdlEjercicio.SelectedValue.ToEntero) + 1 + 'Anos = (Year(NowADS()) - DdlEjercicio.SelectedValue.ToEntero) + 1 ''Esconde todo 'For index = 1 To 40 Step 2 diff --git a/Contabilidad/RepBalanzaComprobacion.aspx.vb b/Contabilidad/RepBalanzaComprobacion.aspx.vb index 294aa9b2a..00372d807 100644 --- a/Contabilidad/RepBalanzaComprobacion.aspx.vb +++ b/Contabilidad/RepBalanzaComprobacion.aspx.vb @@ -59,8 +59,8 @@ Partial Class Contabilidad_RepBalanzaComprobacion If Not Page.IsPostBack Then Dim ErrorParametros = True ModoImpresion = False - TxtFechaDel.Text = DateSerial(Year(Now), Month(Now), 1).ToShortDateString - TxtFechaAl.Text = Date.Now.ToShortDateString + TxtFechaDel.Text = DateSerial(Year(NowADS()), Month(NowADS()), 1).ToShortDateString + TxtFechaAl.Text = NowADS().ToShortDateString If UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.UsaContabilidad Then BtnConsultar.Enabled = True @@ -81,8 +81,8 @@ Partial Class Contabilidad_RepBalanzaComprobacion End If If IsNothing(DtDatos) Then - FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate) - FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate) + FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate) + FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate) CargaDatos() End If Else @@ -115,8 +115,8 @@ Partial Class Contabilidad_RepBalanzaComprobacion Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) - FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate) - FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate) + FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate) + FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate) CargaDatos() @@ -173,8 +173,8 @@ Partial Class Contabilidad_RepBalanzaComprobacion ModoImpresion = True CargaGrid() - FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate) - FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate) + FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate) + FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate) 'RegistraScript("Enable();") @@ -220,8 +220,8 @@ Partial Class Contabilidad_RepBalanzaComprobacion ModoImpresion = True CargaGrid() - FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate) - FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate) + FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate) + FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate) 'RegistraScript("Enable();") diff --git a/Contabilidad/RepContabilidadDiaria.aspx.vb b/Contabilidad/RepContabilidadDiaria.aspx.vb index 16d5ad390..4d570a12c 100644 --- a/Contabilidad/RepContabilidadDiaria.aspx.vb +++ b/Contabilidad/RepContabilidadDiaria.aspx.vb @@ -17,8 +17,8 @@ Partial Class Contabilidad_FiltraPolizas Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not Page.IsPostBack Then ViewState("Orden") = "" - TxtFechaI.Text = Now.ToDate.ToShortDateString - TxtFechaF.Text = Now.ToShortDateString + TxtFechaI.Text = NowADS().ToDate.ToShortDateString + TxtFechaF.Text = NowADS().ToShortDateString CargaDatos() End If End Sub diff --git a/Contabilidad/RepEdoResultados2.aspx.vb b/Contabilidad/RepEdoResultados2.aspx.vb index 3d26b79df..27805f9e9 100644 --- a/Contabilidad/RepEdoResultados2.aspx.vb +++ b/Contabilidad/RepEdoResultados2.aspx.vb @@ -43,8 +43,8 @@ Partial Class Contabilidad_RepEdoResultados2 Private Sub Contabilidad_RepEdoResultados2_Load(sender As Object, e As EventArgs) Handles Me.Load If Not Page.IsPostBack Then CargaCombos() - txtFechaI.Text = $"01/01/{Now.Year}" - txtFechaF.Text = $"31/12/{Now.Year}" + txtFechaI.Text = $"01/01/{NowADS().Year}" + txtFechaF.Text = $"31/12/{NowADS().Year}" CargaDatos() End If @@ -222,7 +222,7 @@ Partial Class Contabilidad_RepEdoResultados2 params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToLongDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToLongDateString)) params.Add(New ReportParameter("Filtros", StrFiltro.ToString)) Dim rds1 As New ReportDataSource With {.Name = "DataSet1", .Value = If(DtIngresos IsNot Nothing, DtIngresos, New DataTable)} ' sino esta creado el objeto, lo creamos, para que no truene el reporte diff --git a/Contabilidad/RepEdoResultados2Detalle.aspx.cs b/Contabilidad/RepEdoResultados2Detalle.aspx.cs index 99d8319dc..067084904 100644 --- a/Contabilidad/RepEdoResultados2Detalle.aspx.cs +++ b/Contabilidad/RepEdoResultados2Detalle.aspx.cs @@ -38,8 +38,8 @@ public partial class Contabilidad_RepEdoResultados2Detalle : ClsPaginas DdlTipoGasto.DataBind(); DdlTipoGasto.Items.Insert(0, new ListItem("Todos", "-1")); - txtFechaI.Text = Request["FechaInicio"] == null ? DateTime.Now.ToShortDateString() : Request["FechaInicio"].ToString().ToDate().ToShortDateString(); - txtFechaF.Text = Request["FechaFin"] == null ? DateTime.Now.ToShortDateString() : Request["FechaFin"].ToString().ToDate().ToShortDateString(); + txtFechaI.Text = Request["FechaInicio"] == null ? NowADS().ToShortDateString() : Request["FechaInicio"].ToString().ToDate().ToShortDateString(); + txtFechaF.Text = Request["FechaFin"] == null ? NowADS().ToShortDateString() : Request["FechaFin"].ToString().ToDate().ToShortDateString(); int CveAgrupador = Request["CveAgrupador"] == null ? -1 : Request["CveAgrupador"].ToString().ToEntero(); int Gpo = Request["Gpo"] == null ? 0 : Request["Gpo"].ToString().ToEntero(); if (Gpo == 1) { DdlSubProyecto.SelectedValueExist(CveAgrupador); DdlClasificacion.SelectedValueExist(Request["CveClasificacion"] == null ? -1 : Request["CveClasificacion"].ToString().ToEntero()); DdlTipoGasto.SelectedValueExist(Request["CveTipoGasto"] == null ? -1 : Request["CveTipoGasto"].ToString().ToEntero()); } diff --git a/Contabilidad/RepEstadoResultados.aspx.vb b/Contabilidad/RepEstadoResultados.aspx.vb index d6cf044bf..fabfe41ef 100644 --- a/Contabilidad/RepEstadoResultados.aspx.vb +++ b/Contabilidad/RepEstadoResultados.aspx.vb @@ -163,14 +163,14 @@ Partial Class Contabilidad_RepEstadoResultados CargaDatosGenerales() - DdlEjercicio.SelectedValue = Now.Year.ToString + DdlEjercicio.SelectedValue = NowADS().Year.ToString Anos = 0 'Normal TotalActual = 0 TotalAnterior = 0 - DdlPeriodo.SelectedValue = Now.Month.ToString + DdlPeriodo.SelectedValue = NowADS().Month.ToString TabContainer_ActiveTabChanged(TabContainer, EventArgs.Empty) Else @@ -756,7 +756,7 @@ Partial Class Contabilidad_RepEstadoResultados LblTituloAniosRango.Text = $"{ UsuarioActual.Empresa.Empresa }" LblFechas.Text = $"{FechaInicio.ToString("dd/MMMM/yyyy")} al {FechaFin.ToString("dd/MMMM/yyyy")}" - LblFechaReporte.Text = Now.ToString("dd/MMMM/yyyy") + LblFechaReporte.Text = NowADS().ToString("dd/MMMM/yyyy") End Sub Protected Sub LnkDescarPersonalizados_Click(sender As Object, e As EventArgs) @@ -804,7 +804,7 @@ Partial Class Contabilidad_RepEstadoResultados Next - excel.Save(Me.Response, $"RepEstadoResultadosMensual_{Now.ToString("yyyyMMddhhmmss")}.xlsx") + excel.Save(Me.Response, $"RepEstadoResultadosMensual_{NowADS().ToString("yyyyMMddhhmmss")}.xlsx") End Sub @@ -826,7 +826,7 @@ Partial Class Contabilidad_RepEstadoResultados End If ObjConta.Dispose() - Anos = (Year(Date.Now) - DdlEjercicio.SelectedValue.ToEntero) + 1 + Anos = (Year(NowADS()) - DdlEjercicio.SelectedValue.ToEntero) + 1 'Esconde todo For index = 1 To 40 Step 2 @@ -998,7 +998,7 @@ Partial Class Contabilidad_RepEstadoResultados End Sub Private Sub ProcesaImpresion() - Dim FechaI = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, CChar("0")), If(DdlEjercicio.SelectedValue.Length = 0, Now.Year.ToString, DdlEjercicio.SelectedValue)).ToDate + Dim FechaI = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, CChar("0")), If(DdlEjercicio.SelectedValue.Length = 0, NowADS().Year.ToString, DdlEjercicio.SelectedValue)).ToDate Dim FechaF = FechaI.ToDate.LastDayOfMonth TipoReporte = If(TipoReporte = -1, -1, DdlTipoReporte.SelectedValue.ToEntero) Dim IdCuentaAhorroDesahorro = If(UsuarioActual.CveEmpresa = 48, 87, 9999) @@ -1096,7 +1096,7 @@ Partial Class Contabilidad_RepEstadoResultados params.Add(New ReportParameter("pFechaFin", FechaF)) params.Add(New ReportParameter("pSubtotal", DdlSubtotales.SelectedValue.ToString)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario)) - params.Add(New ReportParameter("FechaImpresion", Now.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToShortDateString)) ImprimirPDF(reportpath, DtDatosMensual, params, fileName, Formato) End Sub @@ -1119,7 +1119,7 @@ Partial Class Contabilidad_RepEstadoResultados params.Add(New ReportParameter("pImg", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) params.Add(New ReportParameter("pFechaI", DdlEjercicio.SelectedValue)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario)) - params.Add(New ReportParameter("FechaImpresion", Now.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToShortDateString)) ImprimirPDF(reportpath, DtDatosAnual, params, fileName, Formato) End Sub diff --git a/Contabilidad/RepEstadoResultadosAnual.aspx.vb b/Contabilidad/RepEstadoResultadosAnual.aspx.vb index 14c51ab24..85d839bac 100644 --- a/Contabilidad/RepEstadoResultadosAnual.aspx.vb +++ b/Contabilidad/RepEstadoResultadosAnual.aspx.vb @@ -46,7 +46,7 @@ Partial Class Contabilidad_RepEstadoResultadosAnual tdTipoReporte.Visible = True End If - DdlEjercicio.SelectedValue = Now.Year.ToString + DdlEjercicio.SelectedValue = NowADS().Year.ToString Anos = 0 CargaDatos() @@ -65,7 +65,7 @@ Partial Class Contabilidad_RepEstadoResultadosAnual End If ObjConta.Dispose() - Anos = (Year(Date.Now) - DdlEjercicio.SelectedValue.ToEntero) + 1 + Anos = (Year(NowADS()) - DdlEjercicio.SelectedValue.ToEntero) + 1 'Esconde todo For index = 1 To 40 Step 2 diff --git a/Contabilidad/RepEstadoResultadosMensual.aspx.vb b/Contabilidad/RepEstadoResultadosMensual.aspx.vb index 61fe82d05..31e9ad68b 100644 --- a/Contabilidad/RepEstadoResultadosMensual.aspx.vb +++ b/Contabilidad/RepEstadoResultadosMensual.aspx.vb @@ -38,7 +38,7 @@ Partial Class Contabilidad_RepEstadoResultadosMensual tdTipoReporte.Visible = True End If - DdlEjercicio.SelectedValue = Now.Year.ToString + DdlEjercicio.SelectedValue = NowADS().Year.ToString CargaDatos() End If diff --git a/Contabilidad/RepEstadoResultadosPorSegmento.aspx.vb b/Contabilidad/RepEstadoResultadosPorSegmento.aspx.vb index f1953d5d4..c7617d7e3 100644 --- a/Contabilidad/RepEstadoResultadosPorSegmento.aspx.vb +++ b/Contabilidad/RepEstadoResultadosPorSegmento.aspx.vb @@ -189,14 +189,14 @@ Partial Class Contabilidad_RepEstadoResultadosPorSegmento CargaDatosGenerales() - DdlEjercicio.SelectedValue = Now.Year.ToString + DdlEjercicio.SelectedValue = NowADS().Year.ToString Anos = 0 'Normal TotalActual = 0 TotalAnterior = 0 - DdlPeriodo.SelectedValue = Now.Month.ToString + DdlPeriodo.SelectedValue = NowADS().Month.ToString TabContainer_ActiveTabChanged(TabContainer, EventArgs.Empty) Else @@ -774,7 +774,7 @@ Partial Class Contabilidad_RepEstadoResultadosPorSegmento LblTituloAniosRango.Text = $"{ UsuarioActual.Empresa.Empresa }" LblFechas.Text = $"{FechaInicio.ToString("dd/MMMM/yyyy")} al {FechaFin.ToString("dd/MMMM/yyyy")}" - LblFechaReporte.Text = Now.ToString("dd/MMMM/yyyy") + LblFechaReporte.Text = NowADS().ToString("dd/MMMM/yyyy") End Sub Protected Sub LnkDescarPersonalizados_Click(sender As Object, e As EventArgs) @@ -822,7 +822,7 @@ Partial Class Contabilidad_RepEstadoResultadosPorSegmento Next - excel.Save(Me.Response, $"RepEstadoResultadosPorSegmento_{Now.ToString("yyyyMMddhhmmss")}.xlsx") + excel.Save(Me.Response, $"RepEstadoResultadosPorSegmento_{NowADS().ToString("yyyyMMddhhmmss")}.xlsx") End Sub diff --git a/Contabilidad/RepEstadoResultadosProForma.aspx.vb b/Contabilidad/RepEstadoResultadosProForma.aspx.vb index 8e381affe..6e4bbf687 100644 --- a/Contabilidad/RepEstadoResultadosProForma.aspx.vb +++ b/Contabilidad/RepEstadoResultadosProForma.aspx.vb @@ -54,15 +54,15 @@ Partial Class Contabilidad_RepEstadoResultadosProForma ObjConta.Dispose() - GvDatos.Columns(1).HeaderText = (Year(Date.Now) - 1).ToString - GvDatos.Columns(3).HeaderText = (Year(Date.Now) + 0).ToString - GvDatos.Columns(5).HeaderText = (Year(Date.Now) + 0).ToString - GvDatos.Columns(7).HeaderText = (Year(Date.Now) + 0).ToString - GvDatos.Columns(9).HeaderText = (Year(Date.Now) + 1).ToString - GvDatos.Columns(11).HeaderText = (Year(Date.Now) + 2).ToString - GvDatos.Columns(13).HeaderText = (Year(Date.Now) + 3).ToString + GvDatos.Columns(1).HeaderText = (Year(NowADS()) - 1).ToString + GvDatos.Columns(3).HeaderText = (Year(NowADS()) + 0).ToString + GvDatos.Columns(5).HeaderText = (Year(NowADS()) + 0).ToString + GvDatos.Columns(7).HeaderText = (Year(NowADS()) + 0).ToString + GvDatos.Columns(9).HeaderText = (Year(NowADS()) + 1).ToString + GvDatos.Columns(11).HeaderText = (Year(NowADS()) + 2).ToString + GvDatos.Columns(13).HeaderText = (Year(NowADS()) + 3).ToString - 'Anos = (Year(Date.Now) - DdlEjercicio.SelectedValue.ToEntero) + 1 + 'Anos = (Year(NowADS()) - DdlEjercicio.SelectedValue.ToEntero) + 1 ''Esconde todo 'For index = 1 To 40 Step 2 diff --git a/Contabilidad/RepFlujoEfectivo.aspx.vb b/Contabilidad/RepFlujoEfectivo.aspx.vb index eaa2fd164..c5fd9648c 100644 --- a/Contabilidad/RepFlujoEfectivo.aspx.vb +++ b/Contabilidad/RepFlujoEfectivo.aspx.vb @@ -53,8 +53,8 @@ Partial Class Contabilidad_RepFlujoEfectivo If Not Page.IsPostBack Then - 'TxtFechaDel.Text = DateSerial(Year(Now), Month(Now), 1).ToShortDateString - TxtFechaAl.Text = Date.Now.ToShortDateString + 'TxtFechaDel.Text = DateSerial(Year(NowADS()), Month(NowADS()), 1).ToShortDateString + TxtFechaAl.Text = NowADS().ToShortDateString CargaDatos() @@ -68,8 +68,8 @@ Partial Class Contabilidad_RepFlujoEfectivo Private Sub CargaDatos() Dim ObjConta As New ClsContabilidad - 'Dim FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate) - Dim FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate) + 'Dim FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate) + Dim FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate) FechaAl = TxtFechaAl.Text diff --git a/Contabilidad/RepGastosCC.aspx.vb b/Contabilidad/RepGastosCC.aspx.vb index 4f668faae..553e99dab 100644 --- a/Contabilidad/RepGastosCC.aspx.vb +++ b/Contabilidad/RepGastosCC.aspx.vb @@ -23,8 +23,8 @@ Partial Class RepGastosCC If Not Page.IsPostBack Then - txtFechaI.Text = Now.FirstDayOfMonth.ToShortDateString() - txtFechaF.Text = Now.ToShortDateString + txtFechaI.Text = NowADS().FirstDayOfMonth.ToShortDateString() + txtFechaF.Text = NowADS().ToShortDateString OrdenaDatos() End If @@ -61,7 +61,7 @@ Partial Class RepGastosCC If e.Row.RowType = DataControlRowType.DataRow Then ' e.Row.FCLiteral("LtlFolio").Text = "" & e.Row.FCLiteral("LtlFolio").Text & "" - ' If e.Row.DBCampo("FechaVencimiento").ToDate < Now Then + ' If e.Row.DBCampo("FechaVencimiento").ToDate < NowADS() Then ' ' e.Row.Cells(2).CssClass = "danger" ' e.Row.Cells(2).ForeColor = Drawing.Color.Red ' End If @@ -126,14 +126,14 @@ Partial Class RepGastosCC ' params.Add(New ReportParameter("FechaInicio", FechaI)) ' params.Add(New ReportParameter("FechaFin", FechaF)) ' params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - ' params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + ' params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) ' params.Add(New ReportParameter("Filtros", StrFiltro.ToString)) ' If Imagen.Exists Then ' params.Add(New ReportParameter("LogoPath", $"file://{Imagen.FullName}")) ' Else ' params.Add(New ReportParameter("LogoPath", "")) ' End If - ' ImprimirPDF("Empresas/Grales/Formatos/RepRemisiones.rdlc", DtVentas, params, String.Format("ReporteRemisiones-{0}", Now.ToDateTime.ToShortDateString)) + ' ImprimirPDF("Empresas/Grales/Formatos/RepRemisiones.rdlc", DtVentas, params, String.Format("ReporteRemisiones-{0}", NowADS().ToDateTime.ToShortDateString)) ' Else ' Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia) ' End If @@ -148,7 +148,7 @@ Partial Class RepGastosCC Dim StrFiltro As New StringBuilder If txtFechaI.Text <> "" Then StrFiltro.AppendFormat(" Fecha Inicio: {0}", txtFechaI.Text) If txtFechaF.Text <> "" Then StrFiltro.AppendFormat(" Fecha Fin: {0}", txtFechaF.Text) - GvDatos.ExportToExcelG("ReporteGastos" & Now.ToShortDateString, "Gastos Acumulados", UsuarioActual, StrFiltro.ToString, 100, 200) + GvDatos.ExportToExcelG("ReporteGastos" & NowADS().ToShortDateString, "Gastos Acumulados", UsuarioActual, StrFiltro.ToString, 100, 200) End Sub ' Note, it is important to override the form verification in order to successfully call a GridView1.RenderControl method. Public Overrides Sub VerifyRenderingInServerForm(control As Control) diff --git a/Contabilidad/RepIEPS.aspx.vb b/Contabilidad/RepIEPS.aspx.vb index 8fa87384e..f86547faf 100644 --- a/Contabilidad/RepIEPS.aspx.vb +++ b/Contabilidad/RepIEPS.aspx.vb @@ -22,8 +22,8 @@ Partial Class Contabilidad_RepIEPS End If End Sub Private Sub CargaFechas() - txtFechaI.Text = $"01/{Now.Month}/{Now.Year}" - txtFechaF.Text = Now.ToString("dd/MM/yyyy") + txtFechaI.Text = $"01/{NowADS().Month}/{NowADS().Year}" + txtFechaF.Text = NowADS().ToString("dd/MM/yyyy") End Sub Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) @@ -128,7 +128,7 @@ Partial Class Contabilidad_RepIEPS Dim para As List(Of ReportParameter) = New List(Of ReportParameter)() para.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) para.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - para.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString())) + para.Add(New ReportParameter("FechaImpresion", NowADS().ToString())) para.Add(New ReportParameter("Filtros", $"Filtros: {FechaI}{FechaF}{TipoOperacion}{Modalidad}")) para.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) diff --git a/Contabilidad/RepIVA.aspx.cs b/Contabilidad/RepIVA.aspx.cs index 2dd99ba0a..7281c9988 100644 --- a/Contabilidad/RepIVA.aspx.cs +++ b/Contabilidad/RepIVA.aspx.cs @@ -63,7 +63,7 @@ public partial class Contabilidad_RepIVA : ClsPaginas { TipoCambio = 1; TCEspecifico = -1; - DateTime FF = DateTime.Now.AddMonths(-1); + DateTime FF = NowADS().AddMonths(-1); txtFechaI.Text = $"01/{FF.Month}/{FF.Year}"; txtFechaF.Text = FF.LastDayOfMonth().ToShortDateString(); @@ -111,7 +111,7 @@ public partial class Contabilidad_RepIVA : ClsPaginas LblMsgAcreditable.Text = "La información presenta importes en negativo, estos no se incluirán en el archivo generado para DIOT"; } - GvA.Columns[11].Visible = DtIVAAcreditable.SUM("valorActosImp1516") > 0; // sino tiene valor la columna de importación de oculta + //GvA.Columns[11].Visible = DtIVAAcreditable.SUM("valorActosImp1516") > 0; // sino tiene valor la columna de importación de oculta if (ObjCont.GetRepIVAAcumulado(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), Conciliado, 3, DdlCuenta.SelectedValue.ToEntero(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)) { @@ -284,7 +284,7 @@ public partial class Contabilidad_RepIVA : ClsPaginas if (TipoCambio == 3) { LiEspecifico.Visible = true; - TCEspecifico = get_GlobalTipoCambio(DateTime.Now).ToString().ToDouble(); + TCEspecifico = get_GlobalTipoCambio(NowADS()).ToString().ToDouble(); TxtEspecifico.Text = TCEspecifico.ToString(); } else diff --git a/Contabilidad/RepIVADiferencias.aspx.vb b/Contabilidad/RepIVADiferencias.aspx.vb index 22a9ee915..8bbbabb8a 100644 --- a/Contabilidad/RepIVADiferencias.aspx.vb +++ b/Contabilidad/RepIVADiferencias.aspx.vb @@ -60,9 +60,9 @@ Partial Class Contabilidad_RepIVADiferencias End Sub Private Sub CargaCombos() - DdlEjercicio.Items.Insert(0, Now.Year.ToString) - DdlEjercicio.Items.Insert(1, Now.AddYears(-1).Year.ToString) - DdlPeriodo.SelectedValue = Now.Month.ToString + DdlEjercicio.Items.Insert(0, NowADS().Year.ToString) + DdlEjercicio.Items.Insert(1, NowADS().AddYears(-1).Year.ToString) + DdlPeriodo.SelectedValue = NowADS().Month.ToString End Sub Private Sub CargaDatos() Dim ObjCont As New ClsContPAQi(UsuarioActual.Empresa) @@ -109,7 +109,7 @@ Partial Class Contabilidad_RepIVADiferencias params.Add(New ReportParameter("Ejercicio", Ejercicio.ToString)) params.Add(New ReportParameter("Periodo", Periodo)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario)) - params.Add(New ReportParameter("FechaImpresion", Now.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToShortDateString)) ImprimirPDF(reportpath, DtDatos, params, fileName, Formato) Else diff --git a/Contabilidad/RepMovimientosAuxiliaresCatalogo.aspx.vb b/Contabilidad/RepMovimientosAuxiliaresCatalogo.aspx.vb index e07f09135..66d1d0bfb 100644 --- a/Contabilidad/RepMovimientosAuxiliaresCatalogo.aspx.vb +++ b/Contabilidad/RepMovimientosAuxiliaresCatalogo.aspx.vb @@ -173,8 +173,8 @@ Partial Class AC_RepMovimientosAuxiliaresCatalogo Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) - FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate) - FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate) + FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate) + FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate) IdCuenta = If(DdlTipoCuentas.SelectedValue.ToEntero <> -2, DdlTipoCuentas.SelectedValue.ToEntero, HdnCveCuenta.Value.ToEntero) CargaDatos() @@ -393,8 +393,8 @@ Partial Class AC_RepMovimientosAuxiliaresCatalogo If DdlTipoCuentas.SelectedValue.ToEntero = -2 AndAlso TxtCuenta.Text.Trim = "" Then Alert("El campo Cuenta es obligatorio.", TipoMensaje.MsgError) Else - FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate) - FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate) + FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate) + FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate) IdCuenta = If(DdlTipoCuentas.SelectedValue.ToEntero <> -1, DdlTipoCuentas.SelectedValue.ToEntero, HdnCveCuenta.Value.ToEntero) 'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) diff --git a/Contabilidad/RepOrigenAplicacion.aspx.vb b/Contabilidad/RepOrigenAplicacion.aspx.vb index f3ffed8e0..d52d018a1 100644 --- a/Contabilidad/RepOrigenAplicacion.aspx.vb +++ b/Contabilidad/RepOrigenAplicacion.aspx.vb @@ -72,12 +72,12 @@ Partial Class Contabilidad_RepOrigenAplicacion End If 'Normal - TxtFechaDel.Text = DateSerial(Year(Now), Month(Now), 1).ToShortDateString - TxtFechaAl.Text = Date.Now.ToShortDateString + TxtFechaDel.Text = DateSerial(Year(NowADS()), Month(NowADS()), 1).ToShortDateString + TxtFechaAl.Text = NowADS().ToShortDateString 'Anual Anos = 0 - DdlEjercicio.SelectedValue = Now.Year.ToString + DdlEjercicio.SelectedValue = NowADS().Year.ToString TabContainer_ActiveTabChanged(TabContainer, EventArgs.Empty) @@ -190,8 +190,8 @@ Partial Class Contabilidad_RepOrigenAplicacion Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) - Dim FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate) - Dim FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate) + Dim FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate) + Dim FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate) If ObjConta.GetOrigenAplicacion(FechaInicio, FechaFin) Then DtDatos = ObjConta.DtResultados @@ -382,7 +382,7 @@ Partial Class Contabilidad_RepOrigenAplicacion End If ObjConta.Dispose() - Anos = (Year(Date.Now) - DdlEjercicio.SelectedValue.ToEntero) + 1 + Anos = (Year(NowADS()) - DdlEjercicio.SelectedValue.ToEntero) + 1 If DtDatosAnual IsNot Nothing Then CargaGridAnual() diff --git a/Contabilidad/RepOrigenAplicacionAnual.aspx.vb b/Contabilidad/RepOrigenAplicacionAnual.aspx.vb index 6729d29d4..7e3d6a506 100644 --- a/Contabilidad/RepOrigenAplicacionAnual.aspx.vb +++ b/Contabilidad/RepOrigenAplicacionAnual.aspx.vb @@ -41,7 +41,7 @@ Partial Class Contabilidad_RepOrigenAplicacionAnual TipoReporte = -1 Anos = 0 - DdlEjercicio.SelectedValue = Now.Year.ToString + DdlEjercicio.SelectedValue = NowADS().Year.ToString CargaDatos() End If @@ -60,7 +60,7 @@ Partial Class Contabilidad_RepOrigenAplicacionAnual End If ObjConta.Dispose() - Anos = (Year(Date.Now) - DdlEjercicio.SelectedValue.ToEntero) + 1 + Anos = (Year(NowADS()) - DdlEjercicio.SelectedValue.ToEntero) + 1 If DtDatos IsNot Nothing Then CargaGrid() diff --git a/Contabilidad/RepOrigenAplicacionMensual.aspx.vb b/Contabilidad/RepOrigenAplicacionMensual.aspx.vb index 06521fd2b..d0c515d9c 100644 --- a/Contabilidad/RepOrigenAplicacionMensual.aspx.vb +++ b/Contabilidad/RepOrigenAplicacionMensual.aspx.vb @@ -32,7 +32,7 @@ Partial Class Contabilidad_RepOrigenAplicacionMensual If Not Page.IsPostBack Then TipoReporte = -1 - DdlEjercicio.SelectedValue = Now.Year.ToString + DdlEjercicio.SelectedValue = NowADS().Year.ToString CargaDatos() End If diff --git a/Contabilidad/RepPolizasCuadre.aspx.vb b/Contabilidad/RepPolizasCuadre.aspx.vb index 5f8e52790..74f15c79d 100644 --- a/Contabilidad/RepPolizasCuadre.aspx.vb +++ b/Contabilidad/RepPolizasCuadre.aspx.vb @@ -93,9 +93,9 @@ Partial Class Contabilidad_RepPolizasCuadre Clsconta.Dispose() DdlEjercicio.DataBind() - DdlEjercicio.SelectedValue = Now.Year.ToString + DdlEjercicio.SelectedValue = NowADS().Year.ToString - DdlPeriodo.SelectedValue = Now.Month.ToString + DdlPeriodo.SelectedValue = NowADS().Month.ToString End Sub diff --git a/Contabilidad2/CatContaEjercicios.aspx.vb b/Contabilidad2/CatContaEjercicios.aspx.vb index 2cee4cf42..59ebeb39c 100644 --- a/Contabilidad2/CatContaEjercicios.aspx.vb +++ b/Contabilidad2/CatContaEjercicios.aspx.vb @@ -129,8 +129,8 @@ Partial Class Contabilidad2_CatContaEjercicios Protected Sub LbGenerarPoliza_Click(sender As Object, e As EventArgs) Handles LbGenerarPoliza.Click Dim ObjConta As New ClsContabilidad - Dim FechaI As String = $"01/01/{DateTime.Now.Year}" - Dim FechaF As String = $"{DateTime.DaysInMonth(DateTime.Now.Year, 12)}/12/{DateTime.Now.Year}" + Dim FechaI As String = $"01/01/{NowADS().Year}" + Dim FechaF As String = $"{DateTime.DaysInMonth(NowADS().Year, 12)}/12/{NowADS().Year}" Dim CvePrePolizaCierre As Integer = -1 CvePrePolizaCierre = ObjConta.CierreEjercicio(UsuarioActual.CveEmpresa, Ejercicio, DdlCuentas.SelectedValue.ToEntero, FechaI, FechaF, UsuarioActual.CvePersonal) If CvePrePolizaCierre > 0 Then diff --git a/Contabilidad2/CatCuentasAsignaciones.aspx b/Contabilidad2/CatCuentasAsignaciones.aspx index ad11d6e70..c1efeb1b4 100644 --- a/Contabilidad2/CatCuentasAsignaciones.aspx +++ b/Contabilidad2/CatCuentasAsignaciones.aspx @@ -181,6 +181,10 @@
    +
    + + +
    diff --git a/Contabilidad2/CatCuentasAsignaciones.aspx.vb b/Contabilidad2/CatCuentasAsignaciones.aspx.vb index c089046df..4581f2714 100644 --- a/Contabilidad2/CatCuentasAsignaciones.aspx.vb +++ b/Contabilidad2/CatCuentasAsignaciones.aspx.vb @@ -202,7 +202,6 @@ Partial Class Contabilidad2_CatCuentasAsignaciones If Dr IsNot Nothing Then - divCliente.Visible = Boolean.Parse(Dr("AplicaCliente").ToString) divProveedor.Visible = Boolean.Parse(Dr("AplicaProveedor").ToString) divPersonal.Visible = Boolean.Parse(Dr("AplicaPersonal").ToString) @@ -213,6 +212,7 @@ Partial Class Contabilidad2_CatCuentasAsignaciones divSubProyectos.Visible = Boolean.Parse(Dr("AplicaSubProyecto").ToString) divActivoFijo.Visible = Boolean.Parse(Dr("AplicaActivoFijo").ToString) divCredito.Visible = Boolean.Parse(Dr("AplicaCredito").ToString) + divColectivas.Visible = Boolean.Parse(Dr("AplicaColectiva").ToString) DdlActivoFijo.Enabled = False @@ -254,6 +254,21 @@ Partial Class Contabilidad2_CatCuentasAsignaciones DdlCreditos.Enabled = False End If End If + + If Dr("AplicaColectiva").ToString = "True" Then + Dim ObjG As New ClsGenerales + If ObjG.GetColectivas(UsuarioActual.CveEmpresa, CveConceptoContable:=DdlCconceptosContables.SelectedValue.ToEntero) Then + DdlColectivas.DataSource = ObjG.DtResultados + End If + ObjG.Dispose() + DdlColectivas.DataBind() + + If OpAgregar Then + DdlColectivas.Enabled = True + Else + DdlColectivas.Enabled = False + End If + End If End If End Sub @@ -343,7 +358,7 @@ Partial Class Contabilidad2_CatCuentasAsignaciones If Not ObjConta.AddCuentasAsignaciones(DdlCconceptosContables.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlCuenta.SelectedValue.ToEntero, DdlProveedor.SelectedValue.ToEntero, DdlClientes.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero, DdlAlmacen.SelectedValue.ToEntero, TxtPorcentajeIVA.Text.ToDecimal, CveBancoCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero(), - CveConceptoNomina:=DdlConceptoNomina.SelectedValue.ToEntero(), CveSubProyecto:=DdlSubProyectos.SelectedValue.ToEntero, CveActivoFijo:=DdlActivoFijo.SelectedValue.ToEntero, + CveConceptoNomina:=DdlConceptoNomina.SelectedValue.ToEntero(), CveSubProyecto:=DdlSubProyectos.SelectedValue.ToEntero, CveActivoFijo:=DdlActivoFijo.SelectedValue.ToEntero, CveColectiva:=DdlColectivas.SelectedValue.ToEntero, CveTipoGasto:=DdlTipoGasto.SelectedValue.ToEntero, CveCredito:=DdlCreditos.SelectedValue.ToEntero, RegeneraCuenta:=chkRegeneraCuenta.Checked) Then ErrorString = "Error al agregar" End If @@ -351,7 +366,7 @@ Partial Class Contabilidad2_CatCuentasAsignaciones If Not ObjConta.UpdateCuentasAsignaciones(CveConceptoAsignacion, DdlCconceptosContables.SelectedValue.ToEntero, DdlCuenta.SelectedValue.ToEntero, DdlProveedor.SelectedValue.ToEntero, DdlClientes.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero, DdlAlmacen.SelectedValue.ToEntero, TxtPorcentajeIVA.Text.ToDecimal, CveBancoCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero(), - CveConceptoNomina:=DdlConceptoNomina.SelectedValue.ToEntero(), CveSubProyecto:=DdlSubProyectos.SelectedValue.ToEntero, CveActivoFijo:=DdlActivoFijo.SelectedValue.ToEntero, + CveConceptoNomina:=DdlConceptoNomina.SelectedValue.ToEntero(), CveSubProyecto:=DdlSubProyectos.SelectedValue.ToEntero, CveActivoFijo:=DdlActivoFijo.SelectedValue.ToEntero, CveColectiva:=DdlColectivas.SelectedValue.ToEntero, CveTipoGasto:=DdlTipoGasto.SelectedValue.ToEntero, CveCredito:=DdlCreditos.SelectedValue.ToEntero, RegeneraCuenta:=chkRegeneraCuenta.Checked) Then ErrorString = "Error al actualizar" End If diff --git a/Contabilidad2/MovimientosconProveedores.aspx.vb b/Contabilidad2/MovimientosconProveedores.aspx.vb index a54167118..b68002ad5 100644 --- a/Contabilidad2/MovimientosconProveedores.aspx.vb +++ b/Contabilidad2/MovimientosconProveedores.aspx.vb @@ -77,8 +77,8 @@ Partial Class MovimientosconProveedores DtDatos = Nothing CargaTipoCuentas() - FechaInicio = DateSerial(Year(Now), Month(Now), 1) - FechaFin = Date.Now + FechaInicio = DateSerial(Year(NowADS()), Month(NowADS()), 1) + FechaFin = NowADS() 'If UsuarioActual.Empresa.UsaAC Then ' TipoReporte = -1 @@ -288,8 +288,8 @@ Partial Class MovimientosconProveedores If DdlTipoCuentas.SelectedValue.ToEntero = -2 AndAlso TxtCuenta.Text.Trim = "" Then Alert("El campo Cuenta es obligatorio.", TipoMensaje.MsgError) Else - FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate) - FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate) + FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate) + FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate) IdCuenta = If(DdlTipoCuentas.SelectedValue.ToEntero = -2, HdnCveCuenta.Value.ToEntero, DdlTipoCuentas.SelectedValue.ToEntero) CargaDatos() diff --git a/Contabilidad2/RepAnexoCatalogo.aspx.vb b/Contabilidad2/RepAnexoCatalogo.aspx.vb index 3267b6c7d..0a1b31544 100644 --- a/Contabilidad2/RepAnexoCatalogo.aspx.vb +++ b/Contabilidad2/RepAnexoCatalogo.aspx.vb @@ -90,8 +90,8 @@ Partial Class AC2_RepAnexoCatalogo DtDatos = Nothing CargaTipoCuentas() - FechaInicio = Now.FirstDayOfMonth - FechaFin = Date.Now + FechaInicio = NowADS().FirstDayOfMonth + FechaFin = NowADS() 'If UsuarioActual.Empresa.UsaAC Then ' TipoReporte = -1 @@ -289,7 +289,7 @@ Partial Class AC2_RepAnexoCatalogo Protected Sub LnkExcel_Click(sender As Object, e As EventArgs) Handles LnkExcel.Click If Not IsNothing(DtDatos) Then ImprimirReporte("Excel") - 'GvDatos.ExportToExcelG("AnexoCatalogo" & Now.ToShortDateString & ".xlsx") + 'GvDatos.ExportToExcelG("AnexoCatalogo" & NowADS().ToShortDateString & ".xlsx") 'GvDatos.ExportToExcelG("ExistenciasHorizontal.xlsx", "Anexo Catalogo", UsuarioActual, "".ToString, 100, 200) End If End Sub @@ -315,8 +315,8 @@ Partial Class AC2_RepAnexoCatalogo If DdlCuentas.SelectedValue.ToEntero = -1 Then Alert("El campo Cuenta es obligatorio.", TipoMensaje.MsgError) Else - FechaInicio = If(txtFechaI.Text = "" Or txtFechaI.Text = "__/__/____", Date.Now, txtFechaI.Text.ToDate) - FechaFin = If(txtFechaF.Text = "" Or txtFechaF.Text = "__/__/____", Date.Now, txtFechaF.Text.ToDate) + FechaInicio = If(txtFechaI.Text = "" Or txtFechaI.Text = "__/__/____", NowADS(), txtFechaI.Text.ToDate) + FechaFin = If(txtFechaF.Text = "" Or txtFechaF.Text = "__/__/____", NowADS(), txtFechaF.Text.ToDate) IdCuenta = DdlCuentas.SelectedValue.ToEntero CargaDatos() End If diff --git a/Contabilidad2/RepAnexoCatalogoCC.aspx.vb b/Contabilidad2/RepAnexoCatalogoCC.aspx.vb index acd3de93f..e11533f3b 100644 --- a/Contabilidad2/RepAnexoCatalogoCC.aspx.vb +++ b/Contabilidad2/RepAnexoCatalogoCC.aspx.vb @@ -115,8 +115,8 @@ Partial Class Contabilidad2_RepAnexoCatalogoCC #Region " INICIALIZA VALORES " Private Sub InicializaValores() CargaCombos() - txtFechaI.Text = Now.FirstDayOfMonth.ToShortDateString - txtFechaF.Text = Now.LastDayOfMonth.ToShortDateString + txtFechaI.Text = NowADS().FirstDayOfMonth.ToShortDateString + txtFechaF.Text = NowADS().LastDayOfMonth.ToShortDateString End Sub Private Sub CargaCombos() diff --git a/Contabilidad2/RepAnexoCatalogoMensual.aspx.vb b/Contabilidad2/RepAnexoCatalogoMensual.aspx.vb index ae4657321..5d6558f86 100644 --- a/Contabilidad2/RepAnexoCatalogoMensual.aspx.vb +++ b/Contabilidad2/RepAnexoCatalogoMensual.aspx.vb @@ -113,7 +113,7 @@ Partial Class Contabilidad2_RepAnexoCatalogoMensual DdlCuentas.DataBind() DdlEjercicio.DataBind() - DdlEjercicio.SelectedValueExist(Now.Year.ToString) + DdlEjercicio.SelectedValueExist(NowADS().Year.ToString) CargarCentrosDeCosto(DdlProyecto, DdlSubproyecto, LblProyecto, LblSubProyecto, divProyecto:=DivProyecto) diff --git a/Contabilidad2/RepAnexoCatalogoMensualHorizontal.aspx.vb b/Contabilidad2/RepAnexoCatalogoMensualHorizontal.aspx.vb index 679c87fc5..856c8d68f 100644 --- a/Contabilidad2/RepAnexoCatalogoMensualHorizontal.aspx.vb +++ b/Contabilidad2/RepAnexoCatalogoMensualHorizontal.aspx.vb @@ -77,8 +77,8 @@ Partial Class Contabilidad_RepAnexoCatalogoMensualHorizontal DtDatos = Nothing CargaTipoCuentas() - FechaInicio = Now.FirstDayOfMonth - FechaFin = Date.Now + FechaInicio = NowADS().FirstDayOfMonth + FechaFin = NowADS() 'If UsuarioActual.Empresa.UsaAC Then ' TipoReporte = -1 @@ -279,7 +279,7 @@ Partial Class Contabilidad_RepAnexoCatalogoMensualHorizontal 'Protected Sub LnkExcel_Click(sender As Object, e As EventArgs) Handles LnkExcel.Click ' If Not IsNothing(DtDatos) Then ' ImprimirReporte("Excel") - ' 'GvDatos.ExportToExcelG("AnexoCatalogo" & Now.ToShortDateString & ".xlsx") + ' 'GvDatos.ExportToExcelG("AnexoCatalogo" & NowADS().ToShortDateString & ".xlsx") ' 'GvDatos.ExportToExcelG("ExistenciasHorizontal.xlsx", "Anexo Catalogo", UsuarioActual, "".ToString, 100, 200) ' End If 'End Sub @@ -305,8 +305,8 @@ Partial Class Contabilidad_RepAnexoCatalogoMensualHorizontal If DdlTipoCuentas.SelectedValue.ToEntero = -2 AndAlso DdlCuentas.SelectedValue.ToEntero = -1 Then Alert("El campo Cuenta es obligatorio.", TipoMensaje.MsgError) Else - FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate) - FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate) + FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate) + FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate) IdCuenta = If(DdlTipoCuentas.SelectedValue.ToEntero = -2, DdlCuentas.SelectedValue.ToEntero, DdlTipoCuentas.SelectedValue.ToEntero) CargaDatos() diff --git a/Contabilidad2/RepAnexoCatalogoSAT.aspx.vb.exclude b/Contabilidad2/RepAnexoCatalogoSAT.aspx.vb.exclude index ec0ceb8dc..08ec57651 100644 --- a/Contabilidad2/RepAnexoCatalogoSAT.aspx.vb.exclude +++ b/Contabilidad2/RepAnexoCatalogoSAT.aspx.vb.exclude @@ -77,8 +77,8 @@ Partial Class FinanzasSAT_RepAnexoCatalogo DtDatos = Nothing CargaTipoCuentas() - FechaInicio = DateSerial(Year(Now), Month(Now), 1) - FechaFin = Date.Now + FechaInicio = DateSerial(Year(NowADS()), Month(NowADS()), 1) + FechaFin = NowADS() 'If UsuarioActual.Empresa.UsaAC Then ' TipoReporte = -1 @@ -288,8 +288,8 @@ Partial Class FinanzasSAT_RepAnexoCatalogo If DdlTipoCuentas.SelectedValue.ToEntero = -2 AndAlso TxtCuenta.Text.Trim = "" Then Alert("El campo Cuenta es obligatorio.", TipoMensaje.MsgError) Else - FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate) - FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate) + FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate) + FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate) IdCuenta = If(DdlTipoCuentas.SelectedValue.ToEntero = -2, HdnCveCuenta.Value.ToEntero, DdlTipoCuentas.SelectedValue.ToEntero) CargaDatos() diff --git a/Contabilidad2/RepAnexoCatalogoVertical.aspx.vb b/Contabilidad2/RepAnexoCatalogoVertical.aspx.vb index 3c863a3dd..0d54bd46a 100644 --- a/Contabilidad2/RepAnexoCatalogoVertical.aspx.vb +++ b/Contabilidad2/RepAnexoCatalogoVertical.aspx.vb @@ -53,7 +53,7 @@ Partial Class Contabilidad2_RepAnexoCatalogoVertical Conta.Dispose() DdlEjercicio.DataBind() - DdlEjercicio.SelectedValueExist(Now.Year.ToString) + DdlEjercicio.SelectedValueExist(NowADS().Year.ToString) DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa) DdlSubProyecto.DataBind() @@ -71,7 +71,7 @@ Partial Class Contabilidad2_RepAnexoCatalogoVertical Private Sub CargaDatos() Dim Conta As New ClsContabilidad - If Conta.GetAnexoCatalagoCC(CveCuenta, Now, Now, DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, 1, UsuarioActual.CveUsuario) Then + If Conta.GetAnexoCatalagoCC(CveCuenta, NowADS(), NowADS(), DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, 1, UsuarioActual.CveUsuario) Then Dim DtHeaders As DataTable = Conta.DSResultados.Tables(0) GvCC.DataSource = Conta.DSResultados.Tables(1) diff --git a/Contabilidad2/RepBalanceGeneral.aspx.vb.exclude b/Contabilidad2/RepBalanceGeneral.aspx.vb.exclude index 02759e36a..45a0fcf15 100644 --- a/Contabilidad2/RepBalanceGeneral.aspx.vb.exclude +++ b/Contabilidad2/RepBalanceGeneral.aspx.vb.exclude @@ -208,7 +208,7 @@ Partial Class Contabilidad2_RepBalanceGeneral CargaDatosGenerales() - DdlEjercicio.SelectedValue = Now.Year.ToString + DdlEjercicio.SelectedValue = NowADS().Year.ToString 'Anual Anos = 0 @@ -254,7 +254,7 @@ Partial Class Contabilidad2_RepBalanceGeneral Private Sub CargaDatos() 'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) - Dim Anio As String = If(DdlEjercicio.SelectedValue <> "", DdlEjercicio.SelectedValue, Now.Year.ToString) + Dim Anio As String = If(DdlEjercicio.SelectedValue <> "", DdlEjercicio.SelectedValue, NowADS().Year.ToString) Dim ObjConta As New ClsContabilidad Dim FechaI = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, "0"c), Anio) Dim FechaF = DateAdd(DateInterval.Day, -1, DateAdd(DateInterval.Month, 1, CDate(FechaI))).ToString("dd/MM/yyyy") @@ -749,7 +749,7 @@ Partial Class Contabilidad2_RepBalanceGeneral End If ObjConta.Dispose() - Anos = (Year(Date.Now) - DdlEjercicio.SelectedValue.ToEntero) + 1 + Anos = (Year(NowADS()) - DdlEjercicio.SelectedValue.ToEntero) + 1 'Esconde todo 'For index = 1 To 20 diff --git a/Contabilidad2/RepBalanceGeneralHorizontal.aspx.vb b/Contabilidad2/RepBalanceGeneralHorizontal.aspx.vb index 9f6ccba22..ff4e3a003 100644 --- a/Contabilidad2/RepBalanceGeneralHorizontal.aspx.vb +++ b/Contabilidad2/RepBalanceGeneralHorizontal.aspx.vb @@ -408,13 +408,13 @@ Partial Class Contabilidad_RepBalanceGeneralHorizontal Clsconta.Dispose() DdlEjercicio.DataBind() - DdlEjercicio.SelectedValue = Now.Year.ToString + DdlEjercicio.SelectedValue = NowADS().Year.ToString 'DdlEjercicio.SelectedValueExist(UsuarioActual.Empresa.EjercicioActual.ToString) - DdlPeriodo.SelectedValue = Now.Month.ToString + DdlPeriodo.SelectedValue = NowADS().Month.ToString End Sub diff --git a/Contabilidad2/RepBalanceGeneralVertical.aspx.vb b/Contabilidad2/RepBalanceGeneralVertical.aspx.vb index 4eef352d3..3d5d736f5 100644 --- a/Contabilidad2/RepBalanceGeneralVertical.aspx.vb +++ b/Contabilidad2/RepBalanceGeneralVertical.aspx.vb @@ -18,7 +18,7 @@ Partial Class Contabilidad_RepBalanceGeneralVertical Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not IsPostBack Then - DdlEjercicio.SelectedValueExist(Now.Year.ToString) + DdlEjercicio.SelectedValueExist(NowADS().Year.ToString) InicializaValores() End If End Sub @@ -42,14 +42,14 @@ Partial Class Contabilidad_RepBalanceGeneralVertical Conta.Dispose() DdlEjercicio.DataBind() - DdlEjercicio.SelectedValueExist(Now.Year.ToString) + DdlEjercicio.SelectedValueExist(NowADS().Year.ToString) DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa) DdlSubProyecto.DataBind() DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1")) DdlSubProyecto.SelectedValue = "-1" - DdlPeriodo.SelectedValue = Now.Month.ToString + DdlPeriodo.SelectedValue = NowADS().Month.ToString End Sub #End Region diff --git a/Contabilidad2/RepBalanzaComprobacion.aspx.vb b/Contabilidad2/RepBalanzaComprobacion.aspx.vb index 20c0bced9..76372a053 100644 --- a/Contabilidad2/RepBalanzaComprobacion.aspx.vb +++ b/Contabilidad2/RepBalanzaComprobacion.aspx.vb @@ -82,8 +82,8 @@ Partial Class Contabilidad2_RepBalanzaComprobacion Dim ErrorParametros = True ModoImpresion = False - TxtFechaDel.Text = DateSerial(Year(Now), Month(Now), 1).ToShortDateString - TxtFechaAl.Text = Date.Now.ToShortDateString + TxtFechaDel.Text = DateSerial(Year(NowADS()), Month(NowADS()), 1).ToShortDateString + TxtFechaAl.Text = NowADS().ToShortDateString If Request("CveCuenta") IsNot Nothing AndAlso IsNumeric(Request("CveCuenta")) AndAlso Request("CveCuenta").ToEntero > 0 Then @@ -144,8 +144,8 @@ Partial Class Contabilidad2_RepBalanzaComprobacion Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) - FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate) - FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate) + FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate) + FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate) CargaDatos() diff --git a/Contabilidad2/RepBalanzaComprobacionSAT.aspx.vb.exclude b/Contabilidad2/RepBalanzaComprobacionSAT.aspx.vb.exclude index 09c7a34ef..4888f50af 100644 --- a/Contabilidad2/RepBalanzaComprobacionSAT.aspx.vb.exclude +++ b/Contabilidad2/RepBalanzaComprobacionSAT.aspx.vb.exclude @@ -59,8 +59,8 @@ Partial Class Contabilidad2_RepBalanzaComprobacion If Not Page.IsPostBack Then Dim ErrorParametros = True ModoImpresion = False - TxtFechaDel.Text = DateSerial(Year(Now), Month(Now), 1).ToShortDateString - TxtFechaAl.Text = Date.Now.ToShortDateString + TxtFechaDel.Text = DateSerial(Year(NowADS()), Month(NowADS()), 1).ToShortDateString + TxtFechaAl.Text = NowADS().ToShortDateString If Request("CveCuenta") IsNot Nothing AndAlso IsNumeric(Request("CveCuenta")) AndAlso Request("CveCuenta").ToEntero > 0 Then @@ -116,8 +116,8 @@ Partial Class Contabilidad2_RepBalanzaComprobacion Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) - FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate) - FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate) + FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate) + FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate) CargaDatos() diff --git a/Contabilidad2/RepCambiosSituacionFinanciera.aspx.vb b/Contabilidad2/RepCambiosSituacionFinanciera.aspx.vb index 49470a8f0..227457d64 100644 --- a/Contabilidad2/RepCambiosSituacionFinanciera.aspx.vb +++ b/Contabilidad2/RepCambiosSituacionFinanciera.aspx.vb @@ -125,8 +125,8 @@ Partial Class AC2_RepCambiosSituacionFinanciera Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load If Not Page.IsPostBack Then - 'TxtFechaDel.Text = DateSerial(Year(Now), Month(Now), 1).ToShortDateString - 'TxtFechaAl.Text = Date.Now.ToShortDateString + 'TxtFechaDel.Text = DateSerial(Year(NowADS()), Month(NowADS()), 1).ToShortDateString + 'TxtFechaAl.Text = NowADS().ToShortDateString Dim Clsconta As New ClsContabilidad DdlSubproyecto.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, -1) @@ -140,7 +140,7 @@ Partial Class AC2_RepCambiosSituacionFinanciera Clsconta.Dispose() DdlEjercicio.DataBind() - DdlEjercicio.SelectedValue = Now.Year.ToString + DdlEjercicio.SelectedValue = NowADS().Year.ToString CargaDatos() diff --git a/Contabilidad2/RepEstadoActividades.aspx.vb b/Contabilidad2/RepEstadoActividades.aspx.vb index 9aab64b5f..4a318ffb0 100644 --- a/Contabilidad2/RepEstadoActividades.aspx.vb +++ b/Contabilidad2/RepEstadoActividades.aspx.vb @@ -93,8 +93,8 @@ Partial Class AC_RepEstadoActividades TotalActual = 0 TotalAnterior = 0 - 'TxtFechaInicio.Text = DateSerial(Year(Date.Now), 1, 1).ToShortDateString - 'TxtFechaFin.Text = Date.Now.ToShortDateString + 'TxtFechaInicio.Text = DateSerial(Year(NowADS()), 1, 1).ToShortDateString + 'TxtFechaFin.Text = NowADS().ToShortDateString CargaEjercicios() CargaDatos() @@ -127,9 +127,9 @@ Partial Class AC_RepEstadoActividades DdlEjercicio.SelectedValueExist(UsuarioActual.Empresa.EjercicioActual.ToString) If DdlEjercicio.Items.Count = 0 Then - DdlEjercicio.Items.Add(New ListItem(Now.Year.ToString, Now.Year.ToString)) + DdlEjercicio.Items.Add(New ListItem(NowADS().Year.ToString, NowADS().Year.ToString)) End If - DdlPeriodo.SelectedValue = Now.Month.ToString + DdlPeriodo.SelectedValue = NowADS().Month.ToString CargarCentrosDeCosto(DdlProyecto, DdlSubproyecto, LblProyecto, LblSubProyecto, divProyecto:=DivProyecto) diff --git a/Contabilidad2/RepEstadoActividadesSAT.aspx.vb.exclude b/Contabilidad2/RepEstadoActividadesSAT.aspx.vb.exclude index 3300292c2..801a9890c 100644 --- a/Contabilidad2/RepEstadoActividadesSAT.aspx.vb.exclude +++ b/Contabilidad2/RepEstadoActividadesSAT.aspx.vb.exclude @@ -92,8 +92,8 @@ Partial Class AC_RepEstadoActividades TotalActual = 0 TotalAnterior = 0 - 'TxtFechaInicio.Text = DateSerial(Year(Date.Now), 1, 1).ToShortDateString - 'TxtFechaFin.Text = Date.Now.ToShortDateString + 'TxtFechaInicio.Text = DateSerial(Year(NowADS()), 1, 1).ToShortDateString + 'TxtFechaFin.Text = NowADS().ToShortDateString CargaEjercicios() CargaDatos() @@ -112,7 +112,7 @@ Partial Class AC_RepEstadoActividades DdlEjercicio.DataBind() DdlEjercicio.SelectedValueExist(UsuarioActual.Empresa.EjercicioActual.ToString) - DdlPeriodo.SelectedValue = Now.Month.ToString + DdlPeriodo.SelectedValue = NowADS().Month.ToString End Sub Private Sub CargaDatos() diff --git a/Contabilidad2/RepEstadoResultados.aspx.vb b/Contabilidad2/RepEstadoResultados.aspx.vb index 03ad46471..8f64e7627 100644 --- a/Contabilidad2/RepEstadoResultados.aspx.vb +++ b/Contabilidad2/RepEstadoResultados.aspx.vb @@ -137,14 +137,14 @@ Partial Class Contabilidad2_RepEstadoResultados CargaDatosGenerales() - DdlEjercicio.SelectedValue = Now.Year.ToString + DdlEjercicio.SelectedValue = NowADS().Year.ToString Anos = 0 'Normal TotalActual = 0 TotalAnterior = 0 - DdlPeriodo.SelectedValue = Now.Month.ToString + DdlPeriodo.SelectedValue = NowADS().Month.ToString TabContainer_ActiveTabChanged(TabContainer, EventArgs.Empty) End If @@ -535,7 +535,7 @@ Partial Class Contabilidad2_RepEstadoResultados End If ObjConta.Dispose() - Anos = (Year(Date.Now) - DdlEjercicio.SelectedValue.ToEntero) + 1 + Anos = (Year(NowADS()) - DdlEjercicio.SelectedValue.ToEntero) + 1 'Esconde todo For index = 1 To 40 Step 2 diff --git a/Contabilidad2/RepEstadoResultadosHorizontal.aspx b/Contabilidad2/RepEstadoResultadosHorizontal.aspx index 5f9404414..2182ca3a2 100644 --- a/Contabilidad2/RepEstadoResultadosHorizontal.aspx +++ b/Contabilidad2/RepEstadoResultadosHorizontal.aspx @@ -7,12 +7,12 @@ - - - - - - Textbox9 - - - - Black - - 1pt - - - Black - - 1pt - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - @@ -506,7 +449,7 @@ =Fields!PS.Value @@ -530,14 +473,14 @@ - + true true - =Fields!Lote.Value + =Fields!Serie.Value @@ -548,41 +491,7 @@ - Lote - - - Bottom - 2pt - 2pt - =IIf(rownumber(nothing) = 1, "2pt", "0pt") - - - - - - - - true - true - - - - - =Fields!FechaCaducidad.Value - - - - - - - FechaCaducidad + Serie @@ -606,7 +515,6 @@ - @@ -1682,8 +1590,13 @@ Hermosillo, Sonora, Mexico true ReportParameter1 + + String + true + true + ReportParameter1 + - image/jpeg diff --git a/Empresas/119/Formatos/Factura.rdlc b/Empresas/119/Formatos/Factura.rdlc index 622e8b810..c1bcbec28 100644 --- a/Empresas/119/Formatos/Factura.rdlc +++ b/Empresas/119/Formatos/Factura.rdlc @@ -156,10 +156,10 @@ CodigoObjetoImpuesto System.String - - NumeroPedimento - System.String - + + NumeroPedimento + System.String + DsOC @@ -4844,6 +4844,42 @@ true ReportParameter1 + + String + true + true + ReportParameter1 + + + String + true + true + ReportParameter1 + + + String + true + true + ReportParameter1 + + + String + true + true + ReportParameter1 + + + String + true + true + ReportParameter1 + + + String + true + true + ReportParameter1 + diff --git a/Empresas/119/Formatos/NotaDevolucion.rdlc b/Empresas/119/Formatos/NotaDevolucion.rdlc index b970f1584..72d10e370 100644 --- a/Empresas/119/Formatos/NotaDevolucion.rdlc +++ b/Empresas/119/Formatos/NotaDevolucion.rdlc @@ -1,2635 +1,5 @@ - - - - - true - 5.67653in - 0.06096in - 1.11356in - 8.15264in - - - - - - - - true - true - - - - - "Este documento es una representación impresa de un CFDI" - - - - - - - - - Folio fiscal: - - - - =Parameters!FolioFiscal.Value - - - - - - - =Parameters!FechaCertificacion.Value - - - - Número de serie del Certificado de Sello Digital: - - - - =Parameters!CertificadoContribuyente.Value - - - - - - - =Parameters!SerieCertificadoSAT.Value - - - - - - - - - - - - - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - External - =Parameters!QR.Value - FitProportional - 0.02916in - 6.58817in - 1.2939in - 1.53682in - 1 - - - - - - true - 3.99463in - 0.16719in - 1.4758in - 8.12499in - 1 - - - - - - - - - 0.74171in - - - 0.56728in - - - 0.7806in - - - 3.75819in - - - 0.61647in - - - 0.66705in - - - 1.10597in - - - - - 0.19645in - - - - - true - true - - - - - CANT - - - - - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - UNIDAD - - - - - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - CODIGO - - - - - - - Textbox29 - - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - DESCRIPCIÓN - - - - - - - Textbox17 - - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - %DESC - - - - - - - Textbox21 - - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - PU - - - - - - - Textbox23 - - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - TOTAL - - - - - - - Textbox1 - - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.14436in - - - - - true - true - - - - - =Fields!Cantidad.Value - - - - - - - Cantidad1 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!UM.Value - - - - - - - UM - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Codigo.Value - - - - - - - Codigo - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!PS.Value & " " & Fields!Obs.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Descuento.Value - - - - - - - Descuento - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!PU.Value - - - - - - - PU - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Cantidad.Value * Fields!PU.Value - - - - - - - TiempoEntrega - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - - - - - After - - - - - - - DsOC - 7.33778cm - 0.04219in - 0.34081in - 8.23727in - 2 - - - - - - true - true - - - - - =UCase(Parameters!ImporteLetra.Value) - - - - - - - ImporteLetra - 3.63142in - 0.77448in - 0.18861in - 7.22552in - 3 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - - - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - - - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - - - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Observaciones.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - 3.67012cm - - - - - 0.48004cm - - - - - true - true - - - - - =Fields!Importe.Value - - - - - - - Importe - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - =Fields!ImpuestoLocal.Value - - - - 3.61046cm - - - true - true - - - - - =IIF(Fields!ImpuestoLocal.Value = "Total",UCase(Fields!ImpuestoLocal.Value),Fields!ImpuestoLocal.Value) - - - - - - White - 2pt - 2pt - 2pt - 2pt - - - - - - - - DataSet1 - 8.53005cm - 12.94818cm - 0.48004cm - 7.28058cm - 8 - - - - - - true - true - - - - - - - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Devolución: - - - - - - - - - Cliente: - - - - =Parameters!ClienteNombre.Value - - - - - - - - - RFC: - - - - =Parameters!ClienteRFC.Value - - - - - - - - - Calle: - - - - - - - - =Parameters!ClienteCalle.Value & IIF(Parameters!ClienteNoExt.Value <> "", " No.Ext: " & Parameters!ClienteNoExt.Value & iif(Parameters!ClienteNoInt.Value <> ""," No.Int: " & Parameters!ClienteNoInt.Value,""),iif(Parameters!ClienteNoInt.Value <> ""," No.Int: " & Parameters!ClienteNoInt.Value,"")) - - - - - - - - - Colonia: - - - - - - - - =Parameters!ClienteColonia.Value - - - - - - - - - Ciudad: - - - - =Parameters!ClienteCiudad.Value - - - - - - - - Estado: - - - - - - - - =Parameters!ClienteEstado.Value - - - - - - - - - Municipio y/o Delegación: - - - - =Parameters!ClienteMunicipio.Value - - - - - - - - - - - - - Pais: - - - - =Parameters!ClientePais.Value - - - - - - - - CP: - - - - - - - - =Parameters!ClienteCP.Value - - - - - - - - - Pedido/Contrato: - - - - =Parameters!PedidoContrato.Value - - - - - - - - - Orden Compra: - - - - =Parameters!OrdenCompra.Value - - - - - - - - - Reg.fiscal: - - - - - - - - =Parameters!RegimenFiscalCodigo.Value - - - - - - - Textbox2 - 0.00137in - 4.38498cm - 1.80958in - 3.6362in - 10 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Domicilio fiscal: - - - - - - - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - - - - - NOTA DEVOLUCIÓN - - - - - - - - - - - - - Serie: - - - - =Parameters!Serie.Value - - - - Folio: - - - - =Parameters!Folio.Value - - - - - - - - - Fecha: - - - - - - - - = Parameters!Fecha.Value - - - - - - - - - Moneda: - - - - - - - - =Parameters!MonedaAbreviatura.Value - - - - - - - - - Forma de pago: - - - - =Parameters!FormaPago.Value - - - - - - - - - Método de pago: - - - - =Parameters!MetodoPago.Value - - - - - - - - - Uso CFDI: - - - - =Parameters!UsoCFDI.Value - - - - - - - - - Régimen fiscal: - - - - - - - - - - - - - Regimen General de Ley Personas Morales - - - - - - - - - - - Textbox4 - 5.59571in - 1.62345in - 2.64893in - 12 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Expedido en - - - - : - - - - - - - - - =Parameters!DomicilioSucursal.Value - - - - - - - - - AJA850608L7A - - - - - - - - - - - - - - - - - - Vendedor: - - - - - - - - - - - - - =Parameters!VendedorNombre.Value - - - - - - - Textbox40 - 4.29995cm - 15.01302cm - 2.63207cm - 5.92837cm - 13 - - - 2pt - 2pt - 2pt - 2pt - - - - Embedded - Logo119 - Fit - 0.00348cm - 0.04219in - 0.99993in - 1.62599in - 14 - - - - - - - - - 2.42456cm - - - 2.05585cm - - - 3.03631cm - - - 7.7847cm - - - - - 0.44125cm - - - - - true - true - - - - - Folio - - - - - - - Textbox10 - - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Fecha - - - - - - - Textbox12 - - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Importe - - - - - - - Textbox2222 - - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Folio Fiscal - - - - - - - Textbox11 - - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.41479cm - - - - - true - true - - - - - =Fields!SerieFolio.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Fecha.Value - - - - - - - Fecha - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Importe.Value - - - - - - - Importe1 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!FolioFiscal.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - - After - - - - - - - DataSet4 - 15.68638cm - 3.50335cm - 0.85604cm - 15.30142cm - 15 - - - - - - true - true - - - - - Tipo Relación: - - - - - - - Textbox29 - 15.12759cm - 4.93316cm - 0.41981cm - 5.31841cm - 16 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!TipoRelacionTexto.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - CFDI Relacionados - - - - - - - Textbox5 - 14.4466cm - 0.21692cm - 0.54004cm - 20.7077cm - 18 - - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - VERSION - - - - =Parameters!CFDIVersion.Value - - - - - - - Textbox5 - 16.55158cm - 17.56899cm - 0.6cm - 3.32021cm - 19 - - - 2pt - 2pt - 2pt - 2pt - - - - 6.91125in - - - - =Parameters!UsuarioImprimio.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha Impresión: - - - - =Parameters!FechaImpresion.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - ="Página " & Globals.PageNumber & " de " & Globals.TotalPages - - - - - - - Textbox35 - 0.17639cm - 18.21638cm - 0.41981cm - 2.5cm - 2 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 27.94cm - 21.59cm - 0cm - 0cm - 0.5cm - 0.5cm - 1.27cm - + + + + + + + true + true + + + + + "Este documento es una representación impresa de un CFDI" + + + + + + + + + Folio fiscal: + + + + =Parameters!FolioFiscal.Value + + + + + + + =Parameters!FechaCertificacion.Value + + + + Número de serie del Certificado de Sello Digital: + + + + =Parameters!CertificadoContribuyente.Value + + + + + + + =Parameters!SerieCertificadoSAT.Value + + + + + + + + + + + + + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + External + =Parameters!QR.Value + FitProportional + 0.02916in + 6.58817in + 1.2939in + 1.53682in + 1 + + + + + + true + 3.99463in + 0.16719in + 1.4758in + 8.12499in + 1 + + + + + + + + + 0.74171in + + + 0.56728in + + + 0.7806in + + + 3.75819in + + + 0.61647in + + + 0.66705in + + + 1.10597in + + + + + 0.19645in + + + + + true + true + + + + + CANT + + + + + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + UNIDAD + + + + + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + CODIGO + + + + + + + Textbox29 + + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + DESCRIPCIÓN + + + + + + + Textbox17 + + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + %DESC + + + + + + + Textbox21 + + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + PU + + + + + + + Textbox23 + + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + TOTAL + + + + + + + Textbox1 + + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.14436in + + + + + true + true + + + + + =Fields!Cantidad.Value + + + + + + + Cantidad1 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!UM.Value + + + + + + + UM + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Codigo.Value + + + + + + + Codigo + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!PS.Value & " " & Fields!Obs.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Descuento.Value + + + + + + + Descuento + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!PU.Value + + + + + + + PU + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Cantidad.Value * Fields!PU.Value + + + + + + + TiempoEntrega + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + + + After + + + + + + + DsOC + 7.33778cm + 0.04219in + 0.34081in + 8.23727in + 2 + + + + + + true + true + + + + + =UCase(Parameters!ImporteLetra.Value) + + + + + + + ImporteLetra + 3.63142in + 0.77448in + 0.18861in + 7.22552in + 3 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Observaciones.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + 3.67012cm + + + + + 0.48004cm + + + + + true + true + + + + + =Fields!Importe.Value + + + + + + + Importe + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + =Fields!ImpuestoLocal.Value + + + + 3.61046cm + + + true + true + + + + + =IIF(Fields!ImpuestoLocal.Value = "Total",UCase(Fields!ImpuestoLocal.Value),Fields!ImpuestoLocal.Value) + + + + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + DataSet1 + 8.53005cm + 12.94818cm + 0.48004cm + 7.28058cm + 8 + + + + + + true + true + + + + + + + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Devolución: + + + + + + + + + Cliente: + + + + =Parameters!ClienteNombre.Value + + + + + + + + + RFC: + + + + =Parameters!ClienteRFC.Value + + + + + + + + + Calle: + + + + + + + + =Parameters!ClienteCalle.Value & IIF(Parameters!ClienteNoExt.Value <> "", " No.Ext: " & Parameters!ClienteNoExt.Value & iif(Parameters!ClienteNoInt.Value <> ""," No.Int: " & Parameters!ClienteNoInt.Value,""),iif(Parameters!ClienteNoInt.Value <> ""," No.Int: " & Parameters!ClienteNoInt.Value,"")) + + + + + + + + + Colonia: + + + + + + + + =Parameters!ClienteColonia.Value + + + + + + + + + Ciudad: + + + + =Parameters!ClienteCiudad.Value + + + + + + + + Estado: + + + + + + + + =Parameters!ClienteEstado.Value + + + + + + + + + Municipio y/o Delegación: + + + + =Parameters!ClienteMunicipio.Value + + + + + + + + + + + + + Pais: + + + + =Parameters!ClientePais.Value + + + + + + + + CP: + + + + + + + + =Parameters!ClienteCP.Value + + + + + + + + + Pedido/Contrato: + + + + =Parameters!PedidoContrato.Value + + + + + + + + + Orden Compra: + + + + =Parameters!OrdenCompra.Value + + + + + + + + + Reg.fiscal: + + + + + + + + =Parameters!RegimenFiscalCodigo.Value + + + + + + + Textbox2 + 0.00137in + 4.38498cm + 1.80958in + 3.6362in + 10 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Domicilio fiscal: + + + + + + + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + + NOTA DEVOLUCIÓN + + + + + + + + + + + + + Serie: + + + + =Parameters!Serie.Value + + + + Folio: + + + + =Parameters!Folio.Value + + + + + + + + + Fecha: + + + + + + + + = Parameters!Fecha.Value + + + + + + + + + Moneda: + + + + + + + + =Parameters!MonedaAbreviatura.Value + + + + + + + + + Forma de pago: + + + + =Parameters!FormaPago.Value + + + + + + + + + Método de pago: + + + + =Parameters!MetodoPago.Value + + + + + + + + + Uso CFDI: + + + + =Parameters!UsoCFDI.Value + + + + + + + + + Régimen fiscal: + + + + + + + + + + + + + Regimen General de Ley Personas Morales + + + + + + + + + + + Textbox4 + 5.59571in + 1.62345in + 2.64893in + 12 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Expedido en + + + + : + + + + + + + + + =Parameters!DomicilioSucursal.Value + + + + + + + + + AJA850608L7A + + + + + + + + + + + + + + + + + + Vendedor: + + + + + + + + + + + + + =Parameters!VendedorNombre.Value + + + + + + + Textbox40 + 4.29995cm + 15.01302cm + 2.63207cm + 5.92837cm + 13 + + + 2pt + 2pt + 2pt + 2pt + + + + Embedded + Logo119 + Fit + 0.00348cm + 0.04219in + 0.99993in + 1.62599in + 14 + + + + + + + + + 2.42456cm + + + 2.05585cm + + + 3.03631cm + + + 7.7847cm + + + + + 0.44125cm + + + + + true + true + + + + + Folio + + + + + + + Textbox10 + + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Fecha + + + + + + + Textbox12 + + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Importe + + + + + + + Textbox2222 + + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Folio Fiscal + + + + + + + Textbox11 + + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.41479cm + + + + + true + true + + + + + =Fields!SerieFolio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Fecha.Value + + + + + + + Fecha + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Importe.Value + + + + + + + Importe1 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!FolioFiscal.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + After + + + + + + + DataSet4 + 15.68638cm + 3.50335cm + 0.85604cm + 15.30142cm + 15 + + + + + + true + true + + + + + Tipo Relación: + + + + + + + Textbox29 + 15.12759cm + 4.93316cm + 0.41981cm + 5.31841cm + 16 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!TipoRelacionTexto.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + CFDI Relacionados + + + + + + + Textbox5 + 14.4466cm + 0.21692cm + 0.54004cm + 20.7077cm + 18 + + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + VERSION + + + + =Parameters!CFDIVersion.Value + + + + + + + Textbox5 + 16.55158cm + 17.56899cm + 0.6cm + 3.32021cm + 19 + + + 2pt + 2pt + 2pt + 2pt + + + + 6.91125in + + + + =Parameters!UsuarioImprimio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Impresión: + + + + =Parameters!FechaImpresion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + ="Página " & Globals.PageNumber & " de " & Globals.TotalPages + + + + + + + Textbox35 + 0.17639cm + 18.21638cm + 0.41981cm + 2.5cm + 2 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 27.94cm + 21.59cm + 0cm + 0cm + 0.5cm + 0.5cm + 1.27cm + - - Embedded - Logo - Fit - 0.05159in - 0.0375in - 0.99993in - 1.60289in - 1 - - - - true true @@ -438,7 +423,7 @@ 0.08425cm 3.13993cm 7.68184cm - 2 + 1 @@ -646,7 +631,7 @@ 5.39311in 1.27833in 2.8593in - 3 + 2 @@ -758,7 +743,7 @@ 13.72673cm 2.47332cm 7.26261cm - 4 + 3 @@ -1493,7 +1478,7 @@ 0.04048in 0.34081in 8.22304in - 5 + 4 @@ -1519,7 +1504,7 @@ 0.10282cm 0.14316cm 20.88652cm - 6 + 5 @@ -1550,7 +1535,7 @@ 15.05252cm 0.14316cm 5.93682cm - 7 + 6 @@ -1587,7 +1572,7 @@ 1.038in 0.18861in 7.22552in - 8 + 7 @@ -1705,7 +1690,7 @@ 15.05252cm 0.48004cm 5.93682cm - 9 + 8 @@ -1733,7 +1718,7 @@ 3.49882cm 0.57354cm 12.91587cm - 10 + 9 @@ -1749,7 +1734,7 @@ 7.56391cm 0cm 5.675cm - 11 + 10 @@ -1777,7 +1762,7 @@ 7.56391cm 0.6cm 5.675cm - 12 + 11 @@ -1840,7 +1825,7 @@ 0.10282cm 0.99688cm 8.10248cm - 13 + 12 @@ -1851,6 +1836,21 @@ 2pt + + Embedded + Logo1 + FitProportional + 0.13104cm + 0.00316cm + 2.00271cm + 4.28301cm + 13 + + + + 14.80346cm - true @@ -2099,7 +2098,7 @@ DsOC 2.25503in - 0.05854in + 0.0698in 0.36345in 8.21571in 5 @@ -2125,7 +2124,7 @@ Textbox5 6.77831cm - 0.14868cm + 0.17727cm 0.14316cm 20.88652cm 6 @@ -2156,7 +2155,7 @@ Textbox5 7.54968cm - 15.09838cm + 15.12697cm 0.14316cm 5.93682cm 7 @@ -2193,7 +2192,7 @@ ImporteLetra 3.05676in - 2.30237in + 2.31363in 0.18861in 5.97921in 8 @@ -2223,7 +2222,7 @@ Textbox5 9.51148cm - 0.13011cm + 0.1587cm 0.1cm 20.88652cm 9 @@ -2254,7 +2253,7 @@ Textbox5 12.974cm - 0.18043cm + 0.20902cm 0.14316cm 20.85477cm 10 @@ -2288,7 +2287,7 @@ Textbox1 7.0273cm - 5.62203cm + 5.65062cm 0.44477cm 9.30316cm 11 @@ -2406,7 +2405,7 @@ DataSet1 6.99203cm - 15.09838cm + 15.12697cm 0.48004cm 5.93682cm 12 @@ -2904,7 +2903,7 @@ true 14.89676cm - 0.13702cm + 0.16561cm 2.97096cm 20.89818cm 13 @@ -3179,7 +3178,7 @@ DataSet3 2.75704in - 0.05854in + 0.0698in 0.34081in 2.08542in 14 @@ -3226,6 +3225,7 @@ Textbox1 8.39473cm + 0.02859cm 1.07794cm 20.85477cm 15 @@ -3239,21 +3239,6 @@ 2pt - - Embedded - Logo - FitProportional - 0.12756cm - 0.15969cm - 2.38455cm - 3.48217cm - 16 - - - - true true @@ -3333,10 +3318,10 @@ Textbox4 3.9157cm - 4.38884cm + 4.41743cm 1.63569cm 8.12128cm - 17 + 16 @@ -3349,10 +3334,10 @@ 14.16139cm - 14.38124cm + 14.40983cm 0cm 6.65396cm - 18 + 17 @@ -3380,10 +3365,10 @@ Textbox39 14.33778cm - 14.38124cm + 14.40983cm 0.47784cm 6.65396cm - 19 + 18 @@ -3419,10 +3404,10 @@ Textbox38 13.25486cm - 14.38124cm + 14.40983cm 0.4148cm 6.65396cm - 20 + 19 @@ -3468,10 +3453,10 @@ Textbox16 2.16641cm - 0.13011cm + 0.1587cm 1.21002cm 4.23014cm - 21 + 20 @@ -4091,15 +4076,30 @@ true 18.18344cm + 0.02859cm 6.3095cm 21.01663cm - 22 + 21 + + Embedded + Logo1 + FitProportional + 0.13104cm + 2.00271cm + 4.28301cm + 22 + + + + 24.49294cm - 21.03521cm + 21.0638cm 0.5327cm @@ -4141,7 +4141,7 @@ Textbox31 0.11289cm - 8.90321cm + 8.9318cm 0.41981cm 6.02198cm - + Embedded - Logo + Logo1 FitProportional - 0.13104cm + 0.19454cm 0.08425cm - 2.5433cm - 4.13cm + 2.00271cm + 4.28301cm 17 @@ -1543,21 +1543,6 @@ 2pt - - Embedded - Logo - FitProportional - 0.17584cm - 0.08599cm - 2.24083cm - 4.1049cm - 6 - - - - true true @@ -1633,7 +1618,7 @@ 9.93011cm 0.98905in 3.84786in - 7 + 6 @@ -1644,6 +1629,20 @@ 2pt + + Embedded + Logo1 + FitProportional + 0.19657cm + 2.00271cm + 4.28301cm + 7 + + + + - - - =Parameters!ClienteNombre.Value - - - - - - - - - RFC: - - - - =Parameters!ClienteRFC.Value - - - - - - - - - Calle: - - - - - - - - =Parameters!ClienteCalle.Value & IIF(Parameters!ClienteNoExt.Value <> "", " No.Ext: " & Parameters!ClienteNoExt.Value & iif(Parameters!ClienteNoInt.Value <> ""," No.Int: " & Parameters!ClienteNoInt.Value,""),iif(Parameters!ClienteNoInt.Value <> ""," No.Int: " & Parameters!ClienteNoInt.Value,"")) - - - - - - - - - Colonia: - - - - - - - - =Parameters!ClienteColonia.Value - - - - - - - - - Ciudad: - - - - =Parameters!ClienteCiudad.Value - - - - - - - - Estado: - - - - - - - - =Parameters!ClienteEstado.Value - - - - - - - - - Municipio y/o Delegación: - - - - =Parameters!ClienteMunicipio.Value - - - - - - - - - - - - - Pais: - - - - =Parameters!ClientePais.Value - - - - - - - - CP: - - - - - - - - =Parameters!ClienteCP.Value - - - - - - - - - Pedido/Contrato: - - - - =Parameters!PedidoContrato.Value - - - - - - - - - Orden Compra: - - - - =Parameters!OrdenCompra.Value - - - - - - - Textbox2 - 1.08277in - 0.15466cm - 1.48139in - 4.29918in - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Domicilio fiscal: - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - - - - - - - - - Remisión - - - - - - - - - - - - - Serie: - - - - =Parameters!Serie.Value - - - - Folio: - - - - =Parameters!Folio.Value - - - - - - - - - Fecha: - - - - - - - - =cdate(Parameters!Fecha.Value) - - - - - - - - - Vendedor: - - - - =Parameters!VendedorNombre.Value - - - - - - - Textbox4 - 0.04117in - 5.62784in - 0.99993in - 2.66068in - 2 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - 0.84089in - - - 0.75902in - - - 1.18379in - - - 0.94204in - - - 4.47563in - - - - - 0.19645in - - - - - true - true - - - - - CANT - - - - - - - Textbox22 - - - #3a4173 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - UNIDAD - - - - - - - Textbox15 - - - #3a4173 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - CODIGO - - - - - - - Textbox29 - - - #3a4173 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - CLAVE SAT - - - - - - - Textbox5 - - - #3a4173 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - DESCRIPCIÓN - - - - - - - Textbox17 - - - #3a4173 - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.17561in - - - - - true - true - - - - - =Fields!Cantidad.Value - - - - - - - Cantidad1 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!UM.Value - - - - - - - UM - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Codigo.Value - - - - - - - Codigo - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!SATClaveProdServ.Value - - - - - - - Textbox6 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!PS.Value & " " & Fields!Obs.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - - - After - - - - - - - DsOC - 2.74327in - 0.06548in - 0.37206in - 8.20137in - 3 - - - - - - true - true - - - - - - - - #3a4173 - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - - - - #3a4173 - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Observaciones.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - Embedded - Logo - Fit - 0.04117in - 0.06089in - 0.99993in - 1.6045in - 7 - - - - - - true - true - - - - - Expedido en - - - - : - - - - - - - - - =Parameters!DomicilioSucursal.Value - - - - - - - - - BBD021220APA - - - - - - - Textbox4 - 0.10457cm - 9.52183cm - 1.40387cm - 4.08234cm - 8 - - - 2pt - 2pt - 2pt - 2pt - - - - - - 2.51986cm - 1.75262cm - 0cm - 4.9765cm - - - - - - true - true - - - - - Nombre y Firma - - - - Textbox31 - 2.69625cm - 1.33778cm - 0.6cm - 5.7988cm - 1 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Elaborado por: - - - - Textbox31 - 0.68161cm - 1.31521cm - 0.6cm - 5.7988cm - 2 - - - 2pt - 2pt - 2pt - 2pt - - - - 2.51986cm - 13.20338cm - 0cm - 4.9765cm - 3 - - - - - - true - true - - - - - Nombre y Firma - - - - Textbox31 - 2.69625cm - 12.78854cm - 0.6cm - 5.7988cm - 4 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Almacén: - - - - Textbox31 - 0.68161cm - 12.76597cm - 0.6cm - 5.7988cm - 5 - - - 2pt - 2pt - 2pt - 2pt - - - - 6.94912cm - 1.90541cm - 0cm - 4.9765cm - 6 - - - - - - true - true - - - - - Nombre y Firma - - - - Textbox31 - 7.12551cm - 1.49057cm - 0.6cm - 5.7988cm - 7 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Recibió (Chofer): - - - - Textbox31 - 5.11087cm - 1.468cm - 0.6cm - 5.7988cm - 8 - - - 2pt - 2pt - 2pt - 2pt - - - - 6.94912cm - 13.35617cm - 0cm - 4.9765cm - 9 - - - - - - true - true - - - - - Nombre y Firma - - - - Textbox31 - 7.12551cm - 12.94133cm - 0.6cm - 5.7988cm - 10 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Recibió (Cliente): - - - - Textbox31 - 5.11087cm - 12.91876cm - 0.6cm - 5.7988cm - 11 - - - 2pt - 2pt - 2pt - 2pt - - - - true - 9.2202cm - 0.15466cm - 8.67801cm - 20.84313cm - 9 - - - - - - - - - 2.99824cm - - - - - 0.48004cm - - - - - true - true - - - - - =Fields!Importe.Value - - - - - - - Importe - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - =Fields!ImpuestoLocal.Value - - - - 2.93858cm - - - true - true - - - - - =IIF(Fields!ImpuestoLocal.Value = "Total",UCase(Fields!ImpuestoLocal.Value),Fields!ImpuestoLocal.Value) - - - - - - White - 2pt - 2pt - 2pt - 2pt - - - - - - - - DataSet1 - 8.14637cm - 15.11602cm - 0.48004cm - 5.93682cm - 10 - - - - - - 18.12046cm - - - - =Parameters!FechaImpresion.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - ="Página " & Globals.PageNumber & " de " & Globals.TotalPages - - - - - - - Textbox35 - 0.17639cm - 18.49779cm - 0.41981cm - 2.5cm - 1 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 27.94cm - 21.59cm - 0cm - 0cm - 0.5cm - 0.5cm - 1.27cm - + + + =Parameters!ClienteNombre.Value + + + + + + + + + RFC: + + + + =Parameters!ClienteRFC.Value + + + + + + + + + Calle: + + + + + + + + =Parameters!ClienteCalle.Value & IIF(Parameters!ClienteNoExt.Value <> "", " No.Ext: " & Parameters!ClienteNoExt.Value & iif(Parameters!ClienteNoInt.Value <> ""," No.Int: " & Parameters!ClienteNoInt.Value,""),iif(Parameters!ClienteNoInt.Value <> ""," No.Int: " & Parameters!ClienteNoInt.Value,"")) + + + + + + + + + Colonia: + + + + + + + + =Parameters!ClienteColonia.Value + + + + + + + + + Ciudad: + + + + =Parameters!ClienteCiudad.Value + + + + + + + + Estado: + + + + + + + + =Parameters!ClienteEstado.Value + + + + + + + + + Municipio y/o Delegación: + + + + =Parameters!ClienteMunicipio.Value + + + + + + + + + + + + + Pais: + + + + =Parameters!ClientePais.Value + + + + + + + + CP: + + + + + + + + =Parameters!ClienteCP.Value + + + + + + + + + Pedido/Contrato: + + + + =Parameters!PedidoContrato.Value + + + + + + + + + Orden Compra: + + + + =Parameters!OrdenCompra.Value + + + + + + + Textbox2 + 1.08277in + 0.15466cm + 1.48139in + 4.29918in + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Domicilio fiscal: + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + + + + + + Remisión + + + + + + + + + + + + + Serie: + + + + =Parameters!Serie.Value + + + + Folio: + + + + =Parameters!Folio.Value + + + + + + + + + Fecha: + + + + + + + + =cdate(Parameters!Fecha.Value) + + + + + + + + + Vendedor: + + + + =Parameters!VendedorNombre.Value + + + + + + + Textbox4 + 0.04117in + 5.62784in + 0.99993in + 2.66068in + 2 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + 0.84089in + + + 0.75902in + + + 1.18379in + + + 0.94204in + + + 4.47563in + + + + + 0.19645in + + + + + true + true + + + + + CANT + + + + + + + Textbox22 + + + #3a4173 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + UNIDAD + + + + + + + Textbox15 + + + #3a4173 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + CODIGO + + + + + + + Textbox29 + + + #3a4173 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + CLAVE SAT + + + + + + + Textbox5 + + + #3a4173 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + DESCRIPCIÓN + + + + + + + Textbox17 + + + #3a4173 + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.17561in + + + + + true + true + + + + + =Fields!Cantidad.Value + + + + + + + Cantidad1 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!UM.Value + + + + + + + UM + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Codigo.Value + + + + + + + Codigo + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!SATClaveProdServ.Value + + + + + + + Textbox6 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!PS.Value & " " & Fields!Obs.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + After + + + + + + + DsOC + 2.74327in + 0.06548in + 0.37206in + 8.20137in + 3 + + + + + + true + true + + + + + + + + #3a4173 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + #3a4173 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Observaciones.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Expedido en + + + + : + + + + + + + + + =Parameters!DomicilioSucursal.Value + + + + + + + + + BBD021220APA + + + + + + + Textbox4 + 0.10457cm + 9.52183cm + 1.40387cm + 4.08234cm + 7 + + + 2pt + 2pt + 2pt + 2pt + + + + + + 2.51986cm + 1.75262cm + 0cm + 4.9765cm + + + + + + true + true + + + + + Nombre y Firma + + + + Textbox31 + 2.69625cm + 1.33778cm + 0.6cm + 5.7988cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Elaborado por: + + + + Textbox31 + 0.68161cm + 1.31521cm + 0.6cm + 5.7988cm + 2 + + + 2pt + 2pt + 2pt + 2pt + + + + 2.51986cm + 13.20338cm + 0cm + 4.9765cm + 3 + + + + + + true + true + + + + + Nombre y Firma + + + + Textbox31 + 2.69625cm + 12.78854cm + 0.6cm + 5.7988cm + 4 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Almacén: + + + + Textbox31 + 0.68161cm + 12.76597cm + 0.6cm + 5.7988cm + 5 + + + 2pt + 2pt + 2pt + 2pt + + + + 6.94912cm + 1.90541cm + 0cm + 4.9765cm + 6 + + + + + + true + true + + + + + Nombre y Firma + + + + Textbox31 + 7.12551cm + 1.49057cm + 0.6cm + 5.7988cm + 7 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Recibió (Chofer): + + + + Textbox31 + 5.11087cm + 1.468cm + 0.6cm + 5.7988cm + 8 + + + 2pt + 2pt + 2pt + 2pt + + + + 6.94912cm + 13.35617cm + 0cm + 4.9765cm + 9 + + + + + + true + true + + + + + Nombre y Firma + + + + Textbox31 + 7.12551cm + 12.94133cm + 0.6cm + 5.7988cm + 10 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Recibió (Cliente): + + + + Textbox31 + 5.11087cm + 12.91876cm + 0.6cm + 5.7988cm + 11 + + + 2pt + 2pt + 2pt + 2pt + + + + true + 9.2202cm + 0.15466cm + 8.67801cm + 20.84313cm + 8 + + + + + + + + + 2.99824cm + + + + + 0.48004cm + + + + + true + true + + + + + =Fields!Importe.Value + + + + + + + Importe + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + =Fields!ImpuestoLocal.Value + + + + 2.93858cm + + + true + true + + + + + =IIF(Fields!ImpuestoLocal.Value = "Total",UCase(Fields!ImpuestoLocal.Value),Fields!ImpuestoLocal.Value) + + + + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + DataSet1 + 8.14637cm + 15.11602cm + 0.48004cm + 5.93682cm + 9 + + + + + + Embedded + Logo1 + FitProportional + 0.10457cm + 2.00271cm + 4.28301cm + 10 + + + + + + 18.12046cm + + + + =Parameters!FechaImpresion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + ="Página " & Globals.PageNumber & " de " & Globals.TotalPages + + + + + + + Textbox35 + 0.17639cm + 18.49779cm + 0.41981cm + 2.5cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 27.94cm + 21.59cm + 0cm + 0cm + 0.5cm + 0.5cm + 1.27cm + - - - true @@ -1018,7 +1004,6 @@ 4.45435cm 0.94396cm 6.51432cm - 1 @@ -1072,7 +1057,7 @@ 5.75736cm 0.6cm 10.1061cm - 2 + 1 @@ -1106,7 +1091,7 @@ 5.75736cm 0.6cm 10.1061cm - 3 + 2 @@ -1138,7 +1123,7 @@ 4.45435cm 0.54708cm 6.51432cm - 4 + 3 @@ -1149,6 +1134,21 @@ 2pt + + Embedded + Logo1 + FitProportional + 0.25214cm + 0.17134cm + 2.00271cm + 4.28301cm + 4 + + + + - - - true true @@ -464,7 +450,6 @@ 4.45435cm 1.92292cm 11.8589cm - 1 @@ -516,7 +501,7 @@ 6.20715cm 0.6cm 10.1061cm - 2 + 1 @@ -546,7 +531,7 @@ 16.48964cm 0.6cm 3.64648cm - 3 + 2 @@ -579,7 +564,7 @@ 3.27766cm 0.6cm 1.68911cm - 4 + 3 @@ -614,7 +599,7 @@ 1.68911cm 0.6cm 5.44232cm - 5 + 4 @@ -649,7 +634,7 @@ 17.13143cm 0.6cm 2.5cm - 6 + 5 @@ -684,7 +669,7 @@ 7.13143cm 0.6cm 2.5cm - 7 + 6 @@ -719,7 +704,7 @@ 9.63143cm 0.6cm 2.5cm - 8 + 7 @@ -754,7 +739,7 @@ 12.13143cm 0.6cm 2.5cm - 9 + 8 @@ -789,7 +774,7 @@ 14.63143cm 0.6cm 2.5cm - 10 + 9 @@ -801,6 +786,21 @@ 2pt + + Embedded + Logo1 + FitProportional + 0.28742cm + 0.13606cm + 2.00271cm + 4.28301cm + 10 + + + + - - - - - - Textbox7 - - - - Black - - 1pt - - - Black - - 1pt - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Código - - - - - - - Textbox9 - - - - Black - - 1pt - - - Black - - 1pt - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Descripción - - - - - - - Textbox11 - - - - Black - - 1pt - - - Black - - 1pt - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Serie Lote - - - - - - - Textbox6 - - - - Black - - 1pt - - - Black - - 1pt - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Lote - - - - - - - Textbox5 - - - - Black - - 1pt - - - Black - - 1pt - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Batch - - - - - - - Textbox12 - - - - Black - - 1pt - - - Black - - 1pt - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.69042cm - - - - - true - true - - - - - =Fields!Cantidad.Value - - - - - - - Cantidad - - - 2pt - 2pt - =IIf(RowNumber(Nothing)=1,"1pt","0pt") - - - - - - - - true - true - - - - - =Fields!Codigo.Value - - - - - - - Codigo - - - 2pt - 2pt - =IIf(RowNumber(Nothing)=1,"1pt","0pt") - - - - - - - - true - true - - - - - =Fields!PS.Value - - - - - - 2pt - 2pt - =IIf(RowNumber(Nothing)=1,"1pt","0pt") - - - - - - - - true - true - - - - - =Fields!SerieLote.Value - - - - - - 2pt - 2pt - =IIf(RowNumber(Nothing)=1,"1pt","0pt") - - - - - - - - true - true - - - - - =Fields!Lote.Value - - - - - - 2pt - 2pt - =IIf(RowNumber(Nothing)=1,"1pt","0pt") - - - - - - - - true - true - - - - - =Fields!Batch.Value - - - - - - 2pt - 2pt - =IIf(RowNumber(Nothing)=1,"1pt","0pt") - - - - - - - - - - - - - - - - - =IIF(String.IsNullOrEmpty(Fields!Lote.Value), True,False) - - - - - =IIF(String.IsNullOrEmpty(Fields!Batch.Value), True,False) - - - - - - - - After - - - - - - - DsInventarios - 1.05941cm - 0.2731cm - 1.11096cm - 19.86301cm - - - - - - true - true - - - - - Cliente: - - - - =Parameters!Cliente.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - 0.99032in - - - - - 8.2362in - - - 3.1764cm - true - true - - - Embedded - Logo - Fit - 0.09927in - 0.10752in - 0.99993in - 1.6045in - - - - - - true - true - - - - - BDH BATERÍAS DISTRIBUCIONES DE - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!FechaConFormato.Value - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Globals!PageNumber - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Entradas de Usados - - - - - - - Textbox37 - 2.19197cm - 4.52492cm - 0.6cm - 11.78833cm - 4 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - 0.85929cm - true - true - - - 0.127cm - 0.01325cm - 0cm - 20.90669cm - - - - - - true - true - - - - - Fecha Impresión: - - - - - - - - =Today - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 27.94cm - 21.59cm - 0.5cm - 0cm - 0.5cm - 1cm - 0.13cm - + + + + + + Textbox7 + + + + Black + + 1pt + + + Black + + 1pt + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Código + + + + + + + Textbox9 + + + + Black + + 1pt + + + Black + + 1pt + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Descripción + + + + + + + Textbox11 + + + + Black + + 1pt + + + Black + + 1pt + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Serie Lote + + + + + + + Textbox6 + + + + Black + + 1pt + + + Black + + 1pt + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Lote + + + + + + + Textbox5 + + + + Black + + 1pt + + + Black + + 1pt + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.69042cm + + + + + true + true + + + + + =Fields!Cantidad.Value + + + + + + + Cantidad + + + 2pt + 2pt + =IIf(RowNumber(Nothing)=1,"1pt","0pt") + + + + + + + + true + true + + + + + =Fields!Codigo.Value + + + + + + + Codigo + + + 2pt + 2pt + =IIf(RowNumber(Nothing)=1,"1pt","0pt") + + + + + + + + true + true + + + + + =Fields!PS.Value + + + + + + 2pt + 2pt + =IIf(RowNumber(Nothing)=1,"1pt","0pt") + + + + + + + + true + true + + + + + =Fields!SerieLote.Value + + + + + + 2pt + 2pt + =IIf(RowNumber(Nothing)=1,"1pt","0pt") + + + + + + + + true + true + + + + + =Fields!Lote.Value + + + + + + 2pt + 2pt + =IIf(RowNumber(Nothing)=1,"1pt","0pt") + + + + + + + + + + + + + + + + + =IIF(String.IsNullOrEmpty(Fields!Lote.Value), True,False) + + + + + + + + After + + + + + + + DsInventarios + 1.05941cm + 0.2731cm + 1.11096cm + 20.64684cm + + + + + + true + true + + + + + Cliente: + + + + =Parameters!Cliente.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + 0.99032in + + + + + 8.2362in + + + 3.1764cm + true + true + + + true + true + + + + + BDH BATERÍAS DISTRIBUCIONES DE + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!FechaConFormato.Value + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Globals!PageNumber + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Entradas de Usados + + + + + + + Textbox37 + 2.19197cm + 4.52492cm + 0.6cm + 11.78833cm + 3 + + + 2pt + 2pt + 2pt + 2pt + + + + Embedded + Logo1 + FitProportional + 0.28742cm + 0.1008cm + 2.00271cm + 4.28301cm + 4 + + + + + + + + + + + 0.85929cm + true + true + + + 0.127cm + 0.01325cm + 0cm + 20.90669cm + + + + + + true + true + + + + + Fecha Impresión: + + + + + + + + =Today + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 27.94cm + 21.59cm + 0.5cm + 0cm + 0.5cm + 1cm + 0.13cm + - - - - - - Textbox7 - - - - Black - - 1pt - - - Black - - 1pt - - White - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Código - - - - - - - Textbox9 - - - - Black - - 1pt - - - Black - - 1pt - - White - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Descripción - - - - - - - Textbox11 - - - - Black - - 1pt - - - Black - - 1pt - - White - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Serie - - - - - - - Textbox6 - - - - Black - - 1pt - - - Black - - 1pt - - White - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Lote - - - - - - - Textbox5 - - - - Black - - 1pt - - - Black - - 1pt - - White - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.47875cm - - - - - true - - - - - =Fields!Cantidad.Value - - - - - - - Cantidad - - - 2pt - 2pt - =IIf(RowNumber(Nothing)=1,"1pt","0pt") - - - - - - - - true - - - - - =Fields!Codigo.Value - - - - - - - Codigo - - - 2pt - 2pt - =IIf(RowNumber(Nothing)=1,"1pt","0pt") - - - - - - - - true - - - - - =Fields!PS.Value - - - - - - 2pt - 2pt - =IIf(RowNumber(Nothing)=1,"1pt","0pt") - - - - - - - - true - true - - - - - =Fields!SerieLote.Value - - - - - - 2pt - 2pt - =IIf(RowNumber(Nothing)=1,"1pt","0pt") - - - - - - - - true - - - - - =Fields!Lote.Value - - - - - - 2pt - 2pt - =IIf(RowNumber(Nothing)=1,"1pt","0pt") - - - - - - - - - - - - - - - - - =IIF(String.IsNullOrEmpty(Fields!Lote.Value), True,False) - - - - - - - - After - - - - - - - - - - DsInventarios - 0.17639cm - 0.22456cm - 0.89929cm - 20.39972cm - - - - - - true - true - - - - - Observaciones: - - - - =Parameters!Observaciones.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Total Productos : - - - - =Sum(iif(Not Fields!Clasificacion.Value = "USADOS",CInt(Fields!Cantidad.Value),0),"DsInventarios") - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Total Usados: - - - - =Sum(iif(Fields!Clasificacion.Value = "USADOS",CInt(Fields!Cantidad.Value),0),"DsInventarios") - - - - - - 2pt - 2pt - 2pt - 2pt - - - - 1.03125in - - - - - - - Textbox34 - 1.71608cm - 0.67239cm - 20.62428cm - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!FacturaProveedor.Value - - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - =Parameters!FacturadoA.Value - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Proveedor: - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Factura: - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Folio: - - - - - - - Textbox3 - 0.22328cm - 13.63291cm - 0.89103cm - 3.51794cm - 5 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Folio.Value - - - - - - - Textbox31 - 0.1905cm - 17.15085cm - 0.9263cm - 3.15064cm - 6 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha: - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - =Parameters!Almacen.Value - - - - Textbox6 - 2.70516cm - 2.13321cm - 0.54736cm - 6.43631cm - 8 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Fecha.Value - - - - - - - Textbox32 - 3.42537cm - 2.13321cm - 0.58913cm - 6.43631cm - 9 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Almacén: - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =IIF(Parameters!CveConceptoMovRelacionado.Value = 37,"Folio Virtual:","Folio Relacionado:") - - - - - - - Textbox3 - 1.20956cm - 13.63291cm - 0.47477cm - 4.09693cm - 11 - - =IIF(Parameters!FolioRelacionado.Value = "",true,false) - - - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - =Parameters!FolioRelacionado.Value - - - - - - - Textbox31 - 1.20956cm - 17.72984cm - 0.47477cm - 2.57165cm - 12 - - =IIF(Parameters!FolioRelacionado.Value = "",true,false) - - - - 2pt - 2pt - 2pt - 2pt - - - - Embedded - Logo2 - Fit - 0.1299in - 0.61281in - 1.32508in - 13 - - - - - - true - true - - - - - BDH BATERÍAS DISTRIBUCIONES DE HERMOSILLO S.A. DE C.V. - - - - - - - Textbox2 - 3.83674cm - 1.55733cm - 9.26108cm - 14 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - 2.22251cm - true - true - - - 0.28886cm - 2.22221cm - 0cm - 4.95004cm - - - - - - true - true - - - - - =Parameters!NombreRecibio.Value - - - - Textbox31 - 0.46525cm - 1.74387cm - 0.6cm - 5.95755cm - 1 - - - 2pt - 2pt - 2pt - 2pt - - - - 0.28886cm - 12.20081cm - 0cm - 4.95004cm - 2 - - - - - - true - true - - - - - =Parameters!Almacen.Value - - - - Textbox31 - 0.42997cm - 11.80394cm - 0.6cm - 5.95755cm - 3 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha Impresion: - - - - - - - Textbox5 - 1.49022cm - 11.96388cm - 0.6cm - 2.90426cm - 4 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!FechaImpresion.Value - - - - - - - Textbox33 - 1.49022cm - 14.86814cm - 0.6cm - 2.89335cm - 5 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Usuario Registró: - - - - - - - Textbox5 - 1.62251cm - 0.79137cm - 0.6cm - 2.90426cm - 6 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!UsuarioRegistro.Value - - - - - - - Textbox33 - 1.62251cm - 3.69563cm - 0.6cm - 5.93606cm - 7 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 29.7cm - 21cm - 0.5cm - 1.5cm - 2cm - 2cm - 0.13cm - + + + + + + Textbox7 + + + + Black + + 1pt + + + Black + + 1pt + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Código + + + + + + + Textbox9 + + + + Black + + 1pt + + + Black + + 1pt + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Descripción + + + + + + + Textbox11 + + + + Black + + 1pt + + + Black + + 1pt + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Serie + + + + + + + Textbox6 + + + + Black + + 1pt + + + Black + + 1pt + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Lote + + + + + + + Textbox5 + + + + Black + + 1pt + + + Black + + 1pt + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.47875cm + + + + + true + + + + + =Fields!Cantidad.Value + + + + + + + Cantidad + + + 2pt + 2pt + =IIf(RowNumber(Nothing)=1,"1pt","0pt") + + + + + + + + true + + + + + =Fields!Codigo.Value + + + + + + + Codigo + + + 2pt + 2pt + =IIf(RowNumber(Nothing)=1,"1pt","0pt") + + + + + + + + true + + + + + =Fields!PS.Value + + + + + + 2pt + 2pt + =IIf(RowNumber(Nothing)=1,"1pt","0pt") + + + + + + + + true + true + + + + + =Fields!SerieLote.Value + + + + + + 2pt + 2pt + =IIf(RowNumber(Nothing)=1,"1pt","0pt") + + + + + + + + true + + + + + =Fields!Lote.Value + + + + + + 2pt + 2pt + =IIf(RowNumber(Nothing)=1,"1pt","0pt") + + + + + + + + + + + + + + + + + =IIF(String.IsNullOrEmpty(Fields!Lote.Value), True,False) + + + + + + + + After + + + + + + + + + + DsInventarios + 0.17639cm + 0.22456cm + 0.89929cm + 20.39972cm + + + + + + true + true + + + + + Observaciones: + + + + =Parameters!Observaciones.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Total Productos : + + + + =Sum(iif(Not Fields!Clasificacion.Value = "USADOS",CInt(Fields!Cantidad.Value),0),"DsInventarios") + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Total Usados: + + + + =Sum(iif(Fields!Clasificacion.Value = "USADOS",CInt(Fields!Cantidad.Value),0),"DsInventarios") + + + + + + 2pt + 2pt + 2pt + 2pt + + + + 1.03125in + + + + + + + Textbox34 + 1.71608cm + 0.67239cm + 20.62428cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!FacturaProveedor.Value + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!FacturadoA.Value + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Proveedor: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Factura: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Folio: + + + + + + + Textbox3 + 0.22328cm + 13.63291cm + 0.89103cm + 3.51794cm + 5 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Folio.Value + + + + + + + Textbox31 + 0.1905cm + 17.15085cm + 0.9263cm + 3.15064cm + 6 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!Almacen.Value + + + + Textbox6 + 2.70516cm + 2.13321cm + 0.54736cm + 6.43631cm + 8 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Fecha.Value + + + + + + + Textbox32 + 3.42537cm + 2.13321cm + 0.58913cm + 6.43631cm + 9 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Almacén: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =IIF(Parameters!CveConceptoMovRelacionado.Value = 37,"Folio Virtual:","Folio Relacionado:") + + + + + + + Textbox3 + 1.20956cm + 13.63291cm + 0.47477cm + 4.09693cm + 11 + + =IIF(Parameters!FolioRelacionado.Value = "",true,false) + + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!FolioRelacionado.Value + + + + + + + Textbox31 + 1.20956cm + 17.72984cm + 0.47477cm + 2.57165cm + 12 + + =IIF(Parameters!FolioRelacionado.Value = "",true,false) + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + BDH BATERÍAS DISTRIBUCIONES DE HERMOSILLO S.A. DE C.V. + + + + + + + Textbox2 + 3.83674cm + 1.55733cm + 9.26108cm + 13 + + + 2pt + 2pt + 2pt + 2pt + + + + Embedded + Logo1 + FitProportional + 1.71608cm + 3.73091cm + 14 + + + + + + + + + + + 2.22251cm + true + true + + + 0.28886cm + 2.22221cm + 0cm + 4.95004cm + + + + + + true + true + + + + + =Parameters!NombreRecibio.Value + + + + Textbox31 + 0.46525cm + 1.74387cm + 0.6cm + 5.95755cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + 0.28886cm + 12.20081cm + 0cm + 4.95004cm + 2 + + + + + + true + true + + + + + =Parameters!Almacen.Value + + + + Textbox31 + 0.42997cm + 11.80394cm + 0.6cm + 5.95755cm + 3 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Impresion: + + + + + + + Textbox5 + 1.49022cm + 11.96388cm + 0.6cm + 2.90426cm + 4 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!FechaImpresion.Value + + + + + + + Textbox33 + 1.49022cm + 14.86814cm + 0.6cm + 2.89335cm + 5 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Usuario Registró: + + + + + + + Textbox5 + 1.62251cm + 0.79137cm + 0.6cm + 2.90426cm + 6 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!UsuarioRegistro.Value + + + + + + + Textbox33 + 1.62251cm + 3.69563cm + 0.6cm + 5.93606cm + 7 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 29.7cm + 21cm + 0.5cm + 1.5cm + 2cm + 2cm + 0.13cm + - - - - - - Textbox7 - - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Código - - - - - - - Textbox9 - - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Descripción - - - - - - - Textbox11 - - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.32cm - - - - - true - - - - - =Fields!Cantidad.Value - - - - - - - Cantidad - - - 2pt - 2pt - =IIf(RowNumber(Nothing)=1,"1pt","0pt") - - - - - - - - true - - - - - =Fields!Codigo.Value - - - - - - - Codigo - - - 2pt - 2pt - =IIf(RowNumber(Nothing)=1,"1pt","0pt") - - - - - - - - true - - - - - =Fields!PS.Value - - - - - - 2pt - 2pt - =IIf(RowNumber(Nothing)=1,"1pt","0pt") - - - - - - - - - - - - - - - - - - - After - - - - - - - DsInventarios - 0.74054cm - 2.9in - - - - - - 0.29155in - - - - - 2.9in - - - 1.01598in - true - true - - - true - true - - - - - BDH BATERÍAS DISTRIBUCIONES DE HERMOSILLO S.A. DE C.V. - - - - - - - - - =Parameters!Direccion.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - =Parameters!FechaConFormato.Value - - - - - - - - - - - FechaConFormato - 1.64702cm - 4.45513cm - 0.4473cm - 2.91087cm - 1 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Entradas de Usados - - - - - - - Textbox37 - 1.16344cm - 0.38833cm - 7.366cm - 2 - - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - Folio: - - - - =Parameters!Folio.Value - - - - - - - Textbox37 - 1.64932cm - 0.4473cm - 4.45513cm - 3 - - - 2pt - 2pt - 2pt - 2pt - - - - Embedded - Logo2 - Fit - 0.00031in - 0.00522in - 0.3541in - 0.69825in - 4 - - - - - - true - - - - - Cliente: - - - - =Parameters!Cliente.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - 0.59803in - true - true - - - 1.143cm - 0cm - 2.9in - - - - - - true - true - - - - - Fecha Impresión: - - - - - - - - =Parameters!FechaImpresion.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - Recibió: - - - - =Parameters!Recibio.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - 0.03454cm - 0cm - 2.9in - 3 - - 0.5pt - - - - - true - - - - - Observaciones: - - - - =Parameters!Observaciones.Value - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 3.1in - 3.1in - 0.1in - 0.1in - 0.2in - 0.05118in - + + + + + + Textbox7 + + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Código + + + + + + + Textbox9 + + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Descripción + + + + + + + Textbox11 + + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.32cm + + + + + true + + + + + =Fields!Cantidad.Value + + + + + + + Cantidad + + + 2pt + 2pt + =IIf(RowNumber(Nothing)=1,"1pt","0pt") + + + + + + + + true + + + + + =Fields!Codigo.Value + + + + + + + Codigo + + + 2pt + 2pt + =IIf(RowNumber(Nothing)=1,"1pt","0pt") + + + + + + + + true + + + + + =Fields!PS.Value + + + + + + 2pt + 2pt + =IIf(RowNumber(Nothing)=1,"1pt","0pt") + + + + + + + + + + + + + + + + + + + After + + + + + + + DsInventarios + 0.00427cm + 0.74054cm + 2.80227in + + + + + + 0.29155in + + + + + 2.80395in + + + 1.01636in + true + true + + + true + true + + + + + BDH BATERÍAS DISTRIBUCIONES DE HERMOSILLO S.A. DE C.V. + + + + + + + + + =Parameters!Direccion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!FechaConFormato.Value + + + + + + + + + + + FechaConFormato + 1.64798cm + 4.4594cm + 0.4473cm + 2.66264cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Entradas de Usados + + + + + + + Textbox37 + 1.1644cm + 0.00427cm + 0.38833cm + 7.11776cm + 2 + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Folio: + + + + =Parameters!Folio.Value + + + + + + + Textbox37 + 1.65028cm + 0.00427cm + 0.4473cm + 4.45513cm + 3 + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Cliente: + + + + =Parameters!Cliente.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + Embedded + Logo1 + FitProportional + 0.01921cm + 1.07463cm + 1.87452cm + 5 + + + + + + + + + + + 0.59803in + true + true + + + 1.143cm + 0.00427cm + 0cm + 2.80227in + + + + + + true + true + + + + + Fecha Impresión: + + + + + + + + =Parameters!FechaImpresion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Recibió: + + + + =Parameters!Recibio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + 0.03454cm + 0.00427cm + 0cm + 2.80227in + 3 + + 0.5pt + + + + + true + + + + + Observaciones: + + + + =Parameters!Observaciones.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 3.1in + 3.1in + 0.1in + 0.1in + 0.2in + 0.05118in + - - - - - - Textbox24 - - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - UM - - - - - - - Textbox27 - - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Descripción - - - - - - - Textbox26 - - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - P. Unitario - - - - - - - Textbox36 - - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Importe - - - - - - - Textbox38 - - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.52062cm - - - - - true - true - - - - - =Parameters!Cantidad.Value - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!UnidadMedida.Value - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!Descripcion.Value - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!PU.Value - - - - - - - Textbox37 - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - es-MX - - - - - - - - true - true - - - - - =Parameters!Importe.Value - - - - - - - Textbox39 - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - es-MX - - - - - - - - - - - - - - - - - - - - - - - - DataSet2 - 3.16535cm - 1.01062cm - 20.53564cm - - - - - - - - - 1.96151cm - - - 1.75095cm - - - 1.99729cm - - - 2.0393cm - - - 1.8cm - - - 1.70388cm - - - 1.8cm - - - 1.99576cm - - - 2.49576cm - - - 3.00539cm - - - - - 0.49cm - - - - - true - true - - - - - UUID - - - - - - - Textbox6 - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - 4 - - - - - - - - - true - true - - - - - Serie - - - - - - - Textbox3 - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Folio - - - - - - - Textbox9 - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Moneda - - - - - - - Textbox31 - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Num. Parc. - - - - - - - Textbox8 - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Saldo Anterior - - - - - - - Textbox19 - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Monto Pagado - - - - - - - Textbox25 - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.6cm - - - - - true - true - - - - - =Fields!IdDocumento.Value - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - 4 - - - - - - - - - true - true - - - - - =Fields!Serie.Value - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Folio.Value - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!MonedaDR.Value - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!NumParcialidad.Value - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!ImpSaldoAnt.Value - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - es-MX - - - - - - - - true - true - - - - - =Fields!ImpPagado.Value - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.39cm - - - - - true - true - - - - - Impuesto - - - - - - - Textbox108 - - = IIF( - Fields!Tra001BaseDR.Value > 0 - OR Fields!Tra002BaseDR.Value > 0 - OR Fields!Tra003BaseDR.Value > 0 - OR Fields!Ret001BaseDR.Value > 0 - OR Fields!Ret002BaseDR.Value > 0 - OR Fields!Ret003BaseDR.Value > 0 - ,False,true) - - - - - - - - - - - - - - - - Top - - - - - - - - true - true - - - - - Tipo - - - - - - - Textbox109 - - = IIF( - Fields!Tra001BaseDR.Value > 0 - OR Fields!Tra002BaseDR.Value > 0 - OR Fields!Tra003BaseDR.Value > 0 - OR Fields!Ret001BaseDR.Value > 0 - OR Fields!Ret002BaseDR.Value > 0 - OR Fields!Ret003BaseDR.Value > 0 - ,False,true) - - - - - - - - - - - - - - - - Top - - - - - - - - true - true - - - - - Base - - - - - - - Textbox110 - - = IIF( - Fields!Tra001BaseDR.Value > 0 - OR Fields!Tra002BaseDR.Value > 0 - OR Fields!Tra003BaseDR.Value > 0 - OR Fields!Ret001BaseDR.Value > 0 - OR Fields!Ret002BaseDR.Value > 0 - OR Fields!Ret003BaseDR.Value > 0 - ,False,true) - - - - - - - - - - - - - - - - Top - - - - - - - - true - true - - - - - Tipo Factor - - - - - - - Textbox111 - - = IIF( - Fields!Tra001BaseDR.Value > 0 - OR Fields!Tra002BaseDR.Value > 0 - OR Fields!Tra003BaseDR.Value > 0 - OR Fields!Ret001BaseDR.Value > 0 - OR Fields!Ret002BaseDR.Value > 0 - OR Fields!Ret003BaseDR.Value > 0 - ,False,true) - - - - - - - - - - - - - - - - Top - - - - - - - - true - true - - - - - Tasa/Cuota - - - - - - - Textbox112 - - = IIF( - Fields!Tra001BaseDR.Value > 0 - OR Fields!Tra002BaseDR.Value > 0 - OR Fields!Tra003BaseDR.Value > 0 - OR Fields!Ret001BaseDR.Value > 0 - OR Fields!Ret002BaseDR.Value > 0 - OR Fields!Ret003BaseDR.Value > 0 - ,False,true) - - - - - - - - - - - - - - - - Top - - - true - - - - - - true - true - - - - - Importe - - - - - - - Textbox113 - - = IIF( - Fields!Tra001BaseDR.Value > 0 - OR Fields!Tra002BaseDR.Value > 0 - OR Fields!Tra003BaseDR.Value > 0 - OR Fields!Ret001BaseDR.Value > 0 - OR Fields!Ret002BaseDR.Value > 0 - OR Fields!Ret003BaseDR.Value > 0 - ,False,true) - - - - - - - - - - - - - - - - Top - - - - - - - - true - true - - - - - - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.07938cm - - - - - true - true - - - - - ISR - - - - - - - Textbox61 - - = IIF( - Fields!Tra001BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - Traslado - - - - - - - Textbox204 - - = IIF( - Fields!Tra001BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - =Fields!ImpPagado.Value - - - - - - - ImpPagado - - = IIF( - Fields!Tra001BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - =Fields!Tra001TipoFactorDR.Value - - - - - - - ImpPagado - - = IIF( - Fields!Tra001BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - =Fields!Tra001TasaOCuotaDR.Value - - - - - - - ImpPagado - - = IIF( - Fields!Tra001BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - =Fields!Tra001ImporteDR.Value - - - - - - - ImpPagado - - = IIF( - Fields!Tra001BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.07938cm - - - - - true - true - - - - - IVA - - - - - - - Textbox61 - - = IIF( - Fields!Tra002BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - Traslado - - - - - - - Textbox204 - - = IIF( - Fields!Tra002BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - =Fields!ImpPagado.Value - - - - - - - ImpPagado - - = IIF( - Fields!Tra002BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - =Fields!Tra002TipoFactorDR.Value - - - - - - - ImpPagado - - = IIF( - Fields!Tra002BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - =Fields!Tra002TasaOCuotaDR.Value - - - - - - - ImpPagado - - = IIF( - Fields!Tra002BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - =Fields!Tra002ImporteDR.Value - - - - - - - ImpPagado - - = IIF( - Fields!Tra002BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.07938cm - - - - - true - true - - - - - IEPS - - - - - - - Textbox61 - - = IIF( - Fields!Tra003BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - Traslado - - - - - - - Textbox204 - - = IIF( - Fields!Tra003BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - =Fields!ImpPagado.Value - - - - - - - ImpPagado - - = IIF( - Fields!Tra003BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - =Fields!Tra003TipoFactorDR.Value - - - - - - - ImpPagado - - = IIF( - Fields!Tra003BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - =Fields!Tra003TasaOCuotaDR.Value - - - - - - - ImpPagado - - = IIF( - Fields!Tra003BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - =Fields!Tra003ImporteDR.Value - - - - - - - ImpPagado - - = IIF( - Fields!Tra003BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.07938cm - - - - - true - true - - - - - ISR - - - - - - - Textbox61 - - = IIF( - Fields!Ret001BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - Retención - - - - - - - Textbox207 - - = IIF( - Fields!Ret001BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - =Fields!ImpPagado.Value - - - - - - - ImpPagado - - = IIF( - Fields!Ret001BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - =Fields!Ret001TipoFactorDR.Value - - - - - - - ImpPagado - - = IIF( - Fields!Ret001BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - =Fields!Ret001TasaOCuotaDR.Value - - - - - - - ImpPagado - - = IIF( - Fields!Ret001BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - =Fields!Ret001ImporteDR.Value - - - - - - - ImpPagado - - = IIF( - Fields!Ret001BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.07938cm - - - - - true - true - - - - - IVA - - - - - - - Textbox61 - - = IIF( - Fields!Ret002BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - Retención - - - - - - - Textbox207 - - = IIF( - Fields!Ret002BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - =Fields!ImpPagado.Value - - - - - - - ImpPagado - - = IIF( - Fields!Ret002BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - =Fields!Ret002TipoFactorDR.Value - - - - - - - ImpPagado - - = IIF( - Fields!Ret002BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - =Fields!Ret002TasaOCuotaDR.Value - - - - - - - ImpPagado - - = IIF( - Fields!Ret002BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - =Fields!Ret002ImporteDR.Value - - - - - - - ImpPagado - - = IIF( - Fields!Ret002BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.07938cm - - - - - true - true - - - - - IEPS - - - - - - - Textbox59 - - = IIF( - Fields!Ret003BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - Retención - - - - - - - Textbox207 - - = IIF( - Fields!Ret003BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - =Fields!ImpPagado.Value - - - - - - - ImpPagado - - = IIF( - Fields!Ret003BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - =Fields!Ret003TipoFactorDR.Value - - - - - - - ImpPagado - - = IIF( - Fields!Ret003BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - =Fields!Ret003TasaOCuotaDR.Value - - - - - - - ImpPagado - - = IIF( - Fields!Ret003BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - =Fields!Ret003ImporteDR.Value - - - - - - - ImpPagado - - = IIF( - Fields!Ret003BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - es-MX - - - - - - - - true - true - - - - - - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - - - - - - - - After - - - - - - - - - - - - - - - - - DataSet2 - 5.05cm - 1.95625cm - 20.54984cm - 1 - - - - - - - - - 4.5cm - - - 1.74905cm - - - 1.5cm - - - 2.96606cm - - - 6.82934cm - - - 2.98695cm - - - - - 0.49cm - - - - - true - true - - - - - Fecha y hora de pago - - - - - - - Textbox45 - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Moneda - - - - - - - Textbox21 - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - TC - - - - - - - Textbox5 - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Cta Ordenante - - - - - - - Textbox12 - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Forma de Pago - - - - - - - Textbox48 - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Total de Pago - - - - - - - Textbox50 - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.52062cm - - - - - true - true - - - - - =Fields!FechaPago.Value - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!MonedaP.Value - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!TipoCambioP.Value - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - es-MX - - - - - - - - true - true - - - - - =Fields!CtaOrdenante.Value - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!FormaDePagoP.Value - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Monto.Value - - - - - - - Monto - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - es-MX - - - - - - - - 0.6cm - - - - - true - true - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Total de Pago con letra: - - - - =Parameters!CantidadLetra.Value - - - - - - - Textbox16 - - - 2pt - 2pt - 2pt - 2pt - - - 3 - - - - - - - - - - - - - - - - - - - - - - After - - - - - - Before - - - - DataSet1 - 7.262cm - 1.61062cm - 20.5314cm - 2 - - - - - - true - true - - - - - CFDI RELACIONADOS - - - - - - - Textbox5 - 4.5cm - 0.01844cm - 0.5cm - 20.5314cm - 3 - - - 2pt - 2pt - 2pt - 2pt - - - - External - =Parameters!QR.Value - FitProportional - 6.14523in - 1.3in - 1.5in - 4 - - - - - - true - true - - - - - Cadena original del complemento de certificación digital del SAT: - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!CadenaOriginal.Value - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - No. Certificado: - - - - - - - White - - 1pt - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - UUID: - - - - - - - White - - 1pt - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Sello.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!SelloSAT.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!NoCertificado.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!UUIDPago.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Regímen: Regímen General de Ley Personas Morales - - - - - - - - - Éste documento es una representación impresa de un CFDi - - - - - - - Textbox171 - 15.85422cm - 4.00059cm - 0.89979cm - 16.50467cm - 13 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Datos del Cliente: - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Cliente: - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Cliente.Value - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!ClienteDireccion.Value - - - - , - - - - =Parameters!ClienteColonia.Value - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Dirección: - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Ciudad: - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!ClienteCiudad.Value - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!ClienteCP.Value - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - CP: - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - RFC Ordenante: - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!RFCOrdenante.Value - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Sello: - - - - - - - White - - 1pt - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Sello digital del SAT: - - - - - - - White - - 1pt - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - 18.91088cm - - - - - 20.54984cm - - - 3.03264cm - true - true - - - true - - - - - RECIBO DE PAGO - - - - - - - Textbox3 - 5.84339in - 0.5cm - 2.24597in - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - =Parameters!SerieFolio.Value - - - - - - - Textbox3 - 0.20833in - 5.84339in - 0.60856cm - 2.24597in - 1 - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - Fecha Timbre - - - - - - - - - - - - - - - - Textbox3 - 0.44792in - 5.84339in - 0.5cm - 2.24597in - 2 - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - =Parameters!FechaTimbre.Value - - - - - - - Textbox3 - 0.64477in - 5.84339in - 0.25114in - 2.24597in - 3 - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - Embedded - Logo4 - FitProportional - 0.34994cm - 0.14111cm - 2.47832cm - 4.42323cm - 4 - - - - - - true - - - - - ECLIPSE DEL NOROESTE SA DE CV - - - - - - - - - R.F.C ENO970305TL4 - - - - - - - - - | www.eclisedelnoroeste.com.mx | - - - - - - - Textbox4 - 0.00516cm - 1.87249in - 0.59155in - 3.92923in - 5 - - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - Domicilio Fiscal - - - - - - - - - Camelia num 346, colonia Luis Encinas, - - - - - - - - - Hermosillo, Sonora. C.P: 83138, - - - - - - - - - México Tel.: (662) 14-6826 - - - - - - - Textbox4 - 1.32572cm - 1.87249in - 0.59155in - 3.92923in - 6 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - 0.41981cm - true - true - - - true - true - - - - - ="Página " & Globals.PageNumber & " de " & Globals.TotalPages - - - - - - - Textbox35 - 17.56289cm - 0.41981cm - 2.94979cm - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Usuario: - - - - - - - - =Parameters!UsuarioImprimio.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha Impresión: - - - - - - - - =Parameters!FechaImpresion.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 27.94cm - 21.59cm - 0.5cm - 0.5cm - 0.5cm - 0.5cm - 1.27cm - + + + + + + Textbox24 + + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + UM + + + + + + + Textbox27 + + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Descripción + + + + + + + Textbox26 + + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + P. Unitario + + + + + + + Textbox36 + + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Importe + + + + + + + Textbox38 + + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.52062cm + + + + + true + true + + + + + =Parameters!Cantidad.Value + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!UnidadMedida.Value + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!Descripcion.Value + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!PU.Value + + + + + + + Textbox37 + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + es-MX + + + + + + + + true + true + + + + + =Parameters!Importe.Value + + + + + + + Textbox39 + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + es-MX + + + + + + + + + + + + + + + + + + + + + + + + DataSet2 + 3.16535cm + 1.01062cm + 20.53564cm + + + + + + + + + 1.96151cm + + + 1.75095cm + + + 1.99729cm + + + 2.0393cm + + + 1.8cm + + + 1.70388cm + + + 1.8cm + + + 1.99576cm + + + 2.49576cm + + + 3.00539cm + + + + + 0.49cm + + + + + true + true + + + + + UUID + + + + + + + Textbox6 + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + 4 + + + + + + + + + true + true + + + + + Serie + + + + + + + Textbox3 + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Folio + + + + + + + Textbox9 + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Moneda + + + + + + + Textbox31 + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Num. Parc. + + + + + + + Textbox8 + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Saldo Anterior + + + + + + + Textbox19 + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Monto Pagado + + + + + + + Textbox25 + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.46085cm + + + + + true + true + + + + + =Fields!IdDocumento.Value + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + 4 + + + + + + + + + true + true + + + + + =Fields!Serie.Value + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Folio.Value + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!MonedaDR.Value + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!NumParcialidad.Value + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ImpSaldoAnt.Value + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + es-MX + + + + + + + + true + true + + + + + =Fields!ImpPagado.Value + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.37042cm + + + + + true + true + + + + + Impuesto + + + + + + + Textbox108 + + = IIF( + Fields!Tra001BaseDR.Value > 0 + OR Fields!Tra002BaseDR.Value > 0 + OR Fields!Tra003BaseDR.Value > 0 + OR Fields!Ret001BaseDR.Value > 0 + OR Fields!Ret002BaseDR.Value > 0 + OR Fields!Ret003BaseDR.Value > 0 + ,False,true) + + + + + + + + + + + + + + + + Top + + + + + + + + true + true + + + + + Tipo + + + + + + + Textbox109 + + = IIF( + Fields!Tra001BaseDR.Value > 0 + OR Fields!Tra002BaseDR.Value > 0 + OR Fields!Tra003BaseDR.Value > 0 + OR Fields!Ret001BaseDR.Value > 0 + OR Fields!Ret002BaseDR.Value > 0 + OR Fields!Ret003BaseDR.Value > 0 + ,False,true) + + + + + + + + + + + + + + + + Top + + + + + + + + true + true + + + + + Base + + + + + + + Textbox110 + + = IIF( + Fields!Tra001BaseDR.Value > 0 + OR Fields!Tra002BaseDR.Value > 0 + OR Fields!Tra003BaseDR.Value > 0 + OR Fields!Ret001BaseDR.Value > 0 + OR Fields!Ret002BaseDR.Value > 0 + OR Fields!Ret003BaseDR.Value > 0 + ,False,true) + + + + + + + + + + + + + + + + Top + + + + + + + + true + true + + + + + Tipo Factor + + + + + + + Textbox111 + + = IIF( + Fields!Tra001BaseDR.Value > 0 + OR Fields!Tra002BaseDR.Value > 0 + OR Fields!Tra003BaseDR.Value > 0 + OR Fields!Ret001BaseDR.Value > 0 + OR Fields!Ret002BaseDR.Value > 0 + OR Fields!Ret003BaseDR.Value > 0 + ,False,true) + + + + + + + + + + + + + + + + Top + + + + + + + + true + true + + + + + Tasa/Cuota + + + + + + + Textbox112 + + = IIF( + Fields!Tra001BaseDR.Value > 0 + OR Fields!Tra002BaseDR.Value > 0 + OR Fields!Tra003BaseDR.Value > 0 + OR Fields!Ret001BaseDR.Value > 0 + OR Fields!Ret002BaseDR.Value > 0 + OR Fields!Ret003BaseDR.Value > 0 + ,False,true) + + + + + + + + + + + + + + + + Top + + + + + + + + true + true + + + + + Importe + + + + + + + Textbox113 + + = IIF( + Fields!Tra001BaseDR.Value > 0 + OR Fields!Tra002BaseDR.Value > 0 + OR Fields!Tra003BaseDR.Value > 0 + OR Fields!Ret001BaseDR.Value > 0 + OR Fields!Ret002BaseDR.Value > 0 + OR Fields!Ret003BaseDR.Value > 0 + ,False,true) + + + + + + + + + + + + + + + + Top + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.07938cm + + + + + true + true + + + + + ISR + + + + + + + Textbox61 + + = IIF( + Fields!Tra001BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + Traslado + + + + + + + Textbox204 + + = IIF( + Fields!Tra001BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =CDbl(Fields!Tra001BaseDR.Value).ToString("C") + + + + + + + ImpPagado + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Tra001ImporteDR.Value > 0, False, True) + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Tra001TipoFactorDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Tra001BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =Fields!Tra001TasaOCuotaDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Tra001BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =Fields!Tra001ImporteDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Tra001BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.07938cm + + + + + true + true + + + + + IVA + + + + + + + Textbox61 + + = IIF( + Fields!Tra002BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + Traslado + + + + + + + Textbox204 + + = IIF( + Fields!Tra002BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =CDbl(Fields!Tra002BaseDR.Value).ToString("C") + + + + + + + ImpPagado + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Tra002ImporteDR.Value > 0, False, True) + + + + 2pt + 2pt + 2pt + 2pt + es-MX + + + + + + + + true + true + + + + + =Fields!Tra002TipoFactorDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Tra002BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =Fields!Tra002TasaOCuotaDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Tra002BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =Fields!Tra002ImporteDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Tra002BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.07938cm + + + + + true + true + + + + + IEPS + + + + + + + Textbox61 + + = IIF( + Fields!Tra003BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + Traslado + + + + + + + Textbox204 + + = IIF( + Fields!Tra003BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =CDbl(Fields!Tra003BaseDR.Value).ToString("C") + + + + + + + ImpPagado + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Tra003ImporteDR.Value > 0, False, True) + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Tra003TipoFactorDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Tra003BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =Fields!Tra003TasaOCuotaDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Tra003BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =Fields!Tra003ImporteDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Tra003BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.07938cm + + + + + true + true + + + + + ISR + + + + + + + Textbox61 + + = IIF( + Fields!Ret001BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + Retención + + + + + + + Textbox207 + + = IIF( + Fields!Ret001BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =CDbl(Fields!Ret001BaseDR.Value).ToString("C") + + + + + + + ImpPagado + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Ret001ImporteDR.Value > 0, False, True) + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Ret001TipoFactorDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Ret001BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =Fields!Ret001TasaOCuotaDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Ret001BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =Fields!Ret001ImporteDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Ret001BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.07938cm + + + + + true + true + + + + + IVA + + + + + + + Textbox61 + + = IIF( + Fields!Ret002BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + Retención + + + + + + + Textbox207 + + = IIF( + Fields!Ret002BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + = CDbl(Fields!Ret002BaseDR.Value).ToString("C") + + + + + + + ImpPagado + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Ret002ImporteDR.Value > 0, False, True) + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Ret002TipoFactorDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Ret002BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =Fields!Ret002TasaOCuotaDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Ret002BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =Fields!Ret002ImporteDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Ret002BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.07938cm + + + + + true + true + + + + + IEPS + + + + + + + Textbox59 + + = IIF( + Fields!Ret003BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + Retención + + + + + + + Textbox207 + + = IIF( + Fields!Ret003BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =CDbl(Fields!Ret003BaseDR.Value).ToString("C") + + + + + + + ImpPagado + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Ret003ImporteDR.Value > 0, False, True) + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Ret003TipoFactorDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Ret003BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =Fields!Ret003TasaOCuotaDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Ret003BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =Fields!Ret003ImporteDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Ret003BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + es-MX + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + + + + + + After + + + + + + + + + + + + + + + + + DataSet2 + 5.05cm + 1.79752cm + 20.54984cm + 1 + + + + + + + + + 4.5cm + + + 1.74905cm + + + 1.5cm + + + 2.96606cm + + + 6.82934cm + + + 2.98695cm + + + + + 0.49cm + + + + + true + true + + + + + Fecha y hora de pago + + + + + + + Textbox45 + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Moneda + + + + + + + Textbox21 + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + TC + + + + + + + Textbox5 + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Cta Ordenante + + + + + + + Textbox12 + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Forma de Pago + + + + + + + Textbox48 + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Total de Pago + + + + + + + Textbox50 + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.52062cm + + + + + true + true + + + + + =Fields!FechaPago.Value + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!MonedaP.Value + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!TipoCambioP.Value + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + es-MX + + + + + + + + true + true + + + + + =Fields!CtaOrdenante.Value + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!FormaDePagoP.Value + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Monto.Value + + + + + + + Monto + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + es-MX + + + + + + + + 0.6cm + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Total de Pago con letra: + + + + =Parameters!CantidadLetra.Value + + + + + + + Textbox16 + + + 2pt + 2pt + 2pt + 2pt + + + 3 + + + + + + + + + + + + + + + + + + + + + + After + + + + + + Before + + + + DataSet1 + 7.262cm + 1.61062cm + 20.5314cm + 2 + + + + + + true + true + + + + + CFDI RELACIONADOS + + + + + + + Textbox5 + 4.5cm + 0.01844cm + 0.5cm + 20.5314cm + 3 + + + 2pt + 2pt + 2pt + 2pt + + + + External + =Parameters!QR.Value + FitProportional + 6.14523in + 1.3in + 1.5in + 4 + + + + + + true + true + + + + + Cadena original del complemento de certificación digital del SAT: + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!CadenaOriginal.Value + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + No. Certificado: + + + + + + + White + + 1pt + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + UUID: + + + + + + + White + + 1pt + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Sello.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!SelloSAT.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!NoCertificado.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!UUIDPago.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Regímen: Regímen General de Ley Personas Morales + + + + + + + + + Éste documento es una representación impresa de un CFDi + + + + + + + Textbox171 + 15.85422cm + 4.00059cm + 0.89979cm + 16.50467cm + 13 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Datos del Cliente: + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Cliente: + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Cliente.Value + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!ClienteDireccion.Value + + + + , + + + + =Parameters!ClienteColonia.Value + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Dirección: + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Ciudad: + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!ClienteCiudad.Value + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!ClienteCP.Value + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + CP: + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + RFC Ordenante: + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!RFCOrdenante.Value + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Sello: + + + + + + + White + + 1pt + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Sello digital del SAT: + + + + + + + White + + 1pt + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + 18.91088cm + + + + + 20.54984cm + + + 3.03264cm + true + true + + + true + + + + + RECIBO DE PAGO + + + + + + + Textbox3 + 5.84339in + 0.5cm + 2.24597in + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!SerieFolio.Value + + + + + + + Textbox3 + 0.20833in + 5.84339in + 0.60856cm + 2.24597in + 1 + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Fecha Timbre + + + + + + + + + + + + + + + + Textbox3 + 0.44792in + 5.84339in + 0.5cm + 2.24597in + 2 + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!FechaTimbre.Value + + + + + + + Textbox3 + 0.64477in + 5.84339in + 0.25114in + 2.24597in + 3 + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + Embedded + Logo4 + FitProportional + 0.34994cm + 0.14111cm + 2.47832cm + 4.42323cm + 4 + + + + + + true + + + + + ECLIPSE DEL NOROESTE SA DE CV + + + + + + + + + R.F.C ENO970305TL4 + + + + + + + + + | www.eclisedelnoroeste.com.mx | + + + + + + + Textbox4 + 0.00516cm + 1.87249in + 0.59155in + 3.92923in + 5 + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Domicilio Fiscal + + + + + + + + + Camelia num 346, colonia Luis Encinas, + + + + + + + + + Hermosillo, Sonora. C.P: 83138, + + + + + + + + + México Tel.: (662) 14-6826 + + + + + + + Textbox4 + 1.32572cm + 1.87249in + 0.59155in + 3.92923in + 6 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + 0.41981cm + true + true + + + true + true + + + + + ="Página " & Globals.PageNumber & " de " & Globals.TotalPages + + + + + + + Textbox35 + 0cm + 17.56289cm + 0.41981cm + 2.94979cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Usuario: + + + + + + + + =Parameters!UsuarioImprimio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Impresión: + + + + + + + + =Parameters!FechaImpresion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 27.94cm + 21.59cm + 0.5cm + 0.5cm + 0.5cm + 0.5cm + 1.27cm + @@ -195,6 +201,12 @@
    + + +
    + +
    + Orden:
    @@ -236,33 +248,43 @@ - + +
    +
    + - + Código -
    - -
    +
    + +
    +
    - + - Producto - - + Producto -
    - -
    +
    + +
    +
    +
    + +
    + +
    + +
    ") strBody.Append(" ") strBody.Append(" ") strBody.Append(" ") strBody.Append(" ") @@ -6035,10 +6035,10 @@ Partial Class OC_OC 'verifico los permisos según el estatus 'Const Sitio As String = "rm:90/" - Dim StrSupervisa As String = "" '= String.Format("http://{0}/OC/RegOp.aspx?p={1}", Sitio, Encripta(String.Format("Op=SUPERVISAR&Oc={0}&CveUsuario={1}&Fecha={2}", CveOrdenCompra, CveUsuario, Now))) - Dim StrAutoriza As String = "" '= String.Format("http://{0}/OC/RegOp.aspx?p={1}", Sitio, Encripta(String.Format("Op=AUTORIZAR&Oc={0}&CveUsuario={1}&Fecha={2}", CveOrdenCompra, CveUsuario, Now))) - Dim StrCancela As String = "" ' = String.Format("http://{0}/OC/RegOp.aspx?p={1}", Sitio, Encripta(String.Format("Op=CANCELAR&Oc={0}&CveUsuario={1}&Fecha={2}", CveOrdenCompra, UsuarioActual.CveUsuario, Now))) - Dim StrReqCotiza As String = "" '= String.Format("http://{0}/OC/RegOp.aspx?p={1}", Sitio, Encripta(String.Format("Op=REQCONTIZACION&Oc={0}&CveUsuario={1}&Fecha={2}", CveOrdenCompra, CveUsuario, Now))) + Dim StrSupervisa As String = "" '= String.Format("http://{0}/OC/RegOp.aspx?p={1}", Sitio, Encripta(String.Format("Op=SUPERVISAR&Oc={0}&CveUsuario={1}&Fecha={2}", CveOrdenCompra, CveUsuario, NowADS()))) + Dim StrAutoriza As String = "" '= String.Format("http://{0}/OC/RegOp.aspx?p={1}", Sitio, Encripta(String.Format("Op=AUTORIZAR&Oc={0}&CveUsuario={1}&Fecha={2}", CveOrdenCompra, CveUsuario, NowADS()))) + Dim StrCancela As String = "" ' = String.Format("http://{0}/OC/RegOp.aspx?p={1}", Sitio, Encripta(String.Format("Op=CANCELAR&Oc={0}&CveUsuario={1}&Fecha={2}", CveOrdenCompra, UsuarioActual.CveUsuario, NowADS()))) + Dim StrReqCotiza As String = "" '= String.Format("http://{0}/OC/RegOp.aspx?p={1}", Sitio, Encripta(String.Format("Op=REQCONTIZACION&Oc={0}&CveUsuario={1}&Fecha={2}", CveOrdenCompra, CveUsuario, NowADS()))) 'si se acaba de solicitar y se necesita supervisar If pCveEstatus = 1 Then strOpciones.AppendFormat(" ", StrSupervisa) @@ -6452,7 +6452,7 @@ Partial Class OC_OC strBody.AppendFormat(" ", ObjCotizacion.Empresa) strBody.Append(" ") strBody.Append(" ") - strBody.AppendFormat(" ", Now.ToShortDateString) + strBody.AppendFormat(" ", NowADS().ToShortDateString) strBody.Append(" ") strBody.Append("
    PersonalCuentaError
    Fecha") - strBody.Append(DateTime.Now.ToString("dd/MM/yy")) + strBody.Append(NowADS().ToString("dd/MM/yy")) strBody.Append("
    De
    Supervisar
    Empresa:{0}
    Fecha Eliminación:{0}  Fecha Eliminación:{0}  
    ") strBody.Append(" ") @@ -6806,7 +6806,7 @@ Partial Class OC_OC GvEB.DataBind() 'Cargo Folio, Usuario y Fecha nuevos - TxtFecha.Text = Now.ToShortDateString + TxtFecha.Text = NowADS().ToShortDateString lblNombreUsuario.Text = UsuarioActual.Nombre CargaFolios() BtnGuardar.Enabled = True @@ -6917,7 +6917,7 @@ Partial Class OC_OC End If - TxtFecha.Text = Now.ToString("dd/MM/yyyy") + TxtFecha.Text = NowADS().ToString("dd/MM/yyyy") lblNombreUsuario.Text = UsuarioActual.Nombre ViewState("CveOrdenCompra") = 0 CargaFolios() @@ -7597,13 +7597,13 @@ Partial Class OC_OC Private Sub DdlClienteContrato_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlClienteContrato.selectedindexchange DdlContratos.Items.Clear() - ' DdlContratos.DataSource = GlobalDTContratos().FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveCliente = {DdlClientes.SelectedValue.ToEntero} AND Estatus = True AND FechaFinal >= '{Now.ToShortDateString}' AND FechaInicial <= '{Now.ToShortDateString}'") + ' DdlContratos.DataSource = GlobalDTContratos().FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveCliente = {DdlClientes.SelectedValue.ToEntero} AND Estatus = True AND FechaFinal >= '{NowADS().ToShortDateString}' AND FechaInicial <= '{NowADS().ToShortDateString}'") Dim ObjContratos As New ClsContratos If ObjContratos.GetContratos(-1, UsuarioActual.CveEmpresa, DdlClienteContrato.SelectedValue.ToEntero, -1, 1) Then If ObjContratos.DtResultados.FiltraParametros("Estatus = True").Rows.Count > 0 Then - DdlContratos.DataSource = ObjContratos.DtResultados.FiltraParametros($"Estatus = True AND FechaFinal >= '{Now.ToShortDateString}' AND FechaInicial <= '{Now.ToShortDateString}'") + DdlContratos.DataSource = ObjContratos.DtResultados.FiltraParametros($"Estatus = True AND FechaFinal >= '{NowADS().ToShortDateString}' AND FechaInicial <= '{NowADS().ToShortDateString}'") End If End If @@ -8070,7 +8070,7 @@ Partial Class OC_OC Dim ObjConta As New ClsContabilidad Dim ObjOC As New ClsOC(ObjConta.IniciaTransacSQL) - Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("OC/OC-CambioMoneda", 74, 0, 0, 1, Now, ConceptoPartida, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("OC/OC-CambioMoneda", 74, 0, 0, 1, NowADS(), ConceptoPartida, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Dim Importe176, Importe228, Importe229 As Decimal Dim ImporteCI176, ImporteMN229, PU, Importe176PU As Decimal Dim Retorno As Boolean = True @@ -8230,14 +8230,14 @@ Partial Class OC_OC ' Dim TCDouble As Double = TxtTCCambioMoneda.Text.ToDecimal ' If TipoMoneda = "2" Then - ' Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("OC/OC-(OCAlmacen)", 74, 0.0D, 0.0D, 1, Now, DdlProveedores.SelectedText, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + ' Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("OC/OC-(OCAlmacen)", 74, 0.0D, 0.0D, 1, NowADS(), DdlProveedores.SelectedText, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) ' If CvePrePoliza > 0 Then ' Dim PrimerImporte As Integer = (0 - LblSubTotal.Text.ToDecimal) ' Dim SegundoImporte As Integer = (0 - LblSubTotal.Text.ToDecimal) - ' If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, PrimerImporte, lblFolio.Text, 228, lblFolio.Text, Now, 0, -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacenVenta, CveOC:=CveOrdenCompra) Then - ' If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, SegundoImporte, lblFolio.Text, 229, lblFolio.Text, Now, 0, -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacenVenta, CveOC:=CveOrdenCompra) Then - ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, PrimerImporte + SegundoImporte, lblFolio.Text, 176, lblFolio.Text, Now, 0, -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacenVenta, CveOC:=CveOrdenCompra) Then + ' If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, PrimerImporte, lblFolio.Text, 228, lblFolio.Text, NowADS(), 0, -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacenVenta, CveOC:=CveOrdenCompra) Then + ' If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, SegundoImporte, lblFolio.Text, 229, lblFolio.Text, NowADS(), 0, -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacenVenta, CveOC:=CveOrdenCompra) Then + ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, PrimerImporte + SegundoImporte, lblFolio.Text, 176, lblFolio.Text, NowADS(), 0, -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacenVenta, CveOC:=CveOrdenCompra) Then ' Err = True ' Else ' If Not OC.UpdateOrdenCompra(-1, TxtDescrip.Text, TxtJustificacion.Text, DdlPrioridad.SelectedValue.ToEntero, ChkCotizacion.Checked, If(TxtFechaEstimadaEntrega.Text.Trim = "", "-1", TxtFechaEstimadaEntrega.Text.Trim), @@ -8268,13 +8268,13 @@ Partial Class OC_OC ' End If ' End If ' ElseIf TipoMoneda = "1" Then - ' Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("OC/OC-(OCAlmacen)", 74, 0.0D, 0.0D, 1, Now, DdlProveedores.SelectedText, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + ' Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("OC/OC-(OCAlmacen)", 74, 0.0D, 0.0D, 1, NowADS(), DdlProveedores.SelectedText, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) ' If CvePrePoliza > 0 Then ' Dim PrimerImporte As Decimal = Decimal.Round(((LblSubTotal.Text.ToDecimal) / TxtTCCambioMoneda.Text.ToDecimal), 2, MidpointRounding.AwayFromZero) ' Dim SegundoImporte As Decimal = LblSubTotal.Text.ToDecimal - ' If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, PrimerImporte, lblFolio.Text, 228, lblFolio.Text, Now, 0, -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacenVenta, CveOC:=CveOrdenCompra) Then - ' If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, SegundoImporte, lblFolio.Text, 229, lblFolio.Text, Now, 0, -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacenVenta, CveOC:=CveOrdenCompra) Then - ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, (0 - (PrimerImporte + SegundoImporte)), lblFolio.Text, 176, lblFolio.Text, Now, 0, -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacenVenta, CveOC:=CveOrdenCompra) Then + ' If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, PrimerImporte, lblFolio.Text, 228, lblFolio.Text, NowADS(), 0, -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacenVenta, CveOC:=CveOrdenCompra) Then + ' If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, SegundoImporte, lblFolio.Text, 229, lblFolio.Text, NowADS(), 0, -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacenVenta, CveOC:=CveOrdenCompra) Then + ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, (0 - (PrimerImporte + SegundoImporte)), lblFolio.Text, 176, lblFolio.Text, NowADS(), 0, -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacenVenta, CveOC:=CveOrdenCompra) Then ' Err = True ' Else ' If Not OC.UpdateOrdenCompra(-1, TxtDescrip.Text, TxtJustificacion.Text, DdlPrioridad.SelectedValue.ToEntero, ChkCotizacion.Checked, If(TxtFechaEstimadaEntrega.Text.Trim = "", "-1", TxtFechaEstimadaEntrega.Text.Trim), diff --git a/OC/OC2.aspx.vb b/OC/OC2.aspx.vb index 835646196..bc1b0ec4d 100644 --- a/OC/OC2.aspx.vb +++ b/OC/OC2.aspx.vb @@ -455,7 +455,7 @@ Partial Class OC 'Poner el Estatus mas Avanzado ' If DtEstatusUsuarios.Rows.Count > 0 Then CboE.SelectedValue = DtEstatusUsuarios.MAX("Nivel").ToEntero Else DesHabilitar() - TxtFecha.Text = Now.ToString("dd/MM/yyyy") + TxtFecha.Text = NowADS().ToString("dd/MM/yyyy") lblNombreUsuario.Text = UsuarioActual.Nombre ViewState("CveOrdenCompra") = 0 CargaFolios() @@ -1647,18 +1647,18 @@ Partial Class OC If ObjAC.GetPoliza(IDPolizaPresupuestal, -1, -1, -1, -1) AndAlso ObjAC.DtResultados.Rows.Count > 0 Then dt = ObjAC.DtResultados - If dt.Rows(0)("FechaPol").ToString.ToDate.Month < Now.Month Or dt.Rows(0)("FechaPol").ToString.ToDate.Year < Now.Year Then + If dt.Rows(0)("FechaPol").ToString.ToDate.Month < NowADS().Month Or dt.Rows(0)("FechaPol").ToString.ToDate.Year < NowADS().Year Then ' MES ANTERIOR, MOVIMIENTOS CONTRARIOS (NEGATIVOS) 'CREA POLIZA NEGATIVA - IdPolizaNueva = ObjAC.AddPoliza(dt.Rows(0)("CodigoTipoPoliza").ToString.ToEntero, String.Format("Cancelacion: {0}", dt.Rows(0)("Concepto").ToString), 0, 0, UsuarioActual.CveUsuario, Now) + IdPolizaNueva = ObjAC.AddPoliza(dt.Rows(0)("CodigoTipoPoliza").ToString.ToEntero, String.Format("Cancelacion: {0}", dt.Rows(0)("Concepto").ToString), 0, 0, UsuarioActual.CveUsuario, NowADS()) If IdPolizaNueva > 0 Then FolioPolizaNueva = ObjAC.Folio 'DETALLES POLIZA NEGATIVA For Each dr As DataRow In dt.Rows - If Not ObjAC.AddMovimiento(IdPolizaNueva, dr("IdCuenta").ToString.ToEntero, dr("TipoMovto").ToString = "True", dr("Importe").ToString.ToDecimal * -1, dr("Referencia").ToString, String.Format("Cancelacion: {0}", dt.Rows(0)("Concepto").ToString), dr("IdSegNeg").ToString.ToEntero, Now, "") Then + If Not ObjAC.AddMovimiento(IdPolizaNueva, dr("IdCuenta").ToString.ToEntero, dr("TipoMovto").ToString = "True", dr("Importe").ToString.ToDecimal * -1, dr("Referencia").ToString, String.Format("Cancelacion: {0}", dt.Rows(0)("Concepto").ToString), dr("IdSegNeg").ToString.ToEntero, NowADS(), "") Then ErrorCancelar = True : Exit For End If Next @@ -2510,7 +2510,7 @@ Partial Class OC ' End If ' If HuboError = False Then - ' If objOrdenCompra.AddOrdenCompra("OC", Row("CveSubProyecto").ToString.ToEntero, Row("Descripcion").ToString, Row("Justificacion").ToString, Row("Prioridad").ToString.ToEntero, Now, Row("CveMoneda").ToString.ToEntero, CveEstatusInicialOC, + ' If objOrdenCompra.AddOrdenCompra("OC", Row("CveSubProyecto").ToString.ToEntero, Row("Descripcion").ToString, Row("Justificacion").ToString, Row("Prioridad").ToString.ToEntero, NowADS(), Row("CveMoneda").ToString.ToEntero, CveEstatusInicialOC, ' If(Not IsDBNull(Row("FechaEstimadaEntrega")), Row("FechaEstimadaEntrega").ToString, "-1"), If(Row("LugarEntrega").ToString.Trim = "", "-1", ' Row("LugarEntrega").ToString.Trim), CveUsuario, UsuarioActual.CveEmpresa, 0, pCveProveedor:=CveProveedor, RequiereCotizacion:=ChkCotizacion.Checked, ' CveCliente:=Ddlcliente.SelectedValue.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, PrioridadObservacion:=txtobsprioridad.Text, @@ -3533,7 +3533,7 @@ Partial Class OC Dim Descripcion As String = String.Format("Importe anticipo : {0} {1} ", TxtSAImporte.Text, TxtSAObservaciones.Text) Dim objOI As New ClsOIEventos - If objOI.AddEventoTarea(String.Format("Solicitud de anticipo (Orden de Compra {0})", lblFolio.Text), Descripcion, 1, UsuarioActual.CveUsuario, DdlSAUsuario.SelectedValue.ToString.ToEntero, DateTime.Now, DateTime.Now.AddMinutes(15), + If objOI.AddEventoTarea(String.Format("Solicitud de anticipo (Orden de Compra {0})", lblFolio.Text), Descripcion, 1, UsuarioActual.CveUsuario, DdlSAUsuario.SelectedValue.ToString.ToEntero, NowADS(), NowADS().AddMinutes(15), -1, 1, -1, "-1", -1, -1, -1, -1, -1, CveOrdenCompra.ToEntero, -1, -1, UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa) Then Alert("La Solicitud ha sido enviada", TipoMensaje.MsgInformacion) 'GeneraPDF(CveOrdenCompra) @@ -4131,10 +4131,10 @@ Partial Class OC 'verifico los permisos según el estatus 'Const Sitio As String = "rm:90/" - Dim StrSupervisa As String = "" '= String.Format("http://{0}/OC/RegOp.aspx?p={1}", Sitio, Encripta(String.Format("Op=SUPERVISAR&Oc={0}&CveUsuario={1}&Fecha={2}", CveOrdenCompra, CveUsuario, Now))) - Dim StrAutoriza As String = "" '= String.Format("http://{0}/OC/RegOp.aspx?p={1}", Sitio, Encripta(String.Format("Op=AUTORIZAR&Oc={0}&CveUsuario={1}&Fecha={2}", CveOrdenCompra, CveUsuario, Now))) - Dim StrCancela As String = "" ' = String.Format("http://{0}/OC/RegOp.aspx?p={1}", Sitio, Encripta(String.Format("Op=CANCELAR&Oc={0}&CveUsuario={1}&Fecha={2}", CveOrdenCompra, UsuarioActual.CveUsuario, Now))) - Dim StrReqCotiza As String = "" '= String.Format("http://{0}/OC/RegOp.aspx?p={1}", Sitio, Encripta(String.Format("Op=REQCONTIZACION&Oc={0}&CveUsuario={1}&Fecha={2}", CveOrdenCompra, CveUsuario, Now))) + Dim StrSupervisa As String = "" '= String.Format("http://{0}/OC/RegOp.aspx?p={1}", Sitio, Encripta(String.Format("Op=SUPERVISAR&Oc={0}&CveUsuario={1}&Fecha={2}", CveOrdenCompra, CveUsuario, NowADS()))) + Dim StrAutoriza As String = "" '= String.Format("http://{0}/OC/RegOp.aspx?p={1}", Sitio, Encripta(String.Format("Op=AUTORIZAR&Oc={0}&CveUsuario={1}&Fecha={2}", CveOrdenCompra, CveUsuario, NowADS()))) + Dim StrCancela As String = "" ' = String.Format("http://{0}/OC/RegOp.aspx?p={1}", Sitio, Encripta(String.Format("Op=CANCELAR&Oc={0}&CveUsuario={1}&Fecha={2}", CveOrdenCompra, UsuarioActual.CveUsuario, NowADS()))) + Dim StrReqCotiza As String = "" '= String.Format("http://{0}/OC/RegOp.aspx?p={1}", Sitio, Encripta(String.Format("Op=REQCONTIZACION&Oc={0}&CveUsuario={1}&Fecha={2}", CveOrdenCompra, CveUsuario, NowADS()))) 'si se acaba de solicitar y se necesita supervisar If pCveEstatus = 1 Then strOpciones.AppendFormat(" Supervisar ", StrSupervisa) @@ -4535,7 +4535,7 @@ Partial Class OC strBody.AppendFormat(" Empresa:{0} ", ObjCotizacion.Empresa) strBody.Append(" ") strBody.Append(" ") - strBody.AppendFormat(" Fecha Eliminación:{0}   ", Now.ToShortDateString) + strBody.AppendFormat(" Fecha Eliminación:{0}   ", NowADS().ToShortDateString) strBody.Append(" ") strBody.Append(" ") strBody.Append(" ") @@ -4622,7 +4622,7 @@ Partial Class OC strBody.Append(" ") strBody.Append(" Fecha") strBody.Append(" ") - strBody.Append(DateTime.Now.ToString("dd/MM/yy")) + strBody.Append(NowADS().ToString("dd/MM/yy")) strBody.Append(" ") strBody.Append(" ") strBody.Append(" De") diff --git a/OC/PopUpBuscarReq.aspx b/OC/PopUpBuscarReq.aspx index 0944834f3..b6ecbfc70 100644 --- a/OC/PopUpBuscarReq.aspx +++ b/OC/PopUpBuscarReq.aspx @@ -25,6 +25,16 @@ + + +
    +
    + Proveedor: +
    +
    +
    +
    + @@ -109,8 +119,6 @@ -
    - @@ -153,14 +161,14 @@
    - + - + @@ -203,8 +211,8 @@ window.close(); } - function Ir3(CveOC, Folio, CveEstatusSiguiente) { - window.opener.VinculaOC(CveOC, Folio, CveEstatusSiguiente); + function Ir3(CveOC, Folio, CveEstatusSiguiente, CveProveedor) { + window.opener.VinculaOC(CveOC, Folio, CveEstatusSiguiente, CveProveedor); window.close(); parent.$('#ajax').modal('hide'); } diff --git a/OC/PopUpBuscarReq.aspx.vb b/OC/PopUpBuscarReq.aspx.vb index 60be97147..0f9514e06 100644 --- a/OC/PopUpBuscarReq.aspx.vb +++ b/OC/PopUpBuscarReq.aspx.vb @@ -17,6 +17,12 @@ Partial Class OC_PopUpBuscarReq Return ViewState("CveProveedor").ToString End Get End Property + + Private ReadOnly Property CveProveedorMultiple As String + Get + Return ViewState("CveProveedorMultiple").ToString + End Get + End Property Private ReadOnly Property Ruta As String Get Return UsuarioActual.Empresa.Ruta @@ -27,7 +33,7 @@ Partial Class OC_PopUpBuscarReq Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load If Not IsPostBack Then CType(Me.Master, BaseMasterPage).EsPopup = True - Dim UsaParametros = False + Dim UsaParametros As Boolean = False ViewState("VinculacionOC") = "" ViewState("CveProveedor") = "" @@ -35,10 +41,29 @@ Partial Class OC_PopUpBuscarReq GV.Width = 750 If Request("V") IsNot Nothing AndAlso Request("V").ToString <> "" Then If Request("P") IsNot Nothing AndAlso Request("P").ToString <> "" Then + ViewState("VinculacionOC") = Request("V") + ViewState("CveProveedor") = Request("P") + UPFiltros.Visible = False + + Dim NombreProv As String = GlobalDTCompProveedores(UsuarioActual.CveEmpresa, ViewState("CveProveedor").ToString.ToEntero).FiltroPrimeroValor("RazonSocial") + LbTitulo.Text = String.Format("Órdenes de Compra - {0}", NombreProv) + + If UsuarioActual.Empresa.Funcionalidad(267) = "1" Then + UPProveedorCompra.Visible = True + 'DdlProveedorMultiple.setEsWebService(True) + 'DdlProveedorMultiple.Attributes.Add("data-metodo", "getproveedores") ' proveedores tipo productores // proveedores + DdlProveedorMultiple.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa).FiltraParametros("ProveedorClasificacion like '%PRODUCTOR%'") + DdlProveedorMultiple.DataBind() + DdlProveedorMultiple.Items.Insert(0, New ListItem("-", "-1")) + End If + CargarVinculacionCompras() DivDatos.Attributes.Add("style", "overflow-y: auto; width: 950px; height: 700px;") - GV.Width = 950 - GV.Columns(4).Visible = False + GV.Width = 930 + GV.Columns(1).Visible = False ' folio req + GV.Columns(2).Visible = False ' tipo 'oc/req + GV.Columns(5).Visible = False ' nombre proveedor + GV.Columns(9).Visible = False ' descarga pdf If UsuarioActual.Empresa.MetodoOC <> 2 Then BtnVincularOC.Visible = True End If @@ -67,25 +92,10 @@ Partial Class OC_PopUpBuscarReq #Region " CARGA URL PARAMETROS " Private Sub CargaURLParametros() - txtFechaI.Text = Now.FirstDayOfMonth.AddMonths(-3).ToShortDateString + txtFechaI.Text = NowADS().FirstDayOfMonth.AddMonths(-3).ToShortDateString CargaEstatus() CargarCentrosDeCosto(DdlProyectos, DdlSubProyectos, LblProyecto, LtSubProyecto) - 'If UsuarioActual.Empresa.GralSoloProyecto Then - ' TdProyecto.Visible = False - ' TdProyecto2.Visible = False - ' LtSubProyecto.Text = "Proyecto:" - 'Else - ' 'DdlProyectos.DataSource = DtEstatusUsuarios.FiltraParametros("", "", {"CveProyecto", "Proyecto"}) 'GlobalDTProyectos(UsuarioActual.CveEmpresa, 1) - ' 'DdlProyectos.DataSource = If(UsuarioActual.Empresa.Funcionalidad(102) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(110), - ' ' GlobalDTProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1), GlobalDTProyectos(UsuarioActual.CveEmpresa, -1)) - ' DdlProyectos.DataSource = GlobalDTProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1) - ' DdlProyectos.DataBind() - ' DdlProyectos.Items.Insert(0, New ListItem("Todos", "-1")) - 'End If - - 'DdlProveedor.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa) - 'DdlProveedor.DataBind() 'DdlProveedor.Items.Insert(0, New ListItem("Todos", "-1")) DdlProveedor.setEsWebService(True) @@ -127,28 +137,18 @@ Partial Class OC_PopUpBuscarReq #Region " CARGA DATOS " Protected Sub CargarVinculacionCompras() ' CUANDO VIENE DESDE COMPRAS - ViewState("VinculacionOC") = Request("V") - ViewState("CveProveedor") = Request("P") - UPFiltros.Visible = False - - Dim NombreProv As String = GlobalDTCompProveedores(UsuarioActual.CveEmpresa, ViewState("CveProveedor").ToString.ToEntero).FiltroPrimeroValor("RazonSocial") - LbTitulo.Text = String.Format("Órdenes de Compra - {0}", NombreProv) - - 'Dim ObjPro As New ClsCompProveedores - 'ObjPro.GetProveedores(ClsCompProveedores.TipoConsulta.ParaUsoEnEmpresa, ViewState("CveProveedor").ToString.ToEntero, "-1", "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) - 'If ObjPro.DtResultados.Rows.Count > 0 Then - ' LbTitulo.Text = String.Format("Órdenes de Compra - {0}", ObjPro.DtResultados.Rows(0)("RazonSocial").ToString) - 'End If - 'ObjPro.Dispose() - + Dim tCveProveedor As Integer = ViewState("CveProveedor").ToString.ToEntero + If DdlProveedorMultiple.SelectedValue.ToEntero > 0 Then + ViewState("CveProveedorMultiple") = DdlProveedorMultiple.SelectedValue + ViewState("CveProveedor") = DdlProveedorMultiple.SelectedValue + tCveProveedor = DdlProveedorMultiple.SelectedValue.ToEntero + End If 'Cargar Datos Dim ObjOC As New ClsOC - 'ObjOC.GetOC(-1, UsuarioActual.CveEmpresa) - ObjOC.GetOrdenesCompraRep("OC", -1, -1, -1, -1, MinFecha, MaxFecha, -1, ViewState("CveProveedor").ToString.ToEntero, -1, -1, -1, UsuarioActual.CveEmpresa, -1) - Dim DtOC = ObjOC.DtResultados.FiltraParametros("TipoTermino = 3") ' tipotermino, esattus inicial + ObjOC.GetOrdenesCompraRep("OC", -1, -1, -1, -1, MinFecha, MaxFecha, -1, tCveProveedor, -1, -1, -1, UsuarioActual.CveEmpresa, -1) + Dim DtOC As Data.DataTable = ObjOC.DtResultados.FiltraParametros("TipoTermino = 3") ' tipotermino, esattus inicial ObjOC.Dispose() - If DtOC.Rows.Count > 0 Then ' tipotermino, esattus inicial BtnVincularOC.Visible = True End If @@ -157,14 +157,13 @@ Partial Class OC_PopUpBuscarReq GV.DataSource = DtOC.FiltraParametros("CveOrdenCompraDisponible > 0") GV.DataBind() - LtlTotalRegistros.Text = GV.Rows.Count.ToString - LblTotalRegistros.Text = "Número de registros: " + LblTotalRegistros.Text = "Número de registros: " & GV.Rows.Count.ToString UPDatos.Update() End Sub Protected Sub BtnBuscar_Click(sender As Object, e As EventArgs) - Dim CveProyecto = -1 - Dim CveSubProyecto = -1 + Dim CveProyecto As Integer = -1 + Dim CveSubProyecto As Integer = -1 If LblProyecto.Visible Then CveProyecto = DdlProyectos.SelectedValue.ToEntero @@ -184,7 +183,7 @@ Partial Class OC_PopUpBuscarReq ObjOC.GetOrdenesCompraRep(DdlTipo.SelectedValue, CveProyecto, CveSubProyecto, -1, DdlEstatus.SelectedValue.ToEntero, FI, MaxFecha, -1, CveProveedor, If(TxtFolio.Text.ToEntero <= 0, -1, TxtFolio.Text.ToEntero), -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, Guia:=guia, SoloSubProyectosConPermiso:=If(UsuarioActual.Empresa.Funcionalidad(530) = "1", True, False), TopSelect:=100) - Dim DtOC = ObjOC.DtResultados ' tipotermino, esattus inicial + Dim DtOC As Data.DataTable = ObjOC.DtResultados ' tipotermino, esattus inicial ObjOC.Dispose() GV.DataSource = DtOC @@ -208,7 +207,7 @@ Partial Class OC_PopUpBuscarReq e.Row.FCHyperLink("HLDescripcion").Visible = True e.Row.FCLabel("LbDescripcion").Visible = False - Dim Link = String.Format("javascript:Ir3('{0}','{1}','{2}');", e.Row.DBCampo("CveOrdenCompra"), e.Row.DBCampo("Folio"), e.Row.DBCampo("CveEstatusSiguiente")) + Dim Link As String = String.Format("javascript:Ir3('{0}','{1}','{2}');", e.Row.DBCampo("CveOrdenCompra"), e.Row.DBCampo("Folio"), e.Row.DBCampo("CveEstatusSiguiente"), e.Row.DBCampo("CveProveedor")) e.Row.FCHyperLink("HLFolio").NavigateUrl = Link e.Row.FCHyperLink("HLDescripcion").NavigateUrl = Link @@ -219,7 +218,7 @@ Partial Class OC_PopUpBuscarReq e.Row.FCHyperLink("HLDescripcion").Visible = True e.Row.FCLabel("LbDescripcion").Visible = False - Dim Link = String.Format("javascript:Ir4('{0}');", e.Row.DBCampo("CveOrdenCompra")) + Dim Link As String = String.Format("javascript:Ir4('{0}');", e.Row.DBCampo("CveOrdenCompra")) e.Row.FCHyperLink("HLFolio").NavigateUrl = Link e.Row.FCHyperLink("HLDescripcion").NavigateUrl = Link @@ -231,7 +230,7 @@ Partial Class OC_PopUpBuscarReq e.Row.FCHyperLink("HLDescripcion").Visible = True e.Row.FCLabel("LbDescripcion").Visible = False - Dim Link = String.Format("javascript:Ir(""{0}"");", e.Row.DBCampo("CveOrdenCompra")) + Dim Link As String = String.Format("javascript:Ir(""{0}"");", e.Row.DBCampo("CveOrdenCompra")) e.Row.FCHyperLink("HLFolio").NavigateUrl = Link e.Row.FCHyperLink("HLDescripcion").NavigateUrl = Link @@ -245,14 +244,11 @@ Partial Class OC_PopUpBuscarReq If e.Row.DataKey("FolioREQ").ToString.Trim.Length > 0 Then Dim LbFolio As Label = e.Row.FCLabel("LbFolio") - LbFolio.Attributes.Add("data-toggle", "tooltip") LbFolio.Attributes.Add("data-placement", "top") LbFolio.Attributes.Add("title", "REQ: " & e.Row.DataKey("FolioREQ").ToString) End If - - If ViewState("CveProveedor").ToString <> "" And UsuarioActual.CveEmpresa.Contiene(72) Then GV.Columns(2).Visible = False End If @@ -274,6 +270,12 @@ Partial Class OC_PopUpBuscarReq #End Region + Protected Sub DdlProveedoresmultiple_selectedindexchange(sender As Object, e As EventArgs) + + CargarVinculacionCompras() + + End Sub + #Region " VINCULA CON COMPRAS " Protected Sub BtnVincularOC_Click(sender As Object, e As EventArgs) Dim CveOC As String = "" @@ -286,6 +288,15 @@ Partial Class OC_PopUpBuscarReq CveOC &= String.Format(", {0}", GV.Rows(i).DataKey("CveOrdenCompra").ToString) Folio &= String.Format(", {0}", GV.Rows(i).DataKey("Folio").ToString) CveEstatus &= String.Format(", {0}", GV.Rows(i).DataKey("CveEstatusSiguiente").ToString) + + 'código para cambiar de proveedor a la oc, para caso 172 + 'If UsuarioActual.Empresa.Funcionalidad(267) = "1" AndAlso CveProveedorMultiple.ToEntero <> 0 Then + ' Dim OC As New ClsOC + ' If OC.UpdateProveedorOrdenCompra(CveProveedor.ToEntero, GV.Rows(i).DataKey("CveOrdenCompra").ToString.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then + + ' End If + ' OC.Dispose() + 'End If Else CveOC = GV.Rows(i).DataKey("CveOrdenCompra").ToString Folio = GV.Rows(i).DataKey("Folio").ToString @@ -295,7 +306,7 @@ Partial Class OC_PopUpBuscarReq Next If CveOC <> "" AndAlso CveOC.Length > 0 Then - RegistraScript(String.Format("javascript: Ir3('{0}','{1}','{2}');", CveOC, Folio, CveEstatus)) + RegistraScript(String.Format("javascript: Ir3('{0}','{1}','{2}','{3}');", CveOC, Folio, CveEstatus, CveProveedor)) Else Alert("No seleccionó ninguna Orden de Compra, Por lo cual no se puede vincular.", TipoMensaje.MsgAdvertencia) End If diff --git a/OC/RepCotizaciones.aspx.vb b/OC/RepCotizaciones.aspx.vb index 08bda8aa6..390f592a4 100644 --- a/OC/RepCotizaciones.aspx.vb +++ b/OC/RepCotizaciones.aspx.vb @@ -255,7 +255,7 @@ Partial Class RepCotizaciones If CveCotizacion <> Row("CveCotizacion").ToString.ToEntero Then CveCotizacion = Row("CveCotizacion").ToString.ToEntero - If objCotizacion.AddOrdenCompra("OC", Row("CveSubProyecto").ToString.ToEntero, Row("Descripcion").ToString, Row("Justificacion").ToString, Prioridad, Now, CveMoneda, CveEstatusInicialOC, Row("FechaEstimadaEntrega").ToString, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Row("CveProveedor").ToString.ToEntero, -1) Then + If objCotizacion.AddOrdenCompra("OC", Row("CveSubProyecto").ToString.ToEntero, Row("Descripcion").ToString, Row("Justificacion").ToString, Prioridad, NowADS(), CveMoneda, CveEstatusInicialOC, Row("FechaEstimadaEntrega").ToString, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Row("CveProveedor").ToString.ToEntero, -1) Then CveOrdenCompra = objCotizacion.CveOrdenCompra 'Ingresar los detalles diff --git a/OC/RepCotizacionesDetalle.aspx.vb b/OC/RepCotizacionesDetalle.aspx.vb index 12abc9f9f..29e725848 100644 --- a/OC/RepCotizacionesDetalle.aspx.vb +++ b/OC/RepCotizacionesDetalle.aspx.vb @@ -75,7 +75,7 @@ Partial Class PopOCCotizacionesDetalle EsNuevo = True CveCotizacion = -1 CargaOCDetalle(CveOrdenCompra) - TxtFecha.Text = Now.ToShortDateString + TxtFecha.Text = NowADS().ToShortDateString Else EsNuevo = False GvDC.DataKeyNames = {"CveOrdenCompra", "CvePS", "Cantidad", "CveUnidadMedida", "CveCotizacionDetalle", "CveOrdenCompraDetalle"} @@ -310,7 +310,7 @@ Partial Class PopOCCotizacionesDetalle If e.Row.RowType = DataControlRowType.DataRow Then e.Row.FCTextBox("TxtPU").Attributes.Add("onchange", String.Format("$get('{0}').value = FormatNumber(parseFloat(this.value) * parseFloat($get('{1}').value), 2, true, true, true);", e.Row.FCTextBox("TxtImporte").ClientID, e.Row.FCTextBox("TxtCant").ClientID)) - e.Row.FCCalendarExtender("CEFechaEntrega").StartDate = Date.Now + e.Row.FCCalendarExtender("CEFechaEntrega").StartDate = NowADS() ' e.Row.FCTextBox("TxtPU").Attributes.Add("onchange", String.Format("$get('{0}').value = FormatNumber(parseFloat(this.value) * parseFloat($get('{1}').value), 2, true, true, true);", e.Row.FCTextBox("TxtImporte").ClientID, e.Row.FCTextBox("TxtCant").ClientID)) 'Page.ClientScript.RegisterExpandoAttribute(e.Row.FCCustomValidator("CVFechaEntrega").ClientID, "txtCantidadSurtir", e.Row.FCTextBox("txtCantidadSurtir").ClientID, False) diff --git a/OC/RepImprimir.aspx.vb.exclude b/OC/RepImprimir.aspx.vb.exclude index 8a5433977..489e77e83 100644 --- a/OC/RepImprimir.aspx.vb.exclude +++ b/OC/RepImprimir.aspx.vb.exclude @@ -39,7 +39,7 @@ Partial Class RepImprimir Dim paramList As New List(Of ReportParameter) With paramList ' .Add(New ReportParameter("CveOrdenCompra", CveOC.ToString, True)) - ' .Add(New ReportParameter("FechaSolicitud", Now.ToShortDateString, True)) + ' .Add(New ReportParameter("FechaSolicitud", NowADS().ToShortDateString, True)) .Add(New ReportParameter("pSolicita", Solicita, True)) .Add(New ReportParameter("pSupervisa", Supervisa, True)) .Add(New ReportParameter("pAutoriza", Autoriza, True)) diff --git a/OC/RepImprimirC.aspx.vb.exclude b/OC/RepImprimirC.aspx.vb.exclude index 394082c50..52049c8a5 100644 --- a/OC/RepImprimirC.aspx.vb.exclude +++ b/OC/RepImprimirC.aspx.vb.exclude @@ -58,7 +58,7 @@ Partial Class RepImprimirC '.Add(New ReportParameter("CveOrdenCompra", CveOC.ToString, True)) - '.Add(New ReportParameter("FechaSolicitud", Now.ToShortDateString, True)) + '.Add(New ReportParameter("FechaSolicitud", NowADS().ToShortDateString, True)) '.Add(New ReportParameter("pSolicita", Solicita, True)) '.Add(New ReportParameter("pSupervisa", Supervisa, True)) '.Add(New ReportParameter("pAutoriza", Autoriza, True)) diff --git a/OC/RepOC.aspx.vb b/OC/RepOC.aspx.vb index e0ddce034..359058272 100644 --- a/OC/RepOC.aspx.vb +++ b/OC/RepOC.aspx.vb @@ -35,8 +35,8 @@ Partial Class RepOC Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load If Not Page.IsPostBack Then - txtFechaI.Text = Now.AddMonths(-3).ToShortDateString - txtFechaF.Text = Now.ToShortDateString + txtFechaI.Text = NowADS().AddMonths(-3).ToShortDateString + txtFechaF.Text = NowADS().ToShortDateString DdlTipo.SelectedValue = IfNull(Request("Tipo"), "-1").ToString @@ -78,8 +78,8 @@ Partial Class RepOC CargaPendientes() - txtFechaISemanal.Text = Now.FirstDayOfMonth.ToShortDateString - txtFechaFSemanal.Text = Now.ToShortDateString + txtFechaISemanal.Text = NowADS().FirstDayOfMonth.ToShortDateString + txtFechaFSemanal.Text = NowADS().ToShortDateString @@ -513,7 +513,7 @@ Partial Class RepOC #Region " IMPRESION " Protected Sub LbPorAtender_Click(sender As Object, e As System.EventArgs) Handles LbPorAtender.Click - 'GvPorAtender.ExportToExcel("OrdenesCompraPorAtender" & Now.ToShortDateString) + 'GvPorAtender.ExportToExcel("OrdenesCompraPorAtender" & NowADS().ToShortDateString) ImprimePorAtender("Excel") End Sub Protected Sub LbPorAtenderPDF_Click(sender As Object, e As System.EventArgs) Handles LbPorAtenderPDF.Click @@ -564,7 +564,7 @@ Partial Class RepOC End Sub Protected Sub LbPendientes_Click(sender As Object, e As System.EventArgs) Handles LbPendientes.Click - 'GvPendientes.ExportToExcel("OrdenesCompraPendientes" & Now.ToShortDateString) + 'GvPendientes.ExportToExcel("OrdenesCompraPendientes" & NowADS().ToShortDateString) ImprimirPendientes("EXCEL") End Sub Protected Sub LbPendientesPDF_Click(sender As Object, e As System.EventArgs) Handles LbPendientesPDF.Click @@ -578,12 +578,12 @@ Partial Class RepOC params.Add(New ReportParameter("FechaInicio", If(txtFechaI.Text = "", "-1", txtFechaI.Text))) params.Add(New ReportParameter("FechaFin", If(txtFechaF.Text = "", "-1", txtFechaF.Text))) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToShortDateString)) params.Add(New ReportParameter("SubProyecto", LblSubProyecto.Text)) ImprimirPDF(String.Format(UsuarioActual.Empresa.Ruta & "/Formatos/RepRequisicionesOC.rdlc", UsuarioActual.Empresa.Ruta), DtPendiente, params, Formato:=format) Else - GvConsultar.ExportToExcel("OrdenesCompra" & Now.ToShortDateString) + GvConsultar.ExportToExcel("OrdenesCompra" & NowADS().ToShortDateString) End If End Sub Protected Sub LbConsultar_Click(sender As Object, e As System.EventArgs) Handles LbConsultar.Click @@ -593,12 +593,12 @@ Partial Class RepOC params.Add(New ReportParameter("FechaInicio", If(txtFechaI.Text = "", "-1", txtFechaI.Text))) params.Add(New ReportParameter("FechaFin", If(txtFechaF.Text = "", "-1", txtFechaF.Text))) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToShortDateString)) params.Add(New ReportParameter("SubProyecto", LblSubProyecto.Text)) ImprimirPDF(String.Format(UsuarioActual.Empresa.Ruta & "/Formatos/RepRequisicionesOC.rdlc", UsuarioActual.Empresa.Ruta), DtOC, params, Formato:="EXCEL") Else - GvConsultar.ExportToExcel("OrdenesCompra" & Now.ToShortDateString) + GvConsultar.ExportToExcel("OrdenesCompra" & NowADS().ToShortDateString) End If End Sub Private Sub Tab_ActiveTabChanged(sender As Object, e As EventArgs) Handles Tab.ActiveTabChanged diff --git a/OC/RepOCAnticiposPtes.aspx.cs b/OC/RepOCAnticiposPtes.aspx.cs index 2be1ed724..ff65fb881 100644 --- a/OC/RepOCAnticiposPtes.aspx.cs +++ b/OC/RepOCAnticiposPtes.aspx.cs @@ -24,8 +24,8 @@ public partial class OC_RepOCAnticiposPtes : ClsPaginas DdlProveedores.DataBind(); - txtFechaI.Text = DateTime.Now.FirstDayOfMonth().AddMonths(-1).ToShortDateString(); - txtFechaF.Text = DateTime.Now.ToShortDateString(); + txtFechaI.Text = NowADS().FirstDayOfMonth().AddMonths(-1).ToShortDateString(); + txtFechaF.Text = NowADS().ToShortDateString(); } protected void BtnConsultar_Click(object sender, EventArgs e) diff --git a/OC/RepOCGuias.aspx.vb b/OC/RepOCGuias.aspx.vb index 4e89ddf94..942d8e6c2 100644 --- a/OC/RepOCGuias.aspx.vb +++ b/OC/RepOCGuias.aspx.vb @@ -34,8 +34,8 @@ Partial Class OC_RepOCGuias #Region " INICIALIZA VALORES " Private Sub InicializaValores() - txtFechaI.Text = Now.AddDays(-10).ToShortDateString - txtFechaF.Text = Now.ToShortDateString + txtFechaI.Text = NowADS().AddDays(-10).ToShortDateString + txtFechaF.Text = NowADS().ToShortDateString Select Case UsuarioActual.Empresa.Tipo_CentroCosto Case 1 @@ -139,10 +139,10 @@ Partial Class OC_RepOCGuias 'params.Add(New ReportParameter("FechaInicio", FechaI)) 'params.Add(New ReportParameter("FechaFin", FechaF)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToShortDateString)) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) - ImprimirPDF("Empresas\Grales\Formatos\RepOCGuias.rdlc", DTDatos, params, $"RepOCGuias_{Now.ToString("yyyyMMddmmss")}", Formato:=Formato) + ImprimirPDF("Empresas\Grales\Formatos\RepOCGuias.rdlc", DTDatos, params, $"RepOCGuias_{NowADS().ToString("yyyyMMddmmss")}", Formato:=Formato) End Sub #End Region diff --git a/OC/RepOCxSurtir.aspx.vb b/OC/RepOCxSurtir.aspx.vb index aaf8c50a8..468e54d2a 100644 --- a/OC/RepOCxSurtir.aspx.vb +++ b/OC/RepOCxSurtir.aspx.vb @@ -15,8 +15,8 @@ Partial Class OC_RepOCxSurtir #Region " INICIALIZA VALORES " Private Sub InicializaValores() - TxtFechaI.Text = Now.FirstDayOfMonth.ToShortDateString - TxtFechaF.Text = Now.ToShortDateString + TxtFechaI.Text = NowADS().FirstDayOfMonth.ToShortDateString + TxtFechaF.Text = NowADS().ToShortDateString DdlProveedor.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa) DdlProveedor.DataBind() diff --git a/OC/RepReqXOC.aspx.vb b/OC/RepReqXOC.aspx.vb index 3f76d8e00..f8dbdf34c 100644 --- a/OC/RepReqXOC.aspx.vb +++ b/OC/RepReqXOC.aspx.vb @@ -24,8 +24,8 @@ Partial Class RepReqXOC Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load If Not Page.IsPostBack Then - txtFechaI.Text = Now.AddDays(-10).ToShortDateString - txtFechaF.Text = Now.ToShortDateString + txtFechaI.Text = NowADS().AddDays(-10).ToShortDateString + txtFechaF.Text = NowADS().ToShortDateString CargaProveedores() @@ -138,10 +138,10 @@ Partial Class RepReqXOC 'params.Add(New ReportParameter("FechaInicio", FechaI)) 'params.Add(New ReportParameter("FechaFin", FechaF)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) - ImprimirPDF("Empresas\Grales\Formatos\RepReqXOC.rdlc", DTDatos, params, $"RepReqXOC_{Now.ToString("yyyyMMddmmss")}", Formato:=Formato) + ImprimirPDF("Empresas\Grales\Formatos\RepReqXOC.rdlc", DTDatos, params, $"RepReqXOC_{NowADS().ToString("yyyyMMddmmss")}", Formato:=Formato) End Sub diff --git a/OC/RepRequisiciones.aspx.vb b/OC/RepRequisiciones.aspx.vb index 7db46c460..a7215683e 100644 --- a/OC/RepRequisiciones.aspx.vb +++ b/OC/RepRequisiciones.aspx.vb @@ -32,7 +32,7 @@ Partial Class OC_RepRequisiciones DtUsuarioProyectos = objEstatusUsuarios.DtResultados End If objEstatusUsuarios.Dispose() - txtFechaI.Text = Now.AddMonths(-1).FirstDayOfMonth.ToShortDateString + txtFechaI.Text = NowADS().AddMonths(-1).FirstDayOfMonth.ToShortDateString DdlProyecto.DataSource = DtUsuarioProyectos.FiltraParametros("", "", {"CveProyecto", "Proyecto"}) ' GlobalDTProyectos(UsuarioActual.Empresa.CveEmpresa) DdlProyecto.DataBind() @@ -145,7 +145,7 @@ Partial Class OC_RepRequisiciones End Sub 'Protected Sub ImgExcel_Click(sender As Object, e As System.EventArgs) Handles ImgExcel.Click - ' GVDatos.ExportToExcel("ReporteRequisiciones" & Now.ToShortDateString) + ' GVDatos.ExportToExcel("ReporteRequisiciones" & NowADS().ToShortDateString) 'End Sub @@ -161,7 +161,7 @@ Partial Class OC_RepRequisiciones 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("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("Proyecto", DdlProyecto.SelectedItem.Text)) params.Add(New ReportParameter("SubProyecto", DdlSubProyecto.SelectedItem.Text)) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) diff --git a/OC/RepSolicitudesAnticipo.aspx.cs b/OC/RepSolicitudesAnticipo.aspx.cs index ec535ef27..e294c04ea 100644 --- a/OC/RepSolicitudesAnticipo.aspx.cs +++ b/OC/RepSolicitudesAnticipo.aspx.cs @@ -74,8 +74,8 @@ public partial class OC_RepSolicitudesAnticipo : ClsPaginas protected void InicializaDatos() { - txtFechaI.Text = DateTime.Now.AddMonths(-1).FirstDayOfMonth().ToShortDateString(); - txtFechaF.Text = DateTime.Now.ToShortDateString(); + txtFechaI.Text = NowADS().AddMonths(-1).FirstDayOfMonth().ToShortDateString(); + txtFechaF.Text = NowADS().ToShortDateString(); CveProveedor = -1; CargaSubProyectos(); CargaProveedor(); @@ -120,7 +120,7 @@ public partial class OC_RepSolicitudesAnticipo : ClsPaginas CveProveedor = DdlProveedores.SelectedValue.ToEntero(); FechaI = (txtFechaI.Text.ToString() != "" ? txtFechaI.Text.ToDateTime() : MinFecha); - FechaF = (txtFechaF.Text.ToString() != "" ? txtFechaF.Text.ToDateTime() : DateTime.Now); + FechaF = (txtFechaF.Text.ToString() != "" ? txtFechaF.Text.ToDateTime() : NowADS()); if (ObjOC.GetRepSolicitudAnticipos(UsuarioActual.CveEmpresa, CveProveedor, FechaI, FechaF, DdlEstatus.SelectedValue.ToEntero(),DdlUsuarios.SelectedValue.ToEntero(),DdlSubProyecto.SelectedValue.ToEntero())) { diff --git a/OI/Circular.aspx.vb b/OI/Circular.aspx.vb index 8a4b73290..212b71247 100644 --- a/OI/Circular.aspx.vb +++ b/OI/Circular.aspx.vb @@ -55,7 +55,7 @@ Partial Class OI_Circular params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario)) - params.Add(New ReportParameter("FechaImpresion", Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("Filtros", String.Format("Fecha Inicial: {0} Fecha Final: {1}", TxtFechaI.Text, TxtFechaF.Text))) ImprimirPDF("Empresas/Grales/Formatos/Circulares.rdlc", DtDatos, params, "Circulares", "PDF", RDSName:="DataSet1") diff --git a/OI/ConvocatoriaDetalle.aspx.cs b/OI/ConvocatoriaDetalle.aspx.cs index ad9daff9b..29e1621d9 100644 --- a/OI/ConvocatoriaDetalle.aspx.cs +++ b/OI/ConvocatoriaDetalle.aspx.cs @@ -782,7 +782,7 @@ public partial class OI_ConvocatoriaDetalle : ClsPaginas strICS.AppendLine(string.Format("DTEND:{0}", DTEND)); strICS.AppendLine(string.Format("LOCATION:{0}", Ubicacion)); strICS.AppendLine(string.Format("UID:{0}", uuid)); - strICS.AppendLine(string.Format("DTSTAMP:{0}", DateTime.Now.ToUniversalTime().ToString("yyyyMMddTHHmmssZ"))); + strICS.AppendLine(string.Format("DTSTAMP:{0}", NowADS().ToUniversalTime().ToString("yyyyMMddTHHmmssZ"))); strICS.AppendLine(string.Format("SUMMARY:{0}", Asunto)); strICS.AppendLine(string.Format("DESCRIPTION:{0}", descripcion)); strICS.AppendLine("PRIORITY:5"); diff --git a/OI/Desarrollo.aspx.vb b/OI/Desarrollo.aspx.vb index 2fdfd72b8..556315751 100644 --- a/OI/Desarrollo.aspx.vb +++ b/OI/Desarrollo.aspx.vb @@ -392,7 +392,7 @@ Partial Class OI_Desarrollo Else Dim _CveEstadoTemp As Integer = -1 If DdlUsuarioDes.SelectedValue.ToEntero <> CveUsuarioAsignado Then - FechaAsiganacion = Now + FechaAsiganacion = NowADS() _CveEstadoTemp = 2 End If diff --git a/OI/DocumentoDetalle.aspx.cs b/OI/DocumentoDetalle.aspx.cs index c24e28bda..f5a013961 100644 --- a/OI/DocumentoDetalle.aspx.cs +++ b/OI/DocumentoDetalle.aspx.cs @@ -779,7 +779,7 @@ public partial class OI_DocumentoDetalle : ClsPaginas ClsOIEventos ObjOI = new ClsOIEventos(); if (Autorizar) { - if (ObjOI.UpdateDocumentoAutorizacion(CveAutorizacion, -1, "-1", "-1", DateTime.Now)) + if (ObjOI.UpdateDocumentoAutorizacion(CveAutorizacion, -1, "-1", "-1", NowADS())) { Alert("Haz aprobado la versión actual del Documento"); } @@ -817,7 +817,7 @@ public partial class OI_DocumentoDetalle : ClsPaginas { ClsOIEventos ObjOI = new ClsOIEventos(); if (ObjOI.UpdateDocumento(this.CveDocumento, DdlSubCategoria.SelectedValue.ToEntero(), TxtDescripcion.Text, TxtObs.InnerText, TxtVersion.Text, 2, "-1", TxtResponsable.Text, - DateTime.Now, -1, -1, UsuarioActual.CveEmpresa)) + NowADS(), -1, -1, UsuarioActual.CveEmpresa)) { Alert("Documento publicado"); } @@ -852,7 +852,7 @@ public partial class OI_DocumentoDetalle : ClsPaginas { ClsOIEventos ObjOI = new ClsOIEventos(); if (ObjOI.UpdateDocumento(this.CveDocumento, DdlSubCategoria.SelectedValue.ToEntero(), TxtDescripcion.Text, TxtObs.InnerText, TxtVersion.Text, 3, "-1", TxtResponsable.Text, - DateTime.Now, -1, -1, UsuarioActual.CveEmpresa)) + NowADS(), -1, -1, UsuarioActual.CveEmpresa)) { Alert("Documento cancelado"); } diff --git a/OI/EventoDetalle.aspx.vb b/OI/EventoDetalle.aspx.vb index dd5c8cade..a3da3521b 100644 --- a/OI/EventoDetalle.aspx.vb +++ b/OI/EventoDetalle.aspx.vb @@ -369,11 +369,11 @@ Partial Class OI_EventoDetalle CveEvento = -1 CveEventoPadre = -1 ArchivoReenvio = "-1" - TxtFechaInicio.Text = DateTime.Now.ToShortDateString - TxtFechaFin.Text = DateTime.Now.ToShortDateString + TxtFechaInicio.Text = NowADS().ToShortDateString + TxtFechaFin.Text = NowADS().ToShortDateString Dim am_pm As MKB.TimePicker.TimeSelector.AmPmSpec - Dim hora As DateTime = Now.AddMinutes(15) + Dim hora As DateTime = NowADS().AddMinutes(15) If hora.ToString("tt") = "AM" Then am_pm = MKB.TimePicker.TimeSelector.AmPmSpec.AM Else am_pm = MKB.TimePicker.TimeSelector.AmPmSpec.PM TxtHoraFin.SetTime(hora.Hour, hora.Minute, am_pm) Nuevo = True @@ -841,7 +841,7 @@ Partial Class OI_EventoDetalle lbCambiaEstatus.Visible = True End If - lblFechaObs.Text = Now.ToString("dd/MM/yyyy") + lblFechaObs.Text = NowADS().ToString("dd/MM/yyyy") lblUsuarioObs.Text = UsuarioActual.Nombre If .GetEventosComentarios(CveEvento) Then DTComentarios = ObjEventos.DtResultados @@ -1121,7 +1121,7 @@ Partial Class OI_EventoDetalle UsuarioDe = UsuarioActual.Nombre Prioridad = DdlPrioridad.SelectedValue.ToEntero CveRevision = DdlRevision.SelectedValue.ToEntero - Fecha = Now.ToLongDateString + Fecha = NowADS().ToLongDateString 'CveUsuarioPara = DdlUsuarioPara.SelectedValue.ToEntero 'UsuarioPara = DdlUsuarioPara.SelectedItem.Text @@ -1533,7 +1533,7 @@ Partial Class OI_EventoDetalle ' End If 'End If - Fecha = Now.ToLongDateString + Fecha = NowADS().ToLongDateString Alert("La observación se guardó correctamente.", TipoMensaje.MsgInformacion) TxtOBs.Text = "" 'registrascript la imagen @@ -1648,7 +1648,7 @@ Partial Class OI_EventoDetalle If CorreosCCP IsNot Nothing AndAlso CorreosCCP.Count > 1 Then Dim ArrCCP As String() = CorreosCCP.ToArray If ArrCCP.Length > 0 Then - 'Dim SB As StringBuilder = GeneraContenido(CveEvento, Titulo, UsuarioActual.Nombre, UsuarioPara, UsuariosCCP, Now.ToString(), StrPrioridad, Descripcion, "", 1) + 'Dim SB As StringBuilder = GeneraContenido(CveEvento, Titulo, UsuarioActual.Nombre, UsuarioPara, UsuariosCCP, NowADS().ToString(), StrPrioridad, Descripcion, "", 1) For i As Integer = 0 To ArrCCP.Length - 1 If ArrCCP(i) <> "" Then 'Mail.Mandacorreo(UsuarioActual.Empresa, , ArrCCP(i), " " & UsuarioActual.Nombre & " le asignó una tarea a " & UsuarioPara & " en SIG.", SB.ToString) diff --git a/OI/EventoDetalle1.aspx.vb.exclude b/OI/EventoDetalle1.aspx.vb.exclude index 9d19d5889..463d0a631 100644 --- a/OI/EventoDetalle1.aspx.vb.exclude +++ b/OI/EventoDetalle1.aspx.vb.exclude @@ -260,8 +260,8 @@ Partial Class OI_EventoDetalle1 Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load If Not IsPostBack Then CveEvento = -1 - TxtFechaInicio.Text = DateTime.Now.ToShortDateString - TxtFechaFin.Text = DateTime.Now.ToShortDateString + TxtFechaInicio.Text = NowADS().ToShortDateString + TxtFechaFin.Text = NowADS().ToShortDateString Nuevo = True CveUsuarioDe = -1 CveUsuarioPara = -1 @@ -653,7 +653,7 @@ Partial Class OI_EventoDetalle1 UsuarioDe = UsuarioActual.Nombre Prioridad = DdlPrioridad.SelectedValue.ToEntero CveRevision = DdlRevision.SelectedValue.ToEntero - Fecha = Now.ToLongDateString + Fecha = NowADS().ToLongDateString 'CveUsuarioPara = DdlUsuarioPara.SelectedValue.ToEntero 'UsuarioPara = DdlUsuarioPara.SelectedItem.Text @@ -848,7 +848,7 @@ Partial Class OI_EventoDetalle1 End If - Fecha = Now.ToLongDateString + Fecha = NowADS().ToLongDateString Alert("La observación se guardó correctamente.", TipoMensaje.MsgInformacion) TxtOBs.Text = "" 'registrascript la imagen @@ -914,7 +914,7 @@ Partial Class OI_EventoDetalle1 If CorreosCCP.Length > 1 Then Dim ArrCCP As String() = CorreosCCP.Split(";"c) If ArrCCP.Length > 0 Then - Dim SB As StringBuilder = GeneraContenido(CveEvento, Titulo, UsuarioActual.Nombre, UsuarioPara, UsuariosCCP, Now.ToString(), StrPrioridad, Descripcion, "", 1) + Dim SB As StringBuilder = GeneraContenido(CveEvento, Titulo, UsuarioActual.Nombre, UsuarioPara, UsuariosCCP, NowADS().ToString(), StrPrioridad, Descripcion, "", 1) For i As Integer = 0 To ArrCCP.Length - 1 If ArrCCP(i) <> "" Then ' Mail.Mandacorreo(UsuarioActual.Empresa,, ArrCCP(i), " " & UsuarioActual.Nombre & " le asignó una tarea a " & UsuarioPara & " en SIG.", SB.ToString) diff --git a/OI/MinutaDetalle.aspx.cs b/OI/MinutaDetalle.aspx.cs index 331241f74..f5febfad4 100644 --- a/OI/MinutaDetalle.aspx.cs +++ b/OI/MinutaDetalle.aspx.cs @@ -369,7 +369,7 @@ public partial class OI_MinutaDetalle : ClsPaginas using (ClsOIEventos oieve = new ClsOIEventos()) { oieve.IniciaTransacSQL(); - Continuar = oieve.AddEventoMinuta2(asunto, descripcion, acuerdos, cveusuarioDe, cveusuarioPara, DateTime.Now, archivoname, lMiembros, chkList, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TxtCorreoExterno.Text); + Continuar = oieve.AddEventoMinuta2(asunto, descripcion, acuerdos, cveusuarioDe, cveusuarioPara, NowADS(), archivoname, lMiembros, chkList, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TxtCorreoExterno.Text); CveEvento = oieve.CveEvento; Folio = oieve.Folio; @@ -1397,7 +1397,7 @@ public partial class OI_MinutaDetalle : ClsPaginas strICS.AppendFormat("DTEND:{0}", DTEND); strICS.AppendFormat("LOCATION:{0}", Ubicacion); strICS.AppendFormat("UID:{0}", uuid); - strICS.AppendFormat("DTSTAMP:{0}", DateTime.Now.ToUniversalTime().ToString("yyyyMMddTHHmmssZ")); + strICS.AppendFormat("DTSTAMP:{0}", NowADS().ToUniversalTime().ToString("yyyyMMddTHHmmssZ")); strICS.AppendFormat("SUMMARY:{0}", Asunto); strICS.AppendFormat("DESCRIPTION:{0}", descripcion); strICS.Append("PRIORITY:5"); diff --git a/OI/Minutas.aspx.vb b/OI/Minutas.aspx.vb index c4f6b17e8..4d442258d 100644 --- a/OI/Minutas.aspx.vb +++ b/OI/Minutas.aspx.vb @@ -325,7 +325,7 @@ Partial Class OI_Minutas Dim RutaArchivo As String = String.Format("{0}\OI\Temp\{1}", UsuarioActual.Empresa.Ruta, Session("Eventos")) If CveEvento = -1 Then - If ObjEventos.AddEventoMinuta(Asunto, Descripcion, Acuerdos, -1, -1, Now, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then + If ObjEventos.AddEventoMinuta(Asunto, Descripcion, Acuerdos, -1, -1, NowADS(), "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then ViewState("CveEvento") = ObjEventos.CveEvento For Each RowCCP As GridViewRow In GVUsuarios.Rows diff --git a/OI/PopUpAgenda.aspx.vb b/OI/PopUpAgenda.aspx.vb index 0b5f58b89..44e371eb3 100644 --- a/OI/PopUpAgenda.aspx.vb +++ b/OI/PopUpAgenda.aspx.vb @@ -266,8 +266,8 @@ Partial Class OI_PopUpAgenda CType(Me.Master, BaseMasterPage).PopupWidth = 915 CveEvento = -1 - TxtFechaInicio.Text = DateTime.Now.ToShortDateString - TxtFechaFin.Text = DateTime.Now.ToShortDateString + TxtFechaInicio.Text = NowADS().ToShortDateString + TxtFechaFin.Text = NowADS().ToShortDateString Nuevo = True CveUsuarioDe = -1 CveUsuarioPara = -1 @@ -730,7 +730,7 @@ Partial Class OI_PopUpAgenda UsuarioDe = UsuarioActual.Nombre Prioridad = DdlPrioridad.SelectedValue.ToEntero CveRevision = DdlRevision.SelectedValue.ToEntero - Fecha = Now.ToLongDateString + Fecha = NowADS().ToLongDateString Dim dru As DataRow = GlobalDTUsuarios(CveUsuarioPara).FiltroPrimero("") If dru IsNot Nothing Then CorreoPara = dru("Correo").ToString @@ -920,7 +920,7 @@ Partial Class OI_PopUpAgenda End If - Fecha = Now.ToLongDateString + Fecha = NowADS().ToLongDateString Alert("La observación se guardó correctamente.", TipoMensaje.MsgInformacion) TxtOBs.Text = "" 'registrascript la imagen @@ -982,7 +982,7 @@ Partial Class OI_PopUpAgenda 'If CorreosCCP.Length > 1 Then ' Dim ArrCCP As String() = CorreosCCP.Split(";"c) ' If ArrCCP.Length > 0 Then - ' Dim SB As StringBuilder = GeneraContenido(CveEvento, Titulo, UsuarioActual.Nombre, UsuarioPara, UsuariosCCP, Now.ToString(), StrPrioridad, Descripcion, "", 1) + ' Dim SB As StringBuilder = GeneraContenido(CveEvento, Titulo, UsuarioActual.Nombre, UsuarioPara, UsuariosCCP, NowADS().ToString(), StrPrioridad, Descripcion, "", 1) ' For i As Integer = 0 To ArrCCP.Length - 1 ' If ArrCCP(i) <> "" Then ' ' Mail.Mandacorreo(UsuarioActual.Empresa,, ArrCCP(i), " " & UsuarioActual.Nombre & " le asignó una tarea a " & UsuarioPara & " en SIG.", SB.ToString) diff --git a/OI/RepDesarrollo.aspx.vb b/OI/RepDesarrollo.aspx.vb index ed19e11a3..ad2083768 100644 --- a/OI/RepDesarrollo.aspx.vb +++ b/OI/RepDesarrollo.aspx.vb @@ -7,8 +7,8 @@ Partial Class OI_RepDesarrollo Private Sub OI_RepDesarrollo_Load(sender As Object, e As EventArgs) Handles Me.Load If Not Page.IsPostBack Then - TxtFechaFin.Text = Now.ToString("dd/MM/yyyy") - TxtFechaI.Text = Now.AddDays(-30).ToString("dd/MM/yyyy") + TxtFechaFin.Text = NowADS().ToString("dd/MM/yyyy") + TxtFechaI.Text = NowADS().AddDays(-30).ToString("dd/MM/yyyy") CargaCombos() CargaDatos() diff --git a/OI/RepMinutas.aspx.vb b/OI/RepMinutas.aspx.vb index c63326e75..21f0648fe 100644 --- a/OI/RepMinutas.aspx.vb +++ b/OI/RepMinutas.aspx.vb @@ -18,8 +18,8 @@ Partial Class OI_RepMinutas End Sub Private Sub CargaFiltros() - txtFechaI.Text = New Date(Now.Year, Now.Month, 1).ToShortDateString - txtFechaF.Text = Now.ToShortDateString + txtFechaI.Text = New Date(NowADS().Year, NowADS().Month, 1).ToShortDateString + txtFechaF.Text = NowADS().ToShortDateString End Sub Public Sub CargaDatosOIMinutas() Dim ObjProspectos As New ClsOIEventos diff --git a/OI/RepReuniones.aspx.cs b/OI/RepReuniones.aspx.cs index 416170f12..95aa77f24 100644 --- a/OI/RepReuniones.aspx.cs +++ b/OI/RepReuniones.aspx.cs @@ -29,8 +29,8 @@ public partial class OI_RepReuniones : ClsPaginas private void CargaFiltros() { - TxtFechaI.Text = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1).ToShortDateString(); - TxtFechaF.Text = DateTime.Now.ToShortDateString(); + TxtFechaI.Text = new DateTime(NowADS().Year, NowADS().Month, 1).ToShortDateString(); + TxtFechaF.Text = NowADS().ToShortDateString(); TxtCFechaInicio.Text = TxtFechaI.Text; TxtCFechaFin.Text = TxtFechaF.Text; } diff --git a/OI/RepSoporteADS.aspx.vb b/OI/RepSoporteADS.aspx.vb index 5b2b738e3..3fa1aaf16 100644 --- a/OI/RepSoporteADS.aspx.vb +++ b/OI/RepSoporteADS.aspx.vb @@ -67,8 +67,8 @@ Partial Class OI_RepSoporteADS End Sub Private Sub CargaFiltros() - txtFechaI.Text = New Date(Now.Year, Now.Month, 1).ToShortDateString - txtFechaF.Text = Now.ToShortDateString + txtFechaI.Text = New Date(NowADS().Year, NowADS().Month, 1).ToShortDateString + txtFechaF.Text = NowADS().ToShortDateString CargarEventoEstatus() CargaRevisiones() CargaUsuarios() @@ -179,21 +179,21 @@ Partial Class OI_RepSoporteADS TipoReporte = 1 CargaDatos() TipoReporte = -1 - LtActualizado.Text = String.Format("Actualizado: {0}", Now.ToString("H:mm:ss - dd MMMM")) + LtActualizado.Text = String.Format("Actualizado: {0}", NowADS().ToString("H:mm:ss - dd MMMM")) UPFiltros.Update() End Sub Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click TipoReporte = -1 CargaDatos() TipoReporte = -1 - LtActualizado.Text = String.Format("Actualizado: {0}", Now.ToString("H:mm:ss - dd MMMM")) + LtActualizado.Text = String.Format("Actualizado: {0}", NowADS().ToString("H:mm:ss - dd MMMM")) UPFiltros.Update() End Sub Protected Sub BtnEscritorio_Click(sender As Object, e As EventArgs) Handles BtnEscritorio.Click TipoReporte = 1 CargaDatos() TipoReporte = -1 - LtActualizado.Text = String.Format("Actualizado: {0}", Now.ToString("H:mm:ss - dd MMMM")) + LtActualizado.Text = String.Format("Actualizado: {0}", NowADS().ToString("H:mm:ss - dd MMMM")) UPFiltros.Update() End Sub Private Sub CargaDatos() @@ -232,7 +232,7 @@ Partial Class OI_RepSoporteADS params.Add(New ReportParameter("FechaInicio", FechaI)) params.Add(New ReportParameter("FechaFin", FechaF)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) diff --git a/OI/RepTareas.aspx.vb b/OI/RepTareas.aspx.vb index 480b77172..3db949f8b 100644 --- a/OI/RepTareas.aspx.vb +++ b/OI/RepTareas.aspx.vb @@ -70,8 +70,8 @@ Partial Class OI_RepTareas End Sub Private Sub CargaFiltros() - txtFechaI.Text = New Date(Now.Year, Now.Month, 1).ToShortDateString - txtFechaF.Text = Now.ToShortDateString + txtFechaI.Text = New Date(NowADS().Year, NowADS().Month, 1).ToShortDateString + txtFechaF.Text = NowADS().ToShortDateString CargarEventoEstatus() CargaRevisiones() End Sub @@ -303,21 +303,21 @@ Partial Class OI_RepTareas TipoReporte = 1 CargaDatos() TipoReporte = -1 - 'LtActualizado.Text = String.Format("Actualizado: {0}", Now.ToString("H:mm:ss - dd MMMM")) + 'LtActualizado.Text = String.Format("Actualizado: {0}", NowADS().ToString("H:mm:ss - dd MMMM")) UPFiltros.Update() End Sub Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click TipoReporte = -1 CargaDatos() TipoReporte = -1 - 'LtActualizado.Text = String.Format("Actualizado: {0}", Now.ToString("H:mm:ss - dd MMMM")) + 'LtActualizado.Text = String.Format("Actualizado: {0}", NowADS().ToString("H:mm:ss - dd MMMM")) UPFiltros.Update() End Sub Protected Sub BtnEscritorio_Click(sender As Object, e As EventArgs) Handles BtnEscritorio.Click TipoReporte = 1 CargaDatos() TipoReporte = -1 - 'LtActualizado.Text = String.Format("Actualizado: {0}", Now.ToString("H:mm:ss - dd MMMM")) + 'LtActualizado.Text = String.Format("Actualizado: {0}", NowADS().ToString("H:mm:ss - dd MMMM")) UPFiltros.Update() End Sub Private Sub CargaDatos() @@ -409,13 +409,13 @@ Partial Class OI_RepTareas SbFiltros.Append($" Tema: {DdlRevision.SelectedItem.Text}") If Tab.ActiveTabIndex = 0 Then 'TabPanelAsignaron - GvDatosOIEventosTareasAsignaron.ExportToExcelGembox($"ReporteTareasMeAsignaron{Now.ToString("yyyyMMddhhss")}", UsuarioActual, "Reporte Tareas Me Asignaron", DatoTituloExtra:=$"", DatosFiltros:=SbFiltros.ToString()) + GvDatosOIEventosTareasAsignaron.ExportToExcelGembox($"ReporteTareasMeAsignaron{NowADS().ToString("yyyyMMddhhss")}", UsuarioActual, "Reporte Tareas Me Asignaron", DatoTituloExtra:=$"", DatosFiltros:=SbFiltros.ToString()) ElseIf Tab.ActiveTabIndex = 1 Then 'TabPanelCCP - GvDatosOIEventosTareasCCP.ExportToExcelGembox($"ReporteTareasCPP{Now.ToString("yyyyMMddhhss")}", UsuarioActual, "Reporte Tareas CPP", DatoTituloExtra:=$"", DatosFiltros:=SbFiltros.ToString()) + GvDatosOIEventosTareasCCP.ExportToExcelGembox($"ReporteTareasCPP{NowADS().ToString("yyyyMMddhhss")}", UsuarioActual, "Reporte Tareas CPP", DatoTituloExtra:=$"", DatosFiltros:=SbFiltros.ToString()) ElseIf Tab.ActiveTabIndex = 2 Then 'TabPanelAsigne - GvDatosOIEventosTareasAsigne.ExportToExcelGembox($"ReporteTareasQueAsigne{Now.ToString("yyyyMMddhhss")}", UsuarioActual, "Reporte Tareas Asigne", DatoTituloExtra:=$"", DatosFiltros:=SbFiltros.ToString()) + GvDatosOIEventosTareasAsigne.ExportToExcelGembox($"ReporteTareasQueAsigne{NowADS().ToString("yyyyMMddhhss")}", UsuarioActual, "Reporte Tareas Asigne", DatoTituloExtra:=$"", DatosFiltros:=SbFiltros.ToString()) End If End Sub diff --git a/OI/SoporteADS.aspx.vb b/OI/SoporteADS.aspx.vb index ac36935d4..8521a99d2 100644 --- a/OI/SoporteADS.aspx.vb +++ b/OI/SoporteADS.aspx.vb @@ -567,12 +567,12 @@ Partial Class OI_SoporteADS CveEvento = -1 CveEventoPadre = -1 ArchivoReenvio = "-1" - TxtFechaInicio.Text = DateTime.Now.ToShortDateString - TxtFechaFin.Text = DateTime.Now.ToShortDateString + TxtFechaInicio.Text = NowADS().ToShortDateString + TxtFechaFin.Text = NowADS().ToShortDateString Dim am_pm As MKB.TimePicker.TimeSelector.AmPmSpec - Dim hora As DateTime = Now.AddMinutes(15) + Dim hora As DateTime = NowADS().AddMinutes(15) If hora.ToString("tt") = "AM" Then am_pm = MKB.TimePicker.TimeSelector.AmPmSpec.AM Else am_pm = MKB.TimePicker.TimeSelector.AmPmSpec.PM TxtHoraFin.SetTime(hora.Hour, hora.Minute, am_pm) Nuevo = True @@ -1019,7 +1019,7 @@ Partial Class OI_SoporteADS - lblFechaObs.Text = Now.ToString("dd/MM/yyyy") + lblFechaObs.Text = NowADS().ToString("dd/MM/yyyy") lblUsuarioObs.Text = UsuarioActual.Nombre If .GetEventosComentarios(CveEvento) Then DTComentarios = ObjEventos.DtResultados @@ -1326,7 +1326,7 @@ Partial Class OI_SoporteADS UsuarioDe = UsuarioActual.Nombre Prioridad = DdlPrioridad.SelectedValue.ToEntero CveRevision = DdlRevision.SelectedValue.ToEntero - Fecha = Now.ToLongDateString + Fecha = NowADS().ToLongDateString 'CveUsuarioPara = DdlUsuarioPara.SelectedValue.ToEntero 'UsuarioPara = DdlUsuarioPara.SelectedItem.Text @@ -1610,7 +1610,7 @@ Partial Class OI_SoporteADS ' End If 'End If - Fecha = Now.ToLongDateString + Fecha = NowADS().ToLongDateString Alert("La observación se guardó correctamente.", TipoMensaje.MsgInformacion) TxtOBs.Text = "" 'registrascript la imagen @@ -1725,7 +1725,7 @@ Partial Class OI_SoporteADS ' If CorreosCCP IsNot Nothing AndAlso CorreosCCP.Count > 1 Then ' Dim ArrCCP As String() = CorreosCCP.ToArray ' If ArrCCP.Length > 0 Then - ' 'Dim SB As StringBuilder = GeneraContenido(CveEvento, Titulo, UsuarioActual.Nombre, UsuarioPara, UsuariosCCP, Now.ToString(), StrPrioridad, Descripcion, "", 1) + ' 'Dim SB As StringBuilder = GeneraContenido(CveEvento, Titulo, UsuarioActual.Nombre, UsuarioPara, UsuariosCCP, NowADS().ToString(), StrPrioridad, Descripcion, "", 1) ' For i As Integer = 0 To ArrCCP.Length - 1 ' If ArrCCP(i) <> "" Then ' 'Mail.Mandacorreo(UsuarioActual.Empresa, , ArrCCP(i), " " & UsuarioActual.Nombre & " le asignó una tarea a " & UsuarioPara & " en SIG.", SB.ToString) diff --git a/OI/SubidasADS.aspx b/OI/SubidasADS.aspx index 7f15ce8d9..c20d3a659 100644 --- a/OI/SubidasADS.aspx +++ b/OI/SubidasADS.aspx @@ -243,7 +243,7 @@ } else { CopiaExitosa = true; - //console.log("The text is now on the clipboard"); + //console.log("The text is NowADS() on the clipboard"); correctoCopiado(); } } catch (err) { @@ -259,7 +259,7 @@ errorCopiado(); } else { CopiaExitosa = true; - console.log("The text is now on the clipboard"); + console.log("The text is NowADS() on the clipboard"); correctoCopiado(); } } catch (err) { diff --git a/OI/SubidasADS.aspx.vb b/OI/SubidasADS.aspx.vb index 4dc87ec3f..8772b8e8f 100644 --- a/OI/SubidasADS.aspx.vb +++ b/OI/SubidasADS.aspx.vb @@ -28,8 +28,8 @@ Partial Class OI_SubidasADS If Not Page.IsPostBack Then - TxtFechaI.Text = Now.AddDays(-30).ToString("dd/MM/yyyy") - TxtFechaFin.Text = Now.ToString("dd/MM/yyyy") + TxtFechaI.Text = NowADS().AddDays(-30).ToString("dd/MM/yyyy") + TxtFechaFin.Text = NowADS().ToString("dd/MM/yyyy") If UsuarioActual.CveRol = 1 Then CargaDatosSubidasPendientes() diff --git a/OI/TareaDetalle.aspx.cs b/OI/TareaDetalle.aspx.cs index a16b711b7..d84c993aa 100644 --- a/OI/TareaDetalle.aspx.cs +++ b/OI/TareaDetalle.aspx.cs @@ -2057,7 +2057,7 @@ public partial class OI_TareaDetalle : ClsPaginas //using ( ClsAF ObjAF = new ClsAF()) //{ - // if (ObjAF.GetActivosFijos(-1, UsuarioActual.CveEmpresa, "-1", "-1", -1, -1, "-1", DateTime.Now.Year, -1, -1,-1,-1, "-1",-1)) + // if (ObjAF.GetActivosFijos(-1, UsuarioActual.CveEmpresa, "-1", "-1", -1, -1, "-1", NowADS().Year, -1, -1,-1,-1, "-1",-1)) // { // GvActividades.DataSource = ObjAF.DtResultados; // GvActividades.DataBind(); diff --git a/OI/UnoaUno.aspx.cs b/OI/UnoaUno.aspx.cs index 29400b6f7..689e50025 100644 --- a/OI/UnoaUno.aspx.cs +++ b/OI/UnoaUno.aspx.cs @@ -33,7 +33,7 @@ public partial class OI_UnoaUno : ClsPaginas { if (!IsPostBack) { - TxtCFecha.Text = DateTime.Now.ToString("dd/MM/yyyy"); + TxtCFecha.Text = NowADS().ToString("dd/MM/yyyy"); LtlusuarioTitulo.Text = UsuarioActual.Nombre; @@ -74,7 +74,7 @@ public partial class OI_UnoaUno : ClsPaginas ObjPA_O.Dispose(); } GVPA_OI_UnoAUnoTableroGet.DataBind(); - if (GVPA_OI_UnoAUnoTableroGet.Rows.Count > 0 && TxtCFecha.Text.ToDate().ToString("yyyy/MM/dd") == DateTime.Now.ToString("yyyy/MM/dd")) + if (GVPA_OI_UnoAUnoTableroGet.Rows.Count > 0 && TxtCFecha.Text.ToDate().ToString("yyyy/MM/dd") == NowADS().ToString("yyyy/MM/dd")) { LnkGuardar.Visible = true; } diff --git a/OS/Asignaciones.aspx.vb b/OS/Asignaciones.aspx.vb index 358ff51b9..4044f2a1d 100644 --- a/OS/Asignaciones.aspx.vb +++ b/OS/Asignaciones.aspx.vb @@ -374,7 +374,7 @@ Partial Class OS_Asignaciones 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("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) @@ -465,7 +465,7 @@ Partial Class OS_Asignaciones e.Row.FCCheckBox("ChbxAsignar").Checked = False e.Row.FCCheckBox("ChbxAsignar").Visible = True e.Row.FCTextBox("FechaOS").Visible = True - e.Row.FCTextBox("FechaOS").Text = Now.ToString("dd/MM/yyy") + e.Row.FCTextBox("FechaOS").Text = NowADS().ToString("dd/MM/yyy") e.Row.FCLinkButton("imgCalendario").Visible = True e.Row.FCLiteral("LtlHoraServicio").Visible = False e.Row.FindControl("TimeSelector").Visible = True @@ -487,7 +487,7 @@ Partial Class OS_Asignaciones 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("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("FechaInicio", txtFechaI.Text)) params.Add(New ReportParameter("FechaFin", txtFechaF.Text)) diff --git a/OS/OrdenesServicios.aspx.vb b/OS/OrdenesServicios.aspx.vb index d7509a1d8..c4fb7da51 100644 --- a/OS/OrdenesServicios.aspx.vb +++ b/OS/OrdenesServicios.aspx.vb @@ -347,7 +347,7 @@ Partial Class OS_OrdenesServicios DivSeFactura.Visible = True BtnGuardar.Text = "Guardar Cambios" LtlTitulo.Text = "Consulta del Orden de Servicio" - TxtFecha.Text = Now.ToString("dd/MM/yyy") + TxtFecha.Text = NowADS().ToString("dd/MM/yyy") If UsuarioActual.TienePermisoProceso(198) Then ChkSeFacturara.Visible = True @@ -358,7 +358,7 @@ Partial Class OS_OrdenesServicios End If Else DivSeFactura.Visible = False - TxtFechaRecibido.Text = Now.ToString("dd/MM/yyy") + TxtFechaRecibido.Text = NowADS().ToString("dd/MM/yyy") ViewState("CveOS") = -1 DdlEstatusOS.Enabled = False CargaEstatusOS() @@ -1173,7 +1173,7 @@ Partial Class OS_OrdenesServicios ' Dim objEventos As New ClsOIEventos(ObjOrdenServicio.IniciaTransacSQL) - ' If Not objEventos.FinalizaEvento(Now, 3, "", -1, CveOS) Then + ' If Not objEventos.FinalizaEvento(NowADS(), 3, "", -1, CveOS) Then ' Errores = True ' End If @@ -1230,7 +1230,7 @@ Partial Class OS_OrdenesServicios Dim CveUsuarioEntrego As Integer = If(Entregar = True, UsuarioActual.CveUsuario, -1) - Dim FechaEntrega As String = If(Entregar = True, Now.ToString("dd/MM/yyy"), "-1") + Dim FechaEntrega As String = If(Entregar = True, NowADS().ToString("dd/MM/yyy"), "-1") Dim Consecutivo As Integer = Row("Consecutivo").ToString.ToEntero CveConsecutivo = Consecutivo @@ -1313,7 +1313,7 @@ Partial Class OS_OrdenesServicios Dim objEventos As New ClsOIEventos(ObjOrdenServicio.IniciaTransacSQL) - If Not objEventos.FinalizaEvento(Now, 3, "", -1, CveOS, UsuarioActual.CveUsuario) Then + If Not objEventos.FinalizaEvento(NowADS(), 3, "", -1, CveOS, UsuarioActual.CveUsuario) Then Errores = True End If @@ -2781,7 +2781,7 @@ Partial Class OS_OrdenesServicios 'End Sub Private Sub LimpiaMovimiento() CargaAlmacen() - TxtFecha.Text = Now.ToShortDateString + TxtFecha.Text = NowADS().ToShortDateString UpAddMateriales.Update() End Sub Private Sub DdlSubProyecto_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlSubProyecto.SelectedIndexChanged diff --git a/OS/RepOrdenesServicios.aspx.vb b/OS/RepOrdenesServicios.aspx.vb index 4bed0045a..01fdef67f 100644 --- a/OS/RepOrdenesServicios.aspx.vb +++ b/OS/RepOrdenesServicios.aspx.vb @@ -20,7 +20,7 @@ Partial Class OS_RepOrdenesServicios ViewState("CveUsuarioTecnico") = -1 End If - txtFechaI.Text = $"01/01/{Now.Year}" + txtFechaI.Text = $"01/01/{NowADS().Year}" CargaDatos() OrdenaDatos() @@ -116,7 +116,7 @@ Partial Class OS_RepOrdenesServicios End If End Sub 'Protected Sub ImgExcel_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs) Handles ImgExcel.Click - ' GvDatos.ExportToExcel("RepOrdenesServicio_" & Now.ToShortDateString) + ' GvDatos.ExportToExcel("RepOrdenesServicio_" & NowADS().ToShortDateString) 'End Sub #Region "O R D E N A M I E N T O" diff --git a/OS/RepServicioDomicilio.aspx.vb b/OS/RepServicioDomicilio.aspx.vb index 45d9d378a..e66cc2b5a 100644 --- a/OS/RepServicioDomicilio.aspx.vb +++ b/OS/RepServicioDomicilio.aspx.vb @@ -211,7 +211,7 @@ Partial Class OS_RepServicioDomicilio Private Property FechaInicioOriginal As DateTime Get If ViewState("FechaInicioOriginal") Is Nothing Then - ViewState("FechaInicioOriginal") = DateTime.Now + ViewState("FechaInicioOriginal") = NowADS() End If Return ViewState("FechaInicioOriginal").ToString.ToDateTime End Get @@ -673,11 +673,11 @@ Partial Class OS_RepServicioDomicilio TxtAnio.Text = "" TxtModalFechaOS.Text = "" - 'TSTimeSelector.Hour = Now.Hour - 'TSTimeSelector.Minute = Now.Minute + 'TSTimeSelector.Hour = NowADS().Hour + 'TSTimeSelector.Minute = NowADS().Minute CveTecnicoAsignarOrioginal = -1 - FechaInicioOriginal = DateTime.Now + FechaInicioOriginal = NowADS() DVFolio.Visible = False DvModalSubProyecto.Visible = False @@ -707,7 +707,7 @@ Partial Class OS_RepServicioDomicilio DdlClientesWS.ddl.SelectedValueExist(CveClientePublicoGeneral) End If - TxtFechaOS.Text = Now.ToString("dd/MM/yyyy") + TxtFechaOS.Text = NowADS().ToString("dd/MM/yyyy") RegistraScript("$('#DVModalOS').modal('show');") LblModalOStitulo.Text = "Agregar Orden de Servicio" @@ -1130,7 +1130,7 @@ Partial Class OS_RepServicioDomicilio params.Add(New ReportParameter("Año", dr("Año").ToString)) params.Add(New ReportParameter("TelefonoContacto", dr("TelefonoContacto").ToString)) - params.Add(New ReportParameter("FechaImpresion", Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario)) params.Add(New ReportParameter("Condiciones", dr("Condiciones").ToString)) params.Add(New ReportParameter("FechaAtencion", If(dr("FechaInicio").ToString.Length > 0, dr("FechaInicio").ToString.ToDate.ToString("dd/MM/yyyy hh:mm tt"), ""))) @@ -1154,7 +1154,7 @@ Partial Class OS_RepServicioDomicilio 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("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) diff --git a/Planeacion/Sucursal.aspx.vb b/Planeacion/Sucursal.aspx.vb index 2e9702867..67d8ef91b 100644 --- a/Planeacion/Sucursal.aspx.vb +++ b/Planeacion/Sucursal.aspx.vb @@ -30,7 +30,7 @@ Partial Class Sucursal ViewState("CveSucursal") = -1 ChkEstado.Enabled = False ChkEstado.Checked = True - LblFechaCaptura.Text = Now.ToShortDateString() + LblFechaCaptura.Text = NowADS().ToShortDateString() LblUsuarioCapturo.Text = UsuarioActual.Usuario BtnEliminar.Visible = False End If diff --git a/Portal/LogInPortal.aspx.vb b/Portal/LogInPortal.aspx.vb index 198792daf..3eea5d8f7 100644 --- a/Portal/LogInPortal.aspx.vb +++ b/Portal/LogInPortal.aspx.vb @@ -35,7 +35,7 @@ Partial Class LogInPortal ' If UrlParametros("CVEU") IsNot Nothing AndAlso UrlParametros("CVEU").ToString.ToEntero > 0 Then ' CveUsuario = UrlParametros("CVEU").ToString.ToEntero ' 'Activo el usuario y redirecciono para que pida la nueva contraseña - ' Dim currentDate As Date = Date.Now + ' Dim currentDate As Date = NowADS() ' Dim elapsedTicks As Long = currentDate.Ticks - UrlParametros("HORA").ToString.ToLong ' Dim elapsedSpan As New TimeSpan(elapsedTicks) ' PnlLogin.Visible = False diff --git a/PortalCliente/PortalCliente.aspx.vb b/PortalCliente/PortalCliente.aspx.vb index 0e7514c8d..0a76b5515 100644 --- a/PortalCliente/PortalCliente.aspx.vb +++ b/PortalCliente/PortalCliente.aspx.vb @@ -596,7 +596,7 @@ Partial Class Ventas_PortalCliente DtPagos.Columns.Add("ImportePagoMX", GetType(Decimal)) Dim Facturas = "" - Dim TCPago = GlobalTipoCambio(Now) + Dim TCPago = GlobalTipoCambio(NowADS()) For Each Gvr As GridViewRow In GvCxC.Rows If Gvr.FCCheckBox("ChkPagar").Checked Then @@ -657,7 +657,7 @@ Partial Class Ventas_PortalCliente Protected Sub BtnProsePago_Click(sender As Object, e As EventArgs) - Dim ClavePago = $"{UsuarioActual.CveUsuario}-{Now.Ticks}" + Dim ClavePago = $"{UsuarioActual.CveUsuario}-{NowADS().Ticks}" Dim Carpeta = $"{AppDomain.CurrentDomain.BaseDirectory}/PortalCliente/ePagos/{CveCliente}" Carpeta.DirectoryExistsCreate @@ -749,7 +749,7 @@ Partial Class Ventas_PortalCliente ' PREPOLIZA Dim CvePlantillaPoliza = 11 - Dim FechaMovimiento As Date = Now + Dim FechaMovimiento As Date = NowADS() Dim Concepto = "Prosepago" Dim DtConceptos As New DataTable Dim CveMonedaPago = 1 @@ -1117,7 +1117,7 @@ Partial Class Ventas_PortalCliente strBody.Append(" ") strBody.Append(" ") strBody.Append(" Fecha") - strBody.Append($" {Now.ToString("dd/MM/yyyy HH:ss")}") + strBody.Append($" {NowADS().ToString("dd/MM/yyyy HH:ss")}") strBody.Append(" ") strBody.Append(" ") @@ -1784,12 +1784,12 @@ Partial Class Ventas_PortalCliente Dim ComprobanteIE As String = "" Dim CveIE As Integer = -1 Dim CveTipoTransaccion As Integer = 11 - Dim FechaDoc As DateTime = Now + Dim FechaDoc As DateTime = NowADS() Dim ConceptoContable As Integer Dim TipoMovimiento As Boolean Dim importeMovimiento As Decimal - Dim FechaMovimiento As Date = Now + Dim FechaMovimiento As Date = NowADS() Dim Concepto As String = "" Dim Importe As Decimal = ImportePagado @@ -1819,7 +1819,7 @@ Partial Class Ventas_PortalCliente Dim FolioFijo As Integer = 0 Dim tCveMoneda As Integer = ObjFactura.CveMoneda Dim tImporteMonedaExtranjera As Decimal = 0 - If tCveMoneda <> 1 Then tImporteMonedaExtranjera = TxtImporte.Text.ToDecimal * GlobalTipoCambio(Now).ToString.ToDecimal + If tCveMoneda <> 1 Then tImporteMonedaExtranjera = TxtImporte.Text.ToDecimal * GlobalTipoCambio(NowADS()).ToString.ToDecimal Dim PagueseA = ObjFactura.Cliente.Nombre If MsgError = "" Then @@ -2584,10 +2584,10 @@ Partial Class Ventas_PortalCliente Case "1" TxtTipoCambio.Text = "1" Case "2" - TxtTipoCambio.Text = GlobalTipoCambio(Now).ToString + TxtTipoCambio.Text = GlobalTipoCambio(NowADS()).ToString TrConversionTipoCambio.Visible = True Case Else - TxtTipoCambio.Text = GlobalTipoCambio(Now).ToString + TxtTipoCambio.Text = GlobalTipoCambio(NowADS()).ToString TrConversionTipoCambio.Visible = True End Select UpTabPedidos.Update() @@ -2993,12 +2993,12 @@ Partial Class Ventas_PortalCliente ObjFactura.Folio = Folio.ToEntero ObjFactura.Serie = Serie 'ObjFactura.CveMesa = -1 - ObjFactura.Fecha = Now + ObjFactura.Fecha = NowADS() ObjFactura.CvePrePoliza = -1 - ObjFactura.FechaPago = Now + ObjFactura.FechaPago = NowADS() ObjFactura.MotivoDescuento = "" ObjFactura.Observaciones = "" - ObjFactura.FechaEjecucion = Now + ObjFactura.FechaEjecucion = NowADS() ObjFactura.UsuarioCreo = UsuarioActual.Usuario ObjFactura.CveCondicionEntrega = -1 ObjFactura.CondicionEntrega = "" diff --git a/PortalGPS/Penske.aspx.vb b/PortalGPS/Penske.aspx.vb index 461592c6e..de0c5c1ea 100644 --- a/PortalGPS/Penske.aspx.vb +++ b/PortalGPS/Penske.aspx.vb @@ -16,7 +16,7 @@ Partial Class PortalGPS_Penske Private Sub EnviarDatos() Dim ObjTsoft As New ClsTSoft Try - GuardaLog($"Empecé Task. Fecha: {DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss")}") + GuardaLog($"Empecé Task. Fecha: {NowADS().ToString("dd/MM/yyyy HH:mm:ss")}") If ObjTsoft.GetInfoWSPenske() AndAlso ObjTsoft.DtResultados.Rows.Count > 0 Then Dim Direcciones As JArray = ConsultarDirecciones(ObjTsoft.DtResultados) For Each Dir As JObject In Direcciones @@ -26,7 +26,7 @@ Partial Class PortalGPS_Penske Catch ex As Exception GuardaLog(ex.ToString()) Finally - GuardaLog($"Terminé Task, se reportaron: {ObjTsoft.DtResultados.Rows.Count} registros. Fecha: {DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss")}") + GuardaLog($"Terminé Task, se reportaron: {ObjTsoft.DtResultados.Rows.Count} registros. Fecha: {NowADS().ToString("dd/MM/yyyy HH:mm:ss")}") ObjTsoft.Dispose() End Try End Sub @@ -45,7 +45,7 @@ Partial Class PortalGPS_Penske info.Trackingnumber = row("TrackingNumber").ToString info.Ubicacion = direccion info.FechaHoraEvento = row("FechaTrama").ToString.ToDate - info.FechaRecepcion = DateTime.Now.AddMinutes(120) + info.FechaRecepcion = NowADS().AddMinutes(120) info.Username = row("Usuario").ToString info.Password = row("PWD").ToString Dim Protocol As New WSPenske.Protocolo @@ -96,8 +96,8 @@ Partial Class PortalGPS_Penske Dim ArchivoW As StreamWriter Dim strLineaTMP As String - ' strLineaTMP = Chr(13) & Chr(10) & Day(Now) & "/" & Month(Now) & "/" & Year(Now) & " " & Hour(Now) & ":" & Minuto & ". " & Str & Chr(13) & Chr(10) - strLineaTMP = String.Format("{0}{1}Log: {2}{3}:{4}", Chr(13), Chr(10), Str, DateTime.Now.ToShortDateString, DateTime.Now.ToShortTimeString) + ' strLineaTMP = Chr(13) & Chr(10) & Day(NowADS()) & "/" & Month(NowADS()) & "/" & Year(NowADS()) & " " & Hour(NowADS()) & ":" & Minuto & ". " & Str & Chr(13) & Chr(10) + strLineaTMP = String.Format("{0}{1}Log: {2}{3}:{4}", Chr(13), Chr(10), Str, NowADS().ToShortDateString, NowADS().ToShortTimeString) Try ArchivoW = New StreamWriter(String.Format("{0}\log\LogPenske.txt", AppDomain.CurrentDomain.BaseDirectory), True, System.Text.Encoding.UTF8) Catch ex As UnauthorizedAccessException diff --git a/PortalGPS/ServiciosGPS.aspx.vb b/PortalGPS/ServiciosGPS.aspx.vb index d0d8d1aa0..5f7650372 100644 --- a/PortalGPS/ServiciosGPS.aspx.vb +++ b/PortalGPS/ServiciosGPS.aspx.vb @@ -36,12 +36,12 @@ Partial Class PortalGPS_ServiciosGPS Select Case Tipo Case "GPRS" If ObjHerra.EjecutarComandoManualGPRS(Comando, Telefono, CveDispositivo, -1) Then - LblFecha.Text = Now.ToString("dd/MM/yyyy") + LblFecha.Text = NowADS().ToString("dd/MM/yyyy") GuardaLog($"Se ejecuto el comando correctamente vía GPRS. ") End If Case "SMS" If ObjHerra.EjecutarComandoManualSMS(Comando, Telefono, CveDispositivo, -1) Then - LblFecha.Text = Now.ToString("dd/MM/yyyy") + LblFecha.Text = NowADS().ToString("dd/MM/yyyy") GuardaLog($"Se ejecuto el comando correctamente vía SMS Fecha. ") End If End Select @@ -64,7 +64,7 @@ Partial Class PortalGPS_ServiciosGPS Dim ArchivoW As StreamWriter Dim strLineaTMP As String - strLineaTMP = String.Format("{0}{1}Log: {2}{3}:{4}", Chr(13), Chr(10), Str, DateTime.Now.ToShortDateString, DateTime.Now.ToShortTimeString) + strLineaTMP = String.Format("{0}{1}Log: {2}{3}:{4}", Chr(13), Chr(10), Str, NowADS().ToShortDateString, NowADS().ToShortTimeString) Try ArchivoW = New StreamWriter(String.Format("{0}\log\LogCanBus.txt", AppDomain.CurrentDomain.BaseDirectory), True, System.Text.Encoding.UTF8) Catch ex As Exception diff --git a/PortalProveedor/PortalProveedor.aspx.vb b/PortalProveedor/PortalProveedor.aspx.vb index acc01a29f..8772990de 100644 --- a/PortalProveedor/PortalProveedor.aspx.vb +++ b/PortalProveedor/PortalProveedor.aspx.vb @@ -233,7 +233,7 @@ Partial Class Portal_PortalProveedor Private Property FechaLimite As Date Get If ViewState("FechaLimite") Is Nothing Then - Return Date.Now.AddDays(15) + Return NowADS().AddDays(15) Else Return ViewState("FechaLimite").ToString.ToDate End If @@ -397,7 +397,7 @@ Partial Class Portal_PortalProveedor End Sub Private Sub CargaAnticipos(SerieSucursal As String, SelectTop As Integer) Dim ObjMovtos As New ClsMovimientos() - If ObjMovtos.GetAnticiposProveedor(CveProveedor, -1, SelectTop:=SelectTop) Then + If ObjMovtos.GetAnticiposProveedor(CveProveedor, UsuarioActual.CveEmpresa, SelectTop:=SelectTop) Then If ObjMovtos.DtResultados.Rows.Count > 0 Then Dim dtA, dtAH As DataTable @@ -836,7 +836,7 @@ Partial Class Portal_PortalProveedor ' If Not TieneError Then ' Dim ObjParametro As SisParametro = GlobalDTParametros(SisParametros.URL) ' Dim Liga As String = ObjParametro.Cadena1 & "LogIn.aspx" - ' Dim LigaActivar = Liga & "?p=" & Encripta("CveU=" & cveUsuarioPortal & "&Clave=" & "-acceso-" & "&Opcion=Activar&Hora=" & DateTime.Now.Ticks & "&CveE=" & UsuarioActual.CveEmpresa) + ' Dim LigaActivar = Liga & "?p=" & Encripta("CveU=" & cveUsuarioPortal & "&Clave=" & "-acceso-" & "&Opcion=Activar&Hora=" & NowADS().Ticks & "&CveE=" & UsuarioActual.CveEmpresa) ' Dim ObjMail As New ClsSisMail() @@ -1253,7 +1253,7 @@ Partial Class Portal_PortalProveedor Protected Function ImprimirReporteCxPPagadas(Optional Formato As String = "PDF") As Byte() Dim retorno As Byte() = Nothing 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 ImagenADSistemas As New System.IO.FileInfo(Server.MapPath("~") & "/Imagenes/LogoSinFondochico.png") Dim LogoADSistemasUri As String = String.Format("{0}://{1}:{2}/Imagenes/LogoSinFondochico.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port) diff --git a/Presupuestos/GenerarPresupuestos.aspx.vb b/Presupuestos/GenerarPresupuestos.aspx.vb index 0d6d01aa0..0b60ba2bd 100644 --- a/Presupuestos/GenerarPresupuestos.aspx.vb +++ b/Presupuestos/GenerarPresupuestos.aspx.vb @@ -105,7 +105,7 @@ Partial Class Presupuestos_GenerarPresupuestos Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load If Not IsPostBack Then - TxtFecha.Text = Now.ToShortDateString + TxtFecha.Text = NowADS().ToShortDateString tbHPorcentaje.Attributes.Add("onchange", "CostoHerramienta(this);") InicializarListas() CrearDTMaterial() diff --git a/Productos202006221814.xlsx b/Productos202006221814.xlsx deleted file mode 100644 index 421d798b8..000000000 Binary files a/Productos202006221814.xlsx and /dev/null differ diff --git a/Productos202006221920.xlsx b/Productos202006221920.xlsx deleted file mode 100644 index ae050ff6e..000000000 Binary files a/Productos202006221920.xlsx and /dev/null differ diff --git a/Prospeccion/Prospectos.aspx.vb b/Prospeccion/Prospectos.aspx.vb index c5985a827..a13ef9dc5 100644 --- a/Prospeccion/Prospectos.aspx.vb +++ b/Prospeccion/Prospectos.aspx.vb @@ -178,7 +178,7 @@ Partial Class Prospectos_Prospectos Dim ObjProspectos As New ClsProspectos If CveProspecto = -1 Then If ObjProspectos.AddProspectos(-1, TxtApellidoPaterno.Text.Trim, TxtApellidoMaterno.Text.Trim, - TxtNombres.Text.Trim, Now, "", "", "", 0, TxtCalle.Text.Trim, + TxtNombres.Text.Trim, NowADS(), "", "", "", 0, TxtCalle.Text.Trim, TxtNumero.Text.Trim, "", TxtEntreCalle1.Text.Trim, "", TxtColonia.Text.Trim, -1, DdlMunicipios.SelectedValue.ToEntero, TxtTelefono.Text.Trim, TxtCelular.Text.Trim, "", "", TxtCorreo.Text.Trim, "", "", "", -1, DdlProspectoClasificacion.SelectedValue.ToEntero, -1, TxtEmpresaNombre.Text.Trim, "", "", "", TxtEmpresaCalle.Text.Trim, TxtEmpresaNumero.Text.Trim, TxtEmpresaColonia.Text.Trim, "", DdlEmpresaMunicipios.SelectedValue.ToEntero, TxtEmpresaTelefono.Text.Trim, "", "", TxtEmpresaPuesto.Text.Trim, "", False, "", "", "", "", -1, "", -1, -1, -1, "", -1, 0, -1, "", 0, "", DdlVendedor.SelectedValue.ToEntero, DdlCalificacion.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) > 0 Then @@ -190,7 +190,7 @@ Partial Class Prospectos_Prospectos Else If ObjProspectos.UpdateProspectos(-1, TxtApellidoPaterno.Text.Trim, TxtApellidoMaterno.Text.Trim, - TxtNombres.Text.Trim, Now, "", "", "", 0, TxtCalle.Text.Trim, + TxtNombres.Text.Trim, NowADS(), "", "", "", 0, TxtCalle.Text.Trim, TxtNumero.Text.Trim, "", TxtEntreCalle1.Text.Trim, "", TxtColonia.Text.Trim, -1.ToEntero, DdlMunicipios.SelectedValue.ToEntero, TxtTelefono.Text.Trim, TxtCelular.Text.Trim, "", "", TxtCorreo.Text.Trim, "", "", "", -1, DdlProspectoClasificacion.SelectedValue.ToEntero, -1, TxtEmpresaNombre.Text.Trim, "", "", "", TxtEmpresaCalle.Text.Trim, TxtEmpresaNumero.Text.Trim, TxtEmpresaColonia.Text.Trim, "", DdlEmpresaMunicipios.SelectedValue.ToEntero, TxtEmpresaTelefono.Text.Trim, "", "", TxtEmpresaPuesto.Text.Trim, "", False, "", "", "", "", -1, "", -1, -1, -1, "", -1, 0, 1, "", 0, "", DdlVendedor.SelectedValue.ToEntero, DdlCalificacion.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveProspecto) Then diff --git a/Prospeccion/RepProspectosGIS.aspx.vb b/Prospeccion/RepProspectosGIS.aspx.vb index e2edca92e..6b54b1cea 100644 --- a/Prospeccion/RepProspectosGIS.aspx.vb +++ b/Prospeccion/RepProspectosGIS.aspx.vb @@ -105,7 +105,7 @@ Partial Class Prospeccion_RepProspectosGIS ' Dim dtc As DataTable = DTApartados.FiltraParametros("CveCliente = " & drr("CveCliente").ToString) - ' If Venta.AddVenta("Rem", 0, drr("CveCliente").ToString.ToEntero, -1, dtc.SUM("Precio"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, Now, "", "", Now, -1, -1, "", "", "", 0, 0, 0, DateTime.MinValue, DateTime.MinValue, DateTime.MinValue, -1, -1, 0, 0, 43) Then + ' If Venta.AddVenta("Rem", 0, drr("CveCliente").ToString.ToEntero, -1, dtc.SUM("Precio"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, NowADS(), "", "", NowADS(), -1, -1, "", "", "", 0, 0, 0, DateTime.MinValue, DateTime.MinValue, DateTime.MinValue, -1, -1, 0, 0, 43) Then ' Dim CveVenta As Integer = Venta.CveVenta ' For Each dr As DataRow In dtc.Rows ' Dim CveUnidadMedida As Integer diff --git a/Prospectos/ProspectoExpediente.aspx.vb b/Prospectos/ProspectoExpediente.aspx.vb index 2d90f538f..cd569290b 100644 --- a/Prospectos/ProspectoExpediente.aspx.vb +++ b/Prospectos/ProspectoExpediente.aspx.vb @@ -63,7 +63,7 @@ Partial Class Prospectos_ProspectoExpediente ViewState("CveProspecto") = -1 - TxtFechaIngreso.Text = Now.ToShortDateString + TxtFechaIngreso.Text = NowADS().ToShortDateString End If @@ -214,8 +214,8 @@ Partial Class Prospectos_ProspectoExpediente If FechaIngreso = "__/__/____" Then FechaIngreso = "-1" - If TxtFechaIngreso.Text.Trim = Now.ToShortDateString Then - FechaIngreso = Now.ToString + If TxtFechaIngreso.Text.Trim = NowADS().ToShortDateString Then + FechaIngreso = NowADS().ToString End If Dim ObjProspectos As New ClsProspectos diff --git a/Prospectos/ProspectosEstructuras.aspx.vb b/Prospectos/ProspectosEstructuras.aspx.vb index 7a172decd..8ac932e24 100644 --- a/Prospectos/ProspectosEstructuras.aspx.vb +++ b/Prospectos/ProspectosEstructuras.aspx.vb @@ -73,7 +73,7 @@ Partial Class Prospectos_ProspectosEstructuras PnlBusquedaGral.Visible = True Me.Form.DefaultButton = BtnBusqueda.UniqueID TxtBusqueda.Focus() - TxtFechaIngreso.Text = Now.ToShortDateString + TxtFechaIngreso.Text = NowADS().ToShortDateString End If @@ -225,8 +225,8 @@ Partial Class Prospectos_ProspectosEstructuras If FechaIngreso = "__/__/____" Then FechaIngreso = "-1" - If TxtFechaIngreso.Text.Trim = Now.ToShortDateString Then - FechaIngreso = Now.ToString + If TxtFechaIngreso.Text.Trim = NowADS().ToShortDateString Then + FechaIngreso = NowADS().ToString End If Dim ObjProspectos As New ClsProspectos diff --git a/Prospectos/ProspectosRedes.aspx.vb b/Prospectos/ProspectosRedes.aspx.vb index 3fcdd5eea..8bdc104fd 100644 --- a/Prospectos/ProspectosRedes.aspx.vb +++ b/Prospectos/ProspectosRedes.aspx.vb @@ -64,7 +64,7 @@ Partial Class Prospectos_ProspectosRedes PnlBusquedaGral.Visible = True Me.Form.DefaultButton = BtnBusqueda.UniqueID TxtBusqueda.Focus() - TxtFechaIngreso.Text = Now.ToShortDateString + TxtFechaIngreso.Text = NowADS().ToShortDateString End If @@ -218,8 +218,8 @@ Partial Class Prospectos_ProspectosRedes If FechaIngreso = "__/__/____" Then FechaIngreso = "-1" - If TxtFechaIngreso.Text.Trim = Now.ToShortDateString Then - FechaIngreso = Now.ToString + If TxtFechaIngreso.Text.Trim = NowADS().ToShortDateString Then + FechaIngreso = NowADS().ToString End If Dim ObjProspectos As New ClsProspectos diff --git a/Prospectos/ProspectosSIP.aspx.vb b/Prospectos/ProspectosSIP.aspx.vb index 08bbe2ee7..161ced1dd 100644 --- a/Prospectos/ProspectosSIP.aspx.vb +++ b/Prospectos/ProspectosSIP.aspx.vb @@ -153,7 +153,7 @@ Partial Class Prospectos_ProspectosSIP Dim ObjProspectos As New ClsProspectos If CveProspecto = -1 Then If ObjProspectos.AddProspectos(-1, TxtApellidoPaterno.Text.Trim, TxtApellidoMaterno.Text.Trim, - TxtNombres.Text.Trim, Now, "", "", "", 0, TxtCalle.Text.Trim, + TxtNombres.Text.Trim, NowADS(), "", "", "", 0, TxtCalle.Text.Trim, TxtNumero.Text.Trim, "", TxtEntreCalle1.Text.Trim, "", TxtColonia.Text.Trim, -1, DdlMunicipios.SelectedValue.ToEntero, TxtTelefono.Text.Trim, TxtCelular.Text.Trim, "", "", TxtCorreo.Text.Trim, "", "", "", -1, DdlProspectoClasificacion.SelectedValue.ToEntero, -1, TxtEmpresaNombre.Text.Trim, "", "", "", TxtEmpresaCalle.Text.Trim, TxtEmpresaNumero.Text.Trim, TxtEmpresaColonia.Text.Trim, "", DdlEmpresaMunicipios.SelectedValue.ToEntero, TxtEmpresaTelefono.Text.Trim, "", "", TxtEmpresaPuesto.Text.Trim, "", False, "", "", "", "", -1, "", -1, -1, -1, "", -1, 0, -1, "", 0, "", DdlVendedor.SelectedValue.ToEntero, DdlCalificacion.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) > 0 Then @@ -164,7 +164,7 @@ Partial Class Prospectos_ProspectosSIP Else If ObjProspectos.UpdateProspectos(-1, TxtApellidoPaterno.Text.Trim, TxtApellidoMaterno.Text.Trim, - TxtNombres.Text.Trim, Now, "", "", "", 0, TxtCalle.Text.Trim, + TxtNombres.Text.Trim, NowADS(), "", "", "", 0, TxtCalle.Text.Trim, TxtNumero.Text.Trim, "", TxtEntreCalle1.Text.Trim, "", TxtColonia.Text.Trim, -1.ToEntero, DdlMunicipios.SelectedValue.ToEntero, TxtTelefono.Text.Trim, TxtCelular.Text.Trim, "", "", TxtCorreo.Text.Trim, "", "", "", -1, DdlProspectoClasificacion.SelectedValue.ToEntero, -1, TxtEmpresaNombre.Text.Trim, "", "", "", TxtEmpresaCalle.Text.Trim, TxtEmpresaNumero.Text.Trim, TxtEmpresaColonia.Text.Trim, "", DdlEmpresaMunicipios.SelectedValue.ToEntero, TxtEmpresaTelefono.Text.Trim, "", "", TxtEmpresaPuesto.Text.Trim, "", False, "", "", "", "", -1, "", -1, -1, -1, "", -1, 0, 1, "", 0, "", DdlVendedor.SelectedValue.ToEntero, DdlCalificacion.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveProspecto) Then diff --git a/Prospectos/ProspectosValidar.aspx.vb b/Prospectos/ProspectosValidar.aspx.vb index 0bc4c473b..3e05ab5d1 100644 --- a/Prospectos/ProspectosValidar.aspx.vb +++ b/Prospectos/ProspectosValidar.aspx.vb @@ -190,7 +190,7 @@ Partial Class Prospectos_ProspectosValidar Dim Prosp As New ClsProspectos - If Prosp.UpdateProspectoProceso(CveProspectoProspectoProceso, RBLSolucion.SelectedValue.ToEntero, Now, IFE) Then + If Prosp.UpdateProspectoProceso(CveProspectoProspectoProceso, RBLSolucion.SelectedValue.ToEntero, NowADS(), IFE) Then Alert("Registro Guardado", TipoMensaje.MsgInformacion) LimpiaDatos() GvBusq.DataBind() diff --git a/Prospectos/RedesIndicadores.aspx.vb b/Prospectos/RedesIndicadores.aspx.vb index a32194ea8..6bd525bc5 100644 --- a/Prospectos/RedesIndicadores.aspx.vb +++ b/Prospectos/RedesIndicadores.aspx.vb @@ -173,7 +173,7 @@ Partial Class Prospectos_RedesIndicadores Dim Marcador2 As Integer = 1 Dim Marcador3 As Integer = 1 Dim TotalDias As Integer = (FechaFin - FechaInicio).Days - Dim DiasTranscurridos As Integer = (DateTime.Now - FechaInicio).Days + Dim DiasTranscurridos As Integer = (NowADS() - FechaInicio).Days Dim Str As New StringBuilder Dim Total As Integer = 20000 diff --git a/Prospectos/RepAgendasBitacoras.aspx.vb b/Prospectos/RepAgendasBitacoras.aspx.vb index f93b79744..abe6ea16a 100644 --- a/Prospectos/RepAgendasBitacoras.aspx.vb +++ b/Prospectos/RepAgendasBitacoras.aspx.vb @@ -36,8 +36,8 @@ Partial Class Prospectos_RepAgendasBitacoras eventos.Dispose() ddlAgenda.Items.Insert(0, New ListItem("Todos", "-1")) ddlVendedor.Items.Insert(0, New ListItem("Todos", "-1")) - TxtFechaI.Text = Now.AddDays(-1).ToShortDateString - TxtFechaF.Text = Now.ToShortDateString + TxtFechaI.Text = NowADS().AddDays(-1).ToShortDateString + TxtFechaF.Text = NowADS().ToShortDateString ddlTipoEvento.Items.Insert(0, New ListItem("Todos", "-1")) ddlTipoEvento.Items.Insert(1, New ListItem("Agenda", "2")) diff --git a/Prospectos/RepMetas2.aspx.vb b/Prospectos/RepMetas2.aspx.vb index 6ede2e420..36708a1bd 100644 --- a/Prospectos/RepMetas2.aspx.vb +++ b/Prospectos/RepMetas2.aspx.vb @@ -171,11 +171,11 @@ Partial Class Prospectos_RepMetas2 e.Row.FCLiteral("LitPor").Text = (e.Row.DBCampo("Hijos").ToDouble / e.Row.DBCampo("MetaGlobal").ToDouble * 100).FormatoNumero(0) - If e.Row.DBCampo("UltimoIngreso") <> "" AndAlso e.Row.DBCampo("UltimoIngreso").ToDate < Now.AddDays(-10) Then + If e.Row.DBCampo("UltimoIngreso") <> "" AndAlso e.Row.DBCampo("UltimoIngreso").ToDate < NowADS().AddDays(-10) Then e.Row.Cells(4).ForeColor = System.Drawing.Color.Red e.Row.Cells(4).ToolTip = "Ultimo ingreso mayor a 10 dias" End If - If e.Row.DBCampo("FechaIng") <> "" AndAlso e.Row.DBCampo("FechaIng").ToDate < Now.AddDays(-14) AndAlso e.Row.DBCampo("Hijos").ToEntero = 0 Then + If e.Row.DBCampo("FechaIng") <> "" AndAlso e.Row.DBCampo("FechaIng").ToDate < NowADS().AddDays(-14) AndAlso e.Row.DBCampo("Hijos").ToEntero = 0 Then e.Row.Cells(0).BackColor = System.Drawing.Color.Red e.Row.Cells(0).ToolTip = String.Format("No se han ingresado hijos. Fecha de ingreso: {0}", e.Row.DBCampo("FechaIng").ToDate.ToShortDateString) End If diff --git a/Prospectos/RepSimpatizantes.aspx.vb b/Prospectos/RepSimpatizantes.aspx.vb index 041b03d33..dcaf93b06 100644 --- a/Prospectos/RepSimpatizantes.aspx.vb +++ b/Prospectos/RepSimpatizantes.aspx.vb @@ -132,6 +132,6 @@ Partial Class Prospectos_RepSimpatizantes End Sub Protected Sub ImgExcel_Click(sender As Object, e As ImageClickEventArgs) Handles ImgExcel.Click - GvDatos.ExportToExcel("RepEquipoJGM_" & Now.ToString("yyyy/MM/dd")) + GvDatos.ExportToExcel("RepEquipoJGM_" & NowADS().ToString("yyyy/MM/dd")) End Sub End Class diff --git a/Proveedores/LogInProveedores.aspx.vb b/Proveedores/LogInProveedores.aspx.vb index 6274b201c..71a92ac0e 100644 --- a/Proveedores/LogInProveedores.aspx.vb +++ b/Proveedores/LogInProveedores.aspx.vb @@ -22,7 +22,7 @@ Partial Class Portal_LogInProveedores ' If UrlParametros("CVEU") IsNot Nothing AndAlso UrlParametros("CVEU").ToString.ToEntero > 0 Then ' Dim CveUsr As Integer = UrlParametros("CVEU").ToString.ToEntero ' 'Activo el usuario y redirecciono para que pida la nueva contraseña - ' Dim currentDate As Date = Date.Now + ' Dim currentDate As Date = NowADS() ' Dim elapsedTicks As Long = currentDate.Ticks - UrlParametros("HORA").ToString.ToLong ' Dim elapsedSpan As New TimeSpan(elapsedTicks) ' PnlLogin.Visible = False diff --git a/Proveedores/PortalProveedor.aspx.vb b/Proveedores/PortalProveedor.aspx.vb index b71dea89d..48f866941 100644 --- a/Proveedores/PortalProveedor.aspx.vb +++ b/Proveedores/PortalProveedor.aspx.vb @@ -652,7 +652,7 @@ Partial Class Portal_PortalProveedor ' If Not TieneError Then ' Dim ObjParametro As SisParametro = GlobalDTParametros(SisParametros.URL) ' Dim Liga As String = ObjParametro.Cadena1 & "Proveedores/LogInProveedores.aspx" - ' Dim LigaActivar = String.Format("{0}?p={1}", Liga, Encripta(String.Format("CveU={0}&Clave={1}&Opcion=Activar&Hora={2}", cveUsuarioPortal, CveProveedor, DateTime.Now.Ticks))) + ' Dim LigaActivar = String.Format("{0}?p={1}", Liga, Encripta(String.Format("CveU={0}&Clave={1}&Opcion=Activar&Hora={2}", cveUsuarioPortal, CveProveedor, NowADS().Ticks))) ' Dim ObjMail As New ClsSisMail() diff --git a/RH/ActualizacionMasiva.aspx.vb b/RH/ActualizacionMasiva.aspx.vb index 2e455ab81..e2049c8e2 100644 --- a/RH/ActualizacionMasiva.aspx.vb +++ b/RH/ActualizacionMasiva.aspx.vb @@ -254,7 +254,7 @@ Partial Class RH_ActualizacionMasiva ObjPersonal.RollBack() Exit For End If - If ObjPersonal.UpdateSalarios(Row.DataKey("CvePersonal").ToEntero(), DateTime.Now.ToString("yyyy/MM/dd"), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Row.FCTextBox("TxtSalarioDiario").Text.ToDecimal(), + If ObjPersonal.UpdateSalarios(Row.DataKey("CvePersonal").ToEntero(), NowADS().ToString("yyyy/MM/dd"), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Row.FCTextBox("TxtSalarioDiario").Text.ToDecimal(), Row.FCTextBox("TxtSDI").Text.ToDecimal(), Row.FCTextBox("TxtSalarioCotizado").Text.ToDecimal(), Row.FCTextBox("TxtSalarioDiario").Text.ToDecimal(), Row.FCCheckBox("ChkCalcularSDI").Checked) Then @@ -410,7 +410,7 @@ Partial Class RH_ActualizacionMasiva If Not IsNothing(drow) Then Dim CvePersonal As Integer = drow("CvePersonal").ToString().ToEntero() - If ObjPersonal.UpdateSalarios(CvePersonal, DateTime.Now.ToString("yyyy/MM/dd"), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Row("SDD").ToString().ToDecimal(), Row("SDI").ToString().ToDecimal(), + If ObjPersonal.UpdateSalarios(CvePersonal, NowADS().ToString("yyyy/MM/dd"), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Row("SDD").ToString().ToDecimal(), Row("SDI").ToString().ToDecimal(), Row("SD IMSS").ToString().ToDecimal(), Row("SDD").ToString().ToDecimal(), ChkCalcularSDIXLS.Checked) Then contador = contador + 1 Else diff --git a/RH/AsistenciaDetalle.aspx.vb b/RH/AsistenciaDetalle.aspx.vb index c8ce16560..39c415354 100644 --- a/RH/AsistenciaDetalle.aspx.vb +++ b/RH/AsistenciaDetalle.aspx.vb @@ -210,7 +210,7 @@ Partial Class RH_AsistenciaDetalle Dim ObjAsistencias As New ClsRH Dim ObjAsistenciasDetalle As New ClsRH - If ObjAsistencias.AddAsistencia(CvePersonal, -1, DdlSubProyectoAsignado.SelectedValue.ToEntero, Now, 6, 100, 0, 0, -1, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then + If ObjAsistencias.AddAsistencia(CvePersonal, -1, DdlSubProyectoAsignado.SelectedValue.ToEntero, NowADS(), 6, 100, 0, 0, -1, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then If ObjAsistencias.CveAsistencia > 0 AndAlso ObjAsistenciasDetalle.AddAsistenciasDetalle(ObjAsistencias.CveAsistencia, DdlSubProyectoAsignado.SelectedValue.ToEntero, TxtHoraInicio.Text.Trim.ToDateTime, TxtHoraFin.Text.Trim.ToDateTime, DdlTipoHora.SelectedValue.ToEntero) Then TxtHoraInicio.Text = "" diff --git a/RH/Asistencias.aspx.vb b/RH/Asistencias.aspx.vb index 0b84823f6..e844708cd 100644 --- a/RH/Asistencias.aspx.vb +++ b/RH/Asistencias.aspx.vb @@ -29,7 +29,7 @@ Partial Class RH_Asistencias GV.Columns(2).Visible = False GV.Columns(3).Visible = True End If - txtFechaAsistencia.Text = Now.ToShortDateString + txtFechaAsistencia.Text = NowADS().ToShortDateString If UsuarioActual.CveRol = 1 OrElse UsuarioActual.CveUsuario = 2343 Then PnlMasivo.Visible = True End If @@ -94,7 +94,7 @@ Partial Class RH_Asistencias txtFechaAsistencia.Enabled = False Calendario.Enabled = False btnconsultarnew.Visible = True - If txtFechaAsistencia.Text.Trim.ToDate.Year.Contiene(Now.Year - 1, Now.Year, Now.Year + 1) Then + If txtFechaAsistencia.Text.Trim.ToDate.Year.Contiene(NowADS().Year - 1, NowADS().Year, NowADS().Year + 1) Then Dim objpersonal As New ClsRH If objpersonal.GetAsistencias(-1, DdlCliente.SelectedValue.ToEntero, DdlProyecto.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, DdlTurno.SelectedValue.ToEntero, 1, DdlTipoPeriodo.SelectedValue.ToEntero, txtFechaAsistencia.Text.Trim.ToDate, txtFechaAsistencia.Text.Trim.ToDate, UsuarioActual.CveEmpresa, DdlPuesto.SelectedValue.ToEntero) Then Dim dt As DataTable = objpersonal.DtResultados @@ -157,7 +157,7 @@ Partial Class RH_Asistencias Dim params As New List(Of ReportParameter) params.Add(New ReportParameter("Fecha", Fecha)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy HH:mm"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy HH:mm"))) params.Add(New ReportParameter("Filtros", Filtros)) Dim lrds As New List(Of ReportDataSource) diff --git a/RH/BuzonCalidad.aspx.vb b/RH/BuzonCalidad.aspx.vb index 973a2076e..d47d985d5 100644 --- a/RH/BuzonCalidad.aspx.vb +++ b/RH/BuzonCalidad.aspx.vb @@ -41,7 +41,7 @@ Partial Class RH_BuzonCalidad ' Else ' 'Configuración de Modalidad Insert - ' LblFechaCaptura.Text = Now.ToShortDateString() + ' LblFechaCaptura.Text = NowADS().ToShortDateString() ' LblUsuarioCapturo.Text = UsuarioActual.Usuario ' ViewState("CvePersonal") = -1 ' BtnEliminar.Visible = False diff --git a/RH/BuzonCalidad.aspx.vb.exclude b/RH/BuzonCalidad.aspx.vb.exclude index a5724c81e..b8259011c 100644 --- a/RH/BuzonCalidad.aspx.vb.exclude +++ b/RH/BuzonCalidad.aspx.vb.exclude @@ -41,7 +41,7 @@ Partial Class RH_BuzonCalidad Else 'Configuración de Modalidad Insert - LblFechaCaptura.Text = Now.ToShortDateString() + LblFechaCaptura.Text = NowADS().ToShortDateString() LblUsuarioCapturo.Text = UsuarioActual.Usuario ViewState("CvePersonal") = -1 BtnEliminar.Visible = False diff --git a/RH/CalculoSBC.aspx.cs b/RH/CalculoSBC.aspx.cs index 52de72552..0e9ba31cc 100644 --- a/RH/CalculoSBC.aspx.cs +++ b/RH/CalculoSBC.aspx.cs @@ -40,7 +40,7 @@ public partial class RH_CalculoSBC : ClsPaginas { if (!IsPostBack) { - TxtFechaPago.Text = String.Format("{0:01/MM/yyyy}", DateTime.Now); + TxtFechaPago.Text = String.Format("{0:01/MM/yyyy}", NowADS()); ClsRH ObjRH = new ClsRH(); @@ -806,8 +806,8 @@ public partial class RH_CalculoSBC : ClsPaginas libro.Range(2, 2, 2, 6).Style.Font.SetFontSize(14); libro.Range(1, 2, 2, 6).Style.Alignment.Horizontal = ClosedXML.Excel.XLAlignmentHorizontalValues.Center; //libro.Range(3, 2, 3, 6).Merge().Value = $"del {fechai:dd/MM/yyyy} al {fechaf:dd/MM/yyyy}"; - libro.Range(2, 7, 2, 9).Merge().Value = $"Fecha:{DateTime.Now:dd/MM/yyyy}"; - libro.Range(3, 7, 3, 9).Merge().Value = $"Hora:{DateTime.Now:HH:mm}"; + libro.Range(2, 7, 2, 9).Merge().Value = $"Fecha:{NowADS():dd/MM/yyyy}"; + libro.Range(3, 7, 3, 9).Merge().Value = $"Hora:{NowADS():HH:mm}"; libro.Range(5, 8, 5, 12).Merge().Value = "Actual"; libro.Range(5, 13, 5, 15).Merge().Value = "Nuevo"; diff --git a/RH/CatChecadorTipo.aspx.vb b/RH/CatChecadorTipo.aspx.vb index 66859cc85..63ed3b6bd 100644 --- a/RH/CatChecadorTipo.aspx.vb +++ b/RH/CatChecadorTipo.aspx.vb @@ -31,7 +31,7 @@ Partial Class RH_ChecadorTipo Alert("Agregado Correctamente.", TipoMensaje.MsgInformacion) End If ElseIf HdnModalidad.Value = "U" Then - If ObjRH.ChecadorTipoUpdate(HdnID.Value.ToEntero, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, TxtChecadorTipo.Text, TxtDescripcion.Text, Estatus, Date.Now) Then + If ObjRH.ChecadorTipoUpdate(HdnID.Value.ToEntero, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, TxtChecadorTipo.Text, TxtDescripcion.Text, Estatus, NowADS()) Then CargaDatos() Alert("Actualizado Correctamente.", TipoMensaje.MsgInformacion) End If diff --git a/RH/CatConceptosViaticos.aspx.cs b/RH/CatConceptosViaticos.aspx.cs index f72ba449f..cd938aaa6 100644 --- a/RH/CatConceptosViaticos.aspx.cs +++ b/RH/CatConceptosViaticos.aspx.cs @@ -123,7 +123,7 @@ public partial class RH_CatConceptosViaticos : ClsPaginas Boolean Estatus = ChkEstatus.Checked; int CveUsuarioIng = UsuarioActual.CveUsuario; - DateTime FechaIng = DateTime.Now; + DateTime FechaIng = NowADS(); if (EsEditar == 0) { diff --git a/RH/CatCursos.aspx.vb b/RH/CatCursos.aspx.vb index 68369b641..a6ad7bd0b 100644 --- a/RH/CatCursos.aspx.vb +++ b/RH/CatCursos.aspx.vb @@ -302,7 +302,7 @@ Partial Class RH_CatCursos Dim RpNombreCurso As String = TxtCurso.Text - Dim RpFechas As String = Now.ToString("dd/MM/yyyy") + Dim RpFechas As String = NowADS().ToString("dd/MM/yyyy") Dim RpTema As String = DDlTema.SelectedItem.Text Dim RpSubTema As String = DDLSubtema.SelectedItem.Text Dim RpCapacitador As String = DDLCapacitador.SelectedItem.Text @@ -418,7 +418,7 @@ Partial Class RH_CatCursos ChkEstatus.Checked = True ChkConstancias.Checked = False - txtInicio.Text = Now.ToString("dd/MM/yyyy") + txtInicio.Text = NowADS().ToString("dd/MM/yyyy") TxtHoraEntrada.Text = "" TxtUbicacion.Text = "" @@ -625,7 +625,7 @@ Partial Class RH_CatCursos Response.Clear() Response.ContentType = "application/force-download" - Response.AddHeader("content-disposition", "attachment; filename=" & CvePersonal & "_Constancia_Curso_" & _CveCurso & "_" & Now.ToString("yyyyMMddhhmmss") & ".docx") + Response.AddHeader("content-disposition", "attachment; filename=" & CvePersonal & "_Constancia_Curso_" & _CveCurso & "_" & NowADS().ToString("yyyyMMddhhmmss") & ".docx") Response.BinaryWrite(DocumenBitArray) Response.End() End If diff --git a/RH/CatPersonal.aspx.vb b/RH/CatPersonal.aspx.vb index 0a03c35dc..f6f4e2b7e 100644 --- a/RH/CatPersonal.aspx.vb +++ b/RH/CatPersonal.aspx.vb @@ -42,7 +42,7 @@ Partial Class RH_CatPersonal HplAddVenta.Visible = False End If LnkAddPersonalSimplificado.Visible = Not HplAddVenta.Visible - TxtFechaIngreso.Text = String.Format("{0:dd/MM/yyyy}", DateTime.Now) + TxtFechaIngreso.Text = String.Format("{0:dd/MM/yyyy}", NowADS()) ViewState("Orden") = "" CargaEscolaridad() CargaEstadoCivil() @@ -688,7 +688,7 @@ Partial Class RH_CatPersonal 'params.Add(New ReportParameter("FechaInicio", FechaI)) 'params.Add(New ReportParameter("FechaFin", FechaF)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) ImprimirPDF("Empresas\Grales\Formatos\RepPersonal.rdlc", DTDatos, params, "ReporteTareas", Formato:=Formato) @@ -733,7 +733,7 @@ Partial Class RH_CatPersonal Response.Clear() - Response.AddHeader("content-disposition", $"attachment;filename=personalizado_{Now.ToString("yyyyMMddhhmmss")}.xls") + Response.AddHeader("content-disposition", $"attachment;filename=personalizado_{NowADS().ToString("yyyyMMddhhmmss")}.xls") Response.AddHeader("Content-Length", memoryStream.Length.ToString()) Response.ContentType = "application/octet-stream" memoryStream.WriteTo(Response.OutputStream) @@ -1162,8 +1162,8 @@ Partial Class RH_CatPersonal ' libro.Range(1, 2, 2, 6).Style.Font.SetFontSize(16) ' libro.Range(2, 2, 2, 6).Style.Font.SetFontSize(14) ' libro.Range(1, 2, 2, 6).Style.Alignment.Horizontal = ClosedXML.Excel.XLAlignmentHorizontalValues.Center - ' libro.Range(2, 7, 2, 9).Merge().Value = $"Fecha:{DateTime.Now}" - ' libro.Range(3, 7, 3, 9).Merge().Value = $"Hora:{DateTime.Now}" + ' libro.Range(2, 7, 2, 9).Merge().Value = $"Fecha:{NowADS()}" + ' libro.Range(3, 7, 3, 9).Merge().Value = $"Hora:{NowADS()}" ' End If 'End Using End Sub diff --git a/RH/DocumentacionVencida.aspx.vb b/RH/DocumentacionVencida.aspx.vb index 96c305c3c..cc51720c5 100644 --- a/RH/DocumentacionVencida.aspx.vb +++ b/RH/DocumentacionVencida.aspx.vb @@ -10,8 +10,8 @@ Partial Class RH_DocumentacionVencida Private Sub RH_DocumentacionVencida_Load(sender As Object, e As EventArgs) Handles Me.Load If Not Page.IsPostBack Then CargaCombos() - TxtFechaI.Text = Now.AddDays(-15).ToString("dd/MM/yyyy") - TxtFechaF.Text = Now.ToString("dd/MM/yyyy") + TxtFechaI.Text = NowADS().AddDays(-15).ToString("dd/MM/yyyy") + TxtFechaF.Text = NowADS().ToString("dd/MM/yyyy") End If End Sub diff --git a/RH/ListaAsistenciaRH.aspx.vb b/RH/ListaAsistenciaRH.aspx.vb index b4e574491..acf0aa119 100644 --- a/RH/ListaAsistenciaRH.aspx.vb +++ b/RH/ListaAsistenciaRH.aspx.vb @@ -23,7 +23,7 @@ Partial Class RH_ListaAsistenciaRH Private Sub RH_ListaAsistencia_Load(sender As Object, e As EventArgs) Handles Me.Load If Not Page.IsPostBack Then - txtFecha.Text = Now.ToShortDateString + txtFecha.Text = NowADS().ToShortDateString CveSupervisor = UsuarioActual.CvePersonal CargaCombos() CargaDatos() diff --git a/RH/MiPerfil.aspx.vb b/RH/MiPerfil.aspx.vb index 8a4cdf9d8..cae26c273 100644 --- a/RH/MiPerfil.aspx.vb +++ b/RH/MiPerfil.aspx.vb @@ -104,7 +104,7 @@ Partial Class RH_MiPerfil Private Property VacInicioPeriodo As Date Get If ViewState("VacInicioPeriodo") Is Nothing Then - Return Now + Return NowADS() Else Return DirectCast(ViewState("VacInicioPeriodo"), Date) End If @@ -116,7 +116,7 @@ Partial Class RH_MiPerfil Private Property VacFinPeriodo As Date Get If ViewState("VacFinPeriodo") Is Nothing Then - Return Now + Return NowADS() Else Return DirectCast(ViewState("VacFinPeriodo"), Date) End If @@ -559,7 +559,7 @@ Partial Class RH_MiPerfil Dim ObjRH As New ClsRH - If ObjRH.ChecadorPermisosGet(-1, "-1", CvePersonal, Now.AddMonths(-3), Now.AddMonths(2), -1, -1, UsuarioActual.CveEmpresa) Then + If ObjRH.ChecadorPermisosGet(-1, "-1", CvePersonal, NowADS().AddMonths(-3), NowADS().AddMonths(2), -1, -1, UsuarioActual.CveEmpresa) Then GvPermisos.DataSource = ObjRH.DtResultados Else GvPermisos.DataSource = Nothing @@ -797,8 +797,8 @@ Partial Class RH_MiPerfil VacCveSupervisor = objRH.DtResultados(0)("SupervisorCorreo").ToString.ToEntero Else - VacInicioPeriodo = Now - VacFinPeriodo = Now + VacInicioPeriodo = NowADS() + VacFinPeriodo = NowADS() VacAnios = 0 VacDias = 0 VacDiasUsados = 0 @@ -851,7 +851,7 @@ Partial Class RH_MiPerfil Dim diasPermiso As String = GvRow.DataKey("Dias") Dim MotivoPermiso As String = GvRow.DataKey("Motivo") Dim Puesto As String = puestoProp - Dim Fecha As String = DateTime.Now.ToString("dd/MM/yyyy") + Dim Fecha As String = NowADS().ToString("dd/MM/yyyy") Dim Solicitante As String = UsuarioActual.Nombre Dim anio As Integer = GvRow.DataKey("FechaInicio").ToDate().Year If Periodoingreso > PeriodoInicio Then @@ -893,7 +893,7 @@ Partial Class RH_MiPerfil Response.Clear() Response.ContentType = "application/force-download" - Response.AddHeader("content-disposition", "attachment; filename=" & CvePersonal & "_Solicitud_Vacaciones_" & Now.ToString("yyyyMMddhhmmss") & ".pdf") + Response.AddHeader("content-disposition", "attachment; filename=" & CvePersonal & "_Solicitud_Vacaciones_" & NowADS().ToString("yyyyMMddhhmmss") & ".pdf") Response.BinaryWrite(bytesInStream) Response.End() @@ -949,8 +949,8 @@ Partial Class RH_MiPerfil ListaTagsDocumentost.Add(New TagsDocumentos("{CUIP}", "")) ListaTagsDocumentost.Add(New TagsDocumentos("{Denominacion}", "")) ListaTagsDocumentost.Add(New TagsDocumentos("{FechaNacimiento}", objRH.DtResultados(0)("FechaNacimiento").ToString.ToDate.ToString("dd/MM/yyyy"))) - Dim fechaActual As String = " " & Now.Day & " del mes " & Now.Month & " del año " & Now.Year - Dim FechaActualDF As String = Now.ToString("dd/MM/yyyy") + Dim fechaActual As String = " " & NowADS().Day & " del mes " & NowADS().Month & " del año " & NowADS().Year + Dim FechaActualDF As String = NowADS().ToString("dd/MM/yyyy") ListaTagsDocumentost.Add(New TagsDocumentos("{FechaActual}", fechaActual)) ListaTagsDocumentost.Add(New TagsDocumentos("{FechaActualDF}", FechaActualDF)) End If @@ -1007,7 +1007,7 @@ Partial Class RH_MiPerfil Response.Clear() Response.ContentType = "application/force-download" - Response.AddHeader("content-disposition", "attachment; filename=" & CvePersonal & "_Solicituddepermiso_" & Now.ToString("yyyyMMddhhmmss") & ".pdf") + Response.AddHeader("content-disposition", "attachment; filename=" & CvePersonal & "_Solicituddepermiso_" & NowADS().ToString("yyyyMMddhhmmss") & ".pdf") Response.BinaryWrite(bytesInStream) Response.End() Else @@ -1545,7 +1545,7 @@ end_of_for: Else 'GUARDA SOLICITUDES NUEVAS - CveSolicitudViatico = ObjBancos.AddSolicitudesViaticos(TxtFolio.Text, DdlEstatus.SelectedValue.ToEntero(), DdlPersonal.SelectedValue.ToEntero(), TxtDestino.Text, TxtAsunto.Text, TxtFechaSalida.Text, TxtFechaRegreso.Text, DateTime.Now, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TipoCarro:=TxtTipoCarro.Text, KM:=TxtKM.Text) + CveSolicitudViatico = ObjBancos.AddSolicitudesViaticos(TxtFolio.Text, DdlEstatus.SelectedValue.ToEntero(), DdlPersonal.SelectedValue.ToEntero(), TxtDestino.Text, TxtAsunto.Text, TxtFechaSalida.Text, TxtFechaRegreso.Text, NowADS(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TipoCarro:=TxtTipoCarro.Text, KM:=TxtKM.Text) If (CveSolicitudViatico > 0) Then For Each RowConcepto As DataRow In DTConceptosDetalles.Rows @@ -1734,7 +1734,7 @@ end_of_for: params.Add(New ReportParameter("TelefonoSolicitante", ObjBancos.DtResultados.FiltroPrimeroValor("TelefonoPersonal"))) params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToShortDateString())) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToShortDateString())) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) params.Add(New ReportParameter("TotalADepositar", If(ObjBancos.DtResultados.FiltroPrimeroValor("TotalADepositar").ToDouble() > 0, ObjBancos.DtResultados.FiltroPrimeroValor("TotalADepositar"), "0").ToString())) @@ -1797,7 +1797,7 @@ end_of_for: Else 'GUARDA SOLICITUDES NUEVAS - CveSolicitudViatico = ObjBancos.AddSolicitudesViaticos(TxtFolio.Text, DdlEstatus.SelectedValue.ToEntero(), DdlPersonal.SelectedValue.ToEntero(), TxtDestino.Text, TxtAsunto.Text, TxtFechaSalida.Text, TxtFechaRegreso.Text, DateTime.Now, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TipoCarro:=TxtTipoCarro.Text, KM:=TxtKM.Text) + CveSolicitudViatico = ObjBancos.AddSolicitudesViaticos(TxtFolio.Text, DdlEstatus.SelectedValue.ToEntero(), DdlPersonal.SelectedValue.ToEntero(), TxtDestino.Text, TxtAsunto.Text, TxtFechaSalida.Text, TxtFechaRegreso.Text, NowADS(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TipoCarro:=TxtTipoCarro.Text, KM:=TxtKM.Text) If (CveSolicitudViatico > 0) Then For Each RowConcepto As DataRow In DTConceptosDetalles.Rows diff --git a/RH/Personal.aspx b/RH/Personal.aspx index 9bcecc251..c1a0d55b4 100644 --- a/RH/Personal.aspx +++ b/RH/Personal.aspx @@ -398,7 +398,7 @@
    - +
    diff --git a/RH/Personal.aspx.vb b/RH/Personal.aspx.vb index bc1bb755f..3c4d3394b 100644 --- a/RH/Personal.aspx.vb +++ b/RH/Personal.aspx.vb @@ -203,7 +203,7 @@ Partial Class RH_Personal Private Property FechaLimite As Date Get If ViewState("FechaLimite") Is Nothing Then - Return Date.Now.AddDays(15) + Return NowADS().AddDays(15) Else Return ViewState("FechaLimite").ToString().ToDate End If @@ -438,7 +438,7 @@ Partial Class RH_Personal Private Property VacInicioPeriodo As Date Get If ViewState("VacInicioPeriodo") Is Nothing Then - Return Now + Return NowADS() Else Return DirectCast(ViewState("VacInicioPeriodo"), Date) End If @@ -450,7 +450,7 @@ Partial Class RH_Personal Private Property VacFinPeriodo As Date Get If ViewState("VacFinPeriodo") Is Nothing Then - Return Now + Return NowADS() Else Return DirectCast(ViewState("VacFinPeriodo"), Date) End If @@ -1009,7 +1009,7 @@ Partial Class RH_Personal LoadDefaultValues() ImgAddObs.Visible = False - LblFechaCaptura.Text = Now.ToShortDateString() + LblFechaCaptura.Text = NowADS().ToShortDateString() LblUsuarioCapturo.Text = UsuarioActual.Usuario ViewState("CvePersonal") = -1 BtnEliminar.Visible = False @@ -1106,13 +1106,13 @@ Partial Class RH_Personal CargaClientes() Dim fechainicioasistencia As String Dim fechaFinasistencia As String - If Now.Day >= 15 Then - fechainicioasistencia = String.Format("{0:16/MM/yyyy}", Now) - Dim dateendasis As DateTime = String.Format("{0:01/MM/yyyy}", Now).ToDateTime().AddMonths(1).AddDays(-1) + If NowADS().Day >= 15 Then + fechainicioasistencia = String.Format("{0:16/MM/yyyy}", NowADS()) + Dim dateendasis As DateTime = String.Format("{0:01/MM/yyyy}", NowADS()).ToDateTime().AddMonths(1).AddDays(-1) fechaFinasistencia = String.Format("{0:dd/MM/yyyy}", dateendasis) Else - fechainicioasistencia = String.Format("{0:01/MM/yyyy}", Now) - fechaFinasistencia = String.Format("{0:15/MM/yyyy}", Now) + fechainicioasistencia = String.Format("{0:01/MM/yyyy}", NowADS()) + fechaFinasistencia = String.Format("{0:15/MM/yyyy}", NowADS()) End If If Request("FechaI") IsNot Nothing AndAlso IsDate(Request("FechaI")) Then txtFechaI.Text = Request("FechaI") @@ -1138,8 +1138,8 @@ Partial Class RH_Personal End If End If - TxtFechaICredito.Text = $"01/01/{Now.Year}" - TxtFechaFCredito.Text = Now.ToShortDateString + TxtFechaICredito.Text = $"01/01/{NowADS().Year}" + TxtFechaFCredito.Text = NowADS().ToShortDateString If UsuarioActual.Empresa.Funcionalidad(509) = "1" Then divCliente.Visible = True @@ -1947,11 +1947,11 @@ Partial Class RH_Personal End If If VacDiasDisponibles > 0 Then - TxtFechaInicioVac.Text = Now.AddDays(1).ToString("dd/MM/yyyy") + TxtFechaInicioVac.Text = NowADS().AddDays(1).ToString("dd/MM/yyyy") Else - TxtFechaInicioVac.Text = Now.ToString("dd/MM/yyyy") + TxtFechaInicioVac.Text = NowADS().ToString("dd/MM/yyyy") End If - TxtFechaFinVac.Text = Now.AddDays(VacDiasDisponibles).ToString("dd/MM/yyyy") + TxtFechaFinVac.Text = NowADS().AddDays(VacDiasDisponibles).ToString("dd/MM/yyyy") 'PERSONAL ALTAS If ObjPersonal.GetPersonalAltas(CvePersonal) Then @@ -2256,7 +2256,7 @@ Partial Class RH_Personal ' objRH.Dispose() ' Cuerpo.AppendLine("") - ' Cuerpo.AppendLine($"") + ' Cuerpo.AppendLine($"") ' Cuerpo.AppendLine($"") ' Cuerpo.AppendLine("
    { EmpresaDestino }
    { Now.ToShortDateString } { Now.ToShortTimeString }
    { EmpresaDestino }
    { NowADS().ToShortDateString } { NowADS().ToShortTimeString }
    Notificacion por Alta de Nomina
    ") @@ -3761,7 +3761,7 @@ Partial Class RH_Personal params.Add(New ReportParameter("Numero", ObjPersonal.NumExt)) params.Add(New ReportParameter("Interior", ObjPersonal.NumInt)) params.Add(New ReportParameter("Colonia", ObjPersonal.Colonia)) - params.Add(New ReportParameter("CP", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("CP", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("Ciudad", ObjPersonal.CP)) params.Add(New ReportParameter("Estado", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("Telefono", ObjPersonal.Telefono)) @@ -3769,7 +3769,7 @@ Partial Class RH_Personal params.Add(New ReportParameter("Beneficiario", ObjPersonal.Beneficiario)) params.Add(New ReportParameter("Celular", ObjPersonal.Celular)) params.Add(New ReportParameter("Correo", ObjPersonal.Correo)) - params.Add(New ReportParameter("LugarNacimiento", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("LugarNacimiento", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("CredencialElector", ObjPersonal.CredencialElector)) params.Add(New ReportParameter("NombrePadre", ObjPersonal.NombrePadre)) params.Add(New ReportParameter("NombreMadre", ObjPersonal.NombreMadre)) @@ -3854,13 +3854,13 @@ Partial Class RH_Personal params.Add(New ReportParameter("Numero", ObjPersonal.NumExt)) params.Add(New ReportParameter("Interior", ObjPersonal.NumInt)) params.Add(New ReportParameter("Colonia", ObjPersonal.Colonia)) - params.Add(New ReportParameter("CP", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("CP", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("Ciudad", ObjPersonal.CP)) params.Add(New ReportParameter("Estado", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("Telefono", ObjPersonal.Telefono)) params.Add(New ReportParameter("Celular", ObjPersonal.Celular)) params.Add(New ReportParameter("Correo", ObjPersonal.Correo)) - params.Add(New ReportParameter("LugarNacimiento", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("LugarNacimiento", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("NombrePadre", ObjPersonal.NombrePadre)) params.Add(New ReportParameter("NombreMadre", ObjPersonal.NombreMadre)) params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) @@ -3899,10 +3899,10 @@ Partial Class RH_Personal params.Add(New ReportParameter("Banco", If(DdlBanco.SelectedValue = "-1", "", DdlBanco.SelectedItem.Text))) params.Add(New ReportParameter("NoCuenta", ObjPersonal.BancoNumCuenta)) params.Add(New ReportParameter("CLABE", ObjPersonal.CLABE)) - params.Add(New ReportParameter("Fecha", DateTime.Now.ToShortDateString)) + params.Add(New ReportParameter("Fecha", NowADS().ToShortDateString)) Dim edad As Integer - edad = Now.Year - ObjPersonal.FechaNacimiento.Year - If Now.Month < ObjPersonal.FechaNacimiento.Month OrElse (Now.Month = ObjPersonal.FechaNacimiento.Month AndAlso Now.Day < ObjPersonal.FechaNacimiento.Day) Then + edad = NowADS().Year - ObjPersonal.FechaNacimiento.Year + If NowADS().Month < ObjPersonal.FechaNacimiento.Month OrElse (NowADS().Month = ObjPersonal.FechaNacimiento.Month AndAlso NowADS().Day < ObjPersonal.FechaNacimiento.Day) Then edad = edad - 1 End If @@ -3950,7 +3950,7 @@ Partial Class RH_Personal ' Dim objDoc As New clsGemBoxDocument(pathDesti) ' Dim objRH As New ClsRH - ' Dim FechaActual As String = Now.Day.ToString("0#") & " de " & CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(1).ToString() & " del " & Now.Year.ToString() + ' Dim FechaActual As String = NowADS().Day.ToString("0#") & " de " & CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(1).ToString() & " del " & NowADS().Year.ToString() ' objDoc.SustituirTags(objRH.GetDatosTagsDocumentos(CvePersonal, UsuarioActual.CveEmpresa)) @@ -4448,7 +4448,7 @@ Partial Class RH_Personal Dim objDoc As New clsGemBoxDocument(pathDesti) Dim objRH As New ClsRH - Dim FechaActual As String = Now.Day.ToString("0#") & " de " & CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(1).ToString() & " del " & Now.Year.ToString() + Dim FechaActual As String = NowADS().Day.ToString("0#") & " de " & CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(1).ToString() & " del " & NowADS().Year.ToString() objDoc.SustituirTags(objRH.GetDatosTagsDocumentos(CvePersonal, UsuarioActual.CveEmpresa)) @@ -4606,8 +4606,8 @@ Partial Class RH_Personal ListaTagsDocumentost.Add(New TagsDocumentos("{FechaNacimiento}", objRH.DtResultados(0)("FechaNacimiento").ToString().ToDate.ToString("dd/MM/yyyy"))) - Dim fechaActual As String = " " & Now.Day & " del mes " & Now.Month & " del año " & Now.Year - Dim FechaActualDF As String = Now.ToString("dd/MM/yyyy") + Dim fechaActual As String = " " & NowADS().Day & " del mes " & NowADS().Month & " del año " & NowADS().Year + Dim FechaActualDF As String = NowADS().ToString("dd/MM/yyyy") ListaTagsDocumentost.Add(New TagsDocumentos("{FechaActual}", fechaActual)) ListaTagsDocumentost.Add(New TagsDocumentos("{FechaActualDF}", FechaActualDF)) End If @@ -4750,8 +4750,8 @@ Partial Class RH_Personal ' End If - ' Dim fechaActual As String = " " & Now.Day & " del mes " & Now.Month & " del año " & Now.Year - ' Dim FechaActualDF As String = Now.ToString("dd/MM/yyyy") + ' Dim fechaActual As String = " " & NowADS().Day & " del mes " & NowADS().Month & " del año " & NowADS().Year + ' Dim FechaActualDF As String = NowADS().ToString("dd/MM/yyyy") ' ListaTagsDocumentost.Add(New TagsDocumentos("{FechaActual}", fechaActual)) ' ListaTagsDocumentost.Add(New TagsDocumentos("{FechaActualDF}", FechaActualDF)) @@ -4782,7 +4782,7 @@ Partial Class RH_Personal 'If Obj.CFDICancelar(UsuarioActual.Empresa, FolioFiscal, Total, RFCReceptor, UsuarioActual.Empresa.RFC) Then ' Dim ObjNomina As New ClsNominas() - ' ObjNomina.UpdateEstatusNomNominas(2, -1, "", "", Now, CveNomina) + ' ObjNomina.UpdateEstatusNomNominas(2, -1, "", "", NowADS(), CveNomina) ' ObjNomina.Dispose() ' Alert("La nómina se canceló correctamente.", TipoMensaje.MsgInformacion) 'End If @@ -4932,8 +4932,8 @@ Partial Class RH_Personal VacCveSupervisor = objRH.DtResultados(0)("SupervisorCorreo").ToString().ToEntero() Else - VacInicioPeriodo = Now - VacFinPeriodo = Now + VacInicioPeriodo = NowADS() + VacFinPeriodo = NowADS() VacAnios = 0 VacDias = 0 VacDiasUsados = 0 @@ -5101,7 +5101,7 @@ Partial Class RH_Personal ' Dim objDoc As New clsGemBoxDocument(pathDesti) - ' Dim FechaActual As String = Now.Day.ToString("0#") & " de " & CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(1).ToString() & " del " & Now.Year.ToString() + ' Dim FechaActual As String = NowADS().Day.ToString("0#") & " de " & CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(1).ToString() & " del " & NowADS().Year.ToString() @@ -5138,7 +5138,7 @@ Partial Class RH_Personal ' ListaTagsDocumentost.Add(New TagsDocumentos("{FechaI}", TxtFechaInicioVac.Text)) ' ListaTagsDocumentost.Add(New TagsDocumentos("{FechaF}", TxtFechaFinVac.Text)) - ' ListaTagsDocumentost.Add(New TagsDocumentos("{Fecha}", Now.ToString("dd/MM/yyyy"))) + ' ListaTagsDocumentost.Add(New TagsDocumentos("{Fecha}", NowADS().ToString("dd/MM/yyyy"))) ' ListaTagsDocumentost.Add(New TagsDocumentos("{Reemplazo}", DdlPermisosReemplazo.SelectedItem.Text)) @@ -5291,7 +5291,7 @@ Partial Class RH_Personal Dim diasPermiso As String = GvRow.DataKey("Dias") Dim MotivoPermiso As String = GvRow.DataKey("Motivo") Dim Puesto As String = DdlPuesto.SelectedItem.Value - Dim Fecha As String = DateTime.Now.ToString("dd/MM/yyyy") + Dim Fecha As String = NowADS().ToString("dd/MM/yyyy") Dim Solicitante As String = UsuarioActual.Nombre Dim anio As Integer = GvRow.DataKey("FechaInicio").ToDate().Year Dim FechaPeriodo As String = GvRow.DataKey("Periodo") @@ -5338,7 +5338,7 @@ Partial Class RH_Personal Response.Clear() Response.ContentType = "application/force-download" - Response.AddHeader("content-disposition", "attachment; filename=" & CvePersonal & "_Solicitud_Vacaciones_" & Now.ToString("yyyyMMddhhmmss") & ".pdf") + Response.AddHeader("content-disposition", "attachment; filename=" & CvePersonal & "_Solicitud_Vacaciones_" & NowADS().ToString("yyyyMMddhhmmss") & ".pdf") Response.BinaryWrite(bytesInStream) Response.End() Else @@ -5388,7 +5388,7 @@ Partial Class RH_Personal Response.Clear() Response.ContentType = "application/force-download" - Response.AddHeader("content-disposition", "attachment; filename=" & CvePersonal & "_Solicituddepermiso_" & Now.ToString("yyyyMMddhhmmss") & ".pdf") + Response.AddHeader("content-disposition", "attachment; filename=" & CvePersonal & "_Solicituddepermiso_" & NowADS().ToString("yyyyMMddhhmmss") & ".pdf") Response.BinaryWrite(bytesInStream) Response.End() Else @@ -5465,7 +5465,7 @@ Partial Class RH_Personal Response.Clear() Response.ContentType = "application/force-download" - Response.AddHeader("content-disposition", "attachment; filename=" & CvePersonal & "_Solicitud_Vacaciones_" & _Folio & "_" & Now.ToString("yyyyMMddhhmmss") & ".docx") + Response.AddHeader("content-disposition", "attachment; filename=" & CvePersonal & "_Solicitud_Vacaciones_" & _Folio & "_" & NowADS().ToString("yyyyMMddhhmmss") & ".docx") Response.BinaryWrite(bytesInStream) Response.End() @@ -5641,7 +5641,7 @@ Partial Class RH_Personal Response.Clear() Response.ContentType = "application/force-download" - Response.AddHeader("content-disposition", "attachment; filename=" & CvePersonal & "_Constancia_Curso_" & _CveCurso & "_" & Now.ToString("yyyyMMddhhmmss") & ".docx") + Response.AddHeader("content-disposition", "attachment; filename=" & CvePersonal & "_Constancia_Curso_" & _CveCurso & "_" & NowADS().ToString("yyyyMMddhhmmss") & ".docx") Response.BinaryWrite(DocumenBitArray) Response.End() @@ -5791,14 +5791,14 @@ Partial Class RH_Personal Dim Serie As String = TxtLiberarSerie.Text.Trim Dim Errores As String = "" - Dim CveResultadoSalida As Integer = ObjInventario.AddMovimiento(CveAlmacenUniforme, 3, 1, Date.Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CveAlmacenDestino:=DdlAlmacenDestinoLiberarUniforme.SelectedValue.ToEntero(), CvePersonal:=CvePersonal, Observaciones:=DescripcionUniforme) + Dim CveResultadoSalida As Integer = ObjInventario.AddMovimiento(CveAlmacenUniforme, 3, 1, NowADS(), -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CveAlmacenDestino:=DdlAlmacenDestinoLiberarUniforme.SelectedValue.ToEntero(), CvePersonal:=CvePersonal, Observaciones:=DescripcionUniforme) If CveResultadoSalida > 0 Then Dim ResultadoDetalleSalida As Boolean = ObjInventario.AddMovimientoDetalle(CveResultadoSalida, Cantidad, CveUM, CvePS, PU, CveSeccionAlmacen:=-3, Serie:=Serie, CveMovimientoDetalleEntrada:=CveMovimientoDetalleUniforme) Dim ResultadoDetalleEntrada As Boolean = False If ResultadoDetalleSalida Then Dim CveSeccionAlmacen As Integer = DdlSeccionAlmacen.SelectedValue.ToEntero() - Dim CveResultadoEntrada As Integer = ObjInventario.AddMovimiento(DdlAlmacenDestinoLiberarUniforme.SelectedValue.ToEntero(), 2, 1, Date.Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CvePersonal:=CvePersonal, Observaciones:=DescripcionUniforme, CveMovimientoRelacionado:=CveMovimientoUniforme) + Dim CveResultadoEntrada As Integer = ObjInventario.AddMovimiento(DdlAlmacenDestinoLiberarUniforme.SelectedValue.ToEntero(), 2, 1, NowADS(), -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CvePersonal:=CvePersonal, Observaciones:=DescripcionUniforme, CveMovimientoRelacionado:=CveMovimientoUniforme) If CveResultadoEntrada > 0 Then ResultadoDetalleEntrada = ObjInventario.AddMovimientoDetalle(CveResultadoEntrada, Cantidad, CveUM, CvePS, PU, CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie) If Not ResultadoDetalleEntrada Then @@ -5874,7 +5874,7 @@ Partial Class RH_Personal Next If File.Exists(UsuarioActual.Empresa.Ruta & "RH\Personal\" & CvePersonal & "." & FileExtension) Then Dim LogoRutaFisica As String = String.Format("Empresas\{0}\RH\Personal\{1}.{2}", UsuarioActual.CveEmpresa, CvePersonal, FileExtension) - Dim logouri As String = String.Format("{0}://{1}:{2}/ashx/sigfiles.ashx?P={3}&version={4}", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, Encripta(LogoRutaFisica), Now) + Dim logouri As String = String.Format("{0}://{1}:{2}/ashx/sigfiles.ashx?P={3}&version={4}", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, Encripta(LogoRutaFisica), NowADS()) ImgPersonal.ImageUrl = logouri End If UpImage.Update() @@ -5889,7 +5889,7 @@ Partial Class RH_Personal Dim ObjRH As New ClsRH Dim CvePersonal As Integer = If(IsNumeric(Request("CvePersonal")), Request("CvePersonal").ToString().ToEntero(), -1) - If ObjRH.ChecadorPermisosGet(-1, "-1", CvePersonal, Now.AddMonths(-3), Now.AddMonths(2), -1, -1, UsuarioActual.CveEmpresa) Then + If ObjRH.ChecadorPermisosGet(-1, "-1", CvePersonal, NowADS().AddMonths(-3), NowADS().AddMonths(2), -1, -1, UsuarioActual.CveEmpresa) Then GvPermisos.DataSource = ObjRH.DtResultados Else GvPermisos.DataSource = Nothing @@ -6127,7 +6127,7 @@ Partial Class RH_Personal ObjPersonal.Dispose() params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToShortDateString())) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToShortDateString())) params.Add(New ReportParameter("pImg", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) ImprimirPDF(RutaPDF, DTConsumos, params, $"RepConsumoPersonal - {CodigoP} {NombreCompletoP}", Formato) @@ -7019,7 +7019,7 @@ Partial Class RH_Personal End Sub Protected Sub LnkModsalario_Click(sender As Object, e As EventArgs) - TxtFechamodSalario.Text = DateTime.Now.ToString("dd/MM/yyyy") + TxtFechamodSalario.Text = NowADS().ToString("dd/MM/yyyy") TxtSalarioDiarioM.Text = TxtSalarioDiario.Text TxtSalarioDiarioImSS.Text = TxtSalarioCotizado.Text TxtSalarioDiarioIntegrado.Text = TxtSDI.Text @@ -7670,7 +7670,7 @@ Partial Class RH_Personal End If Tags.Add(New TagsDocumentos("{NombreCompleto}", ObjRH.NombreCompleto)) - Tags.Add(New TagsDocumentos("{años}", (DateTime.Now.Year - ObjRH.FechaNacimiento.Year).ToString())) + Tags.Add(New TagsDocumentos("{años}", (NowADS().Year - ObjRH.FechaNacimiento.Year).ToString())) Tags.Add(New TagsDocumentos("{SubProyecto}", DdlSubProyectoAsignado.SelectedItem.Text.ToUpper())) Tags.Add(New TagsDocumentos("{EstadoCivil}", DdlEstadoCivil.SelectedItem.Text)) @@ -7806,7 +7806,7 @@ Partial Class RH_Personal objRH.Dispose() Cuerpo.AppendLine("") - Cuerpo.AppendLine($"") + Cuerpo.AppendLine($"") Cuerpo.AppendLine($"") Cuerpo.AppendLine("
    { If(DdlEmpresaAsignada.SelectedValue.ToEntero > 0, DdlEmpresaAsignada.SelectedItem.Text, UsuarioActual.Empresa.Empresa) }
    { Now.ToShortDateString } { Now.ToShortTimeString }
    { If(DdlEmpresaAsignada.SelectedValue.ToEntero > 0, DdlEmpresaAsignada.SelectedItem.Text, UsuarioActual.Empresa.Empresa) }
    { NowADS().ToShortDateString } { NowADS().ToShortTimeString }
    Notificación por { TimpoMovimiento } de Nómina
    ") diff --git a/RH/Reclutamiento.aspx.vb b/RH/Reclutamiento.aspx.vb index a1e137583..bea4bc3d4 100644 --- a/RH/Reclutamiento.aspx.vb +++ b/RH/Reclutamiento.aspx.vb @@ -458,7 +458,7 @@ Partial Class RH_Reclutamiento Private Property FechaLimite As Date Get If ViewState("FechaLimite") Is Nothing Then - Return Date.Now.AddDays(15) + Return NowADS().AddDays(15) Else Return ViewState("FechaLimite").ToString.ToDate End If @@ -1115,7 +1115,7 @@ Partial Class RH_Reclutamiento If Not IsDBNull(objRH.DtResultados(0)("FechaInicioContrato")) Then If objRH.DtResultados(0)("FechaInicioContrato").ToString.ToDate().ToString("dd/MM/yyyy") = "01/01/0001" Then - TxtFechaInicio.Text = Now.ToShortDateString + TxtFechaInicio.Text = NowADS().ToShortDateString Else TxtFechaInicio.Text = objRH.DtResultados(0)("FechaInicioContrato").ToString.ToDate().ToString("dd/MM/yyyy") End If @@ -1586,7 +1586,7 @@ Partial Class RH_Reclutamiento Dim _ParientesEmpresaDetalle As String Dim _InfonavitNoCredito As String Dim CveCaptacion As Integer = If(DdlCaptacion.SelectedValue.ToEntero = 0, -1, DdlCaptacion.SelectedValue.ToEntero) - Edad = Now.Year - TxtFechaN4.Text.ToDate.Year + Edad = NowADS().Year - TxtFechaN4.Text.ToDate.Year If TxtParientesEmpresaDetalle.Text.Trim.Length > 0 Then _ParientesEmpresaDetalle = TxtParientesEmpresaDetalle.Text.Trim @@ -3001,7 +3001,7 @@ Partial Class RH_Reclutamiento Dim objDoc As New clsGemBoxDocument(pathDesti) Dim objRH As New ClsRH - Dim FechaActual As String = Now.Day.ToString("0#") & " de " & CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(1).ToString & " del " & Now.Year.ToString() + Dim FechaActual As String = NowADS().Day.ToString("0#") & " de " & CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(1).ToString & " del " & NowADS().Year.ToString() objDoc.SustituirTags(objRH.GetDatosTagsDocumentos(CvePersonal, UsuarioActual.CveEmpresa)) @@ -3725,7 +3725,7 @@ Partial Class RH_Reclutamiento Dim CveCaracteristicaOpcion As Integer = -1 Dim CaracteristicaValor As String = "" - Dim CaracteristicaValorDate As Date = Now + Dim CaracteristicaValorDate As Date = NowADS() Dim CaracteristicaValorInt As Integer = -1 @@ -5363,7 +5363,7 @@ Partial Class RH_Reclutamiento End If Dim CveCaptacion As Integer = If(DdlCaptacion.SelectedValue.ToEntero = 0, -1, DdlCaptacion.SelectedValue.ToEntero) - Edad = Now.Year - TxtFechaN4.Text.ToDate.Year + Edad = NowADS().Year - TxtFechaN4.Text.ToDate.Year If ValidaGuardaFirmaContratoEvento() Then If objRh.PersonalReclutamientoUpdate(CvePersonal, TxtNombres4.Text, TxtAPaterno4.Text, TxtAmaterno4.Text, TxtEstatura4.Text.ToDecimal, TxtPeso4.Text.ToDecimal, @@ -5696,7 +5696,7 @@ Partial Class RH_Reclutamiento objRH.Dispose() Cuerpo.AppendLine("") - Cuerpo.AppendLine($"") + Cuerpo.AppendLine($"") Cuerpo.AppendLine("") Cuerpo.AppendLine("
    { UsuarioActual.Empresa.Empresa }
    { Now.ToShortDateString } { Now.ToShortTimeString }
    { UsuarioActual.Empresa.Empresa }
    { NowADS().ToShortDateString } { NowADS().ToShortTimeString }
    Notificacion por Alta de Nomina
    ") diff --git a/RH/RepAsistencias.aspx.vb b/RH/RepAsistencias.aspx.vb index 4c553ce84..ae6c18679 100644 --- a/RH/RepAsistencias.aspx.vb +++ b/RH/RepAsistencias.aspx.vb @@ -16,8 +16,8 @@ Partial Class RH_RepAsistencias CargaTurnos() CargaTiposPeriodo() - TxtFechaAsistenciaFin.Text = Now.ToShortDateString - TxtFechaAsistencia.Text = $"01/{Now.ToString("MM")}/{Now.Year}" + TxtFechaAsistenciaFin.Text = NowADS().ToShortDateString + TxtFechaAsistencia.Text = $"01/{NowADS().ToString("MM")}/{NowADS().Year}" If UsuarioActual.Empresa.Funcionalidad(267) = "1" Then ' emp citricola divCliente.Visible = False LblCliente.Visible = False @@ -106,7 +106,7 @@ Partial Class RH_RepAsistencias LnkExportar.Visible = False GvOcultarColumnas() - If TxtFechaAsistencia.Text.Trim.ToDate.Year.Contiene(Now.Year - 1, Now.Year, Now.Year + 1) Then + If TxtFechaAsistencia.Text.Trim.ToDate.Year.Contiene(NowADS().Year - 1, NowADS().Year, NowADS().Year + 1) Then Dim objpersonal As New ClsRH Dim dtTemp As New DataTable diff --git a/RH/RepAusentismoLaboral.aspx.vb b/RH/RepAusentismoLaboral.aspx.vb index 9840d048b..5fce6356f 100644 --- a/RH/RepAusentismoLaboral.aspx.vb +++ b/RH/RepAusentismoLaboral.aspx.vb @@ -9,8 +9,8 @@ Partial Class RH_RepAusentismoLaboral Private Sub Ventas_RepIndiceRotacionPersonal_Load(sender As Object, e As EventArgs) Handles Me.Load If Not IsPostBack Then - txtInicio.Text = Date.Now.AddDays(-30).ToString("dd/MM/yyyy") - txtFin.Text = Date.Now.ToString("dd/MM/yyyy") + txtInicio.Text = NowADS().AddDays(-30).ToString("dd/MM/yyyy") + txtFin.Text = NowADS().ToString("dd/MM/yyyy") CargaProyecto() CargaTurnos() @@ -61,8 +61,8 @@ Partial Class RH_RepAusentismoLaboral Dim CveSubproyecto As Integer = -1 Dim CveTurno As Integer = -1 - Dim FechaInicio As Date = Date.Now.AddDays(-30) - Dim FechaFin As Date = Date.Now + Dim FechaInicio As Date = NowADS().AddDays(-30) + Dim FechaFin As Date = NowADS() FechaInicio = Date.Parse(txtInicio.Text) diff --git a/RH/RepBuzonCalidad.aspx.vb b/RH/RepBuzonCalidad.aspx.vb index a4ee140d9..ffad032c9 100644 --- a/RH/RepBuzonCalidad.aspx.vb +++ b/RH/RepBuzonCalidad.aspx.vb @@ -77,6 +77,6 @@ Partial Class RH_RepBuzonCalidad End Sub Protected Sub ImgExcel_Click(sender As Object, e As System.EventArgs) Handles ImgExcel.Click - GvDatos.ExportToExcel("ReporteVentas" & Now.ToShortDateString) + GvDatos.ExportToExcel("ReporteVentas" & NowADS().ToShortDateString) End Sub End Class diff --git a/RH/RepChecadorPreAsistencia.aspx.vb b/RH/RepChecadorPreAsistencia.aspx.vb index a364806ee..a4d324905 100644 --- a/RH/RepChecadorPreAsistencia.aspx.vb +++ b/RH/RepChecadorPreAsistencia.aspx.vb @@ -523,7 +523,7 @@ Partial Class RH_RepChecadorPreAsistencia End If - If Fecha >= Now Then + If Fecha >= NowADS() Then ReRow("Asistio") = "True" ReRow("CveAsistenciasInasistencias") = CveASistenciaInasistenciaAsistio ReRow("PorcentajePago") = "100" @@ -643,7 +643,7 @@ Partial Class RH_RepChecadorPreAsistencia DTHorarioPersonal = DTHorarios.FiltraParametros(" CveChecadorHorario = " & dRow("CveChecadorHorario").ToString().ToEntero & "") - If Fecha >= Now Then + If Fecha >= NowADS() Then ReRow("Asistio") = "True" ReRow("CveAsistenciasInasistencias") = CveASistenciaInasistenciaAsistio Else @@ -859,7 +859,7 @@ Partial Class RH_RepChecadorPreAsistencia ColumN = ColumN + 1 Next - Dim medida As DateTime = Now + Dim medida As DateTime = NowADS() For Each pRow As DataRow In DtPersonal.Rows @@ -941,7 +941,7 @@ Partial Class RH_RepChecadorPreAsistencia Next - Dim SalidaTiempo As Integer = (Now - medida).TotalSeconds.ToString().ToEntero + Dim SalidaTiempo As Integer = (NowADS() - medida).TotalSeconds.ToString().ToEntero SalidaTiempo = SalidaTiempo DtDatosTabla = dt @@ -1326,7 +1326,7 @@ Partial Class RH_RepChecadorPreAsistencia FechaLoop = FechaInicialPeriodos - While FechaLoop <= Now + While FechaLoop <= NowADS() Dim Drow As DataRow = DTRespuesta.NewRow Drow("Orden") = ContadorOrden.ToString() ContadorOrden += 1 diff --git a/RH/RepCursos.aspx.vb b/RH/RepCursos.aspx.vb index a004e13e6..39c63903c 100644 --- a/RH/RepCursos.aspx.vb +++ b/RH/RepCursos.aspx.vb @@ -8,8 +8,8 @@ Partial Class RH_RepCursos If Not Page.IsPostBack Then Dim fActual As New Date - TxtFechaI.Text = Now.AddDays(-60).ToString("dd/MM/yyyy") - TxtFechaF.Text = Now.ToString("dd/MM/yyyy") + TxtFechaI.Text = NowADS().AddDays(-60).ToString("dd/MM/yyyy") + TxtFechaF.Text = NowADS().ToString("dd/MM/yyyy") CargaCombos() diff --git a/RH/RepDocumentacionVencida.aspx.vb b/RH/RepDocumentacionVencida.aspx.vb index 203178fa7..60baa89e6 100644 --- a/RH/RepDocumentacionVencida.aspx.vb +++ b/RH/RepDocumentacionVencida.aspx.vb @@ -45,8 +45,8 @@ Partial Class RH_RepDocumentacionVencida Private Sub RH_DocumentacionVencida_Load(sender As Object, e As EventArgs) Handles Me.Load If Not Page.IsPostBack Then CargaCombos() - TxtFechaI.Text = Now.AddMonths(-3).ToString("dd/MM/yyyy") - TxtFechaF.Text = Now.ToString("dd/MM/yyyy") + TxtFechaI.Text = NowADS().AddMonths(-3).ToString("dd/MM/yyyy") + TxtFechaF.Text = NowADS().ToString("dd/MM/yyyy") LnkDescargarExcel.Visible = False End If 'ExportaExcel() @@ -194,7 +194,7 @@ Partial Class RH_RepDocumentacionVencida Dim documento As ExcelFile Dim ws As ExcelWorksheet Dim NombreReporte As String = "REPORTE DE DOCUMENTACIÓN" - Dim TextoFecha As String = "Fecha: " & Now.ToString(" dd/MM/yyyy hh:mm:ss tt") + Dim TextoFecha As String = "Fecha: " & NowADS().ToString(" dd/MM/yyyy hh:mm:ss tt") documento = New ExcelFile ws = documento.Worksheets.Add("ReporteDocumentacion") @@ -253,7 +253,7 @@ Partial Class RH_RepDocumentacionVencida Response.Clear() Response.ContentType = "application/force-download" - Response.AddHeader("content-disposition", "attachment; filename=" & NombreReporte & "_" & Now.ToString("yyyyMMddhhmmss") & ".xlsx") + Response.AddHeader("content-disposition", "attachment; filename=" & NombreReporte & "_" & NowADS().ToString("yyyyMMddhhmmss") & ".xlsx") Response.BinaryWrite(bytesInStream) Response.End() memoryStream.Dispose() diff --git a/RH/RepIndiceRotacionPersonal.aspx.vb b/RH/RepIndiceRotacionPersonal.aspx.vb index f2b71e8b7..9c0b97777 100644 --- a/RH/RepIndiceRotacionPersonal.aspx.vb +++ b/RH/RepIndiceRotacionPersonal.aspx.vb @@ -23,8 +23,8 @@ Partial Class Ventas_RepIndiceRotacionPersonal Private Sub Ventas_RepIndiceRotacionPersonal_Load(sender As Object, e As EventArgs) Handles Me.Load If Not IsPostBack Then - txtInicio.Text = Date.Now.AddDays(-30).ToString("dd/MM/yyyy") - txtFin.Text = Date.Now.ToString("dd/MM/yyyy") + txtInicio.Text = NowADS().AddDays(-30).ToString("dd/MM/yyyy") + txtFin.Text = NowADS().ToString("dd/MM/yyyy") CargaProyecto() CargaTurnos() @@ -75,8 +75,8 @@ Partial Class Ventas_RepIndiceRotacionPersonal Dim CveSubproyecto As Integer = -1 Dim CveTurno As Integer = -1 - Dim FechaInicio As Date = Date.Now.AddDays(-30) - Dim FechaFin As Date = Date.Now + Dim FechaInicio As Date = NowADS().AddDays(-30) + Dim FechaFin As Date = NowADS() FechaInicio = Date.Parse(txtInicio.Text) @@ -160,7 +160,7 @@ Partial Class Ventas_RepIndiceRotacionPersonal params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("FechaInicial", txtInicio.Text)) params.Add(New ReportParameter("FechaFinal", txtFin.Text)) - params.Add(New ReportParameter("FechaRealizado", Date.Now().ToString())) + params.Add(New ReportParameter("FechaRealizado", NowADS().ToString())) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) diff --git a/RH/RepPersonalInconsistencias.aspx.vb b/RH/RepPersonalInconsistencias.aspx.vb index 96df411ef..1534abc56 100644 --- a/RH/RepPersonalInconsistencias.aspx.vb +++ b/RH/RepPersonalInconsistencias.aspx.vb @@ -205,15 +205,15 @@ Partial Class RH_RepPersonalInconsistencias GenerarPDF(2) End Sub Protected Sub ImgExcel0_Click(sender As Object, e As EventArgs) Handles ImgExcel0.Click - 'GvDatos.ExportToExcel("ReporteVentas" & Now.ToShortDateString) + 'GvDatos.ExportToExcel("ReporteVentas" & NowADS().ToShortDateString) GenerarPDF(0, "Excel") End Sub Protected Sub ImgExcel1_Click(sender As Object, e As EventArgs) Handles ImgExcel1.Click - 'GvDatos.ExportToExcel("ReporteVentas" & Now.ToShortDateString) + 'GvDatos.ExportToExcel("ReporteVentas" & NowADS().ToShortDateString) GenerarPDF(1, "Excel") End Sub Protected Sub ImgExcel2_Click(sender As Object, e As EventArgs) Handles ImgExcel2.Click - 'GvDatos.ExportToExcel("ReporteVentas" & Now.ToShortDateString) + 'GvDatos.ExportToExcel("ReporteVentas" & NowADS().ToShortDateString) GenerarPDF(2, "Excel") End Sub @@ -254,11 +254,11 @@ Partial Class RH_RepPersonalInconsistencias 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("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("Filtros", StrFiltro.ToString)) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) - ImprimirPDF($"Empresas/Grales/Formatos/{rdlc}", DT, params, String.Format("{0}-{1}", NombreReporte, Now.ToDateTime.ToShortDateString), Formato:=Formato) + ImprimirPDF($"Empresas/Grales/Formatos/{rdlc}", DT, params, String.Format("{0}-{1}", NombreReporte, NowADS().ToDateTime.ToShortDateString), Formato:=Formato) Else Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia) @@ -299,15 +299,15 @@ Partial Class RH_RepPersonalInconsistencias Protected Sub BtnConsultarCumpleanios_Click(sender As Object, e As EventArgs) - Dim FechaInicio As Date = Now - Dim FechaFin As Date = Now + Dim FechaInicio As Date = NowADS() + Dim FechaFin As Date = NowADS() Dim MesajeError As String = "" Try If txtFechaI.Text.Length = 5 Then - FechaInicio = Date.Parse($"{txtFechaI.Text}/{Now.Year}") + FechaInicio = Date.Parse($"{txtFechaI.Text}/{NowADS().Year}") Else MesajeError = "Fecha inicio formato incorrecto. " End If @@ -318,7 +318,7 @@ Partial Class RH_RepPersonalInconsistencias Try If txtFechaF.Text.Length = 5 Then - FechaFin = Date.Parse($"{txtFechaF.Text}/{Now.Year}") + FechaFin = Date.Parse($"{txtFechaF.Text}/{NowADS().Year}") Else MesajeError = $"{MesajeError }Fecha fin formato incorrecto" End If diff --git a/RH/RepUniformes.aspx.vb b/RH/RepUniformes.aspx.vb index 33003e1ca..eb86c0890 100644 --- a/RH/RepUniformes.aspx.vb +++ b/RH/RepUniformes.aspx.vb @@ -33,8 +33,8 @@ Partial Class RH_RepUniformes DdlDepartamento.DataBind() DdlDepartamento.Items.Insert(0, New ListItem("Todos", "-1")) - TxtFechaInicio.Text = Now.ToString("dd/MM/yyyy") - TxtFechaFin.Text = Now.AddMonths(1).ToString("dd/MM/yyyy") + TxtFechaInicio.Text = NowADS().ToString("dd/MM/yyyy") + TxtFechaFin.Text = NowADS().AddMonths(1).ToString("dd/MM/yyyy") CargaDatos() End If @@ -101,7 +101,7 @@ Partial Class RH_RepUniformes 'params.Add(New ReportParameter("FechaInicio", FechaI)) 'params.Add(New ReportParameter("FechaFin", FechaF)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) ImprimirPDF("Empresas\Grales\Formatos\RepUniformes.rdlc", DTDatos, params, "ReporteUniformes", Formato:=Formato) diff --git a/RH/RepUniformesResguardo.aspx.vb b/RH/RepUniformesResguardo.aspx.vb index ebca77f58..8e280d43f 100644 --- a/RH/RepUniformesResguardo.aspx.vb +++ b/RH/RepUniformesResguardo.aspx.vb @@ -37,8 +37,8 @@ Partial Class RH_RepUniformesResguardo DdlPersonal.DataBind() DdlPersonal.Items.Insert(0, New ListItem("Seleccione", "-1")) - 'TxtFechaInicio.Text = Now.ToString("dd/MM/yyyy") - 'TxtFechaFin.Text = Now.AddMonths(1).ToString("dd/MM/yyyy") + 'TxtFechaInicio.Text = NowADS().ToString("dd/MM/yyyy") + 'TxtFechaFin.Text = NowADS().AddMonths(1).ToString("dd/MM/yyyy") CargaDatos() End If @@ -133,7 +133,7 @@ Partial Class RH_RepUniformesResguardo 'params.Add(New ReportParameter("FechaInicio", FechaI)) 'params.Add(New ReportParameter("FechaFin", FechaF)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) ImprimirPDF("Empresas\Grales\Formatos\RepUniformesResguardo.rdlc", DTDatos, params, "ReporteUniformes", Formato:=Formato) diff --git a/RH/RepVacaciones.aspx.vb b/RH/RepVacaciones.aspx.vb index dfcc245a5..a04f40808 100644 --- a/RH/RepVacaciones.aspx.vb +++ b/RH/RepVacaciones.aspx.vb @@ -9,8 +9,8 @@ Partial Class RH_RepVacaciones Private Sub RH_RepVacaciones_Load(sender As Object, e As EventArgs) Handles Me.Load If Not Page.IsPostBack Then - TxtFechaI.Text = Now.ToString("dd/MM/yyyy") - TxtFechaF.Text = Now.AddDays(30).ToString("dd/MM/yyyy") + TxtFechaI.Text = NowADS().ToString("dd/MM/yyyy") + TxtFechaF.Text = NowADS().AddDays(30).ToString("dd/MM/yyyy") CargaCombos() CargaDatos() End If @@ -83,7 +83,7 @@ Partial Class RH_RepVacaciones CargaDatos() End Sub Protected Sub LnkDescargarExcel_Click(sender As Object, e As EventArgs) Handles LnkDescargarExcel.Click - GvVacacionesRep.ExportToExcel("RepVavaciones_" & Now.ToString("yyyyMMddhhmmss")) + GvVacacionesRep.ExportToExcel("RepVavaciones_" & NowADS().ToString("yyyyMMddhhmmss")) End Sub Protected Sub GvVacacionesRep_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvVacacionesRep.RowDataBound diff --git a/RH/SolicitudViaticos.aspx.cs b/RH/SolicitudViaticos.aspx.cs index 3ce59d963..bbb63aa08 100644 --- a/RH/SolicitudViaticos.aspx.cs +++ b/RH/SolicitudViaticos.aspx.cs @@ -556,7 +556,7 @@ public partial class RH_SolicitudViaticos : ClsPaginas else { //GUARDA SOLICITUDES NUEVAS - CveSolicitudViatico = ObjBancos.AddSolicitudesViaticos(TxtFolio.Text, DdlEstatus.SelectedValue.ToEntero(), DdlPersonal.SelectedValue.ToEntero(), TxtDestino.Text, TxtAsunto.Text, TxtFechaSalida.Text, TxtFechaRegreso.Text, DateTime.Now, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TipoCarro: TxtTipoCarro.Text, KM: TxtKM.Text); + CveSolicitudViatico = ObjBancos.AddSolicitudesViaticos(TxtFolio.Text, DdlEstatus.SelectedValue.ToEntero(), DdlPersonal.SelectedValue.ToEntero(), TxtDestino.Text, TxtAsunto.Text, TxtFechaSalida.Text, TxtFechaRegreso.Text, NowADS(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TipoCarro: TxtTipoCarro.Text, KM: TxtKM.Text); if (CveSolicitudViatico > 0) { foreach (DataRow RowConcepto in DTConceptosDetalles.Rows) @@ -759,7 +759,7 @@ public partial class RH_SolicitudViaticos : ClsPaginas @params.Add(new ReportParameter("TelefonoSolicitante", ObjBancos.DtResultados.FiltroPrimeroValor("TelefonoPersonal"))); @params.Add(new ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)); - @params.Add(new ReportParameter("FechaImpresion", DateTime.Now.ToShortDateString())); + @params.Add(new ReportParameter("FechaImpresion", NowADS().ToShortDateString())); @params.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)); @params.Add(new ReportParameter("TotalADepositar", (ObjBancos.DtResultados.FiltroPrimeroValor("TotalADepositar").ToDouble() > 0 ? ObjBancos.DtResultados.FiltroPrimeroValor("TotalADepositar") : "0").ToString())); diff --git a/SAT/SolicitudesIngresoSat.aspx.cs b/SAT/SolicitudesIngresoSat.aspx.cs index 1485e8e0a..ddf541544 100644 --- a/SAT/SolicitudesIngresoSat.aspx.cs +++ b/SAT/SolicitudesIngresoSat.aspx.cs @@ -60,8 +60,8 @@ public partial class SAT_SolicitudesIngresoSat : ClsPaginas { if (!IsPostBack) { - TxtRpdFechaInicio.Text = string.Format("01/{0:MM/yyyy}", DateTime.Now.AddMonths(-1)); - TxtRpdFechaFin.Text = string.Format("{0:dd/MM/yyyy}", DateTime.Now.AddMonths(-1).LastDayOfMonth()); + TxtRpdFechaInicio.Text = string.Format("01/{0:MM/yyyy}", NowADS().AddMonths(-1)); + TxtRpdFechaFin.Text = string.Format("{0:dd/MM/yyyy}", NowADS().AddMonths(-1).LastDayOfMonth()); LnkConsultar_Click(null, null); //if (UsuarioActual.CveRol == 1) @@ -77,12 +77,12 @@ public partial class SAT_SolicitudesIngresoSat : ClsPaginas { if (TipoDescarga == 1) { - GvResumen.ExportToExcel2($"Resumen{DateTime.Now.ToString("yyyyMMddhhmmss")}"); + GvResumen.ExportToExcel2($"Resumen{NowADS().ToString("yyyyMMddhhmmss")}"); } if (TipoDescarga == 2) { - GvDatos.ExportToExcel2($"PorComprobante{DateTime.Now.ToString("yyyyMMddhhmmss")}"); + GvDatos.ExportToExcel2($"PorComprobante{NowADS().ToString("yyyyMMddhhmmss")}"); } } protected void LnkConsultar_Click(object sender, EventArgs e) diff --git a/SAT/SolicitudesNominaSat.aspx.cs b/SAT/SolicitudesNominaSat.aspx.cs index 55d854dec..63d6fbe17 100644 --- a/SAT/SolicitudesNominaSat.aspx.cs +++ b/SAT/SolicitudesNominaSat.aspx.cs @@ -50,8 +50,8 @@ public partial class SAT_SolicitudesNominaSat : ClsPaginas { if (!IsPostBack) { - TxtRpdFechaInicio.Text = string.Format("01/{0:MM/yyyy}", DateTime.Now.AddMonths(-1)); - TxtRpdFechaFin.Text = string.Format("{0:dd/MM/yyyy}", DateTime.Now.AddMonths(-1).LastDayOfMonth()); + TxtRpdFechaInicio.Text = string.Format("01/{0:MM/yyyy}", NowADS().AddMonths(-1)); + TxtRpdFechaFin.Text = string.Format("{0:dd/MM/yyyy}", NowADS().AddMonths(-1).LastDayOfMonth()); //LnkConsultar_Click(null, null); } } @@ -111,8 +111,8 @@ public partial class SAT_SolicitudesNominaSat : ClsPaginas libro.Range(1, 2, 1, 6).Merge().Value = UsuarioActual.Empresa.Empresa; libro.Range(2, 2, 2, 6).Merge().Value = $"Reporte de {DdlReporte.SelectedItem.Text }"; libro.Range(3, 2, 3, 6).Merge().Value = $"del {fechaInicio.ToDateTime():dd/MM/yyyy} al {fechaFin.ToDateTime():dd/MM/yyyy}"; - libro.Range(2, 7, 2, 9).Merge().Value = $"Fecha:{DateTime.Now:dd/MM/yyyy}"; - libro.Range(3, 7, 3, 9).Merge().Value = $"Hora:{DateTime.Now:HH:mm}"; + libro.Range(2, 7, 2, 9).Merge().Value = $"Fecha:{NowADS():dd/MM/yyyy}"; + libro.Range(3, 7, 3, 9).Merge().Value = $"Hora:{NowADS():HH:mm}"; System.IO.Stream fs = new System.IO.MemoryStream(); wb.SaveAs(fs); diff --git a/SAT/SolicitudesRecibidasSAT.aspx.vb b/SAT/SolicitudesRecibidasSAT.aspx.vb index 6bc7df485..db014e70f 100644 --- a/SAT/SolicitudesRecibidasSAT.aspx.vb +++ b/SAT/SolicitudesRecibidasSAT.aspx.vb @@ -61,8 +61,8 @@ Partial Class SAT_SolicitudesRecibidasSAT Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not IsPostBack Then - TxtRpdFechaInicio.Text = String.Format("01/{0:MM/yyyy}", DateTime.Now.AddMonths(-1)) - TxtRpdFechaFin.Text = String.Format("{0:dd/MM/yyyy}", DateTime.Now.AddMonths(-1).LastDayOfMonth()) + TxtRpdFechaInicio.Text = String.Format("01/{0:MM/yyyy}", NowADS().AddMonths(-1)) + TxtRpdFechaFin.Text = String.Format("{0:dd/MM/yyyy}", NowADS().AddMonths(-1).LastDayOfMonth()) End If End Sub @@ -70,11 +70,11 @@ Partial Class SAT_SolicitudesRecibidasSAT Protected Sub LnkDownloadExcel_Click(sender As Object, e As EventArgs) If TipoDescarga = 1 Then - GvResumen.ExportToExcel2($"Resumen{DateTime.Now.ToString("yyyyMMddhhmmss")}") + GvResumen.ExportToExcel2($"Resumen{NowADS().ToString("yyyyMMddhhmmss")}") End If If TipoDescarga = 2 Then - GvDatos.ExportToExcel2($"PorComprobante{DateTime.Now.ToString("yyyyMMddhhmmss")}") + GvDatos.ExportToExcel2($"PorComprobante{NowADS().ToString("yyyyMMddhhmmss")}") End If End Sub Protected Sub GvResumen_RowDataBound(ByVal sender As Object, ByVal e As GridViewRowEventArgs) diff --git a/SCT/LicenciasDetalle.aspx.vb b/SCT/LicenciasDetalle.aspx.vb index 02ee1dfd6..f010177af 100644 --- a/SCT/LicenciasDetalle.aspx.vb +++ b/SCT/LicenciasDetalle.aspx.vb @@ -67,7 +67,7 @@ Partial Class SCT_LicenciasDetalle 'LtlAgregar.Text = "Agregar Evento" Else 'Configuración de Modalidad Insert - 'LblFechaCaptura.Text = Now.ToShortDateString() + 'LblFechaCaptura.Text = NowADS().ToShortDateString() 'LblUsuarioCapturo.Text = UsuarioActual.Usuario ViewState("CveLicencia") = -1 diff --git a/SCT/RepGISSucesos.aspx.vb.exclude b/SCT/RepGISSucesos.aspx.vb.exclude index 1da192557..0b3a0494a 100644 --- a/SCT/RepGISSucesos.aspx.vb.exclude +++ b/SCT/RepGISSucesos.aspx.vb.exclude @@ -280,7 +280,7 @@ Partial Class SCT_RepGISSucesos Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click Dim OI As New ClsOIEventos - Dim i As Integer = OI.AddEvento(DdlAddTipoEvento.SelectedValue.ToEntero, TxtAsunto.Text, TxtDescripcion.Text, 1, UsuarioActual.CveUsuario, 0, Now, Now, -1, UsuarioActual.CveEmpresa, String.Format("POINT({0} {1})", HdnPosX.Value.ToDouble, HdnPosY.Value.ToDouble)) + Dim i As Integer = OI.AddEvento(DdlAddTipoEvento.SelectedValue.ToEntero, TxtAsunto.Text, TxtDescripcion.Text, 1, UsuarioActual.CveUsuario, 0, NowADS(), NowADS(), -1, UsuarioActual.CveEmpresa, String.Format("POINT({0} {1})", HdnPosX.Value.ToDouble, HdnPosY.Value.ToDouble)) ClsTecnoMovil.SendMsg("Se ha registrado un evento tipo " & DdlAddTipoEvento.SelectedItem.Text & ": " & TxtAsunto.Text, "6621190043") Dim ObjMail As New ClsSisMail() ObjMail.Mandacorreo(UsuarioActual.Empresa, "julian@adsistemas.mx", DdlAddTipoEvento.SelectedItem.Text, "Se ha registrado un evento tipo " & DdlAddTipoEvento.SelectedItem.Text & ": " & TxtAsunto.Text.Trim & "
    " & "Descripción: " & TxtDescripcion.Text.Trim) @@ -310,9 +310,9 @@ Partial Class SCT_RepGISSucesos dbLayer.Name = LayerNombre dbLayer.CoordinateSystem = AspMap.CoordSystem.WGS1984 - Dim Tmp As DateTime = Now + Dim Tmp As DateTime = NowADS() While (IsFileLocked(PathSHP)) 'hago un ciclo para esperar para liberar los archivos - If Tmp.AddSeconds(15) < Now Then Exit While + If Tmp.AddSeconds(15) < NowADS() Then Exit While End While diff --git a/Sistemas/CatSesiones.aspx.vb b/Sistemas/CatSesiones.aspx.vb index 3c2bf4144..88019f100 100644 --- a/Sistemas/CatSesiones.aspx.vb +++ b/Sistemas/CatSesiones.aspx.vb @@ -631,7 +631,7 @@ Partial Class Sistemas_CatSesiones Private Sub CargaTC() Dim ObjGral As New ClsGenerales - If ObjGral.GetTipoCambio(-1, Now) Then + If ObjGral.GetTipoCambio(-1, NowADS()) Then If ObjGral.DtResultados.Rows.Count > 0 Then Application("GlobalTipoCambio") = ObjGral.DtResultados.Rows(0)("TipoCambio").ToString End If diff --git a/Sistemas/CatTareasProgramadas.aspx.vb b/Sistemas/CatTareasProgramadas.aspx.vb index 30799fbe1..3bd991294 100644 --- a/Sistemas/CatTareasProgramadas.aspx.vb +++ b/Sistemas/CatTareasProgramadas.aspx.vb @@ -86,7 +86,7 @@ Partial Class Sistemas_CatTareasProgramadas DdlEmpresas.DataBind() DdlEmpresas.Items.Insert(0, New ListItem("Seleccione", "-1")) - TxtFechaI.Text = DateTime.Now.ToString("dd/MM/yyyy HH:mm") + TxtFechaI.Text = NowADS().ToString("dd/MM/yyyy HH:mm") End Sub @@ -127,7 +127,7 @@ Partial Class Sistemas_CatTareasProgramadas TxtParametros.Text = "" TxtCorreo.Text = "" TxtPlantilla.Text = "" - TxtFechaI.Text = DateTime.Now.ToString("dd/MM/yyyy HH:mm") + TxtFechaI.Text = NowADS().ToString("dd/MM/yyyy HH:mm") Actualizar = False UpGral.Update() RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTareasProgramadas")) diff --git a/Sistemas/DefinicionEmpresa.aspx b/Sistemas/DefinicionEmpresa.aspx index fc31b1cc7..896519347 100644 --- a/Sistemas/DefinicionEmpresa.aspx +++ b/Sistemas/DefinicionEmpresa.aspx @@ -153,6 +153,23 @@ + +
    +
    + + + + + + + + + +
    +
    + + diff --git a/Sistemas/DefinicionEmpresa.aspx.vb b/Sistemas/DefinicionEmpresa.aspx.vb index 501188436..fd0370de2 100644 --- a/Sistemas/DefinicionEmpresa.aspx.vb +++ b/Sistemas/DefinicionEmpresa.aspx.vb @@ -8,6 +8,7 @@ Imports System.IO Imports Microsoft.Reporting.WebForms Imports Microsoft.Owin.Security.Provider Imports log4net.Util +Imports MoreLinq Partial Class Sistemas_DefinicionEmpresa Inherits ClsPaginas @@ -369,6 +370,7 @@ Partial Class Sistemas_DefinicionEmpresa CargaDdlPac() CargaRegimenFiscal() + CargaZonasHorarias() 'CargaGridIndicadores() DtCuentasContables = Nothing DtFuncionalidades = Nothing @@ -394,6 +396,18 @@ Partial Class Sistemas_DefinicionEmpresa End If End Sub + Private Sub CargaZonasHorarias() + Dim GPS As New ClsGPS + If GPS.GetZonasHorarias() Then + DdlZonaHoraria.DataSource = GPS.DtResultados + Else + DdlZonaHoraria.DataSource = Nothing + End If + DdlZonaHoraria.DataBind() + DdlZonaHoraria.Items.Insert(0, New ListItem("Seleccione", "-1")) + GPS.Dispose() + End Sub + Private Function ValidaCveEmpresaUsaurio(CveUsuario As Integer, CveEmpresaValidar As Integer) As Boolean Dim Respuesta As Boolean = False @@ -479,6 +493,7 @@ Partial Class Sistemas_DefinicionEmpresa 'TxtContraseñaSoporte.Text = .Soporte_PWD 'DdlCvePac.SelectedValueExist(.CvePAC.ToString) DdlRegimen.SelectedValue = .CveRegimenFiscal.ToString + DdlZonaHoraria.SelectedValueExist(.CveZonaHoraria) TxtCURP.Text = .CURP 'TxtImporte.Text.ToDecimal TxtCIEC.Text = .CIEC @@ -778,7 +793,8 @@ Partial Class Sistemas_DefinicionEmpresa TxtNombreCorto.Text, TxtCURP.Text.Trim, DdlRegimen.SelectedValue.ToEntero, -1, -1, TxtCIEC.Text, 1, UsaAC, TxtPorDepreciacion.Text.ToDecimal, TxtExtension.Text, TxtLocalidad.Text, DdlMetodoInventario.SelectedValue.ToEntero, TxtPeriodoActual.Text.ToEntero, - TxtEjercicioActual.Text.ToEntero, ChkDefaultAsistencias.Checked, TxtDiasPermitidos.Text.ToEntero, DdlTipoCentroDeCostos.SelectedValue.ToEntero, ChkReqCentroCostos.Checked, DdlTerminalTipo.SelectedValue.ToEntero) Then + TxtEjercicioActual.Text.ToEntero, ChkDefaultAsistencias.Checked, TxtDiasPermitidos.Text.ToEntero, DdlTipoCentroDeCostos.SelectedValue.ToEntero, ChkReqCentroCostos.Checked, + DdlTerminalTipo.SelectedValue.ToEntero, CveZonaHoraria:=DdlZonaHoraria.SelectedValue.ToEntero) Then 'Movemos el Archivo Fisicamente If Session("FileUpload").ToString <> String.Empty AndAlso File.Exists(Request.PhysicalApplicationPath + "Banners\Temp\" & Session("FileUpload").ToString) Then @@ -920,444 +936,7 @@ Partial Class Sistemas_DefinicionEmpresa ObjEmpresa.Dispose() End Sub - 'Protected Sub BtnCargarCuentas_Click(sender As Object, e As EventArgs) Handles BtnCargarCuentas.Click - ' If DtCuentasContables Is Nothing Then - ' End If - ' Dim Seleccionado As String - ' Select Case HdnCuenta.Value - ' Case "1" - ' If DdlIVAxAcreditar.Attributes("onclick") <> "" Then CargaCuentasContables() - ' Seleccionado = DdlIVAxAcreditar.SelectedValue - ' DdlIVAxAcreditar.Items.Clear() : DdlIVAxAcreditar.Items.Add(New ListItem("Seleccione", "0")) - ' DdlIVAxAcreditar.DataSource = DtCuentasContables : DdlIVAxAcreditar.DataBind() : DdlIVAxAcreditar.SelectedValueExist(Seleccionado) - ' DdlIVAxAcreditar.AutoPostBack = False : DdlIVAxAcreditar.Attributes.Remove("onclick") : DdlIVAxAcreditar.CssClass &= " select2me" - ' Case "2" - ' If DdlIVAAcreditable.Attributes("onclick") <> "" Then CargaCuentasContables() - ' Seleccionado = DdlIVAAcreditable.SelectedValue - ' DdlIVAAcreditable.Items.Clear() : DdlIVAAcreditable.Items.Add(New ListItem("Seleccione", "0")) - ' DdlIVAAcreditable.DataSource = DtCuentasContables : DdlIVAAcreditable.DataBind() : DdlIVAAcreditable.SelectedValue = Seleccionado - ' DdlIVAAcreditable.AutoPostBack = False : DdlIVAAcreditable.Attributes.Remove("onclick") : DdlIVAAcreditable.CssClass &= " select2me" - ' Case "3" - ' If DdlIVAxTrasladar.Attributes("onclick") <> "" Then CargaCuentasContables(-1) - ' Seleccionado = DdlIVAxTrasladar.SelectedValue - ' DdlIVAxTrasladar.Items.Clear() : DdlIVAxTrasladar.Items.Add(New ListItem("Seleccione", "0")) - ' DdlIVAxTrasladar.DataSource = DtCuentasContables : DdlIVAxTrasladar.DataBind() : DdlIVAxTrasladar.SelectedValue = Seleccionado - ' DdlIVAxTrasladar.AutoPostBack = False : DdlIVAxTrasladar.Attributes.Remove("onclick") : DdlIVAxTrasladar.CssClass &= " select2me" - ' Case "4" - ' If DdlIVATrasladado.Attributes("onclick") <> "" Then CargaCuentasContables(-1) - ' Seleccionado = DdlIVATrasladado.SelectedValue - ' DdlIVATrasladado.Items.Clear() : DdlIVATrasladado.Items.Add(New ListItem("Seleccione", "0")) - ' DdlIVATrasladado.DataSource = DtCuentasContables : DdlIVATrasladado.DataBind() : DdlIVATrasladado.SelectedValue = Seleccionado - ' DdlIVATrasladado.AutoPostBack = False : DdlIVATrasladado.Attributes.Remove("onclick") : DdlIVATrasladado.CssClass &= " select2me" - ' Case "5" - ' If DdlIVARetenciones.Attributes("onclick") <> "" Then CargaCuentasContables(-1) - ' Seleccionado = DdlIVARetenciones.SelectedValue - ' DdlIVARetenciones.Items.Clear() : DdlIVARetenciones.Items.Add(New ListItem("Seleccione", "0")) - ' DdlIVARetenciones.DataSource = DtCuentasContables : DdlIVARetenciones.DataBind() : DdlIVARetenciones.SelectedValue = Seleccionado - ' DdlIVARetenciones.AutoPostBack = False : DdlIVARetenciones.Attributes.Remove("onclick") : DdlIVARetenciones.CssClass &= " select2me" - ' Case "6" - ' If DdlISRCirculacion.Attributes("onclick") <> "" Then CargaCuentasContables() - ' Seleccionado = DdlISRCirculacion.SelectedValue - ' DdlISRCirculacion.Items.Clear() : DdlISRCirculacion.Items.Add(New ListItem("Seleccione", "0")) - ' DdlISRCirculacion.DataSource = DtCuentasContables : DdlISRCirculacion.DataBind() : DdlISRCirculacion.SelectedValue = Seleccionado - ' DdlISRCirculacion.AutoPostBack = False : DdlISRCirculacion.Attributes.Remove("onclick") : DdlISRCirculacion.CssClass &= " select2me" - ' Case "7" - ' If DdlProveedores.Attributes("onclick") <> "" Then CargaCuentasContables() - ' Seleccionado = DdlProveedores.SelectedValue - ' DdlProveedores.Items.Clear() : DdlProveedores.Items.Add(New ListItem("Seleccione", "0")) - ' DdlProveedores.DataSource = DtCuentasContables : DdlProveedores.DataBind() : DdlProveedores.SelectedValueExist(Seleccionado) - ' DdlProveedores.AutoPostBack = False : DdlProveedores.Attributes.Remove("onclick") : DdlProveedores.CssClass &= " select2me" - ' Case "8" - ' If DdlClientes.Attributes("onclick") <> "" Then CargaCuentasContables() - ' Seleccionado = DdlClientes.SelectedValue - ' DdlClientes.Items.Clear() : DdlClientes.Items.Add(New ListItem("Seleccione", "0")) - ' DdlClientes.DataSource = DtCuentasContables : DdlClientes.DataBind() : DdlClientes.SelectedValueExist(Seleccionado) - ' DdlClientes.AutoPostBack = False : DdlClientes.Attributes.Remove("onclick") : DdlClientes.CssClass &= " select2me" - ' Case "9" - ' If DdlInventario.Attributes("onclick") <> "" Then CargaCuentasContables() - ' Seleccionado = DdlInventario.SelectedValue - ' DdlInventario.Items.Clear() : DdlInventario.Items.Add(New ListItem("Seleccione", "0")) - ' DdlInventario.DataSource = DtCuentasContables : DdlInventario.DataBind() : DdlInventario.SelectedValue = Seleccionado - ' DdlInventario.AutoPostBack = False : DdlInventario.Attributes.Remove("onclick") : DdlInventario.CssClass &= " select2me" - ' Case "10" - ' If DdlGasto.Attributes("onclick") <> "" Then CargaCuentasContables() - ' Seleccionado = DdlGasto.SelectedValue - ' DdlGasto.Items.Clear() : DdlGasto.Items.Add(New ListItem("Seleccione", "0")) - ' DdlGasto.DataSource = DtCuentasContables : DdlGasto.DataBind() : DdlGasto.SelectedValue = Seleccionado - ' DdlGasto.AutoPostBack = False : DdlGasto.Attributes.Remove("onclick") : DdlGasto.CssClass &= " select2me" - ' Case "11" - ' If DdlBancos.Attributes("onclick") <> "" Then CargaCuentasContables() - ' Seleccionado = DdlBancos.SelectedValue - ' DdlBancos.Items.Clear() : DdlBancos.Items.Add(New ListItem("Seleccione", "0")) - ' DdlBancos.DataSource = DtCuentasContables : DdlBancos.DataBind() : DdlBancos.SelectedValue = Seleccionado - ' DdlBancos.AutoPostBack = False : DdlBancos.Attributes.Remove("onclick") : DdlBancos.CssClass &= " select2me" - ' Case "12" - ' If DdlDeudores.Attributes("onclick") <> "" Then CargaCuentasContables() - ' Seleccionado = DdlDeudores.SelectedValue - ' DdlDeudores.Items.Clear() : DdlDeudores.Items.Add(New ListItem("Seleccione", "0")) - ' DdlDeudores.DataSource = DtCuentasContables : DdlDeudores.DataBind() : DdlDeudores.SelectedValue = Seleccionado - ' DdlDeudores.AutoPostBack = False : DdlDeudores.Attributes.Remove("onclick") : DdlDeudores.CssClass &= " select2me" - ' Case "13" - ' If DdlAcreedores.Attributes("onclick") <> "" Then CargaCuentasContables() - ' Seleccionado = DdlAcreedores.SelectedValue - ' DdlAcreedores.Items.Clear() : DdlAcreedores.Items.Add(New ListItem("Seleccione", "0")) - ' DdlAcreedores.DataSource = DtCuentasContables : DdlAcreedores.DataBind() : DdlAcreedores.SelectedValue = Seleccionado - ' DdlAcreedores.AutoPostBack = False : DdlAcreedores.Attributes.Remove("onclick") : DdlAcreedores.CssClass &= " select2me" - ' Case "14" - ' If DdlDocxPagar.Attributes("onclick") <> "" Then CargaCuentasContables() - ' Seleccionado = DdlDocxPagar.SelectedValue - ' DdlDocxPagar.Items.Clear() : DdlDocxPagar.Items.Add(New ListItem("Seleccione", "0")) - ' DdlDocxPagar.DataSource = DtCuentasContables : DdlDocxPagar.DataBind() : DdlDocxPagar.SelectedValue = Seleccionado - ' DdlDocxPagar.AutoPostBack = False : DdlDocxPagar.Attributes.Remove("onclick") : DdlDocxPagar.CssClass &= " select2me" - ' Case "15" - ' If DdlAnticipoCliente.Attributes("onclick") <> "" Then CargaCuentasContables() - ' Seleccionado = DdlAnticipoCliente.SelectedValue - ' DdlAnticipoCliente.Items.Clear() : DdlAnticipoCliente.Items.Add(New ListItem("Seleccione", "0")) - ' DdlAnticipoCliente.DataSource = DtCuentasContables : DdlAnticipoCliente.DataBind() : DdlAnticipoCliente.SelectedValue = Seleccionado - ' DdlAnticipoCliente.AutoPostBack = False : DdlAnticipoCliente.Attributes.Remove("onclick") : DdlAnticipoCliente.CssClass &= " select2me" - ' Case "16" - ' If DdlAnticipoProveedores.Attributes("onclick") <> "" Then CargaCuentasContables() - ' Seleccionado = DdlAnticipoProveedores.SelectedValue - ' DdlAnticipoProveedores.Items.Clear() : DdlAnticipoProveedores.Items.Add(New ListItem("Seleccione", "0")) - ' DdlAnticipoProveedores.DataSource = DtCuentasContables : DdlAnticipoProveedores.DataBind() : DdlAnticipoProveedores.SelectedValue = Seleccionado - ' DdlAnticipoProveedores.AutoPostBack = False : DdlAnticipoProveedores.Attributes.Remove("onclick") : DdlAnticipoProveedores.CssClass &= " select2me" - ' Case "17" - ' If DdlCaja.Attributes("onclick") <> "" Then CargaCuentasContables() - ' Seleccionado = DdlCaja.SelectedValue - ' DdlCaja.Items.Clear() : DdlCaja.Items.Add(New ListItem("Seleccione", "0")) - ' DdlCaja.DataSource = DtCuentasContables : DdlCaja.DataBind() : DdlCaja.SelectedValue = Seleccionado - ' DdlCaja.AutoPostBack = False : DdlCaja.Attributes.Remove("onclick") : DdlCaja.CssClass &= " select2me" - ' Case "18" - ' If DdlFyE.Attributes("onclick") <> "" Then CargaCuentasContables() - ' Seleccionado = DdlFyE.SelectedValue - ' DdlFyE.Items.Clear() : DdlFyE.Items.Add(New ListItem("Seleccione", "0")) - ' DdlFyE.DataSource = DtCuentasContables : DdlFyE.DataBind() : DdlFyE.SelectedValue = Seleccionado - ' DdlFyE.AutoPostBack = False : DdlFyE.Attributes.Remove("onclick") : DdlFyE.CssClass &= " select2me" - ' Case "19" - ' If DddlCuentaGananciaCambiaria.Attributes("onclick") <> "" Then CargaCuentasContables() - ' Seleccionado = DddlCuentaGananciaCambiaria.SelectedValue - ' DddlCuentaGananciaCambiaria.Items.Clear() : DddlCuentaGananciaCambiaria.Items.Add(New ListItem("Seleccione", "0")) - ' DddlCuentaGananciaCambiaria.DataSource = DtCuentasContables : DddlCuentaGananciaCambiaria.DataBind() : DddlCuentaGananciaCambiaria.SelectedValueExist(Seleccionado) - ' DddlCuentaGananciaCambiaria.AutoPostBack = False : DddlCuentaGananciaCambiaria.Attributes.Remove("onclick") : DddlCuentaGananciaCambiaria.CssClass &= " select2me" - ' Case "20" - ' If DdlCuentaPerdidaCambiaria.Attributes("onclick") <> "" Then CargaCuentasContables() - ' Seleccionado = DdlCuentaPerdidaCambiaria.SelectedValue - ' DdlCuentaPerdidaCambiaria.Items.Clear() : DdlCuentaPerdidaCambiaria.Items.Add(New ListItem("Seleccione", "0")) - ' DdlCuentaPerdidaCambiaria.DataSource = DtCuentasContables : DdlCuentaPerdidaCambiaria.DataBind() : DdlCuentaPerdidaCambiaria.SelectedValue = Seleccionado - ' DdlCuentaPerdidaCambiaria.AutoPostBack = False : DdlCuentaPerdidaCambiaria.Attributes.Remove("onclick") : DdlCuentaPerdidaCambiaria.CssClass &= " select2me" - - ' 'CUENTAS PADRES - - ' Case "21" - ' If DdlProveedores.Attributes("onclick") <> "" Then CargaCuentasContables() - ' Seleccionado = DdlProveedores.SelectedValue - ' DdlProveedores.Items.Clear() : DdlProveedores.Items.Add(New ListItem("Seleccione", "0")) - ' DdlProveedores.DataSource = DtCuentasContables : DdlProveedores.DataBind() : DdlProveedores.SelectedValue = Seleccionado - ' DdlProveedores.AutoPostBack = False : DdlProveedores.Attributes.Remove("onclick") : DdlProveedores.CssClass &= " select2me" - ' Case "22" - ' If DdlClientes.Attributes("onclick") <> "" Then CargaCuentasContables() - ' Seleccionado = DdlClientes.SelectedValue - ' DdlClientes.Items.Clear() : DdlClientes.Items.Add(New ListItem("Seleccione", "0")) - ' DdlClientes.DataSource = DtCuentasContables : DdlClientes.DataBind() : DdlClientes.SelectedValue = Seleccionado - ' DdlClientes.AutoPostBack = False : DdlClientes.Attributes.Remove("onclick") : DdlClientes.CssClass &= " select2me" - ' Case "23" - ' If DdlInventario.Attributes("onclick") <> "" Then CargaCuentasContables() - ' Seleccionado = DdlInventario.SelectedValue - ' DdlInventario.Items.Clear() : DdlInventario.Items.Add(New ListItem("Seleccione", "0")) - ' DdlInventario.DataSource = DtCuentasContables : DdlInventario.DataBind() : DdlInventario.SelectedValue = Seleccionado - ' DdlInventario.AutoPostBack = False : DdlInventario.Attributes.Remove("onclick") : DdlInventario.CssClass &= " select2me" - ' Case "24" - ' If DdlGasto.Attributes("onclick") <> "" Then CargaCuentasContables() - ' Seleccionado = DdlGasto.SelectedValue - ' DdlGasto.Items.Clear() : DdlGasto.Items.Add(New ListItem("Seleccione", "0")) - ' DdlGasto.DataSource = DtCuentasContables : DdlGasto.DataBind() : DdlGasto.SelectedValue = Seleccionado - ' DdlGasto.AutoPostBack = False : DdlGasto.Attributes.Remove("onclick") : DdlGasto.CssClass &= " select2me" - ' Case "25" - ' If DdlBancos.Attributes("onclick") <> "" Then CargaCuentasContables() - ' Seleccionado = DdlBancos.SelectedValue - ' DdlBancos.Items.Clear() : DdlBancos.Items.Add(New ListItem("Seleccione", "0")) - ' DdlBancos.DataSource = DtCuentasContables : DdlBancos.DataBind() : DdlBancos.SelectedValue = Seleccionado - ' DdlBancos.AutoPostBack = False : DdlBancos.Attributes.Remove("onclick") : DdlBancos.CssClass &= " select2me" - ' Case "26" - ' If DdlDeudores.Attributes("onclick") <> "" Then CargaCuentasContables() - ' Seleccionado = DdlDeudores.SelectedValue - ' DdlDeudores.Items.Clear() : DdlDeudores.Items.Add(New ListItem("Seleccione", "0")) - ' DdlDeudores.DataSource = DtCuentasContables : DdlDeudores.DataBind() : DdlDeudores.SelectedValue = Seleccionado - ' DdlDeudores.AutoPostBack = False : DdlDeudores.Attributes.Remove("onclick") : DdlDeudores.CssClass &= " select2me" - ' Case "27" - ' If DdlAcreedores.Attributes("onclick") <> "" Then CargaCuentasContables() - ' Seleccionado = DdlAcreedores.SelectedValue - ' DdlAcreedores.Items.Clear() : DdlAcreedores.Items.Add(New ListItem("Seleccione", "0")) - ' DdlAcreedores.DataSource = DtCuentasContables : DdlAcreedores.DataBind() : DdlAcreedores.SelectedValue = Seleccionado - ' DdlAcreedores.AutoPostBack = False : DdlAcreedores.Attributes.Remove("onclick") : DdlAcreedores.CssClass &= " select2me" - ' Case "28" - ' If DdlDocxPagar.Attributes("onclick") <> "" Then CargaCuentasContables() - ' Seleccionado = DdlDocxPagar.SelectedValue - ' DdlDocxPagar.Items.Clear() : DdlDocxPagar.Items.Add(New ListItem("Seleccione", "0")) - ' DdlDocxPagar.DataSource = DtCuentasContables : DdlDocxPagar.DataBind() : DdlDocxPagar.SelectedValue = Seleccionado - ' DdlDocxPagar.AutoPostBack = False : DdlDocxPagar.Attributes.Remove("onclick") : DdlDocxPagar.CssClass &= " select2me" - ' Case "29" - ' If DdlAnticipoCliente.Attributes("onclick") <> "" Then CargaCuentasContables() - ' Seleccionado = DdlAnticipoCliente.SelectedValue - ' DdlAnticipoCliente.Items.Clear() : DdlAnticipoCliente.Items.Add(New ListItem("Seleccione", "0")) - ' DdlAnticipoCliente.DataSource = DtCuentasContables : DdlAnticipoCliente.DataBind() : DdlAnticipoCliente.SelectedValue = Seleccionado - ' DdlAnticipoCliente.AutoPostBack = False : DdlAnticipoCliente.Attributes.Remove("onclick") : DdlAnticipoCliente.CssClass &= " select2me" - ' Case "30" - ' If DdlAnticipoProveedores.Attributes("onclick") <> "" Then CargaCuentasContables() - ' Seleccionado = DdlAnticipoProveedores.SelectedValue - ' DdlAnticipoProveedores.Items.Clear() : DdlAnticipoProveedores.Items.Add(New ListItem("Seleccione", "0")) - ' DdlAnticipoProveedores.DataSource = DtCuentasContables : DdlAnticipoProveedores.DataBind() : DdlAnticipoProveedores.SelectedValue = Seleccionado - ' DdlAnticipoProveedores.AutoPostBack = False : DdlAnticipoProveedores.Attributes.Remove("onclick") : DdlAnticipoProveedores.CssClass &= " select2me" - ' Case "31" - ' If DdlCaja.Attributes("onclick") <> "" Then CargaCuentasContables() - ' Seleccionado = DdlCaja.SelectedValue - ' DdlCaja.Items.Clear() : DdlCaja.Items.Add(New ListItem("Seleccione", "0")) - ' DdlCaja.DataSource = DtCuentasContables : DdlCaja.DataBind() : DdlCaja.SelectedValue = Seleccionado - ' DdlCaja.AutoPostBack = False : DdlCaja.Attributes.Remove("onclick") : DdlCaja.CssClass &= " select2me" - ' Case "32" - ' If DdlFyE.Attributes("onclick") <> "" Then CargaCuentasContables() - ' Seleccionado = DdlFyE.SelectedValue - ' DdlFyE.Items.Clear() : DdlFyE.Items.Add(New ListItem("Seleccione", "0")) - ' DdlFyE.DataSource = DtCuentasContables : DdlFyE.DataBind() : DdlFyE.SelectedValue = Seleccionado - ' DdlFyE.AutoPostBack = False : DdlFyE.Attributes.Remove("onclick") : DdlFyE.CssClass &= " select2me" - ' Case "33" - ' If DdlActivoFijo.Attributes("onclick") <> "" Then CargaCuentasContables() - ' Seleccionado = DdlActivoFijo.SelectedValue - ' DdlActivoFijo.Items.Clear() : DdlActivoFijo.Items.Add(New ListItem("Seleccione", "0")) - ' DdlActivoFijo.DataSource = DtCuentasContables : DdlActivoFijo.DataBind() : DdlActivoFijo.SelectedValue = Seleccionado - ' DdlActivoFijo.AutoPostBack = False : DdlActivoFijo.Attributes.Remove("onclick") : DdlActivoFijo.CssClass &= " select2me" - ' Case "34" - ' If DdlDSV.Attributes("onclick") <> "" Then CargaCuentasContables() - ' Seleccionado = DdlDSV.SelectedValue - ' DdlDSV.Items.Clear() : DdlDSV.Items.Add(New ListItem("Seleccione", "0")) - ' DdlDSV.DataSource = DtCuentasContables : DdlDSV.DataBind() : DdlDSV.SelectedValue = Seleccionado - ' DdlDSV.AutoPostBack = False : DdlDSV.Attributes.Remove("onclick") : DdlDSV.CssClass &= " select2me" - ' Case "35" - ' If DdlImpuestosLocales.Attributes("onclick") <> "" Then CargaCuentasContables() - ' Seleccionado = DdlImpuestosLocales.SelectedValue - ' DdlImpuestosLocales.Items.Clear() : DdlImpuestosLocales.Items.Add(New ListItem("Seleccione", "0")) - ' DdlImpuestosLocales.DataSource = DtCuentasContables : DdlImpuestosLocales.DataBind() : DdlImpuestosLocales.SelectedValue = Seleccionado - ' DdlImpuestosLocales.AutoPostBack = False : DdlImpuestosLocales.Attributes.Remove("onclick") : DdlImpuestosLocales.CssClass &= " select2me" - - - ' 'IEPS - ' Case "36" - ' If DdlIEPSxAcreditar.Attributes("onclick") <> "" Then CargaCuentasContables() - ' Seleccionado = DdlIEPSxAcreditar.SelectedValue - ' DdlIEPSxAcreditar.Items.Clear() : DdlIEPSxAcreditar.Items.Add(New ListItem("Seleccione", "0")) - ' DdlIEPSxAcreditar.DataSource = DtCuentasContables : DdlIEPSxAcreditar.DataBind() : DdlIEPSxAcreditar.SelectedValue = Seleccionado - ' DdlIEPSxAcreditar.AutoPostBack = False : DdlIEPSxAcreditar.Attributes.Remove("onclick") : DdlIEPSxAcreditar.CssClass &= " select2me" - - ' Case "37" - ' If DdlIEPSAcreditable.Attributes("onclick") <> "" Then CargaCuentasContables() - ' Seleccionado = DdlIEPSAcreditable.SelectedValue - ' DdlIEPSAcreditable.Items.Clear() : DdlIEPSAcreditable.Items.Add(New ListItem("Seleccione", "0")) - ' DdlIEPSAcreditable.DataSource = DtCuentasContables : DdlIEPSAcreditable.DataBind() : DdlIEPSAcreditable.SelectedValue = Seleccionado - ' DdlIEPSAcreditable.AutoPostBack = False : DdlIEPSAcreditable.Attributes.Remove("onclick") : DdlIEPSAcreditable.CssClass &= " select2me" - ' Case "38" - ' If DdlIEPSxTrasladar.Attributes("onclick") <> "" Then CargaCuentasContables() - ' Seleccionado = DdlIEPSxTrasladar.SelectedValue - ' DdlIEPSxTrasladar.Items.Clear() : DdlIEPSxTrasladar.Items.Add(New ListItem("Seleccione", "0")) - ' DdlIEPSxTrasladar.DataSource = DtCuentasContables : DdlIEPSxTrasladar.DataBind() : DdlIEPSxTrasladar.SelectedValue = Seleccionado - ' DdlIEPSxTrasladar.AutoPostBack = False : DdlIEPSxTrasladar.Attributes.Remove("onclick") : DdlIEPSxTrasladar.CssClass &= " select2me" - ' Case "39" - ' If DdlIEPSTrasladado.Attributes("onclick") <> "" Then CargaCuentasContables() - ' Seleccionado = DdlIEPSTrasladado.SelectedValue - ' DdlIEPSTrasladado.Items.Clear() : DdlIEPSTrasladado.Items.Add(New ListItem("Seleccione", "0")) - ' DdlIEPSTrasladado.DataSource = DtCuentasContables : DdlIEPSTrasladado.DataBind() : DdlIEPSTrasladado.SelectedValue = Seleccionado - ' DdlIEPSTrasladado.AutoPostBack = False : DdlIEPSTrasladado.Attributes.Remove("onclick") : DdlIEPSTrasladado.CssClass &= " select2me" - ' Case "40" - ' If DdlCuentaDescuentoVenta.Attributes("onclick") <> "" Then CargaCuentasContables() - ' Seleccionado = DdlCuentaDescuentoVenta.SelectedValue - ' DdlCuentaDescuentoVenta.Items.Clear() : DdlCuentaDescuentoVenta.Items.Add(New ListItem("Seleccione", "0")) - ' DdlCuentaDescuentoVenta.DataSource = DtCuentasContables : DdlCuentaDescuentoVenta.DataBind() : DdlCuentaDescuentoVenta.SelectedValue = Seleccionado - ' DdlCuentaDescuentoVenta.AutoPostBack = False : DdlCuentaDescuentoVenta.Attributes.Remove("onclick") : DdlCuentaDescuentoVenta.CssClass &= " select2me" - ' Case "41" - ' If DdlCuentaOtrosIngresos.Attributes("onclick") <> "" Then CargaCuentasContables() - ' Seleccionado = DdlCuentaOtrosIngresos.SelectedValue - ' DdlCuentaOtrosIngresos.Items.Clear() : DdlCuentaOtrosIngresos.Items.Add(New ListItem("Seleccione", "0")) - ' DdlCuentaOtrosIngresos.DataSource = DtCuentasContables : DdlCuentaOtrosIngresos.DataBind() : DdlCuentaOtrosIngresos.SelectedValue = Seleccionado - ' DdlCuentaOtrosIngresos.AutoPostBack = False : DdlCuentaOtrosIngresos.Attributes.Remove("onclick") : DdlCuentaOtrosIngresos.CssClass &= " select2me" - - - ' ' 'PADRES SIG - ' 'Case "42" - ' ' If DdlProveedoresSIG.Attributes("onclick") <> "" Then CargaCuentasContablesSIG() - ' ' Seleccionado = DdlProveedoresSIG.SelectedValue - ' ' DdlProveedoresSIG.Items.Clear() : DdlProveedoresSIG.Items.Add(New ListItem("Seleccione", "0")) - ' ' DdlProveedoresSIG.DataSource = DtCuentasContablesSIG : DdlProveedoresSIG.DataBind() : DdlProveedoresSIG.SelectedValue = Seleccionado - ' ' DdlProveedoresSIG.AutoPostBack = False : DdlProveedoresSIG.Attributes.Remove("onclick") : DdlProveedoresSIG.CssClass &= " select2me" - ' 'Case "43" - ' ' If DdlClientesSIG.Attributes("onclick") <> "" Then CargaCuentasContablesSIG() - ' ' Seleccionado = DdlClientesSIG.SelectedValue - ' ' DdlClientesSIG.Items.Clear() : DdlClientesSIG.Items.Add(New ListItem("Seleccione", "0")) - ' ' DdlClientesSIG.DataSource = DtCuentasContablesSIG : DdlClientesSIG.DataBind() : DdlClientesSIG.SelectedValue = Seleccionado - ' ' DdlClientesSIG.AutoPostBack = False : DdlClientesSIG.Attributes.Remove("onclick") : DdlClientesSIG.CssClass &= " select2me" - ' 'Case "44" - ' ' If DdlInventarioSIG.Attributes("onclick") <> "" Then CargaCuentasContablesSIG() - ' ' Seleccionado = DdlInventarioSIG.SelectedValue - ' ' DdlInventarioSIG.Items.Clear() : DdlInventarioSIG.Items.Add(New ListItem("Seleccione", "0")) - ' ' DdlInventarioSIG.DataSource = DtCuentasContablesSIG : DdlInventarioSIG.DataBind() : DdlInventarioSIG.SelectedValue = Seleccionado - ' ' DdlInventarioSIG.AutoPostBack = False : DdlInventarioSIG.Attributes.Remove("onclick") : DdlInventarioSIG.CssClass &= " select2me" - ' 'Case "45" - ' ' If DdlGastoSIG.Attributes("onclick") <> "" Then CargaCuentasContablesSIG() - ' ' Seleccionado = DdlGasto.SelectedValue - ' ' DdlGastoSIG.Items.Clear() : DdlGastoSIG.Items.Add(New ListItem("Seleccione", "0")) - ' ' DdlGastoSIG.DataSource = DtCuentasContablesSIG : DdlGastoSIG.DataBind() : DdlGastoSIG.SelectedValue = Seleccionado - ' ' DdlGastoSIG.AutoPostBack = False : DdlGastoSIG.Attributes.Remove("onclick") : DdlGastoSIG.CssClass &= " select2me" - ' 'Case "46" - ' ' If DdlBancosSIG.Attributes("onclick") <> "" Then CargaCuentasContablesSIG() - ' ' Seleccionado = DdlBancosSIG.SelectedValue - ' ' DdlBancosSIG.Items.Clear() : DdlBancosSIG.Items.Add(New ListItem("Seleccione", "0")) - ' ' DdlBancosSIG.DataSource = DtCuentasContablesSIG : DdlBancosSIG.DataBind() : DdlBancosSIG.SelectedValue = Seleccionado - ' ' DdlBancosSIG.AutoPostBack = False : DdlBancosSIG.Attributes.Remove("onclick") : DdlBancosSIG.CssClass &= " select2me" - ' 'Case "47" - ' ' If DdlDeudoresSIG.Attributes("onclick") <> "" Then CargaCuentasContablesSIG() - ' ' Seleccionado = DdlDeudoresSIG.SelectedValue - ' ' DdlDeudoresSIG.Items.Clear() : DdlDeudoresSIG.Items.Add(New ListItem("Seleccione", "0")) - ' ' DdlDeudoresSIG.DataSource = DtCuentasContablesSIG : DdlDeudoresSIG.DataBind() : DdlDeudoresSIG.SelectedValue = Seleccionado - ' ' DdlDeudoresSIG.AutoPostBack = False : DdlDeudoresSIG.Attributes.Remove("onclick") : DdlDeudoresSIG.CssClass &= " select2me" - ' 'Case "48" - ' ' If DdlAcreedoresSIG.Attributes("onclick") <> "" Then CargaCuentasContablesSIG() - ' ' Seleccionado = DdlAcreedoresSIG.SelectedValue - ' ' DdlAcreedoresSIG.Items.Clear() : DdlAcreedoresSIG.Items.Add(New ListItem("Seleccione", "0")) - ' ' DdlAcreedoresSIG.DataSource = DtCuentasContablesSIG : DdlAcreedoresSIG.DataBind() : DdlAcreedoresSIG.SelectedValue = Seleccionado - ' ' DdlAcreedoresSIG.AutoPostBack = False : DdlAcreedoresSIG.Attributes.Remove("onclick") : DdlAcreedoresSIG.CssClass &= " select2me" - ' 'Case "49" - ' ' If DdlDocxPagarSIG.Attributes("onclick") <> "" Then CargaCuentasContablesSIG() - ' ' Seleccionado = DdlDocxPagarSIG.SelectedValue - ' ' DdlDocxPagarSIG.Items.Clear() : DdlDocxPagarSIG.Items.Add(New ListItem("Seleccione", "0")) - ' ' DdlDocxPagarSIG.DataSource = DtCuentasContablesSIG : DdlDocxPagarSIG.DataBind() : DdlDocxPagarSIG.SelectedValue = Seleccionado - ' ' DdlDocxPagarSIG.AutoPostBack = False : DdlDocxPagarSIG.Attributes.Remove("onclick") : DdlDocxPagarSIG.CssClass &= " select2me" - ' 'Case "50" - ' ' If DdlAnticipoClienteSIG.Attributes("onclick") <> "" Then CargaCuentasContablesSIG() - ' ' Seleccionado = DdlAnticipoClienteSIG.SelectedValue - ' ' DdlAnticipoClienteSIG.Items.Clear() : DdlAnticipoClienteSIG.Items.Add(New ListItem("Seleccione", "0")) - ' ' DdlAnticipoClienteSIG.DataSource = DtCuentasContablesSIG : DdlAnticipoClienteSIG.DataBind() : DdlAnticipoClienteSIG.SelectedValue = Seleccionado - ' ' DdlAnticipoClienteSIG.AutoPostBack = False : DdlAnticipoClienteSIG.Attributes.Remove("onclick") : DdlAnticipoClienteSIG.CssClass &= " select2me" - ' 'Case "51" - ' ' If DdlAnticipoProveedoresSIG.Attributes("onclick") <> "" Then CargaCuentasContablesSIG() - ' ' Seleccionado = DdlAnticipoProveedoresSIG.SelectedValue - ' ' DdlAnticipoProveedoresSIG.Items.Clear() : DdlAnticipoProveedoresSIG.Items.Add(New ListItem("Seleccione", "0")) - ' ' DdlAnticipoProveedoresSIG.DataSource = DtCuentasContablesSIG : DdlAnticipoProveedoresSIG.DataBind() : DdlAnticipoProveedoresSIG.SelectedValue = Seleccionado - ' ' DdlAnticipoProveedoresSIG.AutoPostBack = False : DdlAnticipoProveedoresSIG.Attributes.Remove("onclick") : DdlAnticipoProveedoresSIG.CssClass &= " select2me" - ' 'Case "52" - ' ' If DdlCajaSIG.Attributes("onclick") <> "" Then CargaCuentasContablesSIG() - ' ' Seleccionado = DdlCajaSIG.SelectedValue - ' ' DdlCajaSIG.Items.Clear() : DdlCajaSIG.Items.Add(New ListItem("Seleccione", "0")) - ' ' DdlCajaSIG.DataSource = DtCuentasContablesSIG : DdlCajaSIG.DataBind() : DdlCajaSIG.SelectedValue = Seleccionado - ' ' DdlCajaSIG.AutoPostBack = False : DdlCajaSIG.Attributes.Remove("onclick") : DdlCajaSIG.CssClass &= " select2me" - ' 'Case "53" - ' ' If DdlFyESIG.Attributes("onclick") <> "" Then CargaCuentasContablesSIG() - ' ' Seleccionado = DdlFyESIG.SelectedValue - ' ' DdlFyESIG.Items.Clear() : DdlFyESIG.Items.Add(New ListItem("Seleccione", "0")) - ' ' DdlFyESIG.DataSource = DtCuentasContablesSIG : DdlFyESIG.DataBind() : DdlFyESIG.SelectedValue = Seleccionado - ' ' DdlFyESIG.AutoPostBack = False : DdlFyESIG.Attributes.Remove("onclick") : DdlFyESIG.CssClass &= " select2me" - ' 'Case "54" - ' ' If DdlActivoFijoSIG.Attributes("onclick") <> "" Then CargaCuentasContablesSIG() - ' ' Seleccionado = DdlActivoFijoSIG.SelectedValue - ' ' DdlActivoFijoSIG.Items.Clear() : DdlActivoFijoSIG.Items.Add(New ListItem("Seleccione", "0")) - ' ' DdlActivoFijoSIG.DataSource = DtCuentasContablesSIG : DdlActivoFijoSIG.DataBind() : DdlActivoFijoSIG.SelectedValue = Seleccionado - ' ' DdlActivoFijoSIG.AutoPostBack = False : DdlActivoFijoSIG.Attributes.Remove("onclick") : DdlActivoFijoSIG.CssClass &= " select2me" - - - ' End Select - - 'End Sub - 'Public Sub CargaDDLs() - ' DdlIVAxAcreditar.AutoPostBack = True - ' DdlIVAAcreditable.AutoPostBack = True - ' DdlIVAxTrasladar.AutoPostBack = True - ' DdlIVATrasladado.AutoPostBack = True - ' DdlIVARetenciones.AutoPostBack = True - ' DdlISRCirculacion.AutoPostBack = True - ' DdlProveedores.AutoPostBack = True - ' DdlClientes.AutoPostBack = True - ' DdlInventario.AutoPostBack = True - ' DdlGasto.AutoPostBack = True - ' DdlBancos.AutoPostBack = True - ' DdlDeudores.AutoPostBack = True - ' DdlAcreedores.AutoPostBack = True - ' DdlDocxPagar.AutoPostBack = True - ' DdlAnticipoCliente.AutoPostBack = True - ' DdlAnticipoProveedores.AutoPostBack = True - ' DdlCaja.AutoPostBack = True - ' DdlFyE.AutoPostBack = True - ' DddlCuentaGananciaCambiaria.AutoPostBack = True - ' DdlCuentaPerdidaCambiaria.AutoPostBack = True - ' DdlActivoFijo.AutoPostBack = True - ' DdlIEPSxAcreditar.AutoPostBack = True - ' DdlIEPSAcreditable.AutoPostBack = True - ' DdlIEPSxTrasladar.AutoPostBack = True - ' DdlIEPSTrasladado.AutoPostBack = True - ' DdlCuentaDescuentoVenta.AutoPostBack = True - ' DdlCuentaOtrosIngresos.AutoPostBack = True - - ' ''CUENTAS PADRES SIG - ' 'DdlProveedoresSIG.AutoPostBack = True - ' 'DdlClientesSIG.AutoPostBack = True - ' 'DdlInventarioSIG.AutoPostBack = True - ' 'DdlGastoSIG.AutoPostBack = True - ' 'DdlBancosSIG.AutoPostBack = True - ' 'DdlDeudoresSIG.AutoPostBack = True - ' 'DdlAcreedoresSIG.AutoPostBack = True - ' 'DdlDocxPagarSIG.AutoPostBack = True - ' 'DdlAnticipoClienteSIG.AutoPostBack = True - ' 'DdlAnticipoProveedoresSIG.AutoPostBack = True - ' 'DdlCajaSIG.AutoPostBack = True - ' 'DdlFyESIG.AutoPostBack = True - ' 'DdlActivoFijoSIG.AutoPostBack = True - - - ' DdlIVAxAcreditar.Attributes.Add("onclick", "CargaCuentas(1);") - ' DdlIVAAcreditable.Attributes.Add("onclick", "CargaCuentas(2);") - ' DdlIVAxTrasladar.Attributes.Add("onclick", "CargaCuentas(3);") - ' DdlIVATrasladado.Attributes.Add("onclick", "CargaCuentas(4);") - ' DdlIVARetenciones.Attributes.Add("onclick", "CargaCuentas(5);") - ' DdlISRCirculacion.Attributes.Add("onclick", "CargaCuentas(6);") - ' DdlProveedores.Attributes.Add("onclick", "CargaCuentas(7);") - ' DdlClientes.Attributes.Add("onclick", "CargaCuentas(8);") - ' DdlInventario.Attributes.Add("onclick", "CargaCuentas(9);") - ' DdlGasto.Attributes.Add("onclick", "CargaCuentas(10);") - ' DdlBancos.Attributes.Add("onclick", "CargaCuentas(11);") - ' DdlDeudores.Attributes.Add("onclick", "CargaCuentas(12);") - ' DdlAcreedores.Attributes.Add("onclick", "CargaCuentas(13);") - ' DdlDocxPagar.Attributes.Add("onclick", "CargaCuentas(14);") - ' DdlAnticipoCliente.Attributes.Add("onclick", "CargaCuentas(15);") - ' DdlAnticipoProveedores.Attributes.Add("onclick", "CargaCuentas(16);") - ' DdlCaja.Attributes.Add("onclick", "CargaCuentas(17);") - ' DdlFyE.Attributes.Add("onclick", "CargaCuentas(18);") - ' DddlCuentaGananciaCambiaria.Attributes.Add("onclick", "CargaCuentas(19);") - ' DdlCuentaPerdidaCambiaria.Attributes.Add("onclick", "CargaCuentas(20);") - ' DdlActivoFijo.Attributes.Add("onclick", "CargaCuentas(33);") - ' DdlDSV.Attributes.Add("onclick", "CargaCuentas(34);") - ' DdlImpuestosLocales.Attributes.Add("onclick", "CargaCuentas(35);") - ' DdlIEPSxAcreditar.Attributes.Add("onclick", "CargaCuentas(36);") - ' DdlIEPSAcreditable.Attributes.Add("onclick", "CargaCuentas(37);") - ' DdlIEPSxTrasladar.Attributes.Add("onclick", "CargaCuentas(38);") - ' DdlIEPSTrasladado.Attributes.Add("onclick", "CargaCuentas(39);") - ' DdlCuentaDescuentoVenta.Attributes.Add("onclick", "CargaCuentas(40);") - ' DdlCuentaOtrosIngresos.Attributes.Add("onclick", "CargaCuentas(41);") - - ' ''CUENTAS PADRES - ' 'DdlProveedoresSIG.Attributes.Add("onclick", "CargaCuentas(42);") - ' 'DdlClientesSIG.Attributes.Add("onclick", "CargaCuentas(43);") - ' 'DdlInventarioSIG.Attributes.Add("onclick", "CargaCuentas(44);") - ' 'DdlGastoSIG.Attributes.Add("onclick", "CargaCuentas(45);") - ' 'DdlBancosSIG.Attributes.Add("onclick", "CargaCuentas(46);") - ' 'DdlDeudoresSIG.Attributes.Add("onclick", "CargaCuentas(47);") - ' 'DdlAcreedoresSIG.Attributes.Add("onclick", "CargaCuentas(48);") - ' 'DdlDocxPagarSIG.Attributes.Add("onclick", "CargaCuentas(49);") - ' 'DdlAnticipoClienteSIG.Attributes.Add("onclick", "CargaCuentas(50);") - ' 'DdlAnticipoProveedoresSIG.Attributes.Add("onclick", "CargaCuentas(51);") - ' 'DdlCajaSIG.Attributes.Add("onclick", "CargaCuentas(52);") - ' 'DdlFyESIG.Attributes.Add("onclick", "CargaCuentas(53);") - ' 'DdlActivoFijoSIG.Attributes.Add("onclick", "CargaCuentas(54);") - - ' UpDatos.Update() - - 'End Sub Public Sub CargaFuncionalidad(CveFuncionalidad As Integer, ByRef Ddl As DropDownList) Dim Dr As DataRow = DtFuncionalidades.FiltroPrimero($"CveFuncionalidad = {CveFuncionalidad}") If Dr IsNot Nothing Then diff --git a/Sistemas/Empresa.aspx b/Sistemas/Empresa.aspx index b3bd8aec9..a5a8d023d 100644 --- a/Sistemas/Empresa.aspx +++ b/Sistemas/Empresa.aspx @@ -261,6 +261,18 @@ + + Huso Horario: + + <%-- --%> + + + + + + + diff --git a/Sistemas/Empresa.aspx.vb b/Sistemas/Empresa.aspx.vb index 7fc28addf..00a305730 100644 --- a/Sistemas/Empresa.aspx.vb +++ b/Sistemas/Empresa.aspx.vb @@ -152,6 +152,8 @@ Partial Class Sistemas_Empresa CargaDdlPac() CargaRegimenFiscal() CargaGridIndicadores() + CargaZonasHorarias() + DtFuncionalidades = Nothing DtCuentas = Nothing CveClasificacionPorcentaje = 0 @@ -299,6 +301,7 @@ Partial Class Sistemas_Empresa DdlTerminalTipo.SelectedValue = .PV_TerminalTipo.ToString TxtImporte.Text = .Importe.ToString TipoContabilidad = .TipoContabilidad + DdlZonaHoraria.SelectedValueExist(.CveZonaHoraria) TxtPlantillaVenta.Text = .PlantillaMailVenta TxtAsunto.Text = .AsuntoPlantillaMailVenta @@ -393,7 +396,8 @@ Partial Class Sistemas_Empresa "".Trim, TxtAreaGeografica.Text.Trim, TxtNombreCorto.Text, TxtCURP.Text.Trim, DdlRegimen.SelectedValue.ToEntero, TxtImporte.Text.ToDecimal, TxtCIEC.Text, DdlPlataforma.SelectedValue.ToEntero, ChkUsaAC.Checked, TxtPorDepreciacion.Text.ToDecimal, TxtExtension.Text, TxtLocalidad.Text, DdlMetodoInventario.SelectedValue.ToEntero, TxtPeriodoActual.Text.ToEntero, - TxtEjercicioActual.Text.ToEntero, ChkDefaultAsistencias.Checked, TxtDiasPermitidos.Text.ToEntero, DdlTipoCentroDeCostos.SelectedValue.ToEntero, ChkReqCentroCostos.Checked, DdlTerminalTipo.SelectedValue.ToEntero, CvePAC:=DdlCvePac.SelectedValue.ToEntero + TxtEjercicioActual.Text.ToEntero, ChkDefaultAsistencias.Checked, TxtDiasPermitidos.Text.ToEntero, DdlTipoCentroDeCostos.SelectedValue.ToEntero, ChkReqCentroCostos.Checked, DdlTerminalTipo.SelectedValue.ToEntero, + CvePAC:=DdlCvePac.SelectedValue.ToEntero, CveZonaHoraria:=DdlZonaHoraria.SelectedValue.ToEntero ) Then 'Movemos el Archivo Fisicamente @@ -439,7 +443,8 @@ Partial Class Sistemas_Empresa TxtNombreCorto.Text, TxtCURP.Text.Trim, DdlRegimen.SelectedValue.ToEntero, DdlCvePac.SelectedValue.ToEntero, TxtImporte.Text.ToDecimal, TxtCIEC.Text, DdlPlataforma.SelectedValue.ToEntero, ChkUsaAC.Checked, TxtPorDepreciacion.Text.ToDecimal, TxtExtension.Text, TxtLocalidad.Text, DdlMetodoInventario.SelectedValue.ToEntero, TxtPeriodoActual.Text.ToEntero, - TxtEjercicioActual.Text.ToEntero, ChkDefaultAsistencias.Checked, TxtDiasPermitidos.Text.ToEntero, DdlTipoCentroDeCostos.SelectedValue.ToEntero, ChkReqCentroCostos.Checked, DdlTerminalTipo.SelectedValue.ToEntero) Then + TxtEjercicioActual.Text.ToEntero, ChkDefaultAsistencias.Checked, TxtDiasPermitidos.Text.ToEntero, DdlTipoCentroDeCostos.SelectedValue.ToEntero, ChkReqCentroCostos.Checked, + DdlTerminalTipo.SelectedValue.ToEntero, CveZonaHoraria:=DdlZonaHoraria.SelectedValue.ToEntero) Then 'Movemos el Archivo Fisicamente If Session("FileUpload").ToString <> String.Empty AndAlso File.Exists(Request.PhysicalApplicationPath + "Banners\Temp\" & Session("FileUpload").ToString) Then @@ -572,6 +577,19 @@ Partial Class Sistemas_Empresa End If Objeto.Dispose() End Sub + + Private Sub CargaZonasHorarias() + Dim GPS As New ClsGPS + If GPS.GetZonasHorarias() Then + DdlZonaHoraria.DataSource = GPS.DtResultados + Else + DdlZonaHoraria.DataSource = Nothing + End If + DdlZonaHoraria.DataBind() + DdlZonaHoraria.Items.Insert(0, New ListItem("Seleccione", "-1")) + GPS.Dispose() + End Sub + Private Sub CargaRegimenFiscal() Dim ObjSis As New ClsSisEmpresas If ObjSis.GetRegimenFiscal(-1) Then @@ -788,7 +806,7 @@ Partial Class Sistemas_Empresa Protected Sub ChkDescargaMasivaSat_CheckedChanged(sender As Object, e As EventArgs) Dim objTP As New ClsTareasProgramadas() If ChkDescargaMasivaSat.Checked Then - If objTP.AddTareasProgramadas(ViewState("CveEmpresa").ToString.ToEntero(), 1, DateTime.Now.ToString("yyyy/MM/dd"), "", 0, "", DateTime.Now.ToString("yyyy/MM/dd"), DateTime.Now.ToString("yyyy/MM/dd"), "", "", 0, 1) Then + If objTP.AddTareasProgramadas(ViewState("CveEmpresa").ToString.ToEntero(), 1, NowADS().ToString("yyyy/MM/dd"), "", 0, "", NowADS().ToString("yyyy/MM/dd"), NowADS().ToString("yyyy/MM/dd"), "", "", 0, 1) Then Alert("La tarea programada de descarga masiva del sat a agregado satisfactoriamente") End If Else diff --git a/Sistemas/PopUpAddUsuario.aspx.vb b/Sistemas/PopUpAddUsuario.aspx.vb index 795c55902..5dbb5b03f 100644 --- a/Sistemas/PopUpAddUsuario.aspx.vb +++ b/Sistemas/PopUpAddUsuario.aspx.vb @@ -164,7 +164,7 @@ Partial Class Sistemas_PopUpAddUsuario If ObjUsuario.UpdateUsuario(LtlUsuario.Text, TxtNombre.Text, -1, TxtEmail.Text, -1, -1, True, True, -1, CveUsuario, -1, -1) Then Alert("La contraseña se reestableció correctamente a la contraseña por default '-acceso-'.") Dim Liga As String = $"{Context.Request.Url.OriginalString.Substring(0, Context.Request.Url.OriginalString.Length - Context.Request.Url.PathAndQuery.Length)}/LogIn.aspx" - Dim LigaActivar As String = Liga & "?p=" & Encripta("CveU=" & CveUsuario & "&Clave=" & "-acceso-" & "&Opcion=Activar&Hora=" & DateTime.Now.Ticks& & "&CveE=" & UsuarioActual.CveEmpresa) + Dim LigaActivar As String = Liga & "?p=" & Encripta("CveU=" & CveUsuario & "&Clave=" & "-acceso-" & "&Opcion=Activar&Hora=" & NowADS().Ticks& & "&CveE=" & UsuarioActual.CveEmpresa) If UsuarioActual.Empresa.CvePlataforma = 3 Then EnviaCorreoGPS(Liga, LigaActivar) @@ -257,7 +257,7 @@ Partial Class Sistemas_PopUpAddUsuario 'ENVIA CORREO If CveUsuario > 0 Then Dim Liga As String = $"{Context.Request.Url.OriginalString.Substring(0, Context.Request.Url.OriginalString.Length - Context.Request.Url.PathAndQuery.Length)}/LogIn.aspx" - Dim LigaActivar As String = Liga & "?p=" & Encripta("CveU=" & CveUsuario & "&Clave=" & "-acceso-" & "&Opcion=Activar&Hora=" & DateTime.Now.Ticks& & "&CveE=" & UsuarioActual.CveEmpresa) + Dim LigaActivar As String = Liga & "?p=" & Encripta("CveU=" & CveUsuario & "&Clave=" & "-acceso-" & "&Opcion=Activar&Hora=" & NowADS().Ticks& & "&CveE=" & UsuarioActual.CveEmpresa) If UsuarioActual.Empresa.CvePlataforma = 3 Then Mensaje = EnviaCorreoGPS(Liga, LigaActivar) diff --git a/Sistemas/PopUpSeleccionarEmpresa.aspx.vb b/Sistemas/PopUpSeleccionarEmpresa.aspx.vb index b729a4477..cca2720e1 100644 --- a/Sistemas/PopUpSeleccionarEmpresa.aspx.vb +++ b/Sistemas/PopUpSeleccionarEmpresa.aspx.vb @@ -215,7 +215,7 @@ Partial Class PopUpSeleccionarEmpresa End If Catch End Try - MensajeLog = $"{System.Environment.NewLine}'{DateTime.Now:dd/MM/yyyy hh:mm}' -- {MensajeLog}{Mensaje.Trim()}{Environment.NewLine}" + MensajeLog = $"{System.Environment.NewLine}'{NowADS():dd/MM/yyyy hh:mm}' -- {MensajeLog}{Mensaje.Trim()}{Environment.NewLine}" Try ArchivoW = New IO.StreamWriter(String.Format("{0}\LogSession.txt", AppDomain.CurrentDomain.BaseDirectory), True, System.Text.Encoding.UTF8) @@ -233,7 +233,7 @@ Partial Class PopUpSeleccionarEmpresa Protected Sub GvPortalRastreo_RowDataBound(sender As Object, e As GridViewRowEventArgs) If e.Row.RowType = DataControlRowType.DataRow Then - Dim Parametros As String = Encripta($"OPCION=PORTALGPS&CVEEMPRESA={e.Row.DBCampo("CveEmpresa")}&CVECLIENTE={e.Row.DBCampo("CveCliente")}&CVEUSUARIO={UsuarioActual.CveUsuario}&TICKS={Now.Ticks}") + Dim Parametros As String = Encripta($"OPCION=PORTALGPS&CVEEMPRESA={e.Row.DBCampo("CveEmpresa")}&CVECLIENTE={e.Row.DBCampo("CveCliente")}&CVEUSUARIO={UsuarioActual.CveUsuario}&TICKS={NowADS().Ticks}") Dim SitioGPS As String = "https://gps.signalsgps.com/" diff --git a/Sistemas/Registro.aspx.vb b/Sistemas/Registro.aspx.vb index a96808ffe..728fbb8d1 100644 --- a/Sistemas/Registro.aspx.vb +++ b/Sistemas/Registro.aspx.vb @@ -123,7 +123,7 @@ Partial Class Sistemas_Registro strBody.Append(" ") strBody.Append(" Fecha") strBody.Append(" ") - strBody.Append(DateTime.Now.ToString("dd/MM/yy")) + strBody.Append(ClsPaginas.NowADS().ToString("dd/MM/yy")) strBody.Append(" ") strBody.Append(" ") strBody.AppendFormat(" Buen día, {0} ", Nombre) diff --git a/Sistemas/RegistroEmpresa.aspx.vb b/Sistemas/RegistroEmpresa.aspx.vb index a440a3e3c..205bb4874 100644 --- a/Sistemas/RegistroEmpresa.aspx.vb +++ b/Sistemas/RegistroEmpresa.aspx.vb @@ -135,7 +135,7 @@ Partial Class Sistemas_RegistroEmpresa strBody.Append(" ") strBody.Append(" ") strBody.Append(" ") strBody.Append(" ") diff --git a/Sistemas/UsuarioDetalle.aspx.vb b/Sistemas/UsuarioDetalle.aspx.vb index d0b30a1a9..58302d495 100644 --- a/Sistemas/UsuarioDetalle.aspx.vb +++ b/Sistemas/UsuarioDetalle.aspx.vb @@ -420,8 +420,8 @@ Partial Class Sistemas_UsuarioDetalle Exit Sub End If - TxtFechaIBitacora.Text = Now.AddMonths(-1).ToString("dd/MM/yyyy") - TxtFechaFBitacora.Text = Now.ToString("dd/MM/yyyy") + TxtFechaIBitacora.Text = NowADS().AddMonths(-1).ToString("dd/MM/yyyy") + TxtFechaFBitacora.Text = NowADS().ToString("dd/MM/yyyy") ViewState("CveUsuario") = PreviousPage.CurrentUsuario ViewState("CveRol") = -1 @@ -439,7 +439,7 @@ Partial Class Sistemas_UsuarioDetalle LnkRenviaCorreo.Visible = True Else 'Configuración de Modalidad Insert - LblFechaCaptura.Text = Now.ToShortDateString() + LblFechaCaptura.Text = NowADS().ToShortDateString() LblUsuarioCapturo.Text = UsuarioActual.Usuario TrContraseña.Visible = False LnkRestablecer.Visible = False @@ -4892,7 +4892,7 @@ Partial Class Sistemas_UsuarioDetalle Protected Sub LnkAutorizarEquipo_Click(sender As Object, e As EventArgs) 'CveUsuario - Dim AdsCodex As String = Encripta(String.Format("{0}_{1}_{2}", CveUsuario, DateTime.Now.Ticks, UsuarioActual.CveUsuario)) + Dim AdsCodex As String = Encripta(String.Format("{0}_{1}_{2}", CveUsuario, NowADS().Ticks, UsuarioActual.CveUsuario)) Using objuser As New ClsSisUsuarios() If objuser.UsuariosGetTokenXEquipo(CveUsuario, UsuarioActual.CveUsuario, AdsCodex) Then RegistraScript(String.Format("localStorage.setItem('AdsCodex', '{0}');", AdsCodex), "adstokenx") @@ -4992,10 +4992,10 @@ Partial Class Sistemas_UsuarioDetalle params.Add(New ReportParameter("FechaInicio", FechaI)) params.Add(New ReportParameter("FechaFin", FechaF)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("Filtros", StrFiltro.ToString)) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) - ImprimirPDF("Empresas/Grales/Formatos/BitacoraLogin.rdlc", DtDatos, params, String.Format("BitacoraRegistro-{0}", Now.ToDateTime.ToShortDateString)) + ImprimirPDF("Empresas/Grales/Formatos/BitacoraLogin.rdlc", DtDatos, params, String.Format("BitacoraRegistro-{0}", NowADS().ToDateTime.ToShortDateString)) End Sub End Class diff --git a/Site.master b/Site.master index 4e230a729..378bce6f1 100644 --- a/Site.master +++ b/Site.master @@ -491,7 +491,7 @@ - + diff --git a/Ventas/RepVentaDetalle.aspx.vb b/Ventas/RepVentaDetalle.aspx.vb index e6752cb6c..b292cf75f 100644 --- a/Ventas/RepVentaDetalle.aspx.vb +++ b/Ventas/RepVentaDetalle.aspx.vb @@ -303,8 +303,8 @@ Partial Class RepVentaDetalle 'DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1")) - txtFechaI.Text = Now.FirstDayOfMonth.ToShortDateString - txtFechaF.Text = Now.LastDayOfMonth.ToShortDateString + txtFechaI.Text = NowADS().FirstDayOfMonth.ToShortDateString + txtFechaF.Text = NowADS().LastDayOfMonth.ToShortDateString 'Vendedor DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa, VendedorTipo:=-1).FiltraParametros("VendedorTipo in (1,4)") 'vendedores y vendedores de piso @@ -625,160 +625,85 @@ Partial Class RepVentaDetalle Dim objUsuario As New ClsSisUsuarios Dim ListPersonalizada As New List(Of String) - If ChkOrdenCompra.Checked Then - ListPersonalizada.Add("OrdenCompra") - End If + If ChkOrdenCompra.Checked Then ListPersonalizada.Add("OrdenCompra") - If ChkFolio.Checked Then - ListPersonalizada.Add("Folio") - End If + If ChkFolio.Checked Then ListPersonalizada.Add("Folio") - If ChkPedidoContrato.Checked Then - ListPersonalizada.Add("PedidoContrato") - End If + If ChkPedidoContrato.Checked Then ListPersonalizada.Add("PedidoContrato") + If ChkFolio.Checked Then ListPersonalizada.Add("Folio") - If ChkFolio.Checked Then - ListPersonalizada.Add("Folio") - End If + If ChkFecha.Checked Then ListPersonalizada.Add("Fecha") - If ChkFecha.Checked Then - ListPersonalizada.Add("Fecha") - End If + If ChkCliente.Checked Then ListPersonalizada.Add("Cliente") - If ChkCliente.Checked Then - ListPersonalizada.Add("Cliente") - End If + If ChkSubTotal.Checked Then ListPersonalizada.Add("SubTotal") - If ChkSubTotal.Checked Then - ListPersonalizada.Add("SubTotal") - End If + If ChkDescuento.Checked Then ListPersonalizada.Add("Descuento") - If ChkDescuento.Checked Then - ListPersonalizada.Add("Descuento") - End If + If ChlMotivoDescuento.Checked Then ListPersonalizada.Add("MotivoDescuento") - If ChlMotivoDescuento.Checked Then - ListPersonalizada.Add("MotivoDescuento") - End If + If ChkAmortizacion.Checked Then ListPersonalizada.Add("Amortizacion") - If ChkAmortizacion.Checked Then - ListPersonalizada.Add("Amortizacion") - End If + If ChkIVA.Checked Then ListPersonalizada.Add("IVA") - If ChkIVA.Checked Then - ListPersonalizada.Add("IVA") - End If + If ChkIEPS.Visible AndAlso ChkIEPS.Checked Then ListPersonalizada.Add("IEPS") - If ChkIEPS.Checked Then - ListPersonalizada.Add("IEPS") - End If + If ChkRetIVA.Checked Then ListPersonalizada.Add("RetIVA") - If ChkRetIVA.Checked Then - ListPersonalizada.Add("RetIVA") - End If + If ChkRetISR.Checked Then ListPersonalizada.Add("RetISR") - If ChkRetISR.Checked Then - ListPersonalizada.Add("RetISR") - End If + If ChkTotalImpuestos.Checked Then ListPersonalizada.Add("TotalImpuestos") - If ChkTotalImpuestos.Checked Then - ListPersonalizada.Add("TotalImpuestos") - End If + If ChkTotal.Checked Then ListPersonalizada.Add("Total") - If ChkTotal.Checked Then - ListPersonalizada.Add("Total") - End If + If ChkMoneda.Checked Then ListPersonalizada.Add("Moneda") - If ChkMoneda.Checked Then - ListPersonalizada.Add("Moneda") - End If + If ChkSucursal.Checked Then ListPersonalizada.Add("Sucursal") - If ChkSucursal.Checked Then - ListPersonalizada.Add("Sucursal") - End If + If ChkSucursalEjecucion.Checked Then ListPersonalizada.Add("SucursalEjecucion") - If ChkSucursalEjecucion.Checked Then - ListPersonalizada.Add("SucursalEjecucion") - End If + If ChkCodigo.Checked Then ListPersonalizada.Add("Codigo") - If ChkCodigo.Checked Then - ListPersonalizada.Add("Codigo") - End If + If ChkSucursalCliente.Checked Then ListPersonalizada.Add("SucursalCliente") - If ChkSucursalCliente.Checked Then - ListPersonalizada.Add("SucursalCliente") - End If + If ChkSucursalCobranza.Checked Then ListPersonalizada.Add("SucursalCobranza") - If ChkSucursalCobranza.Checked Then - ListPersonalizada.Add("SucursalCobranza") - End If + If ChkVendedor.Checked Then ListPersonalizada.Add("Vendedor") - If ChkVendedor.Checked Then - ListPersonalizada.Add("Vendedor") - End If + If ChkEstatusFactura.Checked Then ListPersonalizada.Add("EstatusFactura") - If ChkEstatusFactura.Checked Then - ListPersonalizada.Add("EstatusFactura") - End If + If ChkMotivoCancelacion.Checked Then ListPersonalizada.Add("MotivoCancelacion") - If ChkMotivoCancelacion.Checked Then - ListPersonalizada.Add("MotivoCancelacion") - End If + If ChkSeTimbro.Checked Then ListPersonalizada.Add("SeTimbro") - If ChkSeTimbro.Checked Then - ListPersonalizada.Add("SeTimbro") - End If + If ChkSeEnvioMail.Checked Then ListPersonalizada.Add("SeEnvioMail") - If ChkSeEnvioMail.Checked Then - ListPersonalizada.Add("SeEnvioMail") - End If + If ChkCuentaContable.Checked Then ListPersonalizada.Add("CuentaContable") - If ChkCuentaContable.Checked Then - ListPersonalizada.Add("CuentaContable") - End If + If ChkUsuario.Checked Then ListPersonalizada.Add("Usuario") - If ChkUsuario.Checked Then - ListPersonalizada.Add("Usuario") - End If + If ChkObservaciones.Checked Then ListPersonalizada.Add("Observaciones") - If ChkObservaciones.Checked Then - ListPersonalizada.Add("Observaciones") - End If + If ChkFolioFiscal.Checked Then ListPersonalizada.Add("FolioFiscal") - If ChkFolioFiscal.Checked Then - ListPersonalizada.Add("FolioFiscal") - End If + If ChkMailCliente.Checked Then ListPersonalizada.Add("MailCliente") - If ChkMailCliente.Checked Then - ListPersonalizada.Add("MailCliente") - End If + If ChkEstatusFacturacion.Checked Then ListPersonalizada.Add("EstatusFacturacion") - If ChkEstatusFacturacion.Checked Then - ListPersonalizada.Add("EstatusFacturacion") - End If + If ChkFolioFacturacion.Checked Then ListPersonalizada.Add("FolioFacturacion") - If ChkFolioFacturacion.Checked Then - ListPersonalizada.Add("FolioFacturacion") - End If + If ChkSaldo.Checked Then ListPersonalizada.Add("Saldo") - If ChkSaldo.Checked Then - ListPersonalizada.Add("Saldo") - End If + If ChkMetodoPago.Checked Then ListPersonalizada.Add("MetodoPago") - - If ChkMetodoPago.Checked Then - ListPersonalizada.Add("MetodoPago") - End If - - If ChkFormaPago.Checked Then - ListPersonalizada.Add("FormaPago") - End If + If ChkFormaPago.Checked Then ListPersonalizada.Add("FormaPago") If ChkUsoCFDI.Checked Then ListPersonalizada.Add("UsoCFDI") - If ChkKilometraje.Checked Then ListPersonalizada.Add("Kilometraje") + If ChkKilometraje.Visible AndAlso ChkKilometraje.Checked Then ListPersonalizada.Add("Kilometraje") + If ChkTC.Checked Then ListPersonalizada.Add("TC") If objUsuario.AddUsuariosPersonalizaciones(UsuarioActual, "RepVentaDetalles.aspx", String.Join("|", ListPersonalizada)) Then 'Alert("Personalizacion guardada") @@ -877,6 +802,9 @@ Partial Class RepVentaDetalle Case "IEPS" ChkIEPS.Checked = True Exit Select + Case "TC" + ChkTC.Checked = True + Exit Select Case "RetIVA" ChkRetIVA.Checked = True Exit Select @@ -1018,6 +946,7 @@ Partial Class RepVentaDetalle GvDatos.Columns(37).Visible = ChkFormaPago.Checked GvDatos.Columns(38).Visible = ChkUsoCFDI.Checked GvDatos.Columns(39).Visible = ChkKilometraje.Checked + GvDatos.Columns(40).Visible = ChkTC.Checked Personalizo = 1 If Personalizo = 1 Then @@ -1032,22 +961,22 @@ Partial Class RepVentaDetalle #Region "IMPRESIONES" Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click - 'GvDatos.ExportToExcel("DetalleVentas_" & Now.ToShortDateString) + 'GvDatos.ExportToExcel("DetalleVentas_" & NowADS().ToShortDateString) GenerarPDF("Excel") End Sub Protected Sub ImgExcelVSH_Click(sender As Object, e As EventArgs) Handles ImgExcelVSH.Click 'GvVsh.Visible = True - 'GvVsh.ExportToExcel("DetalleVentas_" & Now.ToShortDateString) + 'GvVsh.ExportToExcel("DetalleVentas_" & NowADS().ToShortDateString) 'GvVsh.Visible = False - GvDatos.ExportToExcel("DetalleVentas_" & Now.ToShortDateString) + GvDatos.ExportToExcel("DetalleVentas_" & NowADS().ToShortDateString) End Sub Protected Sub ImgExcelPersonalizado_Click(sender As Object, e As EventArgs) Handles ImgExcelPersonalizado.Click 'GvVsh.Visible = True - 'GvVsh.ExportToExcel("DetalleVentas_" & Now.ToShortDateString) + 'GvVsh.ExportToExcel("DetalleVentas_" & NowADS().ToShortDateString) 'GvVsh.Visible = False - GvDatos.ExportToExcel("DetalleVentas_" & Now.ToShortDateString & ".xls") - 'GvDatos.ExportToExcelG("DetalleVentas_" & Now.ToShortDateString & ".xlsx") + GvDatos.ExportToExcel("DetalleVentas_" & NowADS().ToShortDateString & ".xls") + 'GvDatos.ExportToExcelG("DetalleVentas_" & NowADS().ToShortDateString & ".xlsx") End Sub Public Overrides Sub VerifyRenderingInServerForm(control As Control) @@ -1235,7 +1164,7 @@ Partial Class RepVentaDetalle params.Add(New ReportParameter("FechaInicio", FechaIn)) params.Add(New ReportParameter("FechaFin", FechaFn)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("TipoDocto", TipoDocto)) params.Add(New ReportParameter("AgrupadoPor", $"Agrupado Por: {Grupo} {TipoDocto} {FechaIn} {FechaFn} {FechaIEjec} {FechaFEjec} {CveCliente} {CveSucursal} {CveSucursalEjec} {Vendedor} {CveUsuario} {CveEstatusFactura} {CondicionesPago} ")) @@ -1247,7 +1176,7 @@ Partial Class RepVentaDetalle RutaFormato = "Empresas/Grales/Formatos/RepVentaDetalle.rdlc" End If - ImprimirPDF(RutaFormato, dt, params, String.Format("ReporteVentaDetalle-{0}", Now.ToDateTime.ToShortDateString), Formato:=Formato) + ImprimirPDF(RutaFormato, dt, params, String.Format("ReporteVentaDetalle-{0}", NowADS().ToDateTime.ToShortDateString), Formato:=Formato) Else Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia) End If diff --git a/Ventas/RepVentas.aspx b/Ventas/RepVentas.aspx index a7632d710..fecc3ef63 100644 --- a/Ventas/RepVentas.aspx +++ b/Ventas/RepVentas.aspx @@ -515,19 +515,6 @@
    Fecha: ") - strBody.Append(DateTime.Now.ToString("dd/MM/yy")) + strBody.Append(ClsPaginas.NowADS().ToString("dd/MM/yy")) strBody.Append(" ") strBody.Append("
    - - - - - - - - - - - - - - - - - diff --git a/Ventas/RepVentas.aspx.vb b/Ventas/RepVentas.aspx.vb index 5b6727577..64d428b75 100644 --- a/Ventas/RepVentas.aspx.vb +++ b/Ventas/RepVentas.aspx.vb @@ -232,8 +232,8 @@ Partial Class Ventas_RepVentas DdlTipoRelacion.DataBind() DdlTipoRelacion.Items.Insert(0, New ListItem("Todos", "-1")) - txtFechaI.Text = Now.FirstDayOfMonth.ToShortDateString - txtFechaF.Text = Now.ToShortDateString + txtFechaI.Text = NowADS().FirstDayOfMonth.ToShortDateString + txtFechaF.Text = NowADS().ToShortDateString End Sub @@ -347,7 +347,7 @@ Partial Class Ventas_RepVentas TipoCambio = RblTipoCambio.SelectedValue.ToEntero If TipoCambio = 3 Then LiEspecifico.Visible = True - TCEspecifico = GlobalTipoCambio(Now).ToDecimal + TCEspecifico = GlobalTipoCambio(NowADS()).ToDecimal TxtEspecifico.Text = TCEspecifico.ToString Else LiEspecifico.Visible = False @@ -787,7 +787,7 @@ Partial Class Ventas_RepVentas #Region " EXCEL " Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click - 'GvDatos.ExportToExcel("ReporteVentas" & Now.ToShortDateString) + 'GvDatos.ExportToExcel("ReporteVentas" & NowADS().ToShortDateString) GenerarPDF("Excel") End Sub #End Region @@ -830,7 +830,7 @@ Partial Class Ventas_RepVentas params.Add(New ReportParameter("FechaInicio", FechaI)) params.Add(New ReportParameter("FechaFin", FechaF)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("Filtros", StrFiltro.ToString)) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) @@ -840,7 +840,7 @@ Partial Class Ventas_RepVentas ruta = "Empresas/Grales/Formatos/RepVentas.rdlc" End If - ImprimirPDF(ruta, dt, params, String.Format("ReporteVentas-{0}", Now.ToDateTime.ToShortDateString), Formato:=Formato) + ImprimirPDF(ruta, dt, params, String.Format("ReporteVentas-{0}", NowADS().ToDateTime.ToShortDateString), Formato:=Formato) Else Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia) End If @@ -977,7 +977,7 @@ Partial Class Ventas_RepVentas ' txtFechaIHP.Text = PrevMondayDate.ToString("dd/MM/yyyy") ' txtFechaFHP.Text = Sunday.ToString("dd/MM/yyyy") ' Case "2" ' MENSUAL - ' Dim FechaRef As DateTime = Now + ' Dim FechaRef As DateTime = NowADS() ' Dim LastDayOfMonth = DateTime.DaysInMonth(FechaRef.Year, FechaRef.Month) ' txtFechaIHP.Text = $"01/{FechaRef.Month}/{FechaRef.Year}" @@ -1032,10 +1032,10 @@ Partial Class Ventas_RepVentas Protected Sub ImgExcelPersonalizado_Click(sender As Object, e As EventArgs) Handles ImgExcelPersonalizado.Click 'GvVsh.Visible = True - 'GvVsh.ExportToExcel("DetalleVentas_" & Now.ToShortDateString) + 'GvVsh.ExportToExcel("DetalleVentas_" & NowADS().ToShortDateString) 'GvVsh.Visible = False - GvDatos.ExportToExcel("Ventas_" & Now.ToShortDateString & ".xls") - 'GvDatos.ExportToExcelG("DetalleVentas_" & Now.ToShortDateString & ".xlsx") + GvDatos.ExportToExcel("Ventas_" & NowADS().ToShortDateString & ".xls") + 'GvDatos.ExportToExcelG("DetalleVentas_" & NowADS().ToShortDateString & ".xlsx") End Sub diff --git a/Ventas/RepVentas.aspx.vb2 b/Ventas/RepVentas.aspx.vb2 index 5659d9865..6853926a0 100644 --- a/Ventas/RepVentas.aspx.vb2 +++ b/Ventas/RepVentas.aspx.vb2 @@ -298,7 +298,7 @@ Partial Class Ventas_RepVentas #Region " EXCEL " Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click - 'GvDatos.ExportToExcel("ReporteVentas" & Now.ToShortDateString) + 'GvDatos.ExportToExcel("ReporteVentas" & NowADS().ToShortDateString) GenerarPDF("Excel") End Sub #End Region @@ -322,14 +322,14 @@ Partial Class Ventas_RepVentas params.Add(New ReportParameter("FechaInicio", FechaI)) params.Add(New ReportParameter("FechaFin", FechaF)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("Filtros", StrFiltro.ToString)) If Imagen.Exists Then params.Add(New ReportParameter("LogoPath", $"file://{Imagen.FullName}")) Else params.Add(New ReportParameter("LogoPath", "")) End If - ImprimirPDF("Empresas/Grales/Formatos/RepVentas.rdlc", dt, params, String.Format("ReporteVentas-{0}", Now.ToDateTime.ToShortDateString), Formato:=Formato) + ImprimirPDF("Empresas/Grales/Formatos/RepVentas.rdlc", dt, params, String.Format("ReporteVentas-{0}", NowADS().ToDateTime.ToShortDateString), Formato:=Formato) Else Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia) End If @@ -346,7 +346,7 @@ Partial Class Ventas_RepVentas Dim Str As New StringBuilder Str.AppendLine("Header Section,,,,,,,,,,,End Customer Identification ,,,,,,,,,,,,, Ship To Identification,,,,,,,,,,,,, Sold To Identification,,,,,,,,,,,,, Bill To Identification,,,,,,,,,,,,, Salesperson Detail,,,,,, Line Item Detail,,,,,,,,,,,,,,,,,,,,,,,,,,,, New FIELDS,,,,,,,,,,,,,,,,,,,,,,,,,, ") Str.AppendLine("Partner Purchase Price Currency Code, Exchange Rate, Reporter_id, Reported Partner Type, Reporter Company Name , Sell From Address line 1, Sell From Address line 2, Sell From City, Reported Partner State/Province, Sell from postal code, Sell from Country code,End User Customer Name,End User Company Tax ID,End User Address Line 1,End User Address Line 2,End User City,End User State/Province Code,End User Postal Code,End User Country Code,End User ID,End Customer Department,End Customer Contact Name,End Customer Contact Phone,End Customer County, Ship To Customer Name, Ship To Company Tax ID, Ship To Address Line 1, Ship To Address Line 2, Ship To City, Ship To State/Province Code, Ship To Postal Code, Ship To Country Code, Ship To Customer ID, Ship To Department, Ship To Contact Name, Ship To Contact Phone, Ship To County, Sold To Customer Name, Sold To Company Tax ID, Sold To Address Line 1, Sold To Address Line 2, Sold To City, Sold To State/Province Code, Sold To Postal Code, Sold To Country Code, Sold To Customer ID, Sold To Department, Sold To Contact Name, Sold To Contact Phone, Sold To County, Bill To Customer Name, Bill To Company Tax ID, Bill To Address Line 1 , Bill To Address Line 2, Bill To City, Bill To State/Province Code, Bill To Postal Code, Bill To Country Code, Bill To Customer ID, Bill To Agreement Number, Bill To Contact Name, Bill To Contact Phone, Bill To County, HP Representative Name, HP Sales Rep Email, Salesperson2 Name, Salesperson2 Unique Employee ID, Salesperson's Manager's Name,Salesperson's Manager Unique Employee ID,Quantity Qualifier,Product Quantity Shipped/Sold,Line Item ID,Partner Reported Product ID,Product Description,Date Type Qualifier,Channel Partner to Customer Transaction Date,Reseller’’s Product Number,Partner Purchase Price,Extended Price,Partner Sell Price,Extended Resale Price,Transaction Type,Rebate Tracking #,Partner Requested Rebate Amount,Extended Rebate Amount,Debit Number,Channel Partner to Customer Invoice ID,Reference Number,Customer to Channel Partner Purchase Order ID,Deal ID #1,Deal ID #2,Deal ID #3,Deal ID #4,Deal ID #5,Deal ID #6,Marketing Subprogram Code,Product Serial ID assigned by HP,Purchasing Source wholesaler indicator,Drop Ship Flag,Distributor's Invoice Number,Partner Internal transaction ID,Partner Comment,Deal Bundle ID #1,Deal Bundle ID #2,Deal Bundle ID #3,Deal Bundle ID #4,Deal Bundle ID #5,Deal Bundle ID #6,NMSO NAME,Sales Type,Purchase Agreement,Product Origin,Partner Reported CBN#,Partner Reference,Supplies Tracking ID (QR Code),Sell From Location ID (assigned by HP or Partner-assigned),Sell from name,Comment Deal ID #1,Comment Deal ID #2,Comment Deal ID #3,Comment Deal ID #4,Comment Deal ID #5,Comment Deal ID #6,Partner Sell Price Currency Code") - If Rep.GetReporteHP(72, Now.AddMonths(-1).FirstDayOfMonth, Now.AddMonths(-1).LastDayOfMonth) Then + If Rep.GetReporteHP(72, NowADS().AddMonths(-1).FirstDayOfMonth, NowADS().AddMonths(-1).LastDayOfMonth) Then For Each dr As DataRow In Rep.DtResultados.Rows Str.AppendLine($"MXN,,AM30089,,""COMPUPROVEEDORES, S.A.DE C.V."",,,,,,,,,,,,,,,,,,,,{dr("Nombre")},{dr("RFC")},{dr("Direccion")},,,{dr("Ciudad")},{dr("Estado")},{dr("CP")},MX,{dr("RFC")},,,,,{dr("Nombre")},{dr("RFC")},{dr("Direccion")},,{dr("Ciudad")},{dr("Estado")},{dr("CP")},MX,{dr("RFC")},,,,,,,,,,,,,,,,,,,,,,,,,{dr("Cantidad")},,{dr("Codigo")},,,{dr("Fecha")},,,,{dr("PU")},,,,,,,{dr("SerieFolio")},,,,,,,,,,,,,,,,,,,,,,,,,{dr("Proveedor")},,,,,,,,,,,,MXN") Next @@ -365,7 +365,7 @@ Partial Class Ventas_RepVentas TipoCambio = RblTipoCambio.SelectedValue.ToEntero If TipoCambio = 3 Then LiEspecifico.Visible = True - TCEspecifico = GlobalTipoCambio(Now).ToDecimal + TCEspecifico = GlobalTipoCambio(NowADS()).ToDecimal TxtEspecifico.Text = TCEspecifico.ToString Else LiEspecifico.Visible = False diff --git a/Ventas/RepVentasAutorizaciones.aspx.cs b/Ventas/RepVentasAutorizaciones.aspx.cs index 18f5a7129..1d21164ad 100644 --- a/Ventas/RepVentasAutorizaciones.aspx.cs +++ b/Ventas/RepVentasAutorizaciones.aspx.cs @@ -23,7 +23,7 @@ public partial class Ventas_RepVentasAutorizaciones : ClsPaginas { if (Consultado) { - GvDatos.ExportToExcelG("RepVentasAutorizaciones" + DateTime.Now.ToString("dd-MM-yyyy"), "Reporte de Autorizaciones de Ventas", UsuarioActual); + GvDatos.ExportToExcelG("RepVentasAutorizaciones" + NowADS().ToString("dd-MM-yyyy"), "Reporte de Autorizaciones de Ventas", UsuarioActual); } else { @@ -68,8 +68,8 @@ public partial class Ventas_RepVentasAutorizaciones : ClsPaginas DdlClientes.setEsWebService(true); - txtFechaI.Text = DateTime.Now.ToShortDateString(); - txtFechaF.Text = DateTime.Now.ToShortDateString(); + txtFechaI.Text = NowADS().ToShortDateString(); + txtFechaF.Text = NowADS().ToShortDateString(); } protected void BtnConsultar_Click(object sender, EventArgs e) diff --git a/Ventas/RepVentasMensuales.aspx.vb b/Ventas/RepVentasMensuales.aspx.vb index 1032f0974..ff063fc1a 100644 --- a/Ventas/RepVentasMensuales.aspx.vb +++ b/Ventas/RepVentasMensuales.aspx.vb @@ -22,7 +22,7 @@ Partial Class RepVentasMensuales End If End Sub Private Sub InicializarFiltros() - Dim dNow As Date = Now + Dim dNow As Date = NowADS() TxtFechaF.Text = dNow.ToString("dd/MM/yyyy") dNow = dNow.AddDays(-30) TxtFechaI.Text = dNow.ToString("dd/MM/yyyy") @@ -79,7 +79,7 @@ Partial Class RepVentasMensuales End Sub Public Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click - GV.ExportToExcel("Evaluaciones de Proveedores" & Now.ToShortDateString & ".xls") + GV.ExportToExcel("Evaluaciones de Proveedores" & NowADS().ToShortDateString & ".xls") End Sub Protected Sub GV_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GV.RowDataBound diff --git a/Ventas/RepVentasMensualesDetalle.aspx.vb b/Ventas/RepVentasMensualesDetalle.aspx.vb index 62d099ec2..9f7b39957 100644 --- a/Ventas/RepVentasMensualesDetalle.aspx.vb +++ b/Ventas/RepVentasMensualesDetalle.aspx.vb @@ -55,7 +55,7 @@ Partial Class RepVentasMensualesDetalle End Sub Public Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click - GV.ExportToExcel("Evaluaciones de Proveedores" & Now.ToShortDateString & ".xls") + GV.ExportToExcel("Evaluaciones de Proveedores" & NowADS().ToShortDateString & ".xls") End Sub Public Sub GV_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GV.RowDataBound diff --git a/Ventas/RepVentasPV.aspx.vb b/Ventas/RepVentasPV.aspx.vb index f7a797a30..b9aa4e744 100644 --- a/Ventas/RepVentasPV.aspx.vb +++ b/Ventas/RepVentasPV.aspx.vb @@ -76,6 +76,6 @@ Partial Class Ventas_RepVentasPV End Sub Protected Sub ImgExcel_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs) Handles ImgExcel.Click - GvDatos.ExportToExcel("ReporteVentasPV" & Now.ToShortDateString) + GvDatos.ExportToExcel("ReporteVentasPV" & NowADS().ToShortDateString) End Sub End Class diff --git a/Ventas/RepVentasPeriodo.aspx.vb b/Ventas/RepVentasPeriodo.aspx.vb index d009475e7..2a17dd282 100644 --- a/Ventas/RepVentasPeriodo.aspx.vb +++ b/Ventas/RepVentasPeriodo.aspx.vb @@ -63,7 +63,7 @@ Partial Class RepVentasPeriodo Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not IsPostBack Then - txtFechaI.Text = Now.FirstDayOfMonth.ToString("dd/MM/yyyy") + txtFechaI.Text = NowADS().FirstDayOfMonth.ToString("dd/MM/yyyy") TipoCambio = 1 TCEspecifico = -1 @@ -302,7 +302,7 @@ Partial Class RepVentasPeriodo #Region " EXCEL " Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click - 'GvDatos.ExportToExcel("ReporteVentas" & Now.ToShortDateString) + 'GvDatos.ExportToExcel("ReporteVentas" & NowADS().ToShortDateString) GenerarPDF("Excel") End Sub #End Region @@ -327,12 +327,12 @@ Partial Class RepVentasPeriodo params.Add(New ReportParameter("FechaInicio", FechaI)) params.Add(New ReportParameter("FechaFin", FechaF)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("Filtros", StrFiltro.ToString)) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) 'Alert("El reporte requiere papel tipo oficio", TipoMensaje.MsgInformacion) - ImprimirPDF("Empresas/Grales/Formatos/RepVentasPeriodo.rdlc", dt, params, String.Format("ReporteVentas-{0}", Now.ToDateTime.ToShortDateString), Formato:=Formato) + ImprimirPDF("Empresas/Grales/Formatos/RepVentasPeriodo.rdlc", dt, params, String.Format("ReporteVentas-{0}", NowADS().ToDateTime.ToShortDateString), Formato:=Formato) Else Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia) @@ -350,7 +350,7 @@ Partial Class RepVentasPeriodo Dim Str As New StringBuilder Str.AppendLine("Header Section,,,,,,,,,,,End Customer Identification ,,,,,,,,,,,,, Ship To Identification,,,,,,,,,,,,, Sold To Identification,,,,,,,,,,,,, Bill To Identification,,,,,,,,,,,,, Salesperson Detail,,,,,, Line Item Detail,,,,,,,,,,,,,,,,,,,,,,,,,,,, New FIELDS,,,,,,,,,,,,,,,,,,,,,,,,,, ") Str.AppendLine("Partner Purchase Price Currency Code, Exchange Rate, Reporter_id, Reported Partner Type, Reporter Company Name , Sell From Address line 1, Sell From Address line 2, Sell From City, Reported Partner State/Province, Sell from postal code, Sell from Country code,End User Customer Name,End User Company Tax ID,End User Address Line 1,End User Address Line 2,End User City,End User State/Province Code,End User Postal Code,End User Country Code,End User ID,End Customer Department,End Customer Contact Name,End Customer Contact Phone,End Customer County, Ship To Customer Name, Ship To Company Tax ID, Ship To Address Line 1, Ship To Address Line 2, Ship To City, Ship To State/Province Code, Ship To Postal Code, Ship To Country Code, Ship To Customer ID, Ship To Department, Ship To Contact Name, Ship To Contact Phone, Ship To County, Sold To Customer Name, Sold To Company Tax ID, Sold To Address Line 1, Sold To Address Line 2, Sold To City, Sold To State/Province Code, Sold To Postal Code, Sold To Country Code, Sold To Customer ID, Sold To Department, Sold To Contact Name, Sold To Contact Phone, Sold To County, Bill To Customer Name, Bill To Company Tax ID, Bill To Address Line 1 , Bill To Address Line 2, Bill To City, Bill To State/Province Code, Bill To Postal Code, Bill To Country Code, Bill To Customer ID, Bill To Agreement Number, Bill To Contact Name, Bill To Contact Phone, Bill To County, HP Representative Name, HP Sales Rep Email, Salesperson2 Name, Salesperson2 Unique Employee ID, Salesperson's Manager's Name,Salesperson's Manager Unique Employee ID,Quantity Qualifier,Product Quantity Shipped/Sold,Line Item ID,Partner Reported Product ID,Product Description,Date Type Qualifier,Channel Partner to Customer Transaction Date,Reseller’’s Product Number,Partner Purchase Price,Extended Price,Partner Sell Price,Extended Resale Price,Transaction Type,Rebate Tracking #,Partner Requested Rebate Amount,Extended Rebate Amount,Debit Number,Channel Partner to Customer Invoice ID,Reference Number,Customer to Channel Partner Purchase Order ID,Deal ID #1,Deal ID #2,Deal ID #3,Deal ID #4,Deal ID #5,Deal ID #6,Marketing Subprogram Code,Product Serial ID assigned by HP,Purchasing Source wholesaler indicator,Drop Ship Flag,Distributor's Invoice Number,Partner Internal transaction ID,Partner Comment,Deal Bundle ID #1,Deal Bundle ID #2,Deal Bundle ID #3,Deal Bundle ID #4,Deal Bundle ID #5,Deal Bundle ID #6,NMSO NAME,Sales Type,Purchase Agreement,Product Origin,Partner Reported CBN#,Partner Reference,Supplies Tracking ID (QR Code),Sell From Location ID (assigned by HP or Partner-assigned),Sell from name,Comment Deal ID #1,Comment Deal ID #2,Comment Deal ID #3,Comment Deal ID #4,Comment Deal ID #5,Comment Deal ID #6,Partner Sell Price Currency Code") - If Rep.GetReporteHP(72, Now.AddMonths(-1).FirstDayOfMonth, Now.AddMonths(-1).LastDayOfMonth) Then + If Rep.GetReporteHP(72, NowADS().AddMonths(-1).FirstDayOfMonth, NowADS().AddMonths(-1).LastDayOfMonth) Then For Each dr As DataRow In Rep.DtResultados.Rows Str.AppendLine($"MXN,,AM30089,,""COMPUPROVEEDORES, S.A.DE C.V."",,,,,,,,,,,,,,,,,,,,{dr("Nombre")},{dr("RFC")},{dr("Direccion")},,{dr("Ciudad")},{dr("Estado")},{dr("CP")},MX,{dr("RFC")},,,,,{dr("Nombre")},{dr("RFC")},{dr("Direccion")},,{dr("Ciudad")},{dr("Estado")},{dr("CP")},MX,{dr("RFC")},,,,,,,,,,,,,,,,,,,,,,,,,{dr("Cantidad")},,{dr("Codigo")},,,{dr("Fecha")},,,,{dr("PU")},,,,,,,{dr("SerieFolio")},,,,,,,,,,,,,,,,,,,,,,,,,{dr("Proveedor")},,,,,,,,,,,,MXN") Next @@ -369,7 +369,7 @@ Partial Class RepVentasPeriodo TipoCambio = RblTipoCambio.SelectedValue.ToEntero If TipoCambio = 3 Then LiEspecifico.Visible = True - TCEspecifico = GlobalTipoCambio(Now).ToDecimal + TCEspecifico = GlobalTipoCambio(NowADS()).ToDecimal TxtEspecifico.Text = TCEspecifico.ToString Else LiEspecifico.Visible = False diff --git a/Ventas/RepVentasResumen.aspx.vb b/Ventas/RepVentasResumen.aspx.vb index a2d9b1d3d..70a217f03 100644 --- a/Ventas/RepVentasResumen.aspx.vb +++ b/Ventas/RepVentasResumen.aspx.vb @@ -69,8 +69,8 @@ Partial Class Ventas_RepVentasResumen DdlSubProyecto.DataBind() DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1")) - TxtFechaI.Text = $"01/{Now.Month}/{Now.Year}" - TxtFechaF.Text = Now.ToString("dd/MM/yyyy") + TxtFechaI.Text = $"01/{NowADS().Month}/{NowADS().Year}" + TxtFechaF.Text = NowADS().ToString("dd/MM/yyyy") End Sub @@ -111,7 +111,7 @@ Partial Class Ventas_RepVentasResumen Datos = Nothing End If - Dim FechaCorte As String = $"31/12/{Now.Year}" + Dim FechaCorte As String = $"31/12/{NowADS().Year}" If ObjMovtos.GetCxC(TxtFechaI.Text, TxtFechaF.Text, -1, DdlSubProyecto.SelectedValue.ToEntero, -1, -1, -1, "-1", UsuarioActual.CveEmpresa, 5, -1, 1, -1, "-1", "-1", "-1", FechaCorte:=FechaCorte.ToDate, CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then diff --git a/Ventas/RepVentasUtilidad.aspx.vb b/Ventas/RepVentasUtilidad.aspx.vb index 7e86e350c..f4f737dd2 100644 --- a/Ventas/RepVentasUtilidad.aspx.vb +++ b/Ventas/RepVentasUtilidad.aspx.vb @@ -32,8 +32,8 @@ Partial Class Ventas_RepVentasUtilidad #Region " INICIALIZA VALORES " Private Sub CargaCombos() - txtFechaI.Text = Now.FirstDayOfMonth.ToShortDateString - txtFechaF.Text = Now.LastDayOfMonth.ToShortDateString + txtFechaI.Text = NowADS().FirstDayOfMonth.ToShortDateString + txtFechaF.Text = NowADS().LastDayOfMonth.ToShortDateString 'Carga Clientes Dim EsWS As Boolean = True @@ -331,7 +331,7 @@ Partial Class Ventas_RepVentasUtilidad params.Add(New ReportParameter("FechaInicio", FechaInicio)) params.Add(New ReportParameter("FechaFin", FechaFin)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("AgrupadoPor", $"{Cliente}{Sucursal}{Vendedor}{PS}{Clasificacion}{FechaIn}{FechaFn}")) params.Add(New ReportParameter("Neto", LblNeto.Text)) params.Add(New ReportParameter("PorNeto", LblPorNeto.Text + " %")) diff --git a/Ventas/RepVentasUtilidadDetalle.aspx.vb b/Ventas/RepVentasUtilidadDetalle.aspx.vb index 64b3b60c0..dbe693ea9 100644 --- a/Ventas/RepVentasUtilidadDetalle.aspx.vb +++ b/Ventas/RepVentasUtilidadDetalle.aspx.vb @@ -88,8 +88,8 @@ Partial Class Ventas_RepVentasUtilidadDetalle Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not IsPostBack Then - txtFechaI.Text = IfNull(Request("FechaI"), Now.FirstDayOfMonth.ToShortDateString).ToString - txtFechaF.Text = IfNull(Request("FechaF"), Now.LastDayOfMonth.ToShortDateString).ToString + txtFechaI.Text = IfNull(Request("FechaI"), NowADS().FirstDayOfMonth.ToShortDateString).ToString + txtFechaF.Text = IfNull(Request("FechaF"), NowADS().LastDayOfMonth.ToShortDateString).ToString CveVenta = If(Request("CveVenta") <> "", Request("CveVenta").ToString.ToEntero, "-1".ToEntero) CveVendedor = IfNull(Request("CveVendedor"), "-1").ToString @@ -314,7 +314,7 @@ Partial Class Ventas_RepVentasUtilidadDetalle params.Add(New ReportParameter("FechaInicio", FechaInicio)) params.Add(New ReportParameter("FechaFin", FechaFin)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("AgrupadoPor", $"{Cliente}{Sucursal}{Vendedor}{PS}{Clasificacion}{FechaIn}{FechaFn}")) @@ -372,7 +372,7 @@ Partial Class Ventas_RepVentasUtilidadDetalle params.Add(New ReportParameter("FechaInicio", FechaInicio)) params.Add(New ReportParameter("FechaFin", FechaFin)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("AgrupadoPor", $"{Cliente}{Sucursal}{Vendedor}{PS}{Clasificacion}{FechaIn}{FechaFn}")) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) diff --git a/Ventas/RepVentasUtilidadPadre.aspx b/Ventas/RepVentasUtilidadPadre.aspx index 43a586407..0b3c08446 100644 --- a/Ventas/RepVentasUtilidadPadre.aspx +++ b/Ventas/RepVentasUtilidadPadre.aspx @@ -233,6 +233,7 @@ + diff --git a/Ventas/RepVentasUtilidadPadre.aspx.vb b/Ventas/RepVentasUtilidadPadre.aspx.vb index 978e27cae..83879613c 100644 --- a/Ventas/RepVentasUtilidadPadre.aspx.vb +++ b/Ventas/RepVentasUtilidadPadre.aspx.vb @@ -40,8 +40,8 @@ Partial Class Ventas_RepVentasUtilidadPadre #Region " INICIALIZA VALORES " Private Sub CargaCombos() - txtFechaI.Text = Now.FirstDayOfMonth.ToShortDateString - txtFechaF.Text = Now.LastDayOfMonth.ToShortDateString + txtFechaI.Text = NowADS().FirstDayOfMonth.ToShortDateString + txtFechaF.Text = NowADS().LastDayOfMonth.ToShortDateString 'Carga Clientes If UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1" Then @@ -252,7 +252,7 @@ Partial Class Ventas_RepVentasUtilidadPadre e.Row.DBCampo("Grupo"), e.Row.DBCampo("GPO"), e.Row.DBCampo("CvePS"), e.Row.DBCampo("CveClasificacion"), e.Row.DBCampo("CveMarca"), e.Row.DBCampo("CveCategoria")) e.Row.Cells(0).Text = String.Format("{2}", Css, Liga, e.Row.Cells(0).Text) Else - e.Row.Cells(9).BackColor = Drawing.Color.LightGray + e.Row.Cells(10).BackColor = Drawing.Color.LightGray End If @@ -291,7 +291,7 @@ Partial Class Ventas_RepVentasUtilidadPadre 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", DateTime.Now.ToString())) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString())) params.Add(New ReportParameter("Filtros", StrFiltro.ToString)) params.Add(New ReportParameter("Neto", LblNeto.Text)) params.Add(New ReportParameter("PorNeto", $"{LblPorNeto.Text}%")) diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index 37b4b57f8..6c126fd2d 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -5367,7 +5367,7 @@ - + diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 9da0edab4..984c85f62 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -1,5 +1,6 @@ Option Explicit On Option Strict On +Option Infer On Imports System.Data Imports System.Data.SqlClient @@ -2437,15 +2438,15 @@ Partial Class Ventas CveAlmacenDevolucion = 0 Me.CveEstadoCancelacion = 0 - txtFechaICot.Text = Now.AddMonths(-3).ToShortDateString - TxtFechaIRem.Text = Now.AddMonths(-3).ToShortDateString - TxtFechaIPed.Text = Now.AddMonths(-3).ToShortDateString - TxtFechaIOC.Text = Now.AddMonths(-3).ToShortDateString + txtFechaICot.Text = NowADS().AddMonths(-3).ToShortDateString + TxtFechaIRem.Text = NowADS().AddMonths(-3).ToShortDateString + TxtFechaIPed.Text = NowADS().AddMonths(-3).ToShortDateString + TxtFechaIOC.Text = NowADS().AddMonths(-3).ToShortDateString - txtFechaFCot.Text = Now.ToShortDateString - TxtFechaFRem.Text = Now.ToShortDateString - TxtFechaFPedido.Text = Now.ToShortDateString - TxtFechaFOC.Text = Now.ToShortDateString + txtFechaFCot.Text = NowADS().ToShortDateString + TxtFechaFRem.Text = NowADS().ToShortDateString + TxtFechaFPedido.Text = NowADS().ToShortDateString + TxtFechaFOC.Text = NowADS().ToShortDateString If UsuarioActual.TienePermisoProceso(177) Then DdlTipoComprobante.Items.Insert(4, New ListItem("Pedido de Contrato", "Ped")) @@ -2526,10 +2527,10 @@ Partial Class Ventas DdlTipoComprobante.SelectedValue = "Ing" End If 'DdlTipoComprobante.Attributes.Add("onChange", "ActivaReferencia(this)") - TxtFecha.Text = Now.ToShortDateString() - TxtFechaEjecucion.Text = Now.ToShortDateString + TxtFecha.Text = NowADS().ToShortDateString() + TxtFechaEjecucion.Text = NowADS().ToShortDateString LblUsuario.Text = UsuarioActual.Usuario - LblFechaRegistro.Text = Now.ToShortDateString() + LblFechaRegistro.Text = NowADS().ToShortDateString() ImgDescPU.Attributes.Add("onclick", "javascript:$('#ModalDescuento').modal(); $get('LblTitulo1').style.display = ''; $get('LblTitulo2').style.display = 'none'; $get('LblTituloTipo1').style.display = ''; $get('LblTituloTipo2').style.display = 'none'; $get('HdnTipoDescuento').value = '0'; $get('LblPrecio1').style.display = ''; $get('LblTotalPS1').style.display = 'none'; $get('LblSubTotal1').style.display = 'none'; $get('LblAmort').style.display = 'none'; $get('BtnAplicarDescP').style.display = ''; $get('BtnAplicarDescG').style.display = 'none'; $get('TrMotivoDescuento').style.display = '';") ImgDescConcepto.Attributes.Add("onclick", "javascript:$('#ModalDescuento').modal(); $get('LblTitulo1').style.display = ''; $get('LblTitulo2').style.display = 'none'; $get('LblTituloTipo1').style.display = ''; $get('LblTituloTipo2').style.display = 'none'; $get('HdnTipoDescuento').value = '1'; $get('LblPrecio1').style.display = 'none'; $get('LblTotalPS1').style.display = ''; $get('LblSubTotal1').style.display = 'none'; $get('LblAmort').style.display = 'none'; $get('BtnAplicarDescP').style.display = ''; $get('BtnAplicarDescG').style.display = 'none'; $get('TrMotivoDescuento').style.display = '';") @@ -2597,7 +2598,7 @@ Partial Class Ventas DdlTipoComprobante.Items.Add(New ListItem("Orden Pago", "OP")) Dim AC As New ClsAC - If AC.GetPresupuestoIngresos(-1, Now.Year, True, UsuarioActual.CveEmpresa) Then + If AC.GetPresupuestoIngresos(-1, NowADS().Year, True, UsuarioActual.CveEmpresa) Then DdlFuenteRecaudacion.DataSource = AC.DtResultados() DTPresupuestoIngresos = AC.DtResultados() ViewState("DTFuenteRecaudacion") = AC.DtResultados() @@ -2637,7 +2638,7 @@ Partial Class Ventas ViewState("CveAcercamientoCRM") = Request("CveAcercamientoCRM") Dim cRMService As ICRMService = New CRMService(System.Configuration.ConfigurationManager.ConnectionStrings("Conexion").ConnectionString) - Dim AcercamientoModel As RequestAcercamiento = New RequestAcercamiento(UsuarioActual.CveEmpresa, CveAcercamientoCRM) + Dim AcercamientoModel As New RequestAcercamiento(UsuarioActual.CveEmpresa, CveAcercamientoCRM) Dim objAcercamiento = cRMService.GetAceracamientoCRM(AcercamientoModel) If objAcercamiento.Result.Count > 0 Then @@ -2685,6 +2686,7 @@ Partial Class Ventas TmpDT.Columns.Add("AFValorInicial", GetType(Decimal)) TmpDT.Columns.Add("NumTurnos", GetType(Decimal)) TmpDT.Columns("NumTurnos").DefaultValue = 0D + TmpDT.Columns.Add("NumeroPedimento", GetType(String)) GvPS.DataSource = ObjVentas.DtResultados GvPS.DataBind() @@ -2717,6 +2719,7 @@ Partial Class Ventas TmpDT.Columns.Add("AFValorInicial", GetType(Decimal)) TmpDT.Columns.Add("NumTurnos", GetType(Decimal)) TmpDT.Columns("NumTurnos").DefaultValue = 0D + TmpDT.Columns.Add("NumeroPedimento", GetType(String)) GvPS.DataSource = ObjVentas.DtResultados GvPS.DataBind() @@ -2744,7 +2747,7 @@ Partial Class Ventas If UsuarioActual.TienePermisoProceso(302) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Egs") Then BtnEditar.Visible = True DivFechaAnticipoCliente.Visible = True - TxtFechaAnticipoCliente.Text = Now.ToShortDateString + TxtFechaAnticipoCliente.Text = NowADS().ToShortDateString ImgAddObs.Visible = True CargaEventoBitacora() @@ -3054,7 +3057,7 @@ Partial Class Ventas UpnTools.Update() - TxtFecha.Text = Now.ToShortDateString + TxtFecha.Text = NowADS().ToShortDateString '' Si esta cancelado el compromiso no se puede editar el estatus 'If DdlEstatus.SelectedValue = "9" Then @@ -3370,7 +3373,7 @@ Partial Class Ventas TxtFolio.Enabled = False TxtFecha.Enabled = False If LblSeTimbro.Text = "No" And DdlTipoComprobante.SelectedValue.Contiene("Ing", "Egs", "Dev", "Ant") Then - TxtFecha.Text = Now.ToShortDateString + TxtFecha.Text = NowADS().ToShortDateString End If ImgFecha.Visible = False End If @@ -3419,7 +3422,7 @@ Partial Class Ventas UPObservaciones.Update() End If - If UsuarioActual.CveEmpresa = 13 Then + If UsuarioActual.Empresa.Funcionalidad(163) = "1" Then TrDescripcionVenta.Visible = True If CveVenta <= 0 Then TxtDescripcionVenta.Enabled = True @@ -3484,8 +3487,8 @@ Partial Class Ventas If ObjPVenta.DtResultados.Rows.Count > 0 Then CveCorte = ObjPVenta.CveCorte - Dim FechaICorte = ObjPVenta.FechaInicial.Date '.AddDays(-5) - If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso FechaICorte < Now.Date Then + Dim FechaICorte As Date = ObjPVenta.FechaInicial.Date '.AddDays(-5) + If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso FechaICorte < NowADS().Date Then DebeCerrarCorte = True LblMotivoBloqueo.Text = $"Existe un corte del día {FechaICorte.ToString("dd/MM/yyyy")}. Favor de cerrarlo para iniciar un nuevo corte." Else @@ -3518,9 +3521,9 @@ Partial Class Ventas Private Sub BtnIniciarTurno_Click(sender As Object, e As EventArgs) Handles BtnIniciarTurno.Click Dim ObjPVenta As New ClsPuntoVenta - ObjPVenta.AddVtaCortes(Now, TxtDineroCaja.Text.ToDecimal, UsuarioActual.CveUsuario, TxtDescripcionCaja.Text, UsuarioActual.CveEmpresa) + ObjPVenta.AddVtaCortes(NowADS(), TxtDineroCaja.Text.ToDecimal, UsuarioActual.CveUsuario, TxtDescripcionCaja.Text, UsuarioActual.CveEmpresa) CveCorte = ObjPVenta.CveCorte - LblEstatusCaja.Text = Now.ToShortDateString + LblEstatusCaja.Text = NowADS().ToShortDateString TrEstatusCaja.Visible = True LkbEstadodeCaja.Visible = True LkbIngreso.Visible = True @@ -3554,17 +3557,17 @@ Partial Class Ventas Dt.Columns.Add("Descripcion", GetType(String)) Dt.Columns.Add("Importe", GetType(Decimal)) - Dim Dr1 = Dt.NewRow + Dim Dr1 As DataRow = Dt.NewRow Dr1("Descripcion") = "Fondo de Caja" Dr1("Importe") = ObjPVenta.DtResultados(0)("ImporteInicial").ToString().ToDouble Dt.Rows.Add(Dr1) - Dim Dr2 = Dt.NewRow + Dim Dr2 As DataRow = Dt.NewRow Dr2("Descripcion") = "Ventas en Efectivo" Dr2("Importe") = ObjPVenta.DtResultados(0)("VentasEfectivo").ToString().ToDouble Dt.Rows.Add(Dr2) - Dim Dr21 = Dt.NewRow + Dim Dr21 As DataRow = Dt.NewRow Dr21("Descripcion") = "Devoluciones" Dr21("Importe") = ObjPVenta.DtResultados(0)("Devoluciones").ToString().ToDouble Dt.Rows.Add(Dr21) @@ -3574,17 +3577,17 @@ Partial Class Ventas 'Dr3("Importe") = ObjPVenta.DtResultados(0)("Propina").ToString().ToDouble 'Dt.Rows.Add(Dr3) - Dim Dr4 = Dt.NewRow + Dim Dr4 As DataRow = Dt.NewRow Dr4("Descripcion") = "Entradas" Dr4("Importe") = ObjPVenta.DtResultados(0)("Ingresado").ToString().ToDouble Dt.Rows.Add(Dr4) - Dim Dr5 = Dt.NewRow + Dim Dr5 As DataRow = Dt.NewRow Dr5("Descripcion") = "Salidas" Dr5("Importe") = ObjPVenta.DtResultados(0)("Retirado").ToString().ToDouble Dt.Rows.Add(Dr5) - Dim Dr6 = Dt.NewRow + Dim Dr6 As DataRow = Dt.NewRow Dr6("Descripcion") = "Total" Dr6("Importe") = Total Dt.Rows.Add(Dr6) @@ -3639,7 +3642,7 @@ Partial Class Ventas Private Sub BtnAceptarIE_Click(sender As Object, e As EventArgs) Handles BtnAceptarIE.Click Dim ObjPVenta As New ClsPuntoVenta If TxtCantidadIE.Text.ToEntero() > 0 Then - If ObjPVenta.AddVta_MovimientosCajas(CveCorte, UsuarioActual.CveUsuario, TxtCantidadIE.Text.ToDouble, TxtDescripcionIE.Text, HdnTipoMovimiento.Value.ToEntero(), Now) Then + If ObjPVenta.AddVta_MovimientosCajas(CveCorte, UsuarioActual.CveUsuario, TxtCantidadIE.Text.ToDouble, TxtDescripcionIE.Text, HdnTipoMovimiento.Value.ToEntero(), NowADS()) Then TxtCantidadIE.Text = "" TxtDescripcionIE.Text = "" RegistraScript("$('#DivIngresoEgreso').modal('hide')", "divingresoegreso") @@ -3652,9 +3655,9 @@ Partial Class Ventas Private Sub BtnCerrarTurno_Click(sender As Object, e As EventArgs) Handles BtnCerrarTurno.Click Dim ObjPVenta As New ClsPuntoVenta If TxtEfectivoEnCaja.Text.Trim <> "" Then - If ObjPVenta.UpdateFinalizadoVtaCortes(CveCorte, TxtEfectivoEnCaja.Text.ToDouble, LblDiferenciaCaja.Text.ToDouble, Now, UsuarioActual.CveEmpresa) Then + If ObjPVenta.UpdateFinalizadoVtaCortes(CveCorte, TxtEfectivoEnCaja.Text.ToDouble, LblDiferenciaCaja.Text.ToDouble, NowADS(), UsuarioActual.CveEmpresa) Then RegistraScript($"window.location.href = '/Compras/PopUpVerFactura.aspx?P={Encripta(String.Format("OP=CORT&CVECORTE={0}&FORMATO={1}", CveCorte, "PDF"))}'", "Imprimir") - Dim Liga = "document.location.href=""/Ventas/Ventas.aspx?CveVenta=-1"";" + Dim Liga As String = "document.location.href=""/Ventas/Ventas.aspx?CveVenta=-1"";" Alert("Se ha cerrado el turno correctamente.", TipoMensaje.MsgInformacion, Liga) End If End If @@ -3664,9 +3667,9 @@ Partial Class Ventas Private Sub BtnCerrarBloqueo_Click(sender As Object, e As EventArgs) Handles BtnCerrarBloqueo.Click Dim ObjPVenta As New ClsPuntoVenta If TxtEfectivoCajaBloqueo.Text.Trim <> "" Then - If ObjPVenta.UpdateFinalizadoVtaCortes(CveCorte, TxtEfectivoCajaBloqueo.Text.ToDouble, LblDiferenciaCajaBloqueo.Text.ToDouble, Now, UsuarioActual.CveEmpresa) Then + If ObjPVenta.UpdateFinalizadoVtaCortes(CveCorte, TxtEfectivoCajaBloqueo.Text.ToDouble, LblDiferenciaCajaBloqueo.Text.ToDouble, NowADS(), UsuarioActual.CveEmpresa) Then RegistraScript($"window.location.href = '/Compras/PopUpVerFactura.aspx?P={Encripta(String.Format("OP=CORT&CVECORTE={0}&FORMATO={1}", CveCorte, "PDF"))}'", "Imprimir") - Dim Liga = "document.location.href=""/Ventas/Ventas.aspx?CveVenta=-1"";" + Dim Liga As String = "document.location.href=""/Ventas/Ventas.aspx?CveVenta=-1"";" Alert("Se ha cerrado el turno correctamente.", TipoMensaje.MsgInformacion, Liga) End If Else @@ -3720,7 +3723,7 @@ Partial Class Ventas If ObjContratos.DtResultados.FiltraParametros("Estatus = True").Rows.Count > 0 AndAlso (DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Ped") Or DdlTipoComprobante.SelectedValue.Contiene("Egs", "Dev")) Then If UsuarioActual.CveEmpresa.Contiene(72, 80) Then - DtContratos = ObjContratos.DtResultados.FiltraParametros($"Estatus = True AND FechaFinal >= '{Now.ToShortDateString}' AND FechaInicial <= '{Now.ToShortDateString}'") + DtContratos = ObjContratos.DtResultados.FiltraParametros($"Estatus = True AND FechaFinal >= '{NowADS().ToShortDateString}' AND FechaInicial <= '{NowADS().ToShortDateString}'") Else DtContratos = ObjContratos.DtResultados.FiltraParametros($"Estatus = True ") End If @@ -3795,13 +3798,11 @@ Partial Class Ventas End If - If UsuarioActual.CveEmpresa = 13 Then DivEstimaciones.Visible = True GvEst.Visible = False ContratoDetalles.Visible = False GvContratoDetalles.Visible = True - BtnEstimacion.Visible = False End If @@ -3820,7 +3821,7 @@ Partial Class Ventas End Sub Private Sub CargaContratos() - Dim DrContrato = DtContratos.FiltroPrimero($"CveContrato = {DdlContratosModal.SelectedValue}") + Dim DrContrato As DataRow = DtContratos.FiltroPrimero($"CveContrato = {DdlContratosModal.SelectedValue}") If DrContrato Is Nothing Then Alert("Ocurrió un error al cargar la configuración del contrato. Por favor vuelva a intentar", TipoMensaje.MsgError) Exit Sub @@ -3834,11 +3835,6 @@ Partial Class Ventas EscontratoObra = False End If - - - - - LbContratoImporteTotal.Text = DrContrato("ImporteTotal").ToString().FormatoNumero LbContratoImporteMinimo.Text = DrContrato("ImporteMin").ToString().FormatoNumero LbContratoImporteMaximo.Text = DrContrato("ImporteMax").ToString().FormatoNumero @@ -3938,14 +3934,14 @@ Partial Class Ventas For Each gvr As GridViewRow In GvContratoDetalles.Rows gvr.FCTextBox("TxtCant").Enabled = False Next - Dim EsValido = True + Dim EsValido As Boolean = True For Each Dr As DataRow In TmpDT.Rows - Dim CantidadActual = Dr("Cantidad").ToString().ToDouble - Dim CantidadDispo = 0.0 - Dim CantidadAsignada = 0.0 + Dim CantidadActual As Decimal = Dr("Cantidad").ToString().ToDecimal + Dim CantidadDispo As Decimal = 0 + Dim CantidadAsignada As Decimal = 0 For Each gvr As GridViewRow In GvContratoDetalles.Rows If gvr.DataKey("CvePS").ToEntero() = Dr("CvePS").ToString().ToEntero() Then - CantidadDispo = gvr.DataKey("Cantidad").ToString().ToDouble - gvr.FCTextBox("TxtCant").Text.ToDouble + CantidadDispo = gvr.DataKey("Cantidad").ToString().ToDecimal - gvr.FCTextBox("TxtCant").Text.ToDecimal If CantidadDispo = 0 Then Continue For CantidadAsignada = If(CantidadDispo > CantidadActual, CantidadActual, CantidadDispo) gvr.FCTextBox("TxtCant").Text = (gvr.FCTextBox("TxtCant").Text.ToDouble + CantidadAsignada).ToString() @@ -4066,7 +4062,7 @@ Partial Class Ventas AplicaGastoContrato = If(DrContrato("CveContratoTipo").ToString().Contiene("9", "10", "13"), True, False) 'Arrendamiento, Servicios De Impresion, Financiamiento 'VALIDA IMPORTE DEL CONTRATO - Dim SeleccionadoContrato = 0.0 '(From row As GridViewRow In GvContratoDetalles.Rows.Cast(Of GridViewRow)() Select row.FCLabel("LtlTotal").Text.ToDecimal).Sum + Dim SeleccionadoContrato As Decimal = 0 '(From row As GridViewRow In GvContratoDetalles.Rows.Cast(Of GridViewRow)() Select row.FCLabel("LtlTotal").Text.ToDecimal).Sum TmpDT.Clear() TxtSubTotal.Text = "0" @@ -4080,7 +4076,7 @@ Partial Class Ventas 'VALIDA EXISTENCIAS DE ALMACÉN 'Dim DrPS = GlobalDTProductosServicios(CveEmpresa:=UsuarioActual.CveEmpresa, CvePS:=Row.DataKey("CvePS").ToEntero()).FiltroPrimero("") - Dim DrPS = GlobalDTPSSimplificado(CveEmpresa:=UsuarioActual.CveEmpresa, CvePS:=Row.DataKey("CvePS").ToEntero()).FiltroPrimero("") + Dim DrPS As DataRow = GlobalDTPSSimplificado(CveEmpresa:=UsuarioActual.CveEmpresa, CvePS:=Row.DataKey("CvePS").ToEntero()).FiltroPrimero("") If DrPS IsNot Nothing Then Dim CveTipoPS As Integer = DrPS("CveTipoPS").ToString().ToEntero() @@ -4097,7 +4093,7 @@ Partial Class Ventas Dim ObsPlantilla As String = PlantillaContrato(Row.DataKey("Observaciones")) - SeleccionadoContrato += Row.FCTextBox("TxtCant").Text.ToEntero() * Row.FCLiteral("LtlPU").Text.ToDouble + SeleccionadoContrato += Row.FCTextBox("TxtCant").Text.ToEntero() * Row.FCLiteral("LtlPU").Text.ToDecimal AgregarProductoServicio(Row.FCTextBox("TxtCant").Text.ToEntero(), Row.DataKey("CveUM").ToEntero(), Row.FCLiteral("LtlUM").Text, Row.DataKey("CveClasificacion").ToEntero(), Row.DataKey("Clasificacion"), Row.DataKey("CvePS").ToEntero(), Row.FCLiteral("LtlPS").Text, If(CveCicloComercial > 0, ObsPlantilla, $"/ {Row.FCLiteral("LtCveInterna").Text}"), Row.FCLiteral("LtlPU").Text.ToDecimal, 0, DrContrato("CveProyecto").ToString().ToEntero(), DrContrato("ProyectoContrato").ToString(), DrContrato("CveSubProyecto").ToString().ToEntero(), DrContrato("SubProyectoContrato").ToString(), CveContratoDetalle:=Row.DataKey("CveContratoDetalle").ToEntero()) @@ -4202,7 +4198,7 @@ Partial Class Ventas If ObjContratos.GetContratos(CveContrato, UsuarioActual.CveEmpresa, -1, -1, 1) Then If ObjContratos.DtResultados.Rows.Count > 0 Then - Dim CveContratoTipo = ObjContratos.DtResultados.Rows(0)("CveContratoTipo").ToString.ToEntero + Dim CveContratoTipo As Integer = ObjContratos.DtResultados.Rows(0)("CveContratoTipo").ToString.ToEntero 'Cargamos los datos del Cliente DtContratos = ObjContratos.DtResultados @@ -4267,7 +4263,7 @@ Partial Class Ventas RequiereAlmacenOrigen = True If CveContratoTipo.Contiene(7, 9, 13, 21, 27) Then - Dim CveTipoAlmacenOrigen = "12,15" + Dim CveTipoAlmacenOrigen As String = "12,15" If CveContratoTipo.Contiene(27) Then CveTipoAlmacenOrigen = "1" End If @@ -4341,7 +4337,7 @@ Partial Class Ventas Private Sub GvContratoDetalles_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvContratoDetalles.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then - Dim CantidadDisponible = If(e.Row.DBCampo("Cantidad").ToDouble < 0, "0", e.Row.DBCampo("Cantidad")) + Dim CantidadDisponible As String = If(e.Row.DBCampo("Cantidad").ToDouble < 0, "0", e.Row.DBCampo("Cantidad")) e.Row.FCLiteral("LtlCantDisp").Text = CantidadDisponible If CveCicloComercial > 0 Then 'Si es un Ciclo Comercial quitamos el límite de CantidadDisponible @@ -4394,7 +4390,7 @@ Partial Class Ventas Exit Sub End If - Dim DrContrato = DtContratos.FiltroPrimero($"CveContrato = {DdlContratosModal.SelectedValue}") + Dim DrContrato As DataRow = DtContratos.FiltroPrimero($"CveContrato = {DdlContratosModal.SelectedValue}") If DrContrato Is Nothing Then Alert("Ocurrió un error al cargar la configuración del contrato. Por favor vuelva a intentar", TipoMensaje.MsgError) Exit Sub @@ -4624,7 +4620,7 @@ Partial Class Ventas For Each Dr As DataRow In TmpDTNCVinculadas.Rows If Dr("CveConceptoContable").ToString().ToEntero() = 91 Then - CargaNCDT(Dr("CveVenta").ToString().ToEntero(), Dr("Importe").ToString().ToDecimal, Dr("FolioFiscal").ToString(), TC:=Dr("TipoCambio").ToString().ToDecimal) + CargaNCDT(Dr("CveVenta").ToString().ToEntero(), DbRowVenta("TipoDocto").ToString(), Dr("Importe").ToString().ToDecimal, Dr("FolioFiscal").ToString(), TC:=Dr("TipoCambio").ToString().ToDecimal) End If Next @@ -4771,7 +4767,7 @@ Partial Class Ventas 'If UsuarioActual.CveEmpresa = 119 And Not UsuarioActual.CveUsuario.Contiene(100, 1703) Then '[IPP] AD y Jesus de JAM ' 'si es del mes anterior no permita cancelar ' If Not DdlTipoComprobante.SelectedValue.Contiene("Rem") Then - ' If DbRowVenta("Fecha").ToString().ToDate <= Now.AddMonths(-1).LastDayOfMonth Then + ' If DbRowVenta("Fecha").ToString().ToDate <= NowADS().AddMonths(-1).LastDayOfMonth Then ' LbCancelarDocumento.Visible = False ' End If ' End If @@ -4822,7 +4818,7 @@ Partial Class Ventas End If End If - If UsuarioActual.CveEmpresa = 13 Then + If UsuarioActual.Empresa.Funcionalidad(163) = "1" Then TrDescripcionVenta.Visible = True TxtDescripcionVenta.Text = DbRowVenta("DescripcionVenta").ToString() End If @@ -5031,7 +5027,7 @@ Partial Class Ventas If Not HplSaldoAuxiliar.Text.ToDouble > 0 Then HplSaldoAuxiliar.Visible = False HplPagado.Visible = True - Dim EsCancelado = GlobalDTEstatusFactura().FiltroPrimeroValor("TipoEstatus", $"CveEstatusFactura = {CveEstatus}").ToEntero() = 5 + Dim EsCancelado As Boolean = GlobalDTEstatusFactura().FiltroPrimeroValor("TipoEstatus", $"CveEstatusFactura = {CveEstatus}").ToEntero() = 5 If EsCancelado Then HplPagado.Text = "CANCELADO" End If @@ -5184,7 +5180,7 @@ Partial Class Ventas DdlTipoRetencion.Visible = True End If If TmpDT IsNot Nothing Then - Dim PorcentajeRetIVA = (TmpDT.MAX("PorcentajeRetIVA").ToDecimal() * 100) + Dim PorcentajeRetIVA As Decimal = (TmpDT.MAX("PorcentajeRetIVA").ToDecimal() * 100) LblRetIVA.Text = PorcentajeRetIVA.FormatoNumero(2) End If @@ -5375,7 +5371,7 @@ Partial Class Ventas 'End If ElseIf UsuarioActual.Empresa.TipoFacturacion = "CFDi" AndAlso DbRowVenta("SeTimbro").ToString() = "No" AndAlso DbRowVenta("CveEstatusFactura").ToString() = "2" AndAlso DbRowVenta("TipoDocto").ToString().Contiene("Ing", "Egs", "Dev", "Ant") Then TrEmitir.Visible = True - If TxtFecha.Text.ToDate < Now.AddDays(-3) Then + If TxtFecha.Text.ToDate < NowADS().AddDays(-3) Then TxtFecha.Enabled = True End If End If @@ -5575,10 +5571,11 @@ Partial Class Ventas BtnsFacturar.Visible = True 'E119, bloquear la facturación de remisiones que no estén surtidas - If UsuarioActual.CveEmpresa = 119 AndAlso DbRowVenta("SaldoAlmacen").ToString.ToDecimal = 0 Then - BtnsFacturar.Visible = False + If UsuarioActual.CveEmpresa = 119 Then + If TmpDT.SUM("Cantidad") <> TmpDT.SUM("CantidadInventario") Then 'que ya esté surtida totalmente + BtnsFacturar.Visible = False + End If End If - LBFacturarAnticipo.Visible = UsuarioActual.TienePermisoProceso(274) 'ACTIVA CONVERSION DE MONEDA @@ -5607,11 +5604,11 @@ Partial Class Ventas DtUsadosPendientes = ObjUsados.DtResultados.Copy() End If - If ObjUsados.GetVentasGarantiaPendiente(CveVenta, Now, UsuarioActual.CveEmpresa) Then + If ObjUsados.GetVentasGarantiaPendiente(CveVenta, NowADS(), UsuarioActual.CveEmpresa) Then DtGarantiasPendientes = ObjUsados.DtResultados.Copy() End If - 'If ObjUsados.GetVentasGarantiaPendiente(CveVenta, -1, Now, UsuarioActual.CveEmpresa) Then + 'If ObjUsados.GetVentasGarantiaPendiente(CveVenta, -1, NowADS(), UsuarioActual.CveEmpresa) Then ' DtGarantiasPendientes = ObjUsados.DtResultados.Copy() 'End If @@ -6011,7 +6008,7 @@ Partial Class Ventas End If 'ObjVenta.Dispose() Else - TxtFechaPago.Text = If(DdlTipoComprobante.SelectedValue = "Rem", Now.AddDays(PlazoCobranzaRemision), Now.AddDays(PlazoCobranza)).ToShortDateString + TxtFechaPago.Text = If(DdlTipoComprobante.SelectedValue = "Rem", NowADS().AddDays(PlazoCobranzaRemision), NowADS().AddDays(PlazoCobranza)).ToShortDateString End If CreaObjetosVentaDevolucion() @@ -6059,7 +6056,7 @@ Partial Class Ventas If UsuarioActual.CveRol = 1 AndAlso CveMetodoPago = 1 AndAlso DdlTipoComprobante.SelectedValue = "Cot" AndAlso UsuarioActual.Empresa.Funcionalidad(558) = "1" AndAlso TbDescuentosAdicionales.Visible Then If TmpDT.SUMD("Descuento") > 0 Then Dim TotalDescuento As Decimal = TmpDT.SUMD("Total", "Descuento > 0") * 0.05D - Dim RowDescuentos = TmpDT.Select("Descuento > 0") + Dim RowDescuentos As DataRow() = TmpDT.Select("Descuento > 0") If RowDescuentos IsNot Nothing Then LblDescuentoAdicional.Text = TotalDescuento.FormatoNumero(2) @@ -6537,6 +6534,7 @@ Partial Class Ventas Else TxtComExtEstado.Visible = True : DdlComExtEstado.Visible = False End If + TxtComExtEstado.Text = ObjCliente.ComExtEstado TxtComExtMunicipio.Text = ObjCliente.ComExtMunicipio TxtComExtColonia.Text = ObjCliente.ComExtColonia TxtComExtMunicipio.Visible = True : TxtComExtColonia.Visible = True @@ -6729,7 +6727,7 @@ Partial Class Ventas TrVistaPrevia.Visible = True - TxtFechaPago.Text = If(DdlTipoComprobante.SelectedValue = "Rem", Now.AddDays(PlazoCobranzaRemision), Now.AddDays(PlazoCobranza)).ToShortDateString + TxtFechaPago.Text = If(DdlTipoComprobante.SelectedValue = "Rem", NowADS().AddDays(PlazoCobranzaRemision), NowADS().AddDays(PlazoCobranza)).ToShortDateString ' si es empresa acumuladores If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then @@ -6778,7 +6776,7 @@ Partial Class Ventas If RequiereOC Then Dim Documentacion As String = "" 'RegistraScript("$('#DivDocsCliente').modal({ backdrop: 'static', keyboard: false });", "ModalArchivos") - Dim Count = 0 + Dim Count As Integer = 0 For Each GvRow As GridViewRow In GvDocumentosCliente.Rows If GvRow.DataKey("Orden").ToEntero() = 1 Then IndexDocumentoCliente = Count @@ -7090,7 +7088,7 @@ Partial Class Ventas TieneBloqueoPorAutorizacion = 1 End If - TxtFechaPago.Text = Now.AddDays(PlazoCobranza).ToShortDateString + TxtFechaPago.Text = NowADS().AddDays(PlazoCobranza).ToShortDateString DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Ing")) If Not UsuarioActual.TienePermisoProceso(325) Then @@ -7155,7 +7153,7 @@ Partial Class Ventas End If End If - TxtFechaPago.Text = Now.AddDays(PlazoCobranza).ToShortDateString + TxtFechaPago.Text = NowADS().AddDays(PlazoCobranza).ToShortDateString 'si llegó por la opción de cotización no debe de restringuir If IfNull(Request("Op"), "").ToString() = "Cot" OrElse (DdlTipoComprobante.SelectedValue = "Cot" AndAlso CveVenta > 0) Then DdlTipoComprobante.SelectedValue = "Cot" @@ -7221,7 +7219,7 @@ Partial Class Ventas If EsCotizacion Then DdlTipoComprobante.SelectedValueExistInsert("Cot", "Cotización") End If - TxtFechaPago.Text = If(DdlTipoComprobante.SelectedValue = "Rem", Now.AddDays(PlazoCobranzaRemision), Now.AddDays(PlazoCobranza)).ToShortDateString + TxtFechaPago.Text = If(DdlTipoComprobante.SelectedValue = "Rem", NowADS().AddDays(PlazoCobranzaRemision), NowADS().AddDays(PlazoCobranza)).ToShortDateString If EsCotizacion AndAlso UsuarioActual.Empresa.Funcionalidad(531) = "1" Then Dim Autorizacion As Integer = 0 @@ -7281,7 +7279,7 @@ Partial Class Ventas DdlTipoComprobante.SelectedValue = "PA" TieneBloqueoPorAutorizacion = 1 - TxtFechaPago.Text = Now.AddDays(PlazoCobranza).ToShortDateString + TxtFechaPago.Text = NowADS().AddDays(PlazoCobranza).ToShortDateString 'si llegó por la opción de cotización no debe de restringuir If IfNull(Request("Op"), "").ToString() = "Cot" OrElse (DdlTipoComprobante.SelectedValue = "Cot" AndAlso CveVenta > 0) Then DdlTipoComprobante.SelectedValue = "Cot" DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Ing")) @@ -7832,7 +7830,11 @@ Partial Class Ventas If e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5 Then 'MODO EDICION - e.Row.FCDropDownList("DdlUnidadMedida").DataSource = GlobalDTProductosServiciosEquivalencias(e.Row.DBCampo("CvePS").ToEntero(), -1, UsuarioActual.CveEmpresa) + If UsuarioActual.Empresa.UsaInventarios Then + e.Row.FCDropDownList("DdlUnidadMedida").DataSource = GlobalDTProductosServiciosEquivalencias(e.Row.DBCampo("CvePS").ToEntero(), -1, UsuarioActual.CveEmpresa) + Else + e.Row.FCDropDownList("DdlUnidadMedida").DataSource = GlobalDTUnidadesMedida(UsuarioActual.CveEmpresa) + End If e.Row.FCDropDownList("DdlUnidadMedida").DataBind() e.Row.FCDropDownList("DdlUnidadMedida").SelectedValueExist(e.Row.DBCampo("CveUM")) @@ -8357,7 +8359,7 @@ Partial Class Ventas If UsuarioActual.Empresa.Funcionalidad(558) = "1" AndAlso ListaDescuentos IsNot Nothing AndAlso ObjDescuento IsNot Nothing Then Dim ConsecEliminar As Integer = TmpDT.Rows(e.RowIndex)("Consec").ToString().ToEntero() If ConsecEliminar > 0 Then - Dim descEliminar = ListaDescuentos.FirstOrDefault(Function(x) x.Consec = ConsecEliminar) + Dim descEliminar As Modelos.VentaDescuentos = ListaDescuentos.FirstOrDefault(Function(x) x.Consec = ConsecEliminar) If descEliminar IsNot Nothing Then ListaDescuentos.Remove(descEliminar) End If @@ -8515,9 +8517,9 @@ Partial Class Ventas Protected Sub GvPS_RowDeleting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvPS.RowDeleting If UsuarioActual.Empresa.Funcionalidad(558) = "1" AndAlso ListaDescuentos IsNot Nothing Then - Dim ConsecEliminar = TmpDT.Rows(e.RowIndex)("Consec").ToString().ToEntero() + Dim ConsecEliminar As Integer = TmpDT.Rows(e.RowIndex)("Consec").ToString().ToEntero() If ConsecEliminar > 0 Then - Dim descEliminar = ListaDescuentos.FirstOrDefault(Function(x) x.Consec = ConsecEliminar) + Dim descEliminar As Modelos.VentaDescuentos = ListaDescuentos.FirstOrDefault(Function(x) x.Consec = ConsecEliminar) If descEliminar IsNot Nothing Then ListaDescuentos.Remove(descEliminar) End If @@ -8821,13 +8823,12 @@ Partial Class Ventas 'End If Dim EsPersonaMoral As Boolean = Me.TipoPersona - Dim DtUsosCFDI = GlobalDTSATUsosCFDI(If(Not EsPersonaMoral, 1, 0), RegimenFiscalReceptor:=RegimenFiscalCliente).FiltraParametros($"CveUsoCFDI = {DdlUsoCFDI.SelectedValue}") + Dim DtUsosCFDI As DataTable = GlobalDTSATUsosCFDI(If(Not EsPersonaMoral, 1, 0), RegimenFiscalReceptor:=RegimenFiscalCliente).FiltraParametros($"CveUsoCFDI = {DdlUsoCFDI.SelectedValue}") If DtUsosCFDI.Rows.Count = 0 Then Alert("El Uso CFDI no corresponde con el tipo de persona (fisca, moral) y el régimen fiscal.", TipoMensaje.MsgAdvertencia) Exit Sub End If - End If If Not ValidaImportePublicoGeneral() Then @@ -8907,9 +8908,9 @@ Partial Class Ventas DdlTipoComprobante.SelectedValue = "Ing" EraCotizacion = 1 - TxtFecha.Text = Now.ToString() - TxtFechaPago.Text = If(DdlTipoComprobante.SelectedValue = "Rem", Now.AddDays(PlazoCobranza), Now.AddDays(PlazoCobranza)).ToShortDateString - TxtFechaEjecucion.Text = Now.ToString() + TxtFecha.Text = NowADS().ToString() + TxtFechaPago.Text = If(DdlTipoComprobante.SelectedValue = "Rem", NowADS().AddDays(PlazoCobranza), NowADS().AddDays(PlazoCobranza)).ToShortDateString + TxtFechaEjecucion.Text = NowADS().ToString() 'debo de regenerar los folios, para facturar CargaFolios() @@ -9478,7 +9479,7 @@ Partial Class Ventas CreaObjetosVenta(TipoDoctoViejo:=TipoDoctoViejo) - If ObjFactura Is Nothing Or (ObjFactura.Cliente Is Nothing And Not CveEmpresaCRM > 0) Then + If ObjFactura Is Nothing OrElse (ObjFactura.Cliente Is Nothing And Not CveEmpresaCRM > 0) Then Alert("Ocurrió un error al procesar los datos de la Venta.", TipoMensaje.MsgError) ObjFactura = Nothing Exit Sub @@ -9561,22 +9562,6 @@ Partial Class Ventas End If End If - - 'VERIFICA QUE LA MONEDA DE LA LINEA ADICIONAL SEA LA MISMA QUE LA VENTA - 'If Me.CveMonedaLineaAdicional <> ObjFactura.CveMoneda Then - ' TmpDT = TmpDTError.Copy() - ' CalculaTotalesVenta(RecalcularTotalOriginal:=False) - ' Alert("La moneda de la linea adicional de crédito debe ser la misma que la factura.", TipoMensaje.MsgAdvertencia) - ' Exit Sub - 'Else - ' If ObjFactura.TipoDocto = "Ing" AndAlso Me.SaldoIngresosLineaAdicional < ObjFactura.Total Then - ' TmpDT = TmpDTError.Copy() - ' CalculaTotalesVenta(RecalcularTotalOriginal:=False) - ' Alert("El saldo de la linea adicional debe ser mayor o igual al de la factura", TipoMensaje.MsgAdvertencia) - ' Exit Sub - ' End If - 'End If - 'VERIFICA QUE EL SALDO DISPONIBLE SEA MENOR AL IMPORTE 'If ObjFactura.TipoDocto = "Rem" AndAlso Me.SaldoLineaAdicional < ObjFactura.Total Then ' TmpDT = TmpDTError.Copy() @@ -9594,16 +9579,6 @@ Partial Class Ventas End If - 'If Not CveEmpresaCRM > 0 Then - ' If ObjFactura.Cliente.AplicaComercioExterior Then - ' If Not ValidaComercioExterior() Then - ' ObjFactura = Nothing - ' Exit Sub - ' End If - ' End If - 'End If - - 'VALIDA TOTAL DE LA NOTA DE CREDITO Y LA FACTURA VINCULADA *** ESTABA TRONANDO EN COMPU 11/01/17 *** 'If ObjFactura.TipoDocto.Contiene("Egs", "Dev") Then ' If SubTotalFacturaVinNC() > 0 Then 'pendiente @@ -9656,24 +9631,6 @@ Partial Class Ventas ErrorList = New List(Of String) MensajeAlert = New StringBuilder - 'VERIFICA QUE EL FOLIO NO SEA IGUAL AL DE LA FACTURA ANTERIOR - 'If ObjFactura.Folio = TxtFolio.Text.ToEntero() Then - ' If ObjFolios.GetFolios(ObjFactura.TipoDocto, UsuarioActual.CveEmpresa) Then - ' Dim DtFolios As DataTable = ObjFolios.DtResultados.FiltraParametros(String.Format(" CveSucursal = {0} And Estado = 'Activo'", ObjFactura.CveSucursal)) - ' If DtFolios.Rows.Count > 0 Then - ' 'ViewState("CveFolio") = DtFolios.Rows(0)("CveFolio").ToString().ToEntero() - ' 'ViewState("NumAprobacion") = CLng(DtFolios.Rows(0)("Aprobacion").ToString()) - ' 'ViewState("FechaAprobacion") = DtFolios.Rows(0)("FechaAprobacion").ToString().ToDate - ' 'ViewState("FolioActual") = DtFolios.Rows(0)("FActual").ToString() - ' 'LblSerie.Text = DtFolios.Rows(0)("Serie").ToString() - - ' If UsuarioActual.CveEmpresa <> 72 Then - ' ObjFactura.Folio = DtFolios.Rows(0)("FActual").ToString().ToEntero() - ' End If - ' End If - ' End If - 'End If - 'GUARDA VENTA Dim TieneAnticipo As Boolean = False @@ -10025,7 +9982,6 @@ Partial Class Ventas 'ContPAQ El movimiento 1 es el de Venta Dim AutoConta As Boolean = UsuarioActual.Empresa.Funcionalidad(200) = "1" - AutoConta = AutocontaMatriz(AutoConta) If DdlTipoComprobante.SelectedValue.Contiene("Rem", "RNC", "Cot", "Ped", "Pd2", "PA") Then @@ -10054,6 +10010,9 @@ Partial Class Ventas If ObjFactura.CveVenta > 0 AndAlso ErrorList.Count = 0 AndAlso (SeGuardoPrePoliza Or ObjFactura.TipoDocto.Contiene("Ped", "Cot", "DPe", "PeC", "PA", "Pd2")) Then ObjVentas.Commit() + ObjFactura.DtDetalle = TmpDT 'actualiza por cambios de pedimentos. + ObjFactura.Timbre = PreParaTimbre(ObjFactura) + 'ENVIAR POLIZA VIRTUAL If ErrorList.Count = 0 Then If UsuarioActual.Empresa.Funcionalidad(576) = "1" AndAlso EsProduccion Then @@ -10061,22 +10020,22 @@ Partial Class Ventas End If End If - Try - 'RMF, cuando es pedido, se manda autorización. - If ObjFactura.TipoDocto.Contiene("PA") Then + 'Try + ' 'RMF, cuando es pedido, se manda autorización. + ' If ObjFactura.TipoDocto.Contiene("PA") Then - Dim Titulo As String = "Solicitud de autorización" 'usuarios de crédito y cobranza - Dim Msg As String = String.Format("{0} - Folio {1} ", DdlSubProyectoDatos.SelectedItem.Text, TxtFolio.Text) - If UsuarioActual.CveEmpresa = 119 Then - ClsSisNotificaciones.SendNotificacionERP(1715, Titulo, Msg, 1) - ClsSisNotificaciones.SendNotificacionERP(1815, Titulo, Msg, 1) - ClsSisNotificaciones.SendNotificacionERP(1830, Titulo, Msg, 1) - End If + ' Dim Titulo As String = "Solicitud de autorización" 'usuarios de crédito y cobranza + ' Dim Msg As String = String.Format("{0} - Folio {1} ", DdlSubProyectoDatos.SelectedItem.Text, TxtFolio.Text) + ' 'If UsuarioActual.CveEmpresa = 119 Then + ' ' ClsSisNotificaciones.SendNotificacionERP(1715, Titulo, Msg, 1) + ' ' ClsSisNotificaciones.SendNotificacionERP(1815, Titulo, Msg, 1) + ' ' ClsSisNotificaciones.SendNotificacionERP(1830, Titulo, Msg, 1) + ' 'End If - End If - Catch ex As Exception - OnError("Ocurrió un error al mandar las notificaciones de autorización", ex) - End Try + ' End If + 'Catch ex As Exception + ' OnError("Ocurrió un error al mandar las notificaciones de autorización", ex) + 'End Try Try ViewState("CveVenta") = ObjFactura.CveVenta @@ -10583,7 +10542,7 @@ Partial Class Ventas 'ObjFacturaDevolucion.RefDocto = TxtDocto.Text.Trim 'ObjFacturaDevolucion.Folio = If(ExFolioFactura, FolioXML.ToEntero(), -1) ObjFacturaDevolucion.Serie = LblSerie.Text - ObjFacturaDevolucion.Fecha = New Date(TxtFecha.Text.Trim.ToDate.Year, TxtFecha.Text.Trim.ToDate.Month, TxtFecha.Text.Trim.ToDate.Day, Now.Hour, Now.Minute, Now.Second) + ObjFacturaDevolucion.Fecha = New Date(TxtFecha.Text.Trim.ToDate.Year, TxtFecha.Text.Trim.ToDate.Month, TxtFecha.Text.Trim.ToDate.Day, NowADS().Hour, NowADS().Minute, NowADS().Second) ObjFacturaDevolucion.CvePrePoliza = -1 ObjFacturaDevolucion.CveMetodoPago = 0 'DdlMetodoPago.SelectedValue.ToEntero() ObjFacturaDevolucion.MetodoPago = "" @@ -10613,7 +10572,7 @@ Partial Class Ventas End If - ObjFacturaDevolucion.Fecha = Now + ObjFacturaDevolucion.Fecha = NowADS() ObjFacturaDevolucion.Version = "4.0" If ObjFacturaDevolucion.Cliente Is Nothing Then ObjFacturaDevolucion.Cliente = New Modelos.ClienteModel ObjFacturaDevolucion.Cliente.CodigoRegimenFiscal = ClienteCodigoRegimenFiscal @@ -10856,7 +10815,7 @@ Partial Class Ventas 'ObjFacturaDevolucion.RefDocto = TxtDocto.Text.Trim 'ObjFacturaDevolucion.Folio = If(ExFolioFactura, FolioXML.ToEntero(), -1) ObjFacturaBonificacion.Serie = LblSerie.Text - ObjFacturaBonificacion.Fecha = New Date(TxtFecha.Text.Trim.ToDate.Year, TxtFecha.Text.Trim.ToDate.Month, TxtFecha.Text.Trim.ToDate.Day, Now.Hour, Now.Minute, Now.Second) + ObjFacturaBonificacion.Fecha = New Date(TxtFecha.Text.Trim.ToDate.Year, TxtFecha.Text.Trim.ToDate.Month, TxtFecha.Text.Trim.ToDate.Day, NowADS().Hour, NowADS().Minute, NowADS().Second) ObjFacturaBonificacion.CvePrePoliza = -1 ObjFacturaBonificacion.CveMetodoPago = 0 'DdlMetodoPago.SelectedValue.ToEntero() ObjFacturaBonificacion.MetodoPago = "" @@ -10885,7 +10844,7 @@ Partial Class Ventas ObjFolios.Dispose() End If - ObjFacturaBonificacion.Fecha = Now + ObjFacturaBonificacion.Fecha = NowADS() ObjFacturaBonificacion.Version = "4.0" @@ -11311,9 +11270,7 @@ Partial Class Ventas End If ObjFactura.Version = "4.0" - If ObjFactura.Cliente Is Nothing Then - ObjFactura.Cliente = New Modelos.ClienteModel - End If + If ObjFactura.Cliente Is Nothing Then ObjFactura.Cliente = New Modelos.ClienteModel ObjFactura.Cliente.CodigoRegimenFiscal = ClienteCodigoRegimenFiscal ObjFactura.Cliente.RegimenFiscal = ClienteRegimenFiscal @@ -11330,7 +11287,6 @@ Partial Class Ventas ObjFactura.TipoDocto = If(IfNull(ViewState("CveRemision"), 0).ToString().ToEntero() > 0, "Ing", DdlTipoComprobante.SelectedValue) ObjFactura.FacturarSucursal = (Me.FacturarSucursal AndAlso DdlSucursalCliente.SelectedValue.ToEntero() > 0 AndAlso (Me.ClienteSucursal IsNot Nothing AndAlso Not String.IsNullOrEmpty(Me.ClienteSucursal.RFC))) ObjFactura.VentaDesglosaIEPS = Me.VentaDesglosaIEPS - 'ObjFactura.RefDocto = TxtDocto.Text.Trim If EsCreaApartirDe Then ViewState("EstablecioFolio") = False @@ -11363,7 +11319,7 @@ Partial Class Ventas End If - ObjFactura.Fecha = New Date(TxtFecha.Text.Trim.ToDate.Year, TxtFecha.Text.Trim.ToDate.Month, TxtFecha.Text.Trim.ToDate.Day, Now.Hour, Now.Minute, Now.Second) + ObjFactura.Fecha = New Date(TxtFecha.Text.Trim.ToDate.Year, TxtFecha.Text.Trim.ToDate.Month, TxtFecha.Text.Trim.ToDate.Day, NowADS().Hour, NowADS().Minute, NowADS().Second) ObjFactura.CvePrePoliza = -1 ObjFactura.CveMetodoPago = 0 'DdlMetodoPago.SelectedValue.ToEntero() ObjFactura.MetodoPago = "" ' DdlMetodoPago.SelectedItem.Text @@ -11388,19 +11344,9 @@ Partial Class Ventas ObjFactura.UsuarioCreo = LblUsuario.Text.Trim ObjFactura.CveCondicionEntrega = If(DdlFormaEntrega.SelectedItem IsNot Nothing, DdlFormaEntrega.SelectedValue.ToEntero(), -1) ObjFactura.CondicionEntrega = If(DdlFormaEntrega.SelectedItem IsNot Nothing, DdlFormaEntrega.SelectedItem.Text, "") - 'ObjFactura.NumeroCuenta = TxtNumCtaPago.Text.Trim - 'ObjFactura.Cliente.NumCtaPago = TxtNumCtaPago.Text.Trim ObjFactura.CondicionesPago = If(RBLPago.SelectedValue = "2", 0, If(RBLPago.SelectedValue = "1", 1, 2)) ' 0 - Contado, 1 - Credito, 2 - termianl ObjFactura.FormaPago = 0 'DdlFormaPago.SelectedValue.ToEntero() - - 'ObjFactura.AnticipoPosicion = DdlAmortizacionConceptos.SelectedValue.ToEntero() - 'ObjFactura.AnticipoEnSubTotal = If(ChkAnticipoEnSubTotal.Checked, True, False) - 'ObjFactura.CveTipoRelacion = DdlTipoRelacion.SelectedValue.ToEntero() - - - 'ObjFactura.SerieFolio = String.Format("{0}-{1}", LblSerie.Text, TxtFolio.Text) - 'ObjFactura.PedidoContrato = TxtPedidoContrato.Text.Trim ObjFactura.AtencionA = TxtAtencionA.Text ObjFactura.FordGSDB = "" @@ -11442,7 +11388,7 @@ Partial Class Ventas If divcondicionespago.Visible Then ObjFactura.FechaPago = TxtFechaPago.Text.ToDate Else - ObjFactura.FechaPago = Now + ObjFactura.FechaPago = NowADS() End If ObjFactura.DiasCredito = DiasCredito @@ -11886,30 +11832,7 @@ Partial Class Ventas 'End If ObjFactura.AplicaDevolucion = Me.AplicaDevolucion - ObjFactura.CveTipoAmortizacionAnticipo = DdlTipoAmortizacionAnticipo.SelectedValue.ToEntero() - ObjFactura.Timbre.Comprobante.TipoComprobante = If(ObjFactura.TipoDocto.Contiene("Ing", "Ant"), "I", If(ObjFactura.TipoDocto.Contiene("Egs", "Dev"), "E", "")) - - If ObjFactura.Timbre.Comprobante.TipoComprobante = "E" Then - If ObjFactura.TipoDocto = "Egs" Then - ObjFactura.Timbre.CFDIRelacionados.TipoRelacion = "01" - ObjFactura.Timbre.CFDIRelacionados.TipoRelacionTexto = "Nota de Crédito aplicada a Ingreso" - - End If - If ObjFactura.TipoDocto = "Dev" Then - ObjFactura.Timbre.CFDIRelacionados.TipoRelacion = "03" - ObjFactura.Timbre.CFDIRelacionados.TipoRelacionTexto = "Devolución aplicada a Ingreso" - End If - ObjFactura.CveTipoRelacion = DdlTiposRelacion.SelectedValue.ToEntero() - If HdnFolioFiscalNC.Value <> "0" And HdnFolioFiscalNC.Value <> "" Then ObjFactura.Timbre.CFDIRelacionados.UUID.Add(HdnFolioFiscalNC.Value) - End If - ' cuando es refacturacoin es cfdirelacionado, con relacion 04 - If ObjFactura.Timbre.Comprobante.TipoComprobante = "I" AndAlso NuevaFactura = 1 Then - ObjFactura.Timbre.CFDIRelacionados.TipoRelacion = "04" - ObjFactura.Timbre.CFDIRelacionados.TipoRelacionTexto = "Refacturación de Ingreso" - ObjFactura.Timbre.CFDIRelacionados.UUID.Add(HdnFolioFiscalNC.Value) - End If - If ObjFactura.TipoDocto.Contiene("Ing", "Ant") AndAlso NuevaFactura = 1 Then ' refacturación ObjFactura.CveTipoRelacion = DdlTiposRelacion.SelectedValue.ToEntero() @@ -11932,7 +11855,7 @@ Partial Class Ventas End If End If - If CveCliente > 0 Then ObjFactura.Timbre = PreParaTimbre(ObjFactura) + ' If CveCliente > 0 Then ObjFactura.Timbre = PreParaTimbre(ObjFactura) 'SI SE ESTA EDITANDO ACTUALIZA LOS IMPORTES DEL DT If GvImpuestosLocales2.Visible AndAlso GvImpuestosLocales2.Enabled Then @@ -11949,33 +11872,6 @@ Partial Class Ventas Next End If - - 'RMF. faltan impuestos locales - If TmpDTImpuestos IsNot Nothing AndAlso TmpDTImpuestos.FiltraParametros("TipoImpuesto IN (1,3) ").Rows.Count > 0 Then - - For Each DrImpuestosLocales As DataRow In TmpDTImpuestos.FiltraParametros("TipoImpuesto IN (1,3) ").Rows - If DrImpuestosLocales("Importe").ToString().ToDecimal > 0 Then - Dim ret As New CFDIRetencionesLocales With - { - .TasaRetencion = DrImpuestosLocales("Porcentaje").ToString().ToDecimal, - .ImpuestoLocalRetenido = DrImpuestosLocales("ImpuestoLocal").ToString(), - .Importe = DrImpuestosLocales("Importe").ToString().ToDecimal(If(ObjFactura.ConvertirPesos, ObjFactura.TipoCambio, 1)).RoundSQL(2) - } - ObjFactura.Timbre.RetencionesLocales.Add(ret) - End If - Next - End If - - If TmpDTImpuestos IsNot Nothing AndAlso TmpDTImpuestos.FiltraParametros("TipoImpuesto = 5").Rows.Count > 0 Then - - For Each DrImpuestosLocales As DataRow In TmpDTImpuestos.FiltraParametros("TipoImpuesto = 5").Rows - If DrImpuestosLocales("Importe").ToString().ToDecimal > 0 Then - Dim ret As New CFDITrasladosLocales With {.TasaTraslado = DrImpuestosLocales("Porcentaje").ToString().ToDecimal, .ImpuestoLocalTraslado = DrImpuestosLocales("ImpuestoLocal").ToString(), .Importe = DrImpuestosLocales("Importe").ToString().ToDecimal(If(ObjFactura.ConvertirPesos, ObjFactura.TipoCambio, 1))} - ObjFactura.Timbre.TrasladosLocales.Add(ret) - End If - Next - End If - 'INE COMPLEMENTO If RblComplementos.SelectedValue.ToEntero() > 0 Then ObjFactura.CveComplementoTimbrado = RblComplementos.SelectedValue.ToEntero() @@ -12044,7 +11940,7 @@ Partial Class Ventas 'ObjFacturaDevolucion.Folio = If(ExFolioFactura, FolioXML.ToEntero(), -1) ObjFacturaDevolucion.Serie = LblSerie.Text - ObjFacturaDevolucion.Fecha = New Date(TxtFecha.Text.Trim.ToDate.Year, TxtFecha.Text.Trim.ToDate.Month, TxtFecha.Text.Trim.ToDate.Day, Now.Hour, Now.Minute, Now.Second) + ObjFacturaDevolucion.Fecha = New Date(TxtFecha.Text.Trim.ToDate.Year, TxtFecha.Text.Trim.ToDate.Month, TxtFecha.Text.Trim.ToDate.Day, NowADS().Hour, NowADS().Minute, NowADS().Second) ObjFacturaDevolucion.CvePrePoliza = -1 ObjFacturaDevolucion.CveMetodoPago = 0 'DdlMetodoPago.SelectedValue.ToEntero() ObjFacturaDevolucion.MetodoPago = "" 'DdlMetodoPago.SelectedItem.Text @@ -12074,7 +11970,7 @@ Partial Class Ventas End If - ObjFacturaDevolucion.Fecha = Now + ObjFacturaDevolucion.Fecha = NowADS() 'VALORES DEFAULT DE NC-DEV @@ -12340,10 +12236,7 @@ Partial Class Ventas Private Function PreParaTimbre(Obj As Modelos.Factura) As CFDITimbre Dim Timbre As New CFDITimbre - - Timbre.Comprobante.Version = "4.0" - Timbre.Comprobante.TipoComprobante = If(Obj.TipoDocto.Contiene("Ing", "Ant"), "I", If(Obj.TipoDocto.Contiene("Egs", "Dev"), "E", "")) Timbre.Comprobante.Folio = Obj.Folio.ToString() Timbre.Comprobante.Serie = Obj.Serie @@ -12381,29 +12274,32 @@ Partial Class Ventas Timbre.Receptor.NumeroRegistroTributario = "" Timbre.Receptor.UsoCFDI = Obj.ClaveUsoCFDI + Timbre.Comprobante.TipoComprobante = If(Obj.TipoDocto.Contiene("Ing", "Ant"), "I", If(Obj.TipoDocto.Contiene("Egs", "Dev"), "E", "")) + + If Timbre.Comprobante.TipoComprobante = "E" Then + If Obj.TipoDocto = "Egs" Then + Timbre.CFDIRelacionados.TipoRelacion = "01" + Timbre.CFDIRelacionados.TipoRelacionTexto = "Nota de Crédito aplicada a Ingreso" + + End If + If Obj.TipoDocto = "Dev" Then + Timbre.CFDIRelacionados.TipoRelacion = "03" + Timbre.CFDIRelacionados.TipoRelacionTexto = "Devolución aplicada a Ingreso" + End If + Obj.CveTipoRelacion = DdlTiposRelacion.SelectedValue.ToEntero() + If HdnFolioFiscalNC.Value <> "0" And HdnFolioFiscalNC.Value <> "" Then Timbre.CFDIRelacionados.UUID.Add(HdnFolioFiscalNC.Value) + End If + ' cuando es refacturacoin es cfdirelacionado, con relacion 04 + If Timbre.Comprobante.TipoComprobante = "I" AndAlso NuevaFactura = 1 Then + Timbre.CFDIRelacionados.TipoRelacion = "04" + Timbre.CFDIRelacionados.TipoRelacionTexto = "Refacturación de Ingreso" + Timbre.CFDIRelacionados.UUID.Add(HdnFolioFiscalNC.Value) + End If + If HdnTipoDescuento.Value = "3" And DdlTipoAmortizacionAnticipo.SelectedValue.ToEntero() > 0 Then Timbre.CFDIRelacionados.TipoRelacion = "07" Timbre.CFDIRelacionados.TipoRelacionTexto = "07-CFDI por aplicación de anticipo" - - 'If Timbre.Comprobante.TipoComprobante = "E" Then - ' If Obj.TipoDocumento.Contiene("Nota de Crédito") Then - ' Timbre.CFDIRelacionados.TipoRelacion = "01" - ' Timbre.CFDIRelacionados.TipoRelacionTexto = "Nota de Crédito aplicada a Ingreso" - ' End If - ' If Obj.TipoDocumento.Contiene("Nota de Devolución") Then - ' Timbre.CFDIRelacionados.TipoRelacion = "03" - ' Timbre.CFDIRelacionados.TipoRelacionTexto = "Devolución aplicada a Ingreso" - ' End If - ' Timbre.CFDIRelacionados.UUID.Add(HdnFolioFiscalNC.Value) - 'End If - '' cuando es refacturacoin es cfdirelacionado, con relacion 04 - 'If Timbre.Comprobante.TipoComprobante = "I" AndAlso NuevaFactura = 1 Then - ' Timbre.CFDIRelacionados.TipoRelacion = "04" - ' Timbre.CFDIRelacionados.TipoRelacionTexto = "Refacturación de Ingreso" - ' Timbre.CFDIRelacionados.UUID.Add(HdnFolioFiscalNC.Value) - 'End If - Else 'SI LA FACTURA VIENE DE SER CANCELADA SISTEMA CUANDO SE REFACTURO NO HAY QUE RELACIONAR If (CveEstatusFacturaPadre > 0 AndAlso CveEstatusFacturaPadre <> 4) OrElse (DtVentasNC IsNot Nothing AndAlso DtVentasNC.Rows.Count > 0) OrElse HdnFolioFiscalNC.Value.ToString() <> "" Then @@ -12448,10 +12344,8 @@ Partial Class Ventas End If End If End If - End If End If - End If 'SI LAS FACTURAS SE RELACIONARAN MANUALMENTE SE AGREGAN @@ -12471,7 +12365,6 @@ Partial Class Ventas Timbre.CFDIRelacionados.UUID.Add(GvRow.DataKey("FolioFiscal").Replace("test", "")) End If Next - End If Dim totSubTotal As Decimal = Obj.SubTotal @@ -12552,6 +12445,32 @@ Partial Class Ventas i += 1 Next + 'RMF. faltan impuestos locales + If TmpDTImpuestos IsNot Nothing AndAlso TmpDTImpuestos.FiltraParametros("TipoImpuesto IN (1,3) ").Rows.Count > 0 Then + + For Each DrImpuestosLocales As DataRow In TmpDTImpuestos.FiltraParametros("TipoImpuesto IN (1,3) ").Rows + If DrImpuestosLocales("Importe").ToString().ToDecimal > 0 Then + Dim ret As New CFDIRetencionesLocales With + { + .TasaRetencion = DrImpuestosLocales("Porcentaje").ToString().ToDecimal, + .ImpuestoLocalRetenido = DrImpuestosLocales("ImpuestoLocal").ToString(), + .Importe = DrImpuestosLocales("Importe").ToString().ToDecimal(If(Obj.ConvertirPesos, Obj.TipoCambio, 1)).RoundSQL(2) + } + Timbre.RetencionesLocales.Add(ret) + End If + Next + End If + + If TmpDTImpuestos IsNot Nothing AndAlso TmpDTImpuestos.FiltraParametros("TipoImpuesto = 5").Rows.Count > 0 Then + + For Each DrImpuestosLocales As DataRow In TmpDTImpuestos.FiltraParametros("TipoImpuesto = 5").Rows + If DrImpuestosLocales("Importe").ToString().ToDecimal > 0 Then + Dim ret As New CFDITrasladosLocales With {.TasaTraslado = DrImpuestosLocales("Porcentaje").ToString().ToDecimal, .ImpuestoLocalTraslado = DrImpuestosLocales("ImpuestoLocal").ToString(), .Importe = DrImpuestosLocales("Importe").ToString().ToDecimal(If(Obj.ConvertirPesos, Obj.TipoCambio, 1))} + Timbre.TrasladosLocales.Add(ret) + End If + Next + End If + Dim AplicaComercioExteriorSubProyecto As Boolean = True If ChkEmitirComercioExterior.Checked Then @@ -12973,7 +12892,7 @@ Partial Class Ventas If Not TieneContrato Then If ObjContratos.GetContratos(-1, UsuarioActual.CveEmpresa, CveCliente, -1, 1) Then If ObjContratos.DtResultados.FiltraParametros("Estatus = True").Rows.Count > 0 AndAlso (DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Ped") Or DdlTipoComprobante.SelectedValue.Contiene("Egs", "Dev")) Then - DtContratos = ObjContratos.DtResultados.FiltraParametros($"Estatus = True AND FechaFinal >= '{Now.ToShortDateString}' AND FechaInicial <= '{Now.ToShortDateString}'") + DtContratos = ObjContratos.DtResultados.FiltraParametros($"Estatus = True AND FechaFinal >= '{NowADS().ToShortDateString}' AND FechaInicial <= '{NowADS().ToShortDateString}'") DdlContratosOC.DataSource = DtContratos DdlContratosOC.DataBind() @@ -13109,9 +13028,7 @@ Partial Class Ventas End If Dim DescripcionVenta As String = "" - If factura.TipoDocto = "Ing" AndAlso UsuarioActual.CveEmpresa = 13 Then - DescripcionVenta = TxtDescripcionVenta.Text - End If + If TxtDescripcionVenta.Text <> "" Then DescripcionVenta = TxtDescripcionVenta.Text If Not ObjVentas.AddVenta(factura.TipoDocto, factura.Folio, factura.CveCliente, factura.CveClienteSucursal, factura.SubTotalTC, factura.DescuentoTC, factura.AmortizacionTC, factura.IVATC, factura.RetIVATC, factura.RetISRTC, @@ -13189,8 +13106,6 @@ Partial Class Ventas End If End If Next - 'LO LIMPIA PARA QUE NO VUELVA A APLICAR - Me.AplicaRelacionManual = False End If 'SI SE SELECCIONO UNA FACTURA PARA DEVOLUCION DE EFECTIVO DEBE ASOCIARLA A LA NOTA DE CREDITO @@ -13238,7 +13153,7 @@ Partial Class Ventas If DtVentasNC Is Nothing Then InicializaDTVentasNC() End If - CargaNCDT(factura.CveVentaPadre, factura.Total, NuevaFactura:=NuevaFactura, ObjVentas:=ObjVentas) + CargaNCDT(factura.CveVentaPadre, DdlTipoComprobante.SelectedValue, factura.Total, NuevaFactura:=NuevaFactura, ObjVentas:=ObjVentas) End If 'Se agregan los PS @@ -13372,7 +13287,7 @@ Partial Class Ventas Dim Cargo As Decimal = Cantidad * ImporteCargoOriginal Dim Bonificacion As Decimal = 0 - If Not ObjAcum.DistribuidorMovtosAdd(factura.CveCliente, Cantidad, CveTamanio, Puntos, Cargo, Bonificacion, 6, factura.CveVenta, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0D, "", Now) Then + If Not ObjAcum.DistribuidorMovtosAdd(factura.CveCliente, Cantidad, CveTamanio, Puntos, Cargo, Bonificacion, 6, factura.CveVenta, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0D, "", NowADS()) Then ErrorList.Add("Ocurrió un error al agregar el movimiento de distribuidor.") Exit For End If @@ -13391,7 +13306,7 @@ Partial Class Ventas Dim Puntos As Decimal = 0 Dim Cargo As Decimal = 0 - If Not ObjAcum.DistribuidorMovtosAdd(factura.CveCliente, Cantidad, CveTamanio, Puntos, Cargo, ImporteBonificacion, 6, factura.CveVenta, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0D, "", Now) Then + If Not ObjAcum.DistribuidorMovtosAdd(factura.CveCliente, Cantidad, CveTamanio, Puntos, Cargo, ImporteBonificacion, 6, factura.CveVenta, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0D, "", NowADS()) Then ErrorList.Add("Ocurrió un error al agregar el movimiento de distribuidor.") Exit For End If @@ -13420,7 +13335,7 @@ Partial Class Ventas ' Cargo = 0 ' End If - ' If Not ObjAcum.DistribuidorMovtosAdd(factura.CveCliente, Cantidad, CveTamanio, Puntos, Cargo, Bonificacion, 6, factura.CveVenta, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0D, "", Now) Then + ' If Not ObjAcum.DistribuidorMovtosAdd(factura.CveCliente, Cantidad, CveTamanio, Puntos, Cargo, Bonificacion, 6, factura.CveVenta, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0D, "", NowADS()) Then ' ErrorList.Add("Ocurrió un error al agregar la venta detalle devolución.") ' Exit For ' End If @@ -15192,7 +15107,7 @@ Partial Class Ventas End If If Not OcurrioError Then - If ContabilizaMovimientoAlmacen(ObjConta, Now, ObjFactura.SerieFolio, "Ventas/Rem", CveMovimientoSalidaPorTraspaso, CveMovimientoEntrada, TotalPrePoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False) <= 0 Then + If ContabilizaMovimientoAlmacen(ObjConta, NowADS(), ObjFactura.SerieFolio, "Ventas/Rem", CveMovimientoSalidaPorTraspaso, CveMovimientoEntrada, TotalPrePoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False) <= 0 Then OcurrioError = True End If End If @@ -15301,195 +15216,7 @@ Partial Class Ventas Return ErrorPrepoliza End Function - 'Private Function generaNC(ByRef ObjVentas As ClsVentas, ByRef ObjConta As ClsContabilidad, ByRef ObjInventario As ClsInventarios, ByRef ObjContr As ClsContratos, ByRef ObjContPaq As ClsContPAQi, ByVal factura As Modelos.Factura, ByRef ObjBancos As ClsBancos, ByRef ObjEventos As ClsOIEventos) As List(Of Object) - ' Dim Obj As New List(Of Object) - ' Dim CveVentaNueva As Integer = ObjVentas.CveVenta - ' Dim BanderaGeneraNC As Boolean = True - ' 'If UsuarioActual.CveEmpresa.Contiene(1, 119) Then BanderaGeneraNC = True - ' If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa) Then - ' If ObjVentas.DtResultados IsNot Nothing AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then - ' Dim drv As DataRow = ObjVentas.DtResultados.Rows(0) - ' Dim TmpDTconceptos As DataTable = Nothing - ' Dim CveNCaVincular As Integer = DdlNCFactura.SelectedValue.ToEntero() - ' 'CargaCliente - ' Dim CveCliente As Integer = drv("CveCliente").ToString().ToEntero() - ' If UsuarioActual.CveEmpresa = 2 AndAlso UsuarioActual.CveUsuario = 77 AndAlso Not CveCliente.Contiene(10450, 10460, 10458) Then - ' Return Nothing - ' ElseIf UsuarioActual.CveEmpresa = 2 AndAlso UsuarioActual.CveUsuario = 21 AndAlso Not CveCliente.Contiene(27448) Then - ' Return Nothing - ' End If - ' factura.TipoDocto = drv("TipoDocto").ToString() - ' factura.Serie = drv("Serie").ToString() - ' factura.FechaEjecucion = drv("FechaEjecucion").ToString().ToDateTime - ' factura.Fecha = drv("Fecha").ToString().ToDateTime - ' factura.CveSubProyectoEjecucion = drv("CveSubProyectoEjecucion").ToString().ToEntero() - ' factura.CveSubProyectoCobranza = drv("CveSubProyectoCobranza").ToString().ToEntero() - ' factura.CveClienteSucursal = drv("CveClienteSucursal").ToString().ToEntero() - ' factura.CveSubProyecto = drv("CveSubProyecto").ToString().ToEntero() - - ' 'Carga Detalle Sucursal - ' CargaClienteSucursal(drv("CveClienteSucursal").ToString().ToEntero(), ObjVentas) - - ' 'CargaDetalle - ' If ObjVentas.GetVentaDetalle(CveVenta) Then - ' TmpDTconceptos = ObjVentas.DtResultados - ' TmpDTconceptos.Columns.Add("CveMovimientoDetallePedido", GetType(Integer)) - ' GvPS.DataSource = TmpDTconceptos - ' GvPS.DataBind() - ' End If - - ' 'Carga Totales - ' factura.SubTotal = drv("SubTotal").ToString().ToDecimal - ' factura.Descuento = drv("Descuento").ToString().ToDecimal - ' factura.Amortizacion = drv("Amortizacion").ToString().ToDecimal - ' factura.IVA = drv("IVA").ToString().ToDecimal - ' factura.RetIVA = drv("RetIVA").ToString().ToDecimal - ' factura.RetISR = drv("RetISR").ToString().ToDecimal - ' factura.Total = drv("Total").ToString().ToDecimal - ' factura.MotivoDescuento = drv("MotivoDescuento").ToString() - ' factura.Observaciones = drv("Observaciones").ToString() - ' factura.CveMoneda = drv("CveMoneda").ToString().ToEntero() - ' factura.TipoCambio = drv("TipoCambio").ToString().ToDecimal - ' factura.CveVendedor = drv("CveVendedor").ToString().ToEntero() - ' factura.RefDocto = drv("Ref").ToString() - ' 'factura.SerieFolioPadre = drv("SerieFolio").ToString() - ' HdnFolioFiscalNC.Value = drv("FolioFiscal").ToString() - - ' ViewState("FolioFiscal") = drv("FolioFiscal").ToString() - - ' 'JJMQ 20160506: Se agrego para la validacion de pago de contado. - ' 'CVImporteContado.ValueToCompare = TxtTotal.Text.Replace(",", "") - - ' UpContado.Update() - ' If factura.CveCliente > 0 Then - ' If Not IsNothing(TmpDTconceptos) AndAlso TmpDTconceptos.Rows.Count > 0 Then - - ' If Not drv("Total").ToString().ToDecimal = factura.Total Then - ' Return Nothing - ' End If - - ' If FolioFiscal = "" Then - ' CveEstatus = 4 - ' Else - ' CveEstatus = 5 - ' End If - - ' '[IPP] - CANCELA INVENTARIO DE VENTA NUEVA Y NO TRASPASA MOVTOS DE ALMACEN - ' 'If UsuarioActual.CveEmpresa.Contiene(1) Then - ' 'QUEMA DOCUMENTO NUEVO - ' If Not ObjInventario.ActualizarEsDevolucionVenta(CveVentaNueva, 2) Then - ' Return Nothing - ' End If - ' 'Else - ' ' 'TRASPASA ALMACEN A DOCUMENTO NUEVO - ' ' If Not CancelarMovimientoInventario(ObjInventario, ObjConta, CveVentaNueva, CveDevolucion) Then - ' ' Return Nothing - ' ' End If - ' 'End If - - ' 'CANCELA PAGOS - ' If ObjFacturaDevolucion.TipoDocto.Contiene("Ing", "Ant") Then - ' If Not ObjConta.PrePolizasCancelarPagos(CveDevolucion, ObjFactura.CvePrePoliza) Then - ' Return Nothing - ' End If - ' End If - - ' 'CANCELA FACTURA - - ' BanderaGeneraNC = True - ' '2019.05.10- RMF. se activa la bandera a true, para que siempre se cancele, y no genere la NC - - ' If Month(factura.Fecha) = Month(Now) OrElse BanderaGeneraNC = True Then - ' If CancelarFactura(ObjVentas, ObjConta, ObjContPaq, ObjBancos) Then - ' Obj.Add(factura) - ' Else - ' Return Nothing - ' End If - ' Else - ' ObjFacturaDevolucion.TipoDocto = "Egs" - ' ObjFacturaDevolucion.Fecha = Now - ' If RegistrarNC(ObjVentas, ObjConta, ObjInventario, ObjContr, ObjContPaq, ObjFacturaDevolucion, ObjBancos, TmpDTconceptos, ObjEventos) Then - ' Obj.Add(ObjFacturaDevolucion) - ' Else - ' Return Nothing - ' End If - ' End If - - ' 'TRASPASA PAGADO - ' If Not ObjConta.TraspasarSaldosPrePolizas(CveDevolucion, ObjFactura.CveVenta, ObjFactura.CvePrePoliza) Then - ' Return Nothing - ' End If - - ' If Not ObjInventario.TraspasaEntregaDirectaOCInv(ObjFactura.CveVenta, UsuarioActual.CveEmpresa) Then - ' Return Nothing - ' End If - - ' End If - ' End If - ' End If - ' End If - - ' If Obj.Count > 0 Then - ' Return Obj - ' Else - ' Return Nothing - ' End If - - 'End Function - 'Private Function RegistrarNC(ObjVentas As ClsVentas, ObjConta As ClsContabilidad, ObjInventario As ClsInventarios, ObjContr As ClsContratos, ObjContPaq As ClsContPAQi, ByVal factura As Modelos.Factura, ObjBancos As ClsBancos, TmpDTconceptos As DataTable, ByRef ObjEventos As ClsOIEventos) As Boolean - ' Dim ProcesoCorrecto As Boolean = True - ' RefacturacionGeneroNC = True - - ' ''Generamos el nuevo folio - ' 'Dim ObjFolios As New ClsGralFolios(ObjVentas.IniciaTransacSQL()) - ' 'If ObjFolios.GetFolios(factura.TipoDocto, UsuarioActual.CveEmpresa) Then - ' ' Dim DT As DataTable = ObjFolios.DtResultados.FiltraParametros(String.Format(" CveSubProyecto = {0} And Estado = 'Activo'", DdlSubProyectoDatos.SelectedValue)) - ' ' If DT.Rows.Count > 0 Then - ' ' factura.Folio = DT.Rows(0)("FActual").ToString().ToEntero() - ' ' Else - ' ' ProcesoCorrecto = False - ' ' End If - ' ' DT.Dispose() - ' 'End If - ' factura.Folio = -1 - - ' 'Registramos la venta - ' GuardarVenta(ObjVentas, ObjConta, ObjInventario, ObjContr, factura, TmpDTconceptos, -1, ObjContPaq, ObjBancos) - ' 'CargaNCDT(factura.CveVentaPadre, factura.Total) - - ' 'ObjFacturaDevolucion.Timbre = PreParaTimbre(ObjFacturaDevolucion) - ' ''Timbramos - ' 'If factura.TipoDocto.Contiene("Ing", "Egs", "Ant") AndAlso FolioFiscal <> "" Then - ' ' If UsuarioActual.Empresa.TipoFacturacion = "CFDi" AndAlso UsuarioActual.Empresa.FacturaProduccion Then - - ' ' Dim sw As New Diagnostics.Stopwatch - ' ' sw.Start() - - ' ' 'FACTURA INGRESO/EGRESO - ' ' Dim ObjTimbrado As New Modelos.Timbrado - ' ' Dim FM As New Modelos.FemsaFactura - ' ' Dim TmpDT7Eleven As New DataTable - ' ' Dim TmpDTComplementosTimbrado As New DataTable - - ' ' PrepararTimbrado(FM, TmpDT7Eleven, TmpDTComplementosTimbrado) - - ' ' ObjTimbrado.TimbrarFactura(UsuarioActual, factura, FM, TmpDT, TmpDTImpuestos, TmpDT7Eleven, TmpDTComplementosTimbrado, Ruta, LstFordASN, TxtFordGSDB.Text, ObjVentas) - - ' ' sw.Stop() - ' ' GuardaLogTimbrado(sw.ElapsedMilliseconds.ToString(), UsuarioActual.Empresa.CvePAC) - - ' ' ElseIf UsuarioActual.Empresa.TipoFacturacion = "CBB" Then - ' ' GeneraPDFCBB(ObjFactura.Fecha, Nothing, ObjFactura.SerieFolio, False) - ' ' End If - ' 'End If - - ' If ErrorList.Count > 0 Then - ' ProcesoCorrecto = False - ' End If - - ' Return ProcesoCorrecto - 'End Function #End Region #Region " VISTA PREVIA NEW " @@ -15701,7 +15428,10 @@ Partial Class Ventas HdnIVACalculado.Value = "0" 'SI ES REFACTURACION NO LIMPIAR EL FOLIO FISCAL If NuevaFactura <> 1 Then - HdnFolioFiscalNC.Value = "0" + 'SI ES UNA NOTA DE CREDITO NO TIMBRADA NO DEBE LIMPIAR + If Not (DdlTipoComprobante.SelectedValue.ToString() = "Egs" AndAlso CveVenta > 0 AndAlso LblSeTimbro.Text = "No") Then + HdnFolioFiscalNC.Value = "0" + End If End If LblAntAplicados.Text = "" LblAntAplicados.Visible = False @@ -15927,7 +15657,7 @@ Partial Class Ventas 'If FechaMaxima < "01/01/2018".ToDate And UsuarioActual.CveEmpresa = 119 Then ' FechaMaxima = "01/01/2018".ToDate 'End If - 'Dim Now As DateTime = New DateTime(2020, 2, 19) + 'Dim NowADS() As DateTime = New DateTime(2020, 2, 19) Try CvePrePoliza = ObjConta.AddPrePolizas("Ventas/Anticipos", CvePlantillaPoliza, TxtTotal.Text.ToDecimal, TxtTotal.Text.ToDecimal, DdlMoneda.SelectedValue.ToEntero(), TxtFechaAnticipoCliente.Text.ToDate, String.Format("{0} {1} {2}-{3}", If(EsAnticipo2017Jam, "Aplicación Anticipo 2017", ""), NombreCliente, Serie, TxtFolio.Text), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) @@ -15949,7 +15679,7 @@ Partial Class Ventas Dim FechaUltimaFluctuacion As Date = MinFecha Dim TipoCambioFluctuacion As Decimal = 1 - Dim tFecha As Date = Now + Dim tFecha As Date = NowADS() Dim UltimaFluctuacion As MTipoCambioFluctuacion = GlobalTipoCambioUltimaFluctuacion(tFecha) @@ -16300,7 +16030,7 @@ Partial Class Ventas Private Function AgregarPrePolizasXTrasladar(ObjConta As ClsContabilidad, CvePrePoliza As Integer, PorcentajeAmortizacion As Decimal, TipoCambio As Decimal, ByRef CuentasContablesInvalidas As StringBuilder, ByRef CveCuentaContabilizacion As Integer, Importe13 As Decimal, Importe8 As Decimal, Importe9 As Decimal) As Boolean Dim ImporteMovimiento As Decimal Dim ImporteMX As Decimal - Dim FechaMovimiento As Date = Now + Dim FechaMovimiento As Date = NowADS() Dim Concepto As String = ViewState("VentaFolio").ToString() Dim PrePolizaCorrecta As Boolean = True '13 Iva x Trasladar @@ -16341,7 +16071,7 @@ Partial Class Ventas Dim ImporteMovimiento As Decimal Dim ImporteMX As Decimal - Dim FechaMovimiento As Date = Now + Dim FechaMovimiento As Date = NowADS() Dim Concepto As String = ViewState("VentaFolio").ToString() Dim PrePolizaCorrecta As Boolean = True Dim PorcentajeImpuesto As Decimal @@ -16395,6 +16125,7 @@ Partial Class Ventas CreaObjetosVenta() 'PARA CUANDO YA ESTA GUARDADA LA VENTA + ObjFactura.Timbre = PreParaTimbre(ObjFactura) ObjFactura.CveVenta = CveVenta ObjFactura.Serie = Serie ObjFactura.Folio = Folio @@ -16685,7 +16416,7 @@ Partial Class Ventas ' End If - ' CvePrePoliza = ObjConta.AddPrePolizas("Ventas/GuardaEstatus", CvePlantillaPoliza, TxtTotal.Text.ToDouble, TxtTotal.Text.Replace(",", "").ToDouble, DdlMoneda.SelectedValue.ToEntero(), Now, NombreCliente, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + ' CvePrePoliza = ObjConta.AddPrePolizas("Ventas/GuardaEstatus", CvePlantillaPoliza, TxtTotal.Text.ToDouble, TxtTotal.Text.Replace(",", "").ToDouble, DdlMoneda.SelectedValue.ToEntero(), NowADS(), NombreCliente, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) ' ObjFacturaDevolucion.CveVenta = CveVenta ' ObjFacturaDevolucion.CvePrePoliza = CvePrePoliza @@ -16708,7 +16439,7 @@ Partial Class Ventas ' If CveEstatus = 4 Then - ' If ObjVentas.UpdateEstatusFactura(CveEstatus, FolioFiscal, "", Now, CveVenta, IDPoliza) Then + ' If ObjVentas.UpdateEstatusFactura(CveEstatus, FolioFiscal, "", NowADS(), CveVenta, IDPoliza) Then ' Mensaje = "El nuevo estatus se guardó correctamente" ' Else ' ErrorCancelar = True @@ -16730,7 +16461,7 @@ Partial Class Ventas ' Dim Total As Decimal = TxtTotal.Text.ToDecimal ' Dim RFCReceptor As String = HdnRFCVenta.Value - ' If Not ObjVentas.UpdateEstatusFactura(13, FolioFiscal, "", Now, CveVenta, IDPoliza) Then 'Marcamos la factura como refacturada, si no se cancelo en el SAT el estatus nos dejara cancelarla despues + ' If Not ObjVentas.UpdateEstatusFactura(13, FolioFiscal, "", NowADS(), CveVenta, IDPoliza) Then 'Marcamos la factura como refacturada, si no se cancelo en el SAT el estatus nos dejara cancelarla despues ' ErrorCancelar = True ' End If ' Dim RespCancelacion = ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscal, Total, RFCReceptor, UsuarioActual.Empresa.RFC) @@ -16747,7 +16478,7 @@ Partial Class Ventas ' End If ' If Not ErrorCancelar Then - ' If ObjVentas.UpdateEstatusFactura(CveEstatus, FolioFiscal, ObjCancelacion.CancelacionAcuse, Now, CveVenta, IDPoliza, CvePAC:=UsuarioActual.Empresa.CvePAC) Then + ' If ObjVentas.UpdateEstatusFactura(CveEstatus, FolioFiscal, ObjCancelacion.CancelacionAcuse, NowADS(), CveVenta, IDPoliza, CvePAC:=UsuarioActual.Empresa.CvePAC) Then ' Mensaje = "El nuevo estatus se guardó correctamente" ' Else ' ErrorCancelar = True @@ -16785,7 +16516,7 @@ Partial Class Ventas ' End If - ' CvePrePoliza = ObjConta.AddPrePolizas("Ventas/GuardaEstatus", CvePlantillaPoliza, TxtTotal.Text.ToDouble, TxtTotal.Text.Replace(",", "").ToDouble, DdlMoneda.SelectedValue.ToEntero(), Now, NombreCliente, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + ' CvePrePoliza = ObjConta.AddPrePolizas("Ventas/GuardaEstatus", CvePlantillaPoliza, TxtTotal.Text.ToDouble, TxtTotal.Text.Replace(",", "").ToDouble, DdlMoneda.SelectedValue.ToEntero(), NowADS(), NombreCliente, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) ' ObjFactura.CveVenta = CveVenta ' ObjFactura.CvePrePoliza = CvePrePoliza @@ -16799,7 +16530,7 @@ Partial Class Ventas ' If CveEstatus = 4 Then - ' If ObjVentas.UpdateEstatusFactura(CveEstatus, FolioFiscal, "", Now, CveVenta, IDPoliza) Then + ' If ObjVentas.UpdateEstatusFactura(CveEstatus, FolioFiscal, "", NowADS(), CveVenta, IDPoliza) Then ' Mensaje = "El nuevo estatus se guardó correctamente" ' Else ' ErrorCancelar = True @@ -17124,7 +16855,7 @@ Partial Class Ventas 'RBLPago.Enabled = False RBLPago.SelectedValue = "2" RBLPago_SelectedIndexChanged(RBLPago, EventArgs.Empty) - TxtFechaVencimientoCotizacion.Text = Now.ToString() + TxtFechaVencimientoCotizacion.Text = NowADS().ToString() GvPS.Columns(5).Visible = True ThTiempoEntrega.Visible = True ThTiempoEntrega2.Visible = True @@ -17143,7 +16874,7 @@ Partial Class Ventas TrRFC.Visible = False 'RBLPago.Enabled = False 'RBLPago.SelectedValue = "2" - TxtFechaVencimientoCotizacion.Text = Now.ToString() + TxtFechaVencimientoCotizacion.Text = NowADS().ToString() GvPS.Columns(5).Visible = True ThTiempoEntrega.Visible = True ThTiempoEntrega2.Visible = True @@ -17255,7 +16986,7 @@ Partial Class Ventas End If - TxtFechaPago.Text = Now.AddDays(PlazoCobranza).ToShortDateString + TxtFechaPago.Text = NowADS().AddDays(PlazoCobranza).ToShortDateString DdlLineaAdicional_SelectedIndexChanged(DdlLineaAdicional, EventArgs.Empty) @@ -17497,9 +17228,12 @@ Partial Class Ventas If Not FacturarDocumentoNuevo Then If Not CveEmpresaCRM > 0 Then - BtnCrearApartirDe.Enabled = EstatusCliente - BtnEmitirImprimir.Visible = EstatusCliente - TrVistaPrevia.Visible = EstatusCliente + 'SI ES UNA REMISION EXISTENTE, NO MOSTRAR LOS BOTONES + If Not (CveVenta > 0 AndAlso DdlTipoComprobante.SelectedValue = "Rem") Then + BtnCrearApartirDe.Enabled = EstatusCliente + BtnEmitirImprimir.Visible = EstatusCliente + TrVistaPrevia.Visible = EstatusCliente + End If Else If TipoDoctoConsulta.Contiene("Ing", "Egs", "Ant", "Dev") Then BtnCrearApartirDe.Enabled = EstatusCliente @@ -18230,7 +17964,7 @@ Partial Class Ventas If ObjVentas.GetLineasAdicionalesSaldo(-1, CveCliente, -1, -1, UsuarioActual.CveEmpresa, TipoCambioConsulta:=TCConsulta, ConSaldo:=-1, FechaVencimientoConsulta:=MinFecha) Then If ObjVentas.DtResultados.Rows.Count > 0 Then TrLineaAdicional.Visible = True - DdlLineaAdicional.DataSource = ObjVentas.DtResultados.FiltraParametros($"(Saldo > 0 AND FechaVencimiento >= '{Now.ToString("yyyy/MM/dd")}') OR CveLineaAdicional = {Me.CveLineaAdicionalVenta}") + DdlLineaAdicional.DataSource = ObjVentas.DtResultados.FiltraParametros($"(Saldo > 0 AND FechaVencimiento >= '{NowADS().ToString("yyyy/MM/dd")}') OR CveLineaAdicional = {Me.CveLineaAdicionalVenta}") End If End If Else @@ -18243,7 +17977,7 @@ Partial Class Ventas End If End If Else - If ObjVentas.GetLineasAdicionalesSaldo(-1, CveCliente, -1, -1, UsuarioActual.CveEmpresa, TipoCambioConsulta:=TCConsulta, ConSaldo:=1, FechaVencimientoConsulta:=Now) Then + If ObjVentas.GetLineasAdicionalesSaldo(-1, CveCliente, -1, -1, UsuarioActual.CveEmpresa, TipoCambioConsulta:=TCConsulta, ConSaldo:=1, FechaVencimientoConsulta:=NowADS()) Then If ObjVentas.DtResultados.Rows.Count > 0 Then TrLineaAdicional.Visible = True DdlLineaAdicional.DataSource = ObjVentas.DtResultados @@ -18908,7 +18642,7 @@ Partial Class Ventas 'End Sub 'Private Sub ActualizaEstatus(CveEstatus As Integer, FolioFiscal As String, CveVenta As Integer) ' Dim ObjVentas As New ClsVentas() - ' ObjVentas.UpdateEstatusFactura(CveEstatus, FolioFiscal, "", Now, CveVenta) + ' ObjVentas.UpdateEstatusFactura(CveEstatus, FolioFiscal, "", NowADS(), CveVenta) ' ObjVentas.Dispose() 'End Sub 'Private Sub ActualizaCliente(NumCtaPago As String, MetodoDePago As Integer, CveCliente As Integer) @@ -20098,7 +19832,7 @@ Partial Class Ventas If Indice >= 0 Then ' rowSurtidos("Surtido").ToString().ToDouble < rowSurtidos("Cantidad").ToString().ToDouble AndAlso (dr("CantidadDisponible").ToString().ToDouble - rowSurtidos("Surtido").ToString().ToDouble > 0 Or dr("Serie").ToString() <> "") If rowSurtidos("Surtido").ToString().ToDecimal < rowSurtidos("Cantidad").ToString().ToDecimal Then - Dim CantidadSurtida As Double = If(dr("CantidadDisponible").ToString().ToDecimal < rowSurtidos("Cantidad").ToString().ToDouble, dr("CantidadDisponible").ToString().ToDecimal, rowSurtidos("Cantidad").ToString().ToDecimal) + Dim CantidadSurtida As Decimal = If(dr("CantidadDisponible").ToString().ToDecimal < rowSurtidos("Cantidad").ToString().ToDouble, dr("CantidadDisponible").ToString().ToDecimal, rowSurtidos("Cantidad").ToString().ToDecimal) 'SI LA CANTIDAD SURTIDA SUPERA LO REQUERIDO, TOMA SOLO LO NECESARIO PARA COMPLETAR If (rowSurtidos("Surtido").ToString().ToDecimal + CantidadSurtida) > rowSurtidos("Cantidad").ToString().ToDecimal Then @@ -20157,16 +19891,7 @@ Partial Class Ventas Optional CveAlmacenDestino As Integer = -1) As Integer Dim OcurrioError As Boolean = False Dim ContadorMovtosDetalles As Integer = 0 - - 'If Not AplicaMovimientoDetalleEntrada Then - ' Dim rowa As DataRow = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveAlmacen={0}", CveAlmacen)) - ' If Not IsNothing(rowa) AndAlso rowa("CveTipoAlmacen").ToString() = "10" Then - ' AplicaMovimientoDetalleEntrada = True - ' End If - 'End If - 'Creamos el movimiento - - Dim CveMovimientoInventario As Integer = ObjInventario.AddMovimiento(CveAlmacen, ConceptoEntrada, CveMoneda, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta, -1, -1, + Dim CveMovimientoInventario As Integer = ObjInventario.AddMovimiento(CveAlmacen, ConceptoEntrada, CveMoneda, NowADS(), -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta, -1, -1, CveMovimientoRelacionado:=CveMovimientoRelacionado, CveAlmacenDestino:=CveAlmacenDestino, Modulo:="Vta/E4") If CveMovimientoInventario > 0 Then @@ -20201,21 +19926,6 @@ Partial Class Ventas CveVentaDetalleRemision = MovDet("CveVentaDetalle").ToString().ToEntero() End If - 'If ConceptoEntrada = 3 Then - ' CveVentaDetalle = TmpDT.FiltroPrimeroValor("CveVentaDetalle", $"Consec={Consec}").ToEntero() - 'ElseIf ConceptoEntrada = 40 Then - ' CveVentaDetalle = MovDet("CveVentaDetalle").ToString().ToEntero() - ' CveVentaDetallePadre = TmpDT.FiltroPrimeroValor("CveVentaDetalle", $"Consec={Consec}").ToEntero() - ' 'CUANDO LA VENTADETALLE NO TENGA VALOR DEBE MARCAR ERROR, NUEVA RESTRICCION DE ALMACEN - ' If CveVentaDetallePadre < 0 Then - ' Alert("no se encontro la venta detalle nueva. Por favor comuniquese con atención SIG.", TipoMensaje.ToastError) - ' OcurrioError = True - ' Exit For - ' End If - 'Else - ' CveVentaDetalle = MovDet("CveVentaDetalle").ToString().ToEntero() - 'End If - 'CUANDO LA VENTADETALLE NO TENGA VALOR DEBE MARCAR ERROR, NUEVA RESTRICCION DE ALMACEN If CveVentaDetalle < 0 Then Alert("no se encontro la venta detalle. Por favor comuniquese con atención SIG.", TipoMensaje.ToastError) @@ -20311,13 +20021,16 @@ Partial Class Ventas For Each drt As DataRow In dttped.FiltraParametros("Pedimento <> ''").Rows ObjInventario.UpdateVentasDetalleNumeroPedimento(CveVenta, drt("CveVentaDetalle").ToString.ToEntero, drt("Pedimento").ToString) + Dim dtr As DataRow() = TmpDT.Select($"CveVentaDetalle ={drt("CveVentaDetalle")}") + If dtr IsNot Nothing Then 'actualizamos los datos temporales para timbrar + dtr(0)("NumeroPedimento") = drt("Pedimento").ToString + End If Next End If End If Else OcurrioError = True End If - End If End If @@ -20449,7 +20162,7 @@ Partial Class Ventas If CveMovimientoVirtual > 0 Then For Each RowUsado As DataRow In DtPSVirtual.Rows Dim CvePS As Integer = RowUsado("CvePS").ToString().ToEntero() - Dim CantidadUsado As Double = RowUsado("Cantidad").ToString().ToDouble() + Dim CantidadUsado As Decimal = RowUsado("Cantidad").ToString().ToDecimal() Dim PU As Decimal = RowUsado("Cargo").ToString().ToDecimal() Dim CveUM As Integer = RowUsado("CveUM").ToString().ToEntero() @@ -21049,7 +20762,7 @@ Partial Class Ventas Dim x509 As New X509Certificate2() x509.Import(Data) - If x509.NotAfter <= Now() Then + If x509.NotAfter <= NowADS() Then TrVistaPrevia.Visible = False TrEmitir.Visible = False BtnEmitirImprimir.Visible = False @@ -22008,7 +21721,7 @@ Partial Class Ventas Select Case RBLPago.SelectedValue.ToEntero() Case 1 'CREDITO - TxtFechaPago.Text = If(DdlTipoComprobante.SelectedValue = "Rem", Now.AddDays(PlazoCobranzaRemision), Now.AddDays(PlazoCobranza)).ToShortDateString + TxtFechaPago.Text = If(DdlTipoComprobante.SelectedValue = "Rem", NowADS().AddDays(PlazoCobranzaRemision), NowADS().AddDays(PlazoCobranza)).ToShortDateString 'SI ES CREDITO EL METODO DE PAGO DEBE SER PPD If UsuarioActual.Empresa.Funcionalidad(589) = "1" Then DdlMetodoPago33.SelectedValueExist("3") @@ -22046,7 +21759,7 @@ Partial Class Ventas End If TxtImporteContado.Text = TxtTotal.Text End If - TxtFechaPago.Text = Now.ToShortDateString + TxtFechaPago.Text = NowADS().ToShortDateString 'SI ES CONTADO EL METODO DE PAGO DEBE SER PUE If UsuarioActual.Empresa.Funcionalidad(589) = "1" Then DdlMetodoPago33.SelectedValueExist("1") @@ -22076,7 +21789,7 @@ Partial Class Ventas End If Case 3 ' TERMINAL DivTerminal.Visible = True - TxtFechaPago.Text = If(DdlTipoComprobante.SelectedValue = "Rem", Now.AddDays(PlazoCobranzaRemision), Now.AddDays(PlazoCobranza)).ToShortDateString + TxtFechaPago.Text = If(DdlTipoComprobante.SelectedValue = "Rem", NowADS().AddDays(PlazoCobranzaRemision), NowADS().AddDays(PlazoCobranza)).ToShortDateString End Select LimpiaContado() @@ -23084,7 +22797,7 @@ Partial Class Ventas ' Exit Sub 'End If - If CveVenta > 0 AndAlso (SaldoVenta = TxtTotal.Text.ToDecimal OrElse DdlTipoComprobante.SelectedValue = "Dev" OrElse (DdlTipoComprobante.SelectedValue = "Ped" AndAlso TmpDT IsNot Nothing AndAlso TmpDT.COUNT("CveContratoDetalle", "CveContratoDetalle > 0") > 0)) Then 'And (DdlTipoComprobante.SelectedValue.Contiene({"Rem", "Ped"}) Or (DdlTipoComprobante.SelectedValue.Contiene({"Ing"}) And TxtFecha.Text.ToDate.Month = Now.Month And TxtFecha.Text.ToDate.Year = Now.Year)) Then + If CveVenta > 0 AndAlso (SaldoVenta = TxtTotal.Text.ToDecimal OrElse DdlTipoComprobante.SelectedValue = "Dev" OrElse (DdlTipoComprobante.SelectedValue = "Ped" AndAlso TmpDT IsNot Nothing AndAlso TmpDT.COUNT("CveContratoDetalle", "CveContratoDetalle > 0") > 0)) Then 'And (DdlTipoComprobante.SelectedValue.Contiene({"Rem", "Ped"}) Or (DdlTipoComprobante.SelectedValue.Contiene({"Ing"}) And TxtFecha.Text.ToDate.Month = NowADS().Month And TxtFecha.Text.ToDate.Year = NowADS().Year)) Then If Not DevolucionAlmacen = 2 Then 'If UsuarioActual.Empresa.Funcionalidad(555) = "1" Then @@ -23595,7 +23308,7 @@ Partial Class Ventas Dim ActualizoEstatus As Boolean = False Dim ObjVentas As New ClsVentas - If ObjVentas.UpdateEstatusFactura(8, FolioFiscal, "", Now, CveVenta) Then + If ObjVentas.UpdateEstatusFactura(8, FolioFiscal, "", NowADS(), CveVenta) Then ActualizoEstatus = True End If ObjVentas.Dispose() @@ -24016,7 +23729,7 @@ Partial Class Ventas ' Exit Sub ' End If ' Else - ' CancelacionFecha = Now.Date + ' CancelacionFecha = NowADS().Date ' CancelacionAcuse = "" ' End If @@ -24111,7 +23824,7 @@ Partial Class Ventas ' End Try ' ElseIf CveEstatusCancelacion = 20 Then - ' If ObjVentas.UpdateEstatusFactura(CveEstatus, FolioFiscal, "", Now, CveVenta) Then + ' If ObjVentas.UpdateEstatusFactura(CveEstatus, FolioFiscal, "", NowADS(), CveVenta) Then ' Alert("El estatus de la factura fue cambiado a 'Cancelación en Proceso'") ' End If ' ObjVentas.Dispose() @@ -24339,11 +24052,11 @@ Partial Class Ventas Dim Plantilla As String = texto If Plantilla.Contains("{DIA}") Then - Plantilla = Plantilla.Replace("{DIA}", DateTime.Now.Day.ToString()) + Plantilla = Plantilla.Replace("{DIA}", NowADS().Day.ToString()) End If If Plantilla.Contains("{MES}") Then - Dim fecha As DateTime = DateTime.Now + Dim fecha As DateTime = NowADS() Dim formatoFecha = Globalization.CultureInfo.CurrentCulture.DateTimeFormat Dim nombreMes As String = formatoFecha.GetMonthName(fecha.Month).ToUpper() @@ -24351,15 +24064,15 @@ Partial Class Ventas End If If Plantilla.Contains("{AÑO}") Then - Plantilla = Plantilla.Replace("{AÑO}", DateTime.Now.Year.ToString()) + Plantilla = Plantilla.Replace("{AÑO}", NowADS().Year.ToString()) End If If Plantilla.Contains("{TC}") Then - Plantilla = Plantilla.Replace("{TC}", GlobalTipoCambio(Now).FormatoNumero) + Plantilla = Plantilla.Replace("{TC}", GlobalTipoCambio(NowADS()).FormatoNumero) End If If Plantilla.Contains("{MESANTERIOR}") Then - Dim fecha As DateTime = DateTime.Now.AddMonths(-1) + Dim fecha As DateTime = NowADS().AddMonths(-1) Dim formatoFecha = Globalization.CultureInfo.CurrentCulture.DateTimeFormat Dim nombreMes As String = formatoFecha.GetMonthName(fecha.Month).ToUpper() @@ -24367,7 +24080,7 @@ Partial Class Ventas End If If Plantilla.Contains("{INICIOMESANTERIOR}") Then - Dim fecha As DateTime = DateTime.Now.AddMonths(-1) + Dim fecha As DateTime = NowADS().AddMonths(-1) Dim formatoFecha = Globalization.CultureInfo.CurrentCulture.DateTimeFormat Dim nombreMes As String = formatoFecha.GetMonthName(fecha.Month).ToUpper() @@ -24377,7 +24090,7 @@ Partial Class Ventas End If If Plantilla.Contains("{FINMESANTERIOR}") Then - Dim fecha As DateTime = DateTime.Now.AddMonths(-1) + Dim fecha As DateTime = NowADS().AddMonths(-1) Dim formatoFecha = Globalization.CultureInfo.CurrentCulture.DateTimeFormat Dim nombreMes As String = formatoFecha.GetMonthName(fecha.Month).ToUpper() @@ -24765,7 +24478,7 @@ Partial Class Ventas HdnCveCliente.Value = CveCliente.ToString() ViewState("CveCliente") = CveCliente CargaCliente(CveCliente, -1) 'Estatus activo, se requiere para cargar una factura en la que el cliente a sido eliminado - TxtFecha.Text = Now.ToShortDateString + TxtFecha.Text = NowADS().ToShortDateString 'TxtSubTotal.Text = DbRowVenta("SubTotal").ToString().FormatoNumero(2) 'LblDescuentos.Text = DbRowVenta("Descuento").ToString().FormatoNumero(2) @@ -25602,7 +25315,7 @@ Partial Class Ventas ' Dim ObjVentas As New ClsVentas ' Dim dtt As DataTable = Nothing ' If ObjVentas.GetVentas(UsuarioActual.CveEmpresa, "-1", "-1", -1, "-1", CveCliente, -1, 3, -1, - ' Now.AddYears(-1).ToShortDateString, Now.ToShortDateString, "-1", -1, -1, CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then + ' NowADS().AddYears(-1).ToShortDateString, NowADS().ToShortDateString, "-1", -1, -1, CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then ' If ObjVentas.DtResultados.Rows.Count > 0 Then ' dtt = ObjVentas.DtResultados.FiltraParametros("TipoDocto IN ('Ing','Ant')") ' End If @@ -26319,11 +26032,11 @@ Partial Class Ventas params.Add(New ReportParameter("Guia", Guia)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) - params.Add(New ReportParameter("Anio", Now.Year.ToString())) - params.Add(New ReportParameter("Mes", Now.Month.ToString("00"))) - params.Add(New ReportParameter("Dia", Now.Day.ToString("00"))) + params.Add(New ReportParameter("Anio", NowADS().Year.ToString())) + params.Add(New ReportParameter("Mes", NowADS().Month.ToString("00"))) + params.Add(New ReportParameter("Dia", NowADS().Day.ToString("00"))) params.Add(New ReportParameter("Rastreo", Rastreo)) params.Add(New ReportParameter("Dimensiones", Dimensiones)) @@ -26331,7 +26044,7 @@ Partial Class Ventas params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) - ImprimirPDF(RutaRdlc, DTMovimientosDetalle, params, $"ReporteGuia_{Now.ToString("yyyyMMddhhmmss")}") + ImprimirPDF(RutaRdlc, DTMovimientosDetalle, params, $"ReporteGuia_{NowADS().ToString("yyyyMMddhhmmss")}") End Sub Private Sub GvPaqueriaGuias_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvPaqueriaGuias.RowDataBound @@ -26565,7 +26278,7 @@ Partial Class Ventas Dim CveSubProyecto As Integer = DdlSubProyectoDatos.SelectedValue.ToEntero() Dim CveEstatus As Integer = 1 - Dim Fecha As String = Now.ToString("dd/MM/yyyy") + Dim Fecha As String = NowADS().ToString("dd/MM/yyyy") Dim FechaEstimada As String = "-1" Dim NoCajas As Integer = 0 Dim Observaciones As String = "" @@ -27330,7 +27043,6 @@ Partial Class Ventas Next End If Next - End If 'VERIFICA SI TIENE BONIFICACIONES PARA AGREGARLAS @@ -27740,6 +27452,8 @@ Partial Class Ventas 'End If 'ObjCliente.Dispose() + DdlLineaAdicional.SelectedValue = "-1" 'limpieza de la linea adicionales + 'CARGA IMPUESTOS LOCALES Dim ObjVentas As New ClsVentas() If ObjVentas.GetVentaImpuestosLocales(CveVenta) Then @@ -27845,7 +27559,7 @@ Partial Class Ventas DtImpuestos.Merge(CargaDtImpuestosNC(Gvr.DataKey("CveVenta").ToString().ToEntero(), Gvr.FCTextBox("TxtImporte").Text.ToString().ToDecimal, AplicaImpuestosLocales:=AplicaImpuestosLocales, NivelTotal:=DdlNCNivelImporte.SelectedValue.ToEntero()), True, MissingSchemaAction.Ignore) 'CARGA FACTURA A LA CUAL SE APLICA LA NC AcumuladoNC += Gvr.FCTextBox("TxtImporte").Text.ToString().ToDecimal - CargaNCDT(Gvr.DataKey("CveVenta").ToString().ToEntero(), Gvr.FCTextBox("TxtImporte").Text.ToString().ToDecimal) + CargaNCDT(Gvr.DataKey("CveVenta").ToString().ToEntero(), DdlTipoComprobante.SelectedValue, Gvr.FCTextBox("TxtImporte").Text.ToString().ToDecimal) If UsuarioActual.CveEmpresa = 140 AndAlso NumVentasAplicar = 1 Then DdlMetodoPago33.Enabled = True DdlMetodoPago33.SelectedValueExist(Gvr.DataKey("CveMetodoPago33").ToString()) @@ -28024,9 +27738,9 @@ Partial Class Ventas If UsuarioActual.CveEmpresa.Contiene(13, 83) OrElse ChkEmitirComercioExterior.Checked Then - TxtTipoCambio.Text = GlobalTipoCambio(Now.AddDays(-1)).ToString() + TxtTipoCambio.Text = GlobalTipoCambio(NowADS().AddDays(-1)).ToString() Else - TxtTipoCambio.Text = GlobalTipoCambio(Now).ToString() + TxtTipoCambio.Text = GlobalTipoCambio(NowADS()).ToString() End If End If @@ -28111,16 +27825,16 @@ Partial Class Ventas If Not AplicaNCMasiva Then Dim TT As Decimal = TxtNCImporte.Text.ToDecimal If TT > TxtTotal.Text.ToDecimal Then TT = TxtTotal.Text.ToDecimal - CargaNCDT(CveVenta, TT) + CargaNCDT(CveVenta, DdlTipoComprobante.SelectedValue, TT) End If 'verifica el tipo de cambio que se actualice If DdlMoneda.SelectedValue <> "1" Then If UsuarioActual.CveEmpresa.Contiene(13, 83) OrElse ChkEmitirComercioExterior.Checked Then - TxtTipoCambio.Text = GlobalTipoCambio(Now.AddDays(-1)).ToString() + TxtTipoCambio.Text = GlobalTipoCambio(NowADS().AddDays(-1)).ToString() Else - TxtTipoCambio.Text = GlobalTipoCambio(Now).ToString() + TxtTipoCambio.Text = GlobalTipoCambio(NowADS()).ToString() End If End If @@ -28707,7 +28421,7 @@ Partial Class Ventas TmpDT.Columns.Add("AFDepreciacion", GetType(Decimal)) TmpDT.Columns.Add("AFValorInicial", GetType(Decimal)) End If - Dim FechaFactura As DateTime = Now + Dim FechaFactura As DateTime = NowADS() If AplicaNCMasiva OrElse AplicaNCUsado Then If ObjVentas.GetVenta(CveVentaNC, UsuarioActual.CveEmpresa, VerificaAlmacen:=False) Then @@ -28975,7 +28689,7 @@ Partial Class Ventas GvPS.DataBind() LblFolioFiscal.Text = "" - TxtFecha.Text = Now.ToShortDateString + TxtFecha.Text = NowADS().ToShortDateString 'DESACTIVA/ACTIVA BOTONES TrVistaPrevia.Visible = True @@ -29027,8 +28741,8 @@ Partial Class Ventas DtVentasNC.Columns.Add(New DataColumn With {.ColumnName = "Folio", .DataType = GetType(String), .DefaultValue = ""}) End Sub - Private Sub CargaNCDT(pCveVenta As Integer, Importe As Decimal, Optional FolioFiscal As String = "", Optional NuevaFactura As Integer = -1, Optional ByRef ObjVentas As ClsVentas = Nothing, Optional TC As Decimal = 1) - If (pCveVenta > 0 AndAlso DdlTipoComprobante.SelectedValue.Contiene("Egs")) OrElse (pCveVenta > 0 AndAlso NuevaFactura = 1) Then + Private Sub CargaNCDT(pCveVenta As Integer, TipoDocumento As String, Importe As Decimal, Optional FolioFiscal As String = "", Optional NuevaFactura As Integer = -1, Optional ByRef ObjVentas As ClsVentas = Nothing, Optional TC As Decimal = 1) + If (pCveVenta > 0 AndAlso TipoDocumento.Contiene("Egs")) OrElse (pCveVenta > 0 AndAlso NuevaFactura = 1) Then Dim CveEstatusFacturaNC As Integer = -1 Dim TCCambioValuacion As Decimal = 1 Dim Folio As String = "" @@ -29171,7 +28885,7 @@ Partial Class Ventas Dim PU As Decimal = If(AplicaPUEditado, Gv.FCTextBox("TxtPrecioEditado").Text.ToDecimal, Gv.DataKey("PU").ToDecimal) Dim Total As Decimal = (Cantidad * PU) Dim TotalImpuestos As Decimal = (Cantidad * PU) - Descuento - Dim TotalCalculableImpuestosIVA = TotalImpuestos * (1 + Gv.DataKey("PorcentajeIEPS").ToString().ToDecimal) + Dim TotalCalculableImpuestosIVA As Decimal = TotalImpuestos * (1 + Gv.DataKey("PorcentajeIEPS").ToString().ToDecimal) Dim ImporteIVA As Decimal = TotalCalculableImpuestosIVA * Gv.DataKey("PorcentajeIVA").ToString().ToDecimal Dim ImporteRetIVA As Decimal = TotalImpuestos * Gv.DataKey("PorcentajeRetIVA").ToString().ToDecimal Dim ImporteRetISR As Decimal = TotalImpuestos * Gv.DataKey("PorcentajeRetISR").ToString().ToDecimal @@ -29253,7 +28967,7 @@ Partial Class Ventas trNCFactura.Visible = True DdlSubProyectoDatos.Enabled = True TrFolioFiscal.Visible = False - TxtFecha.Text = Now.ToShortDateString() + TxtFecha.Text = NowADS().ToShortDateString() TipoCambioFactura = TxtTipoCambio.Text.ToDecimal If DdlMoneda.SelectedValue.ToEntero() > 1 Then @@ -29286,9 +29000,9 @@ Partial Class Ventas If UsuarioActual.CveEmpresa.Contiene(13, 83) OrElse ChkEmitirComercioExterior.Checked Then - TxtTipoCambio.Text = GlobalTipoCambio(Now.AddDays(-1)).ToString() + TxtTipoCambio.Text = GlobalTipoCambio(NowADS().AddDays(-1)).ToString() Else - TxtTipoCambio.Text = GlobalTipoCambio(Now).ToString() + TxtTipoCambio.Text = GlobalTipoCambio(NowADS()).ToString() End If DivEstatusFac.Visible = False @@ -29629,13 +29343,13 @@ Partial Class Ventas 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("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("EnvioContacto", EnvioContacto)) params.Add(New ReportParameter("SerieFolio", SerieFolio)) params.Add(New ReportParameter("PedidoContrato", PedidoContrato)) params.Add(New ReportParameter("EnvioDireccion", EnvioDireccion)) params.Add(New ReportParameter("Guia", Guia)) - ImprimirPDF("Empresas/Grales/Formatos/Cicovisa.rdlc", Dt, params, String.Format("Formato Cicovisa -{0}", Now.ToDateTime.ToShortDateString)) + ImprimirPDF("Empresas/Grales/Formatos/Cicovisa.rdlc", Dt, params, String.Format("Formato Cicovisa -{0}", NowADS().ToDateTime.ToShortDateString)) End If End Sub @@ -29727,7 +29441,7 @@ Partial Class Ventas 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("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("EnvioContacto", EnvioContacto)) params.Add(New ReportParameter("SerieFolio", SerieFolio)) params.Add(New ReportParameter("PedidoContrato", PedidoContrato)) @@ -29743,7 +29457,7 @@ Partial Class Ventas params.Add(New ReportParameter("EnvioEstado", EnvioEstado)) params.Add(New ReportParameter("Pais", Pais)) params.Add(New ReportParameter("CP", CP)) - ImprimirPDF("Empresas/Grales/Formatos/Telcel.rdlc", Dt, params, String.Format("Formato RADIO MOVIL DIPSA S.A DE C.V. -{0}", Now.ToDateTime.ToShortDateString), "PDF") + ImprimirPDF("Empresas/Grales/Formatos/Telcel.rdlc", Dt, params, String.Format("Formato RADIO MOVIL DIPSA S.A DE C.V. -{0}", NowADS().ToDateTime.ToShortDateString), "PDF") End If End Sub #End Region @@ -31005,7 +30719,7 @@ Partial Class Ventas End If - TxtFechaPago.Text = If(EsDiasCreditoFijo, Now.AddDays(DiasCredito).ToShortDateString, TxtFechaPago.Text) + TxtFechaPago.Text = If(EsDiasCreditoFijo, NowADS().AddDays(DiasCredito).ToShortDateString, TxtFechaPago.Text) DdlLineaAdicional_SelectedIndexChanged(DdlLineaAdicional, EventArgs.Empty) @@ -31185,7 +30899,7 @@ Partial Class Ventas DdlTipoComprobante.SelectedValue = "Ing" If Not (EstablecioFolio AndAlso UsuarioActual.TienePermisoProceso(130)) Then - TxtFecha.Text = Now.ToShortDateString() + TxtFecha.Text = NowADS().ToShortDateString() End If UpPS.Update() @@ -31614,9 +31328,9 @@ Partial Class Ventas LblFolioFiscal.Text = "" DdlTipoComprobante.Enabled = True - TxtFecha.Text = Now.ToShortDateString() + TxtFecha.Text = NowADS().ToShortDateString() LblUsuario.Text = UsuarioActual.Usuario - LblFechaRegistro.Text = Now.ToShortDateString() + LblFechaRegistro.Text = NowADS().ToShortDateString() LblSeTimbro.Text = "No" LblMail.Text = "No" @@ -31665,7 +31379,7 @@ Partial Class Ventas ChkConvertirDoctoPesos.Enabled = Not UsuarioActual.TienePermisoProceso(324) TxtTipoCambio.Enabled = True TxtFechaEjecucion.ReadOnly = False - TxtFechaEjecucion.Text = Now.ToShortDateString + TxtFechaEjecucion.Text = NowADS().ToShortDateString ImgCalendarFechaEje.Enabled = True DdlVendedor.Enabled = True DdlSubProyectoDatos.Enabled = True @@ -31704,7 +31418,7 @@ Partial Class Ventas PlazoCobranza = ObjCliente.PlazoCobranza PlazoCobranzaRemision = ObjCliente.PlazoCobranzaRemision 'TxtNumCtaPago.Text = ObjCliente.NumCtaPago - TxtFechaPago.Text = If(DdlTipoComprobante.SelectedValue = "Rem", Now.AddDays(PlazoCobranzaRemision), Now.AddDays(PlazoCobranza)).ToShortDateString + TxtFechaPago.Text = If(DdlTipoComprobante.SelectedValue = "Rem", NowADS().AddDays(PlazoCobranzaRemision), NowADS().AddDays(PlazoCobranza)).ToShortDateString DdlTipoRetencion.SelectedValueExist(ObjCliente.DtResultados(0)("CveTipoRetencion").ToString()) End If End If @@ -31713,7 +31427,7 @@ Partial Class Ventas TrVistaPrevia.Visible = True - TxtFechaVencimientoCotizacion.Text = Now.ToShortDateString + TxtFechaVencimientoCotizacion.Text = NowADS().ToShortDateString DdlLineaAdicional_SelectedIndexChanged(DdlLineaAdicional, EventArgs.Empty) @@ -31991,15 +31705,15 @@ Partial Class Ventas Dim TipoDoctoViejo As String = DdlTipoComprobante.SelectedValue DdlTipoComprobante.SelectedValue = TipoDoctoNuevo If Not (EstablecioFolio AndAlso UsuarioActual.TienePermisoProceso(130)) Then - TxtFecha.Text = Now.ToString() + TxtFecha.Text = NowADS().ToString() End If 'SI TIENE LINEA ADICIONAL, NO DEBE MODIFICAR LA FECHA YA ASIGNADA If DdlLineaAdicional.SelectedValue.ToEntero() <= 0 Then - TxtFechaPago.Text = If(TipoDoctoViejo = "Rem" AndAlso EsDiasCreditoFijo, Now.AddDays(DiasCredito), If(DdlTipoComprobante.SelectedValue = "Rem", Now.AddDays(PlazoCobranzaRemision), Now.AddDays(PlazoCobranza))).ToShortDateString + TxtFechaPago.Text = If(TipoDoctoViejo = "Rem" AndAlso EsDiasCreditoFijo, NowADS().AddDays(DiasCredito), If(DdlTipoComprobante.SelectedValue = "Rem", NowADS().AddDays(PlazoCobranzaRemision), NowADS().AddDays(PlazoCobranza))).ToShortDateString End If - TxtFechaEjecucion.Text = Now.ToString() + TxtFechaEjecucion.Text = NowADS().ToString() DdlLineaAdicional_SelectedIndexChanged(DdlLineaAdicional, EventArgs.Empty) @@ -32268,7 +31982,7 @@ Partial Class Ventas If drow("CveTamaño").ToString.ToEntero > 0 Then If Not ObjAcum.DistribuidorMovtosAdd(factura.CveCliente, drow("Cantidad").ToString.ToDecimal, drow("CveTamaño").ToString.ToEntero, Puntos, Cargo, Bonificacion, CveConcepto, factura.CveVenta, UsuarioActual.CveUsuario, - UsuarioActual.CveEmpresa, 0D, "", Now) Then + UsuarioActual.CveEmpresa, 0D, "", NowADS()) Then Resultado = False Exit For End If @@ -33184,7 +32898,7 @@ Partial Class Ventas End If Dim ObjAcum As New ClsAcumuladores - If ObjAcum.UpdateEnvioPolizaVirtual(CvePolizaVirtual, Retorno, Now, obj.product_unique_code, resp(0)("Descripcion").ToString()) Then + If ObjAcum.UpdateEnvioPolizaVirtual(CvePolizaVirtual, Retorno, NowADS(), obj.product_unique_code, resp(0)("Descripcion").ToString()) Then Alert(Msg.ToString(), TipoMensaje.MsgInformacion) End If ObjAcum.Dispose() @@ -33708,23 +33422,16 @@ Partial Class Ventas Dim Serie As String = "-1" ObjFacturaProntoPago.CveEmpresa = UsuarioActual.CveEmpresa - ObjFacturaProntoPago.TipoCambio = If(CveMoneda = 1, 1, GlobalTipoCambio(Now).FormatoNumero(4).ToDecimal()) + ObjFacturaProntoPago.TipoCambio = If(CveMoneda = 1, 1, GlobalTipoCambio(NowADS()).FormatoNumero(4).ToDecimal()) ObjFacturaProntoPago.ConvertirPesos = False ObjFacturaProntoPago.CveMoneda = CveMoneda ObjFacturaProntoPago.Moneda = GlobalDTMonedas.FiltroPrimeroValor("Moneda", $"CveMoneda = {CveMoneda}") ObjFacturaProntoPago.MonedaSAT = GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", $"CveMoneda = {CveMoneda}") ObjFacturaProntoPago.Serie = Serie ObjFacturaProntoPago.Folio = Folio - ObjFacturaProntoPago.Fecha = Now - ObjFacturaProntoPago.CvePrePoliza = -1 - ObjFacturaProntoPago.CveMetodoPago = 0 - ObjFacturaProntoPago.CondicionesPago = 0 ' 0 - Contado, 1 - Credito (CHECAR) - ObjFacturaProntoPago.FormaPago = 0 ObjFacturaProntoPago.TipoDocto = "Egs" - ObjFacturaProntoPago.Fecha = Now - - + ObjFacturaProntoPago.Fecha = NowADS() ObjFacturaProntoPago.Version = "4.0" If ObjFacturaProntoPago.Cliente Is Nothing Then @@ -33747,8 +33454,6 @@ Partial Class Ventas ObjFacturaProntoPago.CveCliente = CveCliente ObjFacturaProntoPago.SetCliente() - - If ObjCliente.GetClientes(ObjFacturaProntoPago.CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, -1, TipoCliente:=-1) Then If ObjCliente.DtResultados.Rows.Count > 0 Then @@ -33791,17 +33496,7 @@ Partial Class Ventas ObjFacturaProntoPago.TipoDocumento = "" End Select - ObjFacturaProntoPago.FechaPago = Now - - ObjFacturaProntoPago.CveCorte = -1 - 'ObjFacturaProntoPago.CveMesa = -1 - ObjFacturaProntoPago.NumeroPersonas = 0 - ObjFacturaProntoPago.CveContrato = -1 - ObjFacturaProntoPago.DescripcionContrato = "" - ObjFacturaProntoPago.CveClienteSucursal = -1 - ObjFacturaProntoPago.Entrega = "" - ObjFacturaProntoPago.CveAlmacen = -1 - + ObjFacturaProntoPago.FechaPago = NowADS() Dim DtVentasNC As DataTable = InicializaDTVentasNCProntoPago() Dim TotalImporte As Decimal = ObjFacturaProntoPago.DtDetalle.SUMD("TotalImporte") @@ -34146,6 +33841,7 @@ Partial Class Ventas TmpDT.Columns.Add("AFValorInicial", GetType(Decimal)) TmpDT.Columns.Add("NumTurnos", GetType(Decimal)) TmpDT.Columns("NumTurnos").DefaultValue = 0D + TmpDT.Columns.Add("NumeroPedimento", GetType(String)) Return TmpDT End Function @@ -34482,8 +34178,8 @@ Partial Class Ventas Public Sub CargarCamiones() - TxtFechaEntregaCP.Text = Now.Date.ToString("dd/MM/yyyy HH:mm") - TxtFechaLlegadaCP.Text = Now.Date.ToString("dd/MM/yyyy HH:mm") 'Now.Date.AddDays(1).AddMinutes(-1).ToString("dd/MM/yyyy HH:mm") + TxtFechaEntregaCP.Text = NowADS().Date.ToString("dd/MM/yyyy HH:mm") + TxtFechaLlegadaCP.Text = NowADS().Date.ToString("dd/MM/yyyy HH:mm") 'NowADS().Date.AddDays(1).AddMinutes(-1).ToString("dd/MM/yyyy HH:mm") DdlConfigAuto.Items.Clear() DdlUnidadCamion.Items.Clear() @@ -35110,7 +34806,7 @@ Partial Class Ventas #End Region Protected Sub BtnGenerarPoliza_Click(sender As Object, e As EventArgs) - CreaObjetosVenta() + 'CreaObjetosVenta() 'If UsuarioActual.Empresa.TipoContabilidad = 2 Then @@ -35440,7 +35136,7 @@ Partial Class Ventas Me.CveCategoriaLineaAdicional = 0 If CveVenta <= 0 Then - TxtFechaPago.Text = Now.AddDays(PlazoCobranza).ToString("dd/MM/yyyy") + TxtFechaPago.Text = NowADS().AddDays(PlazoCobranza).ToString("dd/MM/yyyy") TxtOrdenCompra.Text = "" 'SI SE HABILITO LA FACTURACION DESDE LA LINEA ADICIONAL DEBE QUITARLO @@ -35638,7 +35334,7 @@ Partial Class Ventas #End Region Protected Sub BtnFiltrarAF_Click(sender As Object, e As EventArgs) Using ObjAF As New ClsAF - If ObjAF.GetRepActivosFijosDepreciacion(UsuarioActual.CveEmpresa, Now, Depreciados:=1, CveTipoAF:=DdlTipoActivoFiltro.SelectedValue.ToEntero(), CveSubTipoAF:=DdlSubTipoActivoFiltro.SelectedValue.ToEntero(), CveSubProyecto:=DdlSubProyectoFiltroAF.SelectedValue.ToEntero()) Then + If ObjAF.GetRepActivosFijosDepreciacion(UsuarioActual.CveEmpresa, NowADS(), Depreciados:=1, CveTipoAF:=DdlTipoActivoFiltro.SelectedValue.ToEntero(), CveSubTipoAF:=DdlSubTipoActivoFiltro.SelectedValue.ToEntero(), CveSubProyecto:=DdlSubProyectoFiltroAF.SelectedValue.ToEntero()) Then GvVentaAF.DataSource = ObjAF.DtResultados.FiltraParametros("CveActivoFijo > 0 AND CveEstadoActivoFijo <> 5") End If End Using diff --git a/ZDG/ActualizaPadron.aspx.vb b/ZDG/ActualizaPadron.aspx.vb index 6f1c7e066..c3f635ff1 100644 --- a/ZDG/ActualizaPadron.aspx.vb +++ b/ZDG/ActualizaPadron.aspx.vb @@ -179,7 +179,7 @@ Partial Class ZDG_ActualizaPadron 'ACTUALIZA BITACORA If Not ErrorActualizacion Then - If Not ObjDG.AddActualizacionPadron(NombreArchivo, RegistrosActualizados, DateTime.Now, UsuarioActual.Usuario) Then + If Not ObjDG.AddActualizacionPadron(NombreArchivo, RegistrosActualizados, NowADS(), UsuarioActual.Usuario) Then ErrorActualizacion = True End If End If diff --git a/ZDG/CapturaManual.aspx.vb b/ZDG/CapturaManual.aspx.vb index ee93a1959..256730052 100644 --- a/ZDG/CapturaManual.aspx.vb +++ b/ZDG/CapturaManual.aspx.vb @@ -35,7 +35,7 @@ Partial Class ZDG_CapturaManual Dim Dr = TempDT.NewRow Dr("Consecutivo") = TxtConsecutivo.Text.ToEntero - Dr("Hora") = DateTime.Now + Dr("Hora") = NowADS() Dr("Resultado") = False If ObjDG.RegistrarVoto(TxtConsecutivo.Text.ToEntero) Then diff --git a/ZDG/MensajeAutomatico.aspx.vb b/ZDG/MensajeAutomatico.aspx.vb index 5e0d5aae1..b9e2bd7d7 100644 --- a/ZDG/MensajeAutomatico.aspx.vb +++ b/ZDG/MensajeAutomatico.aspx.vb @@ -135,14 +135,14 @@ Partial Class ZDG_MensajeAutomatico 'MENSAJES A IPP - If ObjDG.EnviarMensajeWS("6313186706", String.Format("SE ENVIO SMS AUTOMATICO - Hora: {0}", Now.ToString("HH:mm:ss"))) Then - If ObjDG.MensajeAdd(2, "6313186706", String.Format("SE ENVIO SMS AUTOMATICO - Hora: {0}", Now.ToString("HH:mm:ss")), 100) Then + If ObjDG.EnviarMensajeWS("6313186706", String.Format("SE ENVIO SMS AUTOMATICO - Hora: {0}", NowADS().ToString("HH:mm:ss"))) Then + If ObjDG.MensajeAdd(2, "6313186706", String.Format("SE ENVIO SMS AUTOMATICO - Hora: {0}", NowADS().ToString("HH:mm:ss")), 100) Then End If End If 'MENSAJES A JA - If ObjDG.EnviarMensajeWS("6621317425", String.Format("SE ENVIO SMS AUTOMATICO - Hora: {0}", Now.ToString("HH:mm:ss"))) Then - If ObjDG.MensajeAdd(2, "6621317425", String.Format("SE ENVIO SMS AUTOMATICO - Hora: {0}", Now.ToString("HH:mm:ss")), 100) Then + If ObjDG.EnviarMensajeWS("6621317425", String.Format("SE ENVIO SMS AUTOMATICO - Hora: {0}", NowADS().ToString("HH:mm:ss"))) Then + If ObjDG.MensajeAdd(2, "6621317425", String.Format("SE ENVIO SMS AUTOMATICO - Hora: {0}", NowADS().ToString("HH:mm:ss")), 100) Then End If End If diff --git a/ZDG/MensajeManual.aspx.vb b/ZDG/MensajeManual.aspx.vb index 5ce988d2a..55c73007c 100644 --- a/ZDG/MensajeManual.aspx.vb +++ b/ZDG/MensajeManual.aspx.vb @@ -262,14 +262,14 @@ Partial Class ZDG_MensajeManual 'MENSAJES A IPP - If ObjDG.EnviarMensajeWS("6313186706", String.Format("SE ENVIO SMS MANUAL - Hora:{0}", Now.ToString("HH:mm:ss"))) Then - If ObjDG.MensajeAdd(1, "6313186706", String.Format("SE ENVIO SMS MANUAL - Hora:{0}", Now.ToString("HH:mm:ss")), UsuarioActual.CveUsuario) Then + If ObjDG.EnviarMensajeWS("6313186706", String.Format("SE ENVIO SMS MANUAL - Hora:{0}", NowADS().ToString("HH:mm:ss"))) Then + If ObjDG.MensajeAdd(1, "6313186706", String.Format("SE ENVIO SMS MANUAL - Hora:{0}", NowADS().ToString("HH:mm:ss")), UsuarioActual.CveUsuario) Then End If End If 'MENSAJES A JA - If ObjDG.EnviarMensajeWS("6621317425", String.Format("SE ENVIO SMS MANUAL - Hora: {0}", Now.ToString("HH:mm:ss"))) Then - If ObjDG.MensajeAdd(1, "6621317425", String.Format("SE ENVIO SMS MANUAL - Hora:{0}", Now.ToString("HH:mm:ss")), UsuarioActual.CveUsuario) Then + If ObjDG.EnviarMensajeWS("6621317425", String.Format("SE ENVIO SMS MANUAL - Hora: {0}", NowADS().ToString("HH:mm:ss"))) Then + If ObjDG.MensajeAdd(1, "6621317425", String.Format("SE ENVIO SMS MANUAL - Hora:{0}", NowADS().ToString("HH:mm:ss")), UsuarioActual.CveUsuario) Then End If End If diff --git a/ZDG/RepGeneral.aspx.vb b/ZDG/RepGeneral.aspx.vb index 62a1c3abd..871a880ca 100644 --- a/ZDG/RepGeneral.aspx.vb +++ b/ZDG/RepGeneral.aspx.vb @@ -48,7 +48,7 @@ Partial Class ZDG_RepGeneral Dim ObjDG As New ClsDG Dim Script = "" - LtActualizado.Text = String.Format("Actualizado: {0}", Now.ToString("HH:mm:ss tt")) + LtActualizado.Text = String.Format("Actualizado: {0}", NowADS().ToString("HH:mm:ss tt")) TimmerRefresh.Enabled = False TimmerRefresh.Enabled = True diff --git a/asmx/WSApp.asmx b/asmx/WSApp.asmx index b029887a0..b4a0bef07 100644 --- a/asmx/WSApp.asmx +++ b/asmx/WSApp.asmx @@ -358,7 +358,7 @@ Public Class WSApp End Try End Sub Private Sub EnviarCorreoFactura(Correo As String, Factura As Modelos.Factura, Retorno As Modelos.Factura.MMensajeFactura, DireccionEnvio As String, UsuarioActual As Usuario) - Dim Body = GeneraCorreoRemision(Retorno.CveVenta, Retorno.SerieFolio, Factura.Cliente.Nombre, Factura.Cliente.NombreComercial, DireccionEnvio, Factura.Observaciones, DateTime.Now) + Dim Body = GeneraCorreoRemision(Retorno.CveVenta, Retorno.SerieFolio, Factura.Cliente.Nombre, Factura.Cliente.NombreComercial, DireccionEnvio, Factura.Observaciones, ClsPaginas.NowADS()) Factura.Dispose() Try Dim Asunto As String = String.Format("SIG - Se ha realizado un pedido: {0}", Retorno.SerieFolio) @@ -591,15 +591,15 @@ Public Class WSApp Case 1 ObjFactura.TipoCambio = 1 Case 2 - ObjFactura.TipoCambio = ClsPaginas.GlobalTipoCambio(Now).ToDecimal + ObjFactura.TipoCambio = ClsPaginas.GlobalTipoCambio(ClsPaginas.NowADS()).ToDecimal Case Else - ObjFactura.TipoCambio = ClsPaginas.GlobalTipoCambio(Now).ToDecimal + ObjFactura.TipoCambio = ClsPaginas.GlobalTipoCambio(ClsPaginas.NowADS()).ToDecimal End Select ObjFactura.CveVendedor = -1 'VALIDA PROMOCIONES Y EXISTENCIAS Dim ObjVentas As New ClsVentas - If ObjVentas.GetPromocionesPS(-1, Now, CveSubProyecto, CveCliente, ObjFactura.CveVendedor, 1, UsuarioActual.CveEmpresa) Then + If ObjVentas.GetPromocionesPS(-1, ClsPaginas.NowADS(), CveSubProyecto, CveCliente, ObjFactura.CveVendedor, 1, UsuarioActual.CveEmpresa) Then ObjFactura.DtPromociones = ObjVentas.DtResultados End If ObjVentas.Dispose() @@ -618,12 +618,12 @@ Public Class WSApp ObjFactura.TipoDocto = "Rem" ObjFactura.RefDocto = "" 'ObjFactura.CveMesa = -1 - ObjFactura.Fecha = Now + ObjFactura.Fecha = ClsPaginas.NowADS() ObjFactura.CvePrePoliza = -1 - ObjFactura.FechaPago = Now + ObjFactura.FechaPago = ClsPaginas.NowADS() ObjFactura.MotivoDescuento = "" ObjFactura.Observaciones = Observaciones - ObjFactura.FechaEjecucion = Now + ObjFactura.FechaEjecucion = ClsPaginas.NowADS() ObjFactura.UsuarioCreo = UsuarioActual.Usuario ObjFactura.CveCondicionEntrega = -1 ObjFactura.CondicionEntrega = "" @@ -1568,8 +1568,8 @@ Namespace WebServiceAppModels2 Total = 0 IVA = 0 SubTotal = 0 - Fecha = DateTime.Now - FechaIng = DateTime.Now + Fecha = ClsPaginas.NowADS() + FechaIng = ClsPaginas.NowADS() End Sub Public Property IDTempVenta As Integer diff --git a/asmx/WSGPSApp.asmx b/asmx/WSGPSApp.asmx index 384e3af6b..b9c9aaa43 100644 --- a/asmx/WSGPSApp.asmx +++ b/asmx/WSGPSApp.asmx @@ -665,8 +665,8 @@ Public Class WSGPSApp Dim Estructura = New With { Key .[CveDispositivo] = -1, - Key .[FechaI] = DateTime.Now, - Key .[FechaF] = DateTime.Now, + Key .[FechaI] = ClsPaginas.NowADS(), + Key .[FechaF] = ClsPaginas.NowADS(), Key .[Ticks] = "" } Dim jsonParams As String = Decripta(params) @@ -719,8 +719,8 @@ Public Class WSGPSApp Dim Estructura = New With { Key .[CveDispositivo] = -1, - Key .[FechaI] = DateTime.Now, - Key .[FechaF] = DateTime.Now, + Key .[FechaI] = ClsPaginas.NowADS(), + Key .[FechaF] = ClsPaginas.NowADS(), Key .[Ticks] = "" } Dim jsonParams As String = Decripta(params) @@ -1004,8 +1004,8 @@ Public Class WSGPSApp Dim Estructura = New With { Key .[CveCliente] = -1, - Key .[FechaI] = DateTime.Now, - Key .[FechaF] = DateTime.Now, + Key .[FechaI] = ClsPaginas.NowADS(), + Key .[FechaF] = ClsPaginas.NowADS(), Key .[Ticks] = "" } Dim json As String = Decripta(encriptDatos) @@ -1245,7 +1245,7 @@ Public Class WSGPSApp dash.Panicos = ObjGPS.DtResultados(0)("BotonPanico").ToString.ToDouble dash.DesconexionBateria = ObjGPS.DtResultados(0)("DesconexionBateria").ToString.ToDouble End If - If ObjGPS.GetRalentiDashboard(CveCliente, FechaI.Add(Now.TimeOfDay).ToDateTime, FechaF.Add(Now.TimeOfDay).ToDateTime) AndAlso ObjGPS.DtResultados.Rows.Count > 0 Then + If ObjGPS.GetRalentiDashboard(CveCliente, FechaI.Add(ClsPaginas.NowADS().TimeOfDay).ToDateTime, FechaF.Add(ClsPaginas.NowADS().TimeOfDay).ToDateTime) AndAlso ObjGPS.DtResultados.Rows.Count > 0 Then dash.Ralenti = ObjGPS.DtResultados(0)("Ralenti").ToString.ToDouble End If If ObjGPS.GetUnidadesReportando(CveCliente) AndAlso ObjGPS.DtResultados.Rows.Count > 0 Then @@ -1347,7 +1347,7 @@ Public Class WSGPSApp Return serializer.Serialize(rows) End Function Private Function IsCurrentDate(StrFecha As String) As Boolean - Return True '(ReturnTimeOnServer(StrFecha) > (DateTime.Now).AddMinutes(-15) And ReturnTimeOnServer(StrFecha) < (DateTime.Now).AddMinutes(15)) + Return True '(ReturnTimeOnServer(StrFecha) > (ClsPaginas.NowADS()).AddMinutes(-15) And ReturnTimeOnServer(StrFecha) < (ClsPaginas.NowADS()).AddMinutes(15)) End Function Public Function ReturnTimeOnServer(clientString As String) As DateTime Dim format As String = "dd/MM/yyyy H:m:s zzz" diff --git a/asmx/WSSIGApp.asmx b/asmx/WSSIGApp.asmx index 34c0b988b..c2fa221e3 100644 --- a/asmx/WSSIGApp.asmx +++ b/asmx/WSSIGApp.asmx @@ -244,7 +244,7 @@ Public Class WSSIGApp Get If GlobalTipoCambio <= 0 Then 'sino tiene dato lo recargo por si ya esta insertado - If Fecha = MinFecha Then Fecha = Now + If Fecha = MinFecha Then Fecha = ClsPaginas.NowADS() Dim ObjGral As New ClsGenerales If ObjGral.GetTipoCambio(-1, Fecha) AndAlso ObjGral.DtResultados.Rows.Count > 0 Then @@ -660,7 +660,7 @@ Public Class WSSIGApp If dtVentas.Rows.Count > 0 Then If UsuarioActual.TienePermisoIndicador(7) Then Dim jdatosVentas = New JArray(From v In dtVentas - Where (v("Mes").ToString().ToEntero() <= Now.Month) + Where (v("Mes").ToString().ToEntero() <= ClsPaginas.NowADS().Month) Select New JObject( New JProperty("NombreMes", v("NombreMes").ToString()), New JProperty("Importe", v("Importe").ToString().ToDouble()))) @@ -675,7 +675,7 @@ Public Class WSSIGApp If dtBancos.Rows.Count > 0 Then If UsuarioActual.TienePermisoIndicador(8) Then Dim jDatosBancos = New JArray(From v In dtBancos - Where (v("Mes").ToString().ToEntero() <= Now.Month) + Where (v("Mes").ToString().ToEntero() <= ClsPaginas.NowADS().Month) Select New JObject( New JProperty("NombreMes", v("NombreMes").ToString()), New JProperty("Importe", v("Importe").ToString().ToDouble()))) @@ -1473,8 +1473,8 @@ Public Class WSSIGApp Ent = New WsFiltroEvento() Ent.CveEmpresa = 1 Ent.CveUsuario = 1360 - Ent.FechaI = Now.AddDays(-180) - Ent.FechaF = Now + Ent.FechaI = ClsPaginas.NowADS().AddDays(-180) + Ent.FechaF = ClsPaginas.NowADS() If Not IsNothing(Ent) Then Dim ObjOI As New ClsOIEventos If ObjOI.GetRepEventos(-1, 1, -1, "-1", "-1", -1, -1, -1, -1, -1, -1, "-1", -1, -1, -1, -1, -1, -1, -1, -1, -1, Ent.CveUsuario, Ent.CveEmpresa, Ent.FechaI, Ent.FechaF) Then @@ -1860,15 +1860,15 @@ Public Class WSSIGApp Case 1 ObjFactura.TipoCambio = 1 Case 2 - ObjFactura.TipoCambio = GlobalTipoCambio(Now).ToDecimal + ObjFactura.TipoCambio = GlobalTipoCambio(ClsPaginas.NowADS()).ToDecimal Case Else - ObjFactura.TipoCambio = GlobalTipoCambio(Now).ToDecimal + ObjFactura.TipoCambio = GlobalTipoCambio(ClsPaginas.NowADS()).ToDecimal End Select ObjFactura.CveVendedor = -1 'VALIDA PROMOCIONES Y EXISTENCIAS Dim ObjVentas As New ClsVentas - If ObjVentas.GetPromocionesPS(-1, Now, CveSubProyecto, CveCliente, ObjFactura.CveVendedor, 1, UsuarioActual.CveEmpresa) Then + If ObjVentas.GetPromocionesPS(-1, ClsPaginas.NowADS(), CveSubProyecto, CveCliente, ObjFactura.CveVendedor, 1, UsuarioActual.CveEmpresa) Then ObjFactura.DtPromociones = ObjVentas.DtResultados End If ObjVentas.Dispose() @@ -1895,12 +1895,12 @@ Public Class WSSIGApp ObjFactura.TipoDocto = TipoDocto ObjFactura.RefDocto = "" 'ObjFactura.CveMesa = -1 - ObjFactura.Fecha = Now + ObjFactura.Fecha = ClsPaginas.NowADS() ObjFactura.CvePrePoliza = -1 - ObjFactura.FechaPago = Now + ObjFactura.FechaPago = ClsPaginas.NowADS() ObjFactura.MotivoDescuento = "" ObjFactura.Observaciones = "" - ObjFactura.FechaEjecucion = Now + ObjFactura.FechaEjecucion = ClsPaginas.NowADS() ObjFactura.UsuarioCreo = UsuarioActual.Usuario ObjFactura.CveCondicionEntrega = -1 ObjFactura.CondicionEntrega = "" @@ -2415,7 +2415,7 @@ Public Class WSSIGApp UsaAC = False If UsaAC Then Dim AC As New ClsAC - Dim Ejercicio = DateTime.Now.Year + Dim Ejercicio = ClsPaginas.NowADS().Year If AC.GetPresupuestoEgresos(-1, True, Ejercicio, Ent.CveEmpresa, True) Then DtPresupuestos = AC.DtResultados.Copy End If @@ -2792,7 +2792,7 @@ Public Class WSSIGApp Key .Justificacion = "", Key .Prioridad = -1, Key .RequiereCotizacion = False, - Key .FechaEstimadaEntrega = DateTime.Now, + Key .FechaEstimadaEntrega = ClsPaginas.NowADS(), Key .LugarEntrega = "", Key .CveMoneda = -1, Key .CveProveedor = -1, @@ -3057,10 +3057,10 @@ Public Class WSSIGApp 'verifico los permisos según el estatus 'Const Sitio As String = "rm:90/" - Dim StrSupervisa As String = "" '= String.Format("http://{0}/OC/RegOp.aspx?p={1}", Sitio, Encripta(String.Format("Op=SUPERVISAR&Oc={0}&CveUsuario={1}&Fecha={2}", CveOrdenCompra, CveUsuario, Now))) - Dim StrAutoriza As String = "" '= String.Format("http://{0}/OC/RegOp.aspx?p={1}", Sitio, Encripta(String.Format("Op=AUTORIZAR&Oc={0}&CveUsuario={1}&Fecha={2}", CveOrdenCompra, CveUsuario, Now))) - Dim StrCancela As String = "" ' = String.Format("http://{0}/OC/RegOp.aspx?p={1}", Sitio, Encripta(String.Format("Op=CANCELAR&Oc={0}&CveUsuario={1}&Fecha={2}", CveOrdenCompra, UsuarioActual.CveUsuario, Now))) - Dim StrReqCotiza As String = "" '= String.Format("http://{0}/OC/RegOp.aspx?p={1}", Sitio, Encripta(String.Format("Op=REQCONTIZACION&Oc={0}&CveUsuario={1}&Fecha={2}", CveOrdenCompra, CveUsuario, Now))) + Dim StrSupervisa As String = "" '= String.Format("http://{0}/OC/RegOp.aspx?p={1}", Sitio, Encripta(String.Format("Op=SUPERVISAR&Oc={0}&CveUsuario={1}&Fecha={2}", CveOrdenCompra, CveUsuario, ClsPaginas.NowADS()))) + Dim StrAutoriza As String = "" '= String.Format("http://{0}/OC/RegOp.aspx?p={1}", Sitio, Encripta(String.Format("Op=AUTORIZAR&Oc={0}&CveUsuario={1}&Fecha={2}", CveOrdenCompra, CveUsuario, ClsPaginas.NowADS()))) + Dim StrCancela As String = "" ' = String.Format("http://{0}/OC/RegOp.aspx?p={1}", Sitio, Encripta(String.Format("Op=CANCELAR&Oc={0}&CveUsuario={1}&Fecha={2}", CveOrdenCompra, UsuarioActual.CveUsuario, ClsPaginas.NowADS()))) + Dim StrReqCotiza As String = "" '= String.Format("http://{0}/OC/RegOp.aspx?p={1}", Sitio, Encripta(String.Format("Op=REQCONTIZACION&Oc={0}&CveUsuario={1}&Fecha={2}", CveOrdenCompra, CveUsuario, ClsPaginas.NowADS()))) 'si se acaba de solicitar y se necesita supervisar If pCveEstatus = 1 Then strOpciones.AppendFormat(" Supervisar ", StrSupervisa) @@ -3358,7 +3358,7 @@ Public Class WSSIGApp #Region "F U N C I O N E S" Private Function notcurrentdate(fecha As DateTime) As Boolean - Return Not (fecha > (DateTime.Now).AddMinutes(-15) And fecha < (DateTime.Now).AddMinutes(15)) + Return Not (fecha > (ClsPaginas.NowADS()).AddMinutes(-15) And fecha < (ClsPaginas.NowADS()).AddMinutes(15)) End Function Private Function ValorXML(n As System.Xml.XmlNode, Campo As String, Optional Retorno As String = "") As String Dim o As System.Xml.XmlNode = n.Attributes.Cast(Of System.Xml.XmlAttribute)().SingleOrDefault(Function(a) String.Compare(a.Name, Campo, True) = 0) @@ -3370,7 +3370,7 @@ Public Class WSSIGApp End Function Private Function IsCurrentDate(StrFecha As String) As Boolean 'Dim FechaServer As DateTime = ReturnTimeOnServer(StrFecha) - 'Return (FechaServer > (DateTime.Now).AddMinutes(-15) And FechaServer < (DateTime.Now).AddMinutes(15)) + 'Return (FechaServer > (ClsPaginas.NowADS()).AddMinutes(-15) And FechaServer < (ClsPaginas.NowADS()).AddMinutes(15)) Return True End Function Public Function ReturnTimeOnServer(clientString As String) As DateTime @@ -3395,7 +3395,7 @@ Public Class WSSIGApp Public Function GetTipoCambio() As String Dim Retorno = "[]" Dim ObjTC As New ClsGenerales - If ObjTC.GetTipoCambio(-1, DateTime.Now) Then + If ObjTC.GetTipoCambio(-1, ClsPaginas.NowADS()) Then Retorno = JsonConvert.SerializeObject(ObjTC.DtResultados.Rows(0).DataRowToObject(Of WsTipoCambio)) End If ObjTC.Dispose() @@ -3484,7 +3484,7 @@ Public Class WSSIGApp }, .Respuestas = CreateListFromSingle(New With {.IDTempCveEmpresaCRM = -1, .CveEmpresaCRM = -1, .CveEncuesta = -1, .CveEncuestaAplicadaDetalle = -1, .CveEmpresa = -1, .CveUsuario = -1, .CvePregunta = -1, .CveRespuesta = -1, .Valor = ""}), .Contactos = CreateListFromSingle(New With {.IDTempCveEmpresaCRM = -1, .CveContacto = -1, .Nombre = "", .TelefonoOficina = "", .Celular = "", .Correo = "", .CveUsuarioIng = -1, .CveEmpresaCRM = -1}), - .Acercamientos = CreateListFromSingle(New With {.IDTemp = -1, .CveAcercamiento = -1, .CveEmpresaCRM = -1, .CveContactoPrincipal = -1, .CveTipoProceso = -1, .CveEtapaProcesoActual = -1, .CveVendedor = -1, .CveMedioCaptacion = -1, .CveRechazoMotivo = -1, .CveProbabilidadAcercamiento = -1, .FechaApertura = Now, .NombreAcercamiento = "", .Descripcion = "", .Importe = 0D, .Comision = 0D, .Prioridad = -1, .CveEmpresa = -1, .CveUsuarioIng = -1, .CveUsuarioMod = -1, .FechaCierre = Now, .CveEncuestaAplicadaProceso = -1}), + .Acercamientos = CreateListFromSingle(New With {.IDTemp = -1, .CveAcercamiento = -1, .CveEmpresaCRM = -1, .CveContactoPrincipal = -1, .CveTipoProceso = -1, .CveEtapaProcesoActual = -1, .CveVendedor = -1, .CveMedioCaptacion = -1, .CveRechazoMotivo = -1, .CveProbabilidadAcercamiento = -1, .FechaApertura = ClsPaginas.NowADS(), .NombreAcercamiento = "", .Descripcion = "", .Importe = 0D, .Comision = 0D, .Prioridad = -1, .CveEmpresa = -1, .CveUsuarioIng = -1, .CveUsuarioMod = -1, .FechaCierre = ClsPaginas.NowADS(), .CveEncuestaAplicadaProceso = -1}), .BitacorasAcercamientos = CreateListFromSingle(New With {.IDTempCveAcercamiento = -1, .CveEvento = -1, .Descripcion = "", .CveTipoProcesoCRM = -1, .CveEmpresa = -1, .CveUsuarioIng = -1, .CveAcercamiento = -1, .CveEtapaProcesoCRM = -1}) } Dim ObjCRM As New ClsCRM @@ -3680,7 +3680,7 @@ Public Class WSSIGApp Public Function SyncAcercamiento(params As String) As Boolean Dim TieneError As Boolean = False - Dim Estructura = CreateListFromSingle(New With {.CveAcercamiento = -1, .CveEmpresaCRM = -1, .CveContactoPrincipal = -1, .CveTipoProceso = -1, .CveEtapaProcesoActual = -1, .CveVendedor = -1, .CveMedioCaptacion = -1, .CveRechazoMotivo = -1, .CveProbabilidadAcercamiento = -1, .FechaApertura = Now, .NombreAcercamiento = "", .Descripcion = "", .Importe = 0D, .Comision = 0D, .Prioridad = -1, .CveEmpresa = -1, .CveUsuarioIng = -1, .CveUsuarioMod = -1, .FechaCierre = Now, .CveEncuestaAplicadaProceso = -1}) + Dim Estructura = CreateListFromSingle(New With {.CveAcercamiento = -1, .CveEmpresaCRM = -1, .CveContactoPrincipal = -1, .CveTipoProceso = -1, .CveEtapaProcesoActual = -1, .CveVendedor = -1, .CveMedioCaptacion = -1, .CveRechazoMotivo = -1, .CveProbabilidadAcercamiento = -1, .FechaApertura = ClsPaginas.NowADS(), .NombreAcercamiento = "", .Descripcion = "", .Importe = 0D, .Comision = 0D, .Prioridad = -1, .CveEmpresa = -1, .CveUsuarioIng = -1, .CveUsuarioMod = -1, .FechaCierre = ClsPaginas.NowADS(), .CveEncuestaAplicadaProceso = -1}) Dim ObjCRM As New ClsCRM Try Dim JsonRequest = Decripta(params) @@ -3689,7 +3689,7 @@ Public Class WSSIGApp If item.CveAcercamiento > 0 Then TieneError = Not ObjCRM.UpdateAcercamiento(item.CveAcercamiento, item.CveContactoPrincipal, item.CveTipoProceso, item.CveEtapaProcesoActual, item.CveVendedor, item.CveMedioCaptacion, item.CveProbabilidadAcercamiento, item.NombreAcercamiento, item.Descripcion, item.Importe, item.Comision, item.Prioridad, item.CveUsuarioMod, item.CveRechazoMotivo, item.CveEncuestaAplicadaProceso, item.FechaApertura, item.FechaCierre) Else - Dim i As Integer = ObjCRM.AddAcercamiento(item.CveEmpresaCRM, item.CveContactoPrincipal, item.CveTipoProceso, item.CveEtapaProcesoActual, item.CveVendedor, item.CveMedioCaptacion, item.CveRechazoMotivo, item.CveProbabilidadAcercamiento, item.FechaApertura, item.NombreAcercamiento, item.Descripcion, item.Importe, item.Comision, item.Prioridad, item.CveEmpresa, item.CveUsuarioIng, Now) + Dim i As Integer = ObjCRM.AddAcercamiento(item.CveEmpresaCRM, item.CveContactoPrincipal, item.CveTipoProceso, item.CveEtapaProcesoActual, item.CveVendedor, item.CveMedioCaptacion, item.CveRechazoMotivo, item.CveProbabilidadAcercamiento, item.FechaApertura, item.NombreAcercamiento, item.Descripcion, item.Importe, item.Comision, item.Prioridad, item.CveEmpresa, item.CveUsuarioIng, ClsPaginas.NowADS()) If i <= 0 Then TieneError = True End If If TieneError Then @@ -4023,7 +4023,7 @@ Public Class WSSIGApp If Not cevent.recurrenciatipo > 0 Then 'AGREGAMOS CUANDO NO ES RECURRENTE - Dim tFecha As DateTime = DateAdd(DateInterval.Month, -6, Date.Now) + Dim tFecha As DateTime = DateAdd(DateInterval.Month, -6, ClsPaginas.NowADS()) 'SI LA FECHA DEL EVENTO ES MENOR DE 6 MESES DE LA FECHA ACTUAL NO LO AGREGA If dr("FechaFin").ToString.ToDateTime > tFecha Or dr("FechaInicio").ToString.ToDateTime > tFecha Then Events.Add(cevent) @@ -4102,7 +4102,7 @@ Public Class WSSIGApp End If 'SI LA FECHA DEL EVENTO ES MENOR DE 6 MESES DE LA FECHA ACTUAL Y/0 SI LA FECHA INICIAL DE LA RECURRENCIA ES MENOR A LA FECHA QUE SE CREO EL EVENTO NO LO AGREGA - If FIT > DateAdd(DateInterval.Month, -6, Date.Now) And FIT >= dr("FechaInicio").ToString.ToDateTime Then + If FIT > DateAdd(DateInterval.Month, -6, ClsPaginas.NowADS()) And FIT >= dr("FechaInicio").ToString.ToDateTime Then Events.Add(cevent) End If Next @@ -4139,7 +4139,7 @@ Public Class WSSIGApp End If 'SI LA FECHA DEL EVENTO ES MENOR DE 6 MESES DE LA FECHA ACTUAL NO LO AGREGA - If FI > DateAdd(DateInterval.Month, -6, Date.Now) Then + If FI > DateAdd(DateInterval.Month, -6, ClsPaginas.NowADS()) Then Events.Add(cevent) End If End If @@ -4271,7 +4271,7 @@ Public Class WSSIGApp sb.Append($" ({CveUsuario}") sb.Append($" ,CAST('{Fecha.ToString("yyyy-MM-dd HH:mm:ss")}' AS DATETIME) ") sb.Append($" ,geography::STPointFromText('{$"POINT({Longitud} {Latitud})"}',4326)") - sb.Append($" ,CAST('{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}' AS DATETIME))") + sb.Append($" ,CAST('{ClsPaginas.NowADS().ToString("yyyy-MM-dd HH:mm:ss")}' AS DATETIME))") Using ObjInventarios As New ClsInventarios retorno = ObjInventarios.GetQuery(sb.ToString) @@ -4777,8 +4777,8 @@ Namespace WebServiceAppModels Total = 0 IVA = 0 SubTotal = 0 - Fecha = DateTime.Now - FechaIng = DateTime.Now + Fecha = ClsPaginas.NowADS() + FechaIng = ClsPaginas.NowADS() End Sub Public Property IDTempVenta As Integer diff --git a/asmx/WS_PuntoVenta.asmx b/asmx/WS_PuntoVenta.asmx index 9978cf5c5..ce80827b3 100644 --- a/asmx/WS_PuntoVenta.asmx +++ b/asmx/WS_PuntoVenta.asmx @@ -851,7 +851,7 @@ Public Class WS_PuntoVenta If objVentas.AddVenta(objVenta.TipoDocto, objVenta.FolioFact, objVenta.CveCliente, objVenta.CveClienteSucursal, objVenta.SubTotal, objVenta.Descuento, objVenta.Amortizacion, objVenta.IVA, objVenta.RetIVA, objVenta.RetISR, objVenta.Total, objVenta.CveMoneda, objVenta.TipoCambio, objVenta.CveMetodoPago, objVenta.CondicionesPago, - objVenta.FormaPago, Now, objVenta.Fecha, objVenta.MotivoDescuento, objVenta.Observaciones, objVenta.FechaEjecucion, + objVenta.FormaPago, ClsPaginas.NowADS(), objVenta.Fecha, objVenta.MotivoDescuento, objVenta.Observaciones, objVenta.FechaEjecucion, objVenta.CveVendedor, If(objVenta.Alfa1 IsNot Nothing, objVenta.Alfa1, ""), If(objVenta.Alfa2 IsNot Nothing, objVenta.Alfa2, ""), If(objVenta.Alfa3 IsNot Nothing, objVenta.Alfa3, ""), objVenta.Num1, objVenta.Num2, objVenta.Num3, Fech1, Fech2, Fech3, objVenta.CveCorte, If(objVenta.NumeroPersonas > 255, 255, objVenta.NumeroPersonas), CvePrePoliza, objVenta.CveUsuario, objVenta.CveEmpresa, objVenta.Propina, objVenta.CveVentaTerminal, CveSubProyecto:=objVenta.CveSubProyecto, CveSubProyectoEjecucion:=objVenta.CveSubProyecto) Then objVenta.CveVenta = objVentas.CveVenta