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

@@ -29,8 +29,8 @@ public partial class Contabilidad_AuxiliarPrePolizas : ClsPaginas
private void InicializaValores()
{
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyecto, LblSubProyecto, divProyecto:DivProyecto);
txtFechaI.Text = DateTime.Now.FirstDayOfMonth().ToShortDateString();
txtFechaF.Text = DateTime.Now.ToShortDateString();
txtFechaI.Text = NowADS().FirstDayOfMonth().ToShortDateString();
txtFechaF.Text = NowADS().ToShortDateString();
DdlPlantillaPoliza.DataSource = get_GlobalDTContaPlantillasPolizas(UsuarioActual.CveEmpresa);
DdlPlantillaPoliza.Items.Insert(0, new ListItem("Seleccione", "-1"));
DdlPlantillaPoliza.DataBind();
@@ -62,7 +62,7 @@ public partial class Contabilidad_AuxiliarPrePolizas : ClsPaginas
List<ReportParameter> para = new List<ReportParameter>();
para.Add(new ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa));
para.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre));
para.Add(new ReportParameter("FechaImpresion", DateTime.Now.ToString()));
para.Add(new ReportParameter("FechaImpresion", NowADS().ToString()));
para.Add(new ReportParameter("AgrupadoPor", $"<b>Agrupado Por:</b> {PlantillaPoliza}{Concepto}{Proyecto}{SubProyecto}{FechaI}{FechaF}"));
if (Imagen.Exists)
{

View File

@@ -309,10 +309,10 @@ Partial Class Contabilidad_CatCuentas
Dim params As New List(Of ReportParameter)
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString))
params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
ImprimirPDF("Empresas/Grales/Formatos/CatCuentas.rdlc", DtDatos.FiltraParametros("", "Orden ASC"), params, String.Format("Catalogo Cuentas-{0}", Now.ToDateTime.ToShortDateString))
ImprimirPDF("Empresas/Grales/Formatos/CatCuentas.rdlc", DtDatos.FiltraParametros("", "Orden ASC"), params, String.Format("Catalogo Cuentas-{0}", NowADS().ToDateTime.ToShortDateString))
End Sub
End Class

View File

@@ -34,8 +34,8 @@ Partial Class Contabilidad_ContabilidadElectronica
#Region " INICIALIZA VALORES "
Private Sub InicializaValores()
'TxtFechaI.Text = String.Format("01/01/{0}", Now.Year)
'TxtFechaI.Text = Now.ToShortDateString
'TxtFechaI.Text = String.Format("01/01/{0}", NowADS().Year)
'TxtFechaI.Text = NowADS().ToShortDateString
'If Not UsuarioActual.Empresa.UsaContabilidad Then
' BtnGenerar.Enabled = False
@@ -63,8 +63,8 @@ Partial Class Contabilidad_ContabilidadElectronica
End If
DdlEjercicio.SelectedValue = Now.Year.ToString
DdlPeriodo.SelectedValue = Now.Month.ToString
DdlEjercicio.SelectedValue = NowADS().Year.ToString
DdlPeriodo.SelectedValue = NowADS().Month.ToString
End Sub
#End Region

View File

@@ -65,8 +65,8 @@ public partial class Contabilidad_ContabilizacionCompras : ClsPaginas
DdlPlantillasPolizas.Items.Insert(0, new ListItem("Todos", "-1"));
DdlPlantillasPolizas.DataBind();
txtFechaI.Text = DateTime.Now.FirstDayOfMonth().AddMonths(-1).ToShortDateString();
txtFechaF.Text = DateTime.Now.ToShortDateString();
txtFechaI.Text = NowADS().FirstDayOfMonth().AddMonths(-1).ToShortDateString();
txtFechaF.Text = NowADS().ToShortDateString();
if (UsuarioActual.CveRol == 1 || UsuarioActual.CveUsuario == 17 || UsuarioActual.CveUsuario == 171 || UsuarioActual.TienePermisoProceso(221))
{
@@ -74,8 +74,8 @@ public partial class Contabilidad_ContabilizacionCompras : ClsPaginas
TienePermisoVerPoliza = true;
}
txtFechaI.Text = DateTime.Now.ToShortDateString();
txtFechaF.Text = DateTime.Now.ToShortDateString();
txtFechaI.Text = NowADS().ToShortDateString();
txtFechaF.Text = NowADS().ToShortDateString();
//else
//{
// Alert("Este módulo requiere el uso de Contabilidad.", ModExtensiones.TipoMensaje.MsgAdvertencia);

View File

@@ -71,8 +71,8 @@ public partial class Contabilidad_ContabilizacionVentas : ClsPaginas
DdlSubProyecto.Items.Insert(0, new ListItem("Todos", "-1"));
DdlSubProyecto.DataBind();
txtFechaI.Text = DateTime.Now.AddMonths(-1).FirstDayOfMonth().ToShortDateString();
txtFechaF.Text = DateTime.Now.ToShortDateString();
txtFechaI.Text = NowADS().AddMonths(-1).FirstDayOfMonth().ToShortDateString();
txtFechaF.Text = NowADS().ToShortDateString();
//cargaPolizas();
}
@@ -406,7 +406,7 @@ public partial class Contabilidad_ContabilizacionVentas : ClsPaginas
protected void ImgExcel2_Click(object sender, EventArgs e)
{
GvV.ExportToExcel("DiarioVentas_" + DateTime.Now.ToShortDateString());
GvV.ExportToExcel("DiarioVentas_" + NowADS().ToShortDateString());
}
protected void LnkSimplificarCompra_Click(object sender, EventArgs e)

View File

@@ -99,8 +99,8 @@ Partial Class Contabilidad_DiarioAmortizaciones
TxtFecha.AutoPostBack = True
DtTiposPoliza = Nothing
txtFechaI.Text = Now.AddMonths(0).FirstDayOfMonth.ToShortDateString
txtFechaF.Text = Now.ToShortDateString
txtFechaI.Text = NowADS().AddMonths(0).FirstDayOfMonth.ToShortDateString
txtFechaF.Text = NowADS().ToShortDateString
If UsuarioActual.Sesion("DiarioPagos-CveProveedor").ToString <> "" Then DdlProveedores.SelectedValue = UsuarioActual.Sesion("DiarioPagos-CveProveedor").ToString.Trim
If UsuarioActual.Sesion("DiarioPagos-FI").ToString <> "" Then txtFechaI.Text = UsuarioActual.Sesion("DiarioPagos-FI").ToString.Trim

View File

@@ -34,8 +34,8 @@ Partial Class Contabilidad_DiarioCompras
DdlProveedores.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
DdlProveedores.DataBind()
txtFechaI.Text = Now.AddMonths(0).FirstDayOfMonth.ToShortDateString
txtFechaF.Text = Now.ToShortDateString
txtFechaI.Text = NowADS().AddMonths(0).FirstDayOfMonth.ToShortDateString
txtFechaF.Text = NowADS().ToShortDateString
If UsuarioActual.Sesion("DiarioCompras-CveProveedor").ToString <> "" Then DdlProveedores.SelectedValue = UsuarioActual.Sesion("DiarioCompras-CveProveedor").ToString.Trim
If UsuarioActual.Sesion("DiarioCompras-FI").ToString <> "" Then txtFechaI.Text = UsuarioActual.Sesion("DiarioCompras-FI").ToString.Trim

View File

@@ -92,8 +92,8 @@ Partial Class Contabilidad_DiarioPagos
DdlProveedores.DataBind()
TxtFecha.AutoPostBack = True
txtFechaI.Text = Now.AddMonths(0).FirstDayOfMonth.ToShortDateString
txtFechaF.Text = Now.ToShortDateString
txtFechaI.Text = NowADS().AddMonths(0).FirstDayOfMonth.ToShortDateString
txtFechaF.Text = NowADS().ToShortDateString
If UsuarioActual.Sesion("DiarioPagos-CveProveedor").ToString <> "" Then DdlProveedores.SelectedValue = UsuarioActual.Sesion("DiarioPagos-CveProveedor").ToString.Trim
If UsuarioActual.Sesion("DiarioPagos-FI").ToString <> "" Then txtFechaI.Text = UsuarioActual.Sesion("DiarioPagos-FI").ToString.Trim

View File

@@ -38,9 +38,9 @@ Partial Class Contabilidad_FiltraPolizas
If Not Page.IsPostBack Then
ViewState("Orden") = ""
DdlPeriodo.SelectedValue = Now.Month.ToString
TxtFechaICredito.Text = Now.FirstDayOfMonth.ToShortDateString
TxtFechaFCredito.Text = Now.LastDayOfMonth.ToShortDateString
DdlPeriodo.SelectedValue = NowADS().Month.ToString
TxtFechaICredito.Text = NowADS().FirstDayOfMonth.ToShortDateString
TxtFechaFCredito.Text = NowADS().LastDayOfMonth.ToShortDateString
If UsuarioActual.Empresa.UsaContabilidad OrElse UsuarioActual.Empresa.TipoContabilidad > 0 Then
@@ -227,7 +227,7 @@ Partial Class Contabilidad_FiltraPolizas
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString))
params.Add(New ReportParameter("Ejercicio", DdlEjercicio.SelectedItem.ToString))
params.Add(New ReportParameter("Periodo", DdlPeriodo.SelectedItem.ToString))
@@ -295,7 +295,7 @@ Partial Class Contabilidad_FiltraPolizas
Dim ObjIE As New ClsBancos()
Dim pathPoliza As String = ""
Dim TieneComprobante As String = ""
Tick = DateTime.Now.Ticks.ToString
Tick = NowADS().Ticks.ToString
Dim ObjContabilidad As New ClsContabilidad
Dim CvePrePoliza As Integer
Dim PolizasSinComprobante As String = "Polizas sin comprobante: <br/>"

View File

@@ -402,7 +402,7 @@ Partial Class Contabilidad_FisImpuestos
objConta.IniciaTransacSQL()
CvePrepoliza = objConta.AddPrePolizas("Contabilidad/Impuestos", 62, 0, 0, DdlMoneda.SelectedValue.ToEntero, Now, TxtConcepto.Text.Trim.ToUpper, UsuarioActual.CveUsuario, UsuarioActual.Empresa.CveEmpresa)
CvePrepoliza = objConta.AddPrePolizas("Contabilidad/Impuestos", 62, 0, 0, DdlMoneda.SelectedValue.ToEntero, NowADS(), TxtConcepto.Text.Trim.ToUpper, UsuarioActual.CveUsuario, UsuarioActual.Empresa.CveEmpresa)
If CvePrepoliza > 0 Then
If objConta.AddUpdateFisImpuestos(-1, DdlTipoImpuesto.SelectedValue.ToEntero, CvePrepoliza, DdlProveedores.SelectedValue.ToEntero, TxtFechaImpuesto.Text.ToDate, TxtFolio.Text.Trim.ToUpper, NombreArchivo, UsuarioActual.CveUsuario, UsuarioActual.Empresa.CveEmpresa) Then

View File

@@ -63,8 +63,8 @@ Partial Class Contabilidad_LibroDiario
Private Sub InicializaValores()
TxtFechaDel.Text = $"01/01/{Now.Year}"
TxtFechaAl.Text = Now.ToShortDateString
TxtFechaDel.Text = $"01/01/{NowADS().Year}"
TxtFechaAl.Text = NowADS().ToShortDateString
End Sub
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
@@ -230,15 +230,15 @@ Partial Class Contabilidad_LibroDiario
#Region " IMPRIMIR "
Protected Sub Imprimir_click(sender As Object, e As EventArgs) Handles Imprimir.Click
'FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate)
'FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate)
'FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate)
'FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate)
'DtDatos = DtDatos
ImprimirReporte()
End Sub
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
'FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate)
'FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate)
'FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate)
'FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate)
'DtDatos = DtDatos
ImprimirReporte("EXCEL")
End Sub

View File

@@ -60,8 +60,8 @@ Partial Class Contabilidad_LibroMayor
Private Sub InicializaValores()
TxtFechaDel.Text = $"01/01/{Now.Year}"
TxtFechaAl.Text = Now.ToShortDateString
TxtFechaDel.Text = $"01/01/{NowADS().Year}"
TxtFechaAl.Text = NowADS().ToShortDateString
'DdlMoneda.DataSource = GlobalDTMonedas
'DdlMoneda.DataBind()
@@ -188,15 +188,15 @@ Partial Class Contabilidad_LibroMayor
#End Region
Protected Sub Imprimir_click(sender As Object, e As EventArgs) Handles Imprimir.Click
FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate)
FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate)
FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate)
FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate)
DtDatos = DtDatos
ImprimirReporte()
End Sub
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate)
FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate)
FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate)
FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate)
DtDatos = DtDatos
ImprimirReporte("EXCEL")
End Sub

View File

@@ -87,7 +87,7 @@ Partial Class Contabilidad_Poliza
End Sub
'Protected Sub cmdExcel_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs) Handles cmdExcel.Click
' tbl.ExportToExcel("Poliza_" & Now.Year & If(Now.Month.ToString.Length = 1, "0" & Now.Month.ToString, Now.Month.ToString) & If(Now.Day.ToString.Length = 1, "0" & Now.Day.ToString, Now.Day.ToString))
' tbl.ExportToExcel("Poliza_" & NowADS().Year & If(NowADS().Month.ToString.Length = 1, "0" & NowADS().Month.ToString, NowADS().Month.ToString) & If(NowADS().Day.ToString.Length = 1, "0" & NowADS().Day.ToString, NowADS().Day.ToString))
'End Sub
Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click

View File

@@ -30,8 +30,8 @@ Partial Class Contabilidad_PolizasImpresion
ContabilidadSIG = UsuarioActual.Empresa.TipoContabilidad = 1 OrElse UsuarioActual.CveEmpresa = 119
TxtFechaInicio.Text = Now.AddDays(-1).ToShortDateString
TxtFechaFin.Text = Now.ToShortDateString
TxtFechaInicio.Text = NowADS().AddDays(-1).ToShortDateString
TxtFechaFin.Text = NowADS().ToShortDateString
DdlUsuarioRegistro.DataSource = GlobalDTUsuarios(CveEmpresa:=UsuarioActual.CveEmpresa)
DdlUsuarioRegistro.DataBind()

View File

@@ -337,7 +337,7 @@ Partial Class PopUpAuxiliar
If CveCliente > 0 Then CvePlantillaPoliza = 11
If CveProveedor > 0 Then CvePlantillaPoliza = 2
CvePrePoliza = ObjConta.AddPrePolizas("Contabilidad/PopUpAuxiliar", CvePlantillaPoliza, Importe, Importe, 1, Now, "Cancelacion de Pago", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
CvePrePoliza = ObjConta.AddPrePolizas("Contabilidad/PopUpAuxiliar", CvePlantillaPoliza, Importe, Importe, 1, NowADS(), "Cancelacion de Pago", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If CvePlantillaPoliza = 2 Then
If Not ObjConta.CancelarPagoCompraConAnticipo(CvePrePoliza, CveCompra, GVAuxiliar.Rows(e.RowIndex).DataKey("CveReferencia").ToEntero) Then

View File

@@ -157,8 +157,8 @@ Partial Class RegPoliza
CvePrePoliza = -1
Me.Form.DefaultButton = BtnConsultar.UniqueID
TxtFecha.Text = Now.ToShortDateString
TxtFechaPoliza.Text = Now.ToShortDateString
TxtFecha.Text = NowADS().ToShortDateString
TxtFechaPoliza.Text = NowADS().ToShortDateString
If UsuarioActual.Empresa.UsaAC Then
@@ -258,7 +258,7 @@ Partial Class RegPoliza
End If
Else
TxtFechaPoliza.Text = Date.Now.ToShortDateString
TxtFechaPoliza.Text = NowADS().ToShortDateString
IDPoliza = -1
End If
@@ -559,7 +559,7 @@ Partial Class RegPoliza
' If TmpDT.Rows.Count = 0 Then
' Alert("Debe consultar una póliza antes de imprimir ...", TipoMensaje.MsgAdvertencia)
' Else
' 'GeneraPDF(Now, "Sin Timbrar", "Sin Timbrar", New Date(1, 1, 1), "Sin Timbrar", TmpDT, "Sin Timbrar", "Sin Timbrar", RutaCBB, If(LblSerie.Text.Trim = String.Empty, TxtFolio.Text.Trim, LblSerie.Text.Trim & "-" & TxtFolio.Text.Trim), "", True, False)
' 'GeneraPDF(NowADS(), "Sin Timbrar", "Sin Timbrar", New Date(1, 1, 1), "Sin Timbrar", TmpDT, "Sin Timbrar", "Sin Timbrar", RutaCBB, If(LblSerie.Text.Trim = String.Empty, TxtFolio.Text.Trim, LblSerie.Text.Trim & "-" & TxtFolio.Text.Trim), "", True, False)
' GeneraPDF()
' End If
'End Sub
@@ -568,7 +568,7 @@ Partial Class RegPoliza
'If TmpDT.Rows.Count = 0 Then
' Alert("Debe consultar una póliza antes de imprimir ...", TipoMensaje.MsgAdvertencia)
'Else
' 'GeneraPDF(Now, "Sin Timbrar", "Sin Timbrar", New Date(1, 1, 1), "Sin Timbrar", TmpDT, "Sin Timbrar", "Sin Timbrar", RutaCBB, If(LblSerie.Text.Trim = String.Empty, TxtFolio.Text.Trim, LblSerie.Text.Trim & "-" & TxtFolio.Text.Trim), "", True, False)
' 'GeneraPDF(NowADS(), "Sin Timbrar", "Sin Timbrar", New Date(1, 1, 1), "Sin Timbrar", TmpDT, "Sin Timbrar", "Sin Timbrar", RutaCBB, If(LblSerie.Text.Trim = String.Empty, TxtFolio.Text.Trim, LblSerie.Text.Trim & "-" & TxtFolio.Text.Trim), "", True, False)
' GeneraPDF()
'End If
End Sub
@@ -639,7 +639,7 @@ Partial Class RegPoliza
ChkPolizaComplementaria.Checked = True
If DT.Rows.Count = 0 Then
TxtFechaPoliza.Text = Now.ToShortDateString
TxtFechaPoliza.Text = NowADS().ToShortDateString
TxtNumeroPoliza.Text = ""
LblCargo.Text = ""
LblAbono.Text = ""
@@ -821,7 +821,7 @@ Partial Class RegPoliza
BtnGuardar.OnClientClick = "FncVerifica();"
If DT.Rows.Count = 0 Then
TxtFechaPoliza.Text = Now.ToShortDateString
TxtFechaPoliza.Text = NowADS().ToShortDateString
TxtNumeroPoliza.Text = ""
LblCargo.Text = ""
LblAbono.Text = ""
@@ -1185,7 +1185,7 @@ Partial Class RegPoliza
Dim tCveSub As Integer = If(drt("IdSegNeg").ToString <> "", GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"SubProyecto ='{drt("SegNeg")}'").ToEntero, -1)
'If tCveSub <= 0 AndAlso drt("IdSegNeg").ToString.ToEntero = 0 Then 'toma el primero
' tCveSub = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto").ToEntero
'End If ' Now, drt("IdCuenta").ToString.ToEntero, 0,
'End If ' NowADS(), drt("IdCuenta").ToString.ToEntero, 0,
If ObjConta.AddPrePolizasDetalle(tCvePrePoliza, drt("TipoMovto").ToString = "True",
drt("Importe").ToString.ToDecimal,
drt("Importe").ToString.ToDecimal, 299,
@@ -1312,7 +1312,7 @@ Partial Class RegPoliza
If ObjConta.UpdateDevolucionesIVA(gvr.DataKey("Id").ToEntero, IDPoliza, DdlCuenta.SelectedValue.ToEntero,
gvr.FCDropDownList("DdlProveedor").SelectedValue.ToEntero, gvr.FCDropDownList("DdlTasa").SelectedValue.ToDouble,
gvr.FCTextBox("TxtImporteBase").Text.ToDouble, gvr.FCTextBox("TxtImporteIVA").Text.ToDouble,
gvr.FCTextBox("TxtRetIVA").Text.ToDouble, gvr.FCTextBox("TxtRetISR").Text.ToDouble, Date.Now,
gvr.FCTextBox("TxtRetIVA").Text.ToDouble, gvr.FCTextBox("TxtRetISR").Text.ToDouble, NowADS(),
gvr.FCTextBox("TxtReferenciaDevolucion").Text, gvr.FCTextBox("TxtSerie").Text, gvr.FCTextBox("TxtFolio").Text.ToEntero) Then
Alert("Devolución Actualizada con Éxito", TipoMensaje.MsgInformacion)
Else

View File

@@ -213,7 +213,7 @@ Partial Class ContabilidadC_RegPrePoliza
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
Tick = DateTime.Now.Ticks.ToString()
Tick = NowADS().Ticks.ToString()
If UsuarioActual.Empresa.TipoContabilizacion = 1 OrElse UsuarioActual.Empresa.TipoContabilidad = 1 OrElse UsuarioActual.CveEmpresa = 119 Then
Response.Redirect(Request.Url.PathAndQuery.Replace("RegPrePoliza", "RegPrePolizaS"))
@@ -2255,7 +2255,7 @@ Partial Class ContabilidadC_RegPrePoliza
'If YaExiste = False Then
' If IdCuenta > 0 Then
' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Importe, "", CveConceptoContable, Concepto, Now.ToDate(), IdCtaContable, -1, ImporteMX:=Importe, CveSubProyecto:=CveSubProyecto, CveCuenta:=IdCuenta) Then
' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Importe, "", CveConceptoContable, Concepto, NowADS().ToDate(), IdCtaContable, -1, ImporteMX:=Importe, CveSubProyecto:=CveSubProyecto, CveCuenta:=IdCuenta) Then
' TieneError = True
' Exit For
' End If

View File

@@ -254,7 +254,7 @@ Partial Class ContabilidadC_RegPrePolizaS
' LnkImprimeExcelResumen.Visible = True
'End If
Tick = DateTime.Now.Ticks.ToString
Tick = NowADS().Ticks.ToString
TxtTotalCargos.Attributes.Add("readonly", "readonly")
TxtTotalAbonos.Attributes.Add("readonly", "readonly")
@@ -310,8 +310,8 @@ Partial Class ContabilidadC_RegPrePolizaS
LnkExcel.Visible = True
DvPlantilla.Visible = True
TxtFechaDocumento.Text = Now.ToString("dd/MM/yyyy")
TxtFechaelaboracion.Text = Now.ToString("dd/MM/yyyy")
TxtFechaDocumento.Text = NowADS().ToString("dd/MM/yyyy")
TxtFechaelaboracion.Text = NowADS().ToString("dd/MM/yyyy")
TxtConcepto.Enabled = True
TxtUsuarioElaboro.Text = UsuarioActual.Usuario
End If
@@ -334,8 +334,8 @@ Partial Class ContabilidadC_RegPrePolizaS
LnkExcel.Visible = True
DvPlantilla.Visible = True
TxtFechaDocumento.Text = Now.ToString("dd/MM/yyyy")
TxtFechaelaboracion.Text = Now.ToString("dd/MM/yyyy")
TxtFechaDocumento.Text = NowADS().ToString("dd/MM/yyyy")
TxtFechaelaboracion.Text = NowADS().ToString("dd/MM/yyyy")
TxtConcepto.Enabled = True
TxtUsuarioElaboro.Text = UsuarioActual.Usuario
@@ -2651,8 +2651,8 @@ Partial Class ContabilidadC_RegPrePolizaS
GvMov.Columns(5).Visible = False
TxtConcepto.Enabled = True
TxtFechaDocumento.Text = Now.ToString("dd/MM/yyyy")
TxtFechaelaboracion.Text = Now.ToString("dd/MM/yyyy")
TxtFechaDocumento.Text = NowADS().ToString("dd/MM/yyyy")
TxtFechaelaboracion.Text = NowADS().ToString("dd/MM/yyyy")
TxtUsuarioElaboro.Text = UsuarioActual.Usuario

View File

@@ -87,8 +87,8 @@ Partial Class AC_RepAnexoCatalogo
DtDatos = Nothing
CargaTipoCuentas()
CargaSegmentosNegocio()
FechaInicio = DateSerial(Year(Now), Month(Now), 1)
FechaFin = Date.Now
FechaInicio = DateSerial(Year(NowADS()), Month(NowADS()), 1)
FechaFin = NowADS()
If UsuarioActual.Empresa.UsaAC Then
TipoReporte = -1
@@ -204,8 +204,8 @@ Partial Class AC_RepAnexoCatalogo
If DdlTipoCuentas.SelectedValue.ToEntero = -2 AndAlso TxtCuenta.Text.Trim = "" Then
Alert("El campo Cuenta es obligatorio.", TipoMensaje.MsgError)
Else
FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate)
FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate)
FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate)
FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate)
IdCuenta = If(DdlTipoCuentas.SelectedValue.ToEntero = -2, HdnCveCuenta.Value.ToEntero, DdlTipoCuentas.SelectedValue.ToEntero)
CargaDatos()

View File

@@ -87,8 +87,8 @@ Partial Class AC_RepAnexoCatalogoMes
DtDatos = Nothing
CargaTipoCuentas()
CargaSegmentosNegocio()
FechaInicio = DateSerial(Year(Now), Month(Now), 1)
FechaFin = Date.Now
FechaInicio = DateSerial(Year(NowADS()), Month(NowADS()), 1)
FechaFin = NowADS()
If UsuarioActual.Empresa.UsaAC Then
TipoReporte = -1
@@ -206,8 +206,8 @@ Partial Class AC_RepAnexoCatalogoMes
If DdlTipoCuentas.SelectedValue.ToEntero = -2 AndAlso TxtCuenta.Text.Trim = "" Then
Alert("El campo Cuenta es obligatorio.", TipoMensaje.MsgError)
Else
FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate)
FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate)
FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate)
FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate)
IdCuenta = If(DdlTipoCuentas.SelectedValue.ToEntero = -2, HdnCveCuenta.Value.ToEntero, DdlTipoCuentas.SelectedValue.ToEntero)
CargaDatos()

View File

@@ -112,8 +112,8 @@ Partial Class AC_RepAnexoCatalogoSegmento
DtDatos = Nothing
CargaTipoCuentas()
CargaSegmentosNegocio()
FechaInicio = DateSerial(Year(Now), Month(Now), 1)
FechaFin = Date.Now
FechaInicio = DateSerial(Year(NowADS()), Month(NowADS()), 1)
FechaFin = NowADS()
If UsuarioActual.Empresa.UsaAC Then
TipoReporte = -1
@@ -230,8 +230,8 @@ Partial Class AC_RepAnexoCatalogoSegmento
End Sub
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate)
FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate)
FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate)
FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate)
'IdCuenta = If(DdlTipoCuentas.SelectedValue.ToEntero = -2, HdnCveCuenta.Value.ToEntero, DdlTipoCuentas.SelectedValue.ToEntero)
CargaDatos()
@@ -345,7 +345,7 @@ Partial Class AC_RepAnexoCatalogoSegmento
SbFiltros.Append($"Fecha Inicio: {TxtFechaDel.Text} Fecha Fin: {TxtFechaAl.Text} ")
SbFiltros.Append($" Cuenta: {TxtCuenta.Text}")
GvDatos.ExportToExcelGembox($"RepAnexoCatalogoSegmento{Now.ToString("yyyyMMddhhss")}", UsuarioActual, "Anexo del Catálogo Por Segmento", DatoTituloExtra:=$"", DatosFiltros:=SbFiltros.ToString())
GvDatos.ExportToExcelGembox($"RepAnexoCatalogoSegmento{NowADS().ToString("yyyyMMddhhss")}", UsuarioActual, "Anexo del Catálogo Por Segmento", DatoTituloExtra:=$"", DatosFiltros:=SbFiltros.ToString())
End Sub

View File

@@ -341,7 +341,7 @@ Partial Class Contabilidad_RepBalanceGeneral
CargaEjercicios()
DdlEjercicio.SelectedValue = Now.Year.ToString
DdlEjercicio.SelectedValue = NowADS().Year.ToString
'Anual
Anos = 0
@@ -461,7 +461,7 @@ Partial Class Contabilidad_RepBalanceGeneral
Private Sub CargaDatos()
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
Dim FechaI = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, CChar("0")), If(DdlEjercicio.SelectedValue.Length = 0, Now.Year.ToString, DdlEjercicio.SelectedValue)).ToDate
Dim FechaI = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, CChar("0")), If(DdlEjercicio.SelectedValue.Length = 0, NowADS().Year.ToString, DdlEjercicio.SelectedValue)).ToDate
Dim FechaF = FechaI.ToDate.LastDayOfMonth
TipoReporte = If(TipoReporte = -1, -1, DdlTipoReporte.SelectedValue.ToEntero)
Dim IdCuentaAhorroDesahorro = If(UsuarioActual.CveEmpresa = 48, 87, 9999)
@@ -828,7 +828,7 @@ Partial Class Contabilidad_RepBalanceGeneral
End If
ObjConta.Dispose()
Anos = (Year(Date.Now) - DdlEjercicio.SelectedValue.ToEntero) + 1
Anos = (Year(NowADS()) - DdlEjercicio.SelectedValue.ToEntero) + 1
'Esconde todo
For index = 1 To 20
@@ -1034,7 +1034,7 @@ Partial Class Contabilidad_RepBalanceGeneral
End Sub
Private Sub ProcesaImpresion()
Dim FechaI = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, CChar("0")), If(DdlEjercicio.SelectedValue.Length = 0, Now.Year.ToString, DdlEjercicio.SelectedValue)).ToDate
Dim FechaI = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, CChar("0")), If(DdlEjercicio.SelectedValue.Length = 0, NowADS().Year.ToString, DdlEjercicio.SelectedValue)).ToDate
Dim FechaF = FechaI.ToDate.LastDayOfMonth
TipoReporte = If(TipoReporte = -1, -1, DdlTipoReporte.SelectedValue.ToEntero)
Dim IdCuentaAhorroDesahorro = If(UsuarioActual.CveEmpresa = 48, 87, 9999)
@@ -1134,7 +1134,7 @@ Partial Class Contabilidad_RepBalanceGeneral
params.Add(New ReportParameter("pFechaFin", FechaF))
params.Add(New ReportParameter("pSubtotal", DdlSubtotales.SelectedValue.ToString))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario))
params.Add(New ReportParameter("FechaImpresion", Now.ToShortDateString))
params.Add(New ReportParameter("FechaImpresion", NowADS().ToShortDateString))
ImprimirPDF(reportpath, DtDatosMensual, params, fileName, Formato)
End Sub
@@ -1157,7 +1157,7 @@ Partial Class Contabilidad_RepBalanceGeneral
params.Add(New ReportParameter("pImg", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
params.Add(New ReportParameter("pFechaI", DdlEjercicio.SelectedValue))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario))
params.Add(New ReportParameter("FechaImpresion", Now.ToShortDateString))
params.Add(New ReportParameter("FechaImpresion", NowADS().ToShortDateString))
ImprimirPDF(reportpath, DtDatosAnual, params, fileName, Formato)
End Sub

View File

@@ -54,7 +54,7 @@ Partial Class Contabilidad_RepBalanceGeneralAnual
TipoReporte = 1
End If
DdlEjercicio.SelectedValue = Now.Year.ToString
DdlEjercicio.SelectedValue = NowADS().Year.ToString
Anos = 0
CargaDatos()
@@ -73,7 +73,7 @@ Partial Class Contabilidad_RepBalanceGeneralAnual
End If
ObjConta.Dispose()
Anos = (Year(Date.Now) - DdlEjercicio.SelectedValue.ToEntero) + 1
Anos = (Year(NowADS()) - DdlEjercicio.SelectedValue.ToEntero) + 1
'Esconde todo
For index = 1 To 20

View File

@@ -38,7 +38,7 @@ Partial Class Contabilidad_RepBalanceGeneralMensual
tdTipoReporte.Visible = True
End If
DdlEjercicio.SelectedValue = Now.Year.ToString
DdlEjercicio.SelectedValue = NowADS().Year.ToString
CargaDatos()
End If

View File

@@ -60,15 +60,15 @@ Partial Class Contabilidad_RepBalanceGeneralProForma
GvDatos.Columns(1).HeaderText = (Year(Date.Now) - 1).ToString
GvDatos.Columns(2).HeaderText = (Year(Date.Now) + 0).ToString
GvDatos.Columns(3).HeaderText = (Year(Date.Now) + 0).ToString
GvDatos.Columns(4).HeaderText = (Year(Date.Now) + 0).ToString
GvDatos.Columns(6).HeaderText = (Year(Date.Now) + 1).ToString
GvDatos.Columns(7).HeaderText = (Year(Date.Now) + 2).ToString
GvDatos.Columns(8).HeaderText = (Year(Date.Now) + 3).ToString
GvDatos.Columns(1).HeaderText = (Year(NowADS()) - 1).ToString
GvDatos.Columns(2).HeaderText = (Year(NowADS()) + 0).ToString
GvDatos.Columns(3).HeaderText = (Year(NowADS()) + 0).ToString
GvDatos.Columns(4).HeaderText = (Year(NowADS()) + 0).ToString
GvDatos.Columns(6).HeaderText = (Year(NowADS()) + 1).ToString
GvDatos.Columns(7).HeaderText = (Year(NowADS()) + 2).ToString
GvDatos.Columns(8).HeaderText = (Year(NowADS()) + 3).ToString
'Anos = (Year(Date.Now) - DdlEjercicio.SelectedValue.ToEntero) + 1
'Anos = (Year(NowADS()) - DdlEjercicio.SelectedValue.ToEntero) + 1
''Esconde todo
'For index = 1 To 40 Step 2

View File

@@ -59,8 +59,8 @@ Partial Class Contabilidad_RepBalanzaComprobacion
If Not Page.IsPostBack Then
Dim ErrorParametros = True
ModoImpresion = False
TxtFechaDel.Text = DateSerial(Year(Now), Month(Now), 1).ToShortDateString
TxtFechaAl.Text = Date.Now.ToShortDateString
TxtFechaDel.Text = DateSerial(Year(NowADS()), Month(NowADS()), 1).ToShortDateString
TxtFechaAl.Text = NowADS().ToShortDateString
If UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.UsaContabilidad Then
BtnConsultar.Enabled = True
@@ -81,8 +81,8 @@ Partial Class Contabilidad_RepBalanzaComprobacion
End If
If IsNothing(DtDatos) Then
FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate)
FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate)
FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate)
FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate)
CargaDatos()
End If
Else
@@ -115,8 +115,8 @@ Partial Class Contabilidad_RepBalanzaComprobacion
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate)
FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate)
FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate)
FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate)
CargaDatos()
@@ -173,8 +173,8 @@ Partial Class Contabilidad_RepBalanzaComprobacion
ModoImpresion = True
CargaGrid()
FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate)
FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate)
FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate)
FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate)
'RegistraScript("Enable();")
@@ -220,8 +220,8 @@ Partial Class Contabilidad_RepBalanzaComprobacion
ModoImpresion = True
CargaGrid()
FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate)
FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate)
FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate)
FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate)
'RegistraScript("Enable();")

View File

@@ -17,8 +17,8 @@ Partial Class Contabilidad_FiltraPolizas
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
ViewState("Orden") = ""
TxtFechaI.Text = Now.ToDate.ToShortDateString
TxtFechaF.Text = Now.ToShortDateString
TxtFechaI.Text = NowADS().ToDate.ToShortDateString
TxtFechaF.Text = NowADS().ToShortDateString
CargaDatos()
End If
End Sub

View File

@@ -43,8 +43,8 @@ Partial Class Contabilidad_RepEdoResultados2
Private Sub Contabilidad_RepEdoResultados2_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
CargaCombos()
txtFechaI.Text = $"01/01/{Now.Year}"
txtFechaF.Text = $"31/12/{Now.Year}"
txtFechaI.Text = $"01/01/{NowADS().Year}"
txtFechaF.Text = $"31/12/{NowADS().Year}"
CargaDatos()
End If
@@ -222,7 +222,7 @@ Partial Class Contabilidad_RepEdoResultados2
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
params.Add(New ReportParameter("FechaImpresion", Now.ToLongDateString))
params.Add(New ReportParameter("FechaImpresion", NowADS().ToLongDateString))
params.Add(New ReportParameter("Filtros", StrFiltro.ToString))
Dim rds1 As New ReportDataSource With {.Name = "DataSet1", .Value = If(DtIngresos IsNot Nothing, DtIngresos, New DataTable)} ' sino esta creado el objeto, lo creamos, para que no truene el reporte

View File

@@ -38,8 +38,8 @@ public partial class Contabilidad_RepEdoResultados2Detalle : ClsPaginas
DdlClasificacion.Items.Insert(0, new ListItem("Todos", "-1"));
DdlSubProyecto.DataSource = get_GlobalDTSubProyectos(-1, CveEmpresa: UsuarioActual.CveEmpresa);
DdlSubProyecto.DataBind();
DdlSubProyecto.Items.Insert(0, new ListItem("Todos", "-1"));
DdlSubProyecto.DataBind();
DdlSubProyecto.Items.Insert(0, new ListItem("Todos", "-1"));
DdlTipoGasto.DataSource = get_GlobalDTTiposGastos(UsuarioActual.CveEmpresa);
DdlTipoGasto.DataBind();

View File

@@ -163,14 +163,14 @@ Partial Class Contabilidad_RepEstadoResultados
CargaDatosGenerales()
DdlEjercicio.SelectedValue = Now.Year.ToString
DdlEjercicio.SelectedValue = NowADS().Year.ToString
Anos = 0
'Normal
TotalActual = 0
TotalAnterior = 0
DdlPeriodo.SelectedValue = Now.Month.ToString
DdlPeriodo.SelectedValue = NowADS().Month.ToString
TabContainer_ActiveTabChanged(TabContainer, EventArgs.Empty)
Else
@@ -756,7 +756,7 @@ Partial Class Contabilidad_RepEstadoResultados
LblTituloAniosRango.Text = $"{ UsuarioActual.Empresa.Empresa }"
LblFechas.Text = $"{FechaInicio.ToString("dd/MMMM/yyyy")} al {FechaFin.ToString("dd/MMMM/yyyy")}"
LblFechaReporte.Text = Now.ToString("dd/MMMM/yyyy")
LblFechaReporte.Text = NowADS().ToString("dd/MMMM/yyyy")
End Sub
Protected Sub LnkDescarPersonalizados_Click(sender As Object, e As EventArgs)
@@ -804,7 +804,7 @@ Partial Class Contabilidad_RepEstadoResultados
Next
excel.Save(Me.Response, $"RepEstadoResultadosMensual_{Now.ToString("yyyyMMddhhmmss")}.xlsx")
excel.Save(Me.Response, $"RepEstadoResultadosMensual_{NowADS().ToString("yyyyMMddhhmmss")}.xlsx")
End Sub
@@ -826,7 +826,7 @@ Partial Class Contabilidad_RepEstadoResultados
End If
ObjConta.Dispose()
Anos = (Year(Date.Now) - DdlEjercicio.SelectedValue.ToEntero) + 1
Anos = (Year(NowADS()) - DdlEjercicio.SelectedValue.ToEntero) + 1
'Esconde todo
For index = 1 To 40 Step 2
@@ -998,7 +998,7 @@ Partial Class Contabilidad_RepEstadoResultados
End Sub
Private Sub ProcesaImpresion()
Dim FechaI = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, CChar("0")), If(DdlEjercicio.SelectedValue.Length = 0, Now.Year.ToString, DdlEjercicio.SelectedValue)).ToDate
Dim FechaI = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, CChar("0")), If(DdlEjercicio.SelectedValue.Length = 0, NowADS().Year.ToString, DdlEjercicio.SelectedValue)).ToDate
Dim FechaF = FechaI.ToDate.LastDayOfMonth
TipoReporte = If(TipoReporte = -1, -1, DdlTipoReporte.SelectedValue.ToEntero)
Dim IdCuentaAhorroDesahorro = If(UsuarioActual.CveEmpresa = 48, 87, 9999)
@@ -1096,7 +1096,7 @@ Partial Class Contabilidad_RepEstadoResultados
params.Add(New ReportParameter("pFechaFin", FechaF))
params.Add(New ReportParameter("pSubtotal", DdlSubtotales.SelectedValue.ToString))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario))
params.Add(New ReportParameter("FechaImpresion", Now.ToShortDateString))
params.Add(New ReportParameter("FechaImpresion", NowADS().ToShortDateString))
ImprimirPDF(reportpath, DtDatosMensual, params, fileName, Formato)
End Sub
@@ -1119,7 +1119,7 @@ Partial Class Contabilidad_RepEstadoResultados
params.Add(New ReportParameter("pImg", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
params.Add(New ReportParameter("pFechaI", DdlEjercicio.SelectedValue))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario))
params.Add(New ReportParameter("FechaImpresion", Now.ToShortDateString))
params.Add(New ReportParameter("FechaImpresion", NowADS().ToShortDateString))
ImprimirPDF(reportpath, DtDatosAnual, params, fileName, Formato)
End Sub

View File

@@ -46,7 +46,7 @@ Partial Class Contabilidad_RepEstadoResultadosAnual
tdTipoReporte.Visible = True
End If
DdlEjercicio.SelectedValue = Now.Year.ToString
DdlEjercicio.SelectedValue = NowADS().Year.ToString
Anos = 0
CargaDatos()
@@ -65,7 +65,7 @@ Partial Class Contabilidad_RepEstadoResultadosAnual
End If
ObjConta.Dispose()
Anos = (Year(Date.Now) - DdlEjercicio.SelectedValue.ToEntero) + 1
Anos = (Year(NowADS()) - DdlEjercicio.SelectedValue.ToEntero) + 1
'Esconde todo
For index = 1 To 40 Step 2

View File

@@ -38,7 +38,7 @@ Partial Class Contabilidad_RepEstadoResultadosMensual
tdTipoReporte.Visible = True
End If
DdlEjercicio.SelectedValue = Now.Year.ToString
DdlEjercicio.SelectedValue = NowADS().Year.ToString
CargaDatos()
End If

View File

@@ -189,14 +189,14 @@ Partial Class Contabilidad_RepEstadoResultadosPorSegmento
CargaDatosGenerales()
DdlEjercicio.SelectedValue = Now.Year.ToString
DdlEjercicio.SelectedValue = NowADS().Year.ToString
Anos = 0
'Normal
TotalActual = 0
TotalAnterior = 0
DdlPeriodo.SelectedValue = Now.Month.ToString
DdlPeriodo.SelectedValue = NowADS().Month.ToString
TabContainer_ActiveTabChanged(TabContainer, EventArgs.Empty)
Else
@@ -774,7 +774,7 @@ Partial Class Contabilidad_RepEstadoResultadosPorSegmento
LblTituloAniosRango.Text = $"{ UsuarioActual.Empresa.Empresa }"
LblFechas.Text = $"{FechaInicio.ToString("dd/MMMM/yyyy")} al {FechaFin.ToString("dd/MMMM/yyyy")}"
LblFechaReporte.Text = Now.ToString("dd/MMMM/yyyy")
LblFechaReporte.Text = NowADS().ToString("dd/MMMM/yyyy")
End Sub
Protected Sub LnkDescarPersonalizados_Click(sender As Object, e As EventArgs)
@@ -822,7 +822,7 @@ Partial Class Contabilidad_RepEstadoResultadosPorSegmento
Next
excel.Save(Me.Response, $"RepEstadoResultadosPorSegmento_{Now.ToString("yyyyMMddhhmmss")}.xlsx")
excel.Save(Me.Response, $"RepEstadoResultadosPorSegmento_{NowADS().ToString("yyyyMMddhhmmss")}.xlsx")
End Sub

View File

@@ -54,15 +54,15 @@ Partial Class Contabilidad_RepEstadoResultadosProForma
ObjConta.Dispose()
GvDatos.Columns(1).HeaderText = (Year(Date.Now) - 1).ToString
GvDatos.Columns(3).HeaderText = (Year(Date.Now) + 0).ToString
GvDatos.Columns(5).HeaderText = (Year(Date.Now) + 0).ToString
GvDatos.Columns(7).HeaderText = (Year(Date.Now) + 0).ToString
GvDatos.Columns(9).HeaderText = (Year(Date.Now) + 1).ToString
GvDatos.Columns(11).HeaderText = (Year(Date.Now) + 2).ToString
GvDatos.Columns(13).HeaderText = (Year(Date.Now) + 3).ToString
GvDatos.Columns(1).HeaderText = (Year(NowADS()) - 1).ToString
GvDatos.Columns(3).HeaderText = (Year(NowADS()) + 0).ToString
GvDatos.Columns(5).HeaderText = (Year(NowADS()) + 0).ToString
GvDatos.Columns(7).HeaderText = (Year(NowADS()) + 0).ToString
GvDatos.Columns(9).HeaderText = (Year(NowADS()) + 1).ToString
GvDatos.Columns(11).HeaderText = (Year(NowADS()) + 2).ToString
GvDatos.Columns(13).HeaderText = (Year(NowADS()) + 3).ToString
'Anos = (Year(Date.Now) - DdlEjercicio.SelectedValue.ToEntero) + 1
'Anos = (Year(NowADS()) - DdlEjercicio.SelectedValue.ToEntero) + 1
''Esconde todo
'For index = 1 To 40 Step 2

View File

@@ -53,8 +53,8 @@ Partial Class Contabilidad_RepFlujoEfectivo
If Not Page.IsPostBack Then
'TxtFechaDel.Text = DateSerial(Year(Now), Month(Now), 1).ToShortDateString
TxtFechaAl.Text = Date.Now.ToShortDateString
'TxtFechaDel.Text = DateSerial(Year(NowADS()), Month(NowADS()), 1).ToShortDateString
TxtFechaAl.Text = NowADS().ToShortDateString
CargaDatos()
@@ -68,8 +68,8 @@ Partial Class Contabilidad_RepFlujoEfectivo
Private Sub CargaDatos()
Dim ObjConta As New ClsContabilidad
'Dim FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate)
Dim FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate)
'Dim FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate)
Dim FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate)
FechaAl = TxtFechaAl.Text

View File

@@ -23,8 +23,8 @@ Partial Class RepGastosCC
If Not Page.IsPostBack Then
txtFechaI.Text = Now.FirstDayOfMonth.ToShortDateString()
txtFechaF.Text = Now.ToShortDateString
txtFechaI.Text = NowADS().FirstDayOfMonth.ToShortDateString()
txtFechaF.Text = NowADS().ToShortDateString
OrdenaDatos()
End If
@@ -61,7 +61,7 @@ Partial Class RepGastosCC
If e.Row.RowType = DataControlRowType.DataRow Then
' e.Row.FCLiteral("LtlFolio").Text = "<a class=""Texto"" target=""_blank"" href=""/Ventas/RepRemisionesDetalle.aspx?CveVenta=" & e.Row.DBCampo("CveVenta") & """>" & e.Row.FCLiteral("LtlFolio").Text & "</a>"
' If e.Row.DBCampo("FechaVencimiento").ToDate < Now Then
' If e.Row.DBCampo("FechaVencimiento").ToDate < NowADS() Then
' ' e.Row.Cells(2).CssClass = "danger"
' e.Row.Cells(2).ForeColor = Drawing.Color.Red
' End If
@@ -126,14 +126,14 @@ Partial Class RepGastosCC
' params.Add(New ReportParameter("FechaInicio", FechaI))
' params.Add(New ReportParameter("FechaFin", FechaF))
' params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
' params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
' params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString))
' params.Add(New ReportParameter("Filtros", StrFiltro.ToString))
' If Imagen.Exists Then
' params.Add(New ReportParameter("LogoPath", $"file://{Imagen.FullName}"))
' Else
' params.Add(New ReportParameter("LogoPath", ""))
' End If
' ImprimirPDF("Empresas/Grales/Formatos/RepRemisiones.rdlc", DtVentas, params, String.Format("ReporteRemisiones-{0}", Now.ToDateTime.ToShortDateString))
' ImprimirPDF("Empresas/Grales/Formatos/RepRemisiones.rdlc", DtVentas, params, String.Format("ReporteRemisiones-{0}", NowADS().ToDateTime.ToShortDateString))
' Else
' Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
' End If
@@ -148,7 +148,7 @@ Partial Class RepGastosCC
Dim StrFiltro As New StringBuilder
If txtFechaI.Text <> "" Then StrFiltro.AppendFormat(" Fecha Inicio: {0}", txtFechaI.Text)
If txtFechaF.Text <> "" Then StrFiltro.AppendFormat(" Fecha Fin: {0}", txtFechaF.Text)
GvDatos.ExportToExcelG("ReporteGastos" & Now.ToShortDateString, "Gastos Acumulados", UsuarioActual, StrFiltro.ToString, 100, 200)
GvDatos.ExportToExcelG("ReporteGastos" & NowADS().ToShortDateString, "Gastos Acumulados", UsuarioActual, StrFiltro.ToString, 100, 200)
End Sub
' Note, it is important to override the form verification in order to successfully call a GridView1.RenderControl method.
Public Overrides Sub VerifyRenderingInServerForm(control As Control)

View File

@@ -22,8 +22,8 @@ Partial Class Contabilidad_RepIEPS
End If
End Sub
Private Sub CargaFechas()
txtFechaI.Text = $"01/{Now.Month}/{Now.Year}"
txtFechaF.Text = Now.ToString("dd/MM/yyyy")
txtFechaI.Text = $"01/{NowADS().Month}/{NowADS().Year}"
txtFechaF.Text = NowADS().ToString("dd/MM/yyyy")
End Sub
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
@@ -128,7 +128,7 @@ Partial Class Contabilidad_RepIEPS
Dim para As List(Of ReportParameter) = New List(Of ReportParameter)()
para.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
para.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
para.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString()))
para.Add(New ReportParameter("FechaImpresion", NowADS().ToString()))
para.Add(New ReportParameter("Filtros", $"<b>Filtros:</b> {FechaI}{FechaF}{TipoOperacion}{Modalidad}"))
para.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))

View File

@@ -63,7 +63,7 @@ public partial class Contabilidad_RepIVA : ClsPaginas
{
TipoCambio = 1;
TCEspecifico = -1;
DateTime FF = DateTime.Now.AddMonths(-1);
DateTime FF = NowADS().AddMonths(-1);
txtFechaI.Text = $"01/{FF.Month}/{FF.Year}";
txtFechaF.Text = FF.LastDayOfMonth().ToShortDateString();
@@ -284,7 +284,7 @@ public partial class Contabilidad_RepIVA : ClsPaginas
if (TipoCambio == 3)
{
LiEspecifico.Visible = true;
TCEspecifico = get_GlobalTipoCambio(DateTime.Now).ToString().ToDouble();
TCEspecifico = get_GlobalTipoCambio(NowADS()).ToString().ToDouble();
TxtEspecifico.Text = TCEspecifico.ToString();
}
else

View File

@@ -60,9 +60,9 @@ Partial Class Contabilidad_RepIVADiferencias
End Sub
Private Sub CargaCombos()
DdlEjercicio.Items.Insert(0, Now.Year.ToString)
DdlEjercicio.Items.Insert(1, Now.AddYears(-1).Year.ToString)
DdlPeriodo.SelectedValue = Now.Month.ToString
DdlEjercicio.Items.Insert(0, NowADS().Year.ToString)
DdlEjercicio.Items.Insert(1, NowADS().AddYears(-1).Year.ToString)
DdlPeriodo.SelectedValue = NowADS().Month.ToString
End Sub
Private Sub CargaDatos()
Dim ObjCont As New ClsContPAQi(UsuarioActual.Empresa)
@@ -109,7 +109,7 @@ Partial Class Contabilidad_RepIVADiferencias
params.Add(New ReportParameter("Ejercicio", Ejercicio.ToString))
params.Add(New ReportParameter("Periodo", Periodo))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario))
params.Add(New ReportParameter("FechaImpresion", Now.ToShortDateString))
params.Add(New ReportParameter("FechaImpresion", NowADS().ToShortDateString))
ImprimirPDF(reportpath, DtDatos, params, fileName, Formato)
Else

View File

@@ -173,8 +173,8 @@ Partial Class AC_RepMovimientosAuxiliaresCatalogo
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate)
FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate)
FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate)
FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate)
IdCuenta = If(DdlTipoCuentas.SelectedValue.ToEntero <> -2, DdlTipoCuentas.SelectedValue.ToEntero, HdnCveCuenta.Value.ToEntero)
CargaDatos()
@@ -393,8 +393,8 @@ Partial Class AC_RepMovimientosAuxiliaresCatalogo
If DdlTipoCuentas.SelectedValue.ToEntero = -2 AndAlso TxtCuenta.Text.Trim = "" Then
Alert("El campo Cuenta es obligatorio.", TipoMensaje.MsgError)
Else
FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate)
FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate)
FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate)
FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate)
IdCuenta = If(DdlTipoCuentas.SelectedValue.ToEntero <> -1, DdlTipoCuentas.SelectedValue.ToEntero, HdnCveCuenta.Value.ToEntero)
'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)

View File

@@ -72,12 +72,12 @@ Partial Class Contabilidad_RepOrigenAplicacion
End If
'Normal
TxtFechaDel.Text = DateSerial(Year(Now), Month(Now), 1).ToShortDateString
TxtFechaAl.Text = Date.Now.ToShortDateString
TxtFechaDel.Text = DateSerial(Year(NowADS()), Month(NowADS()), 1).ToShortDateString
TxtFechaAl.Text = NowADS().ToShortDateString
'Anual
Anos = 0
DdlEjercicio.SelectedValue = Now.Year.ToString
DdlEjercicio.SelectedValue = NowADS().Year.ToString
TabContainer_ActiveTabChanged(TabContainer, EventArgs.Empty)
@@ -190,8 +190,8 @@ Partial Class Contabilidad_RepOrigenAplicacion
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
Dim FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate)
Dim FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate)
Dim FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate)
Dim FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate)
If ObjConta.GetOrigenAplicacion(FechaInicio, FechaFin) Then
DtDatos = ObjConta.DtResultados
@@ -382,7 +382,7 @@ Partial Class Contabilidad_RepOrigenAplicacion
End If
ObjConta.Dispose()
Anos = (Year(Date.Now) - DdlEjercicio.SelectedValue.ToEntero) + 1
Anos = (Year(NowADS()) - DdlEjercicio.SelectedValue.ToEntero) + 1
If DtDatosAnual IsNot Nothing Then
CargaGridAnual()

View File

@@ -41,7 +41,7 @@ Partial Class Contabilidad_RepOrigenAplicacionAnual
TipoReporte = -1
Anos = 0
DdlEjercicio.SelectedValue = Now.Year.ToString
DdlEjercicio.SelectedValue = NowADS().Year.ToString
CargaDatos()
End If
@@ -60,7 +60,7 @@ Partial Class Contabilidad_RepOrigenAplicacionAnual
End If
ObjConta.Dispose()
Anos = (Year(Date.Now) - DdlEjercicio.SelectedValue.ToEntero) + 1
Anos = (Year(NowADS()) - DdlEjercicio.SelectedValue.ToEntero) + 1
If DtDatos IsNot Nothing Then
CargaGrid()

View File

@@ -32,7 +32,7 @@ Partial Class Contabilidad_RepOrigenAplicacionMensual
If Not Page.IsPostBack Then
TipoReporte = -1
DdlEjercicio.SelectedValue = Now.Year.ToString
DdlEjercicio.SelectedValue = NowADS().Year.ToString
CargaDatos()
End If

View File

@@ -93,9 +93,9 @@ Partial Class Contabilidad_RepPolizasCuadre
Clsconta.Dispose()
DdlEjercicio.DataBind()
DdlEjercicio.SelectedValue = Now.Year.ToString
DdlEjercicio.SelectedValue = NowADS().Year.ToString
DdlPeriodo.SelectedValue = Now.Month.ToString
DdlPeriodo.SelectedValue = NowADS().Month.ToString
End Sub