Empresas Zona Horaria

This commit is contained in:
rakcsle
2023-10-09 11:54:42 -07:00
parent 2df7c3976c
commit f43b7759a8
649 changed files with 11445 additions and 11105 deletions

View File

@@ -479,7 +479,7 @@ Partial Class AC_PresupuestoEgresos
Dim Total As Double = GvDatos.Rows.Cast(Of GridViewRow)().Sum(Function(gvr) gvr.DataKey("Total").ToDouble) 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 If IDPoliza > 0 Then
For Each gvr As GridViewRow In GvDatos.Rows 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) 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 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 '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 TieneError = True
Exit For Exit For
End If End If

View File

@@ -504,15 +504,15 @@ Partial Class AC_RegComprometido
Conta.IniciaTransacSQL() Conta.IniciaTransacSQL()
Dim Total As Double = LbTotalPagar.Text.ToDouble 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 If IDPoliza > 0 Then
For Each dr As DataRow In DtDetallePagar.Rows For Each dr As DataRow In DtDetallePagar.Rows
Dim Importe = dr("Importe").ToString.ToDouble Dim Importe = dr("Importe").ToString.ToDouble
'Devengado 'Devengado
If Conta.AddMovimiento(IDPoliza, dr("IdCuentaComprometido").ToString.ToEntero, True, 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}", Now.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 TieneError = True
Exit For Exit For
End If End If
@@ -522,8 +522,8 @@ Partial Class AC_RegComprometido
End If End If
'Ejercido 'Ejercido
If Conta.AddMovimiento(IDPoliza, dr("IdCuentaDevengado").ToString.ToEntero, True, 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, Now, "") Then If Not Conta.AddMovimiento(IDPoliza, dr("IdCuentaEjercido").ToString.ToEntero, False, Importe, "", "", 0, NowADS(), "") Then
TieneError = True TieneError = True
Exit For Exit For
End If End If
@@ -533,8 +533,8 @@ Partial Class AC_RegComprometido
End If End If
'Pagado 'Pagado
If Conta.AddMovimiento(IDPoliza, dr("IdCuentaEjercido").ToString.ToEntero, True, 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, Now, "") Then If Not Conta.AddMovimiento(IDPoliza, dr("IdCuentaPagado").ToString.ToEntero, False, Importe, "", "", 0, NowADS(), "") Then
TieneError = True TieneError = True
Exit For Exit For
End If End If

View File

@@ -91,8 +91,8 @@ Partial Class AC_RegDevengadoIngresos
Dim dr As DataRow = DtPresupuestos.FiltroPrimero(String.Format("CvePresupuestoIngreso = {0}", CboPresupuesto.SelectedValue)) Dim dr As DataRow = DtPresupuestos.FiltroPrimero(String.Format("CvePresupuestoIngreso = {0}", CboPresupuesto.SelectedValue))
If dr IsNot Nothing Then 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("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, Now, "") Then If ObjContaAC.AddMovimiento(IDPoliza, dr("IdCuentaPorEjecutar").ToString.ToEntero, True, TotalDevengar, "", CboPresupuesto.SelectedItem.Text, 0, NowADS(), "") Then
'AFECTAR MATRIZ INGRESOS 'AFECTAR MATRIZ INGRESOS
Dim RegistroMatriz As DataRow = GlobalDTAC_MatrizIngresos.FiltroPrimero(String.Format("CodigoRubroIngreso = {0} ", dr("CodigoRubroIngreso").ToString)) Dim RegistroMatriz As DataRow = GlobalDTAC_MatrizIngresos.FiltroPrimero(String.Format("CodigoRubroIngreso = {0} ", dr("CodigoRubroIngreso").ToString))
@@ -103,9 +103,9 @@ Partial Class AC_RegDevengadoIngresos
End If End If
Dim CuentaCargo As Integer = DtCuentas.FiltraParametros(String.Format("Codigo = '{0}'", RegistroMatriz("CuentaCargo").ToString)).Rows(0)("Id").ToString.ToEntero 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 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 '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 ErrorAC = True
End If End If
Else Else
@@ -168,13 +168,13 @@ Partial Class AC_RegDevengadoIngresos
If dr IsNot Nothing Then If dr IsNot Nothing Then
'registro movimiento a la cuenta 814 '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 '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 '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 '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 ErrorAC = True
End If End If
Else Else

View File

@@ -48,7 +48,7 @@ Partial Class AC_RegPEAmpRed
CreaDTDetalles() CreaDTDetalles()
CargaPresupuestos() CargaPresupuestos()
CargaCombosPE() CargaCombosPE()
TxtFecha.Text = Now.ToShortDateString TxtFecha.Text = NowADS().ToShortDateString
End If End If
End Sub End Sub
Private Sub CargaPresupuestos() Private Sub CargaPresupuestos()

View File

@@ -60,7 +60,7 @@ Partial Class AC_RegIngresosModificaciones
CreaDTDetalles() CreaDTDetalles()
CargaPresupuestos() CargaPresupuestos()
TxtFecha.Text = Now.ToShortDateString TxtFecha.Text = NowADS().ToShortDateString
LtEjercicio.Text = UsuarioActual.Empresa.EjercicioActual.ToString LtEjercicio.Text = UsuarioActual.Empresa.EjercicioActual.ToString
@@ -128,7 +128,7 @@ Partial Class AC_RegIngresosModificaciones
Dim ampliacion As Double Dim ampliacion As Double
Dim reduccion As Double Dim reduccion As Double
Conta.IniciaTransacSQL() Conta.IniciaTransacSQL()
Dim Fecha As Date = Now Dim Fecha As Date = NowADS()
If Accion = 0 Then If Accion = 0 Then
For Each gvr As GridViewRow In GvD.Rows For Each gvr As GridViewRow In GvD.Rows

View File

@@ -47,7 +47,7 @@ Partial Class AC_RegNomina
'Else 'Else
' LbTitulo.Text = "Comprometido Otros" ' LbTitulo.Text = "Comprometido Otros"
'End If 'End If
TxtFecha.Text = Now.ToShortDateString TxtFecha.Text = NowADS().ToShortDateString
CargaPresupuestos() CargaPresupuestos()
CargaMeta() CargaMeta()

View File

@@ -41,7 +41,7 @@ Partial Class AC_RepAnaliticoDeudaPublica
TxtFechaInicio.Text = String.Format("01/01/{0}", UsuarioActual.Empresa.EjercicioActual) TxtFechaInicio.Text = String.Format("01/01/{0}", UsuarioActual.Empresa.EjercicioActual)
CalendarioInicio.StartDate = TxtFechaInicio.Text.ToDate 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 CalendarioFin.EndDate = String.Format("31/12/{0}", UsuarioActual.Empresa.EjercicioActual).ToDate
CargaDatos() CargaDatos()
@@ -198,7 +198,7 @@ Partial Class AC_RepAnaliticoDeudaPublica
'End Sub 'End Sub
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click 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 If Not IsNothing(DtDatos) Then
ImprimirReporte("Excel") 'Descarga reporte en Excel ImprimirReporte("Excel") 'Descarga reporte en Excel
Else Else

View File

@@ -126,8 +126,8 @@ Partial Class AC_RepCambiosSituacionFinanciera
If Not Page.IsPostBack Then If Not Page.IsPostBack Then
If UsuarioActual.Empresa.UsaAC Then If UsuarioActual.Empresa.UsaAC Then
'TxtFechaDel.Text = DateSerial(Year(Now), Month(Now), 1).ToShortDateString 'TxtFechaDel.Text = DateSerial(Year(NowADS()), Month(NowADS()), 1).ToShortDateString
'TxtFechaAl.Text = Date.Now.ToShortDateString 'TxtFechaAl.Text = NowADS().ToShortDateString
CargaDatos() CargaDatos()

View File

@@ -93,8 +93,8 @@ Partial Class AC_RepEstadoActividades
TotalActual = 0 TotalActual = 0
TotalAnterior = 0 TotalAnterior = 0
'TxtFechaInicio.Text = DateSerial(Year(Date.Now), 1, 1).ToShortDateString 'TxtFechaInicio.Text = DateSerial(Year(NowADS()), 1, 1).ToShortDateString
'TxtFechaFin.Text = Date.Now.ToShortDateString 'TxtFechaFin.Text = NowADS().ToShortDateString
CargaEjercicios() CargaEjercicios()
CargaDatos() CargaDatos()
@@ -113,7 +113,7 @@ Partial Class AC_RepEstadoActividades
DdlEjercicio.DataBind() DdlEjercicio.DataBind()
DdlEjercicio.SelectedValueExist(UsuarioActual.Empresa.EjercicioActual.ToString) DdlEjercicio.SelectedValueExist(UsuarioActual.Empresa.EjercicioActual.ToString)
DdlPeriodo.SelectedValue = Now.Month.ToString DdlPeriodo.SelectedValue = NowADS().Month.ToString
End Sub End Sub
Private Sub CargaDatos() Private Sub CargaDatos()

View File

@@ -100,7 +100,7 @@ Partial Class AC_RepEstadoAnaliticoActivo
End Sub End Sub
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click 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 ImprimirReporte("Excel") 'Descarga reporte en Excel
End Sub End Sub

View File

@@ -53,8 +53,8 @@ Partial Class AC_RepFlujoEfectivo
If Not Page.IsPostBack Then If Not Page.IsPostBack Then
If UsuarioActual.Empresa.UsaAC Then If UsuarioActual.Empresa.UsaAC Then
TxtFechaDel.Text = DateSerial(Year(Now), Month(Now), 1).ToShortDateString TxtFechaDel.Text = DateSerial(Year(NowADS()), Month(NowADS()), 1).ToShortDateString
TxtFechaAl.Text = Date.Now.ToShortDateString TxtFechaAl.Text = NowADS().ToShortDateString
CargaDatos() CargaDatos()
@@ -70,8 +70,8 @@ Partial Class AC_RepFlujoEfectivo
Private Sub CargaDatos() Private Sub CargaDatos()
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
Dim FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate) Dim FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate)
Dim FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate) Dim FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate)
FechaAl = TxtFechaAl.Text FechaAl = TxtFechaAl.Text
If ObjConta.GetFlujoEfectivo(FechaInicio, FechaFin, DdlUnidad.SelectedValue.ToEntero) Then If ObjConta.GetFlujoEfectivo(FechaInicio, FechaFin, DdlUnidad.SelectedValue.ToEntero) Then
DtDatos = ObjConta.DtResultados DtDatos = ObjConta.DtResultados
@@ -220,7 +220,7 @@ Partial Class AC_RepFlujoEfectivo
'End Sub 'End Sub
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click 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 If Not IsNothing(DtDatos) Then
ImprimirReporte("Excel") ImprimirReporte("Excel")
Else Else

View File

@@ -20,7 +20,7 @@ Partial Class AC_RepIngresos
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not Page.IsPostBack Then If Not Page.IsPostBack Then
TxtFechaCorte.Text = Date.Now.ToShortDateString TxtFechaCorte.Text = NowADS().ToShortDateString
CargaDatos() CargaDatos()
End If End If

View File

@@ -30,7 +30,7 @@ Partial Class AC_RepPresupuestoEgresos
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not Page.IsPostBack Then If Not Page.IsPostBack Then
txtFechaF.Text = Now.ToShortDateString txtFechaF.Text = NowADS().ToShortDateString
CargaCombos() CargaCombos()
End If End If
End Sub End Sub
@@ -82,10 +82,10 @@ Partial Class AC_RepPresupuestoEgresos
UPFiltros.Update() UPFiltros.Update()
End Sub End Sub
Private Sub LimitaFechaCorte() Private Sub LimitaFechaCorte()
If DdlEjercicio.SelectedValue.ToEntero = Year(Now) Then If DdlEjercicio.SelectedValue.ToEntero = Year(NowADS()) Then
Calendario2.EndDate = Now Calendario2.EndDate = NowADS()
RVFechaFinal.MaximumValue = Now.ToShortDateString RVFechaFinal.MaximumValue = NowADS().ToShortDateString
txtFechaF.Text = Now.ToShortDateString txtFechaF.Text = NowADS().ToShortDateString
Else Else
Calendario2.EndDate = String.Format("31/12/{0}", DdlEjercicio.SelectedValue.ToEntero).ToDate Calendario2.EndDate = String.Format("31/12/{0}", DdlEjercicio.SelectedValue.ToEntero).ToDate
RVFechaFinal.MaximumValue = String.Format("31/12/{0}", DdlEjercicio.SelectedValue.ToEntero) 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("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 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("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("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("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" e.Row.FCHyperLink("HLPagado").CssClass = "Texto"
'End If 'End If
'End If 'End If

View File

@@ -112,8 +112,8 @@ Partial Class AC_RepPresupuestoEgresosDetalle
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png") 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("Img", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
params.Add(New ReportParameter("Fecha", Now.ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("Fecha", NowADS().ToString("dd/MM/yyyy")))
ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/RepPresupuestosEgresos.rdlc", DtDatos, params, $"Rep.PresupuestosEgresos - {Now.ToShortDateString}", Formato:=Formato) ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/RepPresupuestosEgresos.rdlc", DtDatos, params, $"Rep.PresupuestosEgresos - {NowADS().ToShortDateString}", Formato:=Formato)
End Sub End Sub
Private Sub HplDownPDF_Click(sender As Object, e As EventArgs) Handles HplDownPDF.Click Private Sub HplDownPDF_Click(sender As Object, e As EventArgs) Handles HplDownPDF.Click

View File

@@ -49,7 +49,7 @@ Partial Class AC_RepPresupuestoIngresos
End If End If
DdlEjercicio.DataBind() DdlEjercicio.DataBind()
DdlEjercicio.SelectedValue = UsuarioActual.Empresa.EjercicioActual.ToString DdlEjercicio.SelectedValue = UsuarioActual.Empresa.EjercicioActual.ToString
txtFechaF.Text = Now.ToShortDateString txtFechaF.Text = NowADS().ToShortDateString
CargaDatos() CargaDatos()
End If End If
End Sub End Sub
@@ -118,23 +118,23 @@ Partial Class AC_RepPresupuestoIngresos
'e.Row.FCHyperLink("HLRecaudado").Visible = False 'e.Row.FCHyperLink("HLRecaudado").Visible = False
Else 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("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("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("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("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("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("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("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("HLRecaudado").CssClass = "Texto"
End If End If

View File

@@ -153,8 +153,8 @@ Partial Class AC_SituacionFinanciera
TotalPasivoPatrimonioActual = 0 TotalPasivoPatrimonioActual = 0
TotalPasivoPatrimonioAnterior = 0 TotalPasivoPatrimonioAnterior = 0
'TxtFechaInicio.Text = DateSerial(Year(Date.Now), 1, 1).ToShortDateString 'TxtFechaInicio.Text = DateSerial(Year(NowADS()), 1, 1).ToShortDateString
'TxtFechaFin.Text = Date.Now.ToShortDateString 'TxtFechaFin.Text = NowADS().ToShortDateString
CargaEjercicios() CargaEjercicios()
@@ -175,7 +175,7 @@ Partial Class AC_SituacionFinanciera
DdlEjercicio.DataBind() DdlEjercicio.DataBind()
DdlEjercicio.SelectedValueExist(UsuarioActual.Empresa.EjercicioActual.ToString) DdlEjercicio.SelectedValueExist(UsuarioActual.Empresa.EjercicioActual.ToString)
DdlPeriodo.SelectedValue = Now.Month.ToString DdlPeriodo.SelectedValue = NowADS().Month.ToString
End Sub End Sub
Private Sub CargaDatos() Private Sub CargaDatos()

View File

@@ -71,8 +71,8 @@ Partial Class AC_RepVariacionHaciendaPublica
If Not Page.IsPostBack Then If Not Page.IsPostBack Then
If UsuarioActual.Empresa.UsaAC Then If UsuarioActual.Empresa.UsaAC Then
TxtFechaDel.Text = DateSerial(Year(Now), Month(Now), 1).ToShortDateString TxtFechaDel.Text = DateSerial(Year(NowADS()), Month(NowADS()), 1).ToShortDateString
TxtFechaAl.Text = Date.Now.ToShortDateString TxtFechaAl.Text = NowADS().ToShortDateString
CargaDatos() CargaDatos()
@@ -88,8 +88,8 @@ Partial Class AC_RepVariacionHaciendaPublica
Private Sub CargaDatos() Private Sub CargaDatos()
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
Dim FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate) Dim FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate)
Dim FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate) Dim FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate)
FechaDel = TxtFechaDel.Text FechaDel = TxtFechaDel.Text
FechaAl = TxtFechaAl.Text FechaAl = TxtFechaAl.Text
@@ -366,7 +366,7 @@ Partial Class AC_RepVariacionHaciendaPublica
'End Sub 'End Sub
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click 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 If Not IsNothing(DtDatos) Then
ImprimirReporte("Excel") 'Descarga reporte en Excel ImprimirReporte("Excel") 'Descarga reporte en Excel
Else Else

View File

@@ -402,7 +402,7 @@ Partial Class AF_AF
'Configuración de Modalidad Insert 'Configuración de Modalidad Insert
ImgAddObs.Visible = False ImgAddObs.Visible = False
LblFechaCaptura.Text = Now.ToShortDateString() LblFechaCaptura.Text = NowADS().ToShortDateString()
LblUsuarioCapturo.Text = UsuarioActual.Usuario LblUsuarioCapturo.Text = UsuarioActual.Usuario
BtnEliminar.Visible = False BtnEliminar.Visible = False
@@ -484,17 +484,17 @@ Partial Class AF_AF
GVOrdenesdeServicio.DataBind() GVOrdenesdeServicio.DataBind()
End Sub End Sub
Private Sub CargaFechaGPS() Private Sub CargaFechaGPS()
TxtFechaIH.Text = $"01/{DateTime.Now.ToString("MM")}/{DateTime.Now.Year} 00:00" TxtFechaIH.Text = $"01/{NowADS().ToString("MM")}/{NowADS().Year} 00:00"
TxtFechaFH.Text = $"{DateTime.Now.ToString("dd/MM/yyyy")} 23:59" TxtFechaFH.Text = $"{NowADS().ToString("dd/MM/yyyy")} 23:59"
TxtFechaIC.Text = $"01/{DateTime.Now.ToString("MM")}/{DateTime.Now.Year} 00:00" TxtFechaIC.Text = $"01/{NowADS().ToString("MM")}/{NowADS().Year} 00:00"
TxtFechaFC.Text = $"{DateTime.Now.ToString("dd/MM/yyyy")} 23:59" TxtFechaFC.Text = $"{NowADS().ToString("dd/MM/yyyy")} 23:59"
TxtFechaID.Text = $"01/{DateTime.Now.ToString("MM")}/{DateTime.Now.Year} 00:00" TxtFechaID.Text = $"01/{NowADS().ToString("MM")}/{NowADS().Year} 00:00"
TxtFechaFD.Text = $"{DateTime.Now.ToString("dd/MM/yyyy")} 23:59" TxtFechaFD.Text = $"{NowADS().ToString("dd/MM/yyyy")} 23:59"
TxtFechaIG.Text = $"01/{DateTime.Now.ToString("MM")}/{DateTime.Now.Year} 00:00" TxtFechaIG.Text = $"01/{NowADS().ToString("MM")}/{NowADS().Year} 00:00"
TxtFechaFG.Text = $"{DateTime.Now.ToString("dd/MM/yyyy")} 23:59" TxtFechaFG.Text = $"{NowADS().ToString("dd/MM/yyyy")} 23:59"
End Sub End Sub
Private Sub InicializaValores() Private Sub InicializaValores()
@@ -2380,7 +2380,7 @@ Partial Class AF_AF
Dim NewName As String Dim NewName As String
For Each FileItem As Archivo In FilesGral For Each FileItem As Archivo In FilesGral
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
NewName = DateTime.Now.Ticks.ToString NewName = NowADS().Ticks.ToString
Dim ObjActivosFijos As New ClsAF Dim ObjActivosFijos As New ClsAF
Try Try
FileMove = FileItem.filename FileMove = FileItem.filename
@@ -2477,7 +2477,7 @@ Partial Class AF_AF
If AFInvCvePS > 0 AndAlso AFInvCveAlmacen > 0 Then If AFInvCvePS > 0 AndAlso AFInvCveAlmacen > 0 Then
Dim CveUMInv = GlobalDTPS(CveEmpresaActual, CvePS:=AFInvCvePS).FiltroPrimeroValor("CveUM").ToEntero Dim CveUMInv = GlobalDTPS(CveEmpresaActual, CvePS:=AFInvCvePS).FiltroPrimeroValor("CveUM").ToEntero
If CveUMInv > 0 Then 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 If Not ObjInventarios.AddMovimientoDetalle(CveMovimientoSalidaInv, 1, CveUMInv, AFInvCvePS, 0, -1, Serie:=AFInvSerie, CveSeccionAlmacen:=AFInvCveSeccionAlmacen) Then
ErrorGuardar = True ErrorGuardar = True
End If End If
@@ -2578,7 +2578,7 @@ Partial Class AF_AF
'PREPOLIZA DE IMPORTACION DESDE ALMACEN 'PREPOLIZA DE IMPORTACION DESDE ALMACEN
If AFInvCvePS > 0 AndAlso AFInvCveAlmacen > 0 Then If AFInvCvePS > 0 AndAlso AFInvCveAlmacen > 0 Then
If Not ErrorGuardar 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 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 ErrorGuardar Then
If Not ObjContabilidad.AddPrePolizasDetalle(CvePrePoliza, True, TxtValorCompra.Text.ToDecimal, TxtValorCompra.Text.ToDecimal, 68, TxtCodigo.Text.Trim, TxtCodigo.Text.Trim, CveMovimientoAlmacen:=CveMovimientoSalidaInv) 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 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 Dim Costo As Decimal = 0
If Inv_CveMetodoInventario = 5 Then If Inv_CveMetodoInventario = 5 Then
Costo = ObjInventario.GetCostoPSSerie(DdlAFInvPS.SelectedValue.ToEntero, AFInvSerie, DdlAFInvAlmacen.SelectedValue.ToEntero, CveEmpresaActual) Costo = ObjInventario.GetCostoPSSerie(DdlAFInvPS.SelectedValue.ToEntero, AFInvSerie, DdlAFInvAlmacen.SelectedValue.ToEntero, CveEmpresaActual)
Else 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 End If
ObjInventario.Dispose() ObjInventario.Dispose()
@@ -3557,7 +3557,7 @@ Partial Class AF_AF
TxtDescripcion.Text = DdlAFInvPS.SelectedText TxtDescripcion.Text = DdlAFInvPS.SelectedText
TxtValorCompra.Text = Costo.FormatoNumero TxtValorCompra.Text = Costo.FormatoNumero
TxtFechaCompra.Text = Now.ToShortDateString TxtFechaCompra.Text = NowADS().ToShortDateString
TxtFechaBaja.Text = "" TxtFechaBaja.Text = ""
TxtNoSerie.Text = TxtAFInvSerie.Text.Trim TxtNoSerie.Text = TxtAFInvSerie.Text.Trim

View File

@@ -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 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 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 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 If ObjAF.DtResultados.Rows.Count > 0 Then
DtActivosFijos = ObjAF.DtResultados DtActivosFijos = ObjAF.DtResultados
@@ -462,7 +462,7 @@ Partial Class AF_CatAF
Dim Ruta As String = "" Dim Ruta As String = ""
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) 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}", ""))) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))

View File

@@ -50,7 +50,7 @@ Partial Class AF_OrdenTrabajoAsignacion
CargaCombos() CargaCombos()
CargaDatos() CargaDatos()
Dim FechaActual As Date = Now Dim FechaActual As Date = NowADS()
'TxtFechaF.Text = $"{FechaActual.Day.ToString("00")}/{FechaActual.Month.ToString("00")}/{FechaActual.Year}" 'TxtFechaF.Text = $"{FechaActual.Day.ToString("00")}/{FechaActual.Month.ToString("00")}/{FechaActual.Year}"

View File

@@ -67,7 +67,7 @@ Partial Class AF_RegistroRevision
'CargaDatos() '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 If
End Sub End Sub
@@ -253,7 +253,7 @@ Partial Class AF_RegistroRevision
If Not ErrorProceso Then If Not ErrorProceso Then
ObjAF.Commit() 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 });") RegistraScript("$('#ModalDescargaReporte').modal({ backdrop: 'static', keyboard: false });")
GvDatos.DataSource = Nothing GvDatos.DataSource = Nothing
GvDatos.DataBind() GvDatos.DataBind()
@@ -390,7 +390,7 @@ Partial Class AF_RegistroRevision
worksheet.Rows(IndexEndTable + 1).Cells(0).Value = Usuario.Nombre worksheet.Rows(IndexEndTable + 1).Cells(0).Value = Usuario.Nombre
worksheet.Rows(IndexEndTable).Cells(2).Value = "Fecha Impresión" 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)) 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.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.BinaryWrite(ReporteBytes)
Response.End() Response.End()

View File

@@ -330,7 +330,7 @@ Partial Class AF_RepAF
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) 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}", ""))) 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) ImprimirPDF(String.Format("{0}Formatos\RepAF.rdlc", UsuarioActual.Empresa.Ruta), DtActivosFijos, params, "ReporteActivosFijos", Formato:=Formato)

View File

@@ -13,7 +13,7 @@ Partial Class AF_RepDepreciacion
#End Region #End Region
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then 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 If
End Sub End Sub

View File

@@ -50,7 +50,7 @@ Partial Class AF_RepOrdenTrabajo
CargaCombos() CargaCombos()
CargaDatos() CargaDatos()
Dim FechaActual As Date = Now Dim FechaActual As Date = NowADS()
'TxtFechaF.Text = $"{FechaActual.Day.ToString("00")}/{FechaActual.Month.ToString("00")}/{FechaActual.Year}" 'TxtFechaF.Text = $"{FechaActual.Day.ToString("00")}/{FechaActual.Month.ToString("00")}/{FechaActual.Year}"

View File

@@ -50,7 +50,7 @@ Partial Class AF_RepRevision
CargaCombos() CargaCombos()
CargaDatos() CargaDatos()
Dim FechaActual As Date = Now Dim FechaActual As Date = NowADS()
TxtFechaF.Text = $"{FechaActual.Day.ToString("00")}/{FechaActual.Month.ToString("00")}/{FechaActual.Year}" TxtFechaF.Text = $"{FechaActual.Day.ToString("00")}/{FechaActual.Month.ToString("00")}/{FechaActual.Year}"

View File

@@ -69,7 +69,7 @@ Partial Class AF_ResguardoAF
CveResguardoPadre = -1 CveResguardoPadre = -1
CargaDTResguardos() CargaDTResguardos()
'RESGUARDO 'RESGUARDO
TxtFecha.Text = Now.ToShortDateString TxtFecha.Text = NowADS().ToShortDateString
CargaAFResguardos() CargaAFResguardos()
DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa) DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa)
DdlSubProyecto.DataBind() DdlSubProyecto.DataBind()
@@ -85,7 +85,7 @@ Partial Class AF_ResguardoAF
'TRASPASO 'TRASPASO
TxtFechaT.Text = Now.ToShortDateString TxtFechaT.Text = NowADS().ToShortDateString
CargaAFResguardosTraslado() CargaAFResguardosTraslado()
DdlSubProyectoT.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa) DdlSubProyectoT.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa)
DdlSubProyectoT.DataBind() DdlSubProyectoT.DataBind()
@@ -110,7 +110,7 @@ Partial Class AF_ResguardoAF
DdlSubProyectoRTA.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa) DdlSubProyectoRTA.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa)
DdlSubProyectoRTA.DataBind() DdlSubProyectoRTA.DataBind()
DdlSubProyectoRTA.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlSubProyectoRTA.Items.Insert(0, New ListItem("Seleccione", "-1"))
TxtFechaR.Text = Now.ToShortDateString TxtFechaR.Text = NowADS().ToShortDateString
'LIBERACION 'LIBERACION
@@ -123,7 +123,7 @@ Partial Class AF_ResguardoAF
DdlSubProyectoL.DataBind() DdlSubProyectoL.DataBind()
DdlSubProyectoL.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlSubProyectoL.Items.Insert(0, New ListItem("Seleccione", "-1"))
TxtFechaRecepcion.Text = Now.ToShortDateString TxtFechaRecepcion.Text = NowADS().ToShortDateString
DdlPersonalR.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa).FiltraParametros("", "NombreCompleto") DdlPersonalR.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa).FiltraParametros("", "NombreCompleto")
@@ -253,7 +253,7 @@ Partial Class AF_ResguardoAF
TxtObservacionesR.Text = "" TxtObservacionesR.Text = ""
TxtObservacionesRecepcion.Text = "" TxtObservacionesRecepcion.Text = ""
TxtObservacionesT.Text = "" TxtObservacionesT.Text = ""
TxtFecha.Text = Now.ToShortDateString TxtFecha.Text = NowADS().ToShortDateString
End Sub End Sub
#End Region #End Region
@@ -331,7 +331,7 @@ Partial Class AF_ResguardoAF
DdlSubProyectoT.SelectedValue = "-1" DdlSubProyectoT.SelectedValue = "-1"
DdlResponsableT.SelectedValue = "-1" DdlResponsableT.SelectedValue = "-1"
TxtObservacionesT.Text = "" TxtObservacionesT.Text = ""
TxtFechaT.Text = Now.ToShortDateString TxtFechaT.Text = NowADS().ToShortDateString
UPTraslado.Update() UPTraslado.Update()
End Sub End Sub
#End Region #End Region
@@ -419,7 +419,7 @@ Partial Class AF_ResguardoAF
Private Sub LimpiaRT() Private Sub LimpiaRT()
GvAFTR.DataBind() GvAFTR.DataBind()
TxtObservacionesR.Text = "" TxtObservacionesR.Text = ""
TxtFechaR.Text = Now.ToShortDateString TxtFechaR.Text = NowADS().ToShortDateString
DdlPersonalRT.SelectedValue = "-1" DdlPersonalRT.SelectedValue = "-1"
TxtFolioT.Text = "" TxtFolioT.Text = ""
DdlSubProyectoRT.SelectedValue = "-1" DdlSubProyectoRT.SelectedValue = "-1"
@@ -507,7 +507,7 @@ Partial Class AF_ResguardoAF
Private Sub LimpiaRecepcion() Private Sub LimpiaRecepcion()
GvRecepcion.DataBind() GvRecepcion.DataBind()
TxtObservacionesRecepcion.Text = "" TxtObservacionesRecepcion.Text = ""
TxtFechaRecepcion.Text = Now.ToShortDateString TxtFechaRecepcion.Text = NowADS().ToShortDateString
DdlPersonalR.SelectedValue = "-1" DdlPersonalR.SelectedValue = "-1"
DdlSubProyectoRL.SelectedValue = "-1" DdlSubProyectoRL.SelectedValue = "-1"
TxtFolioRL.Text = "" TxtFolioRL.Text = ""

View File

@@ -449,7 +449,7 @@ Partial Class AF_TipoOrdenTrabajo
' worksheet.Rows(IndexEndTable + 1).Cells(0).Value = Usuario.Nombre ' worksheet.Rows(IndexEndTable + 1).Cells(0).Value = Usuario.Nombre
' worksheet.Rows(IndexEndTable).Cells(2).Value = "Fecha Impresión" ' 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)) ' 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.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.BinaryWrite(ReporteBytes)
' Response.End() ' Response.End()

View File

@@ -22,7 +22,7 @@ Partial Class AF_ValesCombustible
CargarCombos() CargarCombos()
CargaFolios() CargaFolios()
TxtFechaVale.Text = DateTime.Now.ToShortDateString TxtFechaVale.Text = NowADS().ToShortDateString
BtnActualizar.Visible = False BtnActualizar.Visible = False
'BtnAplicar.Visible = False 'BtnAplicar.Visible = False

View File

@@ -49,7 +49,7 @@ Partial Class AIMMGM_ConsultaCliente
Session("FileUpload") = "" Session("FileUpload") = ""
ViewState("Orden") = "" ViewState("Orden") = ""
ViewState("ONombre") = "Nombre DESC" ViewState("ONombre") = "Nombre DESC"
TxtFecha.Text = Now.ToShortDateString TxtFecha.Text = NowADS().ToShortDateString
If Request("CveCliente") IsNot Nothing Then If Request("CveCliente") IsNot Nothing Then
CveCliente = Request("CveCliente").ToString.ToEntero() 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") 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) Alert("El Registro ha sido eliminado", TipoMensaje.MsgInformacion)
If MovimientosVentas.ToEntero = 1 Then 'se cancela la venta en su totalidad If MovimientosVentas.ToEntero = 1 Then 'se cancela la venta en su totalidad
Venta.UpdateEstatusFactura(4, "", "", Now, CveVenta) Venta.UpdateEstatusFactura(4, "", "", NowADS(), CveVenta)
End If End If
Venta.Commit() Venta.Commit()
@@ -473,10 +473,10 @@ Partial Class AIMMGM_ConsultaCliente
' Dim EsVistaPrevia As Boolean = True ' 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 ' '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 ' Dim outputFileName As Object = Ruta & xlsxFileOut
' If IO.File.Exists(Ruta & "FormatoAIMMGM33.xlsx") Then ' 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 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 Dim strSQL As New StringBuilder
strSQL.Append(" <html> ") strSQL.Append(" <html> ")

View File

@@ -130,7 +130,7 @@ Partial Class AIMMGM_Pagos
Dim dt As DataTable Dim dt As DataTable
If AIM.GetPagos(DdlCliente.SelectedValue.ToEntero, 2) Then If AIM.GetPagos(DdlCliente.SelectedValue.ToEntero, 2) Then
dt = AIM.DtResultados.FiltraParametros("Facturado = 0 and RequiereFactura = 1") dt = AIM.DtResultados.FiltraParametros("Facturado = 0 and RequiereFactura = 1")
' GvE.Caption = String.Format("<table style='width:100%; background-color:#ADD8E6;'><tr><td>{0}</td></tr></table>", Now.ToLongDateString) ' GvE.Caption = String.Format("<table style='width:100%; background-color:#ADD8E6;'><tr><td>{0}</td></tr></table>", NowADS().ToLongDateString)
GvE.CaptionAlign = TableCaptionAlign.Left GvE.CaptionAlign = TableCaptionAlign.Left
GvE.DataSource = dt GvE.DataSource = dt
GvE.DataBind() GvE.DataBind()

View File

@@ -72,7 +72,7 @@ Partial Class AIMMGM_Registro
For Each dr As DataRow In dtExcursiones.Rows For Each dr As DataRow In dtExcursiones.Rows
Dim AIM As New ClsAIMMGM 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) Contador = AIM.DtResultados.COUNT("CvePS", "CvePS = " & dr("CvePS").ToString)
If Contador >= 20 Then If Contador >= 20 Then
dr("CvePS") = 0 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 If System.Web.HttpContext.Current IsNot Nothing AndAlso System.Web.HttpContext.Current.Handler IsNot Nothing Then
Dim Img, Botones As String Dim Img, Botones As String
Dim Titulo 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, "\'") Mensaje = Mensaje.Replace("'"c, "\'")
JSBtnAceptar = JSBtnAceptar.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) 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(), (NowADS().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(), String.Format("MuestraAlerta('{0}','{1}','{2}','{3}','{4}');", Titulo, Mensaje, Img, Botones, JSBtnAceptar), True)
Pag = Nothing Pag = Nothing
Catch ex As Exception Catch ex As Exception
@@ -420,7 +420,7 @@ Partial Class AIMMGM_Registro
Dim tnombre As String Dim tnombre As String
Dim TieneExcursion As Boolean = False Dim TieneExcursion As Boolean = False
'DdlFiscalMetodoPago.SelectedValue.ToEntero1, '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 Dim CveVenta As Integer = Venta.CveVenta
For Each dr As DataRow In TmpDT.Rows For Each dr As DataRow In TmpDT.Rows
Dim CveUnidadMedida As Integer Dim CveUnidadMedida As Integer
@@ -555,7 +555,7 @@ Partial Class AIMMGM_Registro
Dim Liga As String = "http://aimmgm.adsistemas.mx/AIMMGM/Portal.aspx" 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 Dim strSQL As New StringBuilder
strSQL.Append(" <html> ") strSQL.Append(" <html> ")

View File

@@ -96,7 +96,7 @@ Partial Class AIMMGM_Registro
For Each dr As DataRow In dtExcursiones.Rows For Each dr As DataRow In dtExcursiones.Rows
Dim AIM As New ClsAIMMGM 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) Contador = AIM.DtResultados.COUNT("CvePS", "CvePS = " & dr("CvePS").ToString)
If Contador >= 20 Then If Contador >= 20 Then
dr("CvePS") = 0 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 If System.Web.HttpContext.Current IsNot Nothing AndAlso System.Web.HttpContext.Current.Handler IsNot Nothing Then
Dim Img, Botones As String Dim Img, Botones As String
Dim Titulo 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, "\'") Mensaje = Mensaje.Replace("'"c, "\'")
JSBtnAceptar = JSBtnAceptar.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) 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(), (NowADS().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(), String.Format("MuestraAlerta('{0}','{1}','{2}','{3}','{4}');", Titulo, Mensaje, Img, Botones, JSBtnAceptar), True)
Pag = Nothing Pag = Nothing
Catch ex As Exception Catch ex As Exception
@@ -597,7 +597,7 @@ Partial Class AIMMGM_Registro
Dim tnombre As String Dim tnombre As String
Dim TieneExcursion As Boolean = False 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 Dim CveVenta As Integer = Venta.CveVenta
For Each dr As DataRow In TmpDT.Rows For Each dr As DataRow In TmpDT.Rows
Dim CveUnidadMedida As Integer Dim CveUnidadMedida As Integer
@@ -715,7 +715,7 @@ Partial Class AIMMGM_Registro
Dim tnombre As String Dim tnombre As String
Dim TieneExcursion As Boolean = False 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 Dim CveVenta As Integer = Venta.CveVenta
For Each dr As DataRow In TmpDT.Rows For Each dr As DataRow In TmpDT.Rows
Dim CveUnidadMedida As Integer Dim CveUnidadMedida As Integer
@@ -745,7 +745,7 @@ Partial Class AIMMGM_Registro
If Not Errorr Then 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 Errorr = True
End If End If
@@ -853,7 +853,7 @@ Partial Class AIMMGM_Registro
Dim Liga As String = "http://aimmgm.adsistemas.mx/AIMMGM/Portal.aspx" 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 Dim strSQL As New StringBuilder
strSQL.Append(" <html> ") strSQL.Append(" <html> ")
@@ -1062,7 +1062,7 @@ Partial Class AIMMGM_Registro
Cliente.Dispose() Cliente.Dispose()
End If 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 'actualizo la clavedel cliente en todos los registros
@@ -1079,8 +1079,8 @@ Partial Class AIMMGM_Registro
myNameValueCollection.Add("ref", CveCliente.ToString) myNameValueCollection.Add("ref", CveCliente.ToString)
myNameValueCollection.Add("imp", TmpDT.SUM("Total").ToString) '".01" myNameValueCollection.Add("imp", TmpDT.SUM("Total").ToString) '".01"
myNameValueCollection.Add("ema", TxtEmail.Text.Trim) 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("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, 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, NowADS(), CveCliente))))
myNameValueCollection.Add("autoBack", "1") myNameValueCollection.Add("autoBack", "1")
myNameValueCollection.Add("datbloq", "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 '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) Dim VSKey As String = String.Format("VIEWSTATE_{0}_{1}_{2}", Session.SessionID, Request.Path, NowADS().Ticks)
Cache.Add(VSKey, pviewState, Nothing, Date.Now.AddMinutes(60), Cache.NoSlidingExpiration, CacheItemPriority.Default, Nothing) 'Store the ViewState on Cache Cache.Add(VSKey, pviewState, Nothing, NowADS().AddMinutes(60), Cache.NoSlidingExpiration, CacheItemPriority.Default, Nothing) 'Store the ViewState on Cache
ClientScript.RegisterHiddenField("__VIEWSTATE_KEY", VSKey) ClientScript.RegisterHiddenField("__VIEWSTATE_KEY", VSKey)
End Sub End Sub

View File

@@ -10,8 +10,8 @@ Partial Class AIMMGM_Ventas
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not Page.IsPostBack Then If Not Page.IsPostBack Then
txtFechaI.Text = "01/01/" & Now.Year txtFechaI.Text = "01/01/" & NowADS().Year
txtFechaF.Text = Now.ToShortDateString txtFechaF.Text = NowADS().ToShortDateString
Dim dt As DataTable Dim dt As DataTable

View File

@@ -64,7 +64,7 @@ Partial Class AIMMGM_ePagos
Dim Fecha As String = ClsPaginas.UrlParametros("F").ToString 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 ClavePago = ClsPaginas.UrlParametros("CVE").ToString
CargaCompra() CargaCompra()
@@ -124,7 +124,7 @@ Partial Class AIMMGM_ePagos
Dim tnombre As String Dim tnombre As String
Dim TieneExcursion As Boolean = False 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 Dim CveVenta As Integer = Venta.CveVenta
For Each dr As DataRow In TmpDT.Rows For Each dr As DataRow In TmpDT.Rows
Dim CveUnidadMedida As Integer Dim CveUnidadMedida As Integer
@@ -154,7 +154,7 @@ Partial Class AIMMGM_ePagos
Next Next
If Not Errorr Then 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 Errorr = True
End If End If
If Not Errorr Then 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 If System.Web.HttpContext.Current IsNot Nothing AndAlso System.Web.HttpContext.Current.Handler IsNot Nothing Then
Dim Img, Botones As String Dim Img, Botones As String
Dim Titulo 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, "\'") Mensaje = Mensaje.Replace("'"c, "\'")
JSBtnAceptar = JSBtnAceptar.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) 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(), (NowADS().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(), String.Format("MuestraAlerta('{0}','{1}','{2}','{3}','{4}');", Titulo, Mensaje, Img, Botones, JSBtnAceptar), True)
Pag = Nothing Pag = Nothing
Catch ex As Exception Catch ex As Exception
@@ -312,7 +312,7 @@ Partial Class AIMMGM_ePagos
Dim Liga As String = "http://aimmgm.adsistemas.mx/AIMMGM/Portal.aspx" 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 Dim strSQL As New StringBuilder
strSQL.Append(" <html> ") strSQL.Append(" <html> ")

View File

@@ -13,8 +13,8 @@ Partial Class Acarreos_AcarreosAutoConciliacion
CargaDdlTransportista() CargaDdlTransportista()
CargaDdlMaterial() CargaDdlMaterial()
CargaDdlNumContrato() CargaDdlNumContrato()
txtFechaF.Text = Now.AddDays(0).ToShortDateString txtFechaF.Text = NowADS().AddDays(0).ToShortDateString
txtFechaI.Text = Now.AddYears(-1).ToShortDateString txtFechaI.Text = NowADS().AddYears(-1).ToShortDateString
BtnAgregarAcarreoConcluido.Text = "Vincular" BtnAgregarAcarreoConcluido.Text = "Vincular"
End If End If
End Sub End Sub

View File

@@ -14,7 +14,7 @@ Partial Class Acarreos_AcarreosPreEstimacion
DdlTransportista.DataBind() DdlTransportista.DataBind()
DdlMaterial.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlMaterial.Items.Insert(0, New ListItem("Seleccione", "-1"))
DdlMaterial.DataBind() DdlMaterial.DataBind()
TxtFechaPreEstimacion.Text = Now.AddDays(0).ToShortDateString TxtFechaPreEstimacion.Text = NowADS().AddDays(0).ToShortDateString
BtnAgregarPreEstimacion.Text = "Pre-Estimar" BtnAgregarPreEstimacion.Text = "Pre-Estimar"
CargaDdlNumContrato() CargaDdlNumContrato()
End If End If
@@ -65,7 +65,7 @@ Partial Class Acarreos_AcarreosPreEstimacion
DdlMaterial.DataBind() DdlMaterial.DataBind()
CargaDdlNumContrato() CargaDdlNumContrato()
TxtNumPreEstimacion.Text = "" TxtNumPreEstimacion.Text = ""
TxtFechaPreEstimacion.Text = Now.AddDays(0).ToShortDateString TxtFechaPreEstimacion.Text = NowADS().AddDays(0).ToShortDateString
GvPreEstimacion.DataSource = Nothing GvPreEstimacion.DataSource = Nothing
GvPreEstimacion.DataBind() GvPreEstimacion.DataBind()
Else Else

View File

@@ -145,7 +145,7 @@ Partial Class Acarreos_EditarAcarreo
DdlChofer.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlChofer.Items.Insert(0, New ListItem("Seleccione", "-1"))
DdlMaterial.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlMaterial.Items.Insert(0, New ListItem("Seleccione", "-1"))
CargaDdlNumContrato() CargaDdlNumContrato()
TxtFecha.Text = Now.AddDays(0).ToShortDateString TxtFecha.Text = NowADS().AddDays(0).ToShortDateString
CargaDatos() CargaDatos()
divEstatus.Visible = False divEstatus.Visible = False
SetPermisos() SetPermisos()
@@ -325,7 +325,7 @@ Partial Class Acarreos_EditarAcarreo
DdlTransportista.Items.Clear() DdlTransportista.Items.Clear()
RBDestino.Checked = False RBDestino.Checked = False
RBOrigen.Checked = False RBOrigen.Checked = False
TxtFecha.Text = Now.AddDays(0).ToShortDateString TxtFecha.Text = NowADS().AddDays(0).ToShortDateString
DdlNumContrato.SelectedIndex = -1 DdlNumContrato.SelectedIndex = -1
DdlTransportista.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlTransportista.Items.Insert(0, New ListItem("Seleccione", "-1"))
DdlUnidad.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlUnidad.Items.Insert(0, New ListItem("Seleccione", "-1"))

View File

@@ -74,8 +74,8 @@ Partial Class Acarreos_ContratosAcarreos
CargaDdlUnidadMedida() CargaDdlUnidadMedida()
CreaTmpTarifas() CreaTmpTarifas()
CreaTmpMaterialVolumen() CreaTmpMaterialVolumen()
TxtFechaInicio.Text = Now.AddDays(0).ToShortDateString TxtFechaInicio.Text = NowADS().AddDays(0).ToShortDateString
TxtFechaFin.Text = Now.AddDays(0).ToShortDateString TxtFechaFin.Text = NowADS().AddDays(0).ToShortDateString
CargaDatos() CargaDatos()
End If End If
End Sub End Sub
@@ -303,8 +303,8 @@ Partial Class Acarreos_ContratosAcarreos
TxtVolumenTipo.Text = "" TxtVolumenTipo.Text = ""
TxtDescripcion.Text = "" TxtDescripcion.Text = ""
TxtNumContrato.Text = "" TxtNumContrato.Text = ""
TxtFechaInicio.Text = Now.AddDays(0).ToShortDateString TxtFechaInicio.Text = NowADS().AddDays(0).ToShortDateString
TxtFechaFin.Text = Now.AddDays(0).ToShortDateString TxtFechaFin.Text = NowADS().AddDays(0).ToShortDateString
DTTarifa.Rows.Clear() DTTarifa.Rows.Clear()
DTMaterialVolumen.Rows.Clear() DTMaterialVolumen.Rows.Clear()
GvTarifa.DataSource = Nothing GvTarifa.DataSource = Nothing

View File

@@ -22,8 +22,8 @@ Partial Class Acarreos_RepAcarreos
CargaDdlTransportista() CargaDdlTransportista()
CargaDdlMaterial() CargaDdlMaterial()
CargaDdlNumContrato() CargaDdlNumContrato()
txtFechaF.Text = Now.AddDays(0).ToShortDateString txtFechaF.Text = NowADS().AddDays(0).ToShortDateString
txtFechaI.Text = Now.AddYears(-1).ToShortDateString txtFechaI.Text = NowADS().AddYears(-1).ToShortDateString
End If End If
End Sub End Sub

View File

@@ -24,8 +24,8 @@ Partial Class Acarreos_RepAcarreosDetalle
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then If Not Page.IsPostBack Then
txtFechaF.Text = Now.AddDays(0).ToShortDateString txtFechaF.Text = NowADS().AddDays(0).ToShortDateString
txtFechaI.Text = Now.AddYears(-1).ToShortDateString txtFechaI.Text = NowADS().AddYears(-1).ToShortDateString
CargaDdlChofer() CargaDdlChofer()
CargaDdlSubProyectoOrigen() CargaDdlSubProyectoOrigen()
CargaDdlSubProyectoDestino() CargaDdlSubProyectoDestino()

View File

@@ -27,8 +27,8 @@ Partial Class Acarreos_RepContratosAcarreos
CargaDdlSubProyectoOrigen() CargaDdlSubProyectoOrigen()
CargaDdlTransportista() CargaDdlTransportista()
CargaDdlProveedor() CargaDdlProveedor()
txtFechaF.Text = Now.AddDays(0).ToShortDateString txtFechaF.Text = NowADS().AddDays(0).ToShortDateString
txtFechaI.Text = Now.AddYears(-1).ToShortDateString txtFechaI.Text = NowADS().AddYears(-1).ToShortDateString
End If End If
End Sub End Sub
@@ -154,14 +154,14 @@ Partial Class Acarreos_RepContratosAcarreos
Dim params As New List(Of ReportParameter) Dim params As New List(Of ReportParameter)
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) 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("Filtros", StrFiltro.ToString))
If Imagen.Exists Then If Imagen.Exists Then
params.Add(New ReportParameter("LogoPath", $"file://{Imagen}")) params.Add(New ReportParameter("LogoPath", $"file://{Imagen}"))
Else Else
params.Add(New ReportParameter("LogoPath", "")) params.Add(New ReportParameter("LogoPath", ""))
End If 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 Else
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia) Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
End If End If
@@ -182,10 +182,10 @@ Partial Class Acarreos_RepContratosAcarreos
Dim params As New List(Of ReportParameter) Dim params As New List(Of ReportParameter)
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) 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("Filtros", StrFiltro.ToString))
params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) 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 Else
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia) Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
End If End If

View File

@@ -183,7 +183,7 @@ Partial Class Acarreos_RepContratosAcarreosDetalle
Dim params As New List(Of ReportParameter) Dim params As New List(Of ReportParameter)
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) 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("Contrato", LblContrato.Text))
params.Add(New ReportParameter("FechaInicio", LblFechaInicio.Text)) params.Add(New ReportParameter("FechaInicio", LblFechaInicio.Text))
params.Add(New ReportParameter("FechaFin", LblFechaFin.Text)) params.Add(New ReportParameter("FechaFin", LblFechaFin.Text))
@@ -205,7 +205,7 @@ Partial Class Acarreos_RepContratosAcarreosDetalle
Else Else
params.Add(New ReportParameter("LogoPath", "")) params.Add(New ReportParameter("LogoPath", ""))
End If 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 Else
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia) Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
End If End If
@@ -222,7 +222,7 @@ Partial Class Acarreos_RepContratosAcarreosDetalle
Dim params As New List(Of ReportParameter) Dim params As New List(Of ReportParameter)
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) 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("Contrato", LblContrato.Text))
params.Add(New ReportParameter("FechaInicio", LblFechaInicio.Text)) params.Add(New ReportParameter("FechaInicio", LblFechaInicio.Text))
params.Add(New ReportParameter("FechaFin", LblFechaFin.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("VolF", LblVolFaltante.Text))
params.Add(New ReportParameter("PresF", LblPresFaltante.Text)) params.Add(New ReportParameter("PresF", LblPresFaltante.Text))
params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) 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 Else
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia) Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
End If End If

View File

@@ -100,14 +100,14 @@ Partial Class Acarreos_RepPreEstimacionDetalle
Dim params As New List(Of ReportParameter) Dim params As New List(Of ReportParameter)
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) 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("Filtros", StrFiltro.ToString))
If Imagen.Exists Then If Imagen.Exists Then
params.Add(New ReportParameter("LogoPath", $"file://{Imagen}")) params.Add(New ReportParameter("LogoPath", $"file://{Imagen}"))
Else Else
params.Add(New ReportParameter("LogoPath", "")) params.Add(New ReportParameter("LogoPath", ""))
End If 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 Else
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia) Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
End If End If
@@ -133,10 +133,10 @@ Partial Class Acarreos_RepPreEstimacionDetalle
Dim params As New List(Of ReportParameter) Dim params As New List(Of ReportParameter)
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) 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("Filtros", StrFiltro.ToString))
params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) 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 Else
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia) Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
End If End If

View File

@@ -35,11 +35,11 @@ Partial Class Acumuladores_RepEntradasUsados
End Sub End Sub
Protected Sub CargarCombos() 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 Años As New ListItem
Dim i As Integer Dim i As Integer
If Cargado = 0 Then 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) Años = New ListItem(i.ToString, i.ToString)
DdlAño.Items.Add(Años) DdlAño.Items.Add(Años)
Next Next
@@ -85,7 +85,7 @@ Partial Class Acumuladores_RepEntradasUsados
Dim params As New List(Of ReportParameter) Dim params As New List(Of ReportParameter)
params.Add(New ReportParameter("Direccion", Direccion)) 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("FechaInicial", txtFechaI.Text))
params.Add(New ReportParameter("FechaFinal", txtFechaF.Text)) params.Add(New ReportParameter("FechaFinal", txtFechaF.Text))
params.Add(New ReportParameter("Sucursal", "Sucursal")) params.Add(New ReportParameter("Sucursal", "Sucursal"))

View File

@@ -17,7 +17,7 @@ public partial class Acumuladores_RepAcumuladoresVigencia : ClsPaginas
{ {
if (Consultado) 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 else
{ {
@@ -53,8 +53,8 @@ public partial class Acumuladores_RepAcumuladoresVigencia : ClsPaginas
{ {
Consultado = false; Consultado = false;
CargaCombos(); CargaCombos();
txtFechaI.Text = DateTime.Now.FirstDayOfMonth().AddMonths(-24).ToShortDateString(); txtFechaI.Text = NowADS().FirstDayOfMonth().AddMonths(-24).ToShortDateString();
txtFechaF.Text = DateTime.Now.LastDayOfMonth().AddMonths(-6).ToShortDateString(); txtFechaF.Text = NowADS().LastDayOfMonth().AddMonths(-6).ToShortDateString();
UpFiltros.Update(); UpFiltros.Update();
} }

View File

@@ -36,8 +36,8 @@ Partial Class Acumuladores_RepEntradasUsadosClientes
DdlAlmacen.DataBind() DdlAlmacen.DataBind()
DdlAlmacen.Items.Insert(0, New ListItem("Todos", "-1")) DdlAlmacen.Items.Insert(0, New ListItem("Todos", "-1"))
TxtFechaI.Text = Now.FirstDayOfMonth.ToShortDateString TxtFechaI.Text = NowADS().FirstDayOfMonth.ToShortDateString
TxtFechaF.text = now.toshortdatestring TxtFechaF.text = NowADS().toshortdatestring
End Sub End Sub

View File

@@ -63,8 +63,8 @@ Partial Class ACumuladores_RepIndicadorDiario
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then If Not IsPostBack Then
txtFechaI.Text = Now.FirstDayOfMonth().ToString("dd/MM/yyyy") txtFechaI.Text = NowADS().FirstDayOfMonth().ToString("dd/MM/yyyy")
txtFechaF.Text = Now.ToString("dd/MM/yyyy") txtFechaF.Text = NowADS().ToString("dd/MM/yyyy")
CargaCombos() CargaCombos()
@@ -119,7 +119,7 @@ Partial Class ACumuladores_RepIndicadorDiario
If RblTipoCambio.SelectedValue.ToEntero = 3 Then If RblTipoCambio.SelectedValue.ToEntero = 3 Then
Dim TipoCambio As Double Dim TipoCambio As Double
LiEspecifico.Visible = True LiEspecifico.Visible = True
TipoCambio = GlobalTipoCambio(Now) TipoCambio = GlobalTipoCambio(NowADS())
TxtEspecifico.Text = TipoCambio.ToString TxtEspecifico.Text = TipoCambio.ToString
Else Else
LiEspecifico.Visible = False LiEspecifico.Visible = False
@@ -162,7 +162,7 @@ Partial Class ACumuladores_RepIndicadorDiario
#Region " IMPRIMIR " #Region " IMPRIMIR "
Protected Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click 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") GenerarPDF("EXCEL")
End Sub End Sub
@@ -193,11 +193,11 @@ Partial Class ACumuladores_RepIndicadorDiario
params.Add(New ReportParameter("FechaInicio", FechaI)) params.Add(New ReportParameter("FechaInicio", FechaI))
params.Add(New ReportParameter("FechaFin", FechaF)) params.Add(New ReportParameter("FechaFin", FechaF))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) 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", $"<b>Filtros Por:</b> {FechaIn} {FechaFn} {SubProyecto} ")) params.Add(New ReportParameter("AgrupadoPor", $"<b>Filtros Por:</b> {FechaIn} {FechaFn} {SubProyecto} "))
params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) 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 Else
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia) Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
End If End If

View File

@@ -13,7 +13,7 @@ Partial Class Acumuladores_RepPolizasVirtuales
Private Sub CargaCombos() Private Sub CargaCombos()
CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto:=LblSubProyecto) CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto:=LblSubProyecto)
txtFechaI.Text = DateTime.Now.FirstDayOfMonth.ToShortDateString() txtFechaI.Text = NowADS().FirstDayOfMonth.ToShortDateString()
End Sub End Sub

View File

@@ -14,8 +14,8 @@ public partial class Ventas_RepUsados : ClsPaginas
{ {
if (!IsPostBack) if (!IsPostBack)
{ {
InicializaValores(); InicializaValores();
} }
} }
private void InicializaValores() private void InicializaValores()

View File

@@ -987,7 +987,7 @@ Public Class ClsBancos
Dim dttpagosimpuestos As DataTable = Nothing Dim dttpagosimpuestos As DataTable = Nothing
Dim dr As Data.DataRow = 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") dr = DtResultados.FiltroPrimero("CveVenta IS NULL")
dttpagos = DtResultados.FiltraParametros("CveVenta > 0") dttpagos = DtResultados.FiltraParametros("CveVenta > 0")
End If End If
@@ -1000,23 +1000,23 @@ Public Class ClsBancos
RowFiltro = dttpagos.FiltroPrimero("") RowFiltro = dttpagos.FiltroPrimero("")
If RowFiltro IsNot Nothing Then If RowFiltro IsNot Nothing Then
If Now.EsHorarioVerano Then If ClsPaginas.NowADS().EsHorarioVerano Then
Dim UTCOffsetVerano As Integer = RowFiltro("UTCOffsetVerano").ToString().ToEntero() Dim UTCOffsetVerano As Integer = RowFiltro("UTCOffsetVerano").ToString().ToEntero()
If UTCOffsetVerano <> 0 Then If UTCOffsetVerano <> 0 Then
FechaTimbrado = DateTime.UtcNow.AddHours(UTCOffsetVerano) FechaTimbrado = DateTime.UtcNow.AddHours(UTCOffsetVerano)
Else Else
FechaTimbrado = DateTime.Now FechaTimbrado = ClsPaginas.NowADS()
End If End If
Else Else
Dim UTCOffsetInvierno As Integer = RowFiltro("UTCOffsetInvierno").ToString().ToEntero() Dim UTCOffsetInvierno As Integer = RowFiltro("UTCOffsetInvierno").ToString().ToEntero()
If UTCOffsetInvierno <> 0 Then If UTCOffsetInvierno <> 0 Then
FechaTimbrado = DateTime.UtcNow.AddHours(UTCOffsetInvierno) FechaTimbrado = DateTime.UtcNow.AddHours(UTCOffsetInvierno)
Else Else
FechaTimbrado = DateTime.Now FechaTimbrado = ClsPaginas.NowADS()
End If End If
End If End If
Else Else
FechaTimbrado = DateTime.Now FechaTimbrado = ClsPaginas.NowADS()
End If End If
End If End If

View File

@@ -6328,7 +6328,7 @@ Public Class ClsContabilidad
Return Retorno Return Retorno
End Function 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 Dim Retorno As Boolean = False
DataAdapter("PA_Conta2_EstadoResultadosMensualHorizontal") DataAdapter("PA_Conta2_EstadoResultadosMensualHorizontal")
@@ -6342,6 +6342,7 @@ Public Class ClsContabilidad
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@Tipo", SqlDbType.Int).Value = Tipo .Add("@Tipo", SqlDbType.Int).Value = Tipo
.Add("@VistaPorcentaje", SqlDbType.Int).Value = VistaPorcentaje
End With End With
@@ -6357,7 +6358,7 @@ Public Class ClsContabilidad
Return Retorno Return Retorno
End Function 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 Dim Retorno As Boolean = False
DataAdapter("PA_Conta2_EstadoResultadosAnualHorizontal") DataAdapter("PA_Conta2_EstadoResultadosAnualHorizontal")
@@ -6372,6 +6373,7 @@ Public Class ClsContabilidad
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@Tipo", SqlDbType.Int).Value = Tipo .Add("@Tipo", SqlDbType.Int).Value = Tipo
.Add("@Periodo", SqlDbType.Int).Value = Periodo .Add("@Periodo", SqlDbType.Int).Value = Periodo
.Add("@VistaPorcentaje", SqlDbType.Int).Value = VistaPorcentaje
End With End With
@@ -6388,7 +6390,7 @@ Public Class ClsContabilidad
End Function 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 Dim Retorno As Boolean = False
DataAdapter("PA_Conta2_EstadoResultadosSubProyectolHorizontal") DataAdapter("PA_Conta2_EstadoResultadosSubProyectolHorizontal")
@@ -6402,7 +6404,7 @@ Public Class ClsContabilidad
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@Tipo", SqlDbType.Int).Value = Tipo .Add("@Tipo", SqlDbType.Int).Value = Tipo
.Add("@VistaPorcentaje", SqlDbType.Int).Value = VistaPorcentaje
End With End With
SqlAdapter.SelectCommand.CommandTimeout = 0 SqlAdapter.SelectCommand.CommandTimeout = 0

View File

@@ -611,7 +611,7 @@ Public Class ClsDG
Public Sub GuardaLog(pTexto As String) Public Sub GuardaLog(pTexto As String)
Dim ArchivoW As StreamWriter Dim ArchivoW As StreamWriter
Dim strLineaTMP As String 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 Try
ArchivoW = New StreamWriter(String.Format("{0}\LogDG.txt", AppDomain.CurrentDomain), True, System.Text.Encoding.UTF8) ArchivoW = New StreamWriter(String.Format("{0}\LogDG.txt", AppDomain.CurrentDomain), True, System.Text.Encoding.UTF8)

View File

@@ -566,7 +566,7 @@ Public Class ClsEncuestas
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente .Add("@CveCliente", SqlDbType.Int).Value = CveCliente
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal .Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .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("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveEncuestaAplicada", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@CveEncuestaAplicada", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With

View File

@@ -1728,7 +1728,7 @@ Public Class ClsGenerales
.Add("@Estatus", SqlDbType.VarChar).Value = Estatus .Add("@Estatus", SqlDbType.VarChar).Value = Estatus
.Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda .Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda
.Add("@CveCuentaDeposito", SqlDbType.Int).Value = CveCuentaDeposito .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("@RefCrediProveedor", SqlDbType.VarChar).Value = RefCrediProveedor
.Add("@CveUsuarioModifico", SqlDbType.Int).Value = CveUsuarioModifico .Add("@CveUsuarioModifico", SqlDbType.Int).Value = CveUsuarioModifico
.Add("@Correo", SqlDbType.VarChar).Value = Correo .Add("@Correo", SqlDbType.VarChar).Value = Correo

View File

@@ -992,7 +992,7 @@ Public Class ClsInventarios
DataAdapter("PA_Inv_MovimientosAdd") DataAdapter("PA_Inv_MovimientosAdd")
If FechaMovto.Hour = 0 AndAlso FechaMovto.Minute = 0 AndAlso FechaMovto.Second = 0 Then 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 End If
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
@@ -1981,7 +1981,7 @@ Public Class ClsInventarios
Dim Retorno As Decimal = -1 Dim Retorno As Decimal = -1
If FechaMovto = "-1" Then 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 End If
DataAdapter("PA_Inv_ExistenciasPSGet") DataAdapter("PA_Inv_ExistenciasPSGet")
@@ -2176,7 +2176,7 @@ Public Class ClsInventarios
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
If FechaMovto = "-1" Then 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 End If
DataAdapter("PA_Inv_ExistenciasPSEmpaqueGet") DataAdapter("PA_Inv_ExistenciasPSEmpaqueGet")
@@ -2216,7 +2216,7 @@ Public Class ClsInventarios
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
If Fecha = "-1" Then 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 End If
DataAdapter("PA_Inv_ExistenciasPSXMLGet") DataAdapter("PA_Inv_ExistenciasPSXMLGet")

View File

@@ -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 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 Dim Retorno As Boolean = False
FechaCorte = IIf(FechaCorte = Nothing, NowADS().AddYears(1), FechaCorte).ToString.ToDate FechaCorte = IIf(FechaCorte = Nothing, ClsPaginas.NowADS().AddYears(1), FechaCorte).ToString.ToDate
DataAdapter("PA_Vta_ClienteCxC") DataAdapter("PA_Vta_ClienteCxC")
With SqlAdapter.SelectCommand.Parameters 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 Optional TipoDocto As String = "-1", Optional TipoAgrupacion As Integer = -1, Optional CveProyecto As Integer = -1) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
If FechaCorte = Nothing Then FechaCorte = Now If FechaCorte = Nothing Then FechaCorte = ClsPaginas.NowADS()
DataAdapter("PA_Comp_RepCxP") DataAdapter("PA_Comp_RepCxP")
With SqlAdapter.SelectCommand.Parameters 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 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 Dim Retorno As Boolean = False
If FechaCorte = Nothing Then FechaCorte = Now If FechaCorte = Nothing Then FechaCorte = ClsPaginas.NowADS()
DataAdapter("PA_Comp_RepCxPDetalle") DataAdapter("PA_Comp_RepCxPDetalle")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters

View File

@@ -98,12 +98,21 @@ Public Class ClsPaginas
End Try End Try
End Set End Set
End Property End Property
Public Function NowADS() As DateTime
Public Shared Function NowADS() As DateTime
Dim tHora As Integer = 0 Dim tHora As Integer = 0
If UsuarioActual IsNot Nothing AndAlso UsuarioActual.Empresa IsNot Nothing Then tHora = UsuarioActual.Empresa.UTCHora 'If UsuarioActual IsNot Nothing AndAlso UsuarioActual.Empresa IsNot Nothing Then tHora = UsuarioActual.Empresa.UTCOffset
Return If(tHora <> 0, Now.ToUniversalTime.AddHours(tHora), Now) 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 Function
#End Region #End Region
#Region "GlobalDTs" #Region "GlobalDTs"
@@ -111,7 +120,7 @@ Public Class ClsPaginas
Get Get
If GlobalTipoCambio <= 0 Then If GlobalTipoCambio <= 0 Then
'sino tiene dato lo recargo por si ya esta insertado '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 Dim ObjGral As New ClsGenerales
If ObjGral.GetTipoCambio(-1, Fecha) AndAlso ObjGral.DtResultados.Rows.Count > 0 Then If ObjGral.GetTipoCambio(-1, Fecha) AndAlso ObjGral.DtResultados.Rows.Count > 0 Then
HttpContext.Current.Application("GlobalTipoCambio") = ObjGral.DtResultados.Rows(0)("TipoCambio").ToString.ToDouble HttpContext.Current.Application("GlobalTipoCambio") = ObjGral.DtResultados.Rows(0)("TipoCambio").ToString.ToDouble
@@ -130,7 +139,7 @@ Public Class ClsPaginas
Get Get
If HttpContext.Current.Application("GlobalTipoCambioUltimaFluctuacion") Is Nothing Then If HttpContext.Current.Application("GlobalTipoCambioUltimaFluctuacion") Is Nothing Then
Dim ObjGral As New ClsGenerales 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() HttpContext.Current.Application("GlobalTipoCambioUltimaFluctuacion") = ObjGral.DtResultados.Copy()
Else Else
HttpContext.Current.Application("GlobalTipoCambioUltimaFluctuacion") = Nothing HttpContext.Current.Application("GlobalTipoCambioUltimaFluctuacion") = Nothing
@@ -142,7 +151,7 @@ Public Class ClsPaginas
.FechaFluctuacion = MinFecha .FechaFluctuacion = MinFecha
} }
'sino tiene dato lo recargo por si ya esta insertado '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 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") Dim dr As DataRow = DirectCast(HttpContext.Current.Application("GlobalTipoCambioUltimaFluctuacion"), DataTable).FiltroPrimero(String.Format("Fecha < '{0}'", Fecha), Orderby:="Fecha DESC")
@@ -165,7 +174,7 @@ Public Class ClsPaginas
Get Get
If GlobalTipoCambioEuro <= 0 Then If GlobalTipoCambioEuro <= 0 Then
'sino tiene dato lo recargo por si ya esta insertado '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 Dim ObjGral As New ClsGenerales
If ObjGral.GetTipoCambio(-1, Fecha) AndAlso ObjGral.DtResultados.Rows.Count > 0 Then If ObjGral.GetTipoCambio(-1, Fecha) AndAlso ObjGral.DtResultados.Rows.Count > 0 Then
Application("GlobalTipoCambioEuro") = ObjGral.DtResultados.Rows(0)("TipoCambioEuro").ToString.ToDouble Application("GlobalTipoCambioEuro") = ObjGral.DtResultados.Rows(0)("TipoCambioEuro").ToString.ToDouble
@@ -4505,7 +4514,7 @@ Public Class ClsPaginas
Public Shared Sub RegistraScript(Script As String, Optional valuetick As String = "") Public Shared Sub RegistraScript(Script As String, Optional valuetick As String = "")
Dim page As Page = TryCast(HttpContext.Current.CurrentHandler, Page) Dim page As Page = TryCast(HttpContext.Current.CurrentHandler, Page)
Script = $"{Script.TrimEnd(";"c)};" 'sino trae ";" al final, se lo agregamos 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 End Sub
Public Sub TabEnabled(Tab As System.Web.UI.HtmlControls.HtmlAnchor, Valor As Boolean) Public Sub TabEnabled(Tab As System.Web.UI.HtmlControls.HtmlAnchor, Valor As Boolean)
If Valor Then If Valor Then
@@ -5510,7 +5519,7 @@ Public Class ClsPaginas
params.Add(New ReportParameter("ClienteDiasCredito", "0")) params.Add(New ReportParameter("ClienteDiasCredito", "0"))
params.Add(New ReportParameter("MonedaAbreviatura", If(Vta.MonedaAbreviatura.ToString IsNot Nothing, Vta.MonedaAbreviatura.ToString, ""))) 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("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("Sucursal", Vta.SubProyecto.SubProyecto))
params.Add(New ReportParameter("EstatusFactura", If(Vta.TipoEstatus = 5, Vta.EstatusFactura, ""))) params.Add(New ReportParameter("EstatusFactura", If(Vta.TipoEstatus = 5, Vta.EstatusFactura, "")))
params.Add(New ReportParameter("EstatusEntrega", If(Vta.Inv_CveEstatusEntrega = 1, Vta.Inv_EstatusEntrega, ""))) params.Add(New ReportParameter("EstatusEntrega", If(Vta.Inv_CveEstatusEntrega = 1, Vta.Inv_EstatusEntrega, "")))
@@ -6459,7 +6468,7 @@ Public Class ClsPaginas
params.Add(New ReportParameter("EntregaDirecta", ObjOC.EntregaDirecta.ToString)) params.Add(New ReportParameter("EntregaDirecta", ObjOC.EntregaDirecta.ToString))
params.Add(New ReportParameter("NombreCliente", ObjOC.NombreCliente.ToString)) params.Add(New ReportParameter("NombreCliente", ObjOC.NombreCliente.ToString))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) 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("DomicilioSucursal", DomicilioSucursal))
params.Add(New ReportParameter("ProveedorContacto", ObjOC.ProveedorContacto)) params.Add(New ReportParameter("ProveedorContacto", ObjOC.ProveedorContacto))
params.Add(New ReportParameter("Comprador", ObjOC.UsuarioAsignado)) params.Add(New ReportParameter("Comprador", ObjOC.UsuarioAsignado))
@@ -6657,7 +6666,7 @@ Public Class ClsPaginas
lista.Add(New CrystalParametro("Empresa", EmpresaActual.Empresa)) lista.Add(New CrystalParametro("Empresa", EmpresaActual.Empresa))
lista.Add(New CrystalParametro("TipoCuentas", "Todas")) lista.Add(New CrystalParametro("TipoCuentas", "Todas"))
lista.Add(New CrystalParametro("FechaInicio", "-")) 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("NombreProveedor", NombreProv))
lista.Add(New CrystalParametro("DireccionProveedor", Direccion)) lista.Add(New CrystalParametro("DireccionProveedor", Direccion))
lista.Add(New CrystalParametro("ProveedorRFC", RFC)) lista.Add(New CrystalParametro("ProveedorRFC", RFC))
@@ -7132,7 +7141,7 @@ Public Class ClsPaginas
params.Add(New ReportParameter("EmpresaNoInt", UsuarioActual.Empresa.NoInt)) params.Add(New ReportParameter("EmpresaNoInt", UsuarioActual.Empresa.NoInt))
'DATOS IMPRESION 'DATOS IMPRESION
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) 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 'DATOS GENERALES
Dim Ruta As String = UsuarioActual.Empresa.Ruta Dim Ruta As String = UsuarioActual.Empresa.Ruta
Dim PathXML As String = $"{Ruta}XML\Pag\{Serie}-{Folio}.xml" Dim PathXML As String = $"{Ruta}XML\Pag\{Serie}-{Folio}.xml"

View File

@@ -658,7 +658,7 @@ Public Class ClsProspectos
.Add("@CveProspectoEstatus", SqlDbType.Int).Value = CveProspectoEstatus .Add("@CveProspectoEstatus", SqlDbType.Int).Value = CveProspectoEstatus
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .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("@CveProspecto", SqlDbType.Int).Direction = ParameterDirection.Output
.Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue .Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue
End With End With

View File

@@ -7083,7 +7083,7 @@ Public Class ClsRH
ListaTagsDocumentost.Add(New TagsDocumentos("{Estatura}", DtResultados(0)("Estatura").ToString)) ListaTagsDocumentost.Add(New TagsDocumentos("{Estatura}", DtResultados(0)("Estatura").ToString))
ListaTagsDocumentost.Add(New TagsDocumentos("{Peso}", DtResultados(0)("Peso").ToString)) ListaTagsDocumentost.Add(New TagsDocumentos("{Peso}", DtResultados(0)("Peso").ToString))
ListaTagsDocumentost.Add(New TagsDocumentos("{LugarNacimiento}", DtResultados(0)("LugarNacimiento").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("{NombreTelEmergencia}", DtResultados(0)("NombreTelEmergencia").ToString))
ListaTagsDocumentost.Add(New TagsDocumentos("{TipoSangre}", DtResultados(0)("TipoSangre").ToString)) ListaTagsDocumentost.Add(New TagsDocumentos("{TipoSangre}", DtResultados(0)("TipoSangre").ToString))
ListaTagsDocumentost.Add(New TagsDocumentos("{SubProyecto}", DtResultados(0)("SubProyecto").ToString)) ListaTagsDocumentost.Add(New TagsDocumentos("{SubProyecto}", DtResultados(0)("SubProyecto").ToString))
@@ -7135,8 +7135,8 @@ Public Class ClsRH
ListaTagsDocumentost.Add(New TagsDocumentos("{FechaNacimiento}", DtResultados(0)("FechaNacimiento").ToString.ToDate.ToString("dd/MM/yyyy"))) 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 fechaActual As String = $" { ClsPaginas.NowADS().Day } de { MesTexto(ClsPaginas.NowADS().Month) } del año { ClsPaginas.NowADS().Year}"
Dim FechaActualDF As String = Now.ToString("dd/MM/yyyy") Dim FechaActualDF As String = ClsPaginas.NowADS().ToString("dd/MM/yyyy")
ListaTagsDocumentost.Add(New TagsDocumentos("{FechaActual}", fechaActual)) ListaTagsDocumentost.Add(New TagsDocumentos("{FechaActual}", fechaActual))
ListaTagsDocumentost.Add(New TagsDocumentos("{FechaActualDF}", FechaActualDF)) ListaTagsDocumentost.Add(New TagsDocumentos("{FechaActualDF}", FechaActualDF))

View File

@@ -440,6 +440,8 @@ Public Class ClsSisEmpresas
_Empresa.FielPassword = Data.Rows(0)("FielPassword").ToString _Empresa.FielPassword = Data.Rows(0)("FielPassword").ToString
_Empresa.FielPFX = Data.Rows(0)("FielPFX").ToString _Empresa.FielPFX = Data.Rows(0)("FielPFX").ToString
_Empresa._RutaArchivos = Data.Rows(0)("RutaArchivos").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 Else
'Alert("No se encontró la Empresa solicitada.", TipoMensaje.MsgAdvertencia) '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, 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, 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 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 ) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
@@ -562,6 +564,7 @@ Public Class ClsSisEmpresas
.Add("@RequiereCentroCosto", SqlDbType.Bit).Value = RequiereCentroCosto .Add("@RequiereCentroCosto", SqlDbType.Bit).Value = RequiereCentroCosto
.Add("@PV_TerminalTipo", SqlDbType.Int).Value = PV_TerminalTipo .Add("@PV_TerminalTipo", SqlDbType.Int).Value = PV_TerminalTipo
.Add("@Importe", SqlDbType.Decimal).Value = Importe .Add("@Importe", SqlDbType.Decimal).Value = Importe
.Add("@CveZonaHoraria", SqlDbType.Int).Value = CveZonaHoraria
End With 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, 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, 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, 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 Dim Retorno As Boolean = False
@@ -685,6 +688,8 @@ Public Class ClsSisEmpresas
.Add("@RequiereCentroCosto", SqlDbType.Bit).Value = RequiereCentroCosto .Add("@RequiereCentroCosto", SqlDbType.Bit).Value = RequiereCentroCosto
.Add("@PV_TerminalTipo", SqlDbType.Int).Value = PV_TerminalTipo .Add("@PV_TerminalTipo", SqlDbType.Int).Value = PV_TerminalTipo
.Add("@Importe", SqlDbType.Decimal).Value = Importe .Add("@Importe", SqlDbType.Decimal).Value = Importe
.Add("@CveZonaHoraria", SqlDbType.Int).Value = CveZonaHoraria
End With End With
Try Try
@@ -1423,7 +1428,7 @@ Public Class ClsSisEmpresas
.Add("@AsuntoPlantilla", SqlDbType.VarChar).Value = NombreCampoBDAsuntoPlantilla .Add("@AsuntoPlantilla", SqlDbType.VarChar).Value = NombreCampoBDAsuntoPlantilla
.Add("@ValorAsuntoPlantilla", SqlDbType.NVarChar).Value = AsuntoValor .Add("@ValorAsuntoPlantilla", SqlDbType.NVarChar).Value = AsuntoValor
.Add("@Plantilla", SqlDbType.VarChar).Value = NombreCampoBDPlantilla .Add("@Plantilla", SqlDbType.VarChar).Value = NombreCampoBDPlantilla
.Add("@ValorPlantilla", SqlDbType.NVarChar).Value = HTMLValorPlantilla .Add("@ValorPlantilla", SqlDbType.VarChar).Value = HTMLValorPlantilla
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With End With
Try Try

View File

@@ -758,7 +758,7 @@ Public Class ClsSisNotificaciones
' RptParametro.Add(New ReportParameter("FechaInicio", RowParada("FechaInicio").ToString)) ' RptParametro.Add(New ReportParameter("FechaInicio", RowParada("FechaInicio").ToString))
' RptParametro.Add(New ReportParameter("FechaFin", RowParada("FechaNotificacion").ToString)) ' RptParametro.Add(New ReportParameter("FechaFin", RowParada("FechaNotificacion").ToString))
' RptParametro.Add(New ReportParameter("UsuarioImprimio", RowParada("UsuarioImprimio").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)) ' RptParametro.Add(New ReportParameter("Grupo", RowParada("Grupo").ToString))
' Dim RowRep As DataRow = ObjGPS.DtResultados.FiltroPrimero("TipoColumna=1") ' 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("FechaFin", FechaF.ToShortDateString))
RptParametro.Add(New ReportParameter("MapaURL", "")) RptParametro.Add(New ReportParameter("MapaURL", ""))
RptParametro.Add(New ReportParameter("UsuarioImprimio", Correos)) 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") Retorno = StreamPDF(Liga, DataSource, RptParametro, "ReporteUltimaPosicion", "PDF", MR:=Nothing, RDSName:="DsOC")
Catch ex As Exception Catch ex As Exception
@@ -920,7 +920,7 @@ Public Class ClsSisNotificaciones
RptParametro.Add(New CrystalParametro("FechaInicio", FechaI.ToString)) RptParametro.Add(New CrystalParametro("FechaInicio", FechaI.ToString))
RptParametro.Add(New CrystalParametro("FechaFin", FechaF.ToString)) RptParametro.Add(New CrystalParametro("FechaFin", FechaF.ToString))
RptParametro.Add(New CrystalParametro("UsuarioImprimio", Correos)) 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 If DataSource.Rows.Count > 0 Then
RptParametro.Add(New CrystalParametro("KMRecorridos", $"{DataSource.Rows(0)("KMRecorridos")} KM")) RptParametro.Add(New CrystalParametro("KMRecorridos", $"{DataSource.Rows(0)("KMRecorridos")} KM"))
Else Else
@@ -1002,7 +1002,7 @@ Public Class ClsSisNotificaciones
RptParametro.Add(New ReportParameter("FechaInicio", FechaI.ToString)) RptParametro.Add(New ReportParameter("FechaInicio", FechaI.ToString))
RptParametro.Add(New ReportParameter("FechaFin", FechaF.ToString)) RptParametro.Add(New ReportParameter("FechaFin", FechaF.ToString))
RptParametro.Add(New ReportParameter("UsuarioImprimio", Correos)) 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") Retorno = StreamPDF(Liga, DataSource, RptParametro, "ReporteIgnicion", "PDF", MR:=Nothing, RDSName:="DsOC")
Catch ex As Exception Catch ex As Exception
@@ -1075,7 +1075,7 @@ Public Class ClsSisNotificaciones
RptParametro.Add(New CrystalParametro("FechaInicio", FechaI.ToString)) RptParametro.Add(New CrystalParametro("FechaInicio", FechaI.ToString))
RptParametro.Add(New CrystalParametro("FechaFin", FechaF.ToString)) RptParametro.Add(New CrystalParametro("FechaFin", FechaF.ToString))
RptParametro.Add(New CrystalParametro("UsuarioImprimio", Correos)) 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")) RptParametro.Add(New CrystalParametro("TiempoMuerto", "10 Min"))
Retorno = StreamPDFCrystal(Liga, DataSource, RptParametro, NombreReporte, "PDF") 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("FechaInicio", FechaI.ToShortDateString))
RptParametro.Add(New ReportParameter("FechaFin", FechaF.ToShortDateString)) RptParametro.Add(New ReportParameter("FechaFin", FechaF.ToShortDateString))
RptParametro.Add(New ReportParameter("UsuarioImprimio", Correos)) 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") Retorno = StreamPDF(Liga, DataSource, RptParametro, "ReporteRalenti", "PDF", MR:=Nothing, RDSName:="DsOC")
Catch ex As Exception Catch ex As Exception
@@ -1171,7 +1171,7 @@ Public Class ClsSisNotificaciones
RptParametro.Add(New CrystalParametro("FechaInicio", FechaI.ToString)) RptParametro.Add(New CrystalParametro("FechaInicio", FechaI.ToString))
RptParametro.Add(New CrystalParametro("FechaFin", FechaF.ToString)) RptParametro.Add(New CrystalParametro("FechaFin", FechaF.ToString))
RptParametro.Add(New CrystalParametro("UsuarioImprimio", Correos)) 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") Retorno = StreamPDFCrystal(Liga, DataSource, RptParametro, "ReporteEvento", "PDF")
Catch ex As Exception Catch ex As Exception
@@ -1227,7 +1227,7 @@ Public Class ClsSisNotificaciones
RptParametro.Add(New ReportParameter("FechaFin", FechaF.ToShortDateString)) RptParametro.Add(New ReportParameter("FechaFin", FechaF.ToShortDateString))
RptParametro.Add(New ReportParameter("UsuarioImprimio", Correos)) RptParametro.Add(New ReportParameter("UsuarioImprimio", Correos))
RptParametro.Add(New ReportParameter("MapaURL", "")) 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") Retorno = StreamPDF(Liga, DataSource, RptParametro, "ReporteGeoReferencias", "PDF", MR:=Nothing, RDSName:="DsOC")
Catch ex As Exception Catch ex As Exception
@@ -1247,7 +1247,7 @@ Public Class ClsSisNotificaciones
RptParametro.Add(New ReportParameter("FechaFin", FechaF.ToShortDateString)) RptParametro.Add(New ReportParameter("FechaFin", FechaF.ToShortDateString))
RptParametro.Add(New ReportParameter("UsuarioImprimio", Correos)) RptParametro.Add(New ReportParameter("UsuarioImprimio", Correos))
RptParametro.Add(New ReportParameter("MapaURL", "")) 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") Retorno = StreamPDF(Liga, DataSource, RptParametro, "ReportePuntosInteres", "PDF", MR:=Nothing, RDSName:="DsOC")
Catch ex As Exception Catch ex As Exception
@@ -1709,7 +1709,7 @@ Public Class ClsSisNotificaciones
.lat = Lat, .lat = Lat,
.lng = Lng .lng = Lng
}, },
.timestamp = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") .timestamp = ClsPaginas.NowADS().ToString("yyyy-MM-dd HH:mm:ss")
} }
} }
} }

View File

@@ -3387,7 +3387,7 @@ Public Class ClsVentas
Dim Resp As RespuestaCancelacionSAT = ObjCancelacion.CFDICancelar(Usuario.Empresa, FolioFiscal, Total, RFCReceptor, Usuario.Empresa.RFC) Dim Resp As RespuestaCancelacionSAT = ObjCancelacion.CFDICancelar(Usuario.Empresa, FolioFiscal, Total, RFCReceptor, Usuario.Empresa.RFC)
If Resp.Verificado Then 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) CveVentasError.Add(PCveVenta.ToEntero)
End If End If
Else Else

View File

@@ -134,7 +134,9 @@ Public Class Empresa
Public Property FielPassword As String Public Property FielPassword As String
Public Property FielPFX As String Public Property FielPFX As String
Public Property AsuntoPlantillaMailVentaCotizacion As String Public Property AsuntoPlantillaMailVentaCotizacion As String
Public Property UTCHora As Integer
Public Property UTCOffset As Integer
Public Property CveZonaHoraria As Integer
Public Property PlantillaMailVentaCotizacion As String Public Property PlantillaMailVentaCotizacion As String
Dim Funcionalidades As HybridDictionary Dim Funcionalidades As HybridDictionary
'HybridDictionary, no se puede serializar, por eso no es propiedad, y se utilizar el setfuncionalidad, para asignarle valor 'HybridDictionary, no se puede serializar, por eso no es propiedad, y se utilizar el setfuncionalidad, para asignarle valor

View File

@@ -426,7 +426,7 @@ Public Class LogicNominas
Dim otrp = New CFDINominaOtrosPagos With {.TipoOtroPago = Row("SATCveConcepto").ToString(), .Clave = Row("Codigo").ToString(), .Concepto = Row("Concepto").ToString(), 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()} .Importe = Row("Importe").ToString().ToDecimal().Abs(), .Subsidiocausado = Row("ImporteValor").ToString().ToDecimal().Abs()}
If Row("SATCveConcepto").ToString().ToEntero() = 4 Then 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.SaldoAFavor = Row("ImporteValor").ToString().ToDecimal().Abs()
otrp.RemanenteSalFav = Row("ImporteValor").ToString().ToDecimal().Abs() - Row("Importe").ToString().ToDecimal().Abs() otrp.RemanenteSalFav = Row("ImporteValor").ToString().ToDecimal().Abs() - Row("Importe").ToString().ToDecimal().Abs()
End If End If
@@ -463,7 +463,7 @@ Public Class LogicNominas
cfdi.Comprobante.Version = If(versionTimbre = VersionTimbradoEnum.Version4_0, "4.0", "3.3") cfdi.Comprobante.Version = If(versionTimbre = VersionTimbradoEnum.Version4_0, "4.0", "3.3")
cfdi.Comprobante.Serie = Serie cfdi.Comprobante.Serie = Serie
cfdi.Comprobante.Folio = Folio 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.SubTotal = subTotalDb 'cfdi.Nomina.TotalPercepciones.ToString().ToDecimal() + cfdi.Nomina.TotalOtrosPagos.ToString().ToDecimal()
cfdi.Comprobante.Descuentos = cfdi.Nomina.TotalDeducciones.ToString().ToDecimal() cfdi.Comprobante.Descuentos = cfdi.Nomina.TotalDeducciones.ToString().ToDecimal()

View File

@@ -562,12 +562,12 @@ Namespace Modelos
Me.MonedaSAT = ClsPaginas.GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", $"CveMoneda = {CveMoneda} ") Me.MonedaSAT = ClsPaginas.GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", $"CveMoneda = {CveMoneda} ")
Me.RefDocto = "" Me.RefDocto = ""
' Me.CveMesa = -1 ' Me.CveMesa = -1
Me.Fecha = Now Me.Fecha = ClsPaginas.NowADS()
Me.CvePrePoliza = -1 Me.CvePrePoliza = -1
Me.FechaPago = Now Me.FechaPago = ClsPaginas.NowADS()
Me.MotivoDescuento = "" Me.MotivoDescuento = ""
Me.Observaciones = "" Me.Observaciones = ""
Me.FechaEjecucion = Now Me.FechaEjecucion = ClsPaginas.NowADS()
Me.CveCondicionEntrega = -1 Me.CveCondicionEntrega = -1
Me.CondicionEntrega = "" Me.CondicionEntrega = ""
Me.NumeroCuenta = "" Me.NumeroCuenta = ""
@@ -1292,12 +1292,12 @@ Namespace Modelos
ObjFactura.CveMoneda = CveMoneda ObjFactura.CveMoneda = CveMoneda
ObjFactura.Moneda = ClsPaginas.GlobalDTMonedas.FiltroPrimeroValor("Moneda", $"CveMoneda = {ObjFactura.CveMoneda} ") ObjFactura.Moneda = ClsPaginas.GlobalDTMonedas.FiltroPrimeroValor("Moneda", $"CveMoneda = {ObjFactura.CveMoneda} ")
ObjFactura.MonedaSAT = ClsPaginas.GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", $"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.TipoDocto = "Ing"
ObjFactura.RefDocto = "" ObjFactura.RefDocto = ""
ObjFactura.Folio = -1 ObjFactura.Folio = -1
ObjFactura.Serie = "-1" ObjFactura.Serie = "-1"
ObjFactura.Fecha = Now ObjFactura.Fecha = ClsPaginas.NowADS()
ObjFactura.CvePrePoliza = -1 ObjFactura.CvePrePoliza = -1
ObjFactura.CveMetodoPago = 1 ObjFactura.CveMetodoPago = 1
ObjFactura.MetodoPago = "Efectivo" ObjFactura.MetodoPago = "Efectivo"
@@ -2942,7 +2942,7 @@ Namespace Modelos
Dim CveMovimiento As Integer = -1 Dim CveMovimiento As Integer = -1
Try Try
Dim CveConceptoSalidaUsado As Integer = 45 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, 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") factura.CveSubProyecto, CveActivoFijo:=-1, Guia:="", Observaciones:="", CvePersonal:=-1, CveCliente:=factura.CveCliente, CveClienteSucursal:=-1, Modulo:="M/CU")
If CveMovimiento <= 0 Then If CveMovimiento <= 0 Then
@@ -3140,7 +3140,7 @@ Namespace Modelos
Dim TCFluctuacion As Decimal = tipoCambio Dim TCFluctuacion As Decimal = tipoCambio
'TOMA EL TC DE LA ULTIMA FLUCTUACION 'TOMA EL TC DE LA ULTIMA FLUCTUACION
If ValorMultiplicador = -1 AndAlso esMesAnterior AndAlso UsuarioActual.Empresa.Funcionalidad(703) = "1" AndAlso ObjFactura.CveMoneda = 2 Then 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 UsuarioActual.Empresa.Funcionalidad(703) = "1" AndAlso UltimaFluctuacion IsNot Nothing Then
If UltimaFluctuacion.FechaFluctuacion <= FechaCancelacion Then If UltimaFluctuacion.FechaFluctuacion <= FechaCancelacion Then
@@ -4274,7 +4274,7 @@ Namespace Modelos
End If End If
' GENERA EL MOVIMIENTO DE GARANTIA SI TIENE ' 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 OcurrioError = True
End If End If
@@ -4532,7 +4532,7 @@ Namespace Modelos
Dim ContadorMovtosDetalles As Integer = 0 Dim ContadorMovtosDetalles As Integer = 0
'Creamos el movimiento '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 If CveMovimientoInventario > 0 Then
@@ -5061,7 +5061,7 @@ Namespace Modelos
End If End If
'CANCELA FACTURA '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 If CancelarFactura(ObjVentas, ObjConta, ObjBancos) Then
Obj.Add(factura) Obj.Add(factura)
Else Else
@@ -5069,7 +5069,7 @@ Namespace Modelos
End If End If
Else Else
FacturaDevolucion.TipoDocto = "Egs" FacturaDevolucion.TipoDocto = "Egs"
FacturaDevolucion.Fecha = Now FacturaDevolucion.Fecha = ClsPaginas.NowADS()
If RegistrarNC(ObjVentas, ObjConta, ObjInventario, ObjContr, FacturaDevolucion, ObjBancos, TmpDTconceptos, ObjEventos) Then If RegistrarNC(ObjVentas, ObjConta, ObjInventario, ObjContr, FacturaDevolucion, ObjBancos, TmpDTconceptos, ObjEventos) Then
Obj.Add(FacturaDevolucion) Obj.Add(FacturaDevolucion)
Else Else
@@ -5420,13 +5420,13 @@ Namespace Modelos
CancelacionFecha = xmlAcuse.SelectSingleNode("Acuse").Attributes("Fecha").Value.ToDate() CancelacionFecha = xmlAcuse.SelectSingleNode("Acuse").Attributes("Fecha").Value.ToDate()
CveEstatus = 5 CveEstatus = 5
Else Else
CancelacionFecha = Now.Date CancelacionFecha = ClsPaginas.NowADS().Date
CancelacionAcuse = "" CancelacionAcuse = ""
CveEstatus = 5 CveEstatus = 5
End If End If
Catch ex As Exception Catch ex As Exception
GuardaLog(ex.ToString()) GuardaLog(ex.ToString())
CancelacionFecha = Now.Date CancelacionFecha = ClsPaginas.NowADS().Date
CancelacionAcuse = "" CancelacionAcuse = ""
End Try End Try
@@ -5436,7 +5436,7 @@ Namespace Modelos
If Resp.Verificado Then If Resp.Verificado Then
'GENERAMOS EL ACUSE Y MANDAMOS MAIL DE CON EL ACUSE DE CANCELACIÓN 'GENERAMOS EL ACUSE Y MANDAMOS MAIL DE CON EL ACUSE DE CANCELACIÓN
If RequiereAceptacion Then If RequiereAceptacion Then
CancelacionFecha = Now.Date CancelacionFecha = ClsPaginas.NowADS().Date
CveEstatus = 20 CveEstatus = 20
Else Else
CancelacionFecha = ObjCancelacion.CancelacionFecha CancelacionFecha = ObjCancelacion.CancelacionFecha
@@ -5478,7 +5478,7 @@ Namespace Modelos
CveEstatus = 20 CveEstatus = 20
ContinuarCancelacion = False ContinuarCancelacion = False
RequiereAceptacion = True RequiereAceptacion = True
CancelacionFecha = Now.Date CancelacionFecha = ClsPaginas.NowADS().Date
CancelacionAcuse = "" CancelacionAcuse = ""
End If End If
End If End If
@@ -5491,7 +5491,7 @@ Namespace Modelos
Else Else
ObtenerAcuse = False ObtenerAcuse = False
ContinuarCancelacion = True ContinuarCancelacion = True
CancelacionFecha = Now.Date CancelacionFecha = ClsPaginas.NowADS().Date
CancelacionAcuse = "" CancelacionAcuse = ""
'VERICA SI YA SE TIENE EL ESTADO DE CANCELACION, PARA SABER SI REQUIERE ACEPTACION 'VERICA SI YA SE TIENE EL ESTADO DE CANCELACION, PARA SABER SI REQUIERE ACEPTACION
@@ -5502,7 +5502,7 @@ Namespace Modelos
RequiereAceptacion = True RequiereAceptacion = True
End If End If
Else 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 If ObjFactura.Total < 1000D OrElse diasTimbrado <= 1 OrElse ObjFactura.Cliente.RFC.Contiene("XAXX010101000", "XEXX010101000") Then
RequiereAceptacion = False RequiereAceptacion = False
@@ -5517,7 +5517,7 @@ Namespace Modelos
If Resp.Verificado Then If Resp.Verificado Then
'GENERAMOS EL ACUSE Y MANDAMOS MAIL DE CON EL ACUSE DE CANCELACIÓN 'GENERAMOS EL ACUSE Y MANDAMOS MAIL DE CON EL ACUSE DE CANCELACIÓN
'If Resp.cve Then 'If Resp.cve Then
' CancelacionFecha = Now.Date ' CancelacionFecha = ClsPaginas.NowADS().Date
' CveEstatus = 20 ' CveEstatus = 20
'Else 'Else
' CancelacionFecha = ObjCancelacion.CancelacionFecha ' CancelacionFecha = ObjCancelacion.CancelacionFecha
@@ -5534,16 +5534,16 @@ Namespace Modelos
Return Retorno Return Retorno
End If End If
Else Else
CancelacionFecha = Now.Date CancelacionFecha = ClsPaginas.NowADS().Date
CancelacionAcuse = "" CancelacionAcuse = ""
End If End If
End If End If
Else Else
CancelacionFecha = Now.Date CancelacionFecha = ClsPaginas.NowADS().Date
CancelacionAcuse = "" CancelacionAcuse = ""
End If End If
Else Else
CancelacionFecha = Now.Date CancelacionFecha = ClsPaginas.NowADS().Date
CancelacionAcuse = "" CancelacionAcuse = ""
End If End If
Catch ex As Exception Catch ex As Exception
@@ -5558,7 +5558,7 @@ Namespace Modelos
End Try End Try
Else Else
CveEstatus = CveEstatusFacturaAsignado 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 CancelacionAcuse = AcuseCancelacion
End If End If
@@ -5794,7 +5794,7 @@ Namespace Modelos
'SI TIENE SALDO PENDIENTE POR DEVOLVER GENERA UN MOVIMIENTO DE DEVOLUCION 'SI TIENE SALDO PENDIENTE POR DEVOLVER GENERA UN MOVIMIENTO DE DEVOLUCION
If ObjFactura.SaldoAlmacen <> 0 Then 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) '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 Folio = ObjInventario.Folio
If CveMovimientoDevolucion > 0 Then If CveMovimientoDevolucion > 0 Then
@@ -5837,7 +5837,7 @@ Namespace Modelos
End If End If
If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa) Then 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 CveCliente As Integer = ObjVentas.DtResultados(0)("CveCliente").ToString.ToEntero
Dim ClienteNombre As String = ObjVentas.DtResultados(0)("ClienteNombre").ToString Dim ClienteNombre As String = ObjVentas.DtResultados(0)("ClienteNombre").ToString
Dim SerieFolio As String = ObjVentas.DtResultados(0)("SerieFolio").ToString Dim SerieFolio As String = ObjVentas.DtResultados(0)("SerieFolio").ToString
@@ -5890,7 +5890,7 @@ Namespace Modelos
End If End If
End If End If
Else Else
ErrorCancelar = True ErrorCancelar = True
MensajeError = "Ocurrió un Error al ingresar las prepolizas" MensajeError = "Ocurrió un Error al ingresar las prepolizas"
End If End If
End If End If
@@ -6025,7 +6025,7 @@ Namespace Modelos
'CANCELAR MOVIMIENTOS DE GARANTIA SI TIENE 'CANCELAR MOVIMIENTOS DE GARANTIA SI TIENE
If Not ErrorCancelar AndAlso UsuarioActual.Empresa.Funcionalidad(531) = "1" Then 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 ErrorCancelar = True
End If End If
End If End If
@@ -6134,7 +6134,7 @@ Namespace Modelos
'CANCELAR MOVIMIENTOS DE GARANTIA SI TIENE 'CANCELAR MOVIMIENTOS DE GARANTIA SI TIENE
If Not ErrorCancelar AndAlso UsuarioActual.Empresa.Funcionalidad(531) = "1" Then 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 ErrorCancelar = True
End If End If
End If End If
@@ -6297,7 +6297,7 @@ Namespace Modelos
End If End If
Else Else
If Not ObjVentas.UpdateEstatusFactura(CveEstatus, FolioFiscal, CancelacionAcuse, CancelacionFecha, CveVenta, IDPoliza, CvePAC:=CvePACCancelacion, CveEstatusRefacturacion:=CveEstatusRefacturacion, 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 MotivoCancelacion:=MotivoCancelacion, EstadoCancelacion:=EstadoCancelacion, CveEstadoCancelacion:=CveEstadoCancelacion, SelloSolicitudDigitalSAT:=SolicitudCancelacionAcuse) Then
ErrorCancelar = True ErrorCancelar = True
MensajeError = "Ocurrió un error al guardar el estatus de cancelación." MensajeError = "Ocurrió un error al guardar el estatus de cancelación."
@@ -6418,7 +6418,7 @@ Namespace Modelos
Dim CveMovimientoRelacionadoVirtual As Integer = CveMovimiento Dim CveMovimientoRelacionadoVirtual As Integer = CveMovimiento
If DtPSVirtual IsNot Nothing AndAlso DtPSVirtual.Rows.Count > 0 AndAlso CveAlmacenVirtual > 0 AndAlso CveConceptoMovimientoVirtual > 0 Then 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") Observaciones:="", Guia:="", CveMovimientoRelacionado:=CveMovimientoRelacionadoVirtual, Modulo:="Modelos/CancelarVirtual")
If CveMovimientoVirtual > 0 Then If CveMovimientoVirtual > 0 Then
@@ -6497,7 +6497,7 @@ Namespace Modelos
Dim CveMovimientoRelacionadoVirtual As Integer = CveMovimientoDevolucion Dim CveMovimientoRelacionadoVirtual As Integer = CveMovimientoDevolucion
If DtPSVirtual IsNot Nothing AndAlso DtPSVirtual.Rows.Count > 0 AndAlso CveAlmacenVirtual > 0 AndAlso CveConceptoMovimientoVirtual > 0 Then 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") Observaciones:="", Guia:="", CveMovimientoRelacionado:=CveMovimientoRelacionadoVirtual, Modulo:="Modelos/CancelarVirtual")
If CveMovimientoVirtual > 0 Then If CveMovimientoVirtual > 0 Then
@@ -6585,11 +6585,11 @@ Namespace Modelos
End If End If
'SALIDA GENERAL '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 FolioMovimientoSalidaDevRem = ObjInventario.Folio
'ENTRADA ADELANTADO '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 FolioMovimientoEntradaDevRem = ObjInventario.Folio
If Not (CveMovimientoSalidaDevRem > 0 And CveMovimientoEntradaDevRem > 0) Then If Not (CveMovimientoSalidaDevRem > 0 And CveMovimientoEntradaDevRem > 0) Then
@@ -6666,7 +6666,7 @@ Namespace Modelos
Dim CveMovimientoEntradaDevRem As Integer = 0 Dim CveMovimientoEntradaDevRem As Integer = 0
Dim FolioMovimientoEntradaDevRem As Integer = 0 Dim FolioMovimientoEntradaDevRem As Integer = 0
Dim Fecha As DateTime = Now Dim Fecha As DateTime = ClsPaginas.NowADS()
'SALIDA DE (ENTREGA POR ADELANTADO) '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") 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 For Each Dr As DataRow In DtTempApartados.Rows
If CveMovimientoSalidaApartado = -1 Or CveAlmacenApartado <> Dr("CveAlmacen").ToString.ToEntero Then 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 FolioSalida = ObjInventario.Folio
CveAlmacenApartado = Dr("CveAlmacen").ToString.ToEntero CveAlmacenApartado = Dr("CveAlmacen").ToString.ToEntero
@@ -6800,7 +6800,7 @@ Namespace Modelos
For Each Dr1 As DataRow In DtTraspasos.Rows For Each Dr1 As DataRow In DtTraspasos.Rows
CveMovimientoSalida = Dr1("CveMovimientoSalida").ToString.ToEntero 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 FolioEntrada = ObjInventario.Folio
If Not CveMovimientoEntradaApartado > 0 Then If Not CveMovimientoEntradaApartado > 0 Then
@@ -6859,7 +6859,7 @@ Namespace Modelos
End If 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.CveVenta = CveVenta
FacturaDevolucion.CvePrePoliza = CvePrePoliza FacturaDevolucion.CvePrePoliza = CvePrePoliza
@@ -6879,7 +6879,7 @@ Namespace Modelos
If CveEstatus = 4 Then 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" Mensaje = "El nuevo estatus se guardó correctamente"
Else Else
ErrorCancelar = True ErrorCancelar = True
@@ -6901,7 +6901,7 @@ Namespace Modelos
Dim Total As Decimal = Me.Total Dim Total As Decimal = Me.Total
Dim RFCReceptor As String = Me.Cliente.RFC 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 ErrorCancelar = True
End If End If
@@ -6920,7 +6920,7 @@ Namespace Modelos
'End If 'End If
If Not ErrorCancelar Then 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" Mensaje = "El nuevo estatus se guardó correctamente"
Else Else
ErrorCancelar = True ErrorCancelar = True
@@ -7007,7 +7007,7 @@ Namespace Modelos
' Else ' Else
' Dim DTPresupuestoIngresos As New DataTable ' Dim DTPresupuestoIngresos As New DataTable
' Dim AC As New ClsAC ' 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() ' DTPresupuestoIngresos = AC.DtResultados.Copy()
' End If ' End If
' AC.Dispose() ' AC.Dispose()
@@ -7202,7 +7202,7 @@ Namespace Modelos
Public ReadOnly Property FechaCP As DateTime Public ReadOnly Property FechaCP As DateTime
Get Get
If Me.SubProyecto IsNot Nothing Then If Me.SubProyecto IsNot Nothing Then
If Now.EsHorarioVerano Then If ClsPaginas.NowADS().EsHorarioVerano Then
Return DateTime.UtcNow.AddHours(Me.SubProyecto.UTCOffsetVerano) Return DateTime.UtcNow.AddHours(Me.SubProyecto.UTCOffsetVerano)
Else Else
Return DateTime.UtcNow.AddHours(Me.SubProyecto.UTCOffsetInvierno) Return DateTime.UtcNow.AddHours(Me.SubProyecto.UTCOffsetInvierno)

View File

@@ -16,7 +16,7 @@ Public Class Thalamus
<WebMethod()> <WebMethod()>
Public Function GenerarArchivos(CveEmpresa As Integer) As Boolean 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 Dim DTVentas As New DataTable
DTVentas.Columns.Add("systemId") DTVentas.Columns.Add("systemId")
@@ -34,7 +34,7 @@ Public Class Thalamus
dr(0) = $"systemId {x}" dr(0) = $"systemId {x}"
dr(1) = $"Branch {x}" dr(1) = $"Branch {x}"
dr(2) = $"{x}" dr(2) = $"{x}"
dr(3) = $"{Now.ToString("yyyy-MM-dd")}" dr(3) = $"{ClsPaginas.NowADS().ToString("yyyy-MM-dd")}"
dr(4) = $"{x}" dr(4) = $"{x}"
dr(5) = $"{x}.00" dr(5) = $"{x}.00"
dr(6) = $"{x}" dr(6) = $"{x}"

View File

@@ -298,7 +298,7 @@ Public Class Timbrado
MsgCancelacion.AppendFormat("-3.2") MsgCancelacion.AppendFormat("-3.2")
Dim resultadoCancelacion As Profact.TimbraCFDI.ResultadoCancelacionAck Dim resultadoCancelacion As Profact.TimbraCFDI.ResultadoCancelacionAck
resultadoCancelacion = conector.CancelaCFDIAck40(RFCEmisor, FolioFiscal, CodigoSATMotivoCancelacion, FolioSustitucion) resultadoCancelacion = conector.CancelaCFDIAck40(RFCEmisor, FolioFiscal, CodigoSATMotivoCancelacion, FolioSustitucion)
CancelacionFecha = Now CancelacionFecha = ClsPaginas.NowADS()
resp = conector.ObtieneCFDI(RFCEmisor, FolioFiscal) resp = conector.ObtieneCFDI(RFCEmisor, FolioFiscal)
MsgCancelacion.AppendFormat("-3.3") MsgCancelacion.AppendFormat("-3.3")
@@ -408,7 +408,7 @@ Public Class Timbrado
End Try End Try
#End Region #End Region
objCan.CancelacionCfdi = True 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-") MsgCancelacion.AppendFormat("4.3-")
objCan.GeneraCancelacionB64(certBase64, llaveBase64, Clave, FolioFiscal, CodigoSATMotivoCancelacion, FolioSustitucion) objCan.GeneraCancelacionB64(certBase64, llaveBase64, Clave, FolioFiscal, CodigoSATMotivoCancelacion, FolioSustitucion)
If (objCan.MensajeError = "") Then If (objCan.MensajeError = "") Then
@@ -504,7 +504,7 @@ Public Class Timbrado
If cancelacion IsNot Nothing Then If cancelacion IsNot Nothing Then
'EN PROCESO, CANCELABLE SIN ACEPTACION,CANCEALDO PREVIAMENTE 'EN PROCESO, CANCELABLE SIN ACEPTACION,CANCEALDO PREVIAMENTE
If cancelacion.codigo.Contiene("96", "201", "202") Then If cancelacion.codigo.Contiene("96", "201", "202") Then
CancelacionFecha = Now CancelacionFecha = ClsPaginas.NowADS()
CancelacionAcuse = result.acuseCancelBase64 CancelacionAcuse = result.acuseCancelBase64
Retorno.Verificado = True Retorno.Verificado = True
@@ -3330,8 +3330,8 @@ Public Class Timbrado
Dim ArchivoW As StreamWriter Dim ArchivoW As StreamWriter
Dim strLineaTMP As String Dim strLineaTMP As String
' strLineaTMP = Chr(13) & Chr(10) & Day(Now) & "/" & Month(Now) & "/" & Year(Now) & " " & Hour(Now) & ":" & Minuto & ". " & Str & Chr(13) & Chr(10) ' 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, DateTime.Now.ToShortDateString, DateTime.Now.ToShortTimeString) strLineaTMP = String.Format("{0}{1} .. PAC: {2} - {3} ..{4}:{5}", Chr(13), Chr(10), CvePAC, Str, ClsPaginas.NowADS().ToShortDateString, ClsPaginas.NowADS().ToShortTimeString)
Try Try
ArchivoW = New StreamWriter(String.Format("{0}\LogTimbrado.txt", AppDomain.CurrentDomain.BaseDirectory), True, System.Text.Encoding.UTF8) ArchivoW = New StreamWriter(String.Format("{0}\LogTimbrado.txt", AppDomain.CurrentDomain.BaseDirectory), True, System.Text.Encoding.UTF8)
Catch ex As UnauthorizedAccessException Catch ex As UnauthorizedAccessException

View File

@@ -56,9 +56,9 @@ Public Class Timbres
ObjFactura.TipoDocto = TipoDocto ObjFactura.TipoDocto = TipoDocto
ObjFactura.TipoComprobante = "T" ObjFactura.TipoComprobante = "T"
ObjFactura.Fecha = Now ObjFactura.Fecha = ClsPaginas.NowADS()
ObjFactura.FechaPago = Now ObjFactura.FechaPago = ClsPaginas.NowADS()
ObjFactura.FechaEjecucion = Now ObjFactura.FechaEjecucion = ClsPaginas.NowADS()
ObjFactura.UsuarioCreo = UsuarioActual.Usuario ObjFactura.UsuarioCreo = UsuarioActual.Usuario
ObjFactura.TipoDocumento = "Traspaso" ObjFactura.TipoDocumento = "Traspaso"

View File

@@ -71,9 +71,9 @@ Public Class Usuario
Public ReadOnly Property FechaActualCliente As DateTime Public ReadOnly Property FechaActualCliente As DateTime
Get Get
If UTCOffset <> 0 Then If UTCOffset <> 0 Then
FechaActualCliente = DateTime.Now.AddMinutes(UTCOffset + 10) FechaActualCliente = ClsPaginas.NowADS().AddMinutes(UTCOffset + 10)
Else Else
FechaActualCliente = DateTime.Now FechaActualCliente = ClsPaginas.NowADS()
End If End If
End Get End Get
End Property 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 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 = DirectCast(HttpContext.Current.Session(strsessionid), ADSSessionObj)
obj.Modulo = modulo obj.Modulo = modulo
obj.LastPostback = DateTime.Now obj.LastPostback = ClsPaginas.NowADS()
If _dicSessionobj.TryGetValue(obj.SessionID, obj) Then If _dicSessionobj.TryGetValue(obj.SessionID, obj) Then
obj.Modulo = modulo obj.Modulo = modulo
obj.LastPostback = DateTime.Now obj.LastPostback = ClsPaginas.NowADS()
End If End If
retorno = obj retorno = obj
End If End If
@@ -321,7 +321,7 @@ Namespace ADSSession
Public Sub New(CveUsuario As Integer, CveEmpresa As Integer) Public Sub New(CveUsuario As Integer, CveEmpresa As Integer)
Me.CveUsuario = CveUsuario Me.CveUsuario = CveUsuario
Me.CveEmpresa = CveEmpresa Me.CveEmpresa = CveEmpresa
FechaLogin = DateTime.Now FechaLogin = ClsPaginas.NowADS()
_SessionID = "" _SessionID = ""
_ipAdrres = "" _ipAdrres = ""
Try Try

View File

@@ -24,8 +24,8 @@ Namespace SIG
Dim respuesta As Data.DataTable = Nothing 'New With {.Correcto = False, .Mensaje = "", .Datos = New JObject} Dim respuesta As Data.DataTable = Nothing 'New With {.Correcto = False, .Mensaje = "", .Datos = New JObject}
Dim CveCliente As Integer = -1 Dim CveCliente As Integer = -1
Dim FechaI As DateTime = DateTime.Now Dim FechaI As DateTime = ClsPaginas.NowADS()
Dim FechaF As DateTime = DateTime.Now Dim FechaF As DateTime = ClsPaginas.NowADS()
Dim CveIE As Integer = -1 Dim CveIE As Integer = -1
Dim CveVenta As Integer = -1 Dim CveVenta As Integer = -1
Dim opcion As Integer = -1 Dim opcion As Integer = -1
@@ -67,7 +67,7 @@ Namespace SIG
respuesta.AcceptChanges() respuesta.AcceptChanges()
Dim thencommit As Boolean = True Dim thencommit As Boolean = True
Banco.IniciaTransacSQL() 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() Dim CveComplementoPagoSinc As Integer = Banco.DtResultados.Rows(0)("CveComplementoPagoSinc").ToString().ToEntero()
For Each dr As System.Data.DataRow In respuesta.Select("CveVenta Is NULL") 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) 'CveComplementoPagoTimbre = Banco.AddComplementoPago(dr("CveIE").ToString().ToEntero(), -1, Serie, Folio, Me.CveUsuario, CveEmpresa, CvePrePoliza:=-1, Estatus:=1)

View File

@@ -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) 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 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() Token = diferencia.ToString("N0").ToEntero()
End If End If
End If End If

View File

@@ -25,7 +25,7 @@
' FechaPeticion = FechaPeticion.AddMinutes(Token) ' FechaPeticion = FechaPeticion.AddMinutes(Token)
' Dim CveEmpresa As Integer = dataArray(4) ' 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 ' If diferencia < 30 Then
' noautorizado = False ' noautorizado = False
' End If ' End If

View File

@@ -19,7 +19,7 @@ Public Class WsSIGWeb
End Function End Function
Private Function notcurrentdate(fecha As DateTime) As Boolean 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 End Function

View File

@@ -297,8 +297,8 @@ Namespace Extensiones
End If End If
Catch Catch
End Try End Try
' strLineaTMP = Chr(13) & Chr(10) & Day(Now) & "/" & Month(Now) & "/" & Year(Now) & " " & Hour(Now) & ":" & Minuto & ". " & Str & Chr(13) & Chr(10) ' 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, DateTime.Now.ToShortDateString, DateTime.Now.ToShortTimeString, Urlstring) strLineaTMP = String.Format("{0}{1}Log: {5}{2}{3}:{4}", Chr(13), Chr(10), Str, ClsPaginas.NowADS().ToShortDateString, ClsPaginas.NowADS().ToShortTimeString, Urlstring)
Try Try
ArchivoW = New StreamWriter(String.Format("{0}\Log\Log.txt", AppDomain.CurrentDomain.BaseDirectory), True, System.Text.Encoding.UTF8) ArchivoW = New StreamWriter(String.Format("{0}\Log\Log.txt", AppDomain.CurrentDomain.BaseDirectory), True, System.Text.Encoding.UTF8)
Catch ex As UnauthorizedAccessException Catch ex As UnauthorizedAccessException
@@ -326,7 +326,7 @@ Namespace Extensiones
Public Sub GuardaLogAD(Mensaje As String, Optional Archivo As String = "Log") Public Sub GuardaLogAD(Mensaje As String, Optional Archivo As String = "Log")
Dim ArchivoW As StreamWriter 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 Try
ArchivoW = New StreamWriter(String.Format("{0}\Log\{1}.txt", AppDomain.CurrentDomain.BaseDirectory, Archivo), True, System.Text.Encoding.UTF8) 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 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 Try
ArchivoW = New StreamWriter(String.Format("{0}\Log\Log.txt", AppDomain.CurrentDomain.BaseDirectory), True, System.Text.Encoding.UTF8) ArchivoW = New StreamWriter(String.Format("{0}\Log\Log.txt", AppDomain.CurrentDomain.BaseDirectory), True, System.Text.Encoding.UTF8)
Catch ex As Exception Catch ex As Exception
@@ -372,7 +372,7 @@ Namespace Extensiones
Public Sub GuardaLogMail(pTexto As String) Public Sub GuardaLogMail(pTexto As String)
Dim ArchivoW As StreamWriter Dim ArchivoW As StreamWriter
Dim strLineaTMP As String 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 Try
ArchivoW = New StreamWriter(String.Format("{0}\Log\LogMail.txt", AppDomain.CurrentDomain.BaseDirectory), True, System.Text.Encoding.UTF8) ArchivoW = New StreamWriter(String.Format("{0}\Log\LogMail.txt", AppDomain.CurrentDomain.BaseDirectory), True, System.Text.Encoding.UTF8)
Catch ex As Exception Catch ex As Exception
@@ -391,8 +391,8 @@ Namespace Extensiones
Dim ArchivoW As StreamWriter Dim ArchivoW As StreamWriter
Dim strLineaTMP As String Dim strLineaTMP As String
' strLineaTMP = Chr(13) & Chr(10) & Day(Now) & "/" & Month(Now) & "/" & Year(Now) & " " & Hour(Now) & ":" & Minuto & ". " & Str & Chr(13) & Chr(10) ' 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, DateTime.Now.ToShortDateString, DateTime.Now.ToShortTimeString) 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 Try
ArchivoW = New StreamWriter(String.Format("{0}\Log\LogTimbrado.txt", AppDomain.CurrentDomain.BaseDirectory), True, System.Text.Encoding.UTF8) ArchivoW = New StreamWriter(String.Format("{0}\Log\LogTimbrado.txt", AppDomain.CurrentDomain.BaseDirectory), True, System.Text.Encoding.UTF8)
Catch ex As UnauthorizedAccessException Catch ex As UnauthorizedAccessException
@@ -414,7 +414,7 @@ Namespace Extensiones
Public Sub GuardaLogCancelacionSAT(pTexto As String) Public Sub GuardaLogCancelacionSAT(pTexto As String)
Dim ArchivoW As StreamWriter Dim ArchivoW As StreamWriter
Dim strLineaTMP As String 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 Try
ArchivoW = New StreamWriter(String.Format("{0}\Log\LogCancelacionSAT.txt", AppDomain.CurrentDomain.BaseDirectory), True, System.Text.Encoding.UTF8) 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 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 Titulo As String = ""
Dim Plus As String = DateTime.Now.Ticks.ToString Dim Plus As String = ClsPaginas.NowADS().Ticks.ToString
Dim headerclas As String = "" Dim headerclas As String = ""
Dim showalert = True Dim showalert = True
@@ -545,7 +545,7 @@ Namespace Extensiones
script = String.Format("alertatoast({3},'{0}',function(){{{1}}},{2});", Mensaje, JSBtnAceptar, TimeoutToast, DirectCast(pOpcion, Integer)) script = String.Format("alertatoast({3},'{0}',function(){{{1}}},{2});", Mensaje, JSBtnAceptar, TimeoutToast, DirectCast(pOpcion, Integer))
End If 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 Pag = Nothing
Catch ex As Exception Catch ex As Exception
Mensaje.GuardaLog(String.Format("Error Alert : {0}", Mensaje)) 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 If System.Web.HttpContext.Current IsNot Nothing AndAlso System.Web.HttpContext.Current.CurrentHandler IsNot Nothing Then
Dim Img, Botones As String Dim Img, Botones As String
Dim Titulo 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, "") Mensaje = Mensaje.Replace("'"c, "\'").Replace(vbCrLf, "")
JSBtnAceptar = JSBtnAceptar.Replace("'"c, "\'") JSBtnAceptar = JSBtnAceptar.Replace("'"c, "\'")
@@ -587,8 +587,8 @@ Namespace Extensiones
Try Try
Dim Pag As Page = DirectCast(System.Web.HttpContext.Current.CurrentHandler, Page) 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(), (NowADS().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(), (ClsPaginas.NowADS().Ticks + 1).ToString(), String.Format("MuestraAlerta('{0}','{1}','{2}','{3}','{4}');", Titulo, Mensaje, Img, Botones, JSBtnAceptar), True)
Pag = Nothing Pag = Nothing
Catch ex As Exception 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) 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 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 Importe As Double
Dim tCveEmpresa As Integer = tEmpresa.CveEmpresa Dim tCveEmpresa As Integer = tEmpresa.CveEmpresa
Dim CveTipoTransaccion, CveProveedor, CvePersonal As Integer Dim CveTipoTransaccion, CveProveedor, CvePersonal As Integer
@@ -2100,7 +2100,7 @@ Namespace Extensiones
worksheet.Rows(IndexEndTable + 1).Cells(1).Value = Usuario.Nombre worksheet.Rows(IndexEndTable + 1).Cells(1).Value = Usuario.Nombre
worksheet.Rows(IndexEndTable).Cells(3).Value = "Fecha Impresión" 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)) 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 + 1).Cells(2).Value = Usuario.Nombre
worksheet.Rows(IndexEndTable).Cells(6).Value = "Fecha Impresión" 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") 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 + 1).Cells(2).Value = Usuario.Nombre
worksheet.Rows(IndexEndTable).Cells(6).Value = "Fecha Impresión" 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") 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 If fechaI IsNot Nothing Or fechaF IsNot Nothing Then
table.AddCell(New Element.Paragraph(String.Format("Inicio: {0} Fin: {1}", fechaI, fechaF)).SetFontSize(10)) table.AddCell(New Element.Paragraph(String.Format("Inicio: {0} Fin: {1}", fechaI, fechaF)).SetFontSize(10))
Else 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 End If
document.Add(Borderless(table)) document.Add(Borderless(table))
'FIN ENCABEZADO 'FIN ENCABEZADO
@@ -2905,7 +2905,7 @@ Namespace Extensiones
'SECCIÓN PIE REPORTE 'SECCIÓN PIE REPORTE
table = New Element.Table(UnitValue.CreatePercentArray(New Single() {2, 1.25})) 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("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)) document.Add(Borderless(table))
'FIN PIE 'FIN PIE
@@ -2915,7 +2915,7 @@ Namespace Extensiones
If fechaI IsNot Nothing Or fechaF IsNot Nothing Then 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"))) 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 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 End If
HttpContext.Current.Response.Cache.SetCacheability(HttpCacheability.NoCache) HttpContext.Current.Response.Cache.SetCacheability(HttpCacheability.NoCache)
'HtmlConverter.ConvertToPdf(sw.ToString(), HttpContext.Current.Response.OutputStream) 'HtmlConverter.ConvertToPdf(sw.ToString(), HttpContext.Current.Response.OutputStream)
@@ -3892,7 +3892,7 @@ Namespace Extensiones
FechaPeticion = FechaPeticion.AddMinutes(Token) FechaPeticion = FechaPeticion.AddMinutes(Token)
Dim CveEmpresa As Integer = dataArray(4).ToEntero() 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) 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" 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"

View File

@@ -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" ' '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") ' Str.Append("-----xwsRed:3")
' 'debemos de saccar la clave electoral ' 'debemos de saccar la clave electoral
@@ -136,7 +136,7 @@ Public Class wsRedes
Dim Fecha As DateTime Dim Fecha As DateTime
Fecha = ArrCadena(0).ToString.ToDate 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" '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 Dim Tipo As New ClsProspectos

View File

@@ -37,7 +37,7 @@ Public Class wsSIG
Usuario = ArrCadena(0) : Contrasenia = ArrCadena(1) : IMEI = ArrCadena(2) : Version = ArrCadena(3) : Fecha = ArrCadena(4).ToString.ToDate 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" '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 ttDato As Usuario
Dim tUsuario As New ClsSisUsuarios Dim tUsuario As New ClsSisUsuarios
@@ -88,7 +88,7 @@ Public Class wsSIG
validatesubproyecto = True validatesubproyecto = True
End If 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" '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 Dim ttDato As Usuario = Nothing
Using tUsuario As New ClsSisUsuarios() Using tUsuario As New ClsSisUsuarios()
@@ -141,7 +141,7 @@ Public Class wsSIG
' IMEI = ArrCadena(0) : Tipo = ArrCadena(1).ToEntero : Fecha = ArrCadena(2).ToString.ToDate ' 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" ' '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 ' Dim tUsuario As New ClsSisUsuarios
@@ -166,7 +166,7 @@ Public Class wsSIG
Dim Fecha, FechaColonias As DateTime Dim Fecha, FechaColonias As DateTime
IMEI = ArrCadena(0) : FechaColonias = ArrCadena(1).ToString.ToDate : Fecha = ArrCadena(2).ToString.ToDate 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" '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 'Dim Tipo As New ClsCircuitos
'ds = Tipo.GetTablas(IMEI, FechaColonias) 'ds = Tipo.GetTablas(IMEI, FechaColonias)
'Tipo.Dispose() 'Tipo.Dispose()
@@ -188,7 +188,7 @@ Public Class wsSIG
Dim Fecha As DateTime Dim Fecha As DateTime
IMEI = ArrCadena(0) : CveEmpresa = ArrCadena(1).ToString.ToEntero : Fecha = ArrCadena(2).ToString.ToDate 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" '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 Dim Prosp As New ClsProspectos
ds = Prosp.GetProspectosTablas(IMEI, CveEmpresa) ds = Prosp.GetProspectosTablas(IMEI, CveEmpresa)
@@ -211,7 +211,7 @@ Public Class wsSIG
Dim Fecha As DateTime Dim Fecha As DateTime
CveUsuario = ArrCadena(0).ToEntero : IMEI = ArrCadena(1) : CveEmpresa = ArrCadena(2).ToString.ToEntero : Fecha = ArrCadena(3).ToString.ToDate 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" '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 Dim Evento As New ClsOIEventos
If Evento.GetAgendas(CveUsuario, CveEmpresa) Then 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 CveUsuarioIng = ArrCadena(26).ToEntero : CveEmpresa = ArrCadena(27).ToString.ToEntero : FechaEnvio = ArrCadena(28).ToString.ToDate
FechaEnvio = ArrCadena(29).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" '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 Dim Evento As New ClsOIEventos
If Evento.AddEvento(CveTipoEvento, CveAgendaTipo, Asunto, Descripcion, Prioridad, CveUsuarioDe, CveUsuarioPara, FechaInicio, FechaFin, 0, CveRevision, Archivo, CveUsuarioIng, CveEmpresa, 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 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" '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 Dim Evento As New ClsOIEventos
Retorno = Evento.FinalizaEvento(FechaFin, CveEstatusEvento, Geom, CveEvento) 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) 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 = ArrCadena(6).ToString.ToDate
Fecha.ToShortDateString().GuardaLog() 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 Dir As String = String.Format("{0}Empresas\{1}\", ModExtensiones.DirectorioBaseEmpresas, pCveEmpresa)
Dim Ruta As String = "" Dim Ruta As String = ""
Dim RutaDB3 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 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" '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") 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" '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") 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 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" '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") Str.Append("-----xwsAdd:3")
@@ -579,7 +579,7 @@ Public Class wsSIG
CveProspecto = ArrCadena(0).ToEntero : CveEmpresa = ArrCadena(1).ToEntero : FechaEnvio = ArrCadena(2).ToString.ToDate 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" '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 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 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" '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 Dim Cont As New ClsContratos
@@ -650,7 +650,7 @@ Public Class wsSIG
CveContratoSeccion = ArrCadena(0).ToEntero : Geom = ArrCadena(1) : FechaEnvio = ArrCadena(2).ToString.ToDate 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" '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 Dim Cont As New ClsContratos
Cadena.GuardaLog() Cadena.GuardaLog()

View File

@@ -238,7 +238,7 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
If Not cevent.recurrenciatipo > 0 Then If Not cevent.recurrenciatipo > 0 Then
'AGREGAMOS CUANDO NO ES RECURRENTE '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 '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 If dr("FechaFin").ToString.ToDateTime > tFecha Or dr("FechaInicio").ToString.ToDateTime > tFecha Then
events.Add(cevent) events.Add(cevent)
@@ -319,7 +319,7 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
End If 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 '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) events.Add(cevent)
End If End If
Next Next
@@ -359,7 +359,7 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
End If End If
'SI LA FECHA DEL EVENTO ES MENOR DE 6 MESES DE LA FECHA ACTUAL NO LO AGREGA '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) events.Add(cevent)
End If End If
End If End If

View File

@@ -255,7 +255,7 @@ Public Class E119 : Implements IHttpHandler
End If End If
End Using 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") Msg.GuardaLogAD("LogE119")
If TieneError Then If TieneError Then
@@ -288,7 +288,7 @@ Public Class E119 : Implements IHttpHandler
TieneError = True TieneError = True
End Try 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") Msg.GuardaLogAD("LogE119")
If TieneError Then If TieneError Then

View File

@@ -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") 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)) 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 End If
parametros.Add(New ReportParameter("UsuarioImprimio", "Sistema")) 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("SubProyecto", Sucursal))
parametros.Add(New ReportParameter("Agente", Vendedor)) parametros.Add(New ReportParameter("Agente", Vendedor))
@@ -216,7 +216,7 @@ Public Class E140 : Implements IHttpHandler, IRequiresSessionState
End If 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 bytes = Nothing
End If End If

View File

@@ -797,11 +797,11 @@ Public Class E141 : Implements IHttpHandler
ObjFactura.TipoDocto = TipoDocto ObjFactura.TipoDocto = TipoDocto
ObjFactura.RefDocto = "" ObjFactura.RefDocto = ""
'ObjFactura.CveMesa = -1 'ObjFactura.CveMesa = -1
ObjFactura.Fecha = Now ObjFactura.Fecha = ClsPaginas.NowADS()
ObjFactura.CvePrePoliza = -1 ObjFactura.CvePrePoliza = -1
ObjFactura.FechaPago = Now ObjFactura.FechaPago = ClsPaginas.NowADS()
ObjFactura.MotivoDescuento = "" ObjFactura.MotivoDescuento = ""
ObjFactura.FechaEjecucion = Now ObjFactura.FechaEjecucion = ClsPaginas.NowADS()
ObjFactura.UsuarioCreo = UsuarioActual.Usuario ObjFactura.UsuarioCreo = UsuarioActual.Usuario
ObjFactura.CveCondicionEntrega = -1 ObjFactura.CveCondicionEntrega = -1
ObjFactura.CondicionEntrega = "" ObjFactura.CondicionEntrega = ""
@@ -1236,7 +1236,7 @@ Public Class E141 : Implements IHttpHandler
TmpDT.Columns.Add("TotalImporte", GetType(Decimal)) TmpDT.Columns.Add("TotalImporte", GetType(Decimal))
TmpDT.Columns.Add("Total", GetType(Decimal)) TmpDT.Columns.Add("Total", GetType(Decimal))
'Para uso del módulo contable '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("AplicaParaConcepto", GetType(Boolean))
TmpDT.Columns.Add("CveProyecto", GetType(Integer)) TmpDT.Columns.Add("CveProyecto", GetType(Integer))
TmpDT.Columns.Add("Proyecto", GetType(String)) TmpDT.Columns.Add("Proyecto", GetType(String))
@@ -1780,9 +1780,9 @@ Public Class E141 : Implements IHttpHandler
Dim msg As String = "" Dim msg As String = ""
If sb.Length > 0 Then If sb.Length > 0 Then
msg = $"Se enviaron los siguientes productos: <br/> {sb.ToString()} <br/> Fecha y hora: {Now.ToString("dd/MM/yyyy hh:mm:ss tt")}" msg = $"Se enviaron los siguientes productos: <br/> {sb.ToString()} <br/> Fecha y hora: {ClsPaginas.NowADS().ToString("dd/MM/yyyy hh:mm:ss tt")}"
Else Else
msg = $"No se enviaron productos esta semana <br/> Fecha y hora: {Now.ToString("dd/MM/yyyy hh:mm:ss tt")}" msg = $"No se enviaron productos esta semana <br/> Fecha y hora: {ClsPaginas.NowADS().ToString("dd/MM/yyyy hh:mm:ss tt")}"
End If End If
EnviarCorreoNotificacion("SIG - Productos enviados en la semana", msg) EnviarCorreoNotificacion("SIG - Productos enviados en la semana", msg)
@@ -1873,7 +1873,7 @@ Public Class E141 : Implements IHttpHandler
End While End While
End If End If
If DtPS.Rows.Count > 0 Then If DtPS.Rows.Count > 0 Then
EnviarCorreoNotificacion("SIG - Actualización de productos", $"Se ejecuto la tarea de actualización de productos. <br/> 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. <br/> Fecha y hora: {ClsPaginas.NowADS().ToString("dd/MM/yyyy hh:mm:ss tt")}")
End If End If
End If End If
@@ -1957,7 +1957,7 @@ Public Class E141 : Implements IHttpHandler
Private Function ActualizarPrecios(Todos As Boolean) As Boolean Private Function ActualizarPrecios(Todos As Boolean) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
'ENVIAR PRECIOS SOLO DE 8am a 7pm '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 Retorno = True
Return Retorno Return Retorno
End If End If
@@ -2040,7 +2040,7 @@ Public Class E141 : Implements IHttpHandler
End If End If
If DtPS.Rows.Count > 0 Then If DtPS.Rows.Count > 0 Then
EnviarCorreoNotificacion("SIG - Actualización de precios", $"Se ejecuto la tarea de actualización de precios. <br/> 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. <br/> Fecha y hora: {ClsPaginas.NowADS().ToString("dd/MM/yyyy hh:mm:ss tt")}")
End If End If
End If End If
@@ -2097,7 +2097,7 @@ Public Class E141 : Implements IHttpHandler
Dim CountPeticiones As Integer = 0, CountPeticionesExitosas As Integer = 0 Dim CountPeticiones As Integer = 0, CountPeticionesExitosas As Integer = 0
'ENVIAR SOLO DE 8am a 8pm '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 Retorno = True
Return Retorno Return Retorno
End If End If
@@ -2176,7 +2176,7 @@ Public Class E141 : Implements IHttpHandler
End If End If
If DtPS.Rows.Count > 0 Then If DtPS.Rows.Count > 0 Then
EnviarCorreoNotificacion("SIG - Actualización de existencias", $"Se ejecuto la tarea de actualización de existencias. <br/> 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. <br/> Fecha y hora: {ClsPaginas.NowADS().ToString("dd/MM/yyyy hh:mm:ss tt")}")
End If End If
End If End If

View File

@@ -30,10 +30,10 @@ Public Class E72 : Implements IHttpHandler, IRequiresSessionState
Dim ObjInv As New ClsInventarios Dim ObjInv As New ClsInventarios
Try Try
Dim DtPS As DataTable = CreaDT() 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") 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 DtApartados As DataTable = ObjInv.DtResultados.FiltraParametros("CvePS > 0", "", {"CvePS", "Codigo", "Cantidad"})
Dim asd As Integer = DtApartados.Rows.Count Dim asd As Integer = DtApartados.Rows.Count

View File

@@ -62,7 +62,7 @@ Public Class MobileHandler : Implements IHttpHandler
If User IsNot Nothing Then 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) Token = Encripta(Token)
json.AppendFormat("{{ ""CveUsuario"" : ""{0}"", ""Nombre"" : ""{1}"", ""Token"" : ""{2}"" }} ", User.CveUsuario, User.Nombre, Token) json.AppendFormat("{{ ""CveUsuario"" : ""{0}"", ""Nombre"" : ""{1}"", ""Token"" : ""{2}"" }} ", User.CveUsuario, User.Nombre, Token)
Else Else

View File

@@ -63,7 +63,7 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
'EnviarCorreoFactura(New Modelos.Factura(Usuario, 844966, 1, context.ModExtensiones.DirectorioBaseEmpresas), Usuario) 'EnviarCorreoFactura(New Modelos.Factura(Usuario, 844966, 1, context.ModExtensiones.DirectorioBaseEmpresas), Usuario)
If String.IsNullOrEmpty(pFechaI) AndAlso String.IsNullOrEmpty(pFechaF) Then If String.IsNullOrEmpty(pFechaI) AndAlso String.IsNullOrEmpty(pFechaF) Then
Dim FechaReferencia = Now Dim FechaReferencia = ClsPaginas.NowADS()
If FechaReferencia.DayOfWeek = DayOfWeek.Sunday Then If FechaReferencia.DayOfWeek = DayOfWeek.Sunday Then
Dim Sabado = FechaReferencia.AddDays(-1) Dim Sabado = FechaReferencia.AddDays(-1)
Dim DomingoAnterior = FechaReferencia.AddDays(-7) Dim DomingoAnterior = FechaReferencia.AddDays(-7)
@@ -290,11 +290,11 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
ObjFactura.TipoDocto = "Ing" ObjFactura.TipoDocto = "Ing"
ObjFactura.RefDocto = "" ObjFactura.RefDocto = ""
'ObjFactura.CveMesa = -1 'ObjFactura.CveMesa = -1
ObjFactura.Fecha = Now ObjFactura.Fecha = ClsPaginas.NowADS()
ObjFactura.CvePrePoliza = -1 ObjFactura.CvePrePoliza = -1
ObjFactura.FechaPago = Now ObjFactura.FechaPago = ClsPaginas.NowADS()
ObjFactura.MotivoDescuento = "" ObjFactura.MotivoDescuento = ""
ObjFactura.FechaEjecucion = Now ObjFactura.FechaEjecucion = ClsPaginas.NowADS()
ObjFactura.UsuarioCreo = UsuarioActual.Usuario ObjFactura.UsuarioCreo = UsuarioActual.Usuario
ObjFactura.CveCondicionEntrega = -1 ObjFactura.CveCondicionEntrega = -1
ObjFactura.CondicionEntrega = "" ObjFactura.CondicionEntrega = ""
@@ -384,7 +384,7 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
'VALIDA PROMOCIONES Y EXISTENCIAS 'VALIDA PROMOCIONES Y EXISTENCIAS
Dim ObjVentas As New ClsVentas 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() ObjFactura.DtPromociones = ObjVentas.DtResultados.Copy()
End If End If
@@ -905,8 +905,8 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
Dim ArchivoW As StreamWriter Dim ArchivoW As StreamWriter
Dim strLineaTMP As String Dim strLineaTMP As String
' strLineaTMP = Chr(13) & Chr(10) & Day(Now) & "/" & Month(Now) & "/" & Year(Now) & " " & Hour(Now) & ":" & Minuto & ". " & Str & Chr(13) & Chr(10) ' 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, DateTime.Now.ToShortDateString, DateTime.Now.ToShortTimeString) strLineaTMP = String.Format("{0}{1}Log: {2}{3}:{4}", Chr(13), Chr(10), Str, ClsPaginas.NowADS().ToShortDateString, ClsPaginas.NowADS().ToShortTimeString)
Try Try
ArchivoW = New StreamWriter(String.Format("{0}\LogFacturacion.txt", ModExtensiones.DirectorioBaseEmpresas), True, System.Text.Encoding.UTF8) ArchivoW = New StreamWriter(String.Format("{0}\LogFacturacion.txt", ModExtensiones.DirectorioBaseEmpresas), True, System.Text.Encoding.UTF8)
Catch ex As UnauthorizedAccessException Catch ex As UnauthorizedAccessException

View File

@@ -94,7 +94,7 @@ Public Class SIGFacturacionCiclica : Implements IHttpHandler, IRequiresSessionSt
Private Function IniciaFacturacionMasiva() As Boolean Private Function IniciaFacturacionMasiva() As Boolean
Dim Retorno As Boolean = True Dim Retorno As Boolean = True
Dim FechaRef As DateTime = DateTime.Now Dim FechaRef As DateTime = ClsPaginas.NowADS()
Dim DTCicloComercial As DataTable = Nothing Dim DTCicloComercial As DataTable = Nothing
Using ObjContratos As New ClsContratos Using ObjContratos As New ClsContratos
@@ -123,11 +123,11 @@ Public Class SIGFacturacionCiclica : Implements IHttpHandler, IRequiresSessionSt
For Each Row As DataRow In DTCicloComercial.Rows For Each Row As DataRow In DTCicloComercial.Rows
If Row("Observaciones").ToString().Contains("{DIA}") Then 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 End If
If Row("Observaciones").ToString().Contains("{MES}") Then 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 formatoFecha = Globalization.CultureInfo.CurrentCulture.DateTimeFormat
Dim nombreMes = formatoFecha.GetMonthName(fecha.Month).ToUpper() Dim nombreMes = formatoFecha.GetMonthName(fecha.Month).ToUpper()
@@ -135,11 +135,11 @@ Public Class SIGFacturacionCiclica : Implements IHttpHandler, IRequiresSessionSt
End If End If
If Row("Observaciones").ToString().Contains("{AÑO}") Then 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 End If
If Row("Observaciones").ToString().Contains("{TC}") Then 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 End If
Dim Resp = EmitirImprimir(UsuarioActual, Row) Dim Resp = EmitirImprimir(UsuarioActual, Row)
@@ -291,7 +291,7 @@ Public Class SIGFacturacionCiclica : Implements IHttpHandler, IRequiresSessionSt
ObjFactura.CveMoneda = DR("CveMoneda").ToString.ToEntero ObjFactura.CveMoneda = DR("CveMoneda").ToString.ToEntero
ObjFactura.Moneda = ClsPaginas.GlobalDTMonedas.FiltroPrimeroValor("Moneda", $"CveMoneda = {ObjFactura.CveMoneda} ") ObjFactura.Moneda = ClsPaginas.GlobalDTMonedas.FiltroPrimeroValor("Moneda", $"CveMoneda = {ObjFactura.CveMoneda} ")
ObjFactura.MonedaSAT = ClsPaginas.GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", $"CveMoneda = {DR("CveMoneda").ToString.ToEntero}") 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.TipoDocto = "Ing"
ObjFactura.RefDocto = "" ObjFactura.RefDocto = ""
ObjFactura.Folio = -1 ObjFactura.Folio = -1

View File

@@ -468,7 +468,7 @@ Public Class SIGPolizaVirtual : Implements IHttpHandler, IRequiresSessionState
obj.customer_car_year = ObjFactura.Fecha.Year obj.customer_car_year = ObjFactura.Fecha.Year
'DATOS DE VENTA 'DATOS DE VENTA
obj.sale_date = Now obj.sale_date = ClsPaginas.NowADS()
obj.sale_paidby = "01" obj.sale_paidby = "01"
obj.sale_type = "01" 'PISO obj.sale_type = "01" 'PISO
obj.sale_type_service = "01" 'PARTICULAR obj.sale_type_service = "01" 'PARTICULAR
@@ -499,7 +499,7 @@ Public Class SIGPolizaVirtual : Implements IHttpHandler, IRequiresSessionState
obj.customer_name = "JOSE ENRIQUE" obj.customer_name = "JOSE ENRIQUE"
obj.customer_last_name1 = "VIZCARA" obj.customer_last_name1 = "VIZCARA"
obj.customer_last_name2 = "RENDON" obj.customer_last_name2 = "RENDON"
obj.customer_birthday = Now obj.customer_birthday = ClsPaginas.NowADS()
obj.customer_phone = "8186545256" obj.customer_phone = "8186545256"
obj.customer_email = "mail@mail.com" obj.customer_email = "mail@mail.com"
obj.customer_gender = "02" obj.customer_gender = "02"
@@ -509,7 +509,7 @@ Public Class SIGPolizaVirtual : Implements IHttpHandler, IRequiresSessionState
obj.customer_car_year = 2015 obj.customer_car_year = 2015
'DATOS DE VENTA 'DATOS DE VENTA
obj.sale_date = Now obj.sale_date = ClsPaginas.NowADS()
obj.sale_paidby = "01" obj.sale_paidby = "01"
obj.sale_type = "01" obj.sale_type = "01"
obj.sale_type_service = "01" obj.sale_type_service = "01"
@@ -527,7 +527,7 @@ Public Class SIGPolizaVirtual : Implements IHttpHandler, IRequiresSessionState
obj.used_bci = "25" obj.used_bci = "25"
obj.used_month = 1 obj.used_month = 1
obj.used_year = 2015 obj.used_year = 2015
obj.used_sale_date = Now obj.used_sale_date = ClsPaginas.NowADS()
EnviarPolizaVentaLTHWSD(context, obj) EnviarPolizaVentaLTHWSD(context, obj)
End Sub End Sub

View File

@@ -58,13 +58,13 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
ActualizaPrePoliza(context) ActualizaPrePoliza(context)
Dim obj As New MResponseModel(Of Object)() Dim obj As New MResponseModel(Of Object)()
obj.Result = DateTime.Now.ToString() obj.Result = ClsPaginas.NowADS().ToString()
Dim retorno = JsonConvert.SerializeObject(obj).ToString() Dim retorno = JsonConvert.SerializeObject(obj).ToString()
context.Response.Write(retorno) context.Response.Write(retorno)
context.Response.StatusCode = 200 context.Response.StatusCode = 200
Case "RevisaConexion" Case "RevisaConexion"
Dim obj As New MResponseModel(Of Object)() Dim obj As New MResponseModel(Of Object)()
obj.Result = DateTime.Now.ToString() obj.Result = ClsPaginas.NowADS().ToString()
Dim retorno = JsonConvert.SerializeObject(obj).ToString() Dim retorno = JsonConvert.SerializeObject(obj).ToString()
context.Response.Write(retorno) context.Response.Write(retorno)
context.Response.StatusCode = 200 context.Response.StatusCode = 200
@@ -282,7 +282,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
Dim tokenDescriptor = New Microsoft.IdentityModel.Tokens.SecurityTokenDescriptor With { 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()), .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("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), .Expires = Date.UtcNow.AddHours(3),
.SigningCredentials = New Microsoft.IdentityModel.Tokens.SigningCredentials( .SigningCredentials = New Microsoft.IdentityModel.Tokens.SigningCredentials(
New Microsoft.IdentityModel.Tokens.SymmetricSecurityKey(Encoding.ASCII.GetBytes("*_AsistenciaDesarrolloSistemas-SIGAPI_*17-06-2020")), 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) savepath = context.Server.MapPath(tempPath)
Dim filename As String Dim filename As String
Dim tick As String Dim tick As String
tick = (DateTime.Now.Ticks + 1).ToString() tick = (ClsPaginas.NowADS().Ticks + 1).ToString()
If Not Directory.Exists(savepath) Then If Not Directory.Exists(savepath) Then
Directory.CreateDirectory(savepath) Directory.CreateDirectory(savepath)
End If End If

View File

@@ -70,7 +70,7 @@ Public Class TareasProgramadas : Implements IHttpHandler
Dim retorno As String = "no se encontro la variable" Dim retorno As String = "no se encontro la variable"
Try Try
Dim metodo As String = "" Dim metodo As String = ""
Dim FechaActual As DateTime = Now Dim FechaActual As DateTime = ClsPaginas.NowADS()
Dim FechaEnvio As DateTime = FechaActual Dim FechaEnvio As DateTime = FechaActual
If context.Request("var") IsNot Nothing Then If context.Request("var") IsNot Nothing Then
@@ -387,7 +387,7 @@ Public Class TareasProgramadas : Implements IHttpHandler
Dim Json As New JObject( Dim Json As New JObject(
New JProperty("Empresa", UsuarioActual.Empresa.Empresa), New JProperty("Empresa", UsuarioActual.Empresa.Empresa),
New JProperty("Usuario", UsuarioActual.Usuario), 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 DTClientes As DataTable = Nothing
Dim EnviarPendientes As Boolean = False Dim EnviarPendientes As Boolean = False
@@ -414,7 +414,7 @@ Public Class TareasProgramadas : Implements IHttpHandler
Dim Grupo As Integer = 5 Dim Grupo As Integer = 5
Dim TipoCambio As Integer = 1 Dim TipoCambio As Integer = 1
Dim TipoDocto As String = "Ing" 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, 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 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("TipoCuentas", "Con Saldo"))
lista.Add(New CrystalParametro("NombreCliente", Cliente.Nombre)) lista.Add(New CrystalParametro("NombreCliente", Cliente.Nombre))
lista.Add(New CrystalParametro("FechaInicio", If(FI = "-1", "-", FI))) 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("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("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)) 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("TipoCuentas", "Con Saldo"))
lista.Add(New CrystalParametro("NombreCliente", Cliente.Nombre)) lista.Add(New CrystalParametro("NombreCliente", Cliente.Nombre))
lista.Add(New CrystalParametro("FechaInicio", If(FI = "-1", "-", FI))) 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("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("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)) lista.Add(New CrystalParametro("ClienteCP", Cliente.CP))
@@ -870,8 +870,8 @@ Public Class TareasProgramadas : Implements IHttpHandler
Dim ArchivoW As StreamWriter Dim ArchivoW As StreamWriter
Dim strLineaTMP As String Dim strLineaTMP As String
' strLineaTMP = Chr(13) & Chr(10) & Day(Now) & "/" & Month(Now) & "/" & Year(Now) & " " & Hour(Now) & ":" & Minuto & ". " & Str & Chr(13) & Chr(10) ' 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, DateTime.Now.ToShortDateString, DateTime.Now.ToShortTimeString) strLineaTMP = String.Format("{0}{1}Log: {2}{3}:{4}", Chr(13), Chr(10), Str, ClsPaginas.NowADS().ToShortDateString, ClsPaginas.NowADS().ToShortTimeString)
Try Try
ArchivoW = New StreamWriter(String.Format("{0}\Log\LogEdoCuenta.txt", ModExtensiones.DirectorioBaseEmpresas), True, System.Text.Encoding.UTF8) ArchivoW = New StreamWriter(String.Format("{0}\Log\LogEdoCuenta.txt", ModExtensiones.DirectorioBaseEmpresas), True, System.Text.Encoding.UTF8)
Catch ex As UnauthorizedAccessException Catch ex As UnauthorizedAccessException
@@ -1066,7 +1066,7 @@ Public Class TareasProgramadas : Implements IHttpHandler
If Not String.IsNullOrEmpty(Mail) Then If Not String.IsNullOrEmpty(Mail) Then
Try 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 Cuerpo As String = String.Empty
Dim ResultadoMail As Integer = 0 Dim ResultadoMail As Integer = 0

View File

@@ -45,8 +45,8 @@ Partial Class Bancos_CIF
'For Each x As DataRow In GlobalDTContaPlantillasPolizasDetalle(DdlTipoMovimiento.SelectedValue.ToEntero).Rows 'For Each x As DataRow In GlobalDTContaPlantillasPolizasDetalle(DdlTipoMovimiento.SelectedValue.ToEntero).Rows
' TipoMovto = CBool(x("TipoMovto")) ' 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, 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, Now, 0, -1, CveIE) Then ' If ObjMov.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovto, Importe, TxtConcepto.Text, 30, TxtObservacion.Text, NowADS(), 0, -1, CveIE) Then
' ''End If ' ''End If
' Else ' Else
' Alert("No se pudo insertar el Detalle de la Póliza", TipoMensaje.MsgAdvertencia) ' Alert("No se pudo insertar el Detalle de la Póliza", TipoMensaje.MsgAdvertencia)

View File

@@ -46,8 +46,8 @@ Partial Class Bancos_CargarConciliacionesBancarias
DdlCuentaModal.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlCuentaModal.Items.Insert(0, New ListItem("Seleccione", "-1"))
DdlCuentaModal.DataBind() DdlCuentaModal.DataBind()
txtFechaI.Text = Now.FirstDayOfMonth.ToShortDateString txtFechaI.Text = NowADS().FirstDayOfMonth.ToShortDateString
txtFechaF.Text = Now.ToShortDateString txtFechaF.Text = NowADS().ToShortDateString
Modalidad = "" Modalidad = ""
End Sub End Sub
@@ -237,7 +237,7 @@ Partial Class Bancos_CargarConciliacionesBancarias
Protected Sub LnkAgregarMovimiento_Click(sender As Object, e As EventArgs) Protected Sub LnkAgregarMovimiento_Click(sender As Object, e As EventArgs)
Modalidad = "A" Modalidad = "A"
TxtReferencia.Text = "" TxtReferencia.Text = ""
TxtFecha.Text = Now.ToShortDateString TxtFecha.Text = NowADS().ToShortDateString
TxtImporte.Text = "" TxtImporte.Text = ""
DdlTipo.SelectedIndex = 0 DdlTipo.SelectedIndex = 0
DdlCuentaModal.SelectedIndex = 0 DdlCuentaModal.SelectedIndex = 0

View File

@@ -78,8 +78,8 @@ Partial Class Bancos_ConciliacionesBancariasaspx
DdlCuenta.Items.Insert(0, New ListItem("Todos", "-1")) DdlCuenta.Items.Insert(0, New ListItem("Todos", "-1"))
DdlCuenta.DataBind() DdlCuenta.DataBind()
txtFechaI.Text = Now.FirstDayOfMonth.ToShortDateString txtFechaI.Text = NowADS().FirstDayOfMonth.ToShortDateString
txtFechaF.Text = Now.ToShortDateString txtFechaF.Text = NowADS().ToShortDateString
ModalidadConciliacion = "" ModalidadConciliacion = ""
ModalidadDesconciliar = "" ModalidadDesconciliar = ""
@@ -398,7 +398,7 @@ Partial Class Bancos_ConciliacionesBancariasaspx
Protected Sub LnkDesconciliarTodos_Click(sender As Object, e As EventArgs) Protected Sub LnkDesconciliarTodos_Click(sender As Object, e As EventArgs)
ModalidadDesconciliar = "DT" ModalidadDesconciliar = "DT"
TxtFechaDesconciliado.Text = Now.ToShortDateString TxtFechaDesconciliado.Text = NowADS().ToShortDateString
CveIEDesconciliar = 0 CveIEDesconciliar = 0
UpDesconciliar.Update() UpDesconciliar.Update()
RegistraScript("$('#DModalDesconciliar').modal()") RegistraScript("$('#DModalDesconciliar').modal()")
@@ -563,7 +563,7 @@ Partial Class Bancos_ConciliacionesBancariasaspx
Dim params As New List(Of ReportParameter)() Dim params As New List(Of ReportParameter)()
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) 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 FormatoFecha As DateTimeFormatInfo = CultureInfo.CurrentCulture.DateTimeFormat
Dim NombreMes As String = FormatoFecha.GetMonthName(txtFechaI.Text.ToDate.Month).ToUpper Dim NombreMes As String = FormatoFecha.GetMonthName(txtFechaI.Text.ToDate.Month).ToUpper
params.Add(New ReportParameter("Encabezado", $"{DdlCuenta.SelectedItem.Text} {NombreMes} {txtFechaI.Text.ToDate.Year}")) params.Add(New ReportParameter("Encabezado", $"{DdlCuenta.SelectedItem.Text} {NombreMes} {txtFechaI.Text.ToDate.Year}"))

View File

@@ -160,7 +160,7 @@ Partial Class Bancos_Creditos
RegeneraTablaAmortizacion = False RegeneraTablaAmortizacion = False
'Fecha Default 'Fecha Default
TxtFechaInicio.Text = DateTime.Now().ToString("dd/MM/yyyy") TxtFechaInicio.Text = NowADS().ToString("dd/MM/yyyy")
'Carga Proveedores | Entidad Financiera 'Carga Proveedores | Entidad Financiera
DdlProveedores.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa) DdlProveedores.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
@@ -688,7 +688,7 @@ Partial Class Bancos_Creditos
' If CveIE < 0 Then ' If CveIE < 0 Then
' ErrorCredito = True ' ErrorCredito = True
' End If ' 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 ' ' ErrorCredito = True
' 'End If ' 'End If
' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtCSTotalCredito.Text.ToDecimal, TxtCSTotalCredito.Text.ToDecimal, 30, "Crédito", "", CveIE:=CveIE) Then ' 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 Not ErrorCredito AndAlso CveIE > 0 Then
' If CvePrePoliza > 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 ' ErrorCredito = True
' End If ' 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 ' ErrorCredito = True
' End If ' 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 ' ErrorCredito = True
' End If ' 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 ' ErrorCredito = True
' End If ' 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 ' ErrorCredito = True
' End If ' End If
' Else ' Else
@@ -1573,7 +1573,7 @@ Partial Class Bancos_Creditos
Dim TipoMovimiento As Boolean = False Dim TipoMovimiento As Boolean = False
Dim Concepto As String = "" Dim Concepto As String = ""
Dim Referencia As String = $"Crédito: {TxtReferencia.Text}" Dim Referencia As String = $"Crédito: {TxtReferencia.Text}"
Dim FechaMovimiento As Date = Now.ToDate Dim FechaMovimiento As Date = NowADS().ToDate
Dim MsgError As String = "" 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) 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 importeMovimiento = TxtVehiculoValor.Text.ToDecimal - TxtVehiculoAnticipo.Text.ToDecimal 'importe financiado
Concepto = $"Crédito: {TxtReferencia.Text}" Concepto = $"Crédito: {TxtReferencia.Text}"
Dim Pago As New CompraPago Dim Pago As New CompraPago
Pago.Fecha = Now Pago.Fecha = NowADS()
Pago.CveIE = CveIE Pago.CveIE = CveIE
Dim ObjCompra As New ClsCompras Dim ObjCompra As New ClsCompras

View File

@@ -28,7 +28,7 @@ Partial Class Bancos_CreditosPagoMultiple
CveMoneda = 1 CveMoneda = 1
CargaTipoTransaccion() CargaTipoTransaccion()
CargaCuentas(DdlTipoTransaccion.SelectedValue.ToEntero) CargaCuentas(DdlTipoTransaccion.SelectedValue.ToEntero)
TxtFechaDocumento.Text = Now.ToShortDateString TxtFechaDocumento.Text = NowADS().ToShortDateString
CargaProveedores() ' CveProveedor = 19994 CargaProveedores() ' CveProveedor = 19994
TxtPagueseA.Enabled = False TxtPagueseA.Enabled = False

View File

@@ -59,7 +59,7 @@ Partial Class Bancos_CuentasBancariasDetalle
InicializaConvenio() InicializaConvenio()
Else Else
'Configuración de Modalidad Insert 'Configuración de Modalidad Insert
LblFecha.Text = Now.ToShortDateString() LblFecha.Text = NowADS().ToShortDateString()
LtlTitulo.Text = "Agregar Nueva Cuenta Bancaria" LtlTitulo.Text = "Agregar Nueva Cuenta Bancaria"
ViewState("CveCuenta") = -1 ViewState("CveCuenta") = -1
BtnEliminar.Visible = False BtnEliminar.Visible = False

View File

@@ -20,7 +20,7 @@ Partial Class Bancos_DepositoTerminal
Private Sub Bancos_DepositoTerminal_Load(sender As Object, e As EventArgs) Handles Me.Load Private Sub Bancos_DepositoTerminal_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not IsPostBack Then If Not IsPostBack Then
TxtFecha.Text = Now.ToShortDateString TxtFecha.Text = NowADS().ToShortDateString
CargaCuentas() CargaCuentas()
If UsuarioActual.CveEmpresa.Contiene(1, 4, 7, 11, 12, 72, 80, 119) Then If UsuarioActual.CveEmpresa.Contiene(1, 4, 7, 11, 12, 72, 80, 119) Then

View File

@@ -18,9 +18,9 @@ Partial Class Bancos_DepositosCaja
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then If Not IsPostBack Then
FacturasCheckadas = 0 FacturasCheckadas = 0
TxtFecha.Text = Now.ToShortDateString TxtFecha.Text = NowADS().ToShortDateString
txtFechaI.Text = Now.AddDays(-1).ToShortDateString txtFechaI.Text = NowADS().AddDays(-1).ToShortDateString
txtFechaF.Text = Now.ToShortDateString txtFechaF.Text = NowADS().ToShortDateString
TxtComision.Attributes.Add("onKeyUp", "txtSuma(this);") TxtComision.Attributes.Add("onKeyUp", "txtSuma(this);")
TxtDescuento.Attributes.Add("onKeyUp", "txtSumaDescuento(this);") TxtDescuento.Attributes.Add("onKeyUp", "txtSumaDescuento(this);")
TxtIVA.Attributes.Add("onKeyUp", "txtSumaIVA(this);") TxtIVA.Attributes.Add("onKeyUp", "txtSumaIVA(this);")

View File

@@ -199,7 +199,7 @@ public partial class Bancos_Devoluciones : ClsPaginas
ClsMovimientos ObjMov = new ClsMovimientos(); ClsMovimientos ObjMov = new ClsMovimientos();
ClsClientes clsClientes = new ClsClientes(); 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.DataSource = ObjMov.DtResultados.FiltraParametros("Saldo > 0 ");
GvDevoluciones.DataBind(); GvDevoluciones.DataBind();
@@ -419,7 +419,7 @@ public partial class Bancos_Devoluciones : ClsPaginas
int vecesAplicar = TxtVecesAplicar.Text.ToEntero(); int vecesAplicar = TxtVecesAplicar.Text.ToEntero();
decimal montoLimite = 0; decimal montoLimite = 0;
string fechaInicioAplicacion = DateTime.Now.ToString("yyyy/MM/dd"); string fechaInicioAplicacion = NowADS().ToString("yyyy/MM/dd");
bool estatus = true; bool estatus = true;
int CveCuenta = -1; int CveCuenta = -1;
int CveMovtoPermanente = ObjNom.AddMovtoPermanente(cveConcepto, cvePersonal, descripcion, tipoDescuento, valor, vecesAplicar, montoLimite, fechaInicioAplicacion, estatus, CveCuenta); int CveMovtoPermanente = ObjNom.AddMovtoPermanente(cveConcepto, cvePersonal, descripcion, tipoDescuento, valor, vecesAplicar, montoLimite, fechaInicioAplicacion, estatus, CveCuenta);

View File

@@ -47,9 +47,9 @@ Partial Class Bancos_FluctuacionCambiaria
#Region "CARGAS" #Region "CARGAS"
Private Sub CargaFechas() Private Sub CargaFechas()
'Año actual '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 '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 For i As Integer = 1 To 12
Dim fecha As DateTime = New DateTime(DdlAnio.SelectedValue.ToEntero(), i, 1) 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())) DdlMes.Items.Add(New ListItem(mesStr, i.ToString()))
Next Next
Dim UltimaFluctuacion As MTipoCambioFluctuacion = GlobalTipoCambioUltimaFluctuacion(Now) Dim UltimaFluctuacion As MTipoCambioFluctuacion = GlobalTipoCambioUltimaFluctuacion(NowADS())
If UltimaFluctuacion IsNot Nothing Then If UltimaFluctuacion IsNot Nothing Then
DdlMes.SelectedValueExist(UltimaFluctuacion.FechaFluctuacion.Month) DdlMes.SelectedValueExist(UltimaFluctuacion.FechaFluctuacion.Month)
DdlMes.SelectedValueExist(UltimaFluctuacion.FechaFluctuacion.Year) DdlMes.SelectedValueExist(UltimaFluctuacion.FechaFluctuacion.Year)
@@ -98,17 +98,17 @@ Partial Class Bancos_FluctuacionCambiaria
Private Sub CargaUltimaFluctuacion() Private Sub CargaUltimaFluctuacion()
Dim UltimaFluctuacion As MTipoCambioFluctuacion = GlobalTipoCambioUltimaFluctuacion(Now) Dim UltimaFluctuacion As MTipoCambioFluctuacion = GlobalTipoCambioUltimaFluctuacion(NowADS())
If UltimaFluctuacion IsNot Nothing Then If UltimaFluctuacion IsNot Nothing Then
LtlUltimaFluctuacion.Text = String.Format("Ultima Fluctuación : {0}", UltimaFluctuacion.FechaFluctuacion.ToShortDateString) 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 '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 If UltimaFluctuacion.FechaFluctuacion >= NowADS().AddMonths(-1).LastDayOfMonth Then
DdlMes.SelectedValueExist(Now.Month) DdlMes.SelectedValueExist(NowADS().Month)
DdlAnio.SelectedValueExist(Now.Year) DdlAnio.SelectedValueExist(NowADS().Year)
Else Else
DdlMes.SelectedValueExist(Now.AddMonths(-1).Month) DdlMes.SelectedValueExist(NowADS().AddMonths(-1).Month)
DdlAnio.SelectedValueExist(Now.AddMonths(-1).Year) DdlAnio.SelectedValueExist(NowADS().AddMonths(-1).Year)
End If End If
End If End If
@@ -1238,7 +1238,7 @@ Partial Class Bancos_FluctuacionCambiaria
StrFiltro.AppendFormat("TC: {0}", LtTipoCambioActual.Text) StrFiltro.AppendFormat("TC: {0}", LtTipoCambioActual.Text)
If (T.ActiveTabIndex = 0) Then 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()) GvProveedores.ExportToExcelGembox("Fluctuacion." + T.ActiveTab.HeaderText + "." + DdlMes.SelectedItem.ToString + "." + DdlAnio.SelectedValue, UsuarioActual, "Fluctuación Cambiaria - Proveedores", DatosFiltros:=StrFiltro.ToString())
ElseIf (T.ActiveTabIndex = 1) Then 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()) GvProveedoresAnt.ExportToExcelGembox("Fluctuacion." + T.ActiveTab.HeaderText + "." + DdlMes.SelectedItem.ToString + "." + DdlAnio.SelectedValue, UsuarioActual, "Fluctuación Cambiaria - Proveedores Anticipos", DatosFiltros:=StrFiltro.ToString())

View File

@@ -44,7 +44,7 @@ Partial Class Bancos_FlujoDiario
Private Sub Bancos_FlujoDiario_Load(sender As Object, e As EventArgs) Handles Me.Load Private Sub Bancos_FlujoDiario_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not IsPostBack Then If Not IsPostBack Then
TxtFecha.Text = Now.ToString TxtFecha.Text = NowADS().ToString
End If End If
End Sub End Sub
@@ -55,7 +55,7 @@ Partial Class Bancos_FlujoDiario
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) 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)) params.Add(New ReportParameter("Fecha", TxtFecha.Text.ToDate.ToLongDateString))
If Imagen.Exists Then If Imagen.Exists Then

View File

@@ -582,7 +582,7 @@ Partial Class Bancos_IE
Folio = "" Folio = ""
DirectCast(Master.FindControl("TSM"), ScriptManager).EnablePageMethods = True DirectCast(Master.FindControl("TSM"), ScriptManager).EnablePageMethods = True
TxtImporte.Attributes.Add("onblur", "upIE(this);FncImporteCuenta(this);") TxtImporte.Attributes.Add("onblur", "upIE(this);FncImporteCuenta(this);")
'Calendario.StartDate = Now.AddMonths(-2).FirstDayOfMonth() 'Calendario.StartDate = NowADS().AddMonths(-2).FirstDayOfMonth()
ViewState("IDPoliza") = "-1" ViewState("IDPoliza") = "-1"
CveIEDeposito = -1 CveIEDeposito = -1
CveIEDeposito2 = -1 CveIEDeposito2 = -1
@@ -591,8 +591,8 @@ Partial Class Bancos_IE
CvePrePoliza = -1 CvePrePoliza = -1
CveSolicitudViatico = -1 CveSolicitudViatico = -1
ComplementoSerieFolio = "" ComplementoSerieFolio = ""
'TxtFechaDevuelto.Text = Now.ToShortDateString 'TxtFechaDevuelto.Text = NowADS().ToShortDateString
TxtFechaCancelacion.Text = Now.ToShortDateString TxtFechaCancelacion.Text = NowADS().ToShortDateString
CveCompraDeCDin = -1 CveCompraDeCDin = -1
'If UsuarioActual.CveEmpresa.Contiene(66) Then trNotificar.Visible = True 'If UsuarioActual.CveEmpresa.Contiene(66) Then trNotificar.Visible = True
@@ -736,7 +736,7 @@ Partial Class Bancos_IE
'Configuración de Modalidad Insert 'Configuración de Modalidad Insert
ImgAddObs.Visible = False ImgAddObs.Visible = False
CveIE = -1 CveIE = -1
TxtFechaDocumento.Text = Now.ToShortDateString TxtFechaDocumento.Text = NowADS().ToShortDateString
ImgUpdateCuentaDeposito.Visible = False ImgUpdateCuentaDeposito.Visible = False
TxtFechaDocumento.Attributes.Add("onchange", "CambiaTC(this);") TxtFechaDocumento.Attributes.Add("onchange", "CambiaTC(this);")
End If End If
@@ -2102,7 +2102,7 @@ Partial Class Bancos_IE
If CveCliente > 0 AndAlso Not DivIvaIxC.Visible AndAlso TxtIvaIxC.Text.ToDouble = 0 Then 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 '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 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 Dim DtIE As DataTable = Mov.DtResultados
For Each dr As DataRow In DtIE.Rows For Each dr As DataRow In DtIE.Rows
@@ -2148,7 +2148,7 @@ Partial Class Bancos_IE
Dim ConceptoContable As Integer Dim ConceptoContable As Integer
Dim TipoMovimiento As Boolean Dim TipoMovimiento As Boolean
Dim importeMovimiento As Decimal Dim importeMovimiento As Decimal
Dim FechaMovimiento As Date = Now Dim FechaMovimiento As Date = NowADS()
Dim Concepto As String = "" Dim Concepto As String = ""
Dim Referencia As String = PagueseA Dim Referencia As String = PagueseA
@@ -2715,7 +2715,7 @@ Partial Class Bancos_IE
Dim ConceptoContable As Integer Dim ConceptoContable As Integer
Dim TipoMovimiento As Boolean Dim TipoMovimiento As Boolean
Dim importeMovimiento As Decimal = TxtImporte.Text.ToDecimal Dim importeMovimiento As Decimal = TxtImporte.Text.ToDecimal
Dim FechaMovimiento As Date = Now Dim FechaMovimiento As Date = NowADS()
Dim Concepto As String = "" Dim Concepto As String = ""
Dim Referencia As String = PagueseA Dim Referencia As String = PagueseA
Dim CveCredito As Integer Dim CveCredito As Integer
@@ -3541,7 +3541,7 @@ Partial Class Bancos_IE
Dim ObjCancelacion As New Timbrado Dim ObjCancelacion As New Timbrado
If EstatusSATCancelado(FolioFiscalCancelar, UsuarioActual.Empresa.RFC, RFCReceptorCancelar) Then 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() CargaComplementosPago()
RegistraScript("$('#ModalCancelarComplemetno').modal('hide');") RegistraScript("$('#ModalCancelarComplemetno').modal('hide');")
ErrorCancelarComplemento = False ErrorCancelarComplemento = False
@@ -4031,7 +4031,7 @@ Partial Class Bancos_IE
If HdnCveCliente.Value.ToEntero > 0 Then If HdnCveCliente.Value.ToEntero > 0 Then
trIEDevolucion.Visible = True 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 ") DtIEDevolucion = ObjMov.DtResultados.FiltraParametros("Saldo > 0 ")
Else Else
Alert("Ocurrió un error al cargar los Egresos del Proveedor seleccionado. Por favor vuelva a intetar.", TipoMensaje.MsgError) Alert("Ocurrió un error al cargar los Egresos del Proveedor seleccionado. Por favor vuelva a intetar.", TipoMensaje.MsgError)
@@ -4867,7 +4867,7 @@ Partial Class Bancos_IE
Protected Sub LnkCancelar_Click(sender As Object, e As EventArgs) Protected Sub LnkCancelar_Click(sender As Object, e As EventArgs)
If ChkConciliado.Checked AndAlso UsuarioActual.CveEmpresa = 119 Then If ChkConciliado.Checked AndAlso UsuarioActual.CveEmpresa = 119 Then
'TxtFechaDesconciliado.Text = Now.ToShortDateString 'TxtFechaDesconciliado.Text = NowADS().ToShortDateString
'UpDesconciliar.Update() 'UpDesconciliar.Update()
'RegistraScript("$('#DModalDesconciliar').modal()") 'RegistraScript("$('#DModalDesconciliar').modal()")
Dim fechaCancelacion As String = TxtFechaAplicado.Text.ToDate.AddMonths(1).FirstDayOfMonth.ToShortDateString Dim fechaCancelacion As String = TxtFechaAplicado.Text.ToDate.AddMonths(1).FirstDayOfMonth.ToShortDateString
@@ -4916,7 +4916,7 @@ Partial Class Bancos_IE
Dim Banco As New ClsBancos 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 If Not Banco.DtResultados.Rows.Count > 0 Then
Banco.Dispose() Banco.Dispose()
Alert("No se generaron complementos de pago porque no hay facturas con método de pago PPD", TipoMensaje.MsgAdvertencia) Alert("No se generaron complementos de pago porque no hay facturas con método de pago PPD", TipoMensaje.MsgAdvertencia)
@@ -5381,7 +5381,7 @@ Partial Class Bancos_IE
If EstatusSATCancelado(FolioFiscalCancelar, UsuarioActual.Empresa.RFC, RFCReceptorCancelar) Then 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() CargaComplementosPago()
Alert("El complemento se cancelo correctamente.") Alert("El complemento se cancelo correctamente.")
End If End If
@@ -5612,8 +5612,8 @@ Partial Class Bancos_IE
UpEliminarCotizacion.Update() UpEliminarCotizacion.Update()
End Sub End Sub
Private Sub RVTxtFechaDocumento_Init(sender As Object, e As EventArgs) Handles RVTxtFechaDocumento.Init Private Sub RVTxtFechaDocumento_Init(sender As Object, e As EventArgs) Handles RVTxtFechaDocumento.Init
RVTxtFechaDocumento.MaximumValue = DateTime.Now.ToShortDateString RVTxtFechaDocumento.MaximumValue = NowADS().ToShortDateString
Calendario.EndDate = DateTime.Now Calendario.EndDate = NowADS()
End Sub End Sub
Private Sub CargaOCRelacionadas() Private Sub CargaOCRelacionadas()

View File

@@ -94,7 +94,7 @@ Partial Class Bancos_IE
DirectCast(Master.FindControl("TSM"), ScriptManager).EnablePageMethods = True DirectCast(Master.FindControl("TSM"), ScriptManager).EnablePageMethods = True
TxtImporte.Attributes.Add("onblur", "upIE(this);") TxtImporte.Attributes.Add("onblur", "upIE(this);")
Calendario.StartDate = Now.AddMonths(-1) Calendario.StartDate = NowADS().AddMonths(-1)
' rbPagueseA.Attributes.Add("onchange", "upPagueseA(this);") ' rbPagueseA.Attributes.Add("onchange", "upPagueseA(this);")
'If UsuarioActual.CveRol = 1 Then 'If UsuarioActual.CveRol = 1 Then
'rbPagueseAFuncionarioEmpleado.Visible = True : lblPagueseAFuncionarioEmpleado.Visible = True : rbPagueseAProveedor.Visible = True : lblPagueseAProveedor.Visible = True '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 'Configuración de Modalidad Insert
ImgAddObs.Visible = False ImgAddObs.Visible = False
CveIE = -1 CveIE = -1
TxtFechaDocumento.Text = Now.ToShortDateString TxtFechaDocumento.Text = NowADS().ToShortDateString
End If End If
@@ -889,14 +889,14 @@ Partial Class Bancos_IE
If Not Opcion.Contiene("DEV", "ANTC") AndAlso MsgError = "" Then If Not Opcion.Contiene("DEV", "ANTC") AndAlso MsgError = "" Then
'MOVIMIENTOS EGRESOS '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 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 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, 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, NowADS(), 0, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle) Then
MsgError = "Detalle" MsgError = "Detalle"
End If End If
'intereses pagados '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" MsgError = "Detalle"
End If End If
Else Else
@@ -910,8 +910,8 @@ Partial Class Bancos_IE
'MOVIMIENTOS INGRESOS - DEVOLUCIONES 'MOVIMIENTOS INGRESOS - DEVOLUCIONES
ElseIf Opcion.Contiene("DEV", "ANTC") AndAlso MsgError = "" Then 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 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, Now, 0, -1, If(CveProveedor > 0, DdlIEDevolucion.SelectedValue.ToEntero, 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" ' MsgError = "no se pudo insertar el detalle de la póliza 2"
' End If ' End If
'Else 'Else
@@ -922,7 +922,7 @@ Partial Class Bancos_IE
Dim tipoCambio As Decimal Dim tipoCambio As Decimal
If DdlMoneda.SelectedValue.ToString.ToEntero = 2 Then If DdlMoneda.SelectedValue.ToString.ToEntero = 2 Then
tipoCambio = GlobalTipoCambio(Now).ToString.ToDecimal tipoCambio = GlobalTipoCambio(NowADS()).ToString.ToDecimal
Else Else
tipoCambio = 1 tipoCambio = 1
End If End If
@@ -958,8 +958,8 @@ Partial Class Bancos_IE
Else 'EMpresa Prueba 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 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, Now, 0, -1, If(CveProveedor > 0, DdlIEDevolucion.SelectedValue.ToEntero, 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" MsgError = "no se pudo insertar el detalle de la póliza 2"
End If End If
Else Else

Some files were not shown because too many files have changed in this diff Show More