From bbadfab58e055c959f07d2faad7f6e54967de83c Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 22 Sep 2023 11:40:34 -0700 Subject: [PATCH 001/100] =?UTF-8?q?--=20correci=C3=B3n=20bloqueo=20de=20fa?= =?UTF-8?q?cturaci=C3=B3n=20de=20remisiones,=20no=20surtidad=20E119?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ventas/Ventas.aspx.vb | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 9da0edab4..ea724257f 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -5031,7 +5031,7 @@ Partial Class Ventas If Not HplSaldoAuxiliar.Text.ToDouble > 0 Then HplSaldoAuxiliar.Visible = False HplPagado.Visible = True - Dim EsCancelado = GlobalDTEstatusFactura().FiltroPrimeroValor("TipoEstatus", $"CveEstatusFactura = {CveEstatus}").ToEntero() = 5 + Dim EsCancelado As Boolean = GlobalDTEstatusFactura().FiltroPrimeroValor("TipoEstatus", $"CveEstatusFactura = {CveEstatus}").ToEntero() = 5 If EsCancelado Then HplPagado.Text = "CANCELADO" End If @@ -5184,7 +5184,7 @@ Partial Class Ventas DdlTipoRetencion.Visible = True End If If TmpDT IsNot Nothing Then - Dim PorcentajeRetIVA = (TmpDT.MAX("PorcentajeRetIVA").ToDecimal() * 100) + Dim PorcentajeRetIVA As Decimal = (TmpDT.MAX("PorcentajeRetIVA").ToDecimal() * 100) LblRetIVA.Text = PorcentajeRetIVA.FormatoNumero(2) End If @@ -5575,10 +5575,11 @@ Partial Class Ventas BtnsFacturar.Visible = True 'E119, bloquear la facturación de remisiones que no estén surtidas - If UsuarioActual.CveEmpresa = 119 AndAlso DbRowVenta("SaldoAlmacen").ToString.ToDecimal = 0 Then - BtnsFacturar.Visible = False + If UsuarioActual.CveEmpresa = 119 Then + If TmpDT.SUM("Cantidad") <> TmpDT.SUM("CantidadInventario") Then 'que ya esté surtida totalmente + BtnsFacturar.Visible = False + End If End If - LBFacturarAnticipo.Visible = UsuarioActual.TienePermisoProceso(274) 'ACTIVA CONVERSION DE MONEDA From a467b6b54cd875a9723f7e2b4464393c4603fe2a Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 22 Sep 2023 11:40:58 -0700 Subject: [PATCH 002/100] option explicit --- Contabilidad2/RepSituacionFinanciera.aspx.vb | 22 ++++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/Contabilidad2/RepSituacionFinanciera.aspx.vb b/Contabilidad2/RepSituacionFinanciera.aspx.vb index 3e2dfd059..307be617a 100644 --- a/Contabilidad2/RepSituacionFinanciera.aspx.vb +++ b/Contabilidad2/RepSituacionFinanciera.aspx.vb @@ -188,8 +188,8 @@ Partial Class AC2_SituacionFinanciera ''Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) Dim ObjConta As New ClsContabilidad - Dim FechaI = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, CChar("0")), DdlEjercicio.SelectedValue) - Dim FechaF = FechaI.ToDate.LastDayOfMonth.ToShortDateString + Dim FechaI As String = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, CChar("0")), DdlEjercicio.SelectedValue) + Dim FechaF As String = FechaI.ToDate.LastDayOfMonth.ToShortDateString TipoReporte = DdlTipoReporte.SelectedValue.ToEntero GvActivo.Columns(1).HeaderText = DdlEjercicio.SelectedValue @@ -223,9 +223,9 @@ Partial Class AC2_SituacionFinanciera DtDatos = DtDatos.FiltraParametros("Level < 3") End If - Dim DtActivoCirculante = DtDatos.FiltraParametros("Tipo in ('A','B','C') AND TipoCuenta=1") - Dim DtActivoNoCirculante = DtDatos.FiltraParametros("Tipo in ('A','B','C') AND TipoCuenta=2 ") - Dim DtActivoDiferido = DtDatos.FiltraParametros(" TipoCuenta=9 ") + Dim DtActivoCirculante As DataTable = DtDatos.FiltraParametros("Tipo in ('A','B','C') AND TipoCuenta=1") + Dim DtActivoNoCirculante As DataTable = DtDatos.FiltraParametros("Tipo in ('A','B','C') AND TipoCuenta=2 ") + Dim DtActivoDiferido As DataTable = DtDatos.FiltraParametros(" TipoCuenta=9 ") ' Dim DtActivoCirculante = DtDatos.FiltraParametros("Tipo in ('A','B','C') AND Orden LIKE '%/00011%' ") ' Dim DtActivoNoCirculante = DtDatos.FiltraParametros("Tipo in ('A','B','C') AND Orden LIKE '%/00012%' ") @@ -287,8 +287,8 @@ Partial Class AC2_SituacionFinanciera 'PASIVO - Dim DtPasivoCirculante = DtDatos.FiltraParametros("Tipo in ('D') AND TipoCuenta=3") - Dim DtPasivoNoCirculante = DtDatos.FiltraParametros("Tipo in ('D') AND TipoCuenta=4") + Dim DtPasivoCirculante As DataTable = DtDatos.FiltraParametros("Tipo in ('D') AND TipoCuenta=3") + Dim DtPasivoNoCirculante As DataTable = DtDatos.FiltraParametros("Tipo in ('D') AND TipoCuenta=4") 'Dim DtPasivoCirculante = DtDatos.FiltraParametros("Tipo in ('D') AND Orden LIKE '%/00021%' ") 'Dim DtPasivoNoCirculante = DtDatos.FiltraParametros("Tipo in ('D') AND Orden LIKE '%/00022%' ") @@ -332,7 +332,7 @@ Partial Class AC2_SituacionFinanciera 'PATRIMONIO - Dim DtPatrimonioContribuido = DtDatos.FiltraParametros("Tipo in ('F') AND TipoCuenta in (5,6,8,7)") + Dim DtPatrimonioContribuido As DataTable = DtDatos.FiltraParametros("Tipo in ('F') AND TipoCuenta in (5,6,8,7)") 'Dim DtPatrimonioGenerado = DtDatos.FiltraParametros("Tipo in ('F') AND TipoCuenta in (6,8)") 'Dim DtPatrimonioActualizacion = DtDatos.FiltraParametros("Tipo in ('F') AND TipoCuenta=7") 'Dim DtUtilidad = DtDatos.FiltraParametros("Tipo in ('F') AND TipoCuenta=5") @@ -418,7 +418,7 @@ Partial Class AC2_SituacionFinanciera LbTotalPasivoPatrimonioAnterior.Text = TotalPasivoPatrimonioAnterior.ToString.FormatoNumero - Dim Descuadre = False + Dim Descuadre As Boolean = False 'COLOREA ROJO SI NO CUADRAN TOTALES If Math.Round(TotalActivoActual, 2) <> Math.Round(TotalPasivoPatrimonioActual, 2) Then LbTotalActivoActual.ForeColor = Drawing.Color.Red @@ -591,8 +591,8 @@ Partial Class AC2_SituacionFinanciera Private Sub ImprimirReporte(Optional Formato As String = "PDF") - Dim FechaI = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, CChar("0")), DdlEjercicio.SelectedValue) - Dim FechaF = DateAdd(DateInterval.Day, -1, DateAdd(DateInterval.Month, 1, CDate(FechaI))).ToString("dd/MM/yyyy") + Dim FechaI As String = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, CChar("0")), DdlEjercicio.SelectedValue) + Dim FechaF As String = DateAdd(DateInterval.Day, -1, DateAdd(DateInterval.Month, 1, CDate(FechaI))).ToString("dd/MM/yyyy") Dim fileName As String = "EdoSituacionFinanciera" Dim reportpath As String = "Contabilidad2/Reportes/RepSituacionFinanciera.rdlc" From 2f0d3775ec4f6fcde904aadfa7751c2e6eadd1e2 Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 22 Sep 2023 16:48:48 -0700 Subject: [PATCH 003/100] =?UTF-8?q?--=20se=20quit=C3=B3=20c=C3=B3digo=20de?= =?UTF-8?q?=20cancelaciones=20"especiales..."=20--=20correcci=C3=B3n=20de?= =?UTF-8?q?=20cancelaci=C3=B3n=20por=20refacturaci=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ventas/RepCancelacionesPorRespuesta.aspx | 7 +- Ventas/RepCancelacionesPorRespuesta.aspx.cs | 229 ++++++++++---------- 2 files changed, 112 insertions(+), 124 deletions(-) diff --git a/Ventas/RepCancelacionesPorRespuesta.aspx b/Ventas/RepCancelacionesPorRespuesta.aspx index e21dd27cd..e21a239ee 100644 --- a/Ventas/RepCancelacionesPorRespuesta.aspx +++ b/Ventas/RepCancelacionesPorRespuesta.aspx @@ -127,12 +127,7 @@
- -
-
- -
-
+ diff --git a/Ventas/RepCancelacionesPorRespuesta.aspx.cs b/Ventas/RepCancelacionesPorRespuesta.aspx.cs index 4cc9ff651..ce02faedd 100644 --- a/Ventas/RepCancelacionesPorRespuesta.aspx.cs +++ b/Ventas/RepCancelacionesPorRespuesta.aspx.cs @@ -189,22 +189,15 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas int CveEstatusRefacturacion = GvRow.DataKey("CveEstatusRefacturacion").ToEntero(); int CveEstatusFacturaSustitucion = GvRow.DataKey("CveEstatusFacturaSustitucion").ToEntero(); - //SI NO SE PUDO CANCELAR O LA FACTURA NUEVA FUE CANCELADA, CANCELAR CON EL 02 - if (CveEstatusRefacturacion == 4 || CveEstatusFacturaSustitucion == 5) + if (CveEstatusRefacturacion > 0) { - //CUANDO LAS REFACTURACIONES NO SE PUEDEN CANCELAR, DEBE SER CANCELADO CON EL MOTIVO 02 - FolioSustitucion = ""; - CveMotivoCancelacion = get_GlobalDTMotivosCancelacionEmpresa(UsuarioActual.CveEmpresa, CveSATMotivoCancelacion: 2).FiltroPrimeroValor("CveMotivoCancelacion").ToEntero(); + CveMotivoCancelacion = get_GlobalDTMotivosCancelacionEmpresa(UsuarioActual.CveEmpresa, CveSATMotivoCancelacion: 1).FiltroPrimeroValor("CveMotivoCancelacion").ToEntero(); } - else - { - CveEstatusRefacturacion = 2; - } - - + //CveEstatusRefacturacion = 2; + if (CveVenta > 0) { - var respCancelacion = CancelarDocumento(CveVenta, -1, CveCliente, Folio, Uuid, "", DateTime.Now, TipoDocto, Total.ToDouble(), UsuarioActual.Empresa.CvePAC, EsRefacturacion: true, FolioSustitucion: FolioSustitucion, CveEstatusRefacturacion: CveEstatusRefacturacion); + var respCancelacion = CancelarDocumento(CveVenta, -1, CveCliente, Folio, Uuid, "", DateTime.Now, TipoDocto, Total.ToDouble(), UsuarioActual.Empresa.CvePAC, EsRefacturacion: true, FolioSustitucion: FolioSustitucion, CveEstatusRefacturacion: CveEstatusRefacturacion, CveMotivoCancelacion: CveMotivoCancelacion); if (!respCancelacion.HuboError) { @@ -811,127 +804,127 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas } - protected void LnkCancelarFolioSustitucion_Click(object sender, EventArgs e) - { - //this.HdnLigaRefacturar.Value = ""; - this.CveVenta = -1; + //protected void LnkCancelarFolioSustitucion_Click(object sender, EventArgs e) + //{ + // //this.HdnLigaRefacturar.Value = ""; + // this.CveVenta = -1; - GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer); - this.CveVenta = GvRow.DataKey("CveVentaSustitucion").ToEntero(); + // GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer); + // this.CveVenta = GvRow.DataKey("CveVentaSustitucion").ToEntero(); - int CveCliente = GvRow.DataKey("CveClienteSustitucion").ToEntero(); - string Total = GvRow.DataKey("TotalSustitucion"); - string RFCReceptor = GvRow.DataKey("RFCReceptorSustitucion"); - string TipoDocto = GvRow.DataKey("TipoDocto"); - string Nombre = GvRow.DataKey("Nombre"); - string FolioSustitucion = GvRow.DataKey("FolioFiscalSustitucion"); - string SerieFolioSustitucion = GvRow.DataKey("SerieFolioSustitucion"); + // int CveCliente = GvRow.DataKey("CveClienteSustitucion").ToEntero(); + // string Total = GvRow.DataKey("TotalSustitucion"); + // string RFCReceptor = GvRow.DataKey("RFCReceptorSustitucion"); + // string TipoDocto = GvRow.DataKey("TipoDocto"); + // string Nombre = GvRow.DataKey("Nombre"); + // string FolioSustitucion = GvRow.DataKey("FolioFiscalSustitucion"); + // string SerieFolioSustitucion = GvRow.DataKey("SerieFolioSustitucion"); - int CveVentaOriginal = GvRow.DataKey("CveVenta").ToEntero(); - string SerieFolioOriginal = GvRow.DataKey("SerieFolio"); + // int CveVentaOriginal = GvRow.DataKey("CveVenta").ToEntero(); + // string SerieFolioOriginal = GvRow.DataKey("SerieFolio"); - //CUANDO LAS REFACTURACIONES NO SE PUEDEN CANCELAR, DEBE SER CANCELADO CON EL MOTIVO 02 - int CveMotivoCancelacion = get_GlobalDTMotivosCancelacionEmpresa(UsuarioActual.CveEmpresa, CveSATMotivoCancelacion: 2).FiltroPrimeroValor("CveMotivoCancelacion").ToEntero(); + // //CUANDO LAS REFACTURACIONES NO SE PUEDEN CANCELAR, DEBE SER CANCELADO CON EL MOTIVO 02 + // int CveMotivoCancelacion = get_GlobalDTMotivosCancelacionEmpresa(UsuarioActual.CveEmpresa, CveSATMotivoCancelacion: 2).FiltroPrimeroValor("CveMotivoCancelacion").ToEntero(); - if (CveVenta > 0 && FolioSustitucion != "") - { - var respCancelacion = CancelarDocumento(CveVenta, -2, CveCliente, "", FolioSustitucion, "", DateTime.Now, TipoDocto, Total.ToDouble(), UsuarioActual.Empresa.CvePAC, EsRefacturacion: true, FolioSustitucion: "", CveEstatusRefacturacion: 4, CveMotivoCancelacion: CveMotivoCancelacion); + // if (CveVenta > 0 && FolioSustitucion != "") + // { + // var respCancelacion = CancelarDocumento(CveVenta, -2, CveCliente, "", FolioSustitucion, "", DateTime.Now, TipoDocto, Total.ToDouble(), UsuarioActual.Empresa.CvePAC, EsRefacturacion: true, FolioSustitucion: "", CveEstatusRefacturacion: 4, CveMotivoCancelacion: CveMotivoCancelacion); - if (!respCancelacion.HuboError) - { - var sb = new StringBuilder(); - var EnviarAcuse = false; - if (respCancelacion.CveEstatus > 0) - { - if (respCancelacion.CveEstatus.Contiene(5, 20)) - { - EnviarAcuse = true; - } + // if (!respCancelacion.HuboError) + // { + // var sb = new StringBuilder(); + // var EnviarAcuse = false; + // if (respCancelacion.CveEstatus > 0) + // { + // if (respCancelacion.CveEstatus.Contiene(5, 20)) + // { + // EnviarAcuse = true; + // } - var CveEstatus = respCancelacion.CveEstatus; - var ObjVentas = new ClsVentas(); - if (ObjVentas.UpdateEstatusVenta(CveVenta, CveEstatus, UsuarioActual.CveEmpresa)) - { - if (respCancelacion.CveEstatus == 20) - { - sb.Append($"El estatus de la factura {SerieFolioSustitucion} fue cambiado a 'Cancelación en proceso'."); + // var CveEstatus = respCancelacion.CveEstatus; + // var ObjVentas = new ClsVentas(); + // if (ObjVentas.UpdateEstatusVenta(CveVenta, CveEstatus, UsuarioActual.CveEmpresa)) + // { + // if (respCancelacion.CveEstatus == 20) + // { + // sb.Append($"El estatus de la factura {SerieFolioSustitucion} fue cambiado a 'Cancelación en proceso'."); - sb.Append($"
Imprimir Acuse"); - } - else if (respCancelacion.CveEstatus == 23) - { - sb.Append("La solicitud de cancelación no la aplicó el SAT, intente cancelar de nuevo."); - } - else if (respCancelacion.CveEstatus == 5) - { - sb.Append($"El estatus de la factura {SerieFolioSustitucion} fue cambiado a 'Cancelada'."); - sb.Append("El documento se canceló correctamente."); - sb.Append($"
Imprimir Acuse"); - } + // sb.Append($"
Imprimir Acuse"); + // } + // else if (respCancelacion.CveEstatus == 23) + // { + // sb.Append("La solicitud de cancelación no la aplicó el SAT, intente cancelar de nuevo."); + // } + // else if (respCancelacion.CveEstatus == 5) + // { + // sb.Append($"El estatus de la factura {SerieFolioSustitucion} fue cambiado a 'Cancelada'."); + // sb.Append("El documento se canceló correctamente."); + // sb.Append($"
Imprimir Acuse"); + // } - if (respCancelacion.CveEstatus.Contiene(5, 20)) - { - if (ObjVentas.UpdateEstatusVenta(CveVentaOriginal, 23, UsuarioActual.CveEmpresa, CveEstatusRefacturacion: 4, CveMotivoCancelacion: CveMotivoCancelacion)) - { - sb.Append($"
La Factura {SerieFolioOriginal} fue desligada."); - } - } + // if (respCancelacion.CveEstatus.Contiene(5, 20)) + // { + // if (ObjVentas.UpdateEstatusVenta(CveVentaOriginal, 23, UsuarioActual.CveEmpresa, CveEstatusRefacturacion: 4, CveMotivoCancelacion: CveMotivoCancelacion)) + // { + // sb.Append($"
La Factura {SerieFolioOriginal} fue desligada."); + // } + // } - } - else - { - sb.Append("Ocurrió un error al cambiar el estatus de la factura."); - } - ObjVentas.Dispose(); + // } + // else + // { + // sb.Append("Ocurrió un error al cambiar el estatus de la factura."); + // } + // ObjVentas.Dispose(); - if (respCancelacion.CveEstatus == 23) - { - var resp = Timbrado.VerificarVigenciaSAT(FolioSustitucion, UsuarioActual.Empresa.RFC, RFCReceptor, Total, true); - if (resp != null) - { - sb.AppendFormat("
Folio Fiscal: {0}
", FolioSustitucion); - sb.AppendFormat("Código Estado: {0}
", resp.CodigoEstatus); - sb.AppendFormat("Estado: {0}
", resp.Estado); - sb.AppendFormat("Es Cancelable: {0}
", string.IsNullOrEmpty(resp.EsCancelable) ? "Desconocido" : resp.EsCancelable); - sb.AppendFormat("Estatus de Cancelación: {0}

", string.IsNullOrEmpty(resp.EsCancelable) ? "Desconocido" : resp.EstatusCancelacion); - } - } - } - else - { - var resp = Timbrado.VerificarVigenciaSAT(FolioSustitucion, UsuarioActual.Empresa.RFC, RFCReceptor, Total, true); - if (resp != null) - { - sb.AppendFormat("Folio Fiscal: {0}
", FolioSustitucion); - sb.AppendFormat("Código Estado: {0}
", resp.CodigoEstatus); - sb.AppendFormat("Estado: {0}
", resp.Estado); - sb.AppendFormat("Es Cancelable: {0}
", string.IsNullOrEmpty(resp.EsCancelable) ? "Desconocido" : resp.EsCancelable); - sb.AppendFormat("Estatus de Cancelación: {0}

", string.IsNullOrEmpty(resp.EsCancelable) ? "Desconocido" : resp.EstatusCancelacion); - } + // if (respCancelacion.CveEstatus == 23) + // { + // var resp = Timbrado.VerificarVigenciaSAT(FolioSustitucion, UsuarioActual.Empresa.RFC, RFCReceptor, Total, true); + // if (resp != null) + // { + // sb.AppendFormat("
Folio Fiscal: {0}
", FolioSustitucion); + // sb.AppendFormat("Código Estado: {0}
", resp.CodigoEstatus); + // sb.AppendFormat("Estado: {0}
", resp.Estado); + // sb.AppendFormat("Es Cancelable: {0}
", string.IsNullOrEmpty(resp.EsCancelable) ? "Desconocido" : resp.EsCancelable); + // sb.AppendFormat("Estatus de Cancelación: {0}

", string.IsNullOrEmpty(resp.EsCancelable) ? "Desconocido" : resp.EstatusCancelacion); + // } + // } + // } + // else + // { + // var resp = Timbrado.VerificarVigenciaSAT(FolioSustitucion, UsuarioActual.Empresa.RFC, RFCReceptor, Total, true); + // if (resp != null) + // { + // sb.AppendFormat("Folio Fiscal: {0}
", FolioSustitucion); + // sb.AppendFormat("Código Estado: {0}
", resp.CodigoEstatus); + // sb.AppendFormat("Estado: {0}
", resp.Estado); + // sb.AppendFormat("Es Cancelable: {0}
", string.IsNullOrEmpty(resp.EsCancelable) ? "Desconocido" : resp.EsCancelable); + // sb.AppendFormat("Estatus de Cancelación: {0}

", string.IsNullOrEmpty(resp.EsCancelable) ? "Desconocido" : resp.EstatusCancelacion); + // } - sb.Append(respCancelacion.Mensaje); - } + // sb.Append(respCancelacion.Mensaje); + // } - if (EnviarAcuse) - { - sb.Append("

¿Desea enviar el Acuse de Cancelación al Cliente?"); - Alert(sb.ToString(), TipoMensaje.MsgConfirmacion, "BtnEnviarMailCancelacion();", TextoConfirmacion: "Enviar", TextoSegundoBoton: "Cancelar"); - } - else - { - Alert(sb.ToString()); - } - } - else - { - Alert(respCancelacion.Mensaje, TipoMensaje.MsgError); - } + // if (EnviarAcuse) + // { + // sb.Append("

¿Desea enviar el Acuse de Cancelación al Cliente?"); + // Alert(sb.ToString(), TipoMensaje.MsgConfirmacion, "BtnEnviarMailCancelacion();", TextoConfirmacion: "Enviar", TextoSegundoBoton: "Cancelar"); + // } + // else + // { + // Alert(sb.ToString()); + // } + // } + // else + // { + // Alert(respCancelacion.Mensaje, TipoMensaje.MsgError); + // } - CargaDatos(); - } - UPDatos.Update(); + // CargaDatos(); + // } + // UPDatos.Update(); - } + //} } public class MRespuestaSAT { From e3072dbaf21ed3b21bc1011e4e83381d24b3074e Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 27 Sep 2023 07:14:24 -0700 Subject: [PATCH 004/100] =?UTF-8?q?--cambio=20a=20stimul=20--=20verificaci?= =?UTF-8?q?=C3=B3n=20en=20cancelaciones?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App_Code/ClsPaginas.vb | 32 ++--- App_Code/Modelos.vb | 10 +- App_Code/Timbrado.vb | 297 +++-------------------------------------- 3 files changed, 40 insertions(+), 299 deletions(-) diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index e8a0fd6bc..a2395629d 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -4426,7 +4426,7 @@ Public Class ClsPaginas End Sub Private Shared Function GetCurrentPageViewState() As System.Web.UI.StateBag Dim page As Page = TryCast(HttpContext.Current.CurrentHandler, Page) - Dim viewStateProp = page?.[GetType]().GetProperty("ViewState", Reflection.BindingFlags.FlattenHierarchy Or Reflection.BindingFlags.Instance Or Reflection.BindingFlags.NonPublic) + Dim viewStateProp As Reflection.PropertyInfo = page?.[GetType]().GetProperty("ViewState", Reflection.BindingFlags.FlattenHierarchy Or Reflection.BindingFlags.Instance Or Reflection.BindingFlags.NonPublic) Return CType(viewStateProp?.GetValue(page), System.Web.UI.StateBag) End Function Public Shared Sub Alert(Mensaje As String, Optional pOpcion As TipoMensaje = TipoMensaje.MsgInformacion, Optional JSBtnAceptar As String = "", Optional timeout As Integer = 5, Optional ShowCloseButton As Boolean = True, Optional TextoConfirmacion As String = "", Optional TextoSegundoBoton As String = "", Optional JSBtn2 As String = "") @@ -4521,11 +4521,11 @@ Public Class ClsPaginas End Sub Public Sub NotificacionesPendientes(Nota As String) 'incremento el contador de alertas - Dim Type = Master.GetType - Dim Prop = Type.GetProperty("countNotificaciones") + Dim Type As System.Type = Master.GetType + Dim Prop As Reflection.PropertyInfo = Type.GetProperty("countNotificaciones") Prop.SetValue(Master, 1 + CInt(Prop.GetValue(Master))) 'end incremento contador de alertas - Dim ltl = DirectCast(Master.FindControl("LtlMNotificaciones"), Literal) + Dim ltl As Literal = DirectCast(Master.FindControl("LtlMNotificaciones"), Literal) ltl.Text = String.Format(" {0} {1}", ltl.Text, Nota) End Sub Public Sub Confirmacion(Mensaje As String, Tipo As String, FuncionOK As String, FuncionCancel As String) @@ -4628,7 +4628,7 @@ Public Class ClsPaginas lrds.Add(rds) ImprimirPDF(RutaReporte, lrds, Parametros, NombreArchivo, Formato, MR, Content_Disposition) End Sub - Public Sub ImprimirPDFStimulsoft(RutaReporte As String, DtDatos As DataTable, Parametros As List(Of ReportParameter), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional RDSName As String = "Datos", Optional Content_Disposition As String = "attachment") + Public Sub ImprimirPDFStimul(RutaReporte As String, DtDatos As DataTable, Parametros As List(Of ReportParameter), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional RDSName As String = "Datos", Optional Content_Disposition As String = "attachment") Dim lrds As New List(Of ReportDataSource) Dim rds As New ReportDataSource rds.Name = RDSName @@ -4638,7 +4638,7 @@ Public Class ClsPaginas If Formato.ToLower() = "excel" Then Extension = "xlsx" End If - ImprimirbytesPDF(StreamBytesStimulsoft("Facturas", RutaReporte, lrds, Parametros, NombreArchivo:=NombreArchivo, Formato:=Formato), NombreArchivo, Formato, Content_Disposition:=Content_Disposition, Extension:=Extension) + ImprimirbytesPDF(StreamBytesStimul("Facturas", RutaReporte, lrds, Parametros, NombreArchivo:=NombreArchivo, Formato:=Formato), NombreArchivo, Formato, Content_Disposition:=Content_Disposition, Extension:=Extension) End Sub Public Sub ImprimirPDFMultiDS(RutaReporte As String, lrds As List(Of ReportDataSource), Parametros As List(Of ReportParameter), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional RDSName As String = "DataSet1", Optional MR As ReportViewer = Nothing) ImprimirPDF(RutaReporte, lrds, Parametros, NombreArchivo, Formato, MR) @@ -5110,7 +5110,7 @@ Public Class ClsPaginas #End Region #Region "IMPRIMIR FACTURA" - Public Function PdfFactura(ByRef Vta As Modelos.Factura, Optional AplicaPagare As String = "0", Optional Guardar As Boolean = True, Optional SubReportData As Modelos.MSubReportData = Nothing, Optional UsarStimulsoft As Boolean = False) As Byte() + Public Function PdfFactura(ByRef Vta As Modelos.Factura, Optional AplicaPagare As String = "0", Optional Guardar As Boolean = True, Optional SubReportData As Modelos.MSubReportData = Nothing, Optional UsarStimul As Boolean = False) As Byte() Dim retorno As Byte() = Nothing ' Dim ObjVentas As New ClsVentas 'DATOS GENERALES @@ -5947,7 +5947,7 @@ Public Class ClsPaginas lrds.Add(rds3) Dim rds4 As New ReportDataSource With {.Name = "DataSet4", .Value = If(Vta.DtDocumentosRelacionados IsNot Nothing, Vta.DtDocumentosRelacionados, New DataTable)} ' sino esta creado el objeto, lo creamos, para que no truene el reporte lrds.Add(rds4) - If UsuarioActual.Empresa.Funcionalidad(707) = "1" OrElse UsarStimulsoft Then + If UsuarioActual.Empresa.Funcionalidad(707) = "1" OrElse UsarStimul Then If Vta.Cliente.CodigoRegimenFiscal.ToString.Length > 0 Then params.Add(New ReportParameter("ClienteRegimenFiscal", $"{Vta.Cliente.CodigoRegimenFiscal}-{Vta.Cliente.RegimenFiscal}")) End If @@ -5993,11 +5993,11 @@ Public Class ClsPaginas If UsuarioActual.Empresa.Funcionalidad(707) = "1" Then Dim ArchivoStimulsfot As New System.IO.FileInfo(RutaFormato.Replace(".rdlc", ".mrt")) If ArchivoStimulsfot.Exists Then - UsarStimulsoft = True + UsarStimul = True params.Add(New ReportParameter("RegimenFiscalEmpresa", String.Format("{0} - {1}", UsuarioActual.Empresa.CodigoRegimenFiscal, UsuarioActual.Empresa.RegimenFiscal))) End If End If - If Not UsarStimulsoft Then + If Not UsarStimul Then Dim Archivo As New System.IO.FileInfo(RutaFormato) If Archivo.Exists Then @@ -6029,7 +6029,7 @@ Public Class ClsPaginas End If Else RutaFormato = RutaFormato.Replace(".rdlc", ".mrt") - retorno = StreamBytesStimulsoft("Facturas", RutaFormato, lrds, params, NombreArchivo:=NombreArchivo, Formato:="PDF") + retorno = StreamBytesStimul("Facturas", RutaFormato, lrds, params, NombreArchivo:=NombreArchivo, Formato:="PDF") If UsuarioActual.Empresa.Funcionalidad(707) = "1" Then Dim ArchivoPDF As New System.IO.FileInfo(String.Format("{0}PDF\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, Vta.TipoDocto, Vta.SerieFolio)) If Guardar Then @@ -6057,7 +6057,7 @@ Public Class ClsPaginas End Try Return retorno End Function - Protected Function StreamBytesStimulsoft(Opcion As String, RutaReporte As String, DataSource As List(Of ReportDataSource), Parametros As List(Of ReportParameter), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional NombreDataSource As String = "Datos") As Byte() + Protected Function StreamBytesStimul(Opcion As String, RutaReporte As String, DataSource As List(Of ReportDataSource), Parametros As List(Of ReportParameter), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional NombreDataSource As String = "Datos") As Byte() 'limpio ReportViwer Dim sw As Stopwatch = Stopwatch.StartNew() @@ -6119,12 +6119,12 @@ Public Class ClsPaginas New JProperty("parametros", paramsArray), New JProperty("dataSource", dataSourceArray) ) - Dim data = New StringContent(payload.ToString(), Encoding.UTF8, "application/json") - Using httpClient = New HttpClient() - Using request = New HttpRequestMessage(HttpMethod.Post, Url) + Dim data As New StringContent(payload.ToString(), Encoding.UTF8, "application/json") + Using httpClient As New HttpClient() + Using request As New HttpRequestMessage(HttpMethod.Post, Url) 'request.Headers.Add("ADSToken", Encripta(String.Format("CVEEMPRESA={0}&TICKS={1}&CVEUSUARIO=100", CveEmpresa, DateTime.UtcNow.Ticks))) request.Content = New StringContent(payload.ToString(), Encoding.UTF8, "application/json") - Dim response = httpClient.SendAsync(request).Result + Dim response As HttpResponseMessage = httpClient.SendAsync(request).Result If response.StatusCode = Net.HttpStatusCode.OK Then Bytes = response.Content.ReadAsByteArrayAsync().Result End If diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb index 7860b5459..90eb33622 100644 --- a/App_Code/Modelos.vb +++ b/App_Code/Modelos.vb @@ -7115,7 +7115,7 @@ Namespace Modelos Public Property CvePAC As Integer Public Property CveAnticipo As Integer Public Property RemisionesLista As List(Of Integer) - Public Property CveAlmacen As Integer + Public Property CveAlmacen As Integer = -1 Public Property GenerarSalidaAlmacen As Boolean = False Public Property CveConceptoMovimiento As Integer Public Property MovimientoObservaciones As String @@ -7323,7 +7323,7 @@ Namespace Modelos Public Property TipoCambioDolares As Decimal Public Property ConvertirPesos As Boolean Public Property ConvertirDolares As Boolean - Public Property FormaPago As Integer + Public Property FormaPago As Integer = 0 Public ReadOnly Property FormaPagoText As String Get @@ -7338,7 +7338,7 @@ Namespace Modelos End Get End Property - Public Property CondicionesPago As Integer + Public Property CondicionesPago As Integer = 0 ' 0 - Contado, 1 - Credito (CHECAR) Public ReadOnly Property CondicionesPagoText As String Get @@ -7589,10 +7589,10 @@ Namespace Modelos Public Property NumeroContrato As String = "" Public Property PedidoContrato As String = "" Public Property OrdenCompra As String = "" - Public Property CveMetodoPago As Integer + Public Property CveMetodoPago As Integer = 0 Public Property MetodoPago As String = "" Public Property ClaveMetodoPagoSAT As String = "" - Public Property CveMetodoPago33 As Integer + Public Property CveMetodoPago33 As Integer = 1 Public Property MetodoPago33 As String = "" Public Property CveFormaPago33 As Integer Public Property MetodoPagoSAT33 As String = "" diff --git a/App_Code/Timbrado.vb b/App_Code/Timbrado.vb index c99190c6a..b3f1d81d6 100644 --- a/App_Code/Timbrado.vb +++ b/App_Code/Timbrado.vb @@ -252,255 +252,6 @@ Public Class Timbrado MsgCancelacion.AppendFormat("CvePAC:{0}", CvePACCancelacion) Select Case CvePACCancelacion - Case 1 - MsgCancelacion.AppendFormat("1.1") - Try - Dim CFDi As New ClbNegBICFDv3_2.ClsNegEDI - Dim Respuesta As New ClbNegBICFDv3_2.ClsNegRespuesta - Respuesta = CFDi.CancelaCFdi(Empresa.BIUsuario, Empresa.BIContraseña, Empresa.Ruta & "Certificados\" & Empresa.ArchivoPfx, Empresa.ContraseñaKey, Empresa.RFC, FolioFiscal, "http://portalbiinform.com.mx/srvCFDi/service1.asmx") - - If Respuesta IsNot Nothing AndAlso Respuesta.SelloSAT <> "" Then - Dim xml64 As String = "" - Dim myXml As String = Respuesta.SelloSAT - Dim resp As XElement = XElement.Parse(myXml) - For Each elem As XElement In resp.Descendants - If elem.Name = "xmlBase64" Then xml64 = elem.Value - Next - - 'If Respuesta.UUDI.Contiene("0", "201", "202") Then - Dim xmlDoc As New System.Xml.XmlDocument() - xmlDoc.LoadXml(If(xml64 = "", Respuesta.SelloSAT, Encoding.UTF8.GetString(Convert.FromBase64String(xml64)))) - Dim AcuseChild = xmlDoc.ChildNodes.Cast(Of XmlNode).Where(Function(a) a.Name.Equals("Acuse", StringComparison.CurrentCultureIgnoreCase)).FirstOrDefault() - - Dim FoliosChild = AcuseChild.ChildNodes.Cast(Of XmlNode).Where(Function(a) a.LocalName.Equals("Folios", StringComparison.CurrentCultureIgnoreCase)).FirstOrDefault() - Dim SignatureChild = AcuseChild.ChildNodes.Cast(Of XmlNode).Where(Function(a) a.LocalName.Equals("Signature", StringComparison.CurrentCultureIgnoreCase)).FirstOrDefault() - - Dim prefixFol As String = FoliosChild.Prefix - If prefixFol <> "" Then prefixFol = $"{prefixFol}:" 'se le agregan los ":" si tiene prefijo - - CancelacionState = xmlDoc.GetElementsByTagName($"{prefixFol}EstatusUUID")(0).InnerText.ToEntero - 'verificación basada en el resultado del xml. - If CancelacionState.Contiene(201, 202) Then - - Dim prefixSig = SignatureChild.Prefix - If prefixSig <> "" Then prefixSig = $"{prefixSig}:" 'se le agregan los ":" si tiene prefijo - Dim SignatureValue = xmlDoc.GetElementsByTagName($"{prefixSig}SignatureValue") - CancelacionAcuse = If(SignatureValue.Count < 1, SignatureValue(0).InnerText, SignatureValue(0).InnerText) - Try - CancelacionFecha = AcuseChild.Attributes("Fecha").Value.ToDate - Catch ex As Exception - CancelacionFecha = xmlDoc.GetElementsByTagName("CancelaCFDResult")(0).Attributes("Fecha").Value.ToDate - End Try - - Retorno.Verificado = True - Retorno.CancelacionFecha = CancelacionFecha - Retorno.CancelacionAcuse = CancelacionAcuse - End If - - 'End If - - Else - Me.GuardaLog(CFDi.MsgError) - End If - Respuesta = Nothing - CFDi = Nothing - Catch ex As Exception - GuardaLog($"{ex.Message}") - End Try - - Case 2 - MsgCancelacion.AppendFormat("2.1") - Dim ArchivoLLave As String = $"{Empresa.Ruta}Certificados\{Empresa.ArchivoKey}" - Dim ArchivoCertificado As String = $"{Empresa.Ruta}Certificados\{Empresa.ArchivoCer}" - Dim UsuarioServicio As String = If(CvePACCancelacion = 2, Empresa.RFC, "rene.molina@adsistemas.mx") - Dim ClaveServicio As String = If(CvePACCancelacion = 2, Empresa.RFC.ToLower, "rene2018") - Dim Clave As String = Empresa.ContraseñaKey - Dim UrlServicio As String = "" ' Produccion - Select Case CvePACCancelacion - Case 2 - UrlServicio = "http://generacfdi.com.mx/rvltimbrado/service1.asmx?WSDL" - Case 4 - UrlServicio = "http://192.168.0.2:8080/ADSistemas/Timbrado.asmx?WSDL" - End Select - - If Not Empresa.FacturaProduccion Then - ArchivoLLave = $"{Empresa.Ruta}Certificados\CSD01_AAA010101AAA.key" - ArchivoCertificado = $"{Empresa.Ruta}Certificados\CSD01_AAA010101AAA.cer" - Select Case CvePACCancelacion - Case 2 - UsuarioServicio = "fgomez" - ClaveServicio = "12121212" - UrlServicio = "http://generacfdi.com.mx/rvltimbrado/service1.asmx?WSDL" - Case 4 - UsuarioServicio = "UserTest" - ClaveServicio = "1234567890" - UrlServicio = "http://192.168.0.2:8080/ADSistemas/Timbrado.asmx?WSDL" - End Select - End If - -#Region "Valida" - If Not File.Exists(ArchivoCertificado) Then - Alert("El archivo de certificado no existe", TipoMensaje.MsgError) - Retorno.Verificado = False - End If - If Not File.Exists(ArchivoLLave) Then - Alert("El archivo de llave privada no existe", TipoMensaje.MsgError) - Retorno.Verificado = False - End If - If Empresa.ContraseñaKey = "" Then - Alert("La clave no puede ser vacía", TipoMensaje.MsgError) - Retorno.Verificado = False - End If -#End Region - -#Region "Variables" - Dim llaveByte As Byte(), certByte As Byte() - Dim llaveBase64 As String = "", certBase64 As String = "" - Dim cfdi As New RVCFDI.GeneraCFDI() - Dim complemento As String = "" - Dim complementoConcepto As String = "" - -#End Region - -#Region "Verifica" - Try - llaveByte = System.IO.File.ReadAllBytes(ArchivoLLave) - llaveBase64 = Convert.ToBase64String(llaveByte) - Catch ex As Exception - Alert($"Error al leer la llave privada: {ex.Message}", TipoMensaje.MsgError) - Retorno.Verificado = False - End Try - - - Try - certByte = System.IO.File.ReadAllBytes(ArchivoCertificado) - certBase64 = Convert.ToBase64String(certByte) - Catch ex As Exception - Alert($"Error al leer el certificado: {ex.Message}", TipoMensaje.MsgError) - Retorno.Verificado = False - End Try -#End Region - - - Dim base64 As String - Dim ObjCancelacion As New RVCancelacion.Cancelacion() - - Dim xmlCancelacion As String = ObjCancelacion.crearXMLCancelacion(certBase64, llaveBase64, Clave, FolioFiscal) - If (ObjCancelacion.MensajeDeError = "") Then - - base64 = CodificarABase64(xmlCancelacion) - - Dim objWS As RVCFDI.WSGeneraCFDI.Service = Nothing - Dim objAuthSoapHD As RVCFDI.WSGeneraCFDI.AuthSoapHd - Dim objResponse As RVCFDI.WSGeneraCFDI.StructCfd - Dim objCancel As RVCFDI.WSGeneraCFDI.StructCancel - - Try - - - 'Variables de consumo de servicio web - objWS = New RVCFDI.WSGeneraCFDI.Service() - objAuthSoapHD = New RVCFDI.WSGeneraCFDI.AuthSoapHd() - 'creacion de Autorizacion de cabecera Soap - objCancel = New RVCFDI.WSGeneraCFDI.StructCancel() - 'Configura el servicio - objWS.Url = UrlServicio - - objAuthSoapHD.strPassword = ClaveServicio - objAuthSoapHD.strUserName = UsuarioServicio - 'Coloca la cabecera - objWS.AuthSoapHdValue = objAuthSoapHD - 'Obtiene el resultado - objCancel = objWS.CancelTicket(base64) - 'Valida la respuesta - ''Codigos del SAT - ''201 - El folio se ha cancelado con éxito. - ''202 - El CFDI ya había sido cancelado previamente. - ''203 - UUID no corresponde al emisor. - ''204 - El CFDI no aplica para cancelación. - ''205 - El UUID no existe o no ha sido procesado por el SAT. - ''402 - El Contribuyente no se encuentra el la LCO o la validez de obligaciones se reporta como negativa. - CancelacionState = objCancel.state - CancelacionMensaje = objCancel.Descripcion - - If objCancel.state.Contiene(0, 201, 202) Then - CancelacionFecha = Now - - Select Case CvePACCancelacion - Case 2 - Dim solicitud As New WSRVConsultas.Service1SoapClient - Dim resp As New WSRVConsultas.resp_Acuse() - resp = solicitud.ConsultarAcuseCancelacion(RFCEmisor, UsuarioServicio, ClaveServicio, FolioFiscal, CancelacionFecha.ToShortDateString) - CancelacionMensaje = objCancel.Descripcion - - If (resp.Estado = 0) Then - - Dim xmlDoc As New System.Xml.XmlDocument() - xmlDoc.LoadXml(Encoding.UTF8.GetString(Convert.FromBase64String(resp.Xml))) - Dim xpath As String = "Acuse/Folios" - Dim nodes As XmlNodeList = xmlDoc.SelectNodes(xpath) - CancelacionState = xmlDoc.GetElementsByTagName("EstatusUUID")(0).InnerText.ToEntero - - xpath = "Acuse/Signature" - nodes = xmlDoc.SelectNodes(xpath) - - CancelacionAcuse = xmlDoc.GetElementsByTagName("SignatureValue")(0).InnerText - CancelacionFecha = xmlDoc.SelectSingleNode("Acuse").Attributes("Fecha").Value.ToDate - Retorno.Verificado = True - Retorno.CancelacionFecha = CancelacionFecha - Retorno.CancelacionAcuse = CancelacionAcuse - Else - CancelacionAcuse = resp.MensajeDeError - Retorno.Verificado = True - Retorno.CancelacionFecha = CancelacionFecha - Retorno.CancelacionAcuse = CancelacionAcuse - End If - solicitud = Nothing - Case 4 - - Dim solicitud As New WSGF.Service1SoapClient - Dim resp As New WSGF.StructXml() - resp = solicitud.GetAcuse(RFCEmisor, UsuarioServicio, ClaveServicio, FolioFiscal) - CancelacionMensaje = objCancel.Descripcion - - If (resp.Estado = 0) Then - - Dim xmlDoc As New System.Xml.XmlDocument() - xmlDoc.LoadXml(Encoding.UTF8.GetString(Convert.FromBase64String(resp.CfdiB64))) - Dim xpath As String = "Acuse/Folios" - Dim nodes As XmlNodeList = xmlDoc.SelectNodes(xpath) - CancelacionState = xmlDoc.GetElementsByTagName("EstatusUUID")(0).InnerText.ToEntero - - xpath = "Acuse/Signature" - nodes = xmlDoc.SelectNodes(xpath) - - CancelacionAcuse = xmlDoc.GetElementsByTagName("SignatureValue")(0).InnerText - CancelacionFecha = xmlDoc.SelectSingleNode("Acuse").Attributes("Fecha").Value.ToDate - Retorno.Verificado = True - Retorno.CancelacionFecha = CancelacionFecha - Retorno.CancelacionAcuse = CancelacionAcuse - Else - CancelacionAcuse = resp.Descripcion - Retorno.Verificado = True - Retorno.CancelacionAcuse = CancelacionAcuse - End If - solicitud = Nothing - End Select - - - End If - Catch ex As Exception - CancelacionMensaje += $" | ex: {ex}" - Retorno.Verificado = False - End Try - - 'Libera memoria - objWS.Dispose() - objResponse = Nothing - objAuthSoapHD = Nothing - GC.Collect() - End If - Case 3 MsgCancelacion.AppendFormat("3.1") @@ -522,7 +273,6 @@ Public Class Timbrado AmbienteProductivo = False End If - #Region "Valida" If Not File.Exists(ArchivoCertificado) Then Alert("El archivo de certificado no existe", TipoMensaje.MsgError) @@ -537,7 +287,6 @@ Public Class Timbrado Retorno.Verificado = False End If #End Region - Dim conector As New Profact.TimbraCFDI40.Conector(AmbienteProductivo) If Not AmbienteProductivo Then @@ -545,16 +294,17 @@ Public Class Timbrado Else conector.EstableceCredenciales("vSGxMFWnNRy/nDoowxqrqw==|Sia123654") End If - MsgCancelacion.AppendFormat("-3.2") - Dim resultadoCancelacion As Profact.TimbraCFDI.ResultadoCancelacion - resultadoCancelacion = conector.CancelaCFDI40(RFCEmisor, FolioFiscal, CodigoSATMotivoCancelacion, FolioSustitucion) - CancelacionFecha = Now Dim resp As Profact.TimbraCFDI.ResultadoConsulta + MsgCancelacion.AppendFormat("-3.2") + Dim resultadoCancelacion As Profact.TimbraCFDI.ResultadoCancelacionAck + resultadoCancelacion = conector.CancelaCFDIAck40(RFCEmisor, FolioFiscal, CodigoSATMotivoCancelacion, FolioSustitucion) + CancelacionFecha = Now + resp = conector.ObtieneCFDI(RFCEmisor, FolioFiscal) MsgCancelacion.AppendFormat("-3.3") 'VERIFICA SI SE CANCELO O FUE CANCELADO PREVIAMENTE (CODIGO DE ERROR "330279") - If resultadoCancelacion.Exitoso OrElse resultadoCancelacion.NumeroError.Contiene("202", "330279") Then + If resultadoCancelacion.Exitoso OrElse resultadoCancelacion.NumeroError.Contiene("202", "330279", "330280") Then MsgCancelacion.AppendFormat("-3.4") CancelacionMensaje = resultadoCancelacion.Descripcion Retorno.CancelacionFecha = CancelacionFecha @@ -563,7 +313,7 @@ Public Class Timbrado MsgCancelacion.AppendFormat("-3.4.1") Try - xmlDoc.LoadXml(Encoding.UTF8.GetString(Convert.FromBase64String(resp.Xml))) + xmlDoc.LoadXml(Encoding.UTF8.GetString(Convert.FromBase64String(resultadoCancelacion.Xml))) Catch ex As Exception If resp.NumeroError.ToEntero() > 0 Then CancelacionMensaje = resp.Descripcion @@ -592,13 +342,11 @@ Public Class Timbrado Else Retorno.Verificado = False End If - - Else MsgCancelacion.AppendFormat("-3.5") CancelacionAcuse = resp.NumeroError CancelacionMensaje = resultadoCancelacion.Descripcion - Retorno.Verificado = True + Retorno.Verificado = False End If Case 4 @@ -610,7 +358,6 @@ Public Class Timbrado Dim Clave As String = Empresa.ContraseñaKey Dim UrlServicio As String = "" ' Produccion - 'UrlServicio = "http://alterno.gofac.com.mx/cfdi/timbrado.asmx?WSDL" ' alterno UrlServicio = "https://cfdi.gofac.com.mx/timbrado.asmx?WSDL" If Not Empresa.FacturaProduccion Then @@ -620,9 +367,7 @@ Public Class Timbrado UsuarioServicio = "UserTest" ClaveServicio = "1234567890" 'UrlServicio = "http://juancalderon-001-site6.ftempurl.com/cancelacion.asmx?WSDL" - End If - #Region "Valida" If Not File.Exists(ArchivoCertificado) Then Alert("El archivo de certificado no existe", TipoMensaje.MsgError) @@ -644,8 +389,6 @@ Public Class Timbrado Dim objCan As New GoFac.GoCfdi() Dim complemento As String = "" Dim complementoConcepto As String = "" - - #End Region #Region "Verifica" @@ -656,8 +399,6 @@ Public Class Timbrado Alert($"Error al leer la llave privada: {ex.Message}", TipoMensaje.MsgError) Retorno.Verificado = False End Try - - Try certByte = System.IO.File.ReadAllBytes(ArchivoCertificado) certBase64 = Convert.ToBase64String(certByte) @@ -759,7 +500,7 @@ Public Class Timbrado If result IsNot Nothing Then If result.statusOk Then - Dim cancelacion = result.cancelaciones.First() + Dim cancelacion As PADECancelacion = result.cancelaciones.First() If cancelacion IsNot Nothing Then 'EN PROCESO, CANCELABLE SIN ACEPTACION,CANCEALDO PREVIAMENTE If cancelacion.codigo.Contiene("96", "201", "202") Then @@ -1549,7 +1290,7 @@ Public Class Timbrado Dim y As Integer = 0 - For Each Tras In ObjCFDITimbre.Traslados + For Each Tras As CFDITraslados In ObjCFDITimbre.Traslados comprobante.Impuestos.Traslados(y) = New Profact.TimbraCFDI40.ComprobanteImpuestosTraslado() comprobante.Impuestos.Traslados(y).Base = Tras.Base.RoundSQL(NumDecimalesImporte) comprobante.Impuestos.Traslados(y).Impuesto = Tras.Impuesto @@ -1588,7 +1329,7 @@ Public Class Timbrado If ObjCFDITimbre.RetencionesLocales.Sum(Function(x) x.Importe) > 0 Then - Dim Imp = New Profact.TimbraCFDI.Complementos.ImpuestoLocal.ImpuestosLocales() + Dim Imp As New Profact.TimbraCFDI.Complementos.ImpuestoLocal.ImpuestosLocales() Imp.version = "1.0" Imp.TotaldeRetenciones = ObjCFDITimbre.RetencionesLocales.Sum(Function(x) x.Importe).FormatoNumero().ToDecimal Imp.TotaldeTraslados = 0 @@ -2064,7 +1805,7 @@ Public Class Timbrado Dim j As Integer = 0 ComCartaPorte.Mercancias.Mercancia(i).CantidadTransporta = New ProfactCartaPorte.CartaPorteMercanciasMercanciaCantidadTransporta(Carta.Mercancias.Mercancias.Count - 1) {} - For Each transp In concep.MercanciasCantidadTransporta + For Each transp As CFDICartaPorteMercanciaTransporta In concep.MercanciasCantidadTransporta ComCartaPorte.Mercancias.Mercancia(i).CantidadTransporta(j) = New ProfactCartaPorte.CartaPorteMercanciasMercanciaCantidadTransporta ComCartaPorte.Mercancias.Mercancia(i).CantidadTransporta(j).Cantidad = transp.Cantidad ComCartaPorte.Mercancias.Mercancia(i).CantidadTransporta(j).IDOrigen = transp.IDOrigen @@ -2484,7 +2225,7 @@ Public Class Timbrado If Not String.IsNullOrEmpty(resultadoTimbre.Detalle) Then Try - Dim Resultados = Newtonsoft.Json.Linq.JArray.Parse(resultadoTimbre.Detalle) + Dim Resultados As JArray = Newtonsoft.Json.Linq.JArray.Parse(resultadoTimbre.Detalle) If Resultados.Count > 0 Then If resultadoTimbre.Descripcion.Contains("RFC del receptor no existe") Then @@ -2620,13 +2361,13 @@ Public Class Timbrado If ObjCFDITimbre.Retenciones.Sum(Function(x) x.Importe) > 0 Then ''se acumulan los importes - For Each Ret In ObjCFDITimbre.Retenciones + For Each Ret As CFDIRetenciones In ObjCFDITimbre.Retenciones cfdi.Retencion(Ret.Impuesto, Ret.Importe) Next End If ''se acumulan los importes - For Each Tras In ObjCFDITimbre.Traslados + For Each Tras As CFDITraslados In ObjCFDITimbre.Traslados cfdi.Traslado(Tras.Base, Tras.Impuesto, Tras.TipoFactor, Tras.TasaOCuota, Tras.Importe) Next #End Region @@ -2791,7 +2532,7 @@ Public Class Timbrado For Each concep As CFDICartaPorteMercancia In Carta.Mercancias.Mercancias If concep.ValorMercancia <= 0 Then concep.Moneda = "" cfdi.CartaPorteMercancia(concep.BienesTransp, concep.ClaveSTCC, concep.Descripción, concep.Cantidad, concep.ClaveUnidad, concep.Unidad, concep.Dimensiones, concep.MaterialPeligroso, concep.ClaveMaterialPeligroso, If(concep.ClaveMaterialPeligroso <> "", concep.Embalaje, ""), If(concep.ClaveMaterialPeligroso <> "", concep.DescripEmbalaje, ""), concep.PesoenKg, concep.ValorMercancia, concep.Moneda, concep.FraccionArrancelaria, concep.UUIDComercioExt) - For Each transp In concep.MercanciasCantidadTransporta + For Each transp As CFDICartaPorteMercanciaTransporta In concep.MercanciasCantidadTransporta cfdi.CartaPorteCantidadTransporta(transp.Cantidad, transp.IDOrigen, transp.IDDestino, transp.CvesTransportes) Next Next @@ -3380,11 +3121,11 @@ Public Class Timbrado #Region "Timbra" If RespGeneracionXML = "" Then 'OBTENER EL XML DE LA VARIABLE PRIVADA "_xml" YA QUE NO ES ACCESIBLE POR MEDIO DE LA PROPIEDAD "XML" ANTES DE TIMBRAR - Dim valorXML = "" + Dim valorXML As String = "" Try - Dim tipo = GetType(GoFac.Cfdi4) - Dim info = tipo.GetField("_xml", BindingFlags.NonPublic Or BindingFlags.Instance) + Dim tipo As Type = GetType(GoFac.Cfdi4) + Dim info As FieldInfo = tipo.GetField("_xml", BindingFlags.NonPublic Or BindingFlags.Instance) valorXML = info?.GetValue(cfdi).ToString() Catch ex As Exception valorXML = "" From 6773db09846795b0ddb375d570940ece2820f6e8 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 27 Sep 2023 07:14:45 -0700 Subject: [PATCH 005/100] -- cambio a stimul --- Compras/PopUpVerFactura.aspx.vb | 24 +++++++++++------------- Ventas/Clientes.aspx.vb | 12 ++++++------ 2 files changed, 17 insertions(+), 19 deletions(-) diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index 51bfb7927..8a7e419cf 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -1336,9 +1336,9 @@ Partial Class PopUpVerFactura Dim AplicaPagare As String = If(UrlParametros("PAG") IsNot Nothing AndAlso UrlParametros("PAG").ToString <> "", UrlParametros("PAG").ToString, "0") Dim Guardar As Boolean = UrlParametros("GUARDAR") IsNot Nothing AndAlso UrlParametros("GUARDAR").ToString() = "1" Dim RegenerarPDF As Boolean = UrlParametros("REGENERAR") IsNot Nothing AndAlso UrlParametros("REGENERAR").ToString() = "1" - Dim STIMULSOFT As Boolean = UrlParametros("STIMULSOFT") IsNot Nothing AndAlso UrlParametros("STIMULSOFT").ToString() = "1" + Dim STIMUL As Boolean = UrlParametros("STIMULSOFT") IsNot Nothing AndAlso UrlParametros("STIMULSOFT").ToString() = "1" - imprimirFacturaVenta(UrlParametros("CVEVENTA").ToString.ToEntero, AplicaPagare, GuardarPDF:=Guardar, RegenerarPDF:=RegenerarPDF, UsarStimulsoft:=STIMULSOFT) + imprimirFacturaVenta(UrlParametros("CVEVENTA").ToString.ToEntero, AplicaPagare, GuardarPDF:=Guardar, RegenerarPDF:=RegenerarPDF, UsarStimul:=STIMUL) End If End If @@ -2921,7 +2921,7 @@ Partial Class PopUpVerFactura Archivo = Nothing End If End Sub - Public Sub imprimirFacturaVenta(CveVenta As Integer, AplicaPagare As String, Optional GuardarPDF As Boolean = False, Optional RegenerarPDF As Boolean = False, Optional UsarStimulsoft As Boolean = False) + Public Sub imprimirFacturaVenta(CveVenta As Integer, AplicaPagare As String, Optional GuardarPDF As Boolean = False, Optional RegenerarPDF As Boolean = False, Optional UsarStimul As Boolean = False) Dim ObjVentas As New ClsVentas Dim Vta As Modelos.Factura = Nothing @@ -2950,7 +2950,7 @@ Partial Class PopUpVerFactura Dim Archivo As New System.IO.FileInfo(PathArchivo) 'SI EL ARCHIVO NO EXISTE O SE VA REGENERA EL PDF, SE DEBEN LLENAR LOS DATOS - If Not Archivo.Exists OrElse RegenerarPDF OrElse UsarStimulsoft Then + If Not Archivo.Exists OrElse RegenerarPDF OrElse UsarStimul Then Vta.MonedaAbreviatura = dtVentas(0)("Abreviatura").ToString 'se rellena la sucursal 'Vta.Subproyecto = ObjVentas.DtResultados.Rows(0).DataRowToObject(Of Modelos.SucursalModel) @@ -3259,7 +3259,7 @@ Partial Class PopUpVerFactura Dim CveTimbreCartaPorteVenta As Integer = -1 Dim CartaPorte As Modelos.MSubReportData = Nothing 'SI EL ARCHIVO NO EXISTE O SE VA REGENERA EL PDF, SE DEBEN LLENAR LOS DATOS - If Not Archivo.Exists OrElse RegenerarPDF OrElse UsarStimulsoft Then + If Not Archivo.Exists OrElse RegenerarPDF OrElse UsarStimul Then If UsuarioActual.CveEmpresa = 13 AndAlso Vta.TipoDocto = "Ing" Then Using ObjGral As New ClsGenerales If ObjGral.GetGralTimbre(-1, "Ing", MinFecha, MaxFecha, 0, UsuarioActual.CveEmpresa, -1, CveVenta:=CveVenta) AndAlso ObjGral.DtResultados.Rows.Count > 0 Then @@ -3287,8 +3287,8 @@ Partial Class PopUpVerFactura End If End If - If UsarStimulsoft Then - ImprimirbytesPDF(PdfFactura(Vta, AplicaPagare:=AplicaPagare, Guardar:=True, SubReportData:=CartaPorte, UsarStimulsoft:=UsarStimulsoft), Vta.SerieFolio, "PDF") + If UsarStimul Then + ImprimirbytesPDF(PdfFactura(Vta, AplicaPagare:=AplicaPagare, Guardar:=True, SubReportData:=CartaPorte, UsarStimul:=UsarStimul), Vta.SerieFolio, "PDF") Else If Archivo.Exists Then If RegenerarPDF Then @@ -3779,7 +3779,7 @@ Partial Class PopUpVerFactura End If If UsuarioActual.CveEmpresa.Contiene(172, 173) Then - ImprimirPDFStimulsoft("Empresas/Grales/Formatos/EntradaSalida.mrt", DtMovimientos, params, String.Format("Entrada de Almacen - {0}", Folio.ToString)) + ImprimirPDFStimul("Empresas/Grales/Formatos/EntradaSalida.mrt", DtMovimientos, params, String.Format("Entrada de Almacen - {0}", Folio.ToString)) Else ImprimirPDF("Empresas/Grales/Formatos/EntradaSalida.rdlc", DtMovimientos, params, String.Format("Entrada de Almacen - {0}", Folio.ToString), RDSName:="DsInventarios") End If @@ -4039,7 +4039,7 @@ Partial Class PopUpVerFactura ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/EntradaSalida.rdlc", DtMovimientos, params, String.Format("Salida de Almacen - {0}", Folio.ToString), RDSName:="DsInventarios") Else If UsuarioActual.CveEmpresa.Contiene(172, 173) Then - ImprimirPDFStimulsoft("Empresas/Grales/Formatos/EntradaSalida.mrt", DtMovimientos, params, String.Format("Salida de Almacen - {0}", Folio.ToString)) + ImprimirPDFStimul("Empresas/Grales/Formatos/EntradaSalida.mrt", DtMovimientos, params, String.Format("Salida de Almacen - {0}", Folio.ToString)) Else ImprimirPDF("Empresas/Grales/Formatos/EntradaSalida.rdlc", DtMovimientos, params, String.Format("Salida de Almacen - {0}", Folio.ToString), RDSName:="DsInventarios") End If @@ -4406,7 +4406,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) If UsuarioActual.CveEmpresa.Contiene(172, 173) Then - ImprimirPDFStimulsoft(String.Format("Empresas/Grales/Formatos/Traslado.mrt", UsuarioActual.Empresa.Ruta), DtMovimientos, params, String.Format("Aviso de Traslado - {0}", Folio), RDSName:="DsInventarios") + ImprimirPDFStimul(String.Format("Empresas/Grales/Formatos/Traslado.mrt", UsuarioActual.Empresa.Ruta), DtMovimientos, params, String.Format("Aviso de Traslado - {0}", Folio), RDSName:="DsInventarios") Else ImprimirPDF(String.Format("Empresas/Grales/Formatos/Traslado.rdlc", UsuarioActual.Empresa.Ruta), DtMovimientos, params, String.Format("Aviso de Traslado - {0}", Folio), RDSName:="DsInventarios") End If @@ -5954,9 +5954,7 @@ Partial Class PopUpVerFactura DtAcuse.Rows.Add(RowCFDI) End If - - - ImprimirPDFStimulsoft(DirectorioArchivo, DtAcuse, params, "AcuseCancelacion" & CveVenta) + ImprimirPDFStimul(DirectorioArchivo, DtAcuse, params, "AcuseCancelacion" & CveVenta) End If diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index 8b42bd4e3..651f59192 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -3888,7 +3888,7 @@ Partial Class Clientes Private Sub GenerarRepCrystal(Formato As String) Dim LogoRutaFisica As String = String.Format("Empresas\{0}\Logo.png", UsuarioActual.CveEmpresa) - Dim logouri = String.Format("{0}://{1}:{2}/ashx/sigfiles.ashx?P={3}", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, Encripta(LogoRutaFisica)) + Dim logouri As String = String.Format("{0}://{1}:{2}/ashx/sigfiles.ashx?P={3}", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, Encripta(LogoRutaFisica)) Dim Imagen As New System.IO.FileInfo(String.Format("{0}Logo.png", UsuarioActual.Empresa.Ruta)) 'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) @@ -4051,7 +4051,7 @@ Partial Class Clientes If DtCxCFact2 IsNot Nothing AndAlso DtCxCFact2.Rows.Count > 0 Then Dim dr As DataRow = DtCxCFact2.Rows(0) - Dim lista = New List(Of CrystalParametro) + Dim lista As New List(Of CrystalParametro) Dim SaldoDisponible As String = "0.00" If TxtLimiteCredito.Text.ToDouble > 0 Then SaldoDisponible = (TxtLimiteCredito.Text.ToDouble - DtCxCFact2.SUM("Saldo", "Tipo = 'Act'").ToString().ToDouble).FormatoNumero() @@ -4098,7 +4098,7 @@ Partial Class Clientes rds.Value = DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha") lrds.Add(rds) - File = StreamBytesStimulsoft("Facturas", $"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.mrt", lrds, listass, NombreArchivo:="Estado de cuenta", Formato:=Formato) + File = StreamBytesStimul("Facturas", $"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.mrt", lrds, listass, NombreArchivo:="Estado de cuenta", Formato:=Formato) Else File = ImprimirPDFCrystal($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.rpt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), lista, "Estado de cuenta", Formato) End If @@ -4147,7 +4147,7 @@ Partial Class Clientes For Each item As CrystalParametro In lista listass.Add(New ReportParameter(item.Nombre, item.Valor.ToString())) Next - ImprimirPDFStimulsoft($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.mrt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), listass, "Estado de cuenta", Formato) + ImprimirPDFStimul($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.mrt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), listass, "Estado de cuenta", Formato) Else ImprimirbytesPDF(ImprimirPDFCrystal($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.rpt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), lista, "Estado de cuenta", Formato), "Estado de cuenta", Formato) End If @@ -4158,7 +4158,7 @@ Partial Class Clientes End If Else - Dim lista = New List(Of CrystalParametro) + Dim lista As New List(Of CrystalParametro) lista.Add(New CrystalParametro("Empresa", UsuarioActual.Empresa.Empresa)) lista.Add(New CrystalParametro("TipoCuentas", DdlTipoCuentasCxC.SelectedItem.Text)) lista.Add(New CrystalParametro("NombreCliente", LtlCliente.Text)) @@ -4200,7 +4200,7 @@ Partial Class Clientes For Each item As CrystalParametro In lista listass.Add(New ReportParameter(item.Nombre, item.Valor.ToString())) Next - ImprimirPDFStimulsoft($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.mrt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), listass, "Estado de cuenta", Formato) + ImprimirPDFStimul($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.mrt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), listass, "Estado de cuenta", Formato) Else ImprimirbytesPDF(ImprimirPDFCrystal($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.rpt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), lista, "Estado de cuenta", Formato), "Estado de cuenta", Formato) End If From aaef88e2434fe34d3c7bf5f9f2da8b2278625e60 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 27 Sep 2023 07:15:06 -0700 Subject: [PATCH 006/100] --validacion de estatus de factura que sustituye --- Ventas/RepCancelacionesPorRespuesta.aspx.cs | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/Ventas/RepCancelacionesPorRespuesta.aspx.cs b/Ventas/RepCancelacionesPorRespuesta.aspx.cs index ce02faedd..5f2527fca 100644 --- a/Ventas/RepCancelacionesPorRespuesta.aspx.cs +++ b/Ventas/RepCancelacionesPorRespuesta.aspx.cs @@ -1,11 +1,14 @@ using Extensiones; +using StackExchange.Redis; using System; +using System.Activities.Expressions; using System.Collections.Generic; using System.Data; using System.Net.Http; using System.Text; using System.Web.UI.WebControls; using static Extensiones.ModExtensiones; +using static Stimulsoft.Report.Export.DeflaterHuffman; public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas { @@ -184,6 +187,8 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas string TipoDocto = GvRow.DataKey("TipoDocto"); string Nombre = GvRow.DataKey("Nombre"); string FolioSustitucion = GvRow.DataKey("FolioFiscalSustitucion"); + int CveVentaSustitucion = GvRow.DataKey("CveVentaSustitucion").ToEntero(); + string RFCReceptorSustitucion = GvRow.DataKey("RFCReceptorSustitucion"); int CveMotivoCancelacion = -1; int CveEstatusRefacturacion = GvRow.DataKey("CveEstatusRefacturacion").ToEntero(); @@ -193,10 +198,18 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas { CveMotivoCancelacion = get_GlobalDTMotivosCancelacionEmpresa(UsuarioActual.CveEmpresa, CveSATMotivoCancelacion: 1).FiltroPrimeroValor("CveMotivoCancelacion").ToEntero(); } - //CveEstatusRefacturacion = 2; - + //CveEstatusRefacturacion = 2; + if (CveVenta > 0) { + //VERIFICA EL ESTATUS DE LA FACTURA NUEVA, SI ESTA ESTÁ CANCELADA, SE MANDA UNA CANCELACIÓN SIN FOLIO DE SUSTITUCIÓN Y CON EL CÓDIGO 02 + Timbrado.AcuseCancelacionSAT VigenciaExtra = Timbrado.VerificarVigenciaSAT(FolioSustitucion, UsuarioActual.Empresa.RFC, RFCReceptorSustitucion, Total.ToString(), true); + if (VigenciaExtra.Estado.ToUpper() == "CANCELADO") + { + FolioSustitucion = ""; + CveMotivoCancelacion = get_GlobalDTMotivosCancelacionEmpresa(UsuarioActual.CveEmpresa, CveSATMotivoCancelacion: 2).FiltroPrimeroValor("CveMotivoCancelacion").ToEntero(); + } + var respCancelacion = CancelarDocumento(CveVenta, -1, CveCliente, Folio, Uuid, "", DateTime.Now, TipoDocto, Total.ToDouble(), UsuarioActual.Empresa.CvePAC, EsRefacturacion: true, FolioSustitucion: FolioSustitucion, CveEstatusRefacturacion: CveEstatusRefacturacion, CveMotivoCancelacion: CveMotivoCancelacion); if (!respCancelacion.HuboError) From 727789040c5f3f55fe49752852083f2e6b8ab5ac Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 27 Sep 2023 07:15:19 -0700 Subject: [PATCH 007/100] nuevos campos para ecommerce --- App_Code/ClsProductosServicios.vb | 10 +++- Ventas/ProductosServicios.aspx | 35 +++++++++++++ Ventas/ProductosServicios.aspx.vb | 81 ++++++++++++++++--------------- 3 files changed, 84 insertions(+), 42 deletions(-) diff --git a/App_Code/ClsProductosServicios.vb b/App_Code/ClsProductosServicios.vb index 77ee44b44..d825969e1 100644 --- a/App_Code/ClsProductosServicios.vb +++ b/App_Code/ClsProductosServicios.vb @@ -411,7 +411,8 @@ Public Class ClsProductosServicios Optional ClaveCategoriaToxicidad As String = "", Optional ClaveImpuestoTipoProducto As String = "", Optional Litraje As Double = -1, Optional AplicaSerie As Boolean = False, Optional AplicaLote As Boolean = False, Optional AplicaCaducidad As Boolean = False, Optional AplicaSeccion As Boolean = False, Optional TiempoCaducidad As Integer = -1, Optional CvePSAdicionalVigencia As Integer = -1, Optional PrecioLibre As Boolean = False, Optional CveMaterialPeligroso As Integer = -1, Optional CveEmbalaje As Integer = -1, Optional PesoKg As Decimal = -1, Optional Dimensiones As String = "", Optional CveObjetoImpuesto As Integer = 0, - Optional RegistroRSCO As String = "-1", Optional FechaVigenciaRSCO As Date = MinFecha, Optional VigenciaIndeterminadaRSCO As Boolean = False, Optional CveTipoEmpacado As Integer = -1, Optional CveTipoOrganico As Integer = -1) As Integer + Optional RegistroRSCO As String = "-1", Optional FechaVigenciaRSCO As Date = MinFecha, Optional VigenciaIndeterminadaRSCO As Boolean = False, Optional CveTipoEmpacado As Integer = -1, Optional CveTipoOrganico As Integer = -1, + Optional NombreComercial As String = "", Optional NotasAdicionales As String = "") As Integer Dim Retorno As Integer = -1 DataAdapter("PA_ProductosServiciosAdd") @@ -509,6 +510,8 @@ Public Class ClsProductosServicios 'Nuevo MLopez 18/11/2022 .Add("@CveTipoEmpacado", SqlDbType.Int).Value = CveTipoEmpacado .Add("@CveTipoOrganico", SqlDbType.Int).Value = CveTipoOrganico + .Add("@NombreComercial", SqlDbType.VarChar).Value = NombreComercial + .Add("@NotasAdicionales", SqlDbType.VarChar).Value = NotasAdicionales End With @@ -643,7 +646,8 @@ Public Class ClsProductosServicios Optional ClaveCategoriaToxicidad As String = "", Optional ClaveImpuestoTipoProducto As String = "", Optional Litraje As Double = -1, Optional AplicaSerie As Boolean = False, Optional AplicaLote As Boolean = False, Optional AplicaCaducidad As Boolean = False, Optional AplicaSeccion As Boolean = False, Optional TiempoCaducidad As Integer = -1, Optional CvePSAdicionalVigencia As Integer = -1, Optional PrecioLibre As Boolean = False, Optional CveMaterialPeligroso As Integer = -1, Optional CveEmbalaje As Integer = -1, Optional PesoKg As Decimal = -1, Optional Dimensiones As String = "", Optional CveObjetoImpuesto As Integer = 0, - Optional RegistroRSCO As String = "-1", Optional FechaVigenciaRSCO As Date = MinFecha, Optional VigenciaIndeterminadaRSCO As Boolean = False, Optional CveTipoEmpacado As Integer = -1, Optional CveTipoOrganico As Integer = -1) As Boolean + Optional RegistroRSCO As String = "-1", Optional FechaVigenciaRSCO As Date = MinFecha, Optional VigenciaIndeterminadaRSCO As Boolean = False, Optional CveTipoEmpacado As Integer = -1, Optional CveTipoOrganico As Integer = -1, + Optional NombreComercial As String = "", Optional NotasAdicionales As String = "") As Boolean Dim Retorno As Boolean = False @@ -740,6 +744,8 @@ Public Class ClsProductosServicios 'Nuevo MLopez 18/11/2022 .Add("@CveTipoEmpacado", SqlDbType.Int).Value = CveTipoEmpacado .Add("@CveTipoOrganico", SqlDbType.Int).Value = CveTipoOrganico + .Add("@NombreComercial", SqlDbType.VarChar).Value = NombreComercial + .Add("@NotasAdicionales", SqlDbType.VarChar).Value = NotasAdicionales End With diff --git a/Ventas/ProductosServicios.aspx b/Ventas/ProductosServicios.aspx index c470944d7..8622c226a 100644 --- a/Ventas/ProductosServicios.aspx +++ b/Ventas/ProductosServicios.aspx @@ -530,6 +530,41 @@ +
+
+
+
+
+ + Ecommerce +
+
+
+
+
+
+
+
+
+
+ + + + +
+
+ + + + +
+
+
+
+
+
+
+ diff --git a/Ventas/ProductosServicios.aspx.vb b/Ventas/ProductosServicios.aspx.vb index ad3d30557..1770b056a 100644 --- a/Ventas/ProductosServicios.aspx.vb +++ b/Ventas/ProductosServicios.aspx.vb @@ -430,6 +430,9 @@ Partial Class ProductosyServicios DivCitricos.Visible = True CargaPanelCitricos() End If + If UsuarioActual.CveEmpresa = 2 Then + DiveCommerce.Visible = True + End If End Sub @@ -1469,7 +1472,8 @@ Partial Class ProductosyServicios AplicaSerie:=ChkSerie.Checked, AplicaLote:=ChkLote.Checked, AplicaCaducidad:=ChkCaducidad.Checked, AplicaSeccion:=ChkSeccion.Checked, TiempoCaducidad:=TiempoCaducidad, CvePSAdicionalVigencia:=DdlPSAdicionalVigencia.SelectedValue.ToEntero(), PrecioLibre:=ChkPrecioLibre.Checked, CveMaterialPeligroso:=DdlMaterialPeligroso.SelectedValue.ToEntero, CveEmbalaje:=DdlEmbalaje.SelectedValue.ToEntero, PesoKg:=TxtPesoKg.Text.ToDecimal, Dimensiones:=TxtDimensiones.Text.Trim, - CveObjetoImpuesto:=DdlObjetoImpuesto.SelectedValue.ToEntero, Litraje:=TxtLitraje.Text.ToDecimal, RegistroRSCO:=TxtRegistroRSCO.Text, FechaVigenciaRSCO:=TxtFechaVigenciaRSCO.Text.ToDate, VigenciaIndeterminadaRSCO:=ChkFechaIndeterminadaRSCO.Checked) > 0 Then + CveObjetoImpuesto:=DdlObjetoImpuesto.SelectedValue.ToEntero, Litraje:=TxtLitraje.Text.ToDecimal, RegistroRSCO:=TxtRegistroRSCO.Text, FechaVigenciaRSCO:=TxtFechaVigenciaRSCO.Text.ToDate, VigenciaIndeterminadaRSCO:=ChkFechaIndeterminadaRSCO.Checked, + NombreComercial:=TxtNombreComercial.Text.Trim, NotasAdicionales:=TxtEcommerceNota.Text.Trim) > 0 Then ViewState("CvePS") = ObjProductosServicios.CvePS For Each GVR As GridViewRow In GvImpuestosLocales.Rows If GVR.FCCheckBox("ChkDeduccion").Checked Then @@ -1540,7 +1544,8 @@ Partial Class ProductosyServicios AplicaSerie:=ChkSerie.Checked, AplicaLote:=ChkLote.Checked, AplicaCaducidad:=ChkCaducidad.Checked, AplicaSeccion:=ChkSeccion.Checked, TiempoCaducidad:=TiempoCaducidad, CvePSAdicionalVigencia:=DdlPSAdicionalVigencia.SelectedValue.ToEntero(), PrecioLibre:=ChkPrecioLibre.Checked, CveMaterialPeligroso:=DdlMaterialPeligroso.SelectedValue.ToEntero, CveEmbalaje:=DdlEmbalaje.SelectedValue.ToEntero, PesoKg:=TxtPesoKg.Text.ToDecimal, Dimensiones:=TxtDimensiones.Text.Trim, CveObjetoImpuesto:=DdlObjetoImpuesto.SelectedValue.ToEntero, Litraje:=TxtLitraje.Text.ToDecimal, - RegistroRSCO:=TxtRegistroRSCO.Text, FechaVigenciaRSCO:=TxtFechaVigenciaRSCO.Text.ToDate, VigenciaIndeterminadaRSCO:=ChkFechaIndeterminadaRSCO.Checked) Then + RegistroRSCO:=TxtRegistroRSCO.Text, FechaVigenciaRSCO:=TxtFechaVigenciaRSCO.Text.ToDate, VigenciaIndeterminadaRSCO:=ChkFechaIndeterminadaRSCO.Checked, + NombreComercial:=TxtNombreComercial.Text.Trim, NotasAdicionales:=TxtEcommerceNota.Text.Trim) Then If Not ObjProductosServicios.LimpiaImpuestosLocales(CvePS) Then TieneError = True @@ -1704,7 +1709,7 @@ Partial Class ProductosyServicios #Region "GV ALIAS" Protected Sub GVAlias_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GVAlias.RowDeleting Dim ObjAliasDelete As New ClsProductosServicios - Dim TieneError = False + Dim TieneError As Boolean = False If ObjAliasDelete.RemovePSAlias(GVAlias.Rows(e.RowIndex).DataKey("CvePS").ToString.ToEntero, GVAlias.Rows(e.RowIndex).DataKey("PSAlias").ToString, UsuarioActual.CveUsuario) Then GVAlias.EditIndex = -1 @@ -1783,11 +1788,11 @@ Partial Class ProductosyServicios CargaGvEquivalencias() End Sub Private Sub GvEquivalencia_RowUpdating(sender As Object, e As GridViewUpdateEventArgs) Handles GvEquivalencia.RowUpdating - Dim TieneError = False + Dim TieneError As Boolean = False - Dim CveUM = GvEquivalencia.Rows(e.RowIndex).DataKey("CveUM").ToEntero - Dim UnidadBase = GvEquivalencia.Rows(e.RowIndex).DataKey("UnidadBase").ToString = "True" - Dim Cantidad = DirectCast(GvEquivalencia.Rows(e.RowIndex).FindControl("TxtCantidadEquivalencia"), TextBox).Text.Trim.ToDecimal + Dim CveUM As Integer = GvEquivalencia.Rows(e.RowIndex).DataKey("CveUM").ToEntero + Dim UnidadBase As Boolean = GvEquivalencia.Rows(e.RowIndex).DataKey("UnidadBase").ToString = "True" + Dim Cantidad As Decimal = DirectCast(GvEquivalencia.Rows(e.RowIndex).FindControl("TxtCantidadEquivalencia"), TextBox).Text.Trim.ToDecimal Dim ObjProductosServicios As New ClsProductosServicios() If Not ObjProductosServicios.UpdatePSEquivalencias(CvePS, CveUM, Cantidad, UnidadBase, 0, UsuarioActual.CveUsuario) Then @@ -1807,9 +1812,9 @@ Partial Class ProductosyServicios End Sub Private Sub GvEquivalencia_RowDeleting(sender As Object, e As GridViewDeleteEventArgs) Handles GvEquivalencia.RowDeleting - Dim TieneError = False + Dim TieneError As Boolean = False - Dim CveUM = GvEquivalencia.Rows(e.RowIndex).DataKey("CveUM").ToEntero + Dim CveUM As Integer = GvEquivalencia.Rows(e.RowIndex).DataKey("CveUM").ToEntero Dim ObjProductosServicios As New ClsProductosServicios() If Not ObjProductosServicios.RemovePSEquivalencias(CvePS, CveUM) Then @@ -2349,7 +2354,7 @@ Partial Class ProductosyServicios Public Sub DdlClasificacion_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlClasificacion.SelectedIndexChanged If DdlClasificacion.SelectedValue.ToEntero > 0 Then If Me.CvePS <= 0 AndAlso (Not CveSATPS > 0 Or CveSATPS = 46920) Then - Dim Dr = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveClasificacion={0}", DdlClasificacion.SelectedValue.ToEntero()))(0) + Dim Dr As DataRow = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveClasificacion={0}", DdlClasificacion.SelectedValue.ToEntero()))(0) If Dr IsNot Nothing Then DdlSATPS.SelectedValue = Dr("CveSATPS").ToString @@ -2367,7 +2372,7 @@ Partial Class ProductosyServicios If DdlClasificacion.SelectedValue.ToEntero > 0 Then Try - Dim Dr = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveClasificacion={0}", DdlClasificacion.SelectedValue.ToEntero()))(0) + Dim Dr As DataRow = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveClasificacion={0}", DdlClasificacion.SelectedValue.ToEntero()))(0) If Boolean.Parse(Dr("EsAcumulador").ToString) Then MostarOcultarDivTamanio(True) Else @@ -2381,10 +2386,6 @@ Partial Class ProductosyServicios OnError("Ocurrió un error al mostrar los tamaños", ex) End Try End If - - - - End Sub Private Sub MostarOcultarDivTamanio(Mostrar As Boolean) @@ -2479,7 +2480,7 @@ Partial Class ProductosyServicios UpEcommercePSRelacionados.Update() End Sub Private Function GuardaEcommerce() As Boolean - Dim TieneError = False + Dim TieneError As Boolean = False If UsuarioActual.Empresa.Funcionalidad(700) = "1" Then @@ -2494,10 +2495,10 @@ Partial Class ProductosyServicios End If End If - Dim Descripcion = TxtEcommerceDescripcion.Text.Trim - Dim PrecioBase = TxtEcommercePrecioBase.Text.Trim.ToDouble - Dim PrecioPromocion = TxtEcommercePrecioPromocion.Text.Trim.ToDouble - Dim Disponible = ChkEcommerceDisponible.Checked + Dim Descripcion As String = TxtEcommerceDescripcion.Text.Trim + Dim PrecioBase As Double = TxtEcommercePrecioBase.Text.Trim.ToDouble + Dim PrecioPromocion As Double = TxtEcommercePrecioPromocion.Text.Trim.ToDouble + Dim Disponible As Boolean = ChkEcommerceDisponible.Checked Dim ObjEcommerce As New ClsECommerce If Not ObjEcommerce.ProductosAddUpdate(CvePS, Descripcion, PrecioBase, PrecioPromocion, Disponible, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then @@ -2510,11 +2511,11 @@ Partial Class ProductosyServicios Return TieneError End Function Private Function ValidaGuardarEcommerce() As Boolean - Dim Retorno = True + Dim Retorno As Boolean = True Dim Mensaje As New StringBuilder 'DESCRIPCION - Dim Descripcion = TxtEcommerceDescripcion.Text.Trim + Dim Descripcion As String = TxtEcommerceDescripcion.Text.Trim If Descripcion.Length = 0 Then Mensaje.Append("- El campo Descripción es obligatorio. Por favor introduzcalo y vuelva a intentar.
") End If @@ -2523,7 +2524,7 @@ Partial Class ProductosyServicios End If 'PRECIO BASE - Dim PrecioBase = TxtEcommercePrecioBase.Text.Trim.ToDouble + Dim PrecioBase As Double = TxtEcommercePrecioBase.Text.Trim.ToDouble If PrecioBase = 0 Then Mensaje.Append("- El campo Precio es obligatorio. Por favor verifique y vuelva a intentar.
") End If @@ -2532,7 +2533,7 @@ Partial Class ProductosyServicios End If 'PRECIO FINAL - Dim PrecioPromocion = TxtEcommercePrecioPromocion.Text.Trim.ToDouble + Dim PrecioPromocion As Double = TxtEcommercePrecioPromocion.Text.Trim.ToDouble If PrecioPromocion < 0 Then Mensaje.Append("- El campo Precio Final no puede ser negativo. Por favor verifique y vuelva a intentar.
") End If @@ -2567,8 +2568,8 @@ Partial Class ProductosyServicios Exit Sub End If - Dim TieneError = False - Dim CveInsignia = DdlEcommerceInsignia.SelectedValue.ToEntero + Dim TieneError As Boolean = False + Dim CveInsignia As Integer = DdlEcommerceInsignia.SelectedValue.ToEntero 'AGREGAR Dim ObjEcommerce As New ClsECommerce @@ -2585,11 +2586,11 @@ Partial Class ProductosyServicios End If End Sub Private Function ValidaAgregarProductosInsigniasEcommerce() As Boolean - Dim Retorno = True + Dim Retorno As Boolean = True Dim Mensaje As New StringBuilder 'INSIGNIA - Dim CveInsignia = DdlEcommerceInsignia.SelectedValue.ToEntero + Dim CveInsignia As Integer = DdlEcommerceInsignia.SelectedValue.ToEntero If CveInsignia = 0 Then Mensaje.Append("- El campo Insignia es obligatorio. Por favor introduzcalo y vuelva a intentar.
") End If @@ -2609,8 +2610,8 @@ Partial Class ProductosyServicios Return Retorno End Function Protected Sub GvEcommercePSInsignias_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvEcommercePSInsignias.RowDeleting - Dim TieneError = False - Dim GvRow = GvEcommercePSInsignias.Rows(e.RowIndex) + Dim TieneError As Boolean = False + Dim GvRow As GridViewRow = GvEcommercePSInsignias.Rows(e.RowIndex) Dim ObjEcommerce As New ClsECommerce If ObjEcommerce.ProductosInsigniasRemove(GvRow.DataKey("CvePS").ToString.ToEntero, GvRow.DataKey("CveInsignia").ToString.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then @@ -2645,11 +2646,11 @@ Partial Class ProductosyServicios Protected Sub BtnEcommerceImagenes_Click(sender As Object, e As EventArgs) Dim FilesGral As List(Of Archivo) = TxtEcommerceImagenes.getfiles().Archivos - Dim FileMove = "" - Dim Archivo = "" - Dim DirectorioTemporal = "" + Dim FileMove As String = "" + Dim Archivo As String = "" + Dim DirectorioTemporal As String = "" - Dim DirectorioDestino = $"{UsuarioActual.Empresa.Ruta}\Ecommerce\Productos\Imagenes\" + Dim DirectorioDestino As String = $"{UsuarioActual.Empresa.Ruta}\Ecommerce\Productos\Imagenes\" If Not Directory.Exists(DirectorioDestino) Then Directory.CreateDirectory(DirectorioDestino) End If @@ -2712,8 +2713,8 @@ Partial Class ProductosyServicios Exit Sub End If - Dim TieneError = False - Dim CvePS = DdlEcommercePSRelacionado.SelectedValue.ToEntero + Dim TieneError As Boolean = False + Dim CvePS As Integer = DdlEcommercePSRelacionado.SelectedValue.ToEntero 'AGREGAR Dim ObjEcommerce As New ClsECommerce @@ -2731,11 +2732,11 @@ Partial Class ProductosyServicios End If End Sub Private Function ValidaAgregarProductosRelacionadosEcommerce() As Boolean - Dim Retorno = True + Dim Retorno As Boolean = True Dim Mensaje As New StringBuilder 'PS - Dim CvePS = DdlEcommercePSRelacionado.SelectedValue.ToEntero + Dim CvePS As Integer = DdlEcommercePSRelacionado.SelectedValue.ToEntero If CvePS = 0 Then Mensaje.Append("- El campo Producto es obligatorio. Por favor introduzcalo y vuelva a intentar.
") End If @@ -2755,8 +2756,8 @@ Partial Class ProductosyServicios Return Retorno End Function Protected Sub GvEcommercePSRealacionados_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvEcommercePSRealacionados.RowDeleting - Dim TieneError = False - Dim GvRow = GvEcommercePSRealacionados.Rows(e.RowIndex) + Dim TieneError As Boolean = False + Dim GvRow As GridViewRow = GvEcommercePSRealacionados.Rows(e.RowIndex) Dim ObjEcommerce As New ClsECommerce If ObjEcommerce.ProductosRelacionadosRemove(GvRow.DataKey("CvePS1").ToString.ToEntero, GvRow.DataKey("CvePS2").ToString.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then From e39864726f212a00ca7b1bbd6a154fad5e7851af Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 27 Sep 2023 07:15:38 -0700 Subject: [PATCH 008/100] =?UTF-8?q?--=20verificaion=20de=20cotizaci=C3=B3n?= =?UTF-8?q?=20en=20E119?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- OC/OC.aspx.vb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/OC/OC.aspx.vb b/OC/OC.aspx.vb index a68e38494..7ac3bc202 100644 --- a/OC/OC.aspx.vb +++ b/OC/OC.aspx.vb @@ -2377,6 +2377,10 @@ Partial Class OC_OC Private Function ValidaGuardar() As Boolean Dim TieneError As Boolean = False + If UsuarioActual.CveEmpresa.Contiene(119) Then + ChkCotizacion.Checked = False + End If + If CboE.SelectedValue.ToEntero = 0 AndAlso TipoOC = "OC" Then Alert("Las ordenes de compra no puede tener el estatus 'Pre Solicitud'. Debe ser una requisición", TipoMensaje.MsgAdvertencia) Return True @@ -2608,10 +2612,6 @@ Partial Class OC_OC 'VALIDACIONES PARA GUARDAR If ValidaGuardar() Then Exit Sub - If UsuarioActual.CveEmpresa.Contiene(119) Then - ChkCotizacion.Checked = False - End If - Dim MsgError As String = "Hubo un error al registrar" 'VARIABLES Dim CveProveedorSucursal As Integer = -1 From 71910aafd143f4a15d8c7e19be39998ecf1537a1 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 27 Sep 2023 07:15:55 -0700 Subject: [PATCH 009/100] =?UTF-8?q?--correcci=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Contabilidad/RepIVA.aspx.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Contabilidad/RepIVA.aspx.cs b/Contabilidad/RepIVA.aspx.cs index 2dd99ba0a..2cf5180da 100644 --- a/Contabilidad/RepIVA.aspx.cs +++ b/Contabilidad/RepIVA.aspx.cs @@ -111,7 +111,7 @@ public partial class Contabilidad_RepIVA : ClsPaginas LblMsgAcreditable.Text = "La información presenta importes en negativo, estos no se incluirán en el archivo generado para DIOT"; } - GvA.Columns[11].Visible = DtIVAAcreditable.SUM("valorActosImp1516") > 0; // sino tiene valor la columna de importación de oculta + //GvA.Columns[11].Visible = DtIVAAcreditable.SUM("valorActosImp1516") > 0; // sino tiene valor la columna de importación de oculta if (ObjCont.GetRepIVAAcumulado(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), Conciliado, 3, DdlCuenta.SelectedValue.ToEntero(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)) { From 444b760cf7a3c033ad1f577cb75b751de851e66a Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 27 Sep 2023 07:16:31 -0700 Subject: [PATCH 010/100] -- registrar las NC relacionadas a su cveocdetalle, para no surtir --- Compras/Compras.aspx.vb | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 812832042..b44f36e24 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -17820,18 +17820,18 @@ Partial Class Compras_Compras Protected Sub BtnNCInvAlmacen_Click(sender As Object, e As EventArgs) ' se comenta RMF.2023/09/08, genera negativos en el rep recibir oc - 'Dim i As Integer = 0 - 'For Each Gvr As GridViewRow In GVNCInvAlmacen.Rows - ' If Gvr.FCTextBox("TxtCantidadNCInv").Text.ToDouble > 0 Then - ' If i < TmpDT.Rows.Count Then - ' TmpDT.Rows(i)("CveOrdenCompraDetalle") = Gvr.DataKey("CveOrdenCompraDetalle") - ' End If - ' 'If Not ObjCompras.ComprasDetalleDevolucionesAdd(Gvr.DataKey("CveCompraDetalle").ToEntero, Gvr.DataKey("CveCompra").ToEntero, Gvr.FCTextBox("TxtCantidadNCInv").Text.ToDouble, UsuarioActual.CveEmpresa) Then - ' ' TieneError = True - ' ' Exit For - ' 'End If - ' End If - 'Next + Dim i As Integer = 0 + For Each Gvr As GridViewRow In GVNCInvAlmacen.Rows + If Gvr.FCTextBox("TxtCantidadNCInv").Text.ToDouble > 0 Then + If i < TmpDT.Rows.Count Then + TmpDT.Rows(i)("CveOrdenCompraDetalle") = Gvr.DataKey("CveOrdenCompraDetalle") + End If + 'If Not ObjCompras.ComprasDetalleDevolucionesAdd(Gvr.DataKey("CveCompraDetalle").ToEntero, Gvr.DataKey("CveCompra").ToEntero, Gvr.FCTextBox("TxtCantidadNCInv").Text.ToDouble, UsuarioActual.CveEmpresa) Then + ' TieneError = True + ' Exit For + 'End If + End If + Next RegistraScript("$('#FacturaNC').modal('hide');", "ModalNCInv") End Sub From b607b5aad7875e9a5e58d29f367d19ffcc65a77e Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 27 Sep 2023 07:16:58 -0700 Subject: [PATCH 011/100] -option explciit --- Ventas/Ventas.aspx | 2 +- Ventas/Ventas.aspx.vb | 390 ++++-------------------------------------- 2 files changed, 39 insertions(+), 353 deletions(-) diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index 37b4b57f8..6c126fd2d 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -5367,7 +5367,7 @@ - +
diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index ea724257f..43d6fe095 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -3795,13 +3795,11 @@ Partial Class Ventas End If - If UsuarioActual.CveEmpresa = 13 Then DivEstimaciones.Visible = True GvEst.Visible = False ContratoDetalles.Visible = False GvContratoDetalles.Visible = True - BtnEstimacion.Visible = False End If @@ -3820,7 +3818,7 @@ Partial Class Ventas End Sub Private Sub CargaContratos() - Dim DrContrato = DtContratos.FiltroPrimero($"CveContrato = {DdlContratosModal.SelectedValue}") + Dim DrContrato As DataRow = DtContratos.FiltroPrimero($"CveContrato = {DdlContratosModal.SelectedValue}") If DrContrato Is Nothing Then Alert("Ocurrió un error al cargar la configuración del contrato. Por favor vuelva a intentar", TipoMensaje.MsgError) Exit Sub @@ -3834,11 +3832,6 @@ Partial Class Ventas EscontratoObra = False End If - - - - - LbContratoImporteTotal.Text = DrContrato("ImporteTotal").ToString().FormatoNumero LbContratoImporteMinimo.Text = DrContrato("ImporteMin").ToString().FormatoNumero LbContratoImporteMaximo.Text = DrContrato("ImporteMax").ToString().FormatoNumero @@ -3938,14 +3931,14 @@ Partial Class Ventas For Each gvr As GridViewRow In GvContratoDetalles.Rows gvr.FCTextBox("TxtCant").Enabled = False Next - Dim EsValido = True + Dim EsValido As Boolean = True For Each Dr As DataRow In TmpDT.Rows - Dim CantidadActual = Dr("Cantidad").ToString().ToDouble - Dim CantidadDispo = 0.0 - Dim CantidadAsignada = 0.0 + Dim CantidadActual As Decimal = Dr("Cantidad").ToString().ToDecimal + Dim CantidadDispo As Decimal = 0 + Dim CantidadAsignada As Decimal = 0 For Each gvr As GridViewRow In GvContratoDetalles.Rows If gvr.DataKey("CvePS").ToEntero() = Dr("CvePS").ToString().ToEntero() Then - CantidadDispo = gvr.DataKey("Cantidad").ToString().ToDouble - gvr.FCTextBox("TxtCant").Text.ToDouble + CantidadDispo = gvr.DataKey("Cantidad").ToString().ToDecimal - gvr.FCTextBox("TxtCant").Text.ToDecimal If CantidadDispo = 0 Then Continue For CantidadAsignada = If(CantidadDispo > CantidadActual, CantidadActual, CantidadDispo) gvr.FCTextBox("TxtCant").Text = (gvr.FCTextBox("TxtCant").Text.ToDouble + CantidadAsignada).ToString() @@ -4066,7 +4059,7 @@ Partial Class Ventas AplicaGastoContrato = If(DrContrato("CveContratoTipo").ToString().Contiene("9", "10", "13"), True, False) 'Arrendamiento, Servicios De Impresion, Financiamiento 'VALIDA IMPORTE DEL CONTRATO - Dim SeleccionadoContrato = 0.0 '(From row As GridViewRow In GvContratoDetalles.Rows.Cast(Of GridViewRow)() Select row.FCLabel("LtlTotal").Text.ToDecimal).Sum + Dim SeleccionadoContrato As Decimal = 0 '(From row As GridViewRow In GvContratoDetalles.Rows.Cast(Of GridViewRow)() Select row.FCLabel("LtlTotal").Text.ToDecimal).Sum TmpDT.Clear() TxtSubTotal.Text = "0" @@ -4080,7 +4073,7 @@ Partial Class Ventas 'VALIDA EXISTENCIAS DE ALMACÉN 'Dim DrPS = GlobalDTProductosServicios(CveEmpresa:=UsuarioActual.CveEmpresa, CvePS:=Row.DataKey("CvePS").ToEntero()).FiltroPrimero("") - Dim DrPS = GlobalDTPSSimplificado(CveEmpresa:=UsuarioActual.CveEmpresa, CvePS:=Row.DataKey("CvePS").ToEntero()).FiltroPrimero("") + Dim DrPS As DataRow = GlobalDTPSSimplificado(CveEmpresa:=UsuarioActual.CveEmpresa, CvePS:=Row.DataKey("CvePS").ToEntero()).FiltroPrimero("") If DrPS IsNot Nothing Then Dim CveTipoPS As Integer = DrPS("CveTipoPS").ToString().ToEntero() @@ -4097,7 +4090,7 @@ Partial Class Ventas Dim ObsPlantilla As String = PlantillaContrato(Row.DataKey("Observaciones")) - SeleccionadoContrato += Row.FCTextBox("TxtCant").Text.ToEntero() * Row.FCLiteral("LtlPU").Text.ToDouble + SeleccionadoContrato += Row.FCTextBox("TxtCant").Text.ToEntero() * Row.FCLiteral("LtlPU").Text.ToDecimal AgregarProductoServicio(Row.FCTextBox("TxtCant").Text.ToEntero(), Row.DataKey("CveUM").ToEntero(), Row.FCLiteral("LtlUM").Text, Row.DataKey("CveClasificacion").ToEntero(), Row.DataKey("Clasificacion"), Row.DataKey("CvePS").ToEntero(), Row.FCLiteral("LtlPS").Text, If(CveCicloComercial > 0, ObsPlantilla, $"/ {Row.FCLiteral("LtCveInterna").Text}"), Row.FCLiteral("LtlPU").Text.ToDecimal, 0, DrContrato("CveProyecto").ToString().ToEntero(), DrContrato("ProyectoContrato").ToString(), DrContrato("CveSubProyecto").ToString().ToEntero(), DrContrato("SubProyectoContrato").ToString(), CveContratoDetalle:=Row.DataKey("CveContratoDetalle").ToEntero()) @@ -4202,7 +4195,7 @@ Partial Class Ventas If ObjContratos.GetContratos(CveContrato, UsuarioActual.CveEmpresa, -1, -1, 1) Then If ObjContratos.DtResultados.Rows.Count > 0 Then - Dim CveContratoTipo = ObjContratos.DtResultados.Rows(0)("CveContratoTipo").ToString.ToEntero + Dim CveContratoTipo As Integer = ObjContratos.DtResultados.Rows(0)("CveContratoTipo").ToString.ToEntero 'Cargamos los datos del Cliente DtContratos = ObjContratos.DtResultados @@ -4267,7 +4260,7 @@ Partial Class Ventas RequiereAlmacenOrigen = True If CveContratoTipo.Contiene(7, 9, 13, 21, 27) Then - Dim CveTipoAlmacenOrigen = "12,15" + Dim CveTipoAlmacenOrigen As String = "12,15" If CveContratoTipo.Contiene(27) Then CveTipoAlmacenOrigen = "1" End If @@ -4341,7 +4334,7 @@ Partial Class Ventas Private Sub GvContratoDetalles_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvContratoDetalles.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then - Dim CantidadDisponible = If(e.Row.DBCampo("Cantidad").ToDouble < 0, "0", e.Row.DBCampo("Cantidad")) + Dim CantidadDisponible As String = If(e.Row.DBCampo("Cantidad").ToDouble < 0, "0", e.Row.DBCampo("Cantidad")) e.Row.FCLiteral("LtlCantDisp").Text = CantidadDisponible If CveCicloComercial > 0 Then 'Si es un Ciclo Comercial quitamos el límite de CantidadDisponible @@ -4394,7 +4387,7 @@ Partial Class Ventas Exit Sub End If - Dim DrContrato = DtContratos.FiltroPrimero($"CveContrato = {DdlContratosModal.SelectedValue}") + Dim DrContrato As DataRow = DtContratos.FiltroPrimero($"CveContrato = {DdlContratosModal.SelectedValue}") If DrContrato Is Nothing Then Alert("Ocurrió un error al cargar la configuración del contrato. Por favor vuelva a intentar", TipoMensaje.MsgError) Exit Sub @@ -6060,7 +6053,7 @@ Partial Class Ventas If UsuarioActual.CveRol = 1 AndAlso CveMetodoPago = 1 AndAlso DdlTipoComprobante.SelectedValue = "Cot" AndAlso UsuarioActual.Empresa.Funcionalidad(558) = "1" AndAlso TbDescuentosAdicionales.Visible Then If TmpDT.SUMD("Descuento") > 0 Then Dim TotalDescuento As Decimal = TmpDT.SUMD("Total", "Descuento > 0") * 0.05D - Dim RowDescuentos = TmpDT.Select("Descuento > 0") + Dim RowDescuentos As DataRow() = TmpDT.Select("Descuento > 0") If RowDescuentos IsNot Nothing Then LblDescuentoAdicional.Text = TotalDescuento.FormatoNumero(2) @@ -6779,7 +6772,7 @@ Partial Class Ventas If RequiereOC Then Dim Documentacion As String = "" 'RegistraScript("$('#DivDocsCliente').modal({ backdrop: 'static', keyboard: false });", "ModalArchivos") - Dim Count = 0 + Dim Count As Integer = 0 For Each GvRow As GridViewRow In GvDocumentosCliente.Rows If GvRow.DataKey("Orden").ToEntero() = 1 Then IndexDocumentoCliente = Count @@ -8358,7 +8351,7 @@ Partial Class Ventas If UsuarioActual.Empresa.Funcionalidad(558) = "1" AndAlso ListaDescuentos IsNot Nothing AndAlso ObjDescuento IsNot Nothing Then Dim ConsecEliminar As Integer = TmpDT.Rows(e.RowIndex)("Consec").ToString().ToEntero() If ConsecEliminar > 0 Then - Dim descEliminar = ListaDescuentos.FirstOrDefault(Function(x) x.Consec = ConsecEliminar) + Dim descEliminar As Modelos.VentaDescuentos = ListaDescuentos.FirstOrDefault(Function(x) x.Consec = ConsecEliminar) If descEliminar IsNot Nothing Then ListaDescuentos.Remove(descEliminar) End If @@ -8516,9 +8509,9 @@ Partial Class Ventas Protected Sub GvPS_RowDeleting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvPS.RowDeleting If UsuarioActual.Empresa.Funcionalidad(558) = "1" AndAlso ListaDescuentos IsNot Nothing Then - Dim ConsecEliminar = TmpDT.Rows(e.RowIndex)("Consec").ToString().ToEntero() + Dim ConsecEliminar As Integer = TmpDT.Rows(e.RowIndex)("Consec").ToString().ToEntero() If ConsecEliminar > 0 Then - Dim descEliminar = ListaDescuentos.FirstOrDefault(Function(x) x.Consec = ConsecEliminar) + Dim descEliminar As Modelos.VentaDescuentos = ListaDescuentos.FirstOrDefault(Function(x) x.Consec = ConsecEliminar) If descEliminar IsNot Nothing Then ListaDescuentos.Remove(descEliminar) End If @@ -8822,13 +8815,12 @@ Partial Class Ventas 'End If Dim EsPersonaMoral As Boolean = Me.TipoPersona - Dim DtUsosCFDI = GlobalDTSATUsosCFDI(If(Not EsPersonaMoral, 1, 0), RegimenFiscalReceptor:=RegimenFiscalCliente).FiltraParametros($"CveUsoCFDI = {DdlUsoCFDI.SelectedValue}") + Dim DtUsosCFDI As DataTable = GlobalDTSATUsosCFDI(If(Not EsPersonaMoral, 1, 0), RegimenFiscalReceptor:=RegimenFiscalCliente).FiltraParametros($"CveUsoCFDI = {DdlUsoCFDI.SelectedValue}") If DtUsosCFDI.Rows.Count = 0 Then Alert("El Uso CFDI no corresponde con el tipo de persona (fisca, moral) y el régimen fiscal.", TipoMensaje.MsgAdvertencia) Exit Sub End If - End If If Not ValidaImportePublicoGeneral() Then @@ -9479,7 +9471,7 @@ Partial Class Ventas CreaObjetosVenta(TipoDoctoViejo:=TipoDoctoViejo) - If ObjFactura Is Nothing Or (ObjFactura.Cliente Is Nothing And Not CveEmpresaCRM > 0) Then + If ObjFactura Is Nothing OrElse (ObjFactura.Cliente Is Nothing And Not CveEmpresaCRM > 0) Then Alert("Ocurrió un error al procesar los datos de la Venta.", TipoMensaje.MsgError) ObjFactura = Nothing Exit Sub @@ -9562,22 +9554,6 @@ Partial Class Ventas End If End If - - 'VERIFICA QUE LA MONEDA DE LA LINEA ADICIONAL SEA LA MISMA QUE LA VENTA - 'If Me.CveMonedaLineaAdicional <> ObjFactura.CveMoneda Then - ' TmpDT = TmpDTError.Copy() - ' CalculaTotalesVenta(RecalcularTotalOriginal:=False) - ' Alert("La moneda de la linea adicional de crédito debe ser la misma que la factura.", TipoMensaje.MsgAdvertencia) - ' Exit Sub - 'Else - ' If ObjFactura.TipoDocto = "Ing" AndAlso Me.SaldoIngresosLineaAdicional < ObjFactura.Total Then - ' TmpDT = TmpDTError.Copy() - ' CalculaTotalesVenta(RecalcularTotalOriginal:=False) - ' Alert("El saldo de la linea adicional debe ser mayor o igual al de la factura", TipoMensaje.MsgAdvertencia) - ' Exit Sub - ' End If - 'End If - 'VERIFICA QUE EL SALDO DISPONIBLE SEA MENOR AL IMPORTE 'If ObjFactura.TipoDocto = "Rem" AndAlso Me.SaldoLineaAdicional < ObjFactura.Total Then ' TmpDT = TmpDTError.Copy() @@ -9595,16 +9571,6 @@ Partial Class Ventas End If - 'If Not CveEmpresaCRM > 0 Then - ' If ObjFactura.Cliente.AplicaComercioExterior Then - ' If Not ValidaComercioExterior() Then - ' ObjFactura = Nothing - ' Exit Sub - ' End If - ' End If - 'End If - - 'VALIDA TOTAL DE LA NOTA DE CREDITO Y LA FACTURA VINCULADA *** ESTABA TRONANDO EN COMPU 11/01/17 *** 'If ObjFactura.TipoDocto.Contiene("Egs", "Dev") Then ' If SubTotalFacturaVinNC() > 0 Then 'pendiente @@ -9657,24 +9623,6 @@ Partial Class Ventas ErrorList = New List(Of String) MensajeAlert = New StringBuilder - 'VERIFICA QUE EL FOLIO NO SEA IGUAL AL DE LA FACTURA ANTERIOR - 'If ObjFactura.Folio = TxtFolio.Text.ToEntero() Then - ' If ObjFolios.GetFolios(ObjFactura.TipoDocto, UsuarioActual.CveEmpresa) Then - ' Dim DtFolios As DataTable = ObjFolios.DtResultados.FiltraParametros(String.Format(" CveSucursal = {0} And Estado = 'Activo'", ObjFactura.CveSucursal)) - ' If DtFolios.Rows.Count > 0 Then - ' 'ViewState("CveFolio") = DtFolios.Rows(0)("CveFolio").ToString().ToEntero() - ' 'ViewState("NumAprobacion") = CLng(DtFolios.Rows(0)("Aprobacion").ToString()) - ' 'ViewState("FechaAprobacion") = DtFolios.Rows(0)("FechaAprobacion").ToString().ToDate - ' 'ViewState("FolioActual") = DtFolios.Rows(0)("FActual").ToString() - ' 'LblSerie.Text = DtFolios.Rows(0)("Serie").ToString() - - ' If UsuarioActual.CveEmpresa <> 72 Then - ' ObjFactura.Folio = DtFolios.Rows(0)("FActual").ToString().ToEntero() - ' End If - ' End If - ' End If - 'End If - 'GUARDA VENTA Dim TieneAnticipo As Boolean = False @@ -10055,6 +10003,9 @@ Partial Class Ventas If ObjFactura.CveVenta > 0 AndAlso ErrorList.Count = 0 AndAlso (SeGuardoPrePoliza Or ObjFactura.TipoDocto.Contiene("Ped", "Cot", "DPe", "PeC", "PA", "Pd2")) Then ObjVentas.Commit() + ObjFactura.DtDetalle = TmpDT 'actualiza por cambios de pedimentos. + ObjFactura.Timbre = PreParaTimbre(ObjFactura) + 'ENVIAR POLIZA VIRTUAL If ErrorList.Count = 0 Then If UsuarioActual.Empresa.Funcionalidad(576) = "1" AndAlso EsProduccion Then @@ -10068,11 +10019,11 @@ Partial Class Ventas Dim Titulo As String = "Solicitud de autorización" 'usuarios de crédito y cobranza Dim Msg As String = String.Format("{0} - Folio {1} ", DdlSubProyectoDatos.SelectedItem.Text, TxtFolio.Text) - If UsuarioActual.CveEmpresa = 119 Then - ClsSisNotificaciones.SendNotificacionERP(1715, Titulo, Msg, 1) - ClsSisNotificaciones.SendNotificacionERP(1815, Titulo, Msg, 1) - ClsSisNotificaciones.SendNotificacionERP(1830, Titulo, Msg, 1) - End If + 'If UsuarioActual.CveEmpresa = 119 Then + ' ClsSisNotificaciones.SendNotificacionERP(1715, Titulo, Msg, 1) + ' ClsSisNotificaciones.SendNotificacionERP(1815, Titulo, Msg, 1) + ' ClsSisNotificaciones.SendNotificacionERP(1830, Titulo, Msg, 1) + 'End If End If Catch ex As Exception @@ -11312,9 +11263,7 @@ Partial Class Ventas End If ObjFactura.Version = "4.0" - If ObjFactura.Cliente Is Nothing Then - ObjFactura.Cliente = New Modelos.ClienteModel - End If + If ObjFactura.Cliente Is Nothing Then ObjFactura.Cliente = New Modelos.ClienteModel ObjFactura.Cliente.CodigoRegimenFiscal = ClienteCodigoRegimenFiscal ObjFactura.Cliente.RegimenFiscal = ClienteRegimenFiscal @@ -11331,7 +11280,6 @@ Partial Class Ventas ObjFactura.TipoDocto = If(IfNull(ViewState("CveRemision"), 0).ToString().ToEntero() > 0, "Ing", DdlTipoComprobante.SelectedValue) ObjFactura.FacturarSucursal = (Me.FacturarSucursal AndAlso DdlSucursalCliente.SelectedValue.ToEntero() > 0 AndAlso (Me.ClienteSucursal IsNot Nothing AndAlso Not String.IsNullOrEmpty(Me.ClienteSucursal.RFC))) ObjFactura.VentaDesglosaIEPS = Me.VentaDesglosaIEPS - 'ObjFactura.RefDocto = TxtDocto.Text.Trim If EsCreaApartirDe Then ViewState("EstablecioFolio") = False @@ -11389,19 +11337,9 @@ Partial Class Ventas ObjFactura.UsuarioCreo = LblUsuario.Text.Trim ObjFactura.CveCondicionEntrega = If(DdlFormaEntrega.SelectedItem IsNot Nothing, DdlFormaEntrega.SelectedValue.ToEntero(), -1) ObjFactura.CondicionEntrega = If(DdlFormaEntrega.SelectedItem IsNot Nothing, DdlFormaEntrega.SelectedItem.Text, "") - 'ObjFactura.NumeroCuenta = TxtNumCtaPago.Text.Trim - 'ObjFactura.Cliente.NumCtaPago = TxtNumCtaPago.Text.Trim ObjFactura.CondicionesPago = If(RBLPago.SelectedValue = "2", 0, If(RBLPago.SelectedValue = "1", 1, 2)) ' 0 - Contado, 1 - Credito, 2 - termianl ObjFactura.FormaPago = 0 'DdlFormaPago.SelectedValue.ToEntero() - - 'ObjFactura.AnticipoPosicion = DdlAmortizacionConceptos.SelectedValue.ToEntero() - 'ObjFactura.AnticipoEnSubTotal = If(ChkAnticipoEnSubTotal.Checked, True, False) - 'ObjFactura.CveTipoRelacion = DdlTipoRelacion.SelectedValue.ToEntero() - - - 'ObjFactura.SerieFolio = String.Format("{0}-{1}", LblSerie.Text, TxtFolio.Text) - 'ObjFactura.PedidoContrato = TxtPedidoContrato.Text.Trim ObjFactura.AtencionA = TxtAtencionA.Text ObjFactura.FordGSDB = "" @@ -11933,7 +11871,7 @@ Partial Class Ventas End If End If - If CveCliente > 0 Then ObjFactura.Timbre = PreParaTimbre(ObjFactura) + ' If CveCliente > 0 Then ObjFactura.Timbre = PreParaTimbre(ObjFactura) 'SI SE ESTA EDITANDO ACTUALIZA LOS IMPORTES DEL DT If GvImpuestosLocales2.Visible AndAlso GvImpuestosLocales2.Enabled Then @@ -12341,10 +12279,7 @@ Partial Class Ventas Private Function PreParaTimbre(Obj As Modelos.Factura) As CFDITimbre Dim Timbre As New CFDITimbre - - Timbre.Comprobante.Version = "4.0" - Timbre.Comprobante.TipoComprobante = If(Obj.TipoDocto.Contiene("Ing", "Ant"), "I", If(Obj.TipoDocto.Contiene("Egs", "Dev"), "E", "")) Timbre.Comprobante.Folio = Obj.Folio.ToString() Timbre.Comprobante.Serie = Obj.Serie @@ -12386,25 +12321,6 @@ Partial Class Ventas Timbre.CFDIRelacionados.TipoRelacion = "07" Timbre.CFDIRelacionados.TipoRelacionTexto = "07-CFDI por aplicación de anticipo" - - 'If Timbre.Comprobante.TipoComprobante = "E" Then - ' If Obj.TipoDocumento.Contiene("Nota de Crédito") Then - ' Timbre.CFDIRelacionados.TipoRelacion = "01" - ' Timbre.CFDIRelacionados.TipoRelacionTexto = "Nota de Crédito aplicada a Ingreso" - ' End If - ' If Obj.TipoDocumento.Contiene("Nota de Devolución") Then - ' Timbre.CFDIRelacionados.TipoRelacion = "03" - ' Timbre.CFDIRelacionados.TipoRelacionTexto = "Devolución aplicada a Ingreso" - ' End If - ' Timbre.CFDIRelacionados.UUID.Add(HdnFolioFiscalNC.Value) - 'End If - '' cuando es refacturacoin es cfdirelacionado, con relacion 04 - 'If Timbre.Comprobante.TipoComprobante = "I" AndAlso NuevaFactura = 1 Then - ' Timbre.CFDIRelacionados.TipoRelacion = "04" - ' Timbre.CFDIRelacionados.TipoRelacionTexto = "Refacturación de Ingreso" - ' Timbre.CFDIRelacionados.UUID.Add(HdnFolioFiscalNC.Value) - 'End If - Else 'SI LA FACTURA VIENE DE SER CANCELADA SISTEMA CUANDO SE REFACTURO NO HAY QUE RELACIONAR If (CveEstatusFacturaPadre > 0 AndAlso CveEstatusFacturaPadre <> 4) OrElse (DtVentasNC IsNot Nothing AndAlso DtVentasNC.Rows.Count > 0) OrElse HdnFolioFiscalNC.Value.ToString() <> "" Then @@ -12449,10 +12365,8 @@ Partial Class Ventas End If End If End If - End If End If - End If 'SI LAS FACTURAS SE RELACIONARAN MANUALMENTE SE AGREGAN @@ -12472,7 +12386,6 @@ Partial Class Ventas Timbre.CFDIRelacionados.UUID.Add(GvRow.DataKey("FolioFiscal").Replace("test", "")) End If Next - End If Dim totSubTotal As Decimal = Obj.SubTotal @@ -15302,195 +15215,7 @@ Partial Class Ventas Return ErrorPrepoliza End Function - 'Private Function generaNC(ByRef ObjVentas As ClsVentas, ByRef ObjConta As ClsContabilidad, ByRef ObjInventario As ClsInventarios, ByRef ObjContr As ClsContratos, ByRef ObjContPaq As ClsContPAQi, ByVal factura As Modelos.Factura, ByRef ObjBancos As ClsBancos, ByRef ObjEventos As ClsOIEventos) As List(Of Object) - ' Dim Obj As New List(Of Object) - ' Dim CveVentaNueva As Integer = ObjVentas.CveVenta - ' Dim BanderaGeneraNC As Boolean = True - ' 'If UsuarioActual.CveEmpresa.Contiene(1, 119) Then BanderaGeneraNC = True - ' If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa) Then - ' If ObjVentas.DtResultados IsNot Nothing AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then - ' Dim drv As DataRow = ObjVentas.DtResultados.Rows(0) - ' Dim TmpDTconceptos As DataTable = Nothing - ' Dim CveNCaVincular As Integer = DdlNCFactura.SelectedValue.ToEntero() - ' 'CargaCliente - ' Dim CveCliente As Integer = drv("CveCliente").ToString().ToEntero() - ' If UsuarioActual.CveEmpresa = 2 AndAlso UsuarioActual.CveUsuario = 77 AndAlso Not CveCliente.Contiene(10450, 10460, 10458) Then - ' Return Nothing - ' ElseIf UsuarioActual.CveEmpresa = 2 AndAlso UsuarioActual.CveUsuario = 21 AndAlso Not CveCliente.Contiene(27448) Then - ' Return Nothing - ' End If - ' factura.TipoDocto = drv("TipoDocto").ToString() - ' factura.Serie = drv("Serie").ToString() - ' factura.FechaEjecucion = drv("FechaEjecucion").ToString().ToDateTime - ' factura.Fecha = drv("Fecha").ToString().ToDateTime - ' factura.CveSubProyectoEjecucion = drv("CveSubProyectoEjecucion").ToString().ToEntero() - ' factura.CveSubProyectoCobranza = drv("CveSubProyectoCobranza").ToString().ToEntero() - ' factura.CveClienteSucursal = drv("CveClienteSucursal").ToString().ToEntero() - ' factura.CveSubProyecto = drv("CveSubProyecto").ToString().ToEntero() - - ' 'Carga Detalle Sucursal - ' CargaClienteSucursal(drv("CveClienteSucursal").ToString().ToEntero(), ObjVentas) - - ' 'CargaDetalle - ' If ObjVentas.GetVentaDetalle(CveVenta) Then - ' TmpDTconceptos = ObjVentas.DtResultados - ' TmpDTconceptos.Columns.Add("CveMovimientoDetallePedido", GetType(Integer)) - ' GvPS.DataSource = TmpDTconceptos - ' GvPS.DataBind() - ' End If - - ' 'Carga Totales - ' factura.SubTotal = drv("SubTotal").ToString().ToDecimal - ' factura.Descuento = drv("Descuento").ToString().ToDecimal - ' factura.Amortizacion = drv("Amortizacion").ToString().ToDecimal - ' factura.IVA = drv("IVA").ToString().ToDecimal - ' factura.RetIVA = drv("RetIVA").ToString().ToDecimal - ' factura.RetISR = drv("RetISR").ToString().ToDecimal - ' factura.Total = drv("Total").ToString().ToDecimal - ' factura.MotivoDescuento = drv("MotivoDescuento").ToString() - ' factura.Observaciones = drv("Observaciones").ToString() - ' factura.CveMoneda = drv("CveMoneda").ToString().ToEntero() - ' factura.TipoCambio = drv("TipoCambio").ToString().ToDecimal - ' factura.CveVendedor = drv("CveVendedor").ToString().ToEntero() - ' factura.RefDocto = drv("Ref").ToString() - ' 'factura.SerieFolioPadre = drv("SerieFolio").ToString() - ' HdnFolioFiscalNC.Value = drv("FolioFiscal").ToString() - - ' ViewState("FolioFiscal") = drv("FolioFiscal").ToString() - - ' 'JJMQ 20160506: Se agrego para la validacion de pago de contado. - ' 'CVImporteContado.ValueToCompare = TxtTotal.Text.Replace(",", "") - - ' UpContado.Update() - ' If factura.CveCliente > 0 Then - ' If Not IsNothing(TmpDTconceptos) AndAlso TmpDTconceptos.Rows.Count > 0 Then - - ' If Not drv("Total").ToString().ToDecimal = factura.Total Then - ' Return Nothing - ' End If - - ' If FolioFiscal = "" Then - ' CveEstatus = 4 - ' Else - ' CveEstatus = 5 - ' End If - - ' '[IPP] - CANCELA INVENTARIO DE VENTA NUEVA Y NO TRASPASA MOVTOS DE ALMACEN - ' 'If UsuarioActual.CveEmpresa.Contiene(1) Then - ' 'QUEMA DOCUMENTO NUEVO - ' If Not ObjInventario.ActualizarEsDevolucionVenta(CveVentaNueva, 2) Then - ' Return Nothing - ' End If - ' 'Else - ' ' 'TRASPASA ALMACEN A DOCUMENTO NUEVO - ' ' If Not CancelarMovimientoInventario(ObjInventario, ObjConta, CveVentaNueva, CveDevolucion) Then - ' ' Return Nothing - ' ' End If - ' 'End If - - ' 'CANCELA PAGOS - ' If ObjFacturaDevolucion.TipoDocto.Contiene("Ing", "Ant") Then - ' If Not ObjConta.PrePolizasCancelarPagos(CveDevolucion, ObjFactura.CvePrePoliza) Then - ' Return Nothing - ' End If - ' End If - - ' 'CANCELA FACTURA - - ' BanderaGeneraNC = True - ' '2019.05.10- RMF. se activa la bandera a true, para que siempre se cancele, y no genere la NC - - ' If Month(factura.Fecha) = Month(Now) OrElse BanderaGeneraNC = True Then - ' If CancelarFactura(ObjVentas, ObjConta, ObjContPaq, ObjBancos) Then - ' Obj.Add(factura) - ' Else - ' Return Nothing - ' End If - ' Else - ' ObjFacturaDevolucion.TipoDocto = "Egs" - ' ObjFacturaDevolucion.Fecha = Now - ' If RegistrarNC(ObjVentas, ObjConta, ObjInventario, ObjContr, ObjContPaq, ObjFacturaDevolucion, ObjBancos, TmpDTconceptos, ObjEventos) Then - ' Obj.Add(ObjFacturaDevolucion) - ' Else - ' Return Nothing - ' End If - ' End If - - ' 'TRASPASA PAGADO - ' If Not ObjConta.TraspasarSaldosPrePolizas(CveDevolucion, ObjFactura.CveVenta, ObjFactura.CvePrePoliza) Then - ' Return Nothing - ' End If - - ' If Not ObjInventario.TraspasaEntregaDirectaOCInv(ObjFactura.CveVenta, UsuarioActual.CveEmpresa) Then - ' Return Nothing - ' End If - - ' End If - ' End If - ' End If - ' End If - - ' If Obj.Count > 0 Then - ' Return Obj - ' Else - ' Return Nothing - ' End If - - 'End Function - 'Private Function RegistrarNC(ObjVentas As ClsVentas, ObjConta As ClsContabilidad, ObjInventario As ClsInventarios, ObjContr As ClsContratos, ObjContPaq As ClsContPAQi, ByVal factura As Modelos.Factura, ObjBancos As ClsBancos, TmpDTconceptos As DataTable, ByRef ObjEventos As ClsOIEventos) As Boolean - ' Dim ProcesoCorrecto As Boolean = True - ' RefacturacionGeneroNC = True - - ' ''Generamos el nuevo folio - ' 'Dim ObjFolios As New ClsGralFolios(ObjVentas.IniciaTransacSQL()) - ' 'If ObjFolios.GetFolios(factura.TipoDocto, UsuarioActual.CveEmpresa) Then - ' ' Dim DT As DataTable = ObjFolios.DtResultados.FiltraParametros(String.Format(" CveSubProyecto = {0} And Estado = 'Activo'", DdlSubProyectoDatos.SelectedValue)) - ' ' If DT.Rows.Count > 0 Then - ' ' factura.Folio = DT.Rows(0)("FActual").ToString().ToEntero() - ' ' Else - ' ' ProcesoCorrecto = False - ' ' End If - ' ' DT.Dispose() - ' 'End If - ' factura.Folio = -1 - - ' 'Registramos la venta - ' GuardarVenta(ObjVentas, ObjConta, ObjInventario, ObjContr, factura, TmpDTconceptos, -1, ObjContPaq, ObjBancos) - ' 'CargaNCDT(factura.CveVentaPadre, factura.Total) - - ' 'ObjFacturaDevolucion.Timbre = PreParaTimbre(ObjFacturaDevolucion) - ' ''Timbramos - ' 'If factura.TipoDocto.Contiene("Ing", "Egs", "Ant") AndAlso FolioFiscal <> "" Then - ' ' If UsuarioActual.Empresa.TipoFacturacion = "CFDi" AndAlso UsuarioActual.Empresa.FacturaProduccion Then - - ' ' Dim sw As New Diagnostics.Stopwatch - ' ' sw.Start() - - ' ' 'FACTURA INGRESO/EGRESO - ' ' Dim ObjTimbrado As New Modelos.Timbrado - ' ' Dim FM As New Modelos.FemsaFactura - ' ' Dim TmpDT7Eleven As New DataTable - ' ' Dim TmpDTComplementosTimbrado As New DataTable - - ' ' PrepararTimbrado(FM, TmpDT7Eleven, TmpDTComplementosTimbrado) - - ' ' ObjTimbrado.TimbrarFactura(UsuarioActual, factura, FM, TmpDT, TmpDTImpuestos, TmpDT7Eleven, TmpDTComplementosTimbrado, Ruta, LstFordASN, TxtFordGSDB.Text, ObjVentas) - - ' ' sw.Stop() - ' ' GuardaLogTimbrado(sw.ElapsedMilliseconds.ToString(), UsuarioActual.Empresa.CvePAC) - - ' ' ElseIf UsuarioActual.Empresa.TipoFacturacion = "CBB" Then - ' ' GeneraPDFCBB(ObjFactura.Fecha, Nothing, ObjFactura.SerieFolio, False) - ' ' End If - ' 'End If - - ' If ErrorList.Count > 0 Then - ' ProcesoCorrecto = False - ' End If - - ' Return ProcesoCorrecto - 'End Function #End Region #Region " VISTA PREVIA NEW " @@ -16396,6 +16121,7 @@ Partial Class Ventas CreaObjetosVenta() 'PARA CUANDO YA ESTA GUARDADA LA VENTA + ObjFactura.Timbre = PreParaTimbre(ObjFactura) ObjFactura.CveVenta = CveVenta ObjFactura.Serie = Serie ObjFactura.Folio = Folio @@ -20158,15 +19884,6 @@ Partial Class Ventas Optional CveAlmacenDestino As Integer = -1) As Integer Dim OcurrioError As Boolean = False Dim ContadorMovtosDetalles As Integer = 0 - - 'If Not AplicaMovimientoDetalleEntrada Then - ' Dim rowa As DataRow = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveAlmacen={0}", CveAlmacen)) - ' If Not IsNothing(rowa) AndAlso rowa("CveTipoAlmacen").ToString() = "10" Then - ' AplicaMovimientoDetalleEntrada = True - ' End If - 'End If - 'Creamos el movimiento - Dim CveMovimientoInventario As Integer = ObjInventario.AddMovimiento(CveAlmacen, ConceptoEntrada, CveMoneda, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta, -1, -1, CveMovimientoRelacionado:=CveMovimientoRelacionado, CveAlmacenDestino:=CveAlmacenDestino, Modulo:="Vta/E4") @@ -20202,21 +19919,6 @@ Partial Class Ventas CveVentaDetalleRemision = MovDet("CveVentaDetalle").ToString().ToEntero() End If - 'If ConceptoEntrada = 3 Then - ' CveVentaDetalle = TmpDT.FiltroPrimeroValor("CveVentaDetalle", $"Consec={Consec}").ToEntero() - 'ElseIf ConceptoEntrada = 40 Then - ' CveVentaDetalle = MovDet("CveVentaDetalle").ToString().ToEntero() - ' CveVentaDetallePadre = TmpDT.FiltroPrimeroValor("CveVentaDetalle", $"Consec={Consec}").ToEntero() - ' 'CUANDO LA VENTADETALLE NO TENGA VALOR DEBE MARCAR ERROR, NUEVA RESTRICCION DE ALMACEN - ' If CveVentaDetallePadre < 0 Then - ' Alert("no se encontro la venta detalle nueva. Por favor comuniquese con atención SIG.", TipoMensaje.ToastError) - ' OcurrioError = True - ' Exit For - ' End If - 'Else - ' CveVentaDetalle = MovDet("CveVentaDetalle").ToString().ToEntero() - 'End If - 'CUANDO LA VENTADETALLE NO TENGA VALOR DEBE MARCAR ERROR, NUEVA RESTRICCION DE ALMACEN If CveVentaDetalle < 0 Then Alert("no se encontro la venta detalle. Por favor comuniquese con atención SIG.", TipoMensaje.ToastError) @@ -20312,13 +20014,16 @@ Partial Class Ventas For Each drt As DataRow In dttped.FiltraParametros("Pedimento <> ''").Rows ObjInventario.UpdateVentasDetalleNumeroPedimento(CveVenta, drt("CveVentaDetalle").ToString.ToEntero, drt("Pedimento").ToString) + Dim dtr As DataRow() = TmpDT.Select($"CveVentaDetalle ={drt("CveVentaDetalle")}") + If dtr IsNot Nothing Then 'actualizamos los datos temporales para timbrar + dtr(0)("NumeroPedimento") = drt("Pedimento").ToString + End If Next End If End If Else OcurrioError = True End If - End If End If @@ -27331,7 +27036,6 @@ Partial Class Ventas Next End If Next - End If 'VERIFICA SI TIENE BONIFICACIONES PARA AGREGARLAS @@ -29172,7 +28876,7 @@ Partial Class Ventas Dim PU As Decimal = If(AplicaPUEditado, Gv.FCTextBox("TxtPrecioEditado").Text.ToDecimal, Gv.DataKey("PU").ToDecimal) Dim Total As Decimal = (Cantidad * PU) Dim TotalImpuestos As Decimal = (Cantidad * PU) - Descuento - Dim TotalCalculableImpuestosIVA = TotalImpuestos * (1 + Gv.DataKey("PorcentajeIEPS").ToString().ToDecimal) + Dim TotalCalculableImpuestosIVA As Decimal = TotalImpuestos * (1 + Gv.DataKey("PorcentajeIEPS").ToString().ToDecimal) Dim ImporteIVA As Decimal = TotalCalculableImpuestosIVA * Gv.DataKey("PorcentajeIVA").ToString().ToDecimal Dim ImporteRetIVA As Decimal = TotalImpuestos * Gv.DataKey("PorcentajeRetIVA").ToString().ToDecimal Dim ImporteRetISR As Decimal = TotalImpuestos * Gv.DataKey("PorcentajeRetISR").ToString().ToDecimal @@ -33716,16 +33420,9 @@ Partial Class Ventas ObjFacturaProntoPago.MonedaSAT = GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", $"CveMoneda = {CveMoneda}") ObjFacturaProntoPago.Serie = Serie ObjFacturaProntoPago.Folio = Folio - ObjFacturaProntoPago.Fecha = Now - ObjFacturaProntoPago.CvePrePoliza = -1 - ObjFacturaProntoPago.CveMetodoPago = 0 - ObjFacturaProntoPago.CondicionesPago = 0 ' 0 - Contado, 1 - Credito (CHECAR) - ObjFacturaProntoPago.FormaPago = 0 ObjFacturaProntoPago.TipoDocto = "Egs" ObjFacturaProntoPago.Fecha = Now - - ObjFacturaProntoPago.Version = "4.0" If ObjFacturaProntoPago.Cliente Is Nothing Then @@ -33748,8 +33445,6 @@ Partial Class Ventas ObjFacturaProntoPago.CveCliente = CveCliente ObjFacturaProntoPago.SetCliente() - - If ObjCliente.GetClientes(ObjFacturaProntoPago.CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, -1, TipoCliente:=-1) Then If ObjCliente.DtResultados.Rows.Count > 0 Then @@ -33793,16 +33488,6 @@ Partial Class Ventas End Select ObjFacturaProntoPago.FechaPago = Now - - ObjFacturaProntoPago.CveCorte = -1 - 'ObjFacturaProntoPago.CveMesa = -1 - ObjFacturaProntoPago.NumeroPersonas = 0 - ObjFacturaProntoPago.CveContrato = -1 - ObjFacturaProntoPago.DescripcionContrato = "" - ObjFacturaProntoPago.CveClienteSucursal = -1 - ObjFacturaProntoPago.Entrega = "" - ObjFacturaProntoPago.CveAlmacen = -1 - Dim DtVentasNC As DataTable = InicializaDTVentasNCProntoPago() Dim TotalImporte As Decimal = ObjFacturaProntoPago.DtDetalle.SUMD("TotalImporte") @@ -34147,6 +33832,7 @@ Partial Class Ventas TmpDT.Columns.Add("AFValorInicial", GetType(Decimal)) TmpDT.Columns.Add("NumTurnos", GetType(Decimal)) TmpDT.Columns("NumTurnos").DefaultValue = 0D + TmpDT.Columns.Add("NumeroPedimento", GetType(String)) Return TmpDT End Function @@ -35111,7 +34797,7 @@ Partial Class Ventas #End Region Protected Sub BtnGenerarPoliza_Click(sender As Object, e As EventArgs) - CreaObjetosVenta() + 'CreaObjetosVenta() 'If UsuarioActual.Empresa.TipoContabilidad = 2 Then From cc84ef2e5996bc0b292c7e526fbe3924e734e52a Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 27 Sep 2023 07:17:16 -0700 Subject: [PATCH 012/100] option explciit --- Inventarios/PopUpExistenciasAlmacen.aspx.vb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Inventarios/PopUpExistenciasAlmacen.aspx.vb b/Inventarios/PopUpExistenciasAlmacen.aspx.vb index 4f276a596..d12d6cc59 100644 --- a/Inventarios/PopUpExistenciasAlmacen.aspx.vb +++ b/Inventarios/PopUpExistenciasAlmacen.aspx.vb @@ -122,7 +122,7 @@ Partial Class Inventarios_Default GV.DataSource = ObjInventarios.DtResultados Else GV.DataSource = Nothing - Dim Js = If(Tipo = 1, "", "window.setTimeout(Focus,200);") + Dim Js As String = If(Tipo = 1, "", "window.setTimeout(Focus,200);") Alert("No se encontraron registros con los parámetros solicitados.", Extensiones.TipoMensaje.MsgAdvertencia) End If End If @@ -237,7 +237,7 @@ Partial Class Inventarios_Default Exit Sub End If - Dim DrPS = GlobalDTPS(UsuarioActual.CveEmpresa).FiltroPrimero($"CodigoBarras = '{TxtCodigoPS.Text}'") + Dim DrPS As Data.DataRow = GlobalDTPS(UsuarioActual.CveEmpresa).FiltroPrimero($"CodigoBarras = '{TxtCodigoPS.Text}'") If DrPS Is Nothing Then Alert($"No se ha encontrado un producto del Codigo ""{TxtCodigoPS.Text}"". ", TipoMensaje.MsgAdvertencia, "window.setTimeout(Focus,200);") TxtCodigoPS.Text = "" From dd53e58598b7cb3eabc0f89e09bf48f5d642c350 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 27 Sep 2023 07:17:30 -0700 Subject: [PATCH 013/100] permitir descuento con fracciones --- Bancos/ProveedoresAbonar.aspx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Bancos/ProveedoresAbonar.aspx b/Bancos/ProveedoresAbonar.aspx index 9d42267a6..2f6fc70de 100644 --- a/Bancos/ProveedoresAbonar.aspx +++ b/Bancos/ProveedoresAbonar.aspx @@ -461,8 +461,8 @@ % Desc. - - + + From a888a223229e3dd493bfe9334c0a0c0d9ed742d4 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 27 Sep 2023 07:17:46 -0700 Subject: [PATCH 014/100] --option explicit --- Bancos/PagoElectronico.aspx.vb | 122 +++++++++++++++------------------ 1 file changed, 57 insertions(+), 65 deletions(-) diff --git a/Bancos/PagoElectronico.aspx.vb b/Bancos/PagoElectronico.aspx.vb index 5288e77e4..1ee047ded 100644 --- a/Bancos/PagoElectronico.aspx.vb +++ b/Bancos/PagoElectronico.aspx.vb @@ -350,9 +350,9 @@ Partial Class Bancos_PagoElectronico Return True End Function Private Function GuardaTXT() As Boolean - Dim Retorno = True + Dim Retorno As Boolean = True Try - Dim Ruta = "" + Dim Ruta As String = "" Dim FileName As String = Path.GetFileName(FUTxt.PostedFile.FileName) NombreArchivo = FileName Dim Extension As String = Path.GetExtension(FUTxt.PostedFile.FileName) @@ -438,7 +438,7 @@ Partial Class Bancos_PagoElectronico End If End Sub Protected Sub LBRegenerar_Click(sender As Object, e As EventArgs) - Dim CveBLE = CType(sender, LinkButton).CommandArgument.ToEntero + Dim CveBLE As Integer = CType(sender, LinkButton).CommandArgument.ToEntero Dim DtRegenerar As New DataTable Dim ObjBancos As New ClsBancos @@ -523,11 +523,11 @@ Partial Class Bancos_PagoElectronico TotalAcumulado = 0 ''VALIDA CUENTAS DEPOSITOS - Dim ErrorCuenta = False + Dim ErrorCuenta As Boolean = False Dim ProveedoresError As StringBuilder = New StringBuilder ProveedoresError.AppendFormat("") Dim TotalDetalles As Integer = 0 - Dim EsBancomer = False + Dim EsBancomer As Boolean = False For Each gvr As DataRow In DtTemp.Rows If gvr("CveCuentaDeposito").ToString <> "" AndAlso gvr("EstatusPagoElectronico").ToString <> "True" AndAlso gvr("AltaCuenta").ToString = "1" Then DTPendienteActual = DtTemp.FiltraParametros(String.Format("CveCuentaDeposito = {0}", gvr("CveCuentaDeposito").ToString)) @@ -626,7 +626,7 @@ Partial Class Bancos_PagoElectronico Descargas.AppendFormat("
  • Descargar Reporte
  • ", NombreArchivo) - Dim TextoErrorProveedores = "" + Dim TextoErrorProveedores As String = "" If ProveedoresError.Length > 160 Then TextoErrorProveedores = String.Format("


    Proveedores con Error:

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

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

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

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


    Proveedores con Error:

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

    ", FyEError.ToString) Alert(String.Format("
    El Layout fue creado satisfactoriamente.{1}
    Descargas:
      {0}
    ", Descargas, TextoErrorProveedores), TipoMensaje.MsgInformacion) @@ -1772,7 +1765,7 @@ Partial Class Bancos_PagoElectronico End Sub Private Sub GeneraAltaDetalleFyE() - Dim Resultado = True + Dim Resultado As Boolean = True Dim CuentaDeposito As String = "" Dim TipoCuentaDeposito As String = "" Dim TipoCuenta As String = "" @@ -1845,9 +1838,8 @@ Partial Class Bancos_PagoElectronico 'Campos 37-39 -- FILLER DetalleTexto &= String.Format("00{0}", Vacio.PadRight(38)) - ''LLENA DT PARA REPORTE - Dim Row = DtAlta.NewRow() + Dim Row As DataRow = DtAlta.NewRow() Row("Proveedor") = DTPendienteActual(0)("RazonSocial").ToString Row("Banco") = DTPendienteActual(0)("BancoNombre").ToString Row("TipoCuenta") = TipoCuentaDeposito @@ -1863,7 +1855,7 @@ Partial Class Bancos_PagoElectronico HeaderTexto &= String.Format("{0}{1}", UsuarioActual.CveUsuario, DateTime.Now().ToString("yyyyMMdd")).PadRight(20) 'Campos #6-8 del Header HeaderTexto &= String.Format("00").PadRight(586) - Dim HeaderLength = HeaderTexto.Length + Dim HeaderLength As Integer = HeaderTexto.Length ''''' LLENADO DE TRAILER TrailerTexto = String.Format("T{0}{1}{2}", Registros.ToString.PadLeft(10, PadCeros), Vacio.PadRight(50, PadCeros), Vacio.PadRight(575)) @@ -1883,8 +1875,8 @@ Partial Class Bancos_PagoElectronico Private Sub CargaReporte() Dim ObjBancos As New ClsBancos - Dim FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim(), "-1") - Dim FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), "-1") + Dim FechaI As String = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim(), "-1") + Dim FechaF As String = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), "-1") If ObjBancos.GetLayoutPagosEnviados(DdlCuentaReportes.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, DdlTipoReportes.SelectedValue, FechaI, DateAdd(DateInterval.Day, 1, FechaF.ToDate).ToShortDateString) Then DTReportes = ObjBancos.DtResultados From bea74e20ce6e7673681b831e6f09b4c1037ee102 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 27 Sep 2023 08:16:01 -0700 Subject: [PATCH 015/100] filtrado de clasif solo las de ventas --- Ashx/E119.ashx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Ashx/E119.ashx b/Ashx/E119.ashx index 1928e7701..fc1002e3d 100644 --- a/Ashx/E119.ashx +++ b/Ashx/E119.ashx @@ -55,8 +55,8 @@ Public Class E119 : Implements IHttpHandler Dim ObjUsuarios As New ClsSisUsuarios If ObjUsuarios.GetUsuarios(CveUsuario) Then If ObjUsuarios.DtResultados.Rows.Count > 0 Then - Dim Usuario = ObjUsuarios.DtResultados.Rows(0)("Usuario").ToString() - Dim Contrasenia = ObjUsuarios.DtResultados.Rows(0)("Contraseña").ToString() + Dim Usuario As String = ObjUsuarios.DtResultados.Rows(0)("Usuario").ToString() + Dim Contrasenia As String = ObjUsuarios.DtResultados.Rows(0)("Contraseña").ToString() UsuarioActual = ObjUsuarios.ValidaUsuario(Usuario, Contrasenia, IMEI, CveEmpresa) UsuarioActual.CveEmpresa = CveEmpresa CreaObjetoEmpresa(UsuarioActual) @@ -87,11 +87,11 @@ Public Class E119 : Implements IHttpHandler Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest Dim retorno As String = "" Try - Dim Metodo = If(context.Request("Metodo") = Nothing, "", context.Request("Metodo").ToString()) + Dim Metodo As String = If(context.Request("Metodo") = Nothing, "", context.Request("Metodo").ToString()) If Metodo = "BASF_POG40" Then context.Response.ContentType = "application/json" - Dim Auth = ValidarSolicitud(context) + Dim Auth As AuthMessage = ValidarSolicitud(context) If Auth.IsSucces Then retorno = ConsultaDatos(context) @@ -104,7 +104,7 @@ Public Class E119 : Implements IHttpHandler If Metodo = "ConsultarProductos" Then context.Response.ContentType = "application/json" - Dim Auth = ValidarSolicitud(context) + Dim Auth As AuthMessage = ValidarSolicitud(context) If Auth.IsSucces Then retorno = ConsultaProductos(context) @@ -116,7 +116,7 @@ Public Class E119 : Implements IHttpHandler If Metodo = "ConsultarClasificaciones" Then context.Response.ContentType = "application/json" - Dim Auth = ValidarSolicitud(context) + Dim Auth As AuthMessage = ValidarSolicitud(context) If Auth.IsSucces Then retorno = ConsultaClasificaciones(context) @@ -181,7 +181,7 @@ Public Class E119 : Implements IHttpHandler Dim RespuestaError As New ResponseMsgError Dim TieneError As Boolean = False - Dim strFecha = If(context.Request("Fecha") = Nothing, "", context.Request("Fecha").ToString()) + Dim strFecha As String = If(context.Request("Fecha") = Nothing, "", context.Request("Fecha").ToString()) If String.IsNullOrEmpty(strFecha) Then RespuestaError.message = "Debe especificar una fecha" @@ -238,7 +238,7 @@ Public Class E119 : Implements IHttpHandler Dim RespuestaError As New ResponseMsgError Dim TieneError As Boolean = False - Dim CveClasificacion = If(context.Request("CveClasificacion") = Nothing, "", context.Request("CveClasificacion").ToString()) + Dim CveClasificacion As String = If(context.Request("CveClasificacion") = Nothing, "", context.Request("CveClasificacion").ToString()) If String.IsNullOrEmpty(CveClasificacion) Then CveClasificacion = "-1" @@ -282,7 +282,7 @@ Public Class E119 : Implements IHttpHandler Dim Clasificaciones As JArray = Nothing Try - Clasificaciones = JArray.Parse(ClsPaginas.GlobalDTClasificaciones(CveEmpresa).FiltraParametros("", DistinctColumns:={"CveClasificacion", "Clasificacion"}).DataTableToJSONIPP()) + Clasificaciones = JArray.Parse(ClsPaginas.GlobalDTClasificaciones(CveEmpresa).FiltraParametros("AplicaParaVenta = 1", DistinctColumns:={"CveClasificacion", "Clasificacion"}).DataTableToJSONIPP()) Catch ex As Exception RespuestaError.message = "no se pudo obtener los datos" TieneError = True From f69a509412b1f946dc8fcace637898916a107929 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 27 Sep 2023 08:16:09 -0700 Subject: [PATCH 016/100] --option explicit --- Ventas/Clientes.aspx.vb | 166 +++++++++++++++------------------------- 1 file changed, 62 insertions(+), 104 deletions(-) diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index 651f59192..8da6672c9 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -3748,7 +3748,7 @@ Partial Class Clientes 'Private Function AgregarCuentaContable(btn As Button, ddl As DropDownList, ByRef CodigoCuentaAltaCompaq As String, ByRef NombreCuentaCuentaAltaCompaq As String, ByRef IdCuentaAltaCompaq As Integer) As Boolean ' Dim IdCuentaContable As Integer = -1 ' Dim CtaCodigo As String = "" - ' Dim TieneError = False + ' Dim TieneError as boolean= False ' Dim ProcesoCorrecto As Boolean ' Dim ObjContaAC As New ClsContPAQi(UsuarioActual.Empresa) @@ -4226,9 +4226,9 @@ Partial Class Clientes End Using End If - End Sub + End Sub #End Region - + #Region "E N V I O C O R R E O" Private Sub EnviaCorreo(Liga As String, LigaActivar As String) @@ -4296,11 +4296,11 @@ Partial Class Clientes a.GuardaLog() Dim Mail As New ClsSisMail() Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Body) - End Sub + End Sub #End Region - + #Region " COTIZACIONES " - + Protected Sub BtnVerMasCot_Click(sender As Object, e As EventArgs) If BtnVerMasCot.Text = "Ver Más" Then CargaCotizaciones(-1) @@ -4370,11 +4370,11 @@ Partial Class Clientes HLFacturar.HRef = $"/Ventas/Ventas.aspx?CveCotizacion={e.Row.DBCampo("CveVenta")}" End If End If - End Sub + End Sub #End Region - + #Region "D I R E C C I O N E N V I O " - + Private Sub CargaCombosDirecionesClientesSAT() CargaDirClientePais() CargaDirClienteEstado() @@ -4526,23 +4526,20 @@ Partial Class Clientes End Sub Private Sub BtnAgregarDireccion_Click(sender As Object, e As EventArgs) Handles BtnAgregarDireccion.Click Dim ObjClientes As New ClsClientes - Dim TieneError = False - Dim Estatus = If(ChkEstatus.Checked, 1, 0) + Dim TieneError As Boolean = False + Dim Estatus As Integer = If(ChkEstatus.Checked, 1, 0) If CveDireccionEnvio < 0 Then CveDireccionEnvio = ObjClientes.DireccionEnvioAdd(CveCliente, TxtEnvioDireccion.Text.Trim, TxtEnvioNoExt.Text.Trim, TxtEnvioNoInt.Text.Trim, TxtEnvioColonia.Text.Trim, TxtEnvioCiudad.Text.Trim, TxtEnvioEstado.Text.Trim, TxtEnvioCP.Text.Trim(), TxtEnvioContacto.Text.Trim, UsuarioActual.CveUsuario, Estatus, CveClienteSucursal:=DdlClienteSucursalEnvio.SelectedValue.ToEntero(), EnvioTel:=TxtEnvioTel.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), - CvePais:=DdlDirClientePais.SelectedValue.ToEntero, CveEstado:=DdlDirClienteEstado.SelectedValue.ToEntero, CveMunicipio:=DdlDirClienteMunicipio.SelectedValue.ToEntero, CveLocalidad:=DdlDirClienteLocalidad.SelectedValue.ToEntero, CveColonia:=DdlDirClienteColonia.SelectedValue.ToEntero, CveSubProyecto:=DdlSubProyectoClienteSucursal.SelectedValue.ToEntero, COM_NumRegIdTrib:=TxtCom_NumRegIdTrib.Text.Trim()) - + CvePais:=DdlDirClientePais.SelectedValue.ToEntero, CveEstado:=DdlDirClienteEstado.SelectedValue.ToEntero, CveMunicipio:=DdlDirClienteMunicipio.SelectedValue.ToEntero, CveLocalidad:=DdlDirClienteLocalidad.SelectedValue.ToEntero, CveColonia:=DdlDirClienteColonia.SelectedValue.ToEntero, CveSubProyecto:=DdlSubProyectoClienteSucursal.SelectedValue.ToEntero, COM_NumRegIdTrib:=TxtCom_NumRegIdTrib.Text.Trim()) If CveDireccionEnvio < 0 Then TieneError = True End If Else - If Not ObjClientes.DireccionEnvioUpdate(CveCliente, TxtEnvioDireccion.Text.Trim, TxtEnvioNoExt.Text.Trim, TxtEnvioNoInt.Text.Trim, TxtEnvioColonia.Text.Trim, TxtEnvioCiudad.Text.Trim, TxtEnvioEstado.Text.Trim, TxtEnvioCP.Text.Trim(), TxtEnvioContacto.Text.Trim, UsuarioActual.CveUsuario, Estatus, CveDireccionEnvio, CveClienteSucursal:=DdlClienteSucursalEnvio.SelectedValue.ToEntero(), EnvioTel:=TxtEnvioTel.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), CvePais:=DdlDirClientePais.SelectedValue.ToEntero, CveEstado:=DdlDirClienteEstado.SelectedValue.ToEntero, CveMunicipio:=DdlDirClienteMunicipio.SelectedValue.ToEntero, CveLocalidad:=DdlDirClienteLocalidad.SelectedValue.ToEntero, CveColonia:=DdlDirClienteColonia.SelectedValue.ToEntero, CveSubProyecto:=DdlSubProyectoClienteSucursal.SelectedValue.ToEntero, COM_NumRegIdTrib:=TxtCom_NumRegIdTrib.Text.Trim()) Then TieneError = True End If - End If If TieneError Then @@ -4581,7 +4578,7 @@ Partial Class Clientes End Sub Private Sub GvDireccionesEnvio_RowDeleting(sender As Object, e As GridViewDeleteEventArgs) Handles GvDireccionesEnvio.RowDeleting Dim ObjClientes As New ClsClientes - Dim TieneError = False + Dim TieneError As Boolean = False Dim CveDireccionEnvio As Integer = GvDireccionesEnvio.Rows(e.RowIndex).DataKey("CveDireccionEnvio").ToEntero() @@ -4597,12 +4594,12 @@ Partial Class Clientes End If CargaDireccionesEnvio() - End Sub - + End Sub + #End Region - + #Region " IMPORTAR SALDOS " - + Private Sub HLImportarSaldos_Click(sender As Object, e As EventArgs) Handles HLImportarSaldos.Click CargaClientesImportarSaldos() RegistraScript(String.Format("$('#{0}').modal();", "DivImportarSaldos")) @@ -4633,7 +4630,7 @@ Partial Class Clientes UpImportarSaldos.Update() End Sub Protected Sub BtnGuardarTransferencias_Click(sender As Object, e As EventArgs) - Dim EsValida = False + Dim EsValida As Boolean = False For Each Gvr As GridViewRow In GvImportarSaldos.Rows If Gvr.FCCheckBox("Chk").Checked AndAlso Gvr.FCTextBox("TxtImporte").Text.ToDouble > 0 Then @@ -4648,7 +4645,7 @@ Partial Class Clientes Dim ObjConta As New ClsContabilidad ObjConta.IniciaTransacSQL() - Dim TieneError = False + Dim TieneError As Boolean = False Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Clientes/ImportarSaldos", 53, TxtCantidad.Text.Trim.ToDouble, TxtCantidad.Text.Trim.ToDouble, 1, TxtFechaImportarSaldos.Text.ToDate(), "Traspaso de saldos de anticipos", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) @@ -4706,9 +4703,9 @@ Partial Class Clientes e.Row.FCCheckBox("Chk").Attributes.Add("onclick", String.Format("ChkSaldo(this,{0},{1});", e.Row.FCTextBox("TxtImporte").ClientID, e.Row.DBCampo("Saldo"))) e.Row.FCTextBox("TxtImporte").Attributes.Add("onKeyUp", String.Format("CambiaSaldo({0},this,{1});", e.Row.FCCheckBox("Chk").ClientID, e.Row.DBCampo("Saldo"))) End If - End Sub + End Sub #End Region - + #Region "Cuentas/Equipos" Public Sub BtnAgregarCtaEquipo_Click(sender As Object, e As EventArgs) @@ -4726,7 +4723,7 @@ Partial Class Clientes End Sub Private Sub BtnGuardarCuenta_Click(sender As Object, e As EventArgs) Handles BtnGuardarCuenta.Click Dim objCuentasEquipos As New ClsGenerales() - Dim TieneError = False + Dim TieneError As Boolean = False objCuentasEquipos.IniciaTransacSQL() If HdnModalidad.Value = "I" Then @@ -4844,7 +4841,7 @@ Partial Class Clientes End Sub Protected Sub GvCuentasEquipos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvCuentasEquipos.RowDeleting Dim Objeto As New ClsGenerales - Dim TieneError = False + Dim TieneError As Boolean = False If Objeto.RemoveCuentaEquipo(GvCuentasEquipos.DataKeys(e.RowIndex).Value.ToString().ToEntero()) Then Alert("La cuenta Equipo se eliminó correctamente.", TipoMensaje.MsgInformacion) Else @@ -4922,7 +4919,7 @@ Partial Class Clientes rfvDdlCarcateristicaOpcion1.Enabled = False RdlCarcateristicaOpcion.Visible = False - Dim rfvRdlCarcateristicaOpcion = e.Row.FCRequiredFieldValidator("rfvRdlCarcateristicaOpcion") + Dim rfvRdlCarcateristicaOpcion As RequiredFieldValidator = e.Row.FCRequiredFieldValidator("rfvRdlCarcateristicaOpcion") rfvRdlCarcateristicaOpcion.Enabled = False Dim CalendarioCaractersiticas As AjaxControlToolkit.CalendarExtender = e.Row.FCCalendarExtender("CalendarioCaractersiticas") @@ -5056,7 +5053,7 @@ Partial Class Clientes rfvDdlCarcateristicaOpcion2.Enabled = False RdlCarcateristicaOpcion2.Visible = False - Dim rfvRdlCarcateristicaOpcion = e.Row.FCRequiredFieldValidator("rfvRdlCarcateristicaOpcion2") + Dim rfvRdlCarcateristicaOpcion As RequiredFieldValidator = e.Row.FCRequiredFieldValidator("rfvRdlCarcateristicaOpcion2") rfvRdlCarcateristicaOpcion.Enabled = False Dim cvFechaF As CompareValidator = e.Row.FCCompareValidator("cvFechaF2") @@ -5132,7 +5129,7 @@ Partial Class Clientes End If End Sub Private Function GuardaCaracteristicas(Modalidad As String, CveCuentaEquipo As Integer, ByRef ObjCarac As ClsGenerales) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False If Modalidad.ToString() = "I" Then For Each gvr As GridViewRow In GvAddCuentaCaracteristica.Rows @@ -5525,7 +5522,7 @@ Partial Class Clientes Dim Cuerpo As String = TxtBody2.Text Dim Asunto As String = "" - Dim TipoComprobante = "" + Dim TipoComprobante As String = "" If HdnTipoDocto2.Value.ToString() = "Ing" Then TipoComprobante = "Factura" If HdnTipoDocto2.Value.ToString() = "Egs" Then TipoComprobante = "Nota de Crédito" @@ -5745,8 +5742,8 @@ Partial Class Clientes Private Sub EnviaCorreoGPS(Liga As String, LigaActivar As String) Try - Dim Para = TxtEmail.Text.Trim - Dim Asunto = "ACTIVACIÓN DEL PORTAL GPS" + Dim Para As String = TxtEmail.Text.Trim + Dim Asunto As String = "ACTIVACIÓN DEL PORTAL GPS" Dim SBBody As New StringBuilder 'Linia de estilos SBBody.Append("") @@ -6253,7 +6250,7 @@ Partial Class Clientes Protected Sub BtnExcelHistorial_Click(sender As Object, e As EventArgs) Dim retorno As Byte() = Nothing Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png") - Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + Dim logouri As String = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) 'OBTENEMOS LOS DATOS @@ -6294,7 +6291,7 @@ Partial Class Clientes Protected Function ImprimirReporteHistorial() As Byte() Dim retorno As Byte() = Nothing Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png") - Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + Dim logouri As String = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) Dim ObjClientes As New ClsClientes() 'OBTENEMOS LOS DATOS @@ -6403,7 +6400,7 @@ Partial Class Clientes CargaMonedas() End Sub Protected Sub LbAgregarCuentaBanco_Click(sender As Object, e As EventArgs) - Dim EsBancomer = False + Dim EsBancomer As Boolean = False If TxtNombreBanco.Text.ToUpper.Contains("BBVA") Or TxtNombreBanco.Text.ToUpper.Contains("BANCOMER") Or (TxtCLABE.Text.Length = 18 AndAlso TxtCLABE.Text.Substring(0, 3) = "012") Then EsBancomer = True @@ -6515,7 +6512,7 @@ Partial Class Clientes Else - Dim index = CveCuentaBancaria + Dim index As Integer = CveCuentaBancaria Dim Row As DataRow = TempDTCuentasBancos.Rows(index) Row("BancoNombre") = NombreBanco Row("Sucursal") = NumeroSucursal @@ -6555,7 +6552,7 @@ Partial Class Clientes If e.Row.RowType = DataControlRowType.DataRow Then If CveCliente < 0 Then - For index = 1 To TempDTCuentasBancos.Rows.Count + For index As Integer = 1 To TempDTCuentasBancos.Rows.Count TempDTCuentasBancos.Rows(index - 1)("CveCuentaDeposito") = index Next TempDTCuentasBancos.AcceptChanges() @@ -6585,7 +6582,7 @@ Partial Class Clientes Alert("No se pudo borrar la Cuenta Bancaria. Por favor intente nuevamente.", TipoMensaje.MsgError) End If Else - Dim index = GvRow.RowIndex + Dim index As Integer = GvRow.RowIndex TempDTCuentasBancos.Rows.RemoveAt(index) Alert("Cuenta Bancaria borrada con éxito.", TipoMensaje.MsgInformacion) End If @@ -6615,16 +6612,12 @@ Partial Class Clientes UpCuentasBancos.Update() End Sub - Private Sub CargaMonedas() DdlMoneda.DataSource = GlobalDTMonedas DdlMoneda.DataBind() DdlMoneda.Items.Insert(0, New ListItem("Seleccione", "-1")) End Sub - - - Private Sub LnkCuentasBancarias_Click(sender As Object, e As EventArgs) Handles LnkCuentasBancarias.Click Modalidad = "A" TxtNombreBanco.Text = "" @@ -6694,12 +6687,12 @@ Partial Class Clientes Dim ObjVentas As New ClsVentas Dim Vta As Modelos.Factura = Nothing - Dim TmpDTImpuestos = New DataTable + Dim TmpDTImpuestos As New DataTable TmpDTImpuestos.Columns.Add("ImpuestoLocal", GetType(String)) TmpDTImpuestos.Columns.Add("Importe", GetType(Double)) TmpDTImpuestos.Columns.Add("Orden", GetType(Integer)) - Dim TmpDTImpuestosIVAIEPS = New DataTable + Dim TmpDTImpuestosIVAIEPS As New DataTable TmpDTImpuestosIVAIEPS.Columns.Add("Impuesto", GetType(String)) TmpDTImpuestosIVAIEPS.Columns.Add("tasa", GetType(String)) TmpDTImpuestosIVAIEPS.Columns.Add("Importe", GetType(Double)) @@ -6814,7 +6807,7 @@ Partial Class Clientes Dim dtImpuesto As DataTable = ObjVentas.DtResultados If dtImpuesto.Rows.Count > 0 Then For Each Row As DataRow In dtImpuesto.Rows - Dim Orden = 80 + Dim Orden As Integer = 80 If Row("Importe").ToString().ToDouble <> 0 Then DR("ImpuestoLocal") = Row("ImpuestoLocal").ToString() DR("Importe") = Row("Importe").ToString().ToDouble @@ -7317,24 +7310,21 @@ Partial Class Clientes 'Dim DDLEstatus As DropDownList = DirectCast(GvRow.FindControl("DDLEstatus"), DropDownList) Dim chkCompleto As CheckBox = DirectCast(GvRow.FindControl("chkEstatus"), CheckBox) - Dim UrlArchivo = UsuarioActual.Empresa.Ruta & "\DocElectronica\Clientes\" & CveCliente & "/" & _Adjunto + Dim UrlArchivo As String = UsuarioActual.Empresa.Ruta & "\DocElectronica\Clientes\" & CveCliente & "/" & _Adjunto If File.Exists(UrlArchivo) Then Try File.Delete(UrlArchivo) Catch ex As Exception End Try - End If Dim ObjEdoc As New ClsEdocumentacion - If Not _CveDocumentacionElectronica = -1 Then If ObjEdoc.DocumentacionElectronicaUpdate(_CveDocumentacionElectronica, _CveDocumentacion, -1, CveCliente, -1, 0, "", "", UsuarioActual.CveUsuario, _fechaLimite) Then Alert("Documento Eliminado Correctamente.", TipoMensaje.MsgInformacion) End If - End If CargaDocumentacionCliente() @@ -7349,7 +7339,6 @@ Partial Class Clientes If GvRow.DataKey("Documentacion") = "Pagaré" AndAlso UsuarioActual.CveEmpresa = 140 Then - stringDescargaDocumento = UsuarioActual.Empresa.Ruta & "Formatos\Pagaré.docx" linkDescargaPagare = stringDescargaDocumento TxtDireccionAval.Text = "" @@ -7364,10 +7353,9 @@ Partial Class Clientes linkDescargaPagare = stringDescargaDocumento - Dim File = New FileInfo(linkDescargaPagare) + Dim File As New FileInfo(linkDescargaPagare) If File.Exists Then - Response.Clear() Response.AddHeader("Content-Disposition", "attachment; filename=" + File.Name) Response.AddHeader("Content-Length", File.Length.ToString()) @@ -7375,13 +7363,8 @@ Partial Class Clientes Response.Flush() Response.TransmitFile(File.FullName) Response.End() - End If End If - - - - End Sub Protected Sub ImprimirPagare(sender As Object, e As EventArgs) Handles BtnAgregarPagare.Click @@ -7507,15 +7490,10 @@ Partial Class Clientes Dim existeAdjunto As Boolean = False Dim TxtFechaVigencia As TextBox = e.Row.FCTextBox("TxtFechaVigencia") - Dim imgCalendario As LinkButton = e.Row.FCLinkButton("imgCalendario") - - - - - - - ' FechaVigencia - + Dim imgCalendario As LinkButton = e.Row.FCLinkButton("imgCalendario") + + ' FechaVigencia + Dim DiasLimite As Integer = e.Row.DataKey("DiasLimite").ToString().ToEntero() Dim AplicaDiasLimite As Boolean = If(e.Row.DataKey("AplicaDiasLimite").ToString() = "1", True, False) Dim AplicaFechaVencimiento As Boolean = If(e.Row.DataKey("AplicaFechaVencimiento").ToString() = "1", True, False) @@ -7556,8 +7534,8 @@ Partial Class Clientes If Adjunto.Trim.Length > 0 Or (Documentacion = "Pagaré" AndAlso UsuarioActual.CveEmpresa = 140) Then - Dim linkDescarga = "/Empresas/" & UsuarioActual.Empresa.CveEmpresa & "\DocElectronica\Clientes\" & CveCliente & "/" & Adjunto - Dim linkDescargaArchivo = UsuarioActual.Empresa.Ruta & "\DocElectronica\Clientes\" & CveCliente & "/" & Adjunto + Dim linkDescarga As String = "/Empresas/" & UsuarioActual.Empresa.CveEmpresa & "\DocElectronica\Clientes\" & CveCliente & "/" & Adjunto + Dim linkDescargaArchivo As String = UsuarioActual.Empresa.Ruta & "\DocElectronica\Clientes\" & CveCliente & "/" & Adjunto If File.Exists(linkDescargaArchivo) Or (Documentacion = "Pagaré" AndAlso UsuarioActual.CveEmpresa = 140) Then LnkDownLoadDoc.Visible = True @@ -7592,12 +7570,8 @@ Partial Class Clientes Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) - Dim Adjunto As String = GvRow.DataKey("Adjunto") - - Dim stringDescargaDocumento As String = "" - - Dim asdasd = GvRow.DataKey("Documentacion") - + Dim Adjunto As String = GvRow.DataKey("Adjunto") + If GvRow.DataKey("Documentacion").ToUpper = "Pagaré".ToUpper AndAlso UsuarioActual.CveEmpresa = 140 Then @@ -7612,28 +7586,19 @@ Partial Class Clientes Else - Dim CveDocumentacion As Integer = GvRow.DataKey("CveDocumentacion").ToString().ToEntero() Dim DocumentacionFormato As String = CveDocumentacion & "_" & GvRow.DataKey("DocumentacionFormato") DescarFormato(DocumentacionFormato) - End If - - - - - - + End If + End Sub Public Sub DescarFormato(documento As String) Dim PathRoot As String = Server.MapPath("/") Dim PathSource As String Dim pathDesti As String - Dim fname As String = "" - - - + Dim fname As String = "" PathSource = UsuarioActual.Empresa.Ruta & "Formatos\" & documento pathDesti = PathRoot & "Temp\" & CveCliente & documento @@ -7662,14 +7627,10 @@ Partial Class Clientes Catch ex As Exception End Try - - - End If - Dim FileD = New FileInfo(pathDesti) - + Dim FileD As New FileInfo(pathDesti) If FileD.Exists Then Response.Clear() @@ -7827,10 +7788,7 @@ Partial Class Clientes Next Else Respuesta = True - End If - - - + End If UpModalCXCClienteDocumento.Update() Return Respuesta @@ -8397,7 +8355,7 @@ Partial Class Clientes Return End If Dim TieneError As Boolean = False - Dim ObjGPS = New ClsGPS() + Dim ObjGPS As New ClsGPS() Dim ObjEventos As New ClsOIEventos(ObjGPS.IniciaTransacSQL()) If ObjGPS.UpdateClienteDispositivo(CveDispositivo, CveCliente) Then @@ -8427,7 +8385,7 @@ Partial Class Clientes #Region "CRM" Protected Sub CargaDatosCRM() - Dim ObjCRM = New ClsCRM() + Dim ObjCRM As New ClsCRM() If ObjCRM.GetEmpresasCRM(UsuarioActual.CveEmpresa, CveEmpresaCRM) And ObjCRM.DtResultados.Rows.Count > 0 Then TxtNombre.Text = ObjCRM.DtResultados.FiltroPrimeroValor("Empresa").ToString() @@ -8447,7 +8405,7 @@ Partial Class Clientes End Sub Protected Sub VerificaVinculacion() - Dim ObjCRM = New ClsCRM() + Dim ObjCRM As New ClsCRM() If ObjCRM.GetEmpresasCRM(UsuarioActual.CveEmpresa, -1) And ObjCRM.DtResultados.Rows.Count > 0 Then If ObjCRM.DtResultados.FiltraParametros(String.Format("CveCliente = {0}", CveCliente)).Rows.Count > 0 Then @@ -8461,8 +8419,8 @@ Partial Class Clientes Protected Function VincularEmpresaCRM() As Boolean Dim Ok As Boolean = False - Dim ObjCRM = New ClsCRM() - Dim ObjBitacora = New ClsOIEventos(ObjCRM.IniciaTransacSQL()) + Dim ObjCRM As New ClsCRM() + Dim ObjBitacora As New ClsOIEventos(ObjCRM.IniciaTransacSQL()) If (CveCliente > 0) Then Dim CveEmpresaCRMVincular As Integer = If(CveEmpresaCRM > 0, CveEmpresaCRM, If(CveEmpresaCRMUnificar > 0, CveEmpresaCRMUnificar, -1)) @@ -8490,7 +8448,7 @@ Partial Class Clientes End Function Protected Sub CargaModalEmpresasCRM() - Dim ObjCRM = New ClsCRM() + Dim ObjCRM As New ClsCRM() If (ObjCRM.GetEmpresasCRM(UsuarioActual.CveEmpresa) And ObjCRM.DtResultados.Rows.Count > 0) Then DtEmpresasCRM = ObjCRM.DtResultados.FiltraParametros(String.Format("CveCliente IS NULL")) @@ -9084,8 +9042,8 @@ Partial Class Clientes If ObjFactura.CveCliente > 0 Then If TmpDT.Rows.Count > 0 Then - Dim Retorno = ObjFactura.EmitirFactura(False) - For Each Mensaje In Retorno.Mensajes + Dim Retorno As Modelos.Factura.MMensajeFactura = ObjFactura.EmitirFactura(False) + For Each Mensaje As String In Retorno.Mensajes Alert(Mensaje, If(Retorno.TieneError, TipoMensaje.MsgError, TipoMensaje.MsgInformacion)) Next End If @@ -9870,7 +9828,7 @@ Partial Class Clientes New JProperty("TipoDocto", "-1") ) - Dim Url = New Uri(String.Format("{0}api/cliente/GetHistorialVentas?CveCliente={1}&SelectTop={2}&CveClienteSucursal={3}&TipoDocto={4}", "https://localhost:5001/", CveCliente, SelectTop, CveClienteSucursal, "-1")) + Dim Url As New Uri(String.Format("{0}api/cliente/GetHistorialVentas?CveCliente={1}&SelectTop={2}&CveClienteSucursal={3}&TipoDocto={4}", "https://localhost:5001/", CveCliente, SelectTop, CveClienteSucursal, "-1")) Dim response = cliente.GetAsync(Url).Result From b4d6b4135262a41f2d7a04ecca06f370e80a71cd Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 27 Sep 2023 08:16:36 -0700 Subject: [PATCH 017/100] --activar el div ecommerce E119 --- Ventas/ProductosServicios.aspx.vb | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/Ventas/ProductosServicios.aspx.vb b/Ventas/ProductosServicios.aspx.vb index 1770b056a..2f49efbfe 100644 --- a/Ventas/ProductosServicios.aspx.vb +++ b/Ventas/ProductosServicios.aspx.vb @@ -287,8 +287,6 @@ Partial Class ProductosyServicios End If - - If UsuarioActual.CveEmpresa.Contiene(72, 80) Then TxtPS.CssClass = "form-control Mayuscula" End If @@ -430,7 +428,7 @@ Partial Class ProductosyServicios DivCitricos.Visible = True CargaPanelCitricos() End If - If UsuarioActual.CveEmpresa = 2 Then + If UsuarioActual.CveEmpresa = 119 Then DiveCommerce.Visible = True End If @@ -971,26 +969,19 @@ Partial Class ProductosyServicios DdlRin.SelectedValueExist(ObjProductosServicios.DtResultados.Rows(0)("CveRinTamaño").ToString) DdlObjetoImpuesto.SelectedValueExist(ObjProductosServicios.DtResultados.Rows(0)("CveObjetoImpuesto").ToString) - 'If ObjProductosServicios.CvePSAdicional > 0 Then - ' DdlPSAdicional.SelectedValue = ObjProductosServicios.CvePSAdicional.ToString - ' DdlPSAdicional.SelectedText = ObjProductosServicios.PSCodigoAdicional - 'Else - ' DdlPSAdicional.SelectedValue = "-1" - ' DdlPSAdicional.SelectedText = "Seleccione" - 'End If DdlEmpacado.SelectedValueExist(ObjProductosServicios.DtResultados.Rows(0)("CveTipoEmpacado").ToString) DdlTipoOrganico.SelectedValueExist(ObjProductosServicios.DtResultados.Rows(0)("CveTipoOrganico").ToString) + TxtNombreComercial.Text = ObjProductosServicios.DtResultados.Rows(0)("NombreComercial").ToString + TxtEcommerceNota.Text = ObjProductosServicios.DtResultados.Rows(0)("NotasAdicionales").ToString Try DdlClasificacion_SelectedIndexChanged(DdlClasificacion, Nothing) - DdlTamanio.SelectedValueExist(ObjProductosServicios.DtResultados.Rows(0)("CveTamaño").ToString) If DdlTamanio.SelectedValue.ToEntero() > 0 Then Dim Dr As DataRow = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveClasificacion={0}", DdlClasificacion.SelectedValue.ToEntero()))(0) Dim DebeTenerTamanio As Boolean = Boolean.Parse(Dr("EsAcumulador").ToString) - 'SI ES MOTOBATERIA If DdlClasificacion.SelectedValue = "20517" Then DebeTenerTamanio = True @@ -1007,15 +998,11 @@ Partial Class ProductosyServicios If DebeTenerTamanio AndAlso DdlTamanio.SelectedValue.ToEntero() <= 0 Then Alert($"Un producto/servicio con la clasificación '{Dr("Clasificacion")}' debe tener especificado un tamaño.", TipoMensaje.MsgAdvertencia) End If - DvTamanio.Visible = True End If - - Catch ex As Exception End Try - ChkAplicaIeps.Checked = ObjProductosServicios.AplicaIEPS If ObjProductosServicios.AplicaIEPS = True Then DdlIEPSPorcentaje.Enabled = True From ac94d0139a2d110d53ef325befbafd825e40ba2d Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 27 Sep 2023 08:22:36 -0700 Subject: [PATCH 018/100] --ESPACIO --- Bancos/PopIEVentas.aspx | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/Bancos/PopIEVentas.aspx b/Bancos/PopIEVentas.aspx index 2a93043a1..9d28c6d86 100644 --- a/Bancos/PopIEVentas.aspx +++ b/Bancos/PopIEVentas.aspx @@ -35,14 +35,9 @@ - - - +   - - - - + @@ -541,7 +536,6 @@

    -
    From 843850e87290152dc07d53ee60dde36a4f9ed9e3 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Wed, 27 Sep 2023 16:35:38 -0700 Subject: [PATCH 019/100] --categoria en endpoint de clasificaciones --- Ashx/E119.ashx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Ashx/E119.ashx b/Ashx/E119.ashx index 1928e7701..0c5052e1a 100644 --- a/Ashx/E119.ashx +++ b/Ashx/E119.ashx @@ -282,7 +282,7 @@ Public Class E119 : Implements IHttpHandler Dim Clasificaciones As JArray = Nothing Try - Clasificaciones = JArray.Parse(ClsPaginas.GlobalDTClasificaciones(CveEmpresa).FiltraParametros("", DistinctColumns:={"CveClasificacion", "Clasificacion"}).DataTableToJSONIPP()) + Clasificaciones = JArray.Parse(ClsPaginas.GlobalDTClasificaciones(CveEmpresa).FiltraParametros("", DistinctColumns:={"CveClasificacion", "Clasificacion", "CveCategoria", "Categoria"}).DataTableToJSONIPP()) Catch ex As Exception RespuestaError.message = "no se pudo obtener los datos" TieneError = True From 8ada153c34d33f19458cbb9fee723f90c9924bc6 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 28 Sep 2023 08:22:00 -0700 Subject: [PATCH 020/100] -- nuevo proceso, para bloquear registro cuando no viene del xml-efacturas --- Compras/Compras.aspx.vb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index b44f36e24..ebbec4375 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -1348,6 +1348,7 @@ Partial Class Compras_Compras End If If UsuarioActual.TienePermisoProceso(360) Then BtnProrateoDeducible.Visible = True + If UsuarioActual.TienePermisoProceso(365) AndAlso IfNull(Request("CveFactura"), "").ToString = "" Then BtnGuardar.Visible = False If Not CveCompra > 0 Then LIContratos.Visible = True @@ -2344,7 +2345,7 @@ Partial Class Compras_Compras End If End If - Dim SubTotalIEPS = TmpDT.SUM("Total").ToString.ToDecimal + Dim SubTotalIEPS As Decimal = TmpDT.SUMD("Total") SubTotal = Math.Round(SubTotalIEPS, 2) SubTotalConceptos = Math.Round(SubTotalIEPS, 2) @@ -9444,7 +9445,7 @@ Partial Class Compras_Compras If ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 Then Dim Entro As Boolean = False - For Each Documento In ListaDocumentos + For Each Documento As String In ListaDocumentos If e.Row.DBCampo("UUID").ToString = Documento Then Entro = True End If @@ -9685,7 +9686,7 @@ Partial Class Compras_Compras End Sub Private Function notienepresupuesto() As Boolean - Dim notienerecursos = False + Dim notienerecursos As Boolean = False Dim SinRecursos As New StringBuilder SinRecursos.AppendFormat("No se cuenta con los Recursos Suficientes en los siguientes subproyectos ") Dim subproyectosSr As New List(Of Integer) @@ -17792,7 +17793,7 @@ Partial Class Compras_Compras Dim ObjCompras As New ClsCompras Dim ObjConta As New ClsContabilidad(ObjCompras.IniciaTransacSQL) - Dim TieneError = False + Dim TieneError As Boolean = False For Each Gvr As GridViewRow In GVNCInv.Rows If Gvr.FCTextBox("TxtCantidadNCInv").Text.ToDouble > 0 Then From ca99b46abf660e71818fdc0d35b30f2e383caca6 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 28 Sep 2023 12:55:37 -0700 Subject: [PATCH 021/100] =?UTF-8?q?--reubicaci=C3=B3n=20de=20c=C3=B3digo?= =?UTF-8?q?=20de=20impuestos=20locales=20--=20reubicacion=20de=20c=C3=B3di?= =?UTF-8?q?go=20de=20timbre=20cfdirelacionados=20en=20preparaTimbre?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ventas/Ventas.aspx.vb | 98 +++++++++++++++++++++---------------------- 1 file changed, 48 insertions(+), 50 deletions(-) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 43d6fe095..09ae15afd 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -11825,30 +11825,7 @@ Partial Class Ventas 'End If ObjFactura.AplicaDevolucion = Me.AplicaDevolucion - ObjFactura.CveTipoAmortizacionAnticipo = DdlTipoAmortizacionAnticipo.SelectedValue.ToEntero() - ObjFactura.Timbre.Comprobante.TipoComprobante = If(ObjFactura.TipoDocto.Contiene("Ing", "Ant"), "I", If(ObjFactura.TipoDocto.Contiene("Egs", "Dev"), "E", "")) - - If ObjFactura.Timbre.Comprobante.TipoComprobante = "E" Then - If ObjFactura.TipoDocto = "Egs" Then - ObjFactura.Timbre.CFDIRelacionados.TipoRelacion = "01" - ObjFactura.Timbre.CFDIRelacionados.TipoRelacionTexto = "Nota de Crédito aplicada a Ingreso" - - End If - If ObjFactura.TipoDocto = "Dev" Then - ObjFactura.Timbre.CFDIRelacionados.TipoRelacion = "03" - ObjFactura.Timbre.CFDIRelacionados.TipoRelacionTexto = "Devolución aplicada a Ingreso" - End If - ObjFactura.CveTipoRelacion = DdlTiposRelacion.SelectedValue.ToEntero() - If HdnFolioFiscalNC.Value <> "0" And HdnFolioFiscalNC.Value <> "" Then ObjFactura.Timbre.CFDIRelacionados.UUID.Add(HdnFolioFiscalNC.Value) - End If - ' cuando es refacturacoin es cfdirelacionado, con relacion 04 - If ObjFactura.Timbre.Comprobante.TipoComprobante = "I" AndAlso NuevaFactura = 1 Then - ObjFactura.Timbre.CFDIRelacionados.TipoRelacion = "04" - ObjFactura.Timbre.CFDIRelacionados.TipoRelacionTexto = "Refacturación de Ingreso" - ObjFactura.Timbre.CFDIRelacionados.UUID.Add(HdnFolioFiscalNC.Value) - End If - If ObjFactura.TipoDocto.Contiene("Ing", "Ant") AndAlso NuevaFactura = 1 Then ' refacturación ObjFactura.CveTipoRelacion = DdlTiposRelacion.SelectedValue.ToEntero() @@ -11888,33 +11865,6 @@ Partial Class Ventas Next End If - - 'RMF. faltan impuestos locales - If TmpDTImpuestos IsNot Nothing AndAlso TmpDTImpuestos.FiltraParametros("TipoImpuesto IN (1,3) ").Rows.Count > 0 Then - - For Each DrImpuestosLocales As DataRow In TmpDTImpuestos.FiltraParametros("TipoImpuesto IN (1,3) ").Rows - If DrImpuestosLocales("Importe").ToString().ToDecimal > 0 Then - Dim ret As New CFDIRetencionesLocales With - { - .TasaRetencion = DrImpuestosLocales("Porcentaje").ToString().ToDecimal, - .ImpuestoLocalRetenido = DrImpuestosLocales("ImpuestoLocal").ToString(), - .Importe = DrImpuestosLocales("Importe").ToString().ToDecimal(If(ObjFactura.ConvertirPesos, ObjFactura.TipoCambio, 1)).RoundSQL(2) - } - ObjFactura.Timbre.RetencionesLocales.Add(ret) - End If - Next - End If - - If TmpDTImpuestos IsNot Nothing AndAlso TmpDTImpuestos.FiltraParametros("TipoImpuesto = 5").Rows.Count > 0 Then - - For Each DrImpuestosLocales As DataRow In TmpDTImpuestos.FiltraParametros("TipoImpuesto = 5").Rows - If DrImpuestosLocales("Importe").ToString().ToDecimal > 0 Then - Dim ret As New CFDITrasladosLocales With {.TasaTraslado = DrImpuestosLocales("Porcentaje").ToString().ToDecimal, .ImpuestoLocalTraslado = DrImpuestosLocales("ImpuestoLocal").ToString(), .Importe = DrImpuestosLocales("Importe").ToString().ToDecimal(If(ObjFactura.ConvertirPesos, ObjFactura.TipoCambio, 1))} - ObjFactura.Timbre.TrasladosLocales.Add(ret) - End If - Next - End If - 'INE COMPLEMENTO If RblComplementos.SelectedValue.ToEntero() > 0 Then ObjFactura.CveComplementoTimbrado = RblComplementos.SelectedValue.ToEntero() @@ -12317,6 +12267,28 @@ Partial Class Ventas Timbre.Receptor.NumeroRegistroTributario = "" Timbre.Receptor.UsoCFDI = Obj.ClaveUsoCFDI + Timbre.Comprobante.TipoComprobante = If(ObjFactura.TipoDocto.Contiene("Ing", "Ant"), "I", If(ObjFactura.TipoDocto.Contiene("Egs", "Dev"), "E", "")) + + If Timbre.Comprobante.TipoComprobante = "E" Then + If ObjFactura.TipoDocto = "Egs" Then + Timbre.CFDIRelacionados.TipoRelacion = "01" + Timbre.CFDIRelacionados.TipoRelacionTexto = "Nota de Crédito aplicada a Ingreso" + + End If + If ObjFactura.TipoDocto = "Dev" Then + Timbre.CFDIRelacionados.TipoRelacion = "03" + Timbre.CFDIRelacionados.TipoRelacionTexto = "Devolución aplicada a Ingreso" + End If + ObjFactura.CveTipoRelacion = DdlTiposRelacion.SelectedValue.ToEntero() + If HdnFolioFiscalNC.Value <> "0" And HdnFolioFiscalNC.Value <> "" Then Timbre.CFDIRelacionados.UUID.Add(HdnFolioFiscalNC.Value) + End If + ' cuando es refacturacoin es cfdirelacionado, con relacion 04 + If Timbre.Comprobante.TipoComprobante = "I" AndAlso NuevaFactura = 1 Then + Timbre.CFDIRelacionados.TipoRelacion = "04" + Timbre.CFDIRelacionados.TipoRelacionTexto = "Refacturación de Ingreso" + Timbre.CFDIRelacionados.UUID.Add(HdnFolioFiscalNC.Value) + End If + If HdnTipoDescuento.Value = "3" And DdlTipoAmortizacionAnticipo.SelectedValue.ToEntero() > 0 Then Timbre.CFDIRelacionados.TipoRelacion = "07" @@ -12466,6 +12438,32 @@ Partial Class Ventas i += 1 Next + 'RMF. faltan impuestos locales + If TmpDTImpuestos IsNot Nothing AndAlso TmpDTImpuestos.FiltraParametros("TipoImpuesto IN (1,3) ").Rows.Count > 0 Then + + For Each DrImpuestosLocales As DataRow In TmpDTImpuestos.FiltraParametros("TipoImpuesto IN (1,3) ").Rows + If DrImpuestosLocales("Importe").ToString().ToDecimal > 0 Then + Dim ret As New CFDIRetencionesLocales With + { + .TasaRetencion = DrImpuestosLocales("Porcentaje").ToString().ToDecimal, + .ImpuestoLocalRetenido = DrImpuestosLocales("ImpuestoLocal").ToString(), + .Importe = DrImpuestosLocales("Importe").ToString().ToDecimal(If(ObjFactura.ConvertirPesos, ObjFactura.TipoCambio, 1)).RoundSQL(2) + } + Timbre.RetencionesLocales.Add(ret) + End If + Next + End If + + If TmpDTImpuestos IsNot Nothing AndAlso TmpDTImpuestos.FiltraParametros("TipoImpuesto = 5").Rows.Count > 0 Then + + For Each DrImpuestosLocales As DataRow In TmpDTImpuestos.FiltraParametros("TipoImpuesto = 5").Rows + If DrImpuestosLocales("Importe").ToString().ToDecimal > 0 Then + Dim ret As New CFDITrasladosLocales With {.TasaTraslado = DrImpuestosLocales("Porcentaje").ToString().ToDecimal, .ImpuestoLocalTraslado = DrImpuestosLocales("ImpuestoLocal").ToString(), .Importe = DrImpuestosLocales("Importe").ToString().ToDecimal(If(ObjFactura.ConvertirPesos, ObjFactura.TipoCambio, 1))} + Timbre.TrasladosLocales.Add(ret) + End If + Next + End If + Dim AplicaComercioExteriorSubProyecto As Boolean = True If ChkEmitirComercioExterior.Checked Then From 504257bf256a036356d12cd08e9cdd2403117c82 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Fri, 29 Sep 2023 18:28:38 -0700 Subject: [PATCH 022/100] --Ventas.aspx al preparar el timbre --- Ventas/Ventas.aspx.vb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 09ae15afd..d3ae88ce9 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -12267,19 +12267,19 @@ Partial Class Ventas Timbre.Receptor.NumeroRegistroTributario = "" Timbre.Receptor.UsoCFDI = Obj.ClaveUsoCFDI - Timbre.Comprobante.TipoComprobante = If(ObjFactura.TipoDocto.Contiene("Ing", "Ant"), "I", If(ObjFactura.TipoDocto.Contiene("Egs", "Dev"), "E", "")) + Timbre.Comprobante.TipoComprobante = If(Obj.TipoDocto.Contiene("Ing", "Ant"), "I", If(Obj.TipoDocto.Contiene("Egs", "Dev"), "E", "")) If Timbre.Comprobante.TipoComprobante = "E" Then - If ObjFactura.TipoDocto = "Egs" Then + If Obj.TipoDocto = "Egs" Then Timbre.CFDIRelacionados.TipoRelacion = "01" Timbre.CFDIRelacionados.TipoRelacionTexto = "Nota de Crédito aplicada a Ingreso" End If - If ObjFactura.TipoDocto = "Dev" Then + If Obj.TipoDocto = "Dev" Then Timbre.CFDIRelacionados.TipoRelacion = "03" Timbre.CFDIRelacionados.TipoRelacionTexto = "Devolución aplicada a Ingreso" End If - ObjFactura.CveTipoRelacion = DdlTiposRelacion.SelectedValue.ToEntero() + Obj.CveTipoRelacion = DdlTiposRelacion.SelectedValue.ToEntero() If HdnFolioFiscalNC.Value <> "0" And HdnFolioFiscalNC.Value <> "" Then Timbre.CFDIRelacionados.UUID.Add(HdnFolioFiscalNC.Value) End If ' cuando es refacturacoin es cfdirelacionado, con relacion 04 @@ -12447,7 +12447,7 @@ Partial Class Ventas { .TasaRetencion = DrImpuestosLocales("Porcentaje").ToString().ToDecimal, .ImpuestoLocalRetenido = DrImpuestosLocales("ImpuestoLocal").ToString(), - .Importe = DrImpuestosLocales("Importe").ToString().ToDecimal(If(ObjFactura.ConvertirPesos, ObjFactura.TipoCambio, 1)).RoundSQL(2) + .Importe = DrImpuestosLocales("Importe").ToString().ToDecimal(If(Obj.ConvertirPesos, Obj.TipoCambio, 1)).RoundSQL(2) } Timbre.RetencionesLocales.Add(ret) End If @@ -12458,7 +12458,7 @@ Partial Class Ventas For Each DrImpuestosLocales As DataRow In TmpDTImpuestos.FiltraParametros("TipoImpuesto = 5").Rows If DrImpuestosLocales("Importe").ToString().ToDecimal > 0 Then - Dim ret As New CFDITrasladosLocales With {.TasaTraslado = DrImpuestosLocales("Porcentaje").ToString().ToDecimal, .ImpuestoLocalTraslado = DrImpuestosLocales("ImpuestoLocal").ToString(), .Importe = DrImpuestosLocales("Importe").ToString().ToDecimal(If(ObjFactura.ConvertirPesos, ObjFactura.TipoCambio, 1))} + Dim ret As New CFDITrasladosLocales With {.TasaTraslado = DrImpuestosLocales("Porcentaje").ToString().ToDecimal, .ImpuestoLocalTraslado = DrImpuestosLocales("ImpuestoLocal").ToString(), .Importe = DrImpuestosLocales("Importe").ToString().ToDecimal(If(Obj.ConvertirPesos, Obj.TipoCambio, 1))} Timbre.TrasladosLocales.Add(ret) End If Next From e892fb8840e9e04e5759ad47ca78fac4c9c891d5 Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 29 Sep 2023 18:32:09 -0700 Subject: [PATCH 023/100] =?UTF-8?q?--=20correcci=C3=B3n=20de=20cveproveedo?= =?UTF-8?q?r,=20al=20pago=20con=20deudor=20diverso,=20que=20afectaba=20en?= =?UTF-8?q?=20la=20cuenta=20asignada.=20por=20estar=20el=20cveproveedor=20?= =?UTF-8?q?incorrecto?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Compras/Compras.aspx.vb | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index ebbec4375..082e7289e 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -5323,7 +5323,6 @@ Partial Class Compras_Compras ErrorMovInv = True Exit For End If - Next End If Else @@ -5432,7 +5431,7 @@ Partial Class Compras_Compras End If Case "4" ' Deudores CveProveedorLocal = CveProveedor - CveProveedorConcepto = DdlDeudor.SelectedValue.ToEntero + CveProveedorConcepto = CveProveedor For Each row As GridViewRow In GvDeudores.Rows If row.FCCheckBox("Chk").Checked Then CveIE = row.DataKey("CveIE").ToString.ToEntero @@ -5444,7 +5443,7 @@ Partial Class Compras_Compras CveConceptoAfectacion = 37 Case "5" ' Acreedores CveProveedorLocal = CveProveedor - CveProveedorConcepto = DdlAcreedor.SelectedValue.ToEntero + CveProveedorConcepto = CveProveedor ' DdlAcreedor.SelectedValue.ToEntero CveConceptoAfectacion = 41 CveIE = If(DdlAcreedorDetalle.SelectedValue.ToEntero = -2, -1, DdlAcreedorDetalle.SelectedValue.ToEntero) @@ -17957,8 +17956,8 @@ Partial Class Compras_Compras 'CTA PROVEEDOR Select Case RBLContado.SelectedValue - Case "4" ' Deudores - CveProveedorConcepto = DdlDeudor.SelectedValue.ToEntero + 'Case "4" ' Deudores + ' CveProveedorConcepto = DdlDeudor.SelectedValue.ToEntero Case "5" ' Acreedores CveProveedorConcepto = DdlAcreedor.SelectedValue.ToEntero Case Else ' Proveedores - F y E - Doctos @@ -18593,7 +18592,7 @@ Partial Class Compras_Compras Dim CveProveedorSucursal As Integer = -1 Dim CveProveedorContacto As Integer = -1 Dim Retorno As Boolean = True - Dim CveProveedor As Integer = -1 + Dim tCveProveedor As Integer = -1 Dim GeneraReq As Boolean = False Dim IDPoliza As Integer = 0 @@ -18714,8 +18713,8 @@ Partial Class Compras_Compras Fecha = TxtFecha.Text.ToDate SerieFolio = $"OC: {DrDiferencias("FolioOC").ToString}" - CveProveedor = DrDiferencias("CveProveedor").ToString.ToEntero - ProveedorNombre = GlobalDTCompProveedores(UsuarioActual.CveEmpresa).FiltroPrimeroValor("RazonSocial", $"CveProveedor = {CveProveedor}").ToString + tCveProveedor = DrDiferencias("CveProveedor").ToString.ToEntero + ProveedorNombre = GlobalDTCompProveedores(UsuarioActual.CveEmpresa).FiltroPrimeroValor("RazonSocial", $"CveProveedor = {tCveProveedor}").ToString Dim ConceptoPartida As String = String.Format("{0} OC: {1} Inv: {2}", ProveedorNombre, DrDiferencias("FolioOC"), DrDiferencias("FolioAlmacen")) ConceptoSalida = DrDiferencias("ConceptoSalida").ToString.ToEntero From 32805cb0a551b928b5494f1a31d78c9e2c6c771b Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 29 Sep 2023 18:32:45 -0700 Subject: [PATCH 024/100] -- option explicit --- Ventas/Clientes.aspx.vb | 96 ++++++++++++++++------------------------- 1 file changed, 37 insertions(+), 59 deletions(-) diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index 8da6672c9..b524a99e2 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -981,10 +981,7 @@ Partial Class Clientes DdlClasificacion.DataBind() DdlClasificacion.Items.Insert(0, New ListItem("Seleccione", "-1")) UpDatos.Update() - End Sub - - - + End Sub Private Sub CargaEstados(Optional ClaveSATPais As String = "MEX") DdlEstadoSAT.Items.Clear() @@ -1161,7 +1158,7 @@ Partial Class Clientes Private Sub CargaDdlCuentasContables(Ddl As DropDownList, Optional CveFuncionalidad As Integer = -1) Dim ObjContabilidad As New ClsContPAQi(UsuarioActual.Empresa) If ObjContabilidad.GetCuentasRecursiva(CveFuncionalidad, 1) Then - Dim Seleccionado = Ddl.SelectedValue + Dim Seleccionado As String = Ddl.SelectedValue Ddl.Items.Clear() Ddl.Items.Add(New ListItem("Seleccione", "0")) Ddl.DataSource = ObjContabilidad.DtResultados @@ -2559,10 +2556,9 @@ Partial Class Clientes ' ObjContaAC.Dispose() 'End If - - Dim CodigoCuentaAltaCompaq As String = "" - Dim NombreCuentaCuentaAltaCompaq As String = "" - Dim IdCuentaAltaCompaq As Integer = -1 + 'Dim CodigoCuentaAltaCompaq As String = "" + 'Dim NombreCuentaCuentaAltaCompaq As String = "" + 'Dim IdCuentaAltaCompaq As Integer = -1 'Si tiene contabilizacion automatica y la funcionalidad de carga cuenta automatica o UsaAC le agregamos automaticamente una cuenta al cliente 'If UsuarioActual.Empresa.Funcionalidad(211).ToEntero() > 0 AndAlso (UsuarioActual.Empresa.Funcionalidad(200).ToEntero() > 0 Or UsuarioActual.Empresa.UsaAC) AndAlso DdlCtaContableClientes.SelectedValue.ToEntero() < 1 Then ' If Not AgregarCuentaContable(BtnActivaRegistroClientes, DdlCtaContableClientes, CodigoCuentaAltaCompaq, NombreCuentaCuentaAltaCompaq, IdCuentaAltaCompaq) Then @@ -2721,7 +2717,7 @@ Partial Class Clientes If EstatusAnteriorCliente <> ChkEstado.Checked Then Dim DTVendedor As New DataTable - DTVendedor = GlobalDTVendedores(UsuarioActual.Empresa.CveEmpresa).FiltraParametros(" CveVendedor = " & DdlVendedor.SelectedValue.ToEntero()) + DTVendedor = GlobalDTVendedores(UsuarioActual.Empresa.CveEmpresa).FiltraParametros(" CveVendedor = " & DdlVendedor.SelectedValue) Dim ObjVendedores As New ClsVtaVendedores Dim DtVendedores As DataTable = Nothing @@ -2757,14 +2753,11 @@ Partial Class Clientes MandaCorreo(Asunto, Para + "", SBBody.ToString()) End If End If - End If - CargaHistorial() CargaDatos() UpDatos.Update() UpnHistorial.Update() - End If End If ObjClientes.Dispose() @@ -2920,7 +2913,7 @@ Partial Class Clientes If UsuarioActual.TienePermisoProceso(247) Then If CType(sender, GridView).ID = "GVAnticipos" And e.Row.DBCampo("CveVenta").ToEntero() > 0 And e.Row.DBCampo("Tipo") = "NC" Then - Dim Parametros = Encripta($"CveVenta={e.Row.DBCampo("CveVenta").ToEntero()}&SerieFolio={e.Row.DBCampo("Folio")}&CveMoneda={e.Row.DBCampo("CveMoneda")}&CveCliente={CveCliente}&Saldo={e.Row.DBCampo("Saldo")}&Original={e.Row.DBCampo("Original")}&CvePrePoliza={e.Row.DBCampo("CvePrePoliza")}") + Dim Parametros As String = Encripta($"CveVenta={e.Row.DBCampo("CveVenta").ToEntero()}&SerieFolio={e.Row.DBCampo("Folio")}&CveMoneda={e.Row.DBCampo("CveMoneda")}&CveCliente={CveCliente}&Saldo={e.Row.DBCampo("Saldo")}&Original={e.Row.DBCampo("Original")}&CvePrePoliza={e.Row.DBCampo("CvePrePoliza")}") e.Row.FCHyperLink("HLDevolverDinero").Visible = True e.Row.FCHyperLink("HLDevolverDinero").NavigateUrl = $"/Bancos/IE.aspx?Opcion=DevDinV&P={Parametros}" End If @@ -3481,7 +3474,7 @@ Partial Class Clientes ' AGREGA PERMISO A MODULO PORTALCLIENTE If ObjUsuario.UpdateUsuariosModulos(CveUsr, 1101, True, UsuarioActual.CveUsuario) Then 'AGREGAMOS PERMISOS A ADMIN - For Each permiso In Permisos + For Each permiso As Integer In Permisos If Not ObjUsuario.UpdateUsuariosProcesos(CveUsr, permiso, True, UsuarioActual.CveUsuario) Then ErrorUsuario = True Exit For @@ -3502,7 +3495,7 @@ Partial Class Clientes If ObjUsuario.UpdateUsuarioPortal(Usuario, "Admin", CorreoUsuario, True, ContraseñaPredeterminadaEncriptada, CveCliente, -1, CveUsr, UsuarioActual.CveUsuario) Then 'ACTUALIZAMOS PERMISOS A ADMIN - For Each permiso In Permisos + For Each permiso As Integer In Permisos If Not ObjUsuario.UpdateUsuariosProcesos(CveUsr, permiso, True, UsuarioActual.CveUsuario) Then ErrorUsuario = True Exit For @@ -3916,16 +3909,14 @@ Partial Class Clientes Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/RepClientesCxC.rpt", UsuarioActual.Empresa.Ruta)) Dim RutaReporteGrales As New System.IO.FileInfo($"{DirectorioEmpresas}Grales\Formatos\RepClientesCxC.rpt") - - Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png") 'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) 'OBTENEMOS LOS DATOS Dim DtCxCFact As DataTable = Nothing - Dim FI = If(TxtFechaInicioCxP.Text = "" Or TxtFechaInicioCxP.Text = "__/__/____", "-1", TxtFechaInicioCxP.Text) - Dim FF = If(TxtFechaFinCxP.Text = "" Or TxtFechaFinCxP.Text = "__/__/____", "-1", TxtFechaFinCxP.Text) + Dim FI As String = If(TxtFechaInicioCxP.Text = "" Or TxtFechaInicioCxP.Text = "__/__/____", "-1", TxtFechaInicioCxP.Text) + Dim FF As String = If(TxtFechaFinCxP.Text = "" Or TxtFechaFinCxP.Text = "__/__/____", "-1", TxtFechaFinCxP.Text) Dim SaldoIngDolares As Double = 0 Dim SaldoIngPesos As Double = 0 @@ -4233,9 +4224,9 @@ Partial Class Clientes Private Sub EnviaCorreo(Liga As String, LigaActivar As String) Try - Dim Para = TxtEmail.Text.Trim - Dim Asunto = "ACTIVACIÓN DEL PORTAL DE CLIENTE" - Dim Usuario = TxtEmail.Text.Trim + Dim Para As String = TxtEmail.Text.Trim + Dim Asunto As String = "ACTIVACIÓN DEL PORTAL DE CLIENTE" + Dim Usuario As String = TxtEmail.Text.Trim Dim SBBody As New StringBuilder 'Linia de estilos @@ -6036,24 +6027,24 @@ Partial Class Clientes Private Sub CargarArchivo(Ruta As String, FileName As String, Tipo As String) Dim dt As New DataTable Dim Conexion As Odbc.OdbcConnection = Nothing - Dim ErrorArchivo = False + Dim ErrorArchivo As Boolean = False Try Select Case Tipo Case "CSV" Conexion = New Odbc.OdbcConnection("Driver={Microsoft Access Text Driver (*.txt, *.csv)};Dbq=" + Ruta + ";Extensions=asc,csv,tab,txt;") Conexion.Open() - Dim cmd = Conexion.CreateCommand() + Dim cmd As Odbc.OdbcCommand = Conexion.CreateCommand() cmd.CommandType = CommandType.Text cmd.CommandText = $"SELECT * FROM [{FileName}]" - Dim DataAdapter = New Odbc.OdbcDataAdapter(cmd) + Dim DataAdapter As New Odbc.OdbcDataAdapter(cmd) DataAdapter.Fill(dt) Case "EXCEL" Conexion = New Odbc.OdbcConnection("Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=" + Ruta + FileName + ";") Conexion.Open() - Dim cmd = Conexion.CreateCommand() + Dim cmd As Odbc.OdbcCommand = Conexion.CreateCommand() cmd.CommandType = CommandType.Text cmd.CommandText = "SELECT * FROM [Hoja1$]" - Dim DataAdapter = New Odbc.OdbcDataAdapter(cmd) + Dim DataAdapter As New Odbc.OdbcDataAdapter(cmd) DataAdapter.Fill(dt) Case Else Alert("El archivo no tiene el formato correcto", TipoMensaje.MsgError) @@ -6113,8 +6104,8 @@ Partial Class Clientes Private Sub EnviaCorreo2(Liga As String, LigaActivar As String) Try - Dim Para = TxtCorreoUsuarioPortal.Text.Trim - Dim Asunto = "ACTIVACIÓN DEL PORTAL DE CLIENTE" + Dim Para As String = TxtCorreoUsuarioPortal.Text.Trim + Dim Asunto As String = "ACTIVACIÓN DEL PORTAL DE CLIENTE" Dim SBBody As New StringBuilder 'Linia de estilos SBBody.Append("") @@ -6189,15 +6180,15 @@ Partial Class Clientes End Sub Protected Sub BtnCobranzaSMS_Click(sender As Object, e As EventArgs) - Dim Telefono = CobranzaTelefono + Dim Telefono As String = CobranzaTelefono If Telefono.Length <> 10 Then Alert("El telefono de cobranza no tiene el formato correcto y es necesario.", TipoMensaje.MsgAdvertencia) Exit Sub End If Dim DtCxC As DataTable - Dim FI = If(TxtFechaInicioCxP.Text = "" Or TxtFechaInicioCxP.Text = "__/__/____", "-1", TxtFechaInicioCxP.Text) - Dim FF = If(TxtFechaFinCxP.Text = "" Or TxtFechaFinCxP.Text = "__/__/____", "-1", TxtFechaFinCxP.Text) + Dim FI As String = If(TxtFechaInicioCxP.Text = "" Or TxtFechaInicioCxP.Text = "__/__/____", "-1", TxtFechaInicioCxP.Text) + Dim FF As String = If(TxtFechaFinCxP.Text = "" Or TxtFechaFinCxP.Text = "__/__/____", "-1", TxtFechaFinCxP.Text) Dim StrSaldo As String = "" Dim ObjMovtos As New ClsMovimientos() @@ -6217,7 +6208,7 @@ Partial Class Clientes End If If StrSaldo.Length > 0 Then - Dim Mensaje = "" + Dim Mensaje As String = "" Select Case UsuarioActual.CveEmpresa Case 4 Mensaje = $"Cliente de VSH Seguridad su saldo pendiente es de $ {StrSaldo} fecha limite 25/{Now.ToString("MM/yyyy")} llamar al 6622106400 #REFERENCIA {CodigoCliente} " @@ -6238,16 +6229,12 @@ Partial Class Clientes Else Alert("No hay saldo pendiente del cliente. Por lo cual no se envió el mensaje.", TipoMensaje.MsgInformacion) End If - - End Sub #End Region #Region "IMPRIMIR GVHistorial" - - - Protected Sub BtnExcelHistorial_Click(sender As Object, e As EventArgs) + Protected Sub BtnExcelHistorial_Click(sender As Object, e As EventArgs) Dim retorno As Byte() = Nothing Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png") Dim logouri As String = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) @@ -6668,7 +6655,7 @@ Partial Class Clientes Dim params As New List(Of ReportParameter) Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png") - Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + Dim logouri As String = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) params.Add(New ReportParameter("AgrupadoPor", String.Format("Cliente: {0}", TxtNombreComercial.Text))) @@ -7526,8 +7513,6 @@ Partial Class Clientes Else LnkDownLoadDoc.Visible = True ScriptManager.GetCurrent(Me).RegisterPostBackControl(ImgDownLoadFormato) - - End If txtFechaLimite.Text = e.Row.DBCampo("FechaLimite").ToString().ToDate().ToString("dd/MM/yyyy") @@ -7568,27 +7553,21 @@ Partial Class Clientes End Sub Public Sub DownLoadFormato_ClickDocumentacion(sender As Object, e As EventArgs) - Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) Dim Adjunto As String = GvRow.DataKey("Adjunto") - If GvRow.DataKey("Documentacion").ToUpper = "Pagaré".ToUpper AndAlso UsuarioActual.CveEmpresa = 140 Then - - - stringDescargaDocumento = UsuarioActual.Empresa.Ruta & "Formatos\Pagaré.docx" - linkDescargaPagare = stringDescargaDocumento + If GvRow.DataKey("Documentacion").ToUpper = "Pagaré".ToUpper AndAlso UsuarioActual.CveEmpresa = 140 Then + + linkDescargaPagare = UsuarioActual.Empresa.Ruta & "Formatos\Pagaré.docx" TxtDireccionAval.Text = "" TxtAval.Text = "" TxtCiudadAval.Text = "" TxtTelefonoAval.Text = "" - RegistraScript("$('#ModalDivPagare').modal('show')") Else - - Dim CveDocumentacion As Integer = GvRow.DataKey("CveDocumentacion").ToString().ToEntero() + 'Dim CveDocumentacion As Integer = GvRow.DataKey("CveDocumentacion").ToString().ToEntero() Dim DocumentacionFormato As String = CveDocumentacion & "_" & GvRow.DataKey("DocumentacionFormato") - DescarFormato(DocumentacionFormato) End If @@ -8784,7 +8763,7 @@ Partial Class Clientes Dim drPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSParametro).FiltroPrimero("") If drPS IsNot Nothing Then - Dim Precio = drPS("Precio").ToString().ToDouble + Dim Precio As Double = drPS("Precio").ToString().ToDouble LbPrecioG.Text = Precio.FormatoNumero() LbPrecioA.Text = ((Precio * TxtPorcentajePS.Text.ToDecimal()) / 100).FormatoNumero() End If @@ -9459,7 +9438,7 @@ Partial Class Clientes ObjFactura.CveUsuario = UsuarioActual.CveUsuario ObjFactura.CveEmpresa = UsuarioActual.CveEmpresa ObjFactura.CveVenta = -1 - ObjFactura.Version = "3.3" + ObjFactura.Version = "4.0" ObjFactura.TipoCambio = 1 ObjFactura.TipoCambioDolares = 0 ObjFactura.ConvertirPesos = False @@ -9570,7 +9549,6 @@ Partial Class Clientes ObjFactura.Timbre.CFDIRelacionados.TipoRelacion = "03" ObjFactura.Timbre.CFDIRelacionados.TipoRelacionTexto = "Devolución aplicada a Ingreso" End If - End If If ObjFactura.TipoDocto.Contiene("Egs", "RNC") Then @@ -9830,10 +9808,10 @@ Partial Class Clientes Dim Url As New Uri(String.Format("{0}api/cliente/GetHistorialVentas?CveCliente={1}&SelectTop={2}&CveClienteSucursal={3}&TipoDocto={4}", "https://localhost:5001/", CveCliente, SelectTop, CveClienteSucursal, "-1")) - Dim response = cliente.GetAsync(Url).Result + Dim response As HttpResponseMessage = cliente.GetAsync(Url).Result If response.StatusCode = 200 Then - Dim json = response.Content.ReadAsStringAsync().Result + Dim json As String = response.Content.ReadAsStringAsync().Result retorno = Newtonsoft.Json.JsonConvert.DeserializeObject(Of DataTable)(json) End If @@ -9865,9 +9843,9 @@ Partial Class Clientes Dim response As HttpResponseMessage = cliente.PostAsync(Url, New StringContent(Parametros.ToString(), Encoding.UTF8, "application/json")).Result If response.StatusCode = 200 Then - Dim json = response.Content.ReadAsStringAsync().Result + Dim json As String = response.Content.ReadAsStringAsync().Result - Dim result = JsonConvert.DeserializeObject(Of MResult)(json) + Dim result As MResult = JsonConvert.DeserializeObject(Of MResult)(json) If result.isSuccess Then From 184cb69f5561670f939290374af3b97329570ad6 Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 29 Sep 2023 18:33:14 -0700 Subject: [PATCH 025/100] -- option explcit --- Ventas/Ventas.aspx.vb | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 09ae15afd..82d98a5aa 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -1,5 +1,6 @@ Option Explicit On Option Strict On +Option Infer On Imports System.Data Imports System.Data.SqlClient @@ -2637,7 +2638,7 @@ Partial Class Ventas ViewState("CveAcercamientoCRM") = Request("CveAcercamientoCRM") Dim cRMService As ICRMService = New CRMService(System.Configuration.ConfigurationManager.ConnectionStrings("Conexion").ConnectionString) - Dim AcercamientoModel As RequestAcercamiento = New RequestAcercamiento(UsuarioActual.CveEmpresa, CveAcercamientoCRM) + Dim AcercamientoModel As New RequestAcercamiento(UsuarioActual.CveEmpresa, CveAcercamientoCRM) Dim objAcercamiento = cRMService.GetAceracamientoCRM(AcercamientoModel) If objAcercamiento.Result.Count > 0 Then @@ -3484,7 +3485,7 @@ Partial Class Ventas If ObjPVenta.DtResultados.Rows.Count > 0 Then CveCorte = ObjPVenta.CveCorte - Dim FechaICorte = ObjPVenta.FechaInicial.Date '.AddDays(-5) + Dim FechaICorte As Date = ObjPVenta.FechaInicial.Date '.AddDays(-5) If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso FechaICorte < Now.Date Then DebeCerrarCorte = True LblMotivoBloqueo.Text = $"Existe un corte del día {FechaICorte.ToString("dd/MM/yyyy")}. Favor de cerrarlo para iniciar un nuevo corte." @@ -3554,17 +3555,17 @@ Partial Class Ventas Dt.Columns.Add("Descripcion", GetType(String)) Dt.Columns.Add("Importe", GetType(Decimal)) - Dim Dr1 = Dt.NewRow + Dim Dr1 As DataRow = Dt.NewRow Dr1("Descripcion") = "Fondo de Caja" Dr1("Importe") = ObjPVenta.DtResultados(0)("ImporteInicial").ToString().ToDouble Dt.Rows.Add(Dr1) - Dim Dr2 = Dt.NewRow + Dim Dr2 As DataRow = Dt.NewRow Dr2("Descripcion") = "Ventas en Efectivo" Dr2("Importe") = ObjPVenta.DtResultados(0)("VentasEfectivo").ToString().ToDouble Dt.Rows.Add(Dr2) - Dim Dr21 = Dt.NewRow + Dim Dr21 As DataRow = Dt.NewRow Dr21("Descripcion") = "Devoluciones" Dr21("Importe") = ObjPVenta.DtResultados(0)("Devoluciones").ToString().ToDouble Dt.Rows.Add(Dr21) @@ -3574,17 +3575,17 @@ Partial Class Ventas 'Dr3("Importe") = ObjPVenta.DtResultados(0)("Propina").ToString().ToDouble 'Dt.Rows.Add(Dr3) - Dim Dr4 = Dt.NewRow + Dim Dr4 As DataRow = Dt.NewRow Dr4("Descripcion") = "Entradas" Dr4("Importe") = ObjPVenta.DtResultados(0)("Ingresado").ToString().ToDouble Dt.Rows.Add(Dr4) - Dim Dr5 = Dt.NewRow + Dim Dr5 As DataRow = Dt.NewRow Dr5("Descripcion") = "Salidas" Dr5("Importe") = ObjPVenta.DtResultados(0)("Retirado").ToString().ToDouble Dt.Rows.Add(Dr5) - Dim Dr6 = Dt.NewRow + Dim Dr6 As DataRow = Dt.NewRow Dr6("Descripcion") = "Total" Dr6("Importe") = Total Dt.Rows.Add(Dr6) @@ -3654,7 +3655,7 @@ Partial Class Ventas If TxtEfectivoEnCaja.Text.Trim <> "" Then If ObjPVenta.UpdateFinalizadoVtaCortes(CveCorte, TxtEfectivoEnCaja.Text.ToDouble, LblDiferenciaCaja.Text.ToDouble, Now, UsuarioActual.CveEmpresa) Then RegistraScript($"window.location.href = '/Compras/PopUpVerFactura.aspx?P={Encripta(String.Format("OP=CORT&CVECORTE={0}&FORMATO={1}", CveCorte, "PDF"))}'", "Imprimir") - Dim Liga = "document.location.href=""/Ventas/Ventas.aspx?CveVenta=-1"";" + Dim Liga As String = "document.location.href=""/Ventas/Ventas.aspx?CveVenta=-1"";" Alert("Se ha cerrado el turno correctamente.", TipoMensaje.MsgInformacion, Liga) End If End If @@ -3666,7 +3667,7 @@ Partial Class Ventas If TxtEfectivoCajaBloqueo.Text.Trim <> "" Then If ObjPVenta.UpdateFinalizadoVtaCortes(CveCorte, TxtEfectivoCajaBloqueo.Text.ToDouble, LblDiferenciaCajaBloqueo.Text.ToDouble, Now, UsuarioActual.CveEmpresa) Then RegistraScript($"window.location.href = '/Compras/PopUpVerFactura.aspx?P={Encripta(String.Format("OP=CORT&CVECORTE={0}&FORMATO={1}", CveCorte, "PDF"))}'", "Imprimir") - Dim Liga = "document.location.href=""/Ventas/Ventas.aspx?CveVenta=-1"";" + Dim Liga As String = "document.location.href=""/Ventas/Ventas.aspx?CveVenta=-1"";" Alert("Se ha cerrado el turno correctamente.", TipoMensaje.MsgInformacion, Liga) End If Else From 5777a04343c59c2630ab2db303bb587b99b15e10 Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 30 Sep 2023 11:37:11 -0700 Subject: [PATCH 026/100] =?UTF-8?q?---=20correci=C3=B3n=20de=20NumeroPedim?= =?UTF-8?q?ento=20cuando=20viene=20por=20OP?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ventas/Ventas.aspx.vb | 1 + 1 file changed, 1 insertion(+) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 66ee61d12..e573663a5 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -2686,6 +2686,7 @@ Partial Class Ventas TmpDT.Columns.Add("AFValorInicial", GetType(Decimal)) TmpDT.Columns.Add("NumTurnos", GetType(Decimal)) TmpDT.Columns("NumTurnos").DefaultValue = 0D + TmpDT.Columns.Add("NumeroPedimento", GetType(String)) GvPS.DataSource = ObjVentas.DtResultados GvPS.DataBind() From 2a9600b3f86cf9bb94ebd27cb3663d0f7f245803 Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 2 Oct 2023 09:51:26 -0700 Subject: [PATCH 027/100] -- funcion nueva NowADS --- App_Code/ClsPaginas.vb | 6 ++++++ App_Code/Empresa.vb | 1 + 2 files changed, 7 insertions(+) diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index a2395629d..1b094493c 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -98,6 +98,12 @@ Public Class ClsPaginas End Try End Set End Property + Public Function NowADS() As DateTime + Dim tHora As Integer = 0 + If UsuarioActual IsNot Nothing AndAlso UsuarioActual.Empresa IsNot Nothing Then tHora = UsuarioActual.Empresa.UTCHora + Return If(tHora <> 0, Now.ToUniversalTime.AddHours(tHora), Now) + End Function + #End Region #Region "GlobalDTs" diff --git a/App_Code/Empresa.vb b/App_Code/Empresa.vb index f1fa5817d..f99639f53 100644 --- a/App_Code/Empresa.vb +++ b/App_Code/Empresa.vb @@ -134,6 +134,7 @@ Public Class Empresa Public Property FielPassword As String Public Property FielPFX As String Public Property AsuntoPlantillaMailVentaCotizacion As String + Public Property UTCHora As Integer Public Property PlantillaMailVentaCotizacion As String Dim Funcionalidades As HybridDictionary 'HybridDictionary, no se puede serializar, por eso no es propiedad, y se utilizar el setfuncionalidad, para asignarle valor From 57d034edbb53c698e135f091e905dc9bc8034fe3 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Mon, 2 Oct 2023 11:04:39 -0700 Subject: [PATCH 028/100] Rep complementos de pago mensajes de longitud de cuenta de cliente --- Bancos/RepComplementoPago.aspx.vb | 30 +++++++++++--------- Empresas/119/Formatos/RepIVAAcreditable.rpt | Bin 131072 -> 131072 bytes RH/Personal.aspx | 2 +- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/Bancos/RepComplementoPago.aspx.vb b/Bancos/RepComplementoPago.aspx.vb index 603e2c53b..92e996f75 100644 --- a/Bancos/RepComplementoPago.aspx.vb +++ b/Bancos/RepComplementoPago.aspx.vb @@ -218,6 +218,7 @@ Partial Class Bancos_RepComplementoPago e.Row.ForeColor = Drawing.Color.Red e.Row.FCCheckBox("Chk").Enabled = False e.Row.FCCheckBox("Chk").ToolTip = Mensaje + e.Row.Attributes.Add("title", Mensaje) End If Else @@ -341,57 +342,58 @@ Partial Class Bancos_RepComplementoPago ' no tiene restricciones Case "2" If CuentaPago <> "" AndAlso Not CuentaPago.Length.Contiene(11, 18) Then - Mensaje = "La cuenta ordenante no cumple con el formato esperado." + Mensaje = "La cuenta ordenante no cumple con el formato esperado. El tamaño debe de ser de 11 o 18 caracteres." End If If CuentaBeneficiario <> "" AndAlso Not (CuentaBeneficiario.Length.Contiene(10, 11, 15, 16, 18, 50)) Then - Mensaje = $"{Mensaje} La Cuenta Beneficiario no cumple con el formato esperado." + Mensaje = $"{Mensaje} La Cuenta Beneficiario no cumple con el formato esperado. El tamaño debe de ser de 10, 11, 15, 16, 18 o 50 caracteres." End If Case "3" - If CuentaPago <> "" AndAlso Not CuentaPago.Length.Contiene(10, 16, 18) Then - Mensaje = "La cuenta ordenante no cumple con el formato esperado." + If CuentaPago <> "" AndAlso Not CuentaPago.Length.Contiene(10, 16, 18) Then + + Mensaje = "La cuenta ordenante no cumple con el formato esperado. El tamaño debe de ser de caracteres." End If If CuentaBeneficiario <> "" AndAlso Not (CuentaBeneficiario.Length.Contiene(10, 18)) Then - Mensaje = $"{Mensaje} La Cuenta Beneficiario no cumple con el formato esperado." + Mensaje = $"{Mensaje} La Cuenta Beneficiario no cumple con el formato esperado. El tamaño debe de ser de 10 o 18 caracteres." End If Case "4" If CuentaPago <> "" AndAlso Not CuentaPago.Length.Contiene(16) Then - Mensaje = "La cuenta ordenante no cumple con el formato esperado." + Mensaje = "La cuenta ordenante no cumple con el formato esperado. El tamaño debe de ser de 16 caracteres." End If If CuentaBeneficiario <> "" AndAlso Not (CuentaBeneficiario.Length.Contiene(10, 11, 15, 16, 18, 50)) Then - Mensaje = $"{Mensaje} La Cuenta Beneficiario no cumple con el formato esperado." + Mensaje = $"{Mensaje} La Cuenta Beneficiario no cumple con el formato esperado. El tamaño debe de ser de 10, 11, 15, 16, 18 o 50 caracteres." End If Case "5" If CuentaPago <> "" AndAlso Not CuentaPago.Length.Contiene(10, 11, 15, 16, 18, 50) Then - Mensaje = "La cuenta ordenante no cumple con el formato esperado." + Mensaje = "La cuenta ordenante no cumple con el formato esperado. El tamaño debe de ser de 10, 11, 15, 16, 18 o 50 caracteres." End If If CuentaBeneficiario <> "" AndAlso Not (CuentaBeneficiario.Length.Contiene(10, 11, 15, 16, 18, 50)) Then - Mensaje = $"{Mensaje} La Cuenta Beneficiario no cumple con el formato esperado." + Mensaje = $"{Mensaje} La Cuenta Beneficiario no cumple con el formato esperado. El tamaño debe de ser de 10, 11, 15, 16, 18 o 50 caracteres." End If Case "6" If CuentaPago <> "" AndAlso Not CuentaPago.Length.Contiene(10) Then - Mensaje = "La cuenta ordenante no cumple con el formato esperado." + Mensaje = "La cuenta ordenante no cumple con el formato esperado. El tamaño debe de ser de 10 caracteres." End If CuentaBeneficiario = "" Case "28" If CuentaPago <> "" AndAlso Not CuentaPago.Length.Contiene(16) Then - Mensaje = "La cuenta ordenante no cumple con el formato esperado." + Mensaje = "La cuenta ordenante no cumple con el formato esperado. El tamaño debe de ser de 16 caracteres." End If If CuentaBeneficiario <> "" AndAlso Not (CuentaBeneficiario.Length.Contiene(10, 11, 15, 16, 18, 50)) Then - Mensaje = $"{Mensaje} La Cuenta Beneficiario no cumple con el formato esperado." + Mensaje = $"{Mensaje} La Cuenta Beneficiario no cumple con el formato esperado. El tamaño debe de ser de 10, 11, 15, 16, 18 o 50 caracteres." End If Case "29" If CuentaPago <> "" AndAlso Not CuentaPago.Length.Contiene(15, 16) Then - Mensaje = "La cuenta ordenante no cumple con el formato esperado." + Mensaje = "La cuenta ordenante no cumple con el formato esperado. El tamaño debe de ser de 15 o 16 caracteres." End If If CuentaBeneficiario <> "" AndAlso Not (CuentaBeneficiario.Length.Contiene(10, 11, 15, 16, 18, 50)) Then - Mensaje = $"{Mensaje} La Cuenta Beneficiario no cumple con el formato esperado." + Mensaje = $"{Mensaje} La Cuenta Beneficiario no cumple con el formato esperado. El tamaño debe de ser de 10, 11, 15, 16, 18 o 50 caracteres." End If Case Else Mensaje = "Forma de Pago no valida, no tiene una forma de pago SAT" diff --git a/Empresas/119/Formatos/RepIVAAcreditable.rpt b/Empresas/119/Formatos/RepIVAAcreditable.rpt index 1a6a8b78ba144478d952717d5119e5f9bd298a9a..384b35d05c52f5ce525a9eed280bbe9640230d09 100644 GIT binary patch delta 12195 zcmV;UFI>=ofCzwq2#_!#_y7O^0000001yBG`~Uy|0RR91{{R2~00000`Tzg``LR*| z0T4*l?4($>h_j~oZ)5lrPzJML0rulDU_!LkE|NcL>YflewqKxkC zdPRAE=^mNMCyXVE`bijA zrsfAe$sozL9&0dqo_%JslhYwny{DeYjp%akUKb?zDAUCW+`u^{bPC=^R-TrB6Ve_` zvNC-SGcSgSCGOgjdv%aW3R6#q!*iVAi#$XDOg>mX7uHXH$Yo7 z59z4Nowo$CC_k)qRGqwN331}5_aI*YX#x7{Q^8GuLo?F<^$~Youb6HOd_&og&9OCxi7|Jd*}`)R@_BKxFM@mIxK!S3RJVhp)HG$#hJION z(W-zfam zEdJQvxk@fy!k$EmD^7;Cy$Tc*n1QG(v3bWPT7xAJQ8VG6MjX=vr1M-2an1Hz&(R9} zuv5b!59Q)=ny~)+DCSl02N#E*Yr{``qXa$6-(P(-$Uw=3ZlVvGQM@mS{z$$uh7_yR1}^)d}&ol7KM}*S8}BE$(!u=x%bCH z4jAS52%1Lq%Q5Rio>C9srIJSS@N^$VYf#!Ym><4k5 zuP8HwNiL6Jex7!*+MA*yxlClNamqwR!)BCiuV+0cF{U}mer-gBmW(NOpBj~GWL`}p zLBcHFz){Vwl6jQS*oUY+f&6tEsud3;umlLD2^kh-uJf0lrRS%n8_=vab7_IVPx?D} zYiw=SvzL^jQD(t^wK@R@{H$B3<>e}#VsWl4(a_%N@9qOWc{Vmh^+)e*${*xV5$eB2 zQa#lP{v*f90y~GITstriVd$aIe+%&lNR~=v$p#mKXHKdR7=63i2aeUVrFmw*g?-Q z`lx@6pHj_pSGAF3=IEOudK|oIzaUO%G2y@F3-*WLXTAb(0YhD+x>^c$1=ehS-Zd66 znznyf9;y=Qx&D*jy>uh2(SFt1wD6y3XJnHv@`ld;`D*5yp|xhx$Lr#T0yRC_y-W6@^JcfJThDcx|9p)=EI=!I2l zcys|su4DI-5_iLI;^hZQE`dG4JJ|3`;t7_ftbYJZ4XE>Ek`{>cwewC|aAzmEF?+f7 z6;1^P87ZVP&N=lAnN2mg4aNBWS0!5^IuhphT{ppZW?aBBZf_+?$)6pU<=!MrLYT=f zfvb=o3k)C03OW!x0U&`-OL&%WYrx1c1hv*sfxzCCc zKz}=d*e8OyiNgG?q*13haUm5d#kQin@!F0rPc9m;j)UpLCBg%>LUw=;t1BSbKJ=04ofEkGI%$4A1_klnjM>M+T z-z%u;l+vN4rI$xNbLs-rvY4@BcWwx5s}lnTW=8l_1pZ0xLyV{6A~FW-#vz%os%JB) z%z?<{AR#U$o64V_$i4OKT;3w6S{zUFR!ff&!D`tHc}F1Hht<-g#GA_H;LpVCJAda~ zU!d^7J!f$*gTve5OsaZ9t(FArx+;1BKCX!Y>4$(csIH|8_XBb_?ZupbC=LFQ%6yQY z5;&8F8w+p24LFJf844C2FBmhtxc_YIazHTEzW0vDLtZ1G)w%gm*n*(2CDZ8{Q;@Wy zm57aSlZ4a`aWo%CUB)_?U930Q1%Y}2TT&e%9QePF2_9V=D*T&G1|W> zqu?bCv^`qk1(C{ddYiy~9s2w8`@jwe8) zp8p#p>unR{kpOzAHmHVv*&DL_up=EibV>PXo?#SAdc4c~3j-?jn@k=pP!ndhA+x?` zdG&#9Lk?AmSh4}N{emlA*~CI6g)|=TgE6eR^nc*U?j>}-Fq@53 z-9N3;asgpO=P@uy)!$zy3L~SjkAEtaoz8A7AXKbXKib2UjI_ zUox({efVB8m9E+}n0)X@G?a`&-JL)DZia^T6*TyigD0$^^u1krR`<%mz5ha}@laSA zW2L}P85=QGK7aVMS+>dizEI>u3ySUaLHWe2GjPQ~t^DQ14}G7p%Y59b8~*`6wRYkw z1Sg_5bOjhvi5ZzY#?8y4QU#B=zH{2<3(5G3~NdMx&64q7t+DfCxg@ox(& zLtg3cOv5y0u@!Fr0z>v-AWS~Kd&J^_zUM%^5p6|8Jbwe%(XNjZ-x$vz2NC{ER09WE z<-Q*w!%P`REV=%QIh5W(*z?tEO#)Mowbm(#yos5SCH2`Q;dD!}%rOA0GzrDPnS#ra z%`&J^;^zMO{)fi5SKO0pvL9EOiWW#iG*5(Jfn;ZPquGi2*%bQwo@X>B`k0MkbwWK# zfv0w=cz;**8XIH0-h<%-)jlB}E|q9jP-!*}_sB5dJGmueIui^uyb=ynr)c6!QROaM z+^hZ>HJAnA0L7>r)}y})vwC=BN0NWMquy}Vvt zaYHKKSw2{$090Ce;tUFMCGdR@G$F^(K0BM*T$PgC<(X-TaPTFyFK1trGP7JEqWzjX z-hbZBVLmb$>Ay6kvkc7#H{(~0YdkHH^wqcD|DIxFa7Vk{DbJ{|6Fgpxdo`f8`J z2TJEP$M(JXUr0E;QL(QIk#^ARdna-{1%KkN2U%|&6LPuW`=Lq~*w!A3W9r+g#(*z1FRqTP2saDwU_wmZT!rz~C4&)NBejo%hSg5g0_n;-{ z^8$qd_EPy}`N-C1Jd(NT3nDhstU}MqA>SN8be57u1GZg#GR%dV?E6-ZHrtgP)f0v^ z9D=fdIvSULV4sc4VdQOZ8sXiBCVz@-Y~lvMU*!s%Vu?paqb9+C_i~THA!DvxT+q$8 z90yi(ps|<6(%CnseAC(tVeZWalo+cGt(-)f&C-QA@^J;-B6*>#Jf$w{$_{0yep8JeTBd zI{>dyJ#MgqJKJK+MQ~7cy2sQYZ)M)2W=XG0qIRqU=mAG~@-+xURLO*K@F{o@d42J7cgOBm*0#Kj zbc~cab=1^NR1n@+e?RdZ9A)M1hB5MNRR*PTR;NUaoor8%u=46ljuI9Y!U1im!3eSZNk*$-;|i8nrq zY{p4D&J?V}JdRHjfzRw4?@GWR^WyF9c{uSH!q9l#!e=aBoes?$*X>GwxyPIUnc33l871 z-hd}*EM6xScDE@7=6^H?at;Jbb5HTU0JmBDx4c{zN%qwJyCN(C8_68SP*%e#9I*Z7 zA5lN$ye25_DGQ>wr&5SD_>7bdl^j9)`r|^XrU^puYY>huJ*vj-P#{Dy86zq^3ija! z8kM-e-`Fa+zu`ncYN?AksRvzpuk_w*g%!?Zhf+Yp_V)u=f`86NK1;2mF&FOcMRlcU zU9s)CVcvaE)P*^2bsYJ#VR2&7miTRk@6HNkKZw9hFm=fe?vVjFjW40Bh-_@PjUq#S zY-Yo-9hU4w{qGwRm^B>6G-Deef9Uo}%UGAg1s;!6L5F-z>qQW!##D?pWFT9R z2Pd`bX;_SXh^8v3K)dEc!N+p^dcL}FxiTF&WY*TgN z&W4{>$W#IE0$RyF;y6w!(UQwfHRi-B?8v8g)i5D}f1DGvX?k>+Qodw+`e2z^f8aCW z*W+eCU$-LPKATIU&43XMTvj-Qf9ht1x|8}OTIz7xchZNFH`^u~3u}Sf#D0neq=g-< zac-vRn}KZ{Wpos{g~)!FbtHMb@L;83h`*T8S#O%;cIJkpEKD#CSfMr!zM+%bZV%oK z=!~RjS!+Xi1^{#XR9F?X(CYHle}G|({RUtMEe9Zp!U@JZ;MCLBQdL~xbT!tpzPUP> zf%Ph_A36Ny2k@3k=cwlo1n!^;tOLd9u;t7hTkLtE_jr4Zl4a?wHM`6Pijt=$k54}! zt;bLC1&qns3X#y2aRcW^Lxo9K4~3l}+qIHXQnwFv#Rh6e+b6#=-gc8tf2Bx>b>tM@ zi9l%;vb%AbyQJ{O>}&B$OX;!X#_N^iyRi$SgMig8pC&ZIt;JtJ4)=={XDWDnn_M7` z^j4^!kB-2L?Cv+{Pr@)u(mc*ac}h6YVFJ3sTuYL>Sm$6pfOmyNac6r;taC@VVUJkT zUB^Uz7+aY`tj_AasKSTR1TJ^MprRNGf3tOeS+?>W)bqdhlFHBCP7R09--&*MCfXm9 z8=f9=9%*%V+~is=b8J8)0LNu%02Zld99LvqrxPr2_&TS8;#e^v6=nY;Apb>swxh3YQb}X_p$OOyLbbC_?og(@oon%PG~Ie_{eu z%Ng@Bmy`b@?ot-prJv2bZ-x_*prcD3m9pQEFLjQG??ifq7y4m0;~eRKk!z&th=O4+ zo|(H78vW$hIjX=f$Lb_~LBLc0<39Bx?i77S zYa8ykqF~(OeTCxRQ!~YD)6|o@f2}2ohRt*waam9tIhsF|m}`fp7Sc}vRf<1z$6>?K zsTZfc0;{Bl{_`cPiP*{2L+~?U8?wEZivo~d-P6P>OUW-RKSdhO8pD1wk0eh6**|n& zDr^T%*&aBE@l7FQsX)ar8S*gWV7H4J34h>`d}+AI7Ui$b%_1WOgV-{@e?ELXsn&a$ zD!REE`A8LjpP^8)k(>atABQhA<$l)~R1#brB}gDsDL)mhZ?Ltq>lH_RXWy;4=1wf5 z+)&18k@HBnsCX3HRDPXfKm_>Skn@1*85z;f^^qhPvS^Frk(6_dQTa@IkxmF9HQ`jU z)V=aPxvSyz6V){0Fz+? zB!VoqECFn$25?M7(BSWva?$~Y0%0Pz`qBXg1Aj}j=u&f!TB0~guFfpJKkMU0P;L

    9Dtkh{_cj`yfnt^6-5&HSw z`KyGIM*UjM^ZpJPZy{#<*&VIHhVyc3K!18eyyhrG8tVyDvG(L`^#Y6cFHpEypaPCF z2+~_nCka{zA1&+BCjdXxQQmnKlHCDZ1l(J7p<()j8(w)rOtMHXtr)(_gzJu>>U7il zB`lz-lT?I^kk$x-u);%@tt||+@MV7LJZyOB)r2i}@R&b^e$?80IRhJCFE@Jl z(e^2E^NLf$8n#a&a6ab6dKHWGOkR@*N~efnilrTdxB0iwxM&UXpj>=+pY+Z`LN2)K zBd&0eD>mc9A{QoCKJFq$4W?_s8-GXzCoIG9TTnRJEl=2v=5I{4*v$@|Kgci*;pt5H zRNNXOA5KAN__ak?t2f&^il85M+RTVPWq8MoYJgovS>3(t(Ph>(vXCCMk&)!aaynL! z|HX;Au?m@3jT)8@Ht!C+y}LOYL5)C~=6~~$<@w-^n=N$dnuPc0vPsZ^s(+AhTp0K` zH%|f9fQI#Slmr^&6Ji)lB-kdg>PeI4p=#9f%mPQr=WSgwooa5*(Ul&Cs3%_E6a@Hx zh_}UW-0;YtxM^Y7TTSv;lI_t)F^3MwalL;VF}~hrhUM9}id3|m16PA0N9ejS1ABWY z6IkbxPec z0{xf2-E|`KFuxh@WP=sc{uffO*B;k)IeO^aed3>kv;99kU4qHn|H2qpiYm|h6KK@IDozP-Ayx1 zW`xLat$Z7toV_Z>GJm7+FWngFe9-Ix{obL^t4{zHdsA}Ofc8Upaiq`%KSEOE63So7NSeTzC*|_GZB*;&$Fb#lwb2MNT0n~OyELd_lQ4KKbWbai;L=mnV|?Z$RxsV~q&qoh#8QOG(@R7rrS&Zv$C$YRePKZlf=5j8EzmFsEqC1_{lu2dKu&z(0I$ndF z+JAZ;;ipE}GXW(EjN_u;f=$n?EzQM0gypN}W4H6U1Q6q1Br=Oir!wmL^+)Q!DFvdS z@P@QSjFir0?Fp04l3f33ZPpx3vW%tFBcZ0e&X?jWZ&t3|)JW~dsR3@Gh!sr0EBk~x zl|~+ceAy|~(BRTi?^i02&HOh%UJN%i8h`R_NV~poh|V9EP`@}8 z#hwCwTk%~mS|rA_#76x&vjoW!>rasilT7!iY`(%JoN-+*i3uqhNf46O>*7wx)qk&K zp10@S1JO*f}aCxy@2$GDF~T;+jcM))A0}nyWA^m7U-0z0+$PJonF6z{9h1 z*tPZ~)Ys8>14~~3xcUk)$C63}W9WZhLA?~yE4_5X+ zltk+w0JYtFFVu^@CE|t&x_aU1s(%14Z*5o`ORY^kX=lC3SP7NboMc**H-A5j4oJMT zG>sn&|LukZVPO?yBMFH8R8lDQyr+Fgp-zN>qZvp{r)Zs4B-!Z1;e@Q40g@{vWZz*Gj)!m1_B78SbYhxTpe+adXiTRP^tY0lw5{LLcUe&!bTKhJoUgjgEjNPpc=QW3HVC9$)f zr7U+z4Q@59Zg1%9!T99pu5()m1nNI-yA)4fI)=;OBCHK5Nv5)J?p4N^KEbl0=mdK z!G5A>6xKY#yR3R<{eLA&8+|~9&REVa23Ig8&DEvXKOAQd%;*;_X;;B6%===!$(t%X zk#{dIgT^$PN*<4&7fs6mrxY_%>c|<#v|>I7URI!7(Q^f2yBlT7sD*4|i@>zB?0|WB zA#YU)x57lDHIP+ywwbc0iHcLgdwpGUWzgj>T6N=n!>O1OS$}5I!^2X7ii(AJBzY5o zY?CNE4!~B?$gj=yqPt6!4e%H=vMFoqAU>@(HuXEJ_Ab>6*?$H7e&L{uX1I~WaH_XB zr{9cn_&%-{4AGUiZ0s3>on2;ss-B-yX;{rYTK~?n#DE)6gl0 zFFMBzQE|@OHGcvngE66D-l}l^L~?@#m_Vr}8BDRa*iG|7f<|`SOjUqr<6_S!W4c6Y zARl$>P2l2^H8IU%1A{;xrz3?IHU~beC2gdsCyqan?!fUE#9*$#t_OJRtkt#y=J%8x znD#(2kkF=&f~|oK;IeLgIJ2?5vA~Mzz=;A+Qx+_YLw|JEm19=$kZKwf#%s1Pp=&=; z_{!d|K!da8E3c)A9x=nE3vy4aR7G37nnq$Y762VN$t=kRnrKbDP_WriWCERo$2$VlIk}vBWUl6%0Rc2-dF?NPLrl%bM4mK+l)yuhI(-&~&<}wCt=B!{j$R5o(A1N`& zm}pF1o4ZfeZp^?l4+M_e;Mf;_L|t?zi}jv%oqsMpC>M{&u_0l)4m3qkFH4VSnOf^i^t@T#SGP$Ohlzo9Y!btv)a_u zz4T5gf)2&E69uN`gs{+!O?)p^e*OG-pmmVKdIveSt2r>xlQv&>N7lKZ+4kU1us&LL zZGX}Zr%kVmYeUu7n0zqNVw9M)M@g(TKQ8Vs*xy?M-&wR9b4-S6QAE%L<5drf9O2`n zZr2wC;z5#pygnsC!OV3dSbUd3tjL4)0R^XPIOMp+c}Ap5Y|nQHSXy1>Oe*MAEUS7%W-j+JM%r#}(Rt{SnE%wM?#%w>+H zPH^r6#PW=eb3WxAkeHCxkkumb(a9#$2|R*OFd?<(f!cgbR#T?XxIymKKGMm3ZeE>2 zk{*RvesO6s;>&Is@CQo`_eA^OTCLIybudyhaYnZ{yJRLrBg$W^)hR}jDaZu`jenbC z;J%Yo_=4!no`?I5D>UB4PDydYAdPr?veb-|GWAkgQ5>{xC%A!pUCNyOiDhf|;AJvV zWaXgZ?^gc$GI<-uys2j_saxI>7^6q@vr(aZK&mpcxpZ&bV)a!Y83xk2TCUSFGhr<7 z-5~ThW%yxF*K2zcls5*hxseB&ynj-_b-CR2*NA`dQK$)T$?vYnzvvZw!}1k$7u)hYwW-?OQ0KP~f|so$A2z20*#3S zwY5*JHF3<%VHFJzA;6GYS&UJo*f=Q4NSOWYHxt;xsZGAA3o2sxvTj$IEDbPk=3Un? zb|lr4_Q{(G41lj zci@fDy~71N;g(S+1Y`XfN`FOIrC4=P$c+c*Q^fT`NJpaez~T}9peuYbgr66{PiY3T zPBB3p+cp>#wr!zY7o+H7{HGgmpLs-_Udk(qG3O-@Xe|)ukmIM^9W?{v%k=LmoVA_Bmb;JekfL&Jibrrq zf)DHctP}=@f?xBYc7Jn3V!Z*grCYjA8uhr3?R_%^$Z&dtJo2>N2qdLqgT;E84uMe@ zuqTfZOH5|~^0Q4j1b z8610>9Ojt~mE5GI>+wrmdxP=ChhWJb`sI$sBZSVJ~My5uuTullEt6~rYU3MfXSc}g~GQT}qy0@sh< za~?-_SSt5$wRz3g8!sV9TgC)lXJ*F`#-U{nLqI!>eG|ccHRa}+@wn(qYee12^-sA4`P|S|fP;JopXY4a$PtBuZOVDCqi(TJqgaJ*YlWmnHmb2EVT%nUeaC&QO%0gic*LVg* zagi?30p4e>@G2GncSIku{Wz?Sx61x!DEH3hh*LUTe@t4lNq=a2ud+9pp5&{JC#Lh# zv9?b)i_b=?3wHtb*9gIr*>k`dG!(21u75)-QP6dh?(>*AWUari?sRewxqPFMj3T_G z+42PC1HFe>mSwZpXD0Zi@(d(h(LV}uoFJz;qfjXw;Pk62tO~>*_i>Z`)sNTy>pp1j zjf@#g$qimL_7^e)$SbpMMG`9UG@YF1P+hf}6o(#!733q;tiRcqwpMVOM5YCi&&FAN*lo$uSFa`912Kl2)Mcv0Hc}>a6?B~+rqgTp z`DuFBAc=KFGIqtri-hgaT|TfF#v2b_#%Co+OkP{vBF2P!-Ov`H(=;Fp0DshA8u+h% zO+~_-HNbr(`Aep^1rpi}=bFCIjxxlr*4XJUN3U(M5 zYJSC5%}ZHISWCJb;@iZM6~?c2?NDj%i?~qF$4HEc4DKz0>pl0Xqg8ZT7m*HP_2Mxx zj%8l6HVe+qH{}Pa{0AaSn1B1JRsdl@nvE)i)I6AwN)XBrqu|ikI`&GiXRo-AJAXFZriznDdJElJ zfSFc5Lq?^WubF^Oew9RS&rCrQ#m5rFm8e)Yvjv&P7-h2ZdEc%2IE;-Fn53vE=dI|Y zif{(qZS-bjB79jdZd}Bxw9U~!dQ6RpT4fFHeiwKJAk0#JacmFDX>Yd2mA=jO#oTL# z?Kc{0{2G6Y-j68IAAe8yjP&DTs1vWvYCEDlOu+ZW1r-UrBp#&M6qt&0nn7|izB)(s z2kbX5j)BpuyJ*PbKR9Vz1=XgO+>YiGYPvYRsc_WcN|6;F@Q;&TjE%3KzA&HqBJC<; zsgzg?#2EYTzO4 zYzKABSCoS@Qy-gX_$_I;Y4mswV`WV6@TjSI2K_Y74}xkVL&$3*#)M9Q@lD_aRq?AG zu5*8uc|tC<`+vKI7x2Uec%M=H!tMq8G*DB zFlF?-S5;d@$J#p{v5z7n{YIK|##wymMqnNTs%;kFZZbqe#Fo^Pb%1`b%ouZchqu=! zd|?ws!sSa!$q%n504GNX2)5oJQ_Mnx?z*}fq!p*O4dI^^(vY>a*z5OKuijE)|^%2-MtJ)S1OiV3wG!K08r?z(n?r>g3rB zbf`0x+U7SiHtS(w8I98CIY?DaSs2&%K_jzIFiiqCz8fP?Ex<8494#JixzQF!Z$@lf zI;U#K|9{qbA`|P&P$CUFg9U2^;DzRgIKX=F#;@SU3>=~#AHS~h{|W+>52TO=yUYbI z&J#AJmm&P1v{cw2rqLT%$+K@GlZQU>0y1N8mn7maR+qFg$nlS>O$V!Ou!eTu%cm3;(t6ZPVhQEn zL)c0dH8xn5g*&g5O&T9vFw26$HvO7DwGKE{C%vsL8(k-Q$sqzDm7llj@|VJXP#>mIq=6Z;eQjvCw*mYCp8=Ne0c{MuM$q8z*#QFp006+3dC~!Y l0%0Pz`tSj&0s;M#r7JT5_m|c40V|UPCO`rEw?*^;y9ro)k)i+q delta 12062 zcmZ8{Q*@wRuxxDG_Dr0KZQHhOf3YS`Cbn(cwrxx}v2p)%?tQwwR`u?#*Ir!@T{|EE zCLjPNo{97sywodwgQ6VcGtZ3XwCYSc!}n3_!)G@d zg4KZn|3CZvb)g1w7!Gj3f6sCbvp$r?vJX09mKoevO)MN)VPetL8kYYtJ5r84Kb4YA zNmDxkQ~LNpLz_C8LkK~zP*d;q`G_^HPg?Deg4y;aNP0{qPT_NS97`n=oW6f~Omy)T z>pv7TG?gCdtwdNP2MPT8dIDqEfGyL(KLDU9tu3AT=GJP01Ylj!(Iu$ecwT&I6Tx`D zaG_>4%yd@|JSVUANVFiuaXh-?)3a1314dIr_GRU$?EjO!OqY}}tOM|Xyji02~R<{%L;oE^7!>WY;l!>_q(m4Vam z_1%xZtP+D9Pa7w?TS2E))8~lZSlnXu9+%mTSwU}1IGs2|c${$AGLdhqz3t&|R_rny z!7?q5=R>6?lK^ce_#6#*y`PTu?8ge>u8f{R-8nCRP-fE&f7w@cA)aGb&WbB-17f{K z=~gDRk1rz`&RGd&g#(?J5@cr_ALg*>g_NmU?5zUf>VU&7Y>f3m^nwxvuZr`-3wRgq zj-s&~3KjLGxK~d-FBVm2j7}$0Wv)-#HruW_Y{I;>05D9qx;%aA$k3DVC&`~Sh666w zWdxocEx}rZc~I^Sm19|V)+jRn$Zt-gg45N#gGI|&a5LFwKSyduQYC9GyS~^2Jf&@g zxd6iVU9HZLkyo1%eM9^Qvs(Pka8wQ|vC;+ve`Q3VI;=NuuVeOn*>_DT)H9P_a{!^~ z#OmrAG+?qQ2bFd&sdR{!w4SILJq2wRAUQCuoQ^-_i-T>BWO`GP=7LEv8vHN%5@k?A zUey_2%U==ThiK=(rKGt~7J0?WTjGbqXk@i>QGytoo*~~FstcIJ@m0r*vzCN5f9XX) zt$>$VV(+23zkU`4Tz<|&Q?ETtB~2Cb6kA zUlF$|9Q7qt$xiNGP0z3=XkEtXZwZ`crW6FvQ092k+{A+U1*OPu-P{3sU;Kr8Y}$-n zz%eU8H;Hzibp(EGX_Oc-Z}Ei3?-ym%&^?p`666oF9WO<^8B{&Tg|r{WLgRl99w-i? zeU2w$N%CQ})DU~?JS!Hdy6po=23u2qjUXY~ir?Z1a50t_Dih4E1hIkEwQD3t+(mc@ z)>UK6rmZMck8l*H%?T8%e*Gs75FlV6jW94QpfpS%EdR-b;D6|Y+pzTn`@i*n?f-`0 ze|heRp0DIM$r#oZn3ysKabMAaYh}lZQ6u9^#h{SNQ2JTqz=x}1R+e>yllA2K&#cAy z0*2)ql=}nycE#${j>RI7zJJlfV}5!1pVRkRnCe|%}>jbt%Ve1Q59y? zVeFx!{P#NTCe>dGV4R-1O+8>=4sghGe_Dih2$6i{8(uV;0aLC+M@34iZaW84KFS}+ z&}dxDGGH4JO$>qrCzTc%bi-*;4a@}EFrYj(QWVZL?H{(x39k#|N?8t>W%!CR+X18b zSuwiN+%&$r%n#8wHjck8y$IA?(4CKlM`ThDpvl0&`ENMbq+A-sOQri_rxJ;lD!efm ztxdBQHkH=ifkJ^`oX&&qlM}nZ3P@Pk*vnB>O^63|tuiy1 z##X7*+|S@`hZWW)BT&eC^VfAkgfR}Y9#W883dj~*q4pP)pr11_9odWY7ZDljHbx-D zsGEO#(h;Gz8l*Q;lRP)}31-hU1`RkZ>0v4#P>hQf0JV_3r}r7Ui!Ew@P&G2=_N+4M z96^*u^OFUkWxWlDpk!>CVPw1`TIH)(|6d-ak@&++>A3EOZL=P!a)ia}@&AI`8=#r+ z=1ARD(Vzpq28m?eSFt!g3t-Z=n>G3DNKfx&wvAA12`yGi2Vz8#0A!Xnu-+U?suIAZ)c> zYPQbd!~PC_GpC9Qaa3(Z%F69!^yoicXBS8MG5l{yE^Rh36Spc1nc#cQ4kpOHnI(>T zB11d!Nib^qPMLMmpe)BRcw{4^B5yk5TzoRSfp{@54?7yo4=MHDg(cQLeCj>0XejVi zfc;!c%J=Cv{xu7=lM!V#rb4B0!ncXy(Eesu4p66<+}^q5Le`4=U4nl4uP`3tUV@$G zU`AlCQRNy#O@jzJjI47bDx^zK39VU963YTKn{zL;mLbwRtRp3}`*n7-xy|ZQ7=fSRPOfZkl+JYI$CIB5>R1X1z(#aM zx5xXq_Rjg|FmhSb#?i5PEDUg|?4Ll&a|8=CK&o1aH0DWg%O1@Zdgkpl?@o{c$X#pb zGQ@0_nh7a`X+LAQbG5Q4z}>`An9+X<=R=euWPemGA!R6DGPC|!UC^4=K$zr@ZKUKG zwB0%C7WzagRAv)G3aJy%O`ROYnssBPISEzBWH0u0B=#LGBa$j|+SLT%L z8olFGBoKGHv1INVy5{8&Odfpze$wsT!uInsv-m1+4~V1s-eAF{D;UMKe?z~_>q&=GYXpCGjJ4BkHe+Ov=8T%VW zm9bsxXlNU^C=uSuavnFp(&!Wog)Ap~MfGLG6aW6IV3W{|yi1OdfS(5e&ZqAIiXKqq z;)R{j!WsXA-JZRJZ{3s495*>jGE|y2WC^bxebtlxwa?+`-)ry+A^9u%eifJk=~&_Z zek;#p&mb|8fC>AHrHRrrd#+}TPXhgCy@#H+!?rIWUblv3xQ;UQnYM+M4b*PGiZpYhLVz z5PXI)v(QR&J?%w+FZ@OCcxJL}ZOki{09PHoc?|yWHFmWzxf?JXrjRCTY@)^Rg+l^9 zK7D#-Z&DtHS8f~E-t|M5=-tJ~{x4FTx{%CM2@&Z$H-j;SCcq86M0H!xNJ{n5I+#|1 zM@jE~I=TNaU2u?J)(azYVV@+5PjD080AaKol(awZ5F{zY_HHdM6<$h3_5AHQxn4= zp|?txYyYGQ`y2}p!#dsA?Wonb{h67A{rW61BxODiX80YGqwm!vUt|0EYxqf1R65%) z^!m%kVIi%wqjpkq`>BKgu$s=NPrk$N)Z-}5KF&eUDUGP0$S40eNEvX3|l%5q{g&r(XtGxaA zzc9mDh2(F5N0_mfZADx9ju66o{9hzZ^-~_oU-A_~IH9@4ysmI_{*Ky~umo7`Q?K_7 zca&U#P+CYLTa4P25#!5k7p2xReK$7xB@R}xa^;rJjD6>4|2bn5Qo-+4s-88hmnu5K zyXA*I1i~OAq_WnX_dr^w!@B?U7z$In$Kc=hO@}>jIYz_Vi?10Mp05h)ds1b*NBu4L zFyv6Z_r`|D{P@8q%nZ9g!lV2JvL@cw088ZN2Gh>fom@wCedzu``DhySAa7JC(z|8d zp=U;FO{7S3i?km?MEGEbo{RwfkS_BpX4ig7HatLRJ4_z(bnjpyw>ZzbnWHTVo$W1o z<-gUD*356#bzs3I;0*<-yR44e;}BX1tN-ofsE6=dx0$ZhCI)E9$r zUIWmO!AoBZaP&j%?`g;mO5LG&D>DmC4xtFOl$2V+Np+Sc8pdqsaw~4aHkb*Gy3^^S zI}LyBx#fo>t8AD)hNdM=#upb5-9sj*XbM(5_ZPvvF7& z!aJC>vA%{ypT`A^ZY*6m5*;l?(_c`2A)m4rHp>x__`>&65U2>^s*--i;KQ&3VBreC zb{KK?P1KEUEChAwJntA6{gb7RZ~*YJZbqJIUq)y7Y)G42_sk1qtx3v6@4Z`K_B(*M z2eV0++o~OM#&o(EVi$mn!Ig)(aSTydrHLA3GU>xcV=$6nA?AH!{bAjL zatsz-RJ;q!DE5V=qzsBKn|YD^L;c7Mr|l>1mW>(16D2bt?>eDzLUa)?IaDaJ&Fo^F zS8~-zE)iZJc+5HjwHg~l9R^amS@^lvZ(AS($kXh(bXBoG@|LGwd-^d!CAqWE`C^D3 z%ib{~zC9xw+2`7+P)D>f$W=K~?Kmy=r?l`t-GMa`XI!&N9aB+&ehyYJtm9T-009sI!Z+ zu@{1mwlA1SkF#HH60ctwFul?+L_l$8*%qi8zHel9sR!@psX887jsm(klV-`&JT&2f zxc!luu9HGqaRBk3mtmEuun0A%E&gx_{7P+R1lvxQFB&Dm3-9#aw7gOI!j?bir$cHG zUP{Z{Hqa$F*x7-_RdC;DLbh{LQn4nBNuacx00|jMMGdY_iqUhcVI#pJLbJrhXA4;q z(rZ`LTuMipg1+0Hm9hF&I2U@%(2InNXvesjR+oVkU#Hjf5dVZl3kteCF#WXqtT|lO zN=F#F0Fq2PWoWbicH1I~C(vL1mgt;OvswaY`furHN`aZXHh@XNqRo#fr|^ zsFLq}?`?GEXKcqbG{w8SVm%V74WSy6mGje72eUJ^MZ%iZ;B}eq!DY4gJM_Qqemmav z4i2I{9oah)CWw4~6fZ={KYaVA2Dr zoPX~au87T~KcPW-{ZO63%A5jYR$yhskPmtDQk)GZVQ>ijW=OeGIvXi!Jg@c^e^@gi zBXvJC-1~y`+J6VqB3D3>#I~dS>AVetk0Si$g)7~vgxmGq>h6?2iW~nqi8Uywu^M%G zwO{CJ|KIwl|5Pv(#UDKHB>cq%QDR`1Re%Erm`_@0GoUT0^r7NSHVu`Iox{*f^Zqa? z9dMm`vQK;Wa;KdMx=oAJuGd}du>l72BOBf}k)`SGsD^VrrxA5J;gc3smF^Kclr7%l zjIqRObsV~ckC1#SuSx6NayA1C@!yD@WkDX#g}}b>ja0+s1Nb6CLc)A6rc_`y?`;-< zm~_v&Wm%6ej_{?xu{%x_Hp399T*30eRTS1~i%nAJum!>;Ud8{8xX zJNES@)xV3@4Tk+@`iE3_GeZUMu_+Efq0;&C;7~P|`{Vm^5!ZugL2CMLq;tp*9j(pP zk5qCACaOY_e)K?H%84A^W`RB}w~ZA7vi1PRfH8-EG#AEU#dn9YMG{p(D)el-J&PzsQGbEq%gbrgQjrOrF>NAM|40(WU7 zI?GmC2L?KBFh0Iih(`wl6NMlIBMGq*DUOi#e3|~c6s&{Z6#mcKct>#pm1G1)6ZEs? zC#Y=+lwmXTe{`zz0%#c6I%(_M0w@$X5H2)%{Q$l1{9q*sKNc-?p0zpkVWsjUf(NHk zL()imCKI$J7`a@%sXqMtup z#9(k>M2r%S%j>UGNw~m+1sx@JtG)smaWHmydMD`hW{%L|ma*o;&>Rg_XdE>MXyx2P zU22!QT$^^wfA0n_nyDGENZEc9Qb8>eKjF?hl!IJiRIwl__nE;+w^;(AVkYWb;Y}T9{tAZ7Ka8Me2F-~{ z$@epQEcwfC1S-SC`tEMj4w>j7jw^Zyb=LCkA0AumhM^#`*_>RtA8W-ky|00WAMF`S z<~w6*p=~E9FwETpmQwFoqN1d&0wK20=CEXuN`Vq78W=MC4p;fEdLG;dFq4~g2$`qV zPG$3Bm5w-M<9DQNU@cwS*4_^ay`*CC85NDzWt`=y@my_lhci3IBtx(dkTk9*zqfxO@Sf{^zJ} z?S%LFSE;af!mEPqL(d%~T<&ees7Yjp{%=tSjB^qZ;zPFJn7eI{N>HM;1^JAa&E=v+ zj*0y&8$x#$W1KavND8CwB}369ppBjVv|O+qN44hrJ$0;mPg!@==pYVC^Qtvf74dqxu+`3R(jG z6T|s#U;V{Xx6l&?sC&X`GKAH)JJh`oL_NZbg^VM)!j}816v$K~2YJW;+6CLK49(!~ zJ+9V6w)T66qgmH3Dygv~(PS^R0s@B0tZbe_!H zj)B&j0g~aaI^E%x$AB>oC&avv(`J{#ieh%;%WOZ(>inD;P~!L{^SP6zEGs!a;Q62? zOO2t!Ql=_=)?Jr5un7BN?5I;hIR^RuRHE~aoyM0r6XG$Yk%yW|7`r$eTyxM1?Wshz zcN-n!VD{Fv^@Y75i!^8FUPegsZHw?M>+<$jX>)ZQ?VNP6(^(?}ktr=SxQ<2!)kHZR z>3Otm^AT?buu&}t(i#9=&{%^6q*o@jW5JBB@d($C2>Podo)oVbFLJjmmSxy!2$F6B zR;_-Y$@+ld%0b82#1(k8f-E3}`kJVmY2w4ktKxoP=Bc@pjONmC?zKZ5KgxQzq7c?r zxI&Rb8!fWo>b4{}9wyxAnu}=Vr0neRp$ra|h3;7ZTa)4`QDmQ&h6TQ|+z zoyEco`Tm%8-GppzQUWoM8|$ITX<2l8VKA}8MZUpm$K_wgx3M-&?QM=Ac6L%)A+&N3 zx)AhZ)Twn95K7h2WA+cZHeAkztSFdfY$_KS+GNAryi(Ev0VI1};oZ_U>iInr_|nF` zI>yxiG?mM(*I6x^nI8&&=XuVX3TcZ=1!$a`Al+7D4|wbIlxt{VV>xJVR*%5I55tn` z);mdB=l$h=4ql_oqfylPeYzkHHKyZ!v&?#}#`1dQihJYazrTHv^v4A|=~^tsQN3fj zA6P^YV$ISsc+~amrg^8lC>1xxsEbh+RtL6$p`yW?vK_hwRMb2tj??3p@yNVtR|lUX zUbMyiR?BmDafDqsEZ=_N#xJm`g05|KB9^vk*Z5oxLr?MGSCPNVj0EItF%w9vDq6e( zo!Wm5jOpP`pgZLeE1C$+>)ppA-^>%Wpky7NYYpn z0+`H5KbyiF-{2~W6?V5F1Kw|_X!CaU7q6LYzZ63VS_1Pa$w74uGvhx_CXlT)OFsAF z7oEVXSrVYGuDV2Osc>(Ky`QFZ>U{wq&ZP*d*Mh^#m}e?mhQKIV;8^zH{DA$cOtSLf z*euVmM-?t<{WA_+&OzRWR&@M71EVwvBLM=NisGIxaVjCQq)2Jo&L-9BpM}EqkB~y+ z%dhb90h`;GxlCE6kzdH@jZtt;s{-Ya&|ukb%n8?q(}RCQG+oY+M-B8)g_`W&$?pjgk`3D!U$Ky^e3Bl za>B?m(CfrGH;Nx)JN;%8B<2S^)wq~u8W7^1b|uXZa7%4qmtL_%9}=%>ofxl5kMBk( zb%zd*acVH_vvzd&v}ag!L=v@1Jh)#`?TcO%nBq6wC-LI&rHQFdd~X`^{9-y)X3)sQ zgn9PB6>V@67VW8**3_eCOu7wM`13<7yd8yUzlh1lB3}e$t04;r2@wZiuA&V={|#OfA{vQ8HaJ)N=*KS?)nCfsw8Xx3d=WjqLc%pEaN-Ef`4R(t!%gMx5+q z=G#gu#pFq*rB8s7iX=n9B5rS}@IWva*?>f1aHD*-w6IG2l|gR_V_ensR*aSFcv_gD z%eIzV;KudHhVyIX9nMTL`$&J7t6q*uTV#;iEMY94EPp_7x8onH9x{*<(%l!|8Jk#` zN80+J>J=u9x*V0Gx+!8l8`}wa+fo=2GQN`>t-^dVD7eIiNJK92#Uk`GpNkIv1vDVV`daODe0O!XH91jipaHE)XT>vP z7~y;frB(Xq698hyW|e&$G#+l1E(D|Rl$PL;80{7$_@WKQu+=%Awr>u_S+Vo#F~>mz zI@S|)FsWV-B=Xp2rdE7Njy3tJgQc|o6@1=BfYyg}()Qtq{>z%r3})0#qkP4611U7K zECUpbQ6UBf5{}M<6TQzR>6pO8PX1V3YyIMsa&a*J%N+Lp#W$*&ZHQJ}w6uN>#Y;(S z@M}zwIi}l60~ZScT?bUj+v+OOK1~m@AR_VKZ95!CA~fl392v~qNC?(z9SFr^J@qvO zJRJL@D=PYFx=5&Y`8J-DdC&>vl0e9-{RE&ZaP#P10|lO>cym!wmdc!@fu3!UBf+WFW*2yfs|Qb2ZXHwqS7VbvENpEuNf!h~Vib zPbaz@<-LcQ4xzu`r~x>m2Dw|UTX}^nZpRtnjtKSceo!|S}m1_C+)l9Au&I$2m*IwK2 z)HKL2O?imQ(7lAMh({qQ3cIQL7Z{xw1{p%1IR+)Kb*60uAgfONmJ#;; zZ7y%Ku{P)RF5%`@4jaVYJOf91k(ZBcrldnbce@s&8N_NgtB!9sEcJzD)fPZ~VI`1a zPEjp{k`V;){fNw8y1FV^fa1vqN2~e^E_4DmJYgR1gt|)h=N{e9V@#4L(!}H1 zDFa&fayhu;MdIHwdngDiN`9Twn*GpGdQ%@M5lQ zT*fmL>Xhk$r}<0e1`?!Yh#c4N;JQTiBBGs4`hcZ8-gW;I@2k-5`Ub1H|02AjwQ z4t$0t_^FYWKADNlJ$+h}Kr|bXXv(P?uBKxsdcXz+Mw<7zIQcMzVJdVHH3IdHe;W?2 ztQIQgW_FaEk`QTcIFn6~V`HmsR56C(yEfUgEv9)~ihjbIhXUH-!@hm$l|C_No@_hg zUi-A(!GG6N1Za|k!6zO5Y1pf=;fc{cV7{h2Y%nhM9GH6ok~e?Iz5{2Zh%JnYu}C7Q zt=z+9S^xTj4*jr=rmp|l%+4%Oa9FuvLuGvs409K`?QrVkJGLHbg_-~5c{tMkBNaQo zyxV5Kxhb?QNfpQh6Gb1O;fCXX>;afwlLv|eNvrMg4Q`Z5kP^Zq7KgVF4~Y|zGvNAH zTWVRoSuSI{ms2>Ku*3?q43^UhLB{+*LhA!A%fnb+|GU}<9AG?TNfVvv0Uf5*bV*q+ z-WSk$pz0K@(Yr)s0Af#@;RVi-T6igob2UU@*Cl5Z^LNg$wAl?XMNlGujteRx-bD z!@MVNg6Kc1773)e6CN&~*|Z!Oevm5$mTD+2N2qhNV?*DK1!skUk99J+nuG3-&6U!Q zq%VJE3;}5^ag8m7{ue5ke+W5lro_UIyaf9Rw&g?Jcp%9?97;~?5H-fWx&)uThAS)K zr#wtWMf%T0*_%v(hXnxo#Ho^v(2};RZM#aB=%trh+BmN9+-6*IMQMd(4&sYzw=6Q6 z&TI#)50X7I=Su-uX#%^KWTLtcUP!2s+FU_x3Bbday~=%tG@$Gnan99pa48tw>)J*@ zWSckHqefi4=d~DYW}$bfO4FCNUm&LU-;BD|M6q(r;5rW*Z(*Fd_mIyh7lPp{;57E8 z#OeF@daUEf`WW^MzQyo@PMz=P#V(fFVV4|F1Q(w&&jTCQ%$X4HZYK7Mfsf}>0^NY) z4y+tS6$?vL(JEl&Uq$RVi1w3z<+Yt#zS$GTUh>yB)!${BFA_o4XQPWvb?Pa$%|6T5 zgSmyE$tU%WIP^23!V0q2w^xBhf4@mDf>OGP4PiMYNL_)!T0pz9Z|<&CNIV%%U>)M^ ze3f+c6%!NB-2Of)ulbrkJDg+v&vT1!1YjY{GYyoK>4{eDmT?*_nASAeGnEA zD71V&9-4UprhJJ*g8D@|nZZpbkWm3Bopv=FEV{!aAGWwBAGO}jp-VCcB-x0byfIY1tZj2zWz`vUZZnA7a%EGlY1Cp6MNo9o-zYH$; zS4FkQ^nKNI@(fRB=N~!@g%o!aB6#tp1%F=DkCG?LF?;m|WAP5F%(AcT-GiLh28beA z^xKATCdF}oHO;&e$y06URUZhz55q9@f9vE)kt>g2F*q!v*4zC-KZ8~A23jyW0*?6B z`nX<=Bqmoteq6;#pIfscPfAGWRx(h0JWCpe$GKDu2$Ob35#GeSIx!}sE9ML0>d-Ye z;LXVt4QP7?lm%j`mYPYP|Hw%yoGs+%41gQ`Xj#@!jHbx`9PI|>FH|Do-D^dV_4&#y z#aPb`J0>MdUa=ej8ZY3YfcJrxo}HwS2rv^bxy63})@t+BahXV-o=cKfl*r{|u7VL)BY znDyO!;}Y69w33;r6_3D|LO|Eh+_2eiz^XI*E_<)+RycK>an1u7sO+~huW?wr>eH0) zu{)E$%ufr>fJnGIVfhIKI+%F)H<{FBA}~l5)afAQFmBpvqRZQ)@PuESK4EqEg8-IW zXGbv-d1KZrU6hmo%aD1qZ(x0F@g9C+fS)T2s7;ABnaE3~=&sToybkPkP54gm`LH=b7|J>aOB|G%Q|U2&y8F(3i1o z)4Y8A6ZJM#oSuJ5YnlUt9OTYBwWbL`>G{`fK^^>=GIU%8jJ$)8C{e2OTWwSv4dapp z1t{BiY+|>^R<}&2Kct2j`AO>r$@LOfj?7usT9Q$0MGANcMwh3iZgzaSg4qk$$PMH@ zRFvL*=%pHFfIxMC_U_WlSR+k4(#u*35=|(>6a(r>Lh8JnQJgfk|G8ewe>4U=#hlcR{tQhI6%^c%;#6eE{Elug$2zYs zS!_oZxYB^_Ojy7ptqz7)vo9%}lnWzHw2R}fIo^xDI%^x*DEwQ6Kd`fBLGk;#ytMcp zpY=SOnJ@N1%#}86e4uopVY2ukVP;n8mP@!qZ+Z9+An{m-p#1RD0n;hLTYv`z%G!ZNsN;5PK z#KQ&Py`aUo&9;!%?PXhRSE7fRbK-=!I?55D!w ze0SmbG8IU1{IIklHgfbi!L(Xe5SEga^>XW06l}!9i(mXnFGx;5{uS`;^n~nEVSS(9 zPo%%J=|-C)+V@kO(|=&)VJ8`A%Mk7buP|4I=Q_fQkjXrPh=wXuX>}A z(-}6^-*5%4n|5m=uM@Ko4fi%MDp7HQN>z}H67INc93d!XQr`V3ae7=o3TY;U>UGLOGEXCQ&~X}7eYk0#AyQm5R3+9AlX{jZS({@?f0 zzErOTP~d+JqdU+FFwl>r;vcN3TaTbL362m+5LAMoZ>?fapq;R-C|{sAph

    - +
    From 2253d50730b94f81fbed875265bed3f925731dfa Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 2 Oct 2023 16:24:50 -0700 Subject: [PATCH 029/100] =?UTF-8?q?--=20VISUALIZACI=C3=93N=20COLUMNA=20DE?= =?UTF-8?q?=20DescripcionVenta,=20en=20historial,=20con=20FNC-163?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ventas/Clientes.aspx | 1 + Ventas/Clientes.aspx.vb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Ventas/Clientes.aspx b/Ventas/Clientes.aspx index 25dc5a555..0d8cc059d 100644 --- a/Ventas/Clientes.aspx +++ b/Ventas/Clientes.aspx @@ -1438,6 +1438,7 @@ + diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index b524a99e2..9ca74c8df 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -1754,7 +1754,7 @@ Partial Class Clientes Dim ObjClientes As New ClsClientes() If ObjClientes.GetHistorialVentas(CveCliente, UsuarioActual.CveEmpresa, SelectTop, CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero()) Then If ObjClientes.DtResultados.Rows.Count > 0 Then - + GVHistorial.Columns(3).Visible = UsuarioActual.Empresa.Funcionalidad(163) = "1" ' mostrar columna de descripción 'Carga Grid DTHistorialVentas = ObjClientes.DtResultados GVHistorial.DataSource = ObjClientes.DtResultados From 7d61f33793f094f3caac3e22067c232480b6df44 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 4 Oct 2023 09:46:25 -0700 Subject: [PATCH 030/100] optoin explicit --- CxC/RepCxCDetalle.aspx.vb | 78 ++++++++++++++++++--------------------- 1 file changed, 36 insertions(+), 42 deletions(-) diff --git a/CxC/RepCxCDetalle.aspx.vb b/CxC/RepCxCDetalle.aspx.vb index ae3fe6366..d8eb1cdfc 100644 --- a/CxC/RepCxCDetalle.aspx.vb +++ b/CxC/RepCxCDetalle.aspx.vb @@ -1,5 +1,4 @@ - -Option Explicit On +Option Explicit On Option Strict On @@ -467,7 +466,7 @@ Partial Class RepCxCDetalle FechaVF = If(IsDate(txtFechaVF.Text.Trim()), txtFechaVF.Text.Trim(), "-1") 'FechaI, FechaF, -1, UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero - Dim CveCliente = If(DdlClientesWS.SelectedValue.ToEntero > 0, DdlClientesWS.SelectedValue.ToEntero, -1) + Dim CveCliente As Integer = If(DdlClientesWS.SelectedValue.ToEntero > 0, DdlClientesWS.SelectedValue.ToEntero, -1) If ObjMovtos.GetCxCDetalle(FechaI, FechaF, CveCliente, DdlSubProyecto.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero, Anio, Mes, AnioMes, Fecha, CveClienteSucursal, Opcion, -1, Iva.ToString, DdlGrupo.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlResponsable.SelectedValue.ToEntero, @@ -900,20 +899,20 @@ Partial Class RepCxCDetalle End Sub Private Sub ImgExcelPersonalizado_Click(sender As Object, e As EventArgs) Handles ImgExcelPersonalizado.Click - Dim Cliente = If(DdlClientesWS.SelectedValue = "-1", "", $" Cliente: {DdlClientesWS.SelectedText}") - Dim Sucursal = If(DdlSubProyecto.SelectedValue = "-1", "", $" Sucursal: {DdlSubProyecto.SelectedItem.Text}") - Dim Grupo = $" Agrupado Por: {DdlGrupo.SelectedItem.Text}" 'If(DdlGrupo.SelectedValue = "3", "", $" Agrupado Por: {DdlGrupo.SelectedItem.Text}") - Dim TipoDocto = If(DdlTipoDocto.GetSelectedText = "", "", $" Documentos: {DdlTipoDocto.GetSelectedText}") - Dim Vendedor = If(DdlVendedor.SelectedValue = "-1", "", $" Vendedor: {DdlVendedor.SelectedItem.Text}") + Dim Cliente As String = If(DdlClientesWS.SelectedValue = "-1", "", $" Cliente: {DdlClientesWS.SelectedText}") + Dim Sucursal As String = If(DdlSubProyecto.SelectedValue = "-1", "", $" Sucursal: {DdlSubProyecto.SelectedItem.Text}") + Dim Grupo As String = $" Agrupado Por: {DdlGrupo.SelectedItem.Text}" 'If(DdlGrupo.SelectedValue = "3", "", $" Agrupado Por: {DdlGrupo.SelectedItem.Text}") + Dim TipoDocto As String = If(DdlTipoDocto.GetSelectedText = "", "", $" Documentos: {DdlTipoDocto.GetSelectedText}") + Dim Vendedor As String = If(DdlVendedor.SelectedValue = "-1", "", $" Vendedor: {DdlVendedor.SelectedItem.Text}") Dim FechaIn As String = If(txtFechaI.Text = "", "", $" Fecha Inicio Docto: {txtFechaI.Text}") Dim FechaFn As String = If(txtFechaF.Text = "", "", $" Fecha Fin Docto: {txtFechaF.Text}") Dim FVI As String = If(txtFechaVI.Text = "", "", $" Fecha Venc. Inic.: {txtFechaVI.Text}") Dim FVF As String = If(txtFechaVF.Text = "", "", $" Fecha Venc. Final: ;{txtFechaVF.Text}") - Dim Registro = If(DdlUsuario.SelectedValue = "-1", "", $" Registró: ;{DdlUsuario.SelectedItem.Text}") - Dim Responsable = If(DdlResponsable.SelectedValue = "-1", "", $" Responsable: ;{DdlResponsable.SelectedItem.Text}") - Dim EstatusCob = If(DdlCobranzaEstatusFiltro.SelectedValue = "-1", "", $"status Cobranza: ;{DdlCobranzaEstatusFiltro.SelectedItem.Text}") + Dim Registro As String = If(DdlUsuario.SelectedValue = "-1", "", $" Registró: ;{DdlUsuario.SelectedItem.Text}") + Dim Responsable As String = If(DdlResponsable.SelectedValue = "-1", "", $" Responsable: ;{DdlResponsable.SelectedItem.Text}") + Dim EstatusCob As String = If(DdlCobranzaEstatusFiltro.SelectedValue = "-1", "", $"status Cobranza: ;{DdlCobranzaEstatusFiltro.SelectedItem.Text}") Dim CorteA As String = If(txtCorteA.Text = "31/12/2019", "", $"Corte A {txtCorteA.Text}") - Dim ClasificacionCli = If(DdlClienteClasificacion.SelectedValue = "-1", "", $" Clasificación Cliente: {DdlClienteClasificacion.SelectedItem.Text}") + Dim ClasificacionCli As String = If(DdlClienteClasificacion.SelectedValue = "-1", "", $" Clasificación Cliente: {DdlClienteClasificacion.SelectedItem.Text}") Dim Filtro As String = $"{Cliente}{Sucursal}{Grupo}{Vendedor}{FechaIn}{FechaFn}{Registro}{Responsable}{TipoDocto}{EstatusCob}{FVI}{FVF}{ClasificacionCli}{CorteA}" @@ -979,20 +978,20 @@ Partial Class RepCxCDetalle TCEspecifico = -1 End If - Dim Cliente = If(DdlClientesWS.SelectedValue = "-1", "", $" Cliente: {DdlClientesWS.SelectedText}") - Dim Sucursal = If(DdlSubProyecto.SelectedValue = "-1", "", $" Sucursal: {DdlSubProyecto.SelectedItem.Text}") - Dim Grupo = $" Agrupado Por: {DdlGrupo.SelectedItem.Text}" 'If(DdlGrupo.SelectedValue = "3", "", $" Agrupado Por: {DdlGrupo.SelectedItem.Text}") - Dim TipoDocto = If(DdlTipoDocto.GetSelectedText = "", "", $" Documentos: {DdlTipoDocto.GetSelectedText}") - Dim Vendedor = If(DdlVendedor.SelectedValue = "-1", "", $" Vendedor: {DdlVendedor.SelectedItem.Text}") + Dim Cliente As String = If(DdlClientesWS.SelectedValue = "-1", "", $" Cliente: {DdlClientesWS.SelectedText}") + Dim Sucursal As String = If(DdlSubProyecto.SelectedValue = "-1", "", $" Sucursal: {DdlSubProyecto.SelectedItem.Text}") + Dim Grupo As String = $" Agrupado Por: {DdlGrupo.SelectedItem.Text}" 'If(DdlGrupo.SelectedValue = "3", "", $" Agrupado Por: {DdlGrupo.SelectedItem.Text}") + Dim TipoDocto As String = If(DdlTipoDocto.GetSelectedText = "", "", $" Documentos: {DdlTipoDocto.GetSelectedText}") + Dim Vendedor As String = If(DdlVendedor.SelectedValue = "-1", "", $" Vendedor: {DdlVendedor.SelectedItem.Text}") Dim FechaIn As String = If(txtFechaI.Text = "", "", $" Fecha Inicio Docto: {txtFechaI.Text}") Dim FechaFn As String = If(txtFechaF.Text = "", "", $" Fecha Fin Docto: {txtFechaF.Text}") Dim FVI As String = If(txtFechaVI.Text = "", "", $" Fecha Venc. Inic.: {txtFechaVI.Text}") Dim FVF As String = If(txtFechaVF.Text = "", "", $" Fecha Venc. Final: {txtFechaVF.Text}") - Dim Registro = If(DdlUsuario.SelectedValue = "-1", "", $" Registró: {DdlUsuario.SelectedItem.Text}") - Dim Responsable = If(DdlResponsable.SelectedValue = "-1", "", $" Responsable: {DdlResponsable.SelectedItem.Text}") - Dim EstatusCob = If(DdlCobranzaEstatusFiltro.SelectedValue = "-1", "", $" Estatus Cobranza: {DdlCobranzaEstatusFiltro.SelectedItem.Text}") + Dim Registro As String = If(DdlUsuario.SelectedValue = "-1", "", $" Registró: {DdlUsuario.SelectedItem.Text}") + Dim Responsable As String = If(DdlResponsable.SelectedValue = "-1", "", $" Responsable: {DdlResponsable.SelectedItem.Text}") + Dim EstatusCob As String = If(DdlCobranzaEstatusFiltro.SelectedValue = "-1", "", $" Estatus Cobranza: {DdlCobranzaEstatusFiltro.SelectedItem.Text}") Dim CorteA As String = If(txtCorteA.Text = "31/12/2019", "", $" Corte A: {txtCorteA.Text}") - Dim ClasificacionCli = If(DdlClienteClasificacion.SelectedValue = "-1", "", $" Clasificación Cliente: {DdlClienteClasificacion.SelectedItem.Text}") + Dim ClasificacionCli As String = If(DdlClienteClasificacion.SelectedValue = "-1", "", $" Clasificación Cliente: {DdlClienteClasificacion.SelectedItem.Text}") Dim TituloReporte As String = "REPORTE DE CUENTAS POR COBRAR DEL CLIENTE CON DETALLE" 'If UsuarioActual.CveEmpresa = 72 Then @@ -1113,7 +1112,7 @@ Partial Class RepCxCDetalle End Sub Private Sub BtnAsignaCobranza_Click(sender As Object, e As EventArgs) Handles BtnAsignaCobranza.Click Dim time As DateTime - Dim TieneError = False + Dim TieneError As Boolean = False Dim ObjVentas As New ClsVentas ObjVentas.IniciaTransacSQL() @@ -1185,13 +1184,13 @@ Partial Class RepCxCDetalle Dim htw1 As New HtmlTextWriter(sw1) GridView.RenderControl(htw1) - Dim options = GemBox.Spreadsheet.LoadOptions.HtmlDefault + Dim options As HtmlLoadOptions = GemBox.Spreadsheet.LoadOptions.HtmlDefault - Dim htmlStream1 = New MemoryStream(options.Encoding.GetBytes(sw1.ToString())) + Dim htmlStream1 As New MemoryStream(options.Encoding.GetBytes(sw1.ToString())) htmlStream1.Position = 0 Dim sr1 As New StreamReader(htmlStream1) - Dim myStr1 = sr1.ReadToEnd() + Dim myStr1 As String = sr1.ReadToEnd() sr1.Dispose() htmlStream1.Dispose() sw1.Dispose() @@ -1200,7 +1199,7 @@ Partial Class RepCxCDetalle HtmlCompleto = Regex.Replace(HtmlCompleto, "\<[\/]*a[^\>]*\>", "") - Dim htmlStream5 = New MemoryStream(options.Encoding.GetBytes(HtmlCompleto)) + Dim htmlStream5 As New MemoryStream(options.Encoding.GetBytes(HtmlCompleto)) GemBox.Spreadsheet.SpreadsheetInfo.SetLicense(SerialGemBoxSpreadsheet) @@ -1214,13 +1213,13 @@ Partial Class RepCxCDetalle Dim TotalRowFooter As Integer = 2 - Dim worksheet = excel.Worksheets(0) + Dim worksheet As ExcelWorksheet = excel.Worksheets(0) worksheet.Rows.InsertEmpty(0, TotalRowHeader) - Dim celdasConTexto = worksheet.GetUsedCellRange(True) + Dim celdasConTexto As CellRange = worksheet.GetUsedCellRange(True) If celdasConTexto Is Nothing Then Exit Sub 'No se recuperaron datos, salir de sin guardar porque soltará error celdasConTexto.Style.Font.Name = "Calibri Light" - Dim RangoNombreEmpresa = worksheet.Cells.GetSubrangeAbsolute(1, celdasConTexto.FirstColumnIndex, 1, celdasConTexto.LastColumnIndex) + Dim RangoNombreEmpresa As CellRange = worksheet.Cells.GetSubrangeAbsolute(1, celdasConTexto.FirstColumnIndex, 1, celdasConTexto.LastColumnIndex) RangoNombreEmpresa.Merged = True RangoNombreEmpresa.Value = Usuario.Empresa.Empresa RangoNombreEmpresa.Style.Font.Size = 18 * 20 @@ -1229,7 +1228,7 @@ Partial Class RepCxCDetalle RangoNombreEmpresa.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center - Dim RangoTitulo = worksheet.Cells.GetSubrangeAbsolute(3, celdasConTexto.FirstColumnIndex, 3, celdasConTexto.LastColumnIndex) + Dim RangoTitulo As CellRange = worksheet.Cells.GetSubrangeAbsolute(3, celdasConTexto.FirstColumnIndex, 3, celdasConTexto.LastColumnIndex) RangoTitulo.Merged = True RangoTitulo.Value = Titulo RangoTitulo.Style.Font.Size = 20 * 20 @@ -1238,7 +1237,7 @@ Partial Class RepCxCDetalle RangoTitulo.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center If DatoTituloExtra.Length > 0 Then - Dim RangoDatoTituloExtra = worksheet.Cells.GetSubrangeAbsolute(TotalRowHeader, celdasConTexto.FirstColumnIndex, TotalRowHeader, celdasConTexto.LastColumnIndex) + Dim RangoDatoTituloExtra As CellRange = worksheet.Cells.GetSubrangeAbsolute(TotalRowHeader, celdasConTexto.FirstColumnIndex, TotalRowHeader, celdasConTexto.LastColumnIndex) RangoDatoTituloExtra.Merged = True RangoDatoTituloExtra.Value = DatoTituloExtra RangoDatoTituloExtra.Style.Font.Size = 20 * 20 @@ -1253,7 +1252,7 @@ Partial Class RepCxCDetalle Dim Arreglo As String() = DatosFiltros.Split("|"c) worksheet.Rows.InsertEmpty(TotalRowHeader, Arreglo.Count) For Each TextoFiltro As String In Arreglo - Dim RangoDatoTituloExtra = worksheet.Cells.GetSubrangeAbsolute(TotalRowHeader, celdasConTexto.FirstColumnIndex, TotalRowHeader, celdasConTexto.LastColumnIndex) + Dim RangoDatoTituloExtra As CellRange = worksheet.Cells.GetSubrangeAbsolute(TotalRowHeader, celdasConTexto.FirstColumnIndex, TotalRowHeader, celdasConTexto.LastColumnIndex) RangoDatoTituloExtra.Merged = True RangoDatoTituloExtra.Value = TextoFiltro RangoDatoTituloExtra.Style.Font.Size = 12 * 20 @@ -1267,7 +1266,7 @@ Partial Class RepCxCDetalle ' TotalRowHeader += 2 - For i = celdasConTexto.FirstColumnIndex To celdasConTexto.LastColumnIndex + For i As Integer = celdasConTexto.FirstColumnIndex To celdasConTexto.LastColumnIndex worksheet.Rows(TotalRowHeader).Cells(i).Style.Font.Size = 12 * 20 worksheet.Rows(TotalRowHeader).Cells(i).Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center @@ -1304,22 +1303,17 @@ Partial Class RepCxCDetalle End Using End If - - For I = celdasConTexto.FirstColumnIndex To celdasConTexto.LastColumnIndex - 2 - + For I As Integer = celdasConTexto.FirstColumnIndex To celdasConTexto.LastColumnIndex - 2 If I > 0 Then - If 1 = 1 Then worksheet.Columns(I + 1).Style.NumberFormat = "#,##0.00" Else worksheet.Columns(I + 1).Style.NumberFormat = "#,##" End If - Try worksheet.Columns(I).AutoFit(1) Catch ex As Exception End Try - End If Next @@ -1339,8 +1333,8 @@ Partial Class RepCxCDetalle 'excel.Worksheets.Add(NombreTabla) - Dim workbookDTExtra = New ExcelFile - Dim worksheetDTExtra = workbookDTExtra.Worksheets.Add(NombreTabla) + Dim workbookDTExtra As New ExcelFile + Dim worksheetDTExtra As ExcelWorksheet = workbookDTExtra.Worksheets.Add(NombreTabla) worksheetDTExtra.InsertDataTable(DTExtra, @@ -1352,7 +1346,7 @@ Partial Class RepCxCDetalle - Dim columnCount = worksheetDTExtra.CalculateMaxUsedColumns() + Dim columnCount As Integer = worksheetDTExtra.CalculateMaxUsedColumns() For i As Integer = 0 To columnCount - 1 worksheetDTExtra.Columns(i).AutoFit(1, worksheetDTExtra.Rows(1), worksheetDTExtra.Rows(worksheetDTExtra.Rows.Count - 1)) worksheetDTExtra.Cells(0, i).Style.FillPattern.SetSolid(Drawing.ColorTranslator.FromHtml("#4b77be")) From 0869fe8ad4b99a66c4474fe333a3fa9262e79b54 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 4 Oct 2023 11:15:59 -0700 Subject: [PATCH 031/100] =?UTF-8?q?--=20en=20grid=20historial=20d=20eventa?= =?UTF-8?q?s,=20ocultar=20columnas=20de=20descuento/amortizaci=C3=B3n=20si?= =?UTF-8?q?no=20tienen=20valores?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ventas/Clientes.aspx | 4 ++-- Ventas/Clientes.aspx.vb | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Ventas/Clientes.aspx b/Ventas/Clientes.aspx index 0d8cc059d..d3edba22e 100644 --- a/Ventas/Clientes.aspx +++ b/Ventas/Clientes.aspx @@ -1444,12 +1444,12 @@ - + - + diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index 9ca74c8df..8feea470a 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -1755,6 +1755,8 @@ Partial Class Clientes If ObjClientes.GetHistorialVentas(CveCliente, UsuarioActual.CveEmpresa, SelectTop, CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero()) Then If ObjClientes.DtResultados.Rows.Count > 0 Then GVHistorial.Columns(3).Visible = UsuarioActual.Empresa.Funcionalidad(163) = "1" ' mostrar columna de descripción + GVHistorial.Columns(5).Visible = ObjClientes.DtResultados.SUMD("Descuento") > 0 ' mostrar columna de descuento + GVHistorial.Columns(6).Visible = ObjClientes.DtResultados.SUMD("Amortizacion") > 0 ' mostrar columna de amortización 'Carga Grid DTHistorialVentas = ObjClientes.DtResultados GVHistorial.DataSource = ObjClientes.DtResultados From 01f48dfdba5b87213b009ea9392cfb833b1200ff Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 4 Oct 2023 20:43:47 -0700 Subject: [PATCH 032/100] -- pedimento al generar con embarque --- Ventas/Ventas.aspx.vb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index e573663a5..750625e13 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -2719,6 +2719,7 @@ Partial Class Ventas TmpDT.Columns.Add("AFValorInicial", GetType(Decimal)) TmpDT.Columns.Add("NumTurnos", GetType(Decimal)) TmpDT.Columns("NumTurnos").DefaultValue = 0D + TmpDT.Columns.Add("NumeroPedimento", GetType(String)) GvPS.DataSource = ObjVentas.DtResultados GvPS.DataBind() @@ -3421,7 +3422,7 @@ Partial Class Ventas UPObservaciones.Update() End If - If UsuarioActual.CveEmpresa = 13 Then + If UsuarioActual.Empresa.Funcionalidad(163) = "1" Then TrDescripcionVenta.Visible = True If CveVenta <= 0 Then TxtDescripcionVenta.Enabled = True @@ -4817,7 +4818,7 @@ Partial Class Ventas End If End If - If UsuarioActual.CveEmpresa = 13 Then + If UsuarioActual.Empresa.Funcionalidad(163) = "1" Then TrDescripcionVenta.Visible = True TxtDescripcionVenta.Text = DbRowVenta("DescripcionVenta").ToString() End If @@ -19825,7 +19826,7 @@ Partial Class Ventas If Indice >= 0 Then ' rowSurtidos("Surtido").ToString().ToDouble < rowSurtidos("Cantidad").ToString().ToDouble AndAlso (dr("CantidadDisponible").ToString().ToDouble - rowSurtidos("Surtido").ToString().ToDouble > 0 Or dr("Serie").ToString() <> "") If rowSurtidos("Surtido").ToString().ToDecimal < rowSurtidos("Cantidad").ToString().ToDecimal Then - Dim CantidadSurtida As Double = If(dr("CantidadDisponible").ToString().ToDecimal < rowSurtidos("Cantidad").ToString().ToDouble, dr("CantidadDisponible").ToString().ToDecimal, rowSurtidos("Cantidad").ToString().ToDecimal) + Dim CantidadSurtida As Decimal = If(dr("CantidadDisponible").ToString().ToDecimal < rowSurtidos("Cantidad").ToString().ToDouble, dr("CantidadDisponible").ToString().ToDecimal, rowSurtidos("Cantidad").ToString().ToDecimal) 'SI LA CANTIDAD SURTIDA SUPERA LO REQUERIDO, TOMA SOLO LO NECESARIO PARA COMPLETAR If (rowSurtidos("Surtido").ToString().ToDecimal + CantidadSurtida) > rowSurtidos("Cantidad").ToString().ToDecimal Then @@ -20155,7 +20156,7 @@ Partial Class Ventas If CveMovimientoVirtual > 0 Then For Each RowUsado As DataRow In DtPSVirtual.Rows Dim CvePS As Integer = RowUsado("CvePS").ToString().ToEntero() - Dim CantidadUsado As Double = RowUsado("Cantidad").ToString().ToDouble() + Dim CantidadUsado As Decimal = RowUsado("Cantidad").ToString().ToDecimal() Dim PU As Decimal = RowUsado("Cargo").ToString().ToDecimal() Dim CveUM As Integer = RowUsado("CveUM").ToString().ToEntero() From e1ba94c2512a06b330e0c4075f25f2632fcf0f82 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Thu, 5 Oct 2023 18:34:23 -0700 Subject: [PATCH 033/100] --No quitar folio fiscal relacionado para timbrar notas de credito --- Ventas/Ventas.aspx.vb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index e573663a5..81b2b4397 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -15427,7 +15427,10 @@ Partial Class Ventas HdnIVACalculado.Value = "0" 'SI ES REFACTURACION NO LIMPIAR EL FOLIO FISCAL If NuevaFactura <> 1 Then - HdnFolioFiscalNC.Value = "0" + 'SI ES UNA NOTA DE CREDITO NO TIMBRADA NO DEBE LIMPIAR + If Not (DdlTipoComprobante.SelectedValue.ToString() = "Egs" AndAlso CveVenta > 0 AndAlso LblSeTimbro.Text = "No") Then + HdnFolioFiscalNC.Value = "0" + End If End If LblAntAplicados.Text = "" LblAntAplicados.Visible = False From a6e105bdd9c35b97576e6aa5557fd57deaa96044 Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 6 Oct 2023 12:04:44 -0700 Subject: [PATCH 034/100] -- activar otros ingresos en devolucion de efectivo de compras --- Bancos/IE.aspx | 15 +++++++++++++-- Bancos/IE.aspx.vb | 12 +++++------- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/Bancos/IE.aspx b/Bancos/IE.aspx index d9a7799a7..4f6baeb37 100644 --- a/Bancos/IE.aspx +++ b/Bancos/IE.aspx @@ -269,8 +269,8 @@ - -
    + +
    $ @@ -1784,6 +1784,17 @@ if ($get('TxtImporte')) $get('TxtImporte').value = ToDouble($get('TxtDevolución').value) + Ot; } + function ValidarCantidadDevCompras() { + var Ot = 0.00; + var Dev = 0.00; + debugger; //valida importe + //if ($get('TxtDevolución') && (ToDouble($get('TxtDevolución').value) > s)) $get('TxtDevolución').value = s; + FCSumaTotalesNotas(); + // considera importe de OT ingresos, para que se peuda exceder + if ($get('TxtOtrosIngresosEgresos')) { Ot = ToDouble($get('TxtOtrosIngresosEgresos').value); } + if ($get('TxtImporte')) $get('TxtImporte').value = ToDouble($get('TxtImporte').value) + Ot; + } + var TipoCambioActual = 0.0; function CambiaTC(txt) { let TipoCambioTxt = ToDouble(txt.value) diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb index 972139eaa..32a7ec185 100644 --- a/Bancos/IE.aspx.vb +++ b/Bancos/IE.aspx.vb @@ -638,7 +638,9 @@ Partial Class Bancos_IE 'CargaNotas() DVDevolucion.Visible = True HdnCveProveedor.Value = Request("CveProveedor") - DivOtrosIngresosEgresos.Visible = False + DivOtrosIngresosEgresos.Visible = True + TxtOtrosIngresosEgresos.Attributes.Add("onkeyup", $"ValidarCantidadDevCompras();") + End If TxtImporte.Attributes.Add("onkeypress", "javascript: return false;") End If @@ -647,10 +649,8 @@ Partial Class Bancos_IE If UsuarioActual.Empresa.Funcionalidad(590) = "1" Then DivOtrosIngresosEgresos.Visible = True End If - End If - If Request("Opcion") IsNot Nothing AndAlso Request("Opcion").ToString.Contiene("EGSCREDITO") Then LblPagueseA.Text = "" LblPagueseA.Visible = False @@ -2468,10 +2468,6 @@ Partial Class Bancos_IE Exit Select End If - - - - 'NC COMPLEMENTARIA If tCveMoneda > 1 Then @@ -4836,6 +4832,8 @@ Partial Class Bancos_IE ImporteOriginalDevDin = UrlParametros("ORIGINAL").ToString.ToDecimal.RoundSQL(6) TxtImporte.Text = UrlParametros("SALDO").ToString.FormatoNumero() TxtDevolución.Text = UrlParametros("SALDO").ToString.FormatoNumero() + divTxtDevolucion.Visible = True + lblDevolucion.Visible = True 'TxtImporte.Attributes.Add("onkeyup", $"FormatoMoneda(this);ValidarCantidad(this,{UrlParametros("SALDO").ToString});") TxtDevolución.Attributes.Add("onkeyup", $"FormatoMoneda(this);ValidarCantidadDev( {UrlParametros("SALDO").ToString});") TxtOtrosIngresosEgresos.Attributes.Add("onkeyup", $"ValidarCantidadDev();") From ddda3e22da9e8203de924a12320d449abc8ab9bb Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 6 Oct 2023 12:05:20 -0700 Subject: [PATCH 035/100] =?UTF-8?q?--=20ajuste=20para=20el=20env=C3=ADo=20?= =?UTF-8?q?de=20descripci=C3=B3n=20de=20venta?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ventas/Ventas.aspx.vb | 33 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 750625e13..502428c99 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -9977,7 +9977,6 @@ Partial Class Ventas 'ContPAQ El movimiento 1 es el de Venta Dim AutoConta As Boolean = UsuarioActual.Empresa.Funcionalidad(200) = "1" - AutoConta = AutocontaMatriz(AutoConta) If DdlTipoComprobante.SelectedValue.Contiene("Rem", "RNC", "Cot", "Ped", "Pd2", "PA") Then @@ -10016,22 +10015,22 @@ Partial Class Ventas End If End If - Try - 'RMF, cuando es pedido, se manda autorización. - If ObjFactura.TipoDocto.Contiene("PA") Then + 'Try + ' 'RMF, cuando es pedido, se manda autorización. + ' If ObjFactura.TipoDocto.Contiene("PA") Then - Dim Titulo As String = "Solicitud de autorización" 'usuarios de crédito y cobranza - Dim Msg As String = String.Format("{0} - Folio {1} ", DdlSubProyectoDatos.SelectedItem.Text, TxtFolio.Text) - 'If UsuarioActual.CveEmpresa = 119 Then - ' ClsSisNotificaciones.SendNotificacionERP(1715, Titulo, Msg, 1) - ' ClsSisNotificaciones.SendNotificacionERP(1815, Titulo, Msg, 1) - ' ClsSisNotificaciones.SendNotificacionERP(1830, Titulo, Msg, 1) - 'End If + ' Dim Titulo As String = "Solicitud de autorización" 'usuarios de crédito y cobranza + ' Dim Msg As String = String.Format("{0} - Folio {1} ", DdlSubProyectoDatos.SelectedItem.Text, TxtFolio.Text) + ' 'If UsuarioActual.CveEmpresa = 119 Then + ' ' ClsSisNotificaciones.SendNotificacionERP(1715, Titulo, Msg, 1) + ' ' ClsSisNotificaciones.SendNotificacionERP(1815, Titulo, Msg, 1) + ' ' ClsSisNotificaciones.SendNotificacionERP(1830, Titulo, Msg, 1) + ' 'End If - End If - Catch ex As Exception - OnError("Ocurrió un error al mandar las notificaciones de autorización", ex) - End Try + ' End If + 'Catch ex As Exception + ' OnError("Ocurrió un error al mandar las notificaciones de autorización", ex) + 'End Try Try ViewState("CveVenta") = ObjFactura.CveVenta @@ -13024,9 +13023,7 @@ Partial Class Ventas End If Dim DescripcionVenta As String = "" - If factura.TipoDocto = "Ing" AndAlso UsuarioActual.CveEmpresa = 13 Then - DescripcionVenta = TxtDescripcionVenta.Text - End If + If TxtDescripcionVenta.Text <> "" Then DescripcionVenta = TxtDescripcionVenta.Text If Not ObjVentas.AddVenta(factura.TipoDocto, factura.Folio, factura.CveCliente, factura.CveClienteSucursal, factura.SubTotalTC, factura.DescuentoTC, factura.AmortizacionTC, factura.IVATC, factura.RetIVATC, factura.RetISRTC, From 94304d632ee9ee01fd11240298911df9d78b1e6d Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 6 Oct 2023 18:47:48 -0700 Subject: [PATCH 036/100] -- contabilizable ret ISR --- App_Code/ClsPaginas.vb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 1b094493c..f2cdf778c 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -7463,9 +7463,9 @@ Public Class ClsPaginas ImporteMovimiento = (PorcentajePago * CompraActual.RetISR).RoundSQL ImporteMN = (ImporteMovimiento * CompraActual.TC).RoundSQL If CompraActual.CveMoneda > 1 Then ImporteME = ImporteMovimiento - Dim ContabilizableISR As Boolean = False - If UsuarioActual.CveEmpresa.Contiene(140, 7, 11, 12, 122, 145, 172, 173, 174) Then - ContabilizableISR = True + Dim ContabilizableISR As Boolean = True + If UsuarioActual.CveEmpresa.Contiene(13, 83, 141, 153, 154, 158) Then + ContabilizableISR = False End If Dim Ret As ConceptosRetenciones = CompraActual.ConceptoPrePolizaRetISR If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, ImporteMN, Ret.CveConceptoxAcreditar, CompraActual.SerieFolio, Concepto, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambio:=CompraActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, Contabilizable:=ContabilizableISR, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True @@ -8471,7 +8471,7 @@ Public Class ClsPaginas PaginaDict.Add("/Bancos/RepCobradoPagadoDetalle.aspx".ToUpper(), -1) PaginaDict.Add("/Bancos/RepCobradoPagado.aspx".ToUpper(), 368) PaginaDict.Add("/Bancos/RepIngresosPorComprobar.aspx".ToUpper(), 381) - PaginaDict.Add("/Bancos/Documentos.aspx".ToUpper(), 319) + 'PaginaDict.Add("/Bancos/Documentos.aspx".ToUpper(), 319) PaginaDict.Add("/Bancos/RepCreditos.aspx".ToUpper(), 320) PaginaDict.Add("/Bancos/RepSaldosDAP.aspx".ToUpper(), 385) PaginaDict.Add("/Bancos/DepositosCaja.aspx".ToUpper(), 560) From 685059cad3dc1fc8a853ed7ffd4111e8ae2283da Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 6 Oct 2023 18:48:08 -0700 Subject: [PATCH 037/100] -- dev nc compra --- Bancos/IE.aspx | 2 +- Bancos/IE.aspx.vb | 198 ++++++++++++++++++---------------------------- 2 files changed, 80 insertions(+), 120 deletions(-) diff --git a/Bancos/IE.aspx b/Bancos/IE.aspx index 4f6baeb37..9106c2511 100644 --- a/Bancos/IE.aspx +++ b/Bancos/IE.aspx @@ -512,7 +512,7 @@ - diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb index 32a7ec185..9a5858990 100644 --- a/Bancos/IE.aspx.vb +++ b/Bancos/IE.aspx.vb @@ -1358,23 +1358,18 @@ Partial Class Bancos_IE End Sub #End Region - - Private Sub CargaNotas(CvemonedaInterna As Integer) Dim ObjMovtos As New ClsMovimientos() If CvemonedaInterna > 0 Then If ObjMovtos.GetAnticiposProveedor(CveProveedor, -1, CvemonedaInterna, -1) AndAlso ObjMovtos.DtResultados.FiltraParametros("TipoDocto = 'NC'").Rows.Count > 0 Then GvA.DataSource = ObjMovtos.DtResultados.FiltraParametros("TipoDocto = 'NC' and Saldo > 0 and CveCompra > 0") - Else GvA.DataSource = Nothing End If Else GvA.DataSource = Nothing End If - - ObjMovtos.Dispose() @@ -2413,15 +2408,10 @@ Partial Class Bancos_IE Dim FechaCompraNota As Date = GvRow.DataKey("Fecha").ToDate If tCveMoneda > 1 Then - TCCompra = GlobalTipoCambio(FechaCompraNota).ToDecimal + TCCompra = GvRow.DataKey("TipoCambio").ToDecimal TCDocumento = GlobalTipoCambio(TxtFechaDocumento.Text.ToDate).ToDecimal - - If TCCompra <= 0 Then - Alert("No se pudo obtener el tipo de cambio de la nota de crédito.", TipoMensaje.MsgAdvertencia) - End If - If TCDocumento <= 0 Then - Alert("No se pudo obtener el tipo de cambio del documentpo.", TipoMensaje.MsgAdvertencia) + Alert("No se pudo obtener el tipo de cambio del documento.", TipoMensaje.MsgAdvertencia) End If End If ImporteAplicar = GvRow.DataKey("Saldo").ToDecimal @@ -2433,23 +2423,9 @@ Partial Class Bancos_IE Else ImporteAplicarMN = (ImporteAplicar * If(tCveMoneda = 1, 1, TxtTipoCambio.Text.ToDecimal)).RoundSQL() End If - - If tCveMoneda > 1 Then - - TCCompra = GlobalTipoCambio(GvRow.DataKey("Fecha").ToDate).ToDecimal - TCDocumento = GlobalTipoCambio(TxtFechaDocumento.Text.ToDate).ToDecimal - - If TCCompra <= 0 Then - Alert("No se pudo obtener el tipo de cambio de la nota de crédito.", TipoMensaje.MsgAdvertencia) - End If - - If TCDocumento <= 0 Then - Alert("No se pudo obtener el tipo de cambio del documentpo.", TipoMensaje.MsgAdvertencia) - End If - End If - ConceptoAplicar = $"Devolución de Proveedor {PagueseA} {ImporteAplicar} NC:{GvRow.DataKey("SerieFolio")}" CveCompraDeCDin = GvRow.DataKey("CveCompra").ToEntero + Dim tCveTipoConcepto As Integer = GvRow.DataKey("CveTipoConcepto").ToEntero 'BANCOS COMPLEMENTARIA If tCveMoneda > 1 Then @@ -2462,8 +2438,9 @@ Partial Class Bancos_IE 'CANCELA NC ImporteAplicar = ImporteAplicar '- TxtOtrosIngresosEgresos.Text.ToDecimal ImporteAplicarMN = ImporteAplicar ' (ImporteAplicar * If(DdlMoneda.SelectedValue.ToEntero = 1, 1, TxtTipoCambio.Text.ToDecimal)).RoundSQL() + Dim ConPreP As ConceptosTipoSaldo = ClsPaginas.ObtenerCveConceptoPrePoliza(15, tCveMoneda, False, tCveTipoConcepto) - If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, -(ImporteAplicar), (ImporteAplicarMN), 18, ReferenciaAplicar, ConceptoAplicar, CveIE:=CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteME:=ImporteAplicarME, TipoCambio:=TCCompra) Then + If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, -(ImporteAplicar), (ImporteAplicarMN), ConPreP.CveConcepto, ReferenciaAplicar, ConceptoAplicar, CveIE:=CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteME:=ImporteAplicarME, TipoCambio:=TCCompra) Then MsgError = "Ocurrió un error al registrar el asiento de pago de devolución" Exit Select End If @@ -2473,7 +2450,7 @@ Partial Class Bancos_IE ImporteAplicarMN = ((ImporteAplicar * If(tCveMoneda = 1, 1, TCCompra)) - ImporteAplicar).RoundSQL() - If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, -(ImporteAplicar), -(ImporteAplicarMN), 201, ReferenciaAplicar, ConceptoAplicar, CveIE:=CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteME:=-(ImporteAplicarME), TipoCambio:=TCCompra) Then + If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, -(ImporteAplicar), -(ImporteAplicarMN), ConPreP.CveConceptoComplementario, ReferenciaAplicar, ConceptoAplicar, CveIE:=CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteME:=-(ImporteAplicarME), TipoCambio:=TCCompra) Then MsgError = "Ocurrió un error al registrar el asiento de bancos complementaria de devolución" End If @@ -2504,72 +2481,79 @@ Partial Class Bancos_IE 'IMPUESTOS Dim PorcentajePagoDevDin As Decimal = (ImporteAplicar / ImporteAplicar).RoundSQL(6) - Dim CveConceptoContableAplciar As Integer = -1 - 'Dim TipoMovtoAplicar = False + Dim CveConceptoContableAplicar As Integer = -1 + Dim CveMonedaDev As Integer = GvRow.DataKey("CveMoneda").ToEntero + Dim TotalCompraDev As Decimal = GvRow.DataKey("Original").ToDecimal + Dim IVADev As Decimal = GvRow.DataKey("IVA").ToDecimal + Dim IEPSDev As Decimal = GvRow.DataKey("IEPS").ToDecimal + PorcentajeCompraDevDinC = GvRow.DataKey("PorcentajeIVA").ToDecimal - Dim ObjCompras As New ClsCompras() - If ObjCompras.GetCompras(CveCompraDeCDin, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa) Then + Dim IVADevMN As Decimal = 0 + Dim IEPSDevMN As Decimal = 0 + Dim PorcentajeDevolucion As Decimal = ((ImporteAplicar * 100D / TotalCompraDev) / 100).RoundSQL(2) - Dim dr As DataRow = ObjCompras.DtResultados.Rows(0) - If dr IsNot Nothing Then + IVADev = Math.Round(IVADev * PorcentajeDevolucion, 2) + IEPSDev = Math.Round(IEPSDev * PorcentajeDevolucion, 2) - Dim CveMonedaDev As Integer = dr("CveMoneda").ToString.ToEntero - Dim TotalCompraDev As Decimal = dr("Total").ToString.ToDecimal + If tCveMoneda > 1 Then + IVADevMN = IVADev + IEPSDevMN = IEPSDev + Else + IVADevMN = (IVADev * If(CveMonedaDev = 1, 1, TxtTipoCambio.Text.ToDecimal)).RoundSQL(2) + IEPSDevMN = (IEPSDev * If(CveMonedaDev = 1, 1, TxtTipoCambio.Text.ToDecimal)).RoundSQL(2) + End If - Dim IVADev As Decimal = dr("IVA").ToString.ToDecimal - Dim IEPSDev As Decimal = dr("IEPS").ToString.ToDecimal - PorcentajeCompraDevDinC = ObjCompras.DtResultados.Rows(0)("PorcentajeIVA").ToString.ToDecimal + Dim ErrorDevolucionImpuestos As Boolean = False + If IVADev > 0 Then + If ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, -IVADev, -IVADevMN, 14, ReferenciaAplicar, ConceptoAplicar, CveIE:=CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteME:=-IVADev, PorcentajeImpuesto:=PorcentajeCompraDevDinC) Then - Dim IVADevMN As Decimal = 0 - Dim IEPSDevMN As Decimal = 0 - Dim PorcentajeDevolucion As Decimal = ((ImporteAplicar * 100D / TotalCompraDev) / 100).RoundSQL(2) - - IVADev = Math.Round(IVADev * PorcentajeDevolucion, 2) - IEPSDev = Math.Round(IEPSDev * PorcentajeDevolucion, 2) - - If tCveMoneda > 1 Then - IVADevMN = IVADev - IEPSDevMN = IEPSDev - Else - IVADevMN = (IVADev * If(CveMonedaDev = 1, 1, TxtTipoCambio.Text.ToDecimal)).RoundSQL(2) - IEPSDevMN = (IEPSDev * If(CveMonedaDev = 1, 1, TxtTipoCambio.Text.ToDecimal)).RoundSQL(2) - End If - - Dim ErrorDevolucionImpuestos As Boolean = False - - If IVADev > 0 Then - - If ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, -IVADev, -IVADevMN, 14, ReferenciaAplicar, ConceptoAplicar, CveIE:=CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteME:=-IVADev, PorcentajeImpuesto:=PorcentajeCompraDevDinC) Then - - If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, -IVADev, -IVADevMN, 19, ReferenciaAplicar, ConceptoAplicar, CveIE:=CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteME:=-IVADev, PorcentajeImpuesto:=PorcentajeCompraDevDinC) Then - MsgError = "Ocurrió un error al registrar el asiento de impuestos de devolución" - ErrorDevolucionImpuestos = True - End If - Else - MsgError = "Ocurrió un error al registrar el asiento de impuestos de devolución" - ErrorDevolucionImpuestos = True - End If - End If - - If ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, -IEPSDev, -IEPSDevMN, 25, ReferenciaAplicar, ConceptoAplicar, CveIE:=CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteME:=-IEPSDev) Then - - If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, -IEPSDev, -IEPSDevMN, 26, ReferenciaAplicar, ConceptoAplicar, CveIE:=CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteME:=-IEPSDev) Then - MsgError = "Ocurrió un error al registrar el asiento de impuestos de devolución" - ErrorDevolucionImpuestos = True - End If - Else + If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, -IVADev, -IVADevMN, 19, ReferenciaAplicar, ConceptoAplicar, CveIE:=CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteME:=-IVADev, PorcentajeImpuesto:=PorcentajeCompraDevDinC) Then MsgError = "Ocurrió un error al registrar el asiento de impuestos de devolución" ErrorDevolucionImpuestos = True End If - - If ErrorDevolucionImpuestos Then - MsgError = MsgError & " Error en devolución compra." - End If + Else + MsgError = "Ocurrió un error al registrar el asiento de impuestos de devolución" + ErrorDevolucionImpuestos = True End If End If + If IEPSDevMN <> 0 Then + If ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, -IEPSDev, -IEPSDevMN, 25, ReferenciaAplicar, ConceptoAplicar, CveIE:=CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteME:=-IEPSDev) Then + If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, -IEPSDev, -IEPSDevMN, 26, ReferenciaAplicar, ConceptoAplicar, CveIE:=CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteME:=-IEPSDev) Then + MsgError = "Ocurrió un error al registrar el asiento de impuestos de devolución" + ErrorDevolucionImpuestos = True + End If + Else + MsgError = "Ocurrió un error al registrar el asiento de impuestos de devolución" + ErrorDevolucionImpuestos = True + End If + End If + If ErrorDevolucionImpuestos Then + MsgError = MsgError & " Error en devolución compra." + End If + + End If Next + If TxtOtrosIngresosEgresos.Text.ToDecimal <> 0 Then + Dim Impo As Decimal = TxtOtrosIngresosEgresos.Text.ToDecimal + Dim TipoMovtoIE As Boolean + Dim CveConcIE As Integer + If Impo > 0 Then + TipoMovtoIE = True + Impo = Math.Abs(Impo) + CveConcIE = 78 + Else + TipoMovtoIE = False + Impo = Math.Abs(Impo) + CveConcIE = 211 + End If + + If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoIE, Impo, Impo, CveConcIE, ReferenciaAplicar, ConceptoAplicar, CveIE:=CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteME:=0, TipoCambio:=TCDocumento, CveSubProyecto:=CveSubProyecto) Then + MsgError = "Ocurrió un error al registrar el asiento de pago de devolución" + Exit Select + End If + End If Else If tCveMoneda > 1 Then @@ -2620,6 +2604,7 @@ Partial Class Bancos_IE 'CANCELA NC ImporteAplicar = ImporteAplicar - TxtOtrosIngresosEgresos.Text.ToDecimal ImporteAplicarMN = ImporteAplicar ' (ImporteAplicar * If(DdlMoneda.SelectedValue.ToEntero = 1, 1, TxtTipoCambio.Text.ToDecimal)).RoundSQL() + Dim ConPreP As ConceptosTipoSaldo = ClsPaginas.ObtenerCveConceptoPrePoliza(15, tCveMoneda, False, 1) If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, -(ImporteAplicar), (ImporteAplicarMN), 18, ReferenciaAplicar, ConceptoAplicar, CveIE:=CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteME:=ImporteAplicarME, TipoCambio:=TCCompra) Then MsgError = "Ocurrió un error al registrar el asiento de pago de devolución" @@ -2660,9 +2645,7 @@ Partial Class Bancos_IE End If 'IMPUESTOS - Dim PorcentajePagoDevDin = (TxtImporte.Text.ToDecimal / ImporteOriginalDevDin).RoundSQL(6) - Dim CveConceptoContableAplciar = -1 - + Dim PorcentajePagoDevDin As Decimal = (TxtImporte.Text.ToDecimal / ImporteOriginalDevDin).RoundSQL(6) Dim ObjCompras As New ClsCompras() If ObjCompras.GetCompras(CveCompraDeCDin, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa) Then @@ -3567,9 +3550,8 @@ Partial Class Bancos_IE Else ErrorCancelarComplemento = True End If - Else - Dim respCancelacion = ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscalCancelar, 0, RFCReceptorCancelar, UsuarioActual.Empresa.RFC, CvePACCancelacion, CveSATMotivoCancelacion:=CveSATMotivoCancelacion) + Dim respCancelacion As RespuestaCancelacionSAT = ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscalCancelar, 0, RFCReceptorCancelar, UsuarioActual.Empresa.RFC, CvePACCancelacion, CveSATMotivoCancelacion:=CveSATMotivoCancelacion) If respCancelacion.Verificado Then If Banc.UpdateComplementoPagoCancelado(CveComplementoPagoCancelar, 2, CvePACCancelacion, UsuarioActual.CveEmpresa, FechaCancelacion:=ObjCancelacion.CancelacionFecha, SelloCancelacion:=ObjCancelacion.CancelacionAcuse, CveSATMotivoCancelacion:=CveSATMotivoCancelacion) Then @@ -3578,7 +3560,6 @@ Partial Class Bancos_IE ErrorCancelarComplemento = False Alert("El complemento se cancelo correctamente.") End If - Else Alert("Se presento un error al cancelar el complemento.", TipoMensaje.MsgAdvertencia) ErrorCancelarComplemento = True @@ -3848,7 +3829,7 @@ Partial Class Bancos_IE End Sub Protected Sub BtnDescontabilizar_Click(sender As Object, e As EventArgs) Dim ObjConta As New ClsContabilidad - Dim Movimientos = ObjConta.GetMovimientosPoliza(IDPoliza, UsuarioActual.CveEmpresa) + Dim Movimientos As Integer = ObjConta.GetMovimientosPoliza(IDPoliza, UsuarioActual.CveEmpresa) 'Verifica que solo exista 1 compra asociada If Movimientos = 1 Then @@ -3888,7 +3869,7 @@ Partial Class Bancos_IE Dim ObjConta As New ClsContabilidad ObjConta.IniciaTransacSQL() - Dim ErrorCompra = False + Dim ErrorCompra As Boolean = False 'Elimina la poliza If (UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.Funcionalidad(200).ToString = "1") AndAlso IDPoliza > 0 Then @@ -3933,15 +3914,15 @@ Partial Class Bancos_IE #Region " CARGAR - COMPROBANTE " Protected Sub BtnConfirmaComprobante_Click(sender As Object, e As EventArgs) - Dim DirectorioGuardar = String.Format("{0}IE", UsuarioActual.Empresa.Ruta) - Dim ArchivoTemporal = String.Format("{0}Temp\{1}", UsuarioActual.Empresa.Ruta, Session("FileUpload").ToString) + Dim DirectorioGuardar As String = String.Format("{0}IE", UsuarioActual.Empresa.Ruta) + Dim ArchivoTemporal As String = String.Format("{0}Temp\{1}", UsuarioActual.Empresa.Ruta, Session("FileUpload").ToString) If Session("FileUpload").ToString <> String.Empty AndAlso File.Exists(ArchivoTemporal) Then Dim Extension As String = Path.GetExtension(ArchivoTemporal) Dim ObjIE As New ClsBancos ObjIE.IniciaTransacSQL() - Dim TieneError = False + Dim TieneError As Boolean = False If ObjIE.UpdateComprobanteIE(Extension.Replace("."c, ""), CveIE) Then If Not Directory.Exists(DirectorioGuardar) Then Directory.CreateDirectory(DirectorioGuardar) @@ -4094,8 +4075,6 @@ Partial Class Bancos_IE #Region "PAGO ACREEDORES" Private Sub CargaIEIngresos() Dim ObjMov As New ClsMovimientos - - If HdnCveProveedor.Value.ToEntero > 0 Then DivIEAcreedor.Visible = True DdlIEDevolucion.Items.Clear() @@ -4254,8 +4233,6 @@ Partial Class Bancos_IE If DdlCuentaDeposito.SelectedValue.ToEntero > 0 Then If Dep.GetCuentasDepositos(CveProveedor:=CveProveedor, CveCuentaDeposito:=DdlCuentaDeposito.SelectedValue.ToEntero) AndAlso Dep.DtResultados.Rows.Count = 1 Then - - If Dep.DtResultados.Rows.Count > 0 Then If Dep.DtResultados.Rows(0)("TieneCIE").ToString.ToEntero = 1 Then @@ -4266,41 +4243,28 @@ Partial Class Bancos_IE OriReferenciaCIE = Dep.DtResultados.Rows(0)("Referencia").ToString OriConceptoCIE = Dep.DtResultados.Rows(0)("ConceptoCIE").ToString - - Else TrReferenciaCIE.Visible = False End If - - If Boolean.Parse(Dep.DtResultados.Rows(0)("EstatusPagoElectronicoGrupos").ToString) AndAlso Dep.DtResultados.Rows(0)("CveSATBanco").ToString.ToEntero <= 0 Then Alert("Es necesario establecer el banco de la cuenta deposito", TipoMensaje.MsgAdvertencia) BtnGuardar.Enabled = False Else BtnGuardar.Enabled = True End If - Else TrReferenciaCIE.Visible = False End If - Else TrReferenciaCIE.Visible = False End If - - Else TrReferenciaCIE.Visible = False End If - - - Dep.Dispose() UpCuentaDeposito.Update() UpGuardar.Update() - - End Sub #End Region @@ -4318,15 +4282,12 @@ Partial Class Bancos_IE Private Sub BtnRemove_Click(sender As Object, e As EventArgs) Handles BtnRemove.Click - - If Not TxtDescripcion.Text = "" Then If ChkConciliado.Checked Then Alert("El documento seleccionado no se puede eliminar porque se encuentra conciliado.", TipoMensaje.MsgError) Exit Sub End If - Dim ObjAC As ClsContPAQi = Nothing Dim Banc As New ClsBancos Dim ObjConta As New ClsContabilidad(Banc.IniciaTransacSQL()) @@ -4356,7 +4317,7 @@ Partial Class Bancos_IE End If If Borrar = True Then - Dim ErrorCompra = False + Dim ErrorCompra As Boolean = False Dim MsgEliminar As String = "" 'VERIFICA SI EL IES ESTA VINCULADO A UNA SOLICITUD VIATICO @@ -4448,7 +4409,7 @@ Partial Class Bancos_IE If ObjOC.GetSolicitudAnticipo(CveOCSolicitudAnticipo, UsuarioActual.CveEmpresa) AndAlso ObjOC.DtResultados.Rows.Count > 0 Then - Dim DrOC = ObjOC.DtResultados.FiltroPrimero("") + Dim DrOC As DataRow = ObjOC.DtResultados.FiltroPrimero("") If DrOC("TipoTermino").ToString.ToEntero.Contiene(0, 3) Then TxtObservaciones.Text = DrOC("Descripcion").ToString @@ -5043,10 +5004,9 @@ Partial Class Bancos_IE End Try End Sub - Protected Sub LnkEliminaMovComprobacion_Click(sender As Object, e As EventArgs) Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow) - Dim TieneError = False + Dim TieneError As Boolean = False If GvRH.Rows(gvRow.RowIndex).DataKey("CveIE").ToEntero > 0 Then Dim ObjBancos As New ClsBancos ObjBancos.IniciaTransacSQL() @@ -5428,7 +5388,7 @@ Partial Class Bancos_IE End If Else - Dim resp = ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscalCancelar, 0, RFCReceptorCancelar, UsuarioActual.Empresa.RFC, CvePACCancelacion, CveSATMotivoCancelacion:=CveSATMotivoCancelacion) + Dim resp As RespuestaCancelacionSAT = ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscalCancelar, 0, RFCReceptorCancelar, UsuarioActual.Empresa.RFC, CvePACCancelacion, CveSATMotivoCancelacion:=CveSATMotivoCancelacion) If resp.Verificado Then If ObjBanco.UpdateComplementoPagoCancelado(CveComplementoPagoCancelar, 2, CvePACCancelacion, UsuarioActual.CveEmpresa, FechaCancelacion:=ObjCancelacion.CancelacionFecha, SelloCancelacion:=ObjCancelacion.CancelacionAcuse, CveSATMotivoCancelacion:=CveSATMotivoCancelacion) Then @@ -5596,7 +5556,7 @@ Partial Class Bancos_IE Dim respuesta As Boolean = False - Dim Vigencia = Timbrado.VerificarVigenciaSAT(FolioFiscal, RFCDe, RFCReceptor, "0", True) + Dim Vigencia As Timbrado.AcuseCancelacionSAT = Timbrado.VerificarVigenciaSAT(FolioFiscal, RFCDe, RFCReceptor, "0", True) If Vigencia IsNot Nothing Then If Vigencia.Estado.ToUpper = "CANCELADO" Then From 54bc6b4b89ca4fe5db33f80f48b501f83c4ef817 Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 6 Oct 2023 19:22:40 -0700 Subject: [PATCH 038/100] =?UTF-8?q?correcci=C3=B3n=20retisr?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bancos/PopIECompras.aspx.vb | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/Bancos/PopIECompras.aspx.vb b/Bancos/PopIECompras.aspx.vb index f7927997a..8688ade3a 100644 --- a/Bancos/PopIECompras.aspx.vb +++ b/Bancos/PopIECompras.aspx.vb @@ -515,8 +515,8 @@ Partial Class Bancos_PopIECompras CompraActual.IEPS = dr("IEPS").ToString.ToDecimal CompraActual.RetIVA = dr("RetIVA").ToString.ToDecimal CompraActual.RetISR = dr("RetISR").ToString.ToDecimal - CompraActual.CveConceptoRetISR = dr("CveRetIVAConcepto").ToString.ToEntero - CompraActual.CveConceptoRetIVA = dr("CveRetISRConcepto").ToString.ToEntero + CompraActual.CveConceptoRetIVA = dr("CveRetIVAConcepto").ToString.ToEntero + CompraActual.CveConceptoRetISR = dr("CveRetISRConcepto").ToString.ToEntero CompraActual.PorcentajeIVA = dr("PorcentajeIVA").ToString.ToDecimal CompraActual.UsuarioActual = UsuarioActual CompraActual.CveSubProyecto = dr("CveSubProyecto").ToString.ToEntero @@ -868,7 +868,7 @@ Partial Class Bancos_PopIECompras Dim Folio As Long Dim dr As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("CveCuenta = " & DdlCuenta.SelectedValue) - Dim TCveMoneda = -1 + Dim TCveMoneda As Integer = -1 If dr IsNot Nothing Then If ChkPagarPesos.Checked Then @@ -925,10 +925,6 @@ Partial Class Bancos_PopIECompras 'For Each Row As DataRow In objGastosXComprobar.DtResultados.FiltraParametros("CvePersonal > 0 AND FechaDocumento IS NOT NULL").Rows ' ArrIE.Add(New Anticipos With {.CveIE = Row("CveIE").ToString.ToEntero, .Importe = Row("Saldo").ToString.ToDecimal, .CvePersonal = Row("CvePersonal").ToString.ToEntero}) 'Next - - - - Dim ObjMovtos As New ClsMovimientos RowCheque.Visible = True @@ -945,17 +941,9 @@ Partial Class Bancos_PopIECompras ObjMovtos.Dispose() DDlCheques.DataBind() 'EstaAsociadoAPersonal = True - - DDlCheques_SelectedIndexChanged(DDlCheques, EventArgs.Empty) - - UpDatos.Update() - 'End If - - - End Sub Protected Sub DDlCheques_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DDlCheques.SelectedIndexChanged @@ -1224,7 +1212,7 @@ Partial Class Bancos_PopIECompras Dim dtc As DataTable = GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, CveProveedor:=CveProveedor, CveCuentaDeposito:=DdlCuentaDeposito.SelectedValue.ToEntero) If dtc IsNot Nothing Then - Dim Row = dtc.FiltroPrimero("") + Dim Row As DataRow = dtc.FiltroPrimero("") If Row IsNot Nothing AndAlso Row("Estatus").ToString = "False" Then Alert("La cuenta depósito del proveedor esta inactiva.", TipoMensaje.MsgAdvertencia) Exit Sub @@ -1245,7 +1233,7 @@ Partial Class Bancos_PopIECompras Dim CvePlantillaPoliza As Integer = 2 Dim ConceptoPoliza As String = String.Format("{0} {1}", NombreProveedor, SerieFolio) Dim CveCuentaDeposito As Integer = If(DdlCuentaDeposito.Items.Count > 0, DdlCuentaDeposito.SelectedValue.ToEntero, 0) - Dim FechaDocumento = FechaCompra + Dim FechaDocumento As Date = FechaCompra 'Saca moneda en que se va a pagar segun metodo de pago Select Case RBLContado.SelectedValue @@ -1262,8 +1250,10 @@ Partial Class Bancos_PopIECompras End Select 'cuando es pago con ventas, debe de ser de Diario - Dim CveTipoPoliza As Integer = ObjMov.ObtenerTipoPoliza(DdlTipoTransaccion.SelectedValue, "-1", UsuarioActual.CveEmpresa) + Dim CveTipoPoliza As Integer = -1 If RBLContado.SelectedValue = "6" Then CveTipoPoliza = 3 + 'cuando es la cuenta es tipo cajachica,el tipo de póliza es diario + If GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveCuenta:=DdlCuenta.SelectedValue.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveTipoCuenta") = "1" Then CveTipoPoliza = 3 Dim CvePrePoliza As Integer = ObjMov.AddPrePolizas("Bancos/PopIECompras", CvePlantillaPoliza, ImportePagado, ImportePagado, CveMoneda, Fecha, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=CveTipoPoliza) From 2690361d7a258e5928fa27fd8f36c43262dd295c Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 7 Oct 2023 11:50:13 -0700 Subject: [PATCH 039/100] =?UTF-8?q?--=20correci=C3=B3n=20carga=20estado=20?= =?UTF-8?q?en=20comercio=20exterior?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ventas/Ventas.aspx.vb | 1 + 1 file changed, 1 insertion(+) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index a8b88ab78..c3e110fea 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -6534,6 +6534,7 @@ Partial Class Ventas Else TxtComExtEstado.Visible = True : DdlComExtEstado.Visible = False End If + TxtComExtEstado.Text = ObjCliente.ComExtEstado TxtComExtMunicipio.Text = ObjCliente.ComExtMunicipio TxtComExtColonia.Text = ObjCliente.ComExtColonia TxtComExtMunicipio.Visible = True : TxtComExtColonia.Visible = True From be6e9812fae3b6e9d3935c2bb814b0518ef7b1b0 Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 7 Oct 2023 11:50:33 -0700 Subject: [PATCH 040/100] cambio funcion en tipo de fechas --- App_Code/ClsMovimientos.vb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/App_Code/ClsMovimientos.vb b/App_Code/ClsMovimientos.vb index a63389698..bbe8139c8 100644 --- a/App_Code/ClsMovimientos.vb +++ b/App_Code/ClsMovimientos.vb @@ -1481,7 +1481,7 @@ Public Class ClsMovimientos #End Region #Region "Anticipos de Proveedores" - Public Function GetAnticiposProveedor(CveProveedor As Integer, CveProveedorSucursal As Integer, Optional CveMoneda As Integer = -1, Optional SelectTop As Integer = -1, Optional FechaI As String = "-1", Optional FechaF As String = "-1", Optional TipoDocto As String = "-1") As Boolean + Public Function GetAnticiposProveedor(CveProveedor As Integer, CveEmpresa As Integer, Optional CveMoneda As Integer = -1, Optional CveProveedorSucursal As Integer = -1, Optional SelectTop As Integer = -1, Optional FechaI As Date = MinFecha, Optional FechaF As Date = MaxFecha, Optional TipoDocto As String = "-1") As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Comp_ProveedorAnticipos") @@ -1489,13 +1489,13 @@ Public Class ClsMovimientos .Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor .Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda .Add("@CveProveedorSucursal", SqlDbType.Int).Value = CveProveedorSucursal - .Add("@SelectTop", SqlDbType.Int).Value = SelectTop - .Add("@FechaI", SqlDbType.VarChar).Value = FechaI - .Add("@FechaF", SqlDbType.VarChar).Value = FechaF + .Add("@SelectTop", SqlDbType.Int).Value = SelectTop + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@FechaI", SqlDbType.Date).Value = FechaI + .Add("@FechaF", SqlDbType.Date).Value = FechaF .Add("@TipoDocto", SqlDbType.VarChar).Value = TipoDocto End With - Try SqlAdapter.Fill(Data) Retorno = True From 7863cb8444f6a1d1fadbd50859399d14d393a5d0 Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 7 Oct 2023 11:50:52 -0700 Subject: [PATCH 041/100] -- actualzar prepolza con TC --- App_Code/ClsContabilidad.vb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb index f5eaa75ab..0f769cbbf 100644 --- a/App_Code/ClsContabilidad.vb +++ b/App_Code/ClsContabilidad.vb @@ -292,7 +292,7 @@ Public Class ClsContabilidad Public Function UpdatePrePolizasDetalle(CvePrePolizaDetalle As Integer, Concepto As String, CveSubProyecto As Integer, IdCtaContable As Integer, TipoMovto As Boolean, ImporteMN As Decimal, Optional CveTipoGasto As Integer = -1, Optional CveConceptoContable As Integer = -1, Optional CveProveedor As Integer = -1, Optional CveCompra As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveCliente As Integer = -1, Optional CveVenta As Integer = -1, - Optional Referencia As String = "-1", Optional CveUsuarioModifico As Integer = -1, Optional CveCuenta As Integer = -1, Optional PorcentajeImpuesto As Decimal = -1, Optional Importe As Decimal = -1, Optional CveIE As Integer = -1) As Boolean + Optional Referencia As String = "-1", Optional CveUsuarioModifico As Integer = -1, Optional CveCuenta As Integer = -1, Optional PorcentajeImpuesto As Decimal = -1, Optional Importe As Decimal = -1, Optional CveIE As Integer = -1, Optional TipoCambio As Decimal = -1) As Boolean Dim Retorno As Boolean = False @@ -305,7 +305,7 @@ Public Class ClsContabilidad .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto .Add("@IdCtaContable", SqlDbType.Int).Value = IdCtaContable .Add("@TipoMovto", SqlDbType.Bit).Value = TipoMovto - '.Add("@Importe", SqlDbType.Money).Value = Importe + .Add("@TipoCambio", SqlDbType.Decimal).Value = TipoCambio .Add("@ImporteMN", SqlDbType.Money).Value = ImporteMN .Add("@CveTipoGasto", SqlDbType.Int).Value = CveTipoGasto .Add("@CveConceptoContable", SqlDbType.Int).Value = CveConceptoContable From 06dbde133299b2cf544089af5ad59f51d3f7133f Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 7 Oct 2023 11:51:18 -0700 Subject: [PATCH 042/100] =?UTF-8?q?--=20cambio=20en=20parametros=20obtenci?= =?UTF-8?q?=C3=B3n=20de=20anticipos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Compras/Proveedores.aspx.vb | 18 +++++++----------- PortalProveedor/PortalProveedor.aspx.vb | 4 ++-- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/Compras/Proveedores.aspx.vb b/Compras/Proveedores.aspx.vb index 8cfa32948..7e10dd96d 100644 --- a/Compras/Proveedores.aspx.vb +++ b/Compras/Proveedores.aspx.vb @@ -8,8 +8,6 @@ Imports System.Xml Imports Microsoft.Reporting.WebForms Imports System.IO Imports System.Globalization -Imports System.Data.SqlClient -'Imports VBIDE Partial Class Compras_Proveedores Inherits ClsPaginas @@ -1119,10 +1117,9 @@ Partial Class Compras_Proveedores Private Sub CargaAnticipos(CveProveedorSucursal As Integer, Optional SelectTop As Integer = -1) Dim ObjMovtos As New ClsMovimientos() - If ObjMovtos.GetAnticiposProveedor(CveProveedor, If(CveProveedorSucursal = 0, -1, CveProveedorSucursal), CveMonedaFiltro, -1) AndAlso ObjMovtos.DtResultados.Rows.Count > 0 Then + If ObjMovtos.GetAnticiposProveedor(CveProveedor, UsuarioActual.CveEmpresa, CveMoneda:=CveMonedaFiltro, CveProveedorSucursal:=If(CveProveedorSucursal = 0, -1, CveProveedorSucursal)) AndAlso ObjMovtos.DtResultados.Rows.Count > 0 Then CountAnticipos = ObjMovtos.DtResultados.FiltraParametros(" Tipo = 'Act' AND TipoDocto <> '' AND (CveCompra > 0 OR CveIE > 0) ").Rows.Count - LblVencidoPesosAnt.Text = String.Format("{0}", ObjMovtos.DtResultados.SUM("Saldo", "CveMoneda = 1 And DiasVencidos > 0")).FormatoNumero LblTotalPesosAnt.Text = String.Format("{0}", ObjMovtos.DtResultados.SUM("Saldo", "CveMoneda = 1 ")).FormatoNumero LblPorVencerPesosAnt.Text = CType(LblTotalPesosAnt.Text.ToDouble - LblVencidoPesosAnt.Text.ToDouble, String).FormatoNumero @@ -1134,7 +1131,6 @@ Partial Class Compras_Proveedores LblTipoCambioAnt.Text = GlobalTipoCambio.ToString.FormatoNumero LblTotalAnt.Text = (LblTotalPesosAnt.Text.ToDouble + (LblTotalDolaresAnt.Text.ToDouble * LblTipoCambioAnt.Text.ToDouble)).ToString.FormatoNumero - If SelectTop > 0 Then If ObjMovtos.DtResultados.FiltraParametros("Tipo = 'Act'").Rows.Count > 0 Then DtAntNC = ObjMovtos.DtResultados.FiltraParametros("Tipo = 'Act'") @@ -2032,7 +2028,7 @@ Partial Class Compras_Proveedores End Sub - Private Function AltaCuentaContabilidadSIG(CodigoCuentaAltaCompaq As String, NombreCuentaCuentaAltaCompaq As String, IdCuentaAltaCompaq As Integer, CveConceptoContable As Integer, Optional Transaccion As SqlTransaction = Nothing, Optional IdCompaqPadre As Integer = -1, Optional CveProveedorCuenta As Integer = -1) As Boolean + Private Function AltaCuentaContabilidadSIG(CodigoCuentaAltaCompaq As String, NombreCuentaCuentaAltaCompaq As String, IdCuentaAltaCompaq As Integer, CveConceptoContable As Integer, Optional Transaccion As SqlClient.SqlTransaction = Nothing, Optional IdCompaqPadre As Integer = -1, Optional CveProveedorCuenta As Integer = -1) As Boolean If Not UsuarioActual.CveEmpresa.Contiene(7, 11, 145, 122) Then Return True @@ -4105,10 +4101,10 @@ Partial Class Compras_Proveedores 'OBTENEMOS LOS DATOS Dim DtANC As DataTable - Dim FI As String = If(TxtFechaInicioCXP.Text = "" Or TxtFechaInicioCXP.Text = "__/__/____", "-1", TxtFechaInicioCXP.Text) - Dim FF As String = If(TxtFechaFinCXP.Text = "" Or TxtFechaFinCXP.Text = "__/__/____", "-1", TxtFechaFinCXP.Text) + Dim FI As Date = If(TxtFechaInicioCXP.Text = "" Or TxtFechaInicioCXP.Text = "__/__/____", MinFecha, TxtFechaInicioCXP.Text.ToDate) + Dim FF As Date = If(TxtFechaFinCXP.Text = "" Or TxtFechaFinCXP.Text = "__/__/____", MaxFecha, TxtFechaFinCXP.Text.ToDate) Dim CveProveedorSucursal As Integer = RBSucursal.SelectedValue.ToEntero() - If ObjMovtos.GetAnticiposProveedor(CveProveedor, If(CveProveedorSucursal = 0, -1, CveProveedorSucursal), CveMoneda, -1, FI, FF) Then + If ObjMovtos.GetAnticiposProveedor(CveProveedor, UsuarioActual.CveEmpresa, CveMoneda:=CveMoneda, CveProveedorSucursal:=If(CveProveedorSucursal = 0, -1, CveProveedorSucursal), FechaI:=FI, FechaF:=FF) Then DtANC = If(DdlTipoCuentasCxP.SelectedValue = "-1", ObjMovtos.DtResultados, ObjMovtos.DtResultados.FiltraParametros("Tipo = 'Act'", "Moneda, FechaVencimiento")) Else DtANC = Nothing @@ -4123,8 +4119,8 @@ Partial Class Compras_Proveedores params.Add(New ReportParameter("DireccionEmpresa", UsuarioActual.Empresa.Direccion)) params.Add(New ReportParameter("TipoCuentas", DdlTipoCuentasCxP.SelectedItem.Text)) params.Add(New ReportParameter("NombreProveedor", LtlProveedor.Text)) - params.Add(New ReportParameter("FechaInicio", FI)) - params.Add(New ReportParameter("FechaFin", FF)) + params.Add(New ReportParameter("FechaInicio", FI.ToShortDateString)) + params.Add(New ReportParameter("FechaFin", FF.ToShortDateString)) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) ImprimirPDF("Empresas/Grales/Formatos/RepAntNC.rdlc", DtANC, params, "RepAnticiposProveedor", Formato) diff --git a/PortalProveedor/PortalProveedor.aspx.vb b/PortalProveedor/PortalProveedor.aspx.vb index acc01a29f..736ff1e4f 100644 --- a/PortalProveedor/PortalProveedor.aspx.vb +++ b/PortalProveedor/PortalProveedor.aspx.vb @@ -397,7 +397,7 @@ Partial Class Portal_PortalProveedor End Sub Private Sub CargaAnticipos(SerieSucursal As String, SelectTop As Integer) Dim ObjMovtos As New ClsMovimientos() - If ObjMovtos.GetAnticiposProveedor(CveProveedor, -1, SelectTop:=SelectTop) Then + If ObjMovtos.GetAnticiposProveedor(CveProveedor, UsuarioActual.CveEmpresa, SelectTop:=SelectTop) Then If ObjMovtos.DtResultados.Rows.Count > 0 Then Dim dtA, dtAH As DataTable @@ -1253,7 +1253,7 @@ Partial Class Portal_PortalProveedor Protected Function ImprimirReporteCxPPagadas(Optional Formato As String = "PDF") As Byte() Dim retorno As Byte() = Nothing Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png") - Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + Dim logouri As String = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) Dim ImagenADSistemas As New System.IO.FileInfo(Server.MapPath("~") & "/Imagenes/LogoSinFondochico.png") Dim LogoADSistemasUri As String = String.Format("{0}://{1}:{2}/Imagenes/LogoSinFondochico.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port) From 3edc464593b258fb90cb14c685cc3f06b27548f4 Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 7 Oct 2023 11:51:34 -0700 Subject: [PATCH 043/100] =?UTF-8?q?parametros=20obtencii=C3=B3n=20parametr?= =?UTF-8?q?os?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bancos/IE.aspx.vb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb index 9a5858990..cb3668154 100644 --- a/Bancos/IE.aspx.vb +++ b/Bancos/IE.aspx.vb @@ -1362,7 +1362,7 @@ Partial Class Bancos_IE Dim ObjMovtos As New ClsMovimientos() If CvemonedaInterna > 0 Then - If ObjMovtos.GetAnticiposProveedor(CveProveedor, -1, CvemonedaInterna, -1) AndAlso ObjMovtos.DtResultados.FiltraParametros("TipoDocto = 'NC'").Rows.Count > 0 Then + If ObjMovtos.GetAnticiposProveedor(CveProveedor, UsuarioActual.CveEmpresa, CveMoneda:=CvemonedaInterna, TipoDocto:="NC") AndAlso ObjMovtos.DtResultados.Rows.Count > 0 Then GvA.DataSource = ObjMovtos.DtResultados.FiltraParametros("TipoDocto = 'NC' and Saldo > 0 and CveCompra > 0") Else GvA.DataSource = Nothing @@ -1372,7 +1372,6 @@ Partial Class Bancos_IE End If ObjMovtos.Dispose() - GvA.DataBind() UpGvNotas.Update() End Sub From 60da5e5527a6f4e75cd481d513430d5960e08ad8 Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 7 Oct 2023 11:53:09 -0700 Subject: [PATCH 044/100] -- activar el pais Guatemala para E119 --- Ventas/Clientes.aspx.vb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index 8feea470a..6ac0cdef3 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -6014,6 +6014,10 @@ Partial Class Clientes divCorreoEntregaAlmacen.Visible = True End If + If UsuarioActual.CveEmpresa = 119 Then + DdlSATPais.Items.Add(New ListItem("Guatemala", "GTM")) + End If + End Sub Protected Sub BtnCargaExcel_Click(sender As Object, e As EventArgs) Handles BtnCargaExcel.Click From a36649a8c482ceb7a6f68cddee2c4caaea94a132 Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 7 Oct 2023 11:53:43 -0700 Subject: [PATCH 045/100] -- solo cargar cuentas al editar o agregar --- Contabilidad/RegPrePolizaS.aspx.vb | 71 ++++++++++++++++-------------- 1 file changed, 39 insertions(+), 32 deletions(-) diff --git a/Contabilidad/RegPrePolizaS.aspx.vb b/Contabilidad/RegPrePolizaS.aspx.vb index 8901c767e..62845214d 100644 --- a/Contabilidad/RegPrePolizaS.aspx.vb +++ b/Contabilidad/RegPrePolizaS.aspx.vb @@ -261,6 +261,7 @@ Partial Class ContabilidadC_RegPrePolizaS CveMoneda = 1 ViewState("CvePrePoliza") = 0 ViewState("CvePeriodo") = "0" + ViewState("CvePeriodo") = "0" CveTipoTransaccion = -1 CveCuenta = -1 @@ -270,7 +271,6 @@ Partial Class ContabilidadC_RegPrePolizaS Beneficiario = "-1" Actualizar = False IdPoliza = -1 - CargaCtaContableE() CargaConceptosContablesE() CargaModalConceptoCuentas() @@ -319,7 +319,6 @@ Partial Class ContabilidadC_RegPrePolizaS ElseIf Request("CvePrePolizaOrigen") IsNot Nothing AndAlso IsNumeric(Request("CvePrePolizaOrigen")) AndAlso Request("CvePrePolizaOrigen").ToEntero > 0 Then - CvePrePolizaOrigen = Request("CvePrePolizaOrigen").ToEntero CreaDT() CargaPrePolizaOrigen() @@ -342,7 +341,6 @@ Partial Class ContabilidadC_RegPrePolizaS End If - TipoPlantilla = -1 If IfNull(Request("Tipo"), "").ToString = "Ing" Then TipoPlantilla = 1 @@ -355,13 +353,10 @@ Partial Class ContabilidadC_RegPrePolizaS CargaConceptos() CargaSubProyectos() - CargaCuentasContables() + CargaCuentasBancos() 'crea tabla temporal ArregloMovs = New ArrayList - - CargaCuentas() - If IfNull(Request("Tipo"), "").ToString <> "NOMPROV" Then GvPrePoliza.Columns(5).Visible = False GvMov.Columns(5).Visible = False @@ -663,17 +658,20 @@ Partial Class ContabilidadC_RegPrePolizaS End Sub Private Sub CargaCuentasContables() - Dim ObjConta As New ClsContabilidad - If ObjConta.GetCuentas(-1, "-1", 1, UsuarioActual.CveEmpresa) Then - DdlCuentaContableE.DataSource = ObjConta.DtResultados - DdlCuentaContable.DataSource = ObjConta.DtResultados - DtCuentasContables = ObjConta.DtResultados + + If DdlCuentaContable.Items.Count = 0 Then + Dim ObjConta As New ClsContabilidad + If ObjConta.GetCuentas(-1, "-1", 1, UsuarioActual.CveEmpresa) Then + DdlCuentaContableE.DataSource = ObjConta.DtResultados + DdlCuentaContable.DataSource = ObjConta.DtResultados + DtCuentasContables = ObjConta.DtResultados + End If + ObjConta.Dispose() + DdlCuentaContable.DataBind() + DdlCuentaContable.Items.Insert(0, New ListItem("Seleccione", "0")) + DdlCuentaContableE.DataBind() + DdlCuentaContableE.Items.Insert(0, New ListItem("Sin Asignar", "0")) End If - ObjConta.Dispose() - DdlCuentaContable.DataBind() - DdlCuentaContable.Items.Insert(0, New ListItem("Seleccione", "0")) - DdlCuentaContableE.DataBind() - DdlCuentaContableE.Items.Insert(0, New ListItem("Sin Asignar", "0")) End Sub Private Sub CargaTiposGasto() @@ -1170,7 +1168,9 @@ Partial Class ContabilidadC_RegPrePolizaS CveTipoGasto:=If(DdlTipoGasto.Visible, row.DataKey("CveTipoGasto").ToEntero, row.DataKey("CveTipoGasto").ToEntero), CveConceptoContable:=row.DataKey("CveConceptoContable").ToEntero, CveProveedor:=row.DataKey("CveProveedor").ToEntero, CveCompra:=row.DataKey("CveCompra").ToEntero, CveCliente:=row.DataKey("CveCliente").ToEntero, CveVenta:=row.DataKey("CveVenta").ToEntero, - CvePersonal:=row.DataKey("CvePersonal").ToEntero, Referencia:=row.FCLiteral("TxtRef").Text, CveCuenta:=row.DataKey("CveCuenta").ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario, CveIE:=CveIEAgregado) Then + CvePersonal:=row.DataKey("CvePersonal").ToEntero, Referencia:=row.FCLiteral("TxtRef").Text, + TipoCambio:=row.DataKey("TC").ToDecimal, + CveCuenta:=row.DataKey("CveCuenta").ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario, CveIE:=CveIEAgregado) Then OcurrioError = True Exit For End If @@ -1218,6 +1218,14 @@ Partial Class ContabilidadC_RegPrePolizaS OnError("Ocurrío un error al actualizar la PrePoliza", ex) End Try + If ObjContabilidad.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual) Then + If ObjContabilidad.ValorPolizaDescuadre > 0 Then + OcurrioError = True + Alert("Error en validacion de prepoliza cuadre", TipoMensaje.MsgAdvertencia) + GuardaLogAD($"Compras/Compras-Actualizar | Error:{ObjContabilidad.MensajePolizaDescuadre} Diferencia:{ObjContabilidad.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas") + End If + End If + If Not OcurrioError Then ObjContabilidad.Commit() Alert("La PrePoliza se actualizó correctamente.", TipoMensaje.MsgInformacion, JSBtnAceptar:=$"window.location.href=""./RegPrePolizaS.aspx?CvePrePoliza={Me.CvePrePoliza}""", ShowCloseButton:=False) @@ -1241,6 +1249,7 @@ Partial Class ContabilidadC_RegPrePolizaS LtlTitulo.Text = "Agregar Concepto" BtnAceptar.Text = "Agregar" LimpiaCampos() + CargaCuentasContables() 'CargaConceptosContablesE() CargaSubProyectoE() @@ -1282,7 +1291,6 @@ Partial Class ContabilidadC_RegPrePolizaS DdlConceptosContablesE.SelectedValueExist(CveConceptoContable) DdlConceptosContablesE_SelectedIndexChanged(DdlConceptosContablesE, e) - TxtTipoCambio.Text = GvPrePoliza.Rows(IndiceGrid).DataKey("TC").ToString.ToDecimal.ToString("###,###,###.####") TxtME.Text = GvPrePoliza.Rows(IndiceGrid).DataKey("ImporteME").ToDecimal.FormatoNumero @@ -1318,7 +1326,7 @@ Partial Class ContabilidadC_RegPrePolizaS DdlSubProyectoE.SelectedValueExist(CveSubProyecto) CargaTipoGastoE() DdlTipoGastoE.SelectedValueExist(CveTipoGasto) - + CargaCuentasContables() DdlCuentaContableE.SelectedValueExist(CveCuenta) If Cargo <> 0 Then TxtCargoE.Text = Cargo.FormatoNumero @@ -1339,7 +1347,6 @@ Partial Class ContabilidadC_RegPrePolizaS End If - If DdlConceptosContablesE.SelectedValue.ToEntero = 30 AndAlso CvePrePoliza > 0 Then DdlConceptosContablesE.Enabled = False Else @@ -1371,16 +1378,16 @@ Partial Class ContabilidadC_RegPrePolizaS DdlTipoGastoE.DataBind() DdlTipoGastoE.Items.Insert(0, New ListItem("Sin Asignar", "0")) End Sub - Private Sub CargaCtaContableE() - Dim ObjConta As New ClsContabilidad - If ObjConta.GetCuentas(-1, "-1", 1, UsuarioActual.CveEmpresa) Then - DdlCuentaContableE.DataSource = ObjConta.DtResultados - End If - ObjConta.Dispose() + 'Private Sub CargaCtaContableE() + ' Dim ObjConta As New ClsContabilidad + ' If ObjConta.GetCuentas(-1, "-1", 1, UsuarioActual.CveEmpresa) Then + ' DdlCuentaContableE.DataSource = ObjConta.DtResultados + ' End If + ' ObjConta.Dispose() - DdlCuentaContableE.DataBind() - DdlCuentaContableE.Items.Insert(0, New ListItem("Sin Asignar", "0")) - End Sub + ' DdlCuentaContableE.DataBind() + ' DdlCuentaContableE.Items.Insert(0, New ListItem("Sin Asignar", "0")) + 'End Sub Private Sub DdlConceptosContablesE_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlConceptosContablesE.SelectedIndexChanged @@ -1982,7 +1989,7 @@ Partial Class ContabilidadC_RegPrePolizaS DdlTipoTransaccion.DataBind() DdlTipoTransaccion.Items.Insert(0, New ListItem("Seleccione Tipo Movimiento", "-1")) End Sub - Private Sub CargaCuentas() + Private Sub CargaCuentasBancos() DdlCuenta.Items.Clear() DdlCuenta.DataSource = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa) '.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta <> 1", DdlMoneda.SelectedValue)) DdlCuenta.DataBind() @@ -2102,11 +2109,11 @@ Partial Class ContabilidadC_RegPrePolizaS Actualizar = True GvMov.DataKeys(e.NewEditIndex).Value.ToString.ToEntero Dim idMov As Integer = GvMov.DataKeys(e.NewEditIndex).Value.ToString.ToEntero - Dim DrM As DataRow = DtMovimientos.Rows(e.NewEditIndex) If DrM IsNot Nothing Then HdnCve.Value = idMov.ToString + CargaCuentasContables() DdlCuentaContable.SelectedValueExist(DrM("CveCuenta").ToString) TxtReferencia.Text = DrM("Referencia").ToString From 2df7c3976cbe1bcf709ea0b27c8e17e0578829a6 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Mon, 9 Oct 2023 11:54:34 -0700 Subject: [PATCH 046/100] Empresas Zona Horaria --- App_Code/ClsMovimientos.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/App_Code/ClsMovimientos.vb b/App_Code/ClsMovimientos.vb index bbe8139c8..b9663aa48 100644 --- a/App_Code/ClsMovimientos.vb +++ b/App_Code/ClsMovimientos.vb @@ -120,7 +120,7 @@ Public Class ClsMovimientos Public Function GetCxCClienteDetalle(CveCliente As Integer, FechaI As String, FechaF As String, CveMoneda As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, CveClienteSucursal As Integer, Optional TipoDocto As String = "-1", Optional FechaCorte As Date = MaxFecha, Optional FechaVencimientoI As Date = MinFecha, Optional FechaVencimientoF As Date = MaxFecha) As Boolean Dim Retorno As Boolean = False - FechaCorte = IIf(FechaCorte = Nothing, Date.Now.AddYears(1), FechaCorte).ToString.ToDate + FechaCorte = IIf(FechaCorte = Nothing, NowADS().AddYears(1), FechaCorte).ToString.ToDate DataAdapter("PA_Vta_ClienteCxC") With SqlAdapter.SelectCommand.Parameters From f43b7759a8dc83d64c03e70cadb9cbd2026dc481 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Mon, 9 Oct 2023 11:54:42 -0700 Subject: [PATCH 047/100] Empresas Zona Horaria --- AC/PresupuestoEgresosAnterior.aspx.vb.exclude | 6 +- AC/RegComprometido.aspx.vb | 14 +- AC/RegDevengadoIngresos.aspx.vb | 16 +- AC/RegEgresosModificaciones.aspx.vb | 2 +- AC/RegIngresosModificaciones.aspx.vb | 4 +- AC/RegNomina.aspx.vb | 2 +- AC/RepAnaliticoDeudaPublica.aspx.vb | 4 +- AC/RepCambiosSituacionFinanciera.aspx.vb | 4 +- AC/RepEstadoActividades.aspx.vb | 6 +- AC/RepEstadoAnaliticoActivo.aspx.vb | 2 +- AC/RepFlujoEfectivo.aspx.vb | 10 +- AC/RepIngresos.aspx.vb.exclude | 2 +- AC/RepPresupuestoEgresos.aspx.vb | 18 +- AC/RepPresupuestoEgresosDetalle.aspx.vb | 4 +- AC/RepPresupuestoIngresos.aspx.vb | 18 +- AC/RepSituacionFinanciera.aspx.vb | 6 +- AC/RepVariacionHaciendaPublica.aspx.vb | 10 +- AF/AF.aspx.vb | 30 +- AF/CatAF.aspx.vb | 4 +- AF/OrdenTrabajoAsignacion.aspx.vb | 2 +- AF/RegistroRevision.aspx.vb | 8 +- AF/RepAF.aspx.vb | 2 +- AF/RepDepreciacion.aspx.vb | 2 +- AF/RepOrdenTrabajo.aspx.vb | 2 +- AF/RepRevision.aspx.vb | 2 +- AF/ResguardoAF.aspx.vb | 16 +- AF/TipoOrdenTrabajo.aspx.vb | 4 +- AF/ValesCombustible.aspx.vb | 2 +- AIMMGM/ConsultaCliente.aspx.vb | 10 +- AIMMGM/Pagos.aspx.vb | 2 +- AIMMGM/PopRegistro.aspx.vb | 12 +- AIMMGM/Registro.aspx.vb | 26 +- AIMMGM/VentasPS.aspx.vb | 4 +- AIMMGM/ePagos.aspx.vb | 14 +- Acarreos/AcarreosConcluidos.aspx.vb | 4 +- Acarreos/AcarreosPreEstimacion.aspx.vb | 4 +- Acarreos/RegistroAcarreo.aspx.vb | 4 +- Acarreos/RegistroContratosAcarreos.aspx.vb | 8 +- Acarreos/RepAcarreos.aspx.vb | 4 +- Acarreos/RepAcarreosDetalle.aspx.vb | 4 +- Acarreos/RepContratosAcarreos.aspx.vb | 12 +- Acarreos/RepContratosAcarreosDetalle.aspx.vb | 8 +- Acarreos/RepPreEstimacionDetalle.aspx.vb | 8 +- Acumuladores/EntradasUsadosResumenRep.aspx.vb | 6 +- Acumuladores/RepAcumuladoresVigencia.aspx.cs | 6 +- .../RepEntradasUsadosClientes.aspx.vb | 4 +- Acumuladores/RepIndicadorDiario.aspx.vb | 12 +- Acumuladores/RepPolizasVirtuales.aspx.vb | 2 +- Acumuladores/RepUsados.aspx.cs | 4 +- App_Code/ClsBancos.vb | 10 +- App_Code/ClsContabilidad.vb | 10 +- App_Code/ClsDG.vb | 2 +- App_Code/ClsEncuestas.vb | 2 +- App_Code/ClsGenerales.vb | 2 +- App_Code/ClsInventarios.vb | 8 +- App_Code/ClsMovimientos.vb | 6 +- App_Code/ClsPaginas.vb | 33 +- App_Code/ClsProspectos.vb | 2 +- App_Code/ClsRH.vb | 6 +- App_Code/ClsSisEmpresas.vb | 11 +- App_Code/ClsSisNotificaciones.vb | 20 +- App_Code/ClsVentas.vb | 2 +- App_Code/Empresa.vb | 4 +- App_Code/LogicNominas.vb | 4 +- App_Code/Modelos.vb | 82 +- App_Code/Thalamus.vb | 4 +- App_Code/Timbrado.vb | 10 +- App_Code/Timbres.vb | 6 +- App_Code/Usuario.vb | 10 +- App_Code/WS/WSSIGVentas.vb | 6 +- App_Code/WS/WSUSer.vb | 2 +- App_Code/WS/WsUtility.vb | 2 +- App_Code/WsSIGWeb.vb | 2 +- App_Code/modExtensiones.vb | 42 +- App_Code/wsRedes.vb | 4 +- App_Code/wsSIG.vb | 30 +- Ashx/CargaEventos.ashx | 6 +- Ashx/E119.ashx | 4 +- Ashx/E140.ashx | 6 +- Ashx/E141.ashx | 22 +- Ashx/E72.ashx | 4 +- Ashx/MHRedes.ashx | 2 +- Ashx/SIGFacturacion.ashx | 14 +- Ashx/SIGFacturacionCiclica.ashx | 12 +- Ashx/SIGPolizaVirtual.ashx | 8 +- Ashx/SIGWeb.ashx | 8 +- Ashx/TareasProgramadas.ashx | 16 +- Bancos/CIF.aspx.vb | 4 +- Bancos/CargarConciliacionesBancarias.aspx.vb | 6 +- Bancos/ConciliacionesBancarias.aspx.vb | 8 +- Bancos/Creditos.aspx.vb | 18 +- Bancos/CreditosPagoMultiple.aspx.vb | 2 +- Bancos/CuentasBancariasDetalle.aspx.vb | 2 +- Bancos/DepositoTerminal.aspx.vb | 2 +- Bancos/DepositosCaja.aspx.vb | 6 +- Bancos/Devoluciones.aspx.cs | 4 +- Bancos/FluctuacionCambiaria.aspx.vb | 20 +- Bancos/FlujoDiario.aspx.vb | 4 +- Bancos/IE.aspx.vb | 28 +- Bancos/IE2.aspx.vb | 22 +- Bancos/MovimientosBancarios.aspx.vb | 16 +- Bancos/NotificacionCheques.aspx.vb | 6 +- Bancos/PagoAcreedor.aspx.cs | 8 +- Bancos/PagoDeudor.aspx.cs | 8 +- Bancos/PagoElectronico.aspx.vb | 48 +- Bancos/PagoElectronicoGrupos.aspx.vb | 48 +- Bancos/PolizaCheque.aspx.vb | 4 +- Bancos/PopIECompras.aspx.vb | 10 +- Bancos/PopIEVentas.aspx.vb | 14 +- Bancos/PopUpBuscarIE.aspx.vb | 2 +- Bancos/PrestamoPersonal.aspx.cs | 8 +- Bancos/ProductosFinancieros.aspx.vb | 2 +- Bancos/ProveedoresAbonar.aspx.vb | 36 +- Bancos/ProveedoresCreditos.aspx.vb | 10 +- Bancos/Reembolsos.aspx.vb | 6 +- Bancos/RegistroPagoIntermediario.aspx.vb | 4 +- Bancos/RepClientesAnticipo.aspx.vb | 2 +- Bancos/RepCobrado.aspx.vb | 8 +- Bancos/RepCobradoDetalle.aspx.vb | 8 +- Bancos/RepCobradoPagado.aspx.vb | 16 +- Bancos/RepComplementoPago.aspx.vb | 12 +- Bancos/RepComprobaciones.aspx.cs | 2 +- Bancos/RepCortes.aspx.vb | 4 +- Bancos/RepCreditos.aspx.vb | 6 +- Bancos/RepCxCCliente.aspx.vb | 4 +- Bancos/RepEgresosSinComprobante.aspx.vb | 8 +- Bancos/RepIE.aspx.vb | 22 +- Bancos/RepIngresosPorComprobar.aspx.vb | 2 +- Bancos/RepProgramaciones.aspx.vb | 12 +- Bancos/RepProgramarRecursos.aspx.vb | 4 +- Bancos/RepProveedoresPagos.aspx.vb | 2 +- Bancos/RepSaldos.aspx.vb | 8 +- Bancos/RepSaldosDetalle.aspx.vb | 10 +- Bancos/RepSaldosPeriodo.aspx.cs | 6 +- Bancos/SaldarCajaChica.aspx.cs | 4 +- Bancos/Transferencias.aspx.vb | 34 +- CGame/AsignacionEmpaque.aspx.cs | 2 +- CGame/AsignacionEmpaque2.aspx.cs | 2 +- CGame/CatCGameClientes.aspx.vb | 4 +- CGame/CatTipoEmpaque.aspx.vb | 4 +- CGame/CatTipoMaduracion.aspx.vb | 4 +- CGame/CorteGasto.aspx.cs | 8 +- CGame/Empaque.aspx.cs | 10 +- CGame/EntradaMateriaPrima.aspx.cs | 8 +- CGame/Fletes.aspx.cs | 10 +- CGame/GenerarOrdenCorte.aspx.cs | 2 +- CGame/Liquidacion.aspx.cs | 6 +- CGame/OrdenProduccion.aspx.vb | 22 +- CGame/PopUpBuscarCorteGasto.aspx.cs | 4 +- CGame/PopUpBuscarEmpaque.aspx.cs | 4 +- CGame/PopUpBuscarOrdenProduccion.aspx.vb | 4 +- CGame/RepAvance.aspx.cs | 2 +- CGame/RepCorte.aspx.cs | 8 +- CGame/RepCorteGasto.aspx.cs | 4 +- CGame/RepEmpaque.aspx.cs | 10 +- CGame/RepEmpaqueDetalle.aspx.cs | 4 +- CGame/RepFletes.aspx.cs | 8 +- CGame/RepIngresos.aspx.cs | 8 +- CGame/RepMaquila.aspx.cs | 8 +- CGame/RepMateriales.aspx.cs | 8 +- CGame/RepOrdenCorte.aspx.cs | 10 +- CGame/RepOrdenCorteDetalle.aspx.cs | 4 +- CGame/RepOrdenProduccion.aspx.cs | 6 +- CGame/RepOrdenProduccionXHuerta.aspx.cs | 4 +- CGame/RepOtrosGastos.aspx.cs | 8 +- CGame/RepPreEnfriado.aspx.cs | 8 +- CRM/Acercamiento.aspx.cs | 12 +- CRM/CatMetas.aspx.vb | 8 +- CRM/CatProbabilidadAcercamiento.aspx.cs | 2 +- CRM/CatTipoProceso.aspx.cs | 4 +- CRM/EmpresaCRM.aspx | 2 +- CRM/EmpresaCRM.aspx.cs | 14 +- CRM/RepAcercamientos.aspx.cs | 4 +- CRM/RepAcercamientosProcesosDetalle.aspx.cs | 4 +- CRM/RepAgendasBitacoras.aspx.cs | 4 +- Compras/CatEstatusFactura.aspx.vb | 2 +- Compras/CatProveedores.aspx.vb | 2 +- Compras/CatTipoGasto.aspx.cs | 2 +- Compras/Compras.aspx.vb | 570 +- Compras/EvaluacionProveedor.aspx.vb | 12 +- Compras/Importaciones.aspx.vb | 2 +- Compras/PopUpBuscarFolioC.aspx.vb | 4 +- Compras/PopUpVerFactura.aspx.vb | 126 +- Compras/Proveedores.aspx.vb | 28 +- Compras/ProveedoresAuxiliar.aspx.vb | 6 +- Compras/Reembolsos.aspx.vb | 4 +- Compras/ReembolsosComprobaciones.aspx.vb | 16 +- Compras/RepAnt-NC-EXC.aspx.cs | 4 +- Compras/RepAnt-NC-EXCDetalle.aspx.cs | 8 +- Compras/RepComplementoPago.aspx.vb | 4 +- Compras/RepCompras.aspx.vb | 8 +- Compras/RepComprasAF.aspx.vb | 8 +- Compras/RepComprasAFDetalle.aspx.vb | 8 +- Compras/RepComprasDetalle.aspx.vb | 10 +- Compras/RepComprasG.aspx.vb | 6 +- Compras/RepComprasInventarios.aspx.cs | 12 +- Compras/RepComprasPeriodo.aspx.vb | 6 +- Compras/RepComprasPersonal.aspx.vb | 6 +- Compras/RepComprasPersonalDetalle.aspx.vb | 6 +- Compras/RepCxP.aspx.vb | 8 +- Compras/RepCxPDetalle.aspx.vb | 14 +- Compras/RepCxPPeriodo.aspx.cs | 8 +- Compras/RepDocumentacionProveedor.aspx.vb | 6 +- Compras/RepEvaluacionProveedor.aspx.vb | 2 +- Compras/RepEvaluacionesProveedores.aspx.vb | 4 +- Compras/RepGastos.aspx.vb | 4 +- Compras/RepGastosFijos.aspx.cs | 8 +- Compras/RepGastosSemanal.aspx.cs | 6 +- Compras/RepImportaciones.aspx.vb | 4 +- Compras/RepNotasCredito.aspx.vb | 8 +- Compras/RepPUESinPago.aspx.vb | 4 +- Compras/RepPagado.aspx.cs | 12 +- Compras/RepPagadoDetalle.aspx.cs | 8 +- Compras/RepPagadoPeriodo.aspx.cs | 14 +- Compras/RepProductosServicios.aspx.vb | 10 +- Compras/RepProductosServiciosDetalle.aspx.vb | 8 +- Compras/RepProductosServiciosPeriodo.aspx.cs | 6 +- Compras/RepRembolsoComprobaciones.aspx.vb | 6 +- Compras/RepReqOCCompraInv.aspx.vb | 6 +- Compras/RepTopCompras.aspx | 6 +- Compras/RepTopCompras.aspx.vb | 2 +- Compras/eFacturas.aspx.vb | 36 +- Contabilidad/AuxiliarPrePolizas.aspx.cs | 6 +- Contabilidad/CatCuentas.aspx.vb | 4 +- Contabilidad/ContabilidadElectronica.aspx.vb | 8 +- Contabilidad/ContabilizacionCompras.aspx.cs | 8 +- Contabilidad/ContabilizacionVentas.aspx.cs | 6 +- Contabilidad/DiarioAmortizaciones.aspx.vb | 4 +- Contabilidad/DiarioCompras.aspx.vb | 4 +- Contabilidad/DiarioPagos.aspx.vb | 4 +- Contabilidad/FiltraPolizas.aspx.vb | 10 +- Contabilidad/FisImpuestos.aspx.vb | 2 +- Contabilidad/LibroDiario.aspx.vb | 12 +- Contabilidad/LibroMayor.aspx.vb | 12 +- Contabilidad/Poliza.aspx.vb | 2 +- Contabilidad/PolizasImpresion.aspx.vb | 4 +- Contabilidad/PopUpAuxiliar.aspx.vb | 2 +- Contabilidad/RegPoliza.aspx.vb | 18 +- Contabilidad/RegPrePoliza.aspx.vb | 4 +- Contabilidad/RegPrePolizaS.aspx.vb | 14 +- Contabilidad/RepAnexoCatalogo.aspx.vb | 8 +- Contabilidad/RepAnexoCatalogoMes.aspx.vb | 8 +- Contabilidad/RepAnexoCatalogoSegmento.aspx.vb | 10 +- Contabilidad/RepBalanceGeneral.aspx.vb | 12 +- Contabilidad/RepBalanceGeneralAnual.aspx.vb | 4 +- Contabilidad/RepBalanceGeneralMensual.aspx.vb | 2 +- .../RepBalanceGeneralProForma.aspx.vb | 16 +- Contabilidad/RepBalanzaComprobacion.aspx.vb | 20 +- Contabilidad/RepContabilidadDiaria.aspx.vb | 4 +- Contabilidad/RepEdoResultados2.aspx.vb | 6 +- Contabilidad/RepEdoResultados2Detalle.aspx.cs | 4 +- Contabilidad/RepEstadoResultados.aspx.vb | 16 +- Contabilidad/RepEstadoResultadosAnual.aspx.vb | 4 +- .../RepEstadoResultadosMensual.aspx.vb | 2 +- .../RepEstadoResultadosPorSegmento.aspx.vb | 8 +- .../RepEstadoResultadosProForma.aspx.vb | 16 +- Contabilidad/RepFlujoEfectivo.aspx.vb | 8 +- Contabilidad/RepGastosCC.aspx.vb | 12 +- Contabilidad/RepIEPS.aspx.vb | 6 +- Contabilidad/RepIVA.aspx.cs | 4 +- Contabilidad/RepIVADiferencias.aspx.vb | 8 +- .../RepMovimientosAuxiliaresCatalogo.aspx.vb | 8 +- Contabilidad/RepOrigenAplicacion.aspx.vb | 12 +- Contabilidad/RepOrigenAplicacionAnual.aspx.vb | 4 +- .../RepOrigenAplicacionMensual.aspx.vb | 2 +- Contabilidad/RepPolizasCuadre.aspx.vb | 4 +- Contabilidad2/CatContaEjercicios.aspx.vb | 4 +- .../MovimientosconProveedores.aspx.vb | 8 +- Contabilidad2/RepAnexoCatalogo.aspx.vb | 10 +- Contabilidad2/RepAnexoCatalogoCC.aspx.vb | 4 +- Contabilidad2/RepAnexoCatalogoMensual.aspx.vb | 2 +- .../RepAnexoCatalogoMensualHorizontal.aspx.vb | 10 +- .../RepAnexoCatalogoSAT.aspx.vb.exclude | 8 +- .../RepAnexoCatalogoVertical.aspx.vb | 4 +- .../RepBalanceGeneral.aspx.vb.exclude | 6 +- .../RepBalanceGeneralHorizontal.aspx.vb | 4 +- .../RepBalanceGeneralVertical.aspx.vb | 6 +- Contabilidad2/RepBalanzaComprobacion.aspx.vb | 8 +- .../RepBalanzaComprobacionSAT.aspx.vb.exclude | 8 +- .../RepCambiosSituacionFinanciera.aspx.vb | 6 +- Contabilidad2/RepEstadoActividades.aspx.vb | 8 +- .../RepEstadoActividadesSAT.aspx.vb.exclude | 6 +- Contabilidad2/RepEstadoResultados.aspx.vb | 6 +- .../RepEstadoResultadosHorizontal.aspx | 18 +- .../RepEstadoResultadosHorizontal.aspx.vb | 311 +- Contabilidad2/RepFlujoEfectivo.aspx.vb | 10 +- Contabilidad2/RepLibroDiario.aspx.vb | 12 +- .../RepMovimientosAuxiliaresCatalogo.aspx.vb | 18 +- Contabilidad2/RepOrigenAplicacion.aspx.vb | 12 +- Contabilidad2/RepSituacionFinanciera.aspx.vb | 10 +- .../RepSituacionFinanciera.aspx.vb_old | 8 +- .../RepSituacionFinancieraSAT.aspx.vb.exclude | 8 +- .../RepVariacionHaciendaPublica.aspx.vb | 10 +- .../Reportes/RepSituacionFinanciera.rdlc | 8 +- Contratos/CatPresupuestos.aspx.vb | 4 +- Contratos/CatRefrendos.aspx.cs | 4 +- Contratos/Contrato.aspx.vb | 52 +- Contratos/Contrato.vb | 6 +- Contratos/ContratoAvance.aspx.vb | 2 +- Contratos/ContratoObra.aspx.vb | 24 +- Contratos/ContratoObraAutorizacion.aspx.vb | 2 +- Contratos/Contratos.aspx.vb | 4 +- Contratos/ContratosSecciones.aspx.vb | 6 +- Contratos/Estimaciones.aspx.vb | 2 +- Contratos/FacturacionMasiva.aspx.vb | 14 +- Contratos/ModificarPresupuesto.aspx.vb | 2 +- Contratos/Presupuestos.aspx.vb | 14 +- Contratos/RepContratosAvancesCP.aspx.vb | 4 +- Contratos/RepContratosCostos.aspx.vb | 6 +- Contratos/RepContratosFianzas.aspx.cs | 2 +- .../RepContratosObraAvancesDetalle.aspx.vb | 2 +- Contratos/RepContratosSuministros.aspx.vb | 6 +- .../RepPedidosDevolucionesXContrato.aspx.vb | 6 +- Contratos/RepPresupuestos.aspx.vb | 6 +- Contratos/RepPresupuestosDetalle.aspx.vb | 10 +- .../RepPresupuestosDetalleCompras.aspx.vb | 8 +- CxC/GestionCobranza.aspx.vb | 4 +- CxC/RepCxC.aspx.vb | 10 +- CxC/RepCxCDetalle.aspx.vb | 16 +- CxC/RepCxCPeriodo.aspx.cs | 8 +- CxC/RepCxCSemanal.aspx.vb | 2 +- Documentacion/TableroMaterialidad.aspx.cs | 4 +- Edoc/Contratos.aspx.vb | 4 +- Empresas/119/Formatos/Cotizacion.rdlc | 12 + Empresas/119/Formatos/DevolucionCliente.rdlc | 14 +- .../119/Formatos/DevolucionConsignacion.rdlc | 123 +- Empresas/119/Formatos/Factura.rdlc | 44 +- Empresas/119/Formatos/NotaDevolucion.rdlc | 5278 +++++++++-------- Empresas/119/Formatos/Remision.rdlc | 12 + Empresas/140/Formatos/Cotizacion.rdlc | 117 +- Empresas/140/Formatos/Factura.rdlc | 153 +- Empresas/140/Formatos/NotaDevolucion.rdlc | 73 +- Empresas/140/Formatos/OrdenServicio.rdlc | 98 +- Empresas/140/Formatos/Remision.rdlc | 3458 +++++------ Empresas/140/Formatos/RepEntradasUsados.rdlc | 99 +- .../Formatos/RepEntradasUsadosClientes.rdlc | 111 +- Empresas/140/Formatos/RepUsadosEntradas.rdlc | 1652 +++--- Empresas/140/Formatos/Salidas.rdlc | 2724 ++++----- Empresas/140/Formatos/UsadosEntradas.rdlc | 1431 ++--- Finanzas/AnalisisCreditoCliente.aspx.vb | 4 +- Finanzas/AnalisisCreditoProveedor.aspx.vb | 2 +- Finanzas/RepBalanceGeneral.aspx.vb | 6 +- Finanzas/RepBalanceGeneralHorizontal.aspx.vb | 4 +- Finanzas/RepBalanceGeneralVertical.aspx.vb | 6 +- Finanzas/RepEstadoResultados.aspx.vb | 6 +- .../RepEstadoResultadosHorizontal.aspx.vb | 2 +- Finanzas/RepEstadoResultadosVertical.aspx.vb | 4 +- Finanzas/RepOrigenAplicacion.aspx.vb | 12 +- Finanzas/RepRotacionCartera.aspx.cs | 2 +- Finanzas/RepRotacionCarteraDetalle.aspx.cs | 2 +- Flotillas/RepIncidentes.aspx.vb | 6 +- Flotillas/RepLicencias.aspx.vb | 10 +- Flotillas/RepPlacas.aspx.vb | 10 +- Flotillas/RepPolizaSeguro.aspx.vb | 10 +- Flotillas/RepServicios.aspx.vb | 6 +- GPS/CatDistribuidoresMaster.aspx.vb | 2 +- GPS/CatDistribuidoresMaster.aspx.vb.exclude | 2 +- GPS/CatReportesProgramados.aspx.vb | 2 +- GPS/Conductores.aspx.vb | 4 +- GPS/DashboardGPS.aspx.vb | 52 +- GPS/EntradasSalidasGR.aspx.vb | 28 +- GPS/FacturasSims.aspx.vb | 2 +- GPS/GeoReferencias.aspx.vb | 4 +- GPS/Rastreo.aspx | 2 +- GPS/Rastreo.aspx.vb | 82 +- GPS/Rastreo2.aspx | 2 +- GPS/Rastreo2.aspx.vb | 74 +- GPS/RastreoTrayectos.aspx.vb | 2 +- GPS/RepCombustible.aspx.vb | 8 +- GPS/RepCombustible2.aspx.vb | 6 +- GPS/RepEventos.aspx.vb | 6 +- GPS/RepGastos.aspx.vb | 4 +- GPS/RepGeoReferencias.aspx.vb | 4 +- GPS/RepIgnicion.aspx.cs | 6 +- GPS/RepParadas.aspx.cs | 10 +- GPS/RepPasajero.aspx.cs | 4 +- GPS/RepPasajeros.aspx.vb | 6 +- GPS/RepPuntosDeInteres.aspx.vb | 12 +- GPS/Trayectos.aspx.vb | 6 +- GPS/Vehiculos.aspx.vb | 30 +- GPS/WizardDispositivos.aspx.cs | 2 +- General/CATIEPSxEntidadFed.aspx.cs | 6 +- General/CatDiasInhabiles.aspx.vb | 4 +- General/CatMarcas.aspx.vb | 2 +- General/CatSatListado69B.aspx.vb | 2 +- General/CatTipoCambio.aspx.cs | 2 +- General/ColectivasDetalle.aspx.vb | 2 +- General/FolioFechaCancelacion.aspx.vb | 2 +- General/RepIndicadorResumen.aspx.vb | 4 +- General/RepPaqueteriasGuias.aspx.cs | 6 +- General/SaldosIniciales.aspx.vb | 6 +- Impuestos/RepIVAAcreditable.aspx.vb | 6 +- Inicio.aspx.vb | 22 +- Inventarios/AjustesSeccionAlmacen.aspx.vb | 8 +- Inventarios/Apartados.aspx.vb | 6 +- Inventarios/CartaPorteManual.aspx.vb | 14 +- Inventarios/Consignaciones.aspx.vb | 14 +- Inventarios/ConsignacionesMaterial.aspx.vb | 2 +- Inventarios/EntradasSalidas.aspx.vb | 46 +- Inventarios/EntregaAlmacen.aspx.vb | 20 +- Inventarios/EntregaAlmacenRuta.aspx.cs | 10 +- Inventarios/EntregasPorRealizar.aspx.cs | 2 +- Inventarios/Fletes.aspx.vb | 2 +- Inventarios/InventarioFisicoDetalle.aspx.vb | 6 +- Inventarios/Kardex.aspx.vb | 8 +- Inventarios/KardexAlmacen.aspx.vb | 6 +- Inventarios/KardexAlmacenHorizontal.aspx.vb | 8 +- Inventarios/PaquetesArmadoDesarmado.aspx.vb | 4 +- Inventarios/PopUpBuscarMovto.aspx.vb | 8 +- Inventarios/PrestamosdeProveedor.aspx.vb | 6 +- Inventarios/RecepcionAlmacen.aspx.vb | 46 +- Inventarios/RecepcionDevolucion.aspx.vb | 14 +- Inventarios/RecepcionUsados.aspx.vb | 30 +- Inventarios/Remanufactura.aspx.vb | 4 +- Inventarios/RepAlmacen.aspx.vb | 2 +- Inventarios/RepAlmacenCompras.aspx.vb | 10 +- Inventarios/RepAlmacenPeriodo.aspx.vb | 2 +- Inventarios/RepAnomalias.aspx.vb | 24 +- Inventarios/RepApartados.aspx.vb | 14 +- Inventarios/RepApartados2.aspx.vb | 8 +- Inventarios/RepConsignaciones.aspx.vb | 6 +- Inventarios/RepConsumoInterno.aspx.cs | 8 +- Inventarios/RepEntradasSalidas.aspx.vb | 12 +- .../RepEntradasSalidasXContrato.aspx.cs | 6 +- Inventarios/RepEntregaAlmacenRuta.aspx.cs | 12 +- Inventarios/RepEntregasForaneas.aspx.vb | 6 +- Inventarios/RepExistenciaLote.aspx.vb | 6 +- Inventarios/RepExistenciasCostos.aspx.vb | 8 +- Inventarios/RepFletes.aspx.vb | 6 +- Inventarios/RepMaximoMinimo.aspx.vb | 8 +- Inventarios/RepMovimientos.aspx.vb | 12 +- Inventarios/RepMovimientosProveedor.aspx.cs | 6 +- Inventarios/RepMovimientosSalida.aspx.cs | 4 +- Inventarios/RepNotasSinAlmacen.aspx.vb | 6 +- Inventarios/RepOcInv.aspx.vb | 8 +- Inventarios/RepOcInvMoto.aspx.vb | 8 +- Inventarios/RepRSCO.aspx.vb | 6 +- Inventarios/RepReciclaje.aspx.vb | 4 +- Inventarios/RepTrasladoSolicitud.aspx.vb | 4 +- Inventarios/RepTraspasoAlmacen.aspx.vb | 8 +- Inventarios/RepTraspasoEmitido.aspx.cs | 4 +- Inventarios/ReporteMaterial.aspx.vb | 4 +- Inventarios/ResguardoMaterial.aspx.vb | 8 +- Inventarios/TrasladoSolicitud.aspx.vb | 12 +- Inventarios/TraspasoAlmacen.aspx.vb | 22 +- LogIn.aspx.vb | 6 +- MF/RepConsumoCombustible.aspx.cs | 4 +- Nomina/Aguinaldo.aspx.cs | 6 +- Nomina/CalculoISRAnual.aspx.cs | 2 +- Nomina/ChecadorAsistencia.aspx.cs | 6 +- Nomina/EventoDetalle.aspx.vb | 14 +- Nomina/Finiquito.aspx.cs | 6 +- Nomina/MovimientosSUA.aspx.cs | 4 +- Nomina/NomTimbrados.aspx.cs | 4 +- Nomina/Nomina.aspx.cs | 60 +- Nomina/RegistroNomina.aspx.vb.exclude | 2 +- Nomina/RepFiniquito.aspx.cs | 2 +- Nomina/RepInversiondeNomina.aspx.cs | 2 +- Nomina/RepPersonalAcumulados.aspx.vb.exclude | 2 +- Nomina/RepPersonalDIM.aspx.vb | 4 +- Nomina/ReportePTU.aspx.vb | 2 +- Nomina/ReportedeAcumulados.aspx.cs | 8 +- Nomina/SobreRecibo.aspx.vb | 2 +- OC/CotizacionEnLinea.aspx.vb | 4 +- OC/ListaRequisicion.aspx.cs | 2 +- OC/OC.aspx.vb | 60 +- OC/OC2.aspx.vb | 24 +- OC/PopUpBuscarReq.aspx.vb | 2 +- OC/RepCotizaciones.aspx.vb | 2 +- OC/RepCotizacionesDetalle.aspx.vb | 4 +- OC/RepImprimir.aspx.vb.exclude | 2 +- OC/RepImprimirC.aspx.vb.exclude | 2 +- OC/RepOC.aspx.vb | 20 +- OC/RepOCAnticiposPtes.aspx.cs | 4 +- OC/RepOCGuias.aspx.vb | 8 +- OC/RepOCxSurtir.aspx.vb | 4 +- OC/RepReqXOC.aspx.vb | 8 +- OC/RepRequisiciones.aspx.vb | 6 +- OC/RepSolicitudesAnticipo.aspx.cs | 6 +- OI/Circular.aspx.vb | 2 +- OI/ConvocatoriaDetalle.aspx.cs | 2 +- OI/Desarrollo.aspx.vb | 2 +- OI/DocumentoDetalle.aspx.cs | 6 +- OI/EventoDetalle.aspx.vb | 14 +- OI/EventoDetalle1.aspx.vb.exclude | 10 +- OI/MinutaDetalle.aspx.cs | 4 +- OI/Minutas.aspx.vb | 2 +- OI/PopUpAgenda.aspx.vb | 10 +- OI/RepDesarrollo.aspx.vb | 4 +- OI/RepMinutas.aspx.vb | 4 +- OI/RepReuniones.aspx.cs | 4 +- OI/RepSoporteADS.aspx.vb | 12 +- OI/RepTareas.aspx.vb | 16 +- OI/SoporteADS.aspx.vb | 14 +- OI/SubidasADS.aspx | 4 +- OI/SubidasADS.aspx.vb | 4 +- OI/TareaDetalle.aspx.cs | 2 +- OI/UnoaUno.aspx.cs | 4 +- OS/Asignaciones.aspx.vb | 6 +- OS/OrdenesServicios.aspx.vb | 12 +- OS/RepOrdenesServicios.aspx.vb | 4 +- OS/RepServicioDomicilio.aspx.vb | 14 +- Planeacion/Sucursal.aspx.vb | 2 +- Portal/LogInPortal.aspx.vb | 2 +- PortalCliente/PortalCliente.aspx.vb | 24 +- PortalGPS/Penske.aspx.vb | 10 +- PortalGPS/ServiciosGPS.aspx.vb | 6 +- PortalProveedor/PortalProveedor.aspx.vb | 4 +- Presupuestos/GenerarPresupuestos.aspx.vb | 2 +- Prospeccion/Prospectos.aspx.vb | 4 +- Prospeccion/RepProspectosGIS.aspx.vb | 2 +- Prospectos/ProspectoExpediente.aspx.vb | 6 +- Prospectos/ProspectosEstructuras.aspx.vb | 6 +- Prospectos/ProspectosRedes.aspx.vb | 6 +- Prospectos/ProspectosSIP.aspx.vb | 4 +- Prospectos/ProspectosValidar.aspx.vb | 2 +- Prospectos/RedesIndicadores.aspx.vb | 2 +- Prospectos/RepAgendasBitacoras.aspx.vb | 4 +- Prospectos/RepMetas2.aspx.vb | 4 +- Prospectos/RepSimpatizantes.aspx.vb | 2 +- Proveedores/LogInProveedores.aspx.vb | 2 +- Proveedores/PortalProveedor.aspx.vb | 2 +- RH/ActualizacionMasiva.aspx.vb | 4 +- RH/AsistenciaDetalle.aspx.vb | 2 +- RH/Asistencias.aspx.vb | 6 +- RH/BuzonCalidad.aspx.vb | 2 +- RH/BuzonCalidad.aspx.vb.exclude | 2 +- RH/CalculoSBC.aspx.cs | 6 +- RH/CatChecadorTipo.aspx.vb | 2 +- RH/CatConceptosViaticos.aspx.cs | 2 +- RH/CatCursos.aspx.vb | 6 +- RH/CatPersonal.aspx.vb | 10 +- RH/DocumentacionVencida.aspx.vb | 4 +- RH/ListaAsistenciaRH.aspx.vb | 2 +- RH/MiPerfil.aspx.vb | 26 +- RH/Personal.aspx.vb | 92 +- RH/Reclutamiento.aspx.vb | 14 +- RH/RepAsistencias.aspx.vb | 6 +- RH/RepAusentismoLaboral.aspx.vb | 8 +- RH/RepBuzonCalidad.aspx.vb | 2 +- RH/RepChecadorPreAsistencia.aspx.vb | 10 +- RH/RepCursos.aspx.vb | 4 +- RH/RepDocumentacionVencida.aspx.vb | 8 +- RH/RepIndiceRotacionPersonal.aspx.vb | 10 +- RH/RepPersonalInconsistencias.aspx.vb | 18 +- RH/RepUniformes.aspx.vb | 6 +- RH/RepUniformesResguardo.aspx.vb | 6 +- RH/RepVacaciones.aspx.vb | 6 +- RH/SolicitudViaticos.aspx.cs | 4 +- SAT/SolicitudesIngresoSat.aspx.cs | 8 +- SAT/SolicitudesNominaSat.aspx.cs | 8 +- SAT/SolicitudesRecibidasSAT.aspx.vb | 8 +- SCT/LicenciasDetalle.aspx.vb | 2 +- SCT/RepGISSucesos.aspx.vb.exclude | 6 +- Sistemas/CatSesiones.aspx.vb | 2 +- Sistemas/CatTareasProgramadas.aspx.vb | 4 +- Sistemas/DefinicionEmpresa.aspx | 17 + Sistemas/DefinicionEmpresa.aspx.vb | 455 +- Sistemas/Empresa.aspx | 12 + Sistemas/Empresa.aspx.vb | 24 +- Sistemas/PopUpAddUsuario.aspx.vb | 4 +- Sistemas/PopUpSeleccionarEmpresa.aspx.vb | 4 +- Sistemas/Registro.aspx.vb | 2 +- Sistemas/RegistroEmpresa.aspx.vb | 2 +- Sistemas/UsuarioDetalle.aspx.vb | 12 +- Site.master | 6 +- Site.master.vb | 6 +- SiteGPS.master | 4 +- SiteGPS.master.vb | 2 +- Sitelite.master | 6 +- TareasProgramadas/Tareas119.ashx | 10 +- Ventas/ActualizarPrecios.aspx.vb | 10 +- Ventas/AuxiliarCliente.aspx.vb | 4 +- Ventas/AuxiliarClienteVentas.aspx.vb | 4 +- Ventas/CatAutorizacionLimites.aspx.vb | 6 +- Ventas/CatClientes.aspx.vb | 4 +- Ventas/CatMetasVendedores.aspx.vb | 2 +- Ventas/Clientes.aspx.vb | 72 +- Ventas/ClientesAbonar.aspx.vb | 30 +- Ventas/FacturacionAcarreos.aspx.vb | 2 +- Ventas/MetasVendedores.aspx.vb | 2 +- Ventas/PV.aspx.vb | 60 +- Ventas/PopUpBuscarFolio.aspx.vb | 2 +- Ventas/ProductosFinancieros.aspx.vb | 4 +- Ventas/ProductosServicios.aspx.vb | 4 +- Ventas/Promociones.aspx.vb | 8 +- Ventas/PuntoVenta.aspx.vb | 2 +- Ventas/RepAnticipo-NC-IXC.aspx.cs | 4 +- Ventas/RepAnticipo-NC-IXCDetalle.aspx.cs | 10 +- Ventas/RepAnticiposEspeciales.aspx.vb | 4 +- Ventas/RepAuxiliarFacturas.aspx.vb | 6 +- Ventas/RepCancelacionesPorRespuesta.aspx.cs | 6 +- Ventas/RepCancelacionesVentas.aspx.vb | 4 +- Ventas/RepComisiones.aspx.vb | 10 +- Ventas/RepComisionesDetalle.aspx.vb | 6 +- Ventas/RepComisionesDetallePS.aspx.vb | 2 +- Ventas/RepComisionesJAM.aspx.cs | 6 +- Ventas/RepComisionesJAM2.aspx.cs | 4 +- Ventas/RepComisionesJAM2Detalle.aspx.cs | 8 +- Ventas/RepComisionesServec.aspx.vb | 8 +- Ventas/RepComisionesServecDetalle.aspx.vb | 4 +- Ventas/RepCostoPromedioVenta.aspx.cs | 6 +- Ventas/RepCotizaciones.aspx.vb | 8 +- Ventas/RepCotizacionesDetalle.aspx.vb | 8 +- Ventas/RepCotizacionesxFacturar.aspx.vb | 12 +- .../RepDocumentacionVencidaClientes.aspx.vb | 8 +- Ventas/RepIndicadoresPorProyecto.aspx.vb | 4 +- Ventas/RepLineasAdicionales.aspx.cs | 4 +- Ventas/RepNCxAplicar.aspx.cs | 2 +- Ventas/RepPS.aspx.vb | 32 +- Ventas/RepPUESinPago.aspx.vb | 4 +- Ventas/RepPedidos2.aspx.cs | 10 +- Ventas/RepPedidos2Detalle.aspx.cs | 14 +- Ventas/RepProductosServicios.aspx.vb | 10 +- Ventas/RepProductosServiciosDetalle.aspx.vb | 14 +- Ventas/RepProductosServiciosPeriodo.aspx.cs | 8 +- Ventas/RepRecuperacion.aspx.vb | 10 +- Ventas/RepRecuperacionDetalle.aspx.vb | 4 +- Ventas/RepRecuperacionPeriodo.aspx.cs | 8 +- Ventas/RepRemisiones.aspx.vb | 8 +- Ventas/RepRemisiones2.aspx.vb | 8 +- Ventas/RepRemisionesDetalle.aspx.vb | 10 +- Ventas/RepRemisionesNC.aspx.vb | 12 +- Ventas/RepSolicitudesCancelacion.aspx | 6 +- Ventas/RepTopClientesVentas.aspx.vb | 6 +- Ventas/RepTopVentas.aspx | 6 +- Ventas/RepTopVentas.aspx.vb | 2 +- Ventas/RepVentaDetalle.aspx.vb | 20 +- Ventas/RepVentas.aspx.vb | 20 +- Ventas/RepVentas.aspx.vb2 | 10 +- Ventas/RepVentasAutorizaciones.aspx.cs | 6 +- Ventas/RepVentasMensuales.aspx.vb | 4 +- Ventas/RepVentasMensualesDetalle.aspx.vb | 2 +- Ventas/RepVentasPV.aspx.vb | 2 +- Ventas/RepVentasPeriodo.aspx.vb | 12 +- Ventas/RepVentasResumen.aspx.vb | 6 +- Ventas/RepVentasUtilidad.aspx.vb | 6 +- Ventas/RepVentasUtilidadDetalle.aspx.vb | 8 +- Ventas/RepVentasUtilidadPadre.aspx.vb | 6 +- Ventas/Ventas.aspx.vb | 246 +- ZDG/ActualizaPadron.aspx.vb | 2 +- ZDG/CapturaManual.aspx.vb | 2 +- ZDG/MensajeAutomatico.aspx.vb | 8 +- ZDG/MensajeManual.aspx.vb | 8 +- ZDG/RepGeneral.aspx.vb | 2 +- asmx/WSApp.asmx | 18 +- asmx/WSGPSApp.asmx | 16 +- asmx/WSSIGApp.asmx | 58 +- asmx/WS_PuntoVenta.asmx | 2 +- 649 files changed, 11445 insertions(+), 11105 deletions(-) diff --git a/AC/PresupuestoEgresosAnterior.aspx.vb.exclude b/AC/PresupuestoEgresosAnterior.aspx.vb.exclude index 1ace03209..8e79d681b 100644 --- a/AC/PresupuestoEgresosAnterior.aspx.vb.exclude +++ b/AC/PresupuestoEgresosAnterior.aspx.vb.exclude @@ -479,7 +479,7 @@ Partial Class AC_PresupuestoEgresos Dim Total As Double = GvDatos.Rows.Cast(Of GridViewRow)().Sum(Function(gvr) gvr.DataKey("Total").ToDouble) - IDPoliza = Conta.AddPoliza(123456, 4, "Aprobado", Total, Total, UsuarioActual.CveUsuario, Now) + IDPoliza = Conta.AddPoliza(123456, 4, "Aprobado", Total, Total, UsuarioActual.CveUsuario, NowADS()) If IDPoliza > 0 Then For Each gvr As GridViewRow In GvDatos.Rows @@ -505,9 +505,9 @@ Partial Class AC_PresupuestoEgresos If IdCuentaPagado = 0 Then IdCuentaPagado = Conta.AddCuenta(String.Format("827-{0}", Codigo), gvr.DataKey("ClasificadorOG"), "K", 0, 0, 1, 1, 608) Total = gvr.DataKey("Total").ToDouble - If Conta.AddMovimiento(123456, IDPoliza, IdCuentaAprobado, True, Total, "", "", 0, Now, "") Then + If Conta.AddMovimiento(123456, IDPoliza, IdCuentaAprobado, True, Total, "", "", 0, NowADS(), "") Then 'actualizo el idcuenta del presupuesto - If Not Conta.AddMovimiento(123456, IDPoliza, IdCuentaPorEjercer, False, Total, "", "", 0, Now, "") Then + If Not Conta.AddMovimiento(123456, IDPoliza, IdCuentaPorEjercer, False, Total, "", "", 0, NowADS(), "") Then TieneError = True Exit For End If diff --git a/AC/RegComprometido.aspx.vb b/AC/RegComprometido.aspx.vb index f41405278..492c6ab70 100644 --- a/AC/RegComprometido.aspx.vb +++ b/AC/RegComprometido.aspx.vb @@ -504,15 +504,15 @@ Partial Class AC_RegComprometido Conta.IniciaTransacSQL() Dim Total As Double = LbTotalPagar.Text.ToDouble - IDPoliza = Conta.AddPoliza(4, "Devengado-Ejercido-Pagado", Total, Total, UsuarioActual.CveUsuario, Now) + IDPoliza = Conta.AddPoliza(4, "Devengado-Ejercido-Pagado", Total, Total, UsuarioActual.CveUsuario, NowADS()) If IDPoliza > 0 Then For Each dr As DataRow In DtDetallePagar.Rows Dim Importe = dr("Importe").ToString.ToDouble 'Devengado - If Conta.AddMovimiento(IDPoliza, dr("IdCuentaComprometido").ToString.ToEntero, True, Importe, "", "", 0, String.Format("01/01/{0}", Now.Year).ToDate, "") Then - If Not Conta.AddMovimiento(IDPoliza, dr("IdCuentaDevengado").ToString.ToEntero, False, Importe, "", "", 0, String.Format("01/01/{0}", Now.Year).ToDate, "") Then + If Conta.AddMovimiento(IDPoliza, dr("IdCuentaComprometido").ToString.ToEntero, True, Importe, "", "", 0, String.Format("01/01/{0}", NowADS().Year).ToDate, "") Then + If Not Conta.AddMovimiento(IDPoliza, dr("IdCuentaDevengado").ToString.ToEntero, False, Importe, "", "", 0, String.Format("01/01/{0}", NowADS().Year).ToDate, "") Then TieneError = True Exit For End If @@ -522,8 +522,8 @@ Partial Class AC_RegComprometido End If 'Ejercido - If Conta.AddMovimiento(IDPoliza, dr("IdCuentaDevengado").ToString.ToEntero, True, Importe, "", "", 0, Now, "") Then - If Not Conta.AddMovimiento(IDPoliza, dr("IdCuentaEjercido").ToString.ToEntero, False, Importe, "", "", 0, Now, "") Then + If Conta.AddMovimiento(IDPoliza, dr("IdCuentaDevengado").ToString.ToEntero, True, Importe, "", "", 0, NowADS(), "") Then + If Not Conta.AddMovimiento(IDPoliza, dr("IdCuentaEjercido").ToString.ToEntero, False, Importe, "", "", 0, NowADS(), "") Then TieneError = True Exit For End If @@ -533,8 +533,8 @@ Partial Class AC_RegComprometido End If 'Pagado - If Conta.AddMovimiento(IDPoliza, dr("IdCuentaEjercido").ToString.ToEntero, True, Importe, "", "", 0, Now, "") Then - If Not Conta.AddMovimiento(IDPoliza, dr("IdCuentaPagado").ToString.ToEntero, False, Importe, "", "", 0, Now, "") Then + If Conta.AddMovimiento(IDPoliza, dr("IdCuentaEjercido").ToString.ToEntero, True, Importe, "", "", 0, NowADS(), "") Then + If Not Conta.AddMovimiento(IDPoliza, dr("IdCuentaPagado").ToString.ToEntero, False, Importe, "", "", 0, NowADS(), "") Then TieneError = True Exit For End If diff --git a/AC/RegDevengadoIngresos.aspx.vb b/AC/RegDevengadoIngresos.aspx.vb index 331d51626..610331123 100644 --- a/AC/RegDevengadoIngresos.aspx.vb +++ b/AC/RegDevengadoIngresos.aspx.vb @@ -91,8 +91,8 @@ Partial Class AC_RegDevengadoIngresos Dim dr As DataRow = DtPresupuestos.FiltroPrimero(String.Format("CvePresupuestoIngreso = {0}", CboPresupuesto.SelectedValue)) If dr IsNot Nothing Then - If ObjContaAC.AddMovimiento(IDPoliza, dr("IdCuentaDevengado").ToString.ToEntero, False, TotalDevengar, "", CboPresupuesto.SelectedItem.Text, 0, Now, "") Then - If ObjContaAC.AddMovimiento(IDPoliza, dr("IdCuentaPorEjecutar").ToString.ToEntero, True, TotalDevengar, "", CboPresupuesto.SelectedItem.Text, 0, Now, "") Then + If ObjContaAC.AddMovimiento(IDPoliza, dr("IdCuentaDevengado").ToString.ToEntero, False, TotalDevengar, "", CboPresupuesto.SelectedItem.Text, 0, NowADS(), "") Then + If ObjContaAC.AddMovimiento(IDPoliza, dr("IdCuentaPorEjecutar").ToString.ToEntero, True, TotalDevengar, "", CboPresupuesto.SelectedItem.Text, 0, NowADS(), "") Then 'AFECTAR MATRIZ INGRESOS Dim RegistroMatriz As DataRow = GlobalDTAC_MatrizIngresos.FiltroPrimero(String.Format("CodigoRubroIngreso = {0} ", dr("CodigoRubroIngreso").ToString)) @@ -103,9 +103,9 @@ Partial Class AC_RegDevengadoIngresos End If Dim CuentaCargo As Integer = DtCuentas.FiltraParametros(String.Format("Codigo = '{0}'", RegistroMatriz("CuentaCargo").ToString)).Rows(0)("Id").ToString.ToEntero Dim CuentaAbono As Integer = DtCuentas.FiltraParametros(String.Format("Codigo = '{0}'", RegistroMatriz("CuentaAbono").ToString)).Rows(0)("Id").ToString.ToEntero - If ObjContaAC.AddMovimiento(IDPoliza, CuentaCargo, False, TotalDevengar, "", CboPresupuesto.SelectedItem.Text, 0, Now, "") Then + If ObjContaAC.AddMovimiento(IDPoliza, CuentaCargo, False, TotalDevengar, "", CboPresupuesto.SelectedItem.Text, 0, NowADS(), "") Then 'actualizo el idcuenta del presupuesto - If Not ObjContaAC.AddMovimiento(IDPoliza, CuentaAbono, True, TotalDevengar, "", CboPresupuesto.SelectedItem.Text, 0, Now, "") Then + If Not ObjContaAC.AddMovimiento(IDPoliza, CuentaAbono, True, TotalDevengar, "", CboPresupuesto.SelectedItem.Text, 0, NowADS(), "") Then ErrorAC = True End If Else @@ -168,13 +168,13 @@ Partial Class AC_RegDevengadoIngresos If dr IsNot Nothing Then 'registro movimiento a la cuenta 814 - If ObjContaAC.AddMovimiento(IDPoliza, dr("IdCuentaRecaudado").ToString.ToEntero, False, TotalRecaudar, "", CboPresupuesto.SelectedItem.Text, 0, Now, "") Then + If ObjContaAC.AddMovimiento(IDPoliza, dr("IdCuentaRecaudado").ToString.ToEntero, False, TotalRecaudar, "", CboPresupuesto.SelectedItem.Text, 0, NowADS(), "") Then 'registro movimeinto a la cuenta 815 - If ObjContaAC.AddMovimiento(IDPoliza, dr("IdCuentaDevengado").ToString.ToEntero, True, TotalRecaudar, "", CboPresupuesto.SelectedItem.Text, 0, Now, "") Then + If ObjContaAC.AddMovimiento(IDPoliza, dr("IdCuentaDevengado").ToString.ToEntero, True, TotalRecaudar, "", CboPresupuesto.SelectedItem.Text, 0, NowADS(), "") Then 'registro movimiento a donde se donde - If Not ObjContaAC.AddMovimiento(IDPoliza, IdCuentaContable, False, TotalRecaudar, "", CboPresupuesto.SelectedItem.Text, 0, Now, "") Then + If Not ObjContaAC.AddMovimiento(IDPoliza, IdCuentaContable, False, TotalRecaudar, "", CboPresupuesto.SelectedItem.Text, 0, NowADS(), "") Then 'descuento a la cuenta bancaria - If ObjContaAC.AddMovimiento(IDPoliza, dr("IdCuentaDevengado").ToString.ToEntero, True, TotalRecaudar, "", CboPresupuesto.SelectedItem.Text, 0, Now, "") Then + If ObjContaAC.AddMovimiento(IDPoliza, dr("IdCuentaDevengado").ToString.ToEntero, True, TotalRecaudar, "", CboPresupuesto.SelectedItem.Text, 0, NowADS(), "") Then ErrorAC = True End If Else diff --git a/AC/RegEgresosModificaciones.aspx.vb b/AC/RegEgresosModificaciones.aspx.vb index e4095cd8a..d65829c30 100644 --- a/AC/RegEgresosModificaciones.aspx.vb +++ b/AC/RegEgresosModificaciones.aspx.vb @@ -48,7 +48,7 @@ Partial Class AC_RegPEAmpRed CreaDTDetalles() CargaPresupuestos() CargaCombosPE() - TxtFecha.Text = Now.ToShortDateString + TxtFecha.Text = NowADS().ToShortDateString End If End Sub Private Sub CargaPresupuestos() diff --git a/AC/RegIngresosModificaciones.aspx.vb b/AC/RegIngresosModificaciones.aspx.vb index 3fcc0fa29..0871f69f2 100644 --- a/AC/RegIngresosModificaciones.aspx.vb +++ b/AC/RegIngresosModificaciones.aspx.vb @@ -60,7 +60,7 @@ Partial Class AC_RegIngresosModificaciones CreaDTDetalles() CargaPresupuestos() - TxtFecha.Text = Now.ToShortDateString + TxtFecha.Text = NowADS().ToShortDateString LtEjercicio.Text = UsuarioActual.Empresa.EjercicioActual.ToString @@ -128,7 +128,7 @@ Partial Class AC_RegIngresosModificaciones Dim ampliacion As Double Dim reduccion As Double Conta.IniciaTransacSQL() - Dim Fecha As Date = Now + Dim Fecha As Date = NowADS() If Accion = 0 Then For Each gvr As GridViewRow In GvD.Rows diff --git a/AC/RegNomina.aspx.vb b/AC/RegNomina.aspx.vb index 90cc7fdc7..8f0bf32c0 100644 --- a/AC/RegNomina.aspx.vb +++ b/AC/RegNomina.aspx.vb @@ -47,7 +47,7 @@ Partial Class AC_RegNomina 'Else ' LbTitulo.Text = "Comprometido Otros" 'End If - TxtFecha.Text = Now.ToShortDateString + TxtFecha.Text = NowADS().ToShortDateString CargaPresupuestos() CargaMeta() diff --git a/AC/RepAnaliticoDeudaPublica.aspx.vb b/AC/RepAnaliticoDeudaPublica.aspx.vb index 870d7c02f..cf539ba8a 100644 --- a/AC/RepAnaliticoDeudaPublica.aspx.vb +++ b/AC/RepAnaliticoDeudaPublica.aspx.vb @@ -41,7 +41,7 @@ Partial Class AC_RepAnaliticoDeudaPublica TxtFechaInicio.Text = String.Format("01/01/{0}", UsuarioActual.Empresa.EjercicioActual) CalendarioInicio.StartDate = TxtFechaInicio.Text.ToDate - TxtFechaFin.Text = String.Format("{0}/{1}/{2}", Now.Day, Now.Month, UsuarioActual.Empresa.EjercicioActual) + TxtFechaFin.Text = String.Format("{0}/{1}/{2}", NowADS().Day, NowADS().Month, UsuarioActual.Empresa.EjercicioActual) CalendarioFin.EndDate = String.Format("31/12/{0}", UsuarioActual.Empresa.EjercicioActual).ToDate CargaDatos() @@ -198,7 +198,7 @@ Partial Class AC_RepAnaliticoDeudaPublica 'End Sub Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click - 'Gv.ExportToExcel("Estado analitico" & Now.ToShortDateString) + 'Gv.ExportToExcel("Estado analitico" & NowADS().ToShortDateString) If Not IsNothing(DtDatos) Then ImprimirReporte("Excel") 'Descarga reporte en Excel Else diff --git a/AC/RepCambiosSituacionFinanciera.aspx.vb b/AC/RepCambiosSituacionFinanciera.aspx.vb index 6c99e45b4..f10b440bf 100644 --- a/AC/RepCambiosSituacionFinanciera.aspx.vb +++ b/AC/RepCambiosSituacionFinanciera.aspx.vb @@ -126,8 +126,8 @@ Partial Class AC_RepCambiosSituacionFinanciera If Not Page.IsPostBack Then If UsuarioActual.Empresa.UsaAC Then - 'TxtFechaDel.Text = DateSerial(Year(Now), Month(Now), 1).ToShortDateString - 'TxtFechaAl.Text = Date.Now.ToShortDateString + 'TxtFechaDel.Text = DateSerial(Year(NowADS()), Month(NowADS()), 1).ToShortDateString + 'TxtFechaAl.Text = NowADS().ToShortDateString CargaDatos() diff --git a/AC/RepEstadoActividades.aspx.vb b/AC/RepEstadoActividades.aspx.vb index 133e0a7ca..422effe40 100644 --- a/AC/RepEstadoActividades.aspx.vb +++ b/AC/RepEstadoActividades.aspx.vb @@ -93,8 +93,8 @@ Partial Class AC_RepEstadoActividades TotalActual = 0 TotalAnterior = 0 - 'TxtFechaInicio.Text = DateSerial(Year(Date.Now), 1, 1).ToShortDateString - 'TxtFechaFin.Text = Date.Now.ToShortDateString + 'TxtFechaInicio.Text = DateSerial(Year(NowADS()), 1, 1).ToShortDateString + 'TxtFechaFin.Text = NowADS().ToShortDateString CargaEjercicios() CargaDatos() @@ -113,7 +113,7 @@ Partial Class AC_RepEstadoActividades DdlEjercicio.DataBind() DdlEjercicio.SelectedValueExist(UsuarioActual.Empresa.EjercicioActual.ToString) - DdlPeriodo.SelectedValue = Now.Month.ToString + DdlPeriodo.SelectedValue = NowADS().Month.ToString End Sub Private Sub CargaDatos() diff --git a/AC/RepEstadoAnaliticoActivo.aspx.vb b/AC/RepEstadoAnaliticoActivo.aspx.vb index 2b9a5ba46..4a9fe7704 100644 --- a/AC/RepEstadoAnaliticoActivo.aspx.vb +++ b/AC/RepEstadoAnaliticoActivo.aspx.vb @@ -100,7 +100,7 @@ Partial Class AC_RepEstadoAnaliticoActivo End Sub Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click - 'GvDatos.ExportToExcel("Estado analitico" & Now.ToShortDateString) + 'GvDatos.ExportToExcel("Estado analitico" & NowADS().ToShortDateString) ImprimirReporte("Excel") 'Descarga reporte en Excel End Sub diff --git a/AC/RepFlujoEfectivo.aspx.vb b/AC/RepFlujoEfectivo.aspx.vb index a99f8baa6..cf1f90278 100644 --- a/AC/RepFlujoEfectivo.aspx.vb +++ b/AC/RepFlujoEfectivo.aspx.vb @@ -53,8 +53,8 @@ Partial Class AC_RepFlujoEfectivo If Not Page.IsPostBack Then If UsuarioActual.Empresa.UsaAC Then - TxtFechaDel.Text = DateSerial(Year(Now), Month(Now), 1).ToShortDateString - TxtFechaAl.Text = Date.Now.ToShortDateString + TxtFechaDel.Text = DateSerial(Year(NowADS()), Month(NowADS()), 1).ToShortDateString + TxtFechaAl.Text = NowADS().ToShortDateString CargaDatos() @@ -70,8 +70,8 @@ Partial Class AC_RepFlujoEfectivo Private Sub CargaDatos() Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) - Dim FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate) - Dim FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate) + Dim FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate) + Dim FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate) FechaAl = TxtFechaAl.Text If ObjConta.GetFlujoEfectivo(FechaInicio, FechaFin, DdlUnidad.SelectedValue.ToEntero) Then DtDatos = ObjConta.DtResultados @@ -220,7 +220,7 @@ Partial Class AC_RepFlujoEfectivo 'End Sub Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click - 'GvDatos.ExportToExcel("ReporteFlujoEfectivo" & Now.ToShortDateString) + 'GvDatos.ExportToExcel("ReporteFlujoEfectivo" & NowADS().ToShortDateString) If Not IsNothing(DtDatos) Then ImprimirReporte("Excel") Else diff --git a/AC/RepIngresos.aspx.vb.exclude b/AC/RepIngresos.aspx.vb.exclude index ecd9d3da3..fbeeabe13 100644 --- a/AC/RepIngresos.aspx.vb.exclude +++ b/AC/RepIngresos.aspx.vb.exclude @@ -20,7 +20,7 @@ Partial Class AC_RepIngresos Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load If Not Page.IsPostBack Then - TxtFechaCorte.Text = Date.Now.ToShortDateString + TxtFechaCorte.Text = NowADS().ToShortDateString CargaDatos() End If diff --git a/AC/RepPresupuestoEgresos.aspx.vb b/AC/RepPresupuestoEgresos.aspx.vb index 152d498b5..b6f02b05d 100644 --- a/AC/RepPresupuestoEgresos.aspx.vb +++ b/AC/RepPresupuestoEgresos.aspx.vb @@ -30,7 +30,7 @@ Partial Class AC_RepPresupuestoEgresos Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load If Not Page.IsPostBack Then - txtFechaF.Text = Now.ToShortDateString + txtFechaF.Text = NowADS().ToShortDateString CargaCombos() End If End Sub @@ -82,10 +82,10 @@ Partial Class AC_RepPresupuestoEgresos UPFiltros.Update() End Sub Private Sub LimitaFechaCorte() - If DdlEjercicio.SelectedValue.ToEntero = Year(Now) Then - Calendario2.EndDate = Now - RVFechaFinal.MaximumValue = Now.ToShortDateString - txtFechaF.Text = Now.ToShortDateString + If DdlEjercicio.SelectedValue.ToEntero = Year(NowADS()) Then + Calendario2.EndDate = NowADS() + RVFechaFinal.MaximumValue = NowADS().ToShortDateString + txtFechaF.Text = NowADS().ToShortDateString Else Calendario2.EndDate = String.Format("31/12/{0}", DdlEjercicio.SelectedValue.ToEntero).ToDate RVFechaFinal.MaximumValue = String.Format("31/12/{0}", DdlEjercicio.SelectedValue.ToEntero) @@ -183,13 +183,13 @@ Partial Class AC_RepPresupuestoEgresos If e.Row.DBCampo("Ejercido").ToDecimal > e.Row.DBCampo("Devengado").ToDecimal Then e.Row.FCHyperLink("HLEjercido").ForeColor = Drawing.Color.Red If e.Row.DBCampo("Pagado").ToDecimal > e.Row.DBCampo("Ejercido").ToDecimal Then e.Row.FCHyperLink("HLPagado").ForeColor = Drawing.Color.Red - e.Row.FCHyperLink("HLComprometido").NavigateUrl = String.Format("/AC/RepPresupuestoEgresosDetalle.aspx?MM=1&PO={0}&FF={1}&TG={2}&UA={3}&C={4}&COG={5}&FeI={6}&FeF={7}&Ej={8}", e.Row.DBCampo("CveProgramaOperativo").ToEntero, e.Row.DBCampo("CveFuenteFinanciamiento").ToEntero, e.Row.DBCampo("CveTipoGasto").ToEntero, e.Row.DBCampo("CveUnidadAdministrativa").ToEntero, e.Row.DBCampo("CveClasificacion").ToEntero, e.Row.DBCampo("CodigoOG").ToEntero, String.Format("01/01/{0}", DdlEjercicio.SelectedItem.Text), If(txtFechaF.Text <> "", txtFechaF.Text, Date.Now.ToString("dd/MM/yyyy")), DdlEjercicio.SelectedValue) + e.Row.FCHyperLink("HLComprometido").NavigateUrl = String.Format("/AC/RepPresupuestoEgresosDetalle.aspx?MM=1&PO={0}&FF={1}&TG={2}&UA={3}&C={4}&COG={5}&FeI={6}&FeF={7}&Ej={8}", e.Row.DBCampo("CveProgramaOperativo").ToEntero, e.Row.DBCampo("CveFuenteFinanciamiento").ToEntero, e.Row.DBCampo("CveTipoGasto").ToEntero, e.Row.DBCampo("CveUnidadAdministrativa").ToEntero, e.Row.DBCampo("CveClasificacion").ToEntero, e.Row.DBCampo("CodigoOG").ToEntero, String.Format("01/01/{0}", DdlEjercicio.SelectedItem.Text), If(txtFechaF.Text <> "", txtFechaF.Text, NowADS().ToString("dd/MM/yyyy")), DdlEjercicio.SelectedValue) e.Row.FCHyperLink("HLComprometido").CssClass = "Texto" - e.Row.FCHyperLink("HLDevengado").NavigateUrl = String.Format("/AC/RepPresupuestoEgresosDetalle.aspx?MM=2&PO={0}&FF={1}&TG={2}&UA={3}&C={4}&COG={5}&FeI={6}&FeF={7}&Ej={8}", e.Row.DBCampo("CveProgramaOperativo").ToEntero, e.Row.DBCampo("CveFuenteFinanciamiento").ToEntero, e.Row.DBCampo("CveTipoGasto").ToEntero, e.Row.DBCampo("CveUnidadAdministrativa").ToEntero, e.Row.DBCampo("CveClasificacion").ToEntero, e.Row.DBCampo("CodigoOG").ToEntero, String.Format("01/01/{0}", DdlEjercicio.SelectedItem.Text), If(txtFechaF.Text <> "", txtFechaF.Text, Date.Now.ToString("dd/MM/yyyy")), DdlEjercicio.SelectedValue) + e.Row.FCHyperLink("HLDevengado").NavigateUrl = String.Format("/AC/RepPresupuestoEgresosDetalle.aspx?MM=2&PO={0}&FF={1}&TG={2}&UA={3}&C={4}&COG={5}&FeI={6}&FeF={7}&Ej={8}", e.Row.DBCampo("CveProgramaOperativo").ToEntero, e.Row.DBCampo("CveFuenteFinanciamiento").ToEntero, e.Row.DBCampo("CveTipoGasto").ToEntero, e.Row.DBCampo("CveUnidadAdministrativa").ToEntero, e.Row.DBCampo("CveClasificacion").ToEntero, e.Row.DBCampo("CodigoOG").ToEntero, String.Format("01/01/{0}", DdlEjercicio.SelectedItem.Text), If(txtFechaF.Text <> "", txtFechaF.Text, NowADS().ToString("dd/MM/yyyy")), DdlEjercicio.SelectedValue) e.Row.FCHyperLink("HLDevengado").CssClass = "Texto" - e.Row.FCHyperLink("HLEjercido").NavigateUrl = String.Format("/AC/RepPresupuestoEgresosDetalle.aspx?MM=3&PO={0}&FF={1}&TG={2}&UA={3}&C={4}&COG={5}&FeI={6}&FeF={7}&Ej={8}", e.Row.DBCampo("CveProgramaOperativo").ToEntero, e.Row.DBCampo("CveFuenteFinanciamiento").ToEntero, e.Row.DBCampo("CveTipoGasto").ToEntero, e.Row.DBCampo("CveUnidadAdministrativa").ToEntero, e.Row.DBCampo("CveClasificacion").ToEntero, e.Row.DBCampo("CodigoOG").ToEntero, String.Format("01/01/{0}", DdlEjercicio.SelectedItem.Text), If(txtFechaF.Text <> "", txtFechaF.Text, Date.Now.ToString("dd/MM/yyyy")), DdlEjercicio.SelectedValue) + e.Row.FCHyperLink("HLEjercido").NavigateUrl = String.Format("/AC/RepPresupuestoEgresosDetalle.aspx?MM=3&PO={0}&FF={1}&TG={2}&UA={3}&C={4}&COG={5}&FeI={6}&FeF={7}&Ej={8}", e.Row.DBCampo("CveProgramaOperativo").ToEntero, e.Row.DBCampo("CveFuenteFinanciamiento").ToEntero, e.Row.DBCampo("CveTipoGasto").ToEntero, e.Row.DBCampo("CveUnidadAdministrativa").ToEntero, e.Row.DBCampo("CveClasificacion").ToEntero, e.Row.DBCampo("CodigoOG").ToEntero, String.Format("01/01/{0}", DdlEjercicio.SelectedItem.Text), If(txtFechaF.Text <> "", txtFechaF.Text, NowADS().ToString("dd/MM/yyyy")), DdlEjercicio.SelectedValue) e.Row.FCHyperLink("HLEjercido").CssClass = "Texto" - e.Row.FCHyperLink("HLPagado").NavigateUrl = String.Format("/AC/RepPresupuestoEgresosDetalle.aspx?MM=4&PO={0}&FF={1}&TG={2}&UA={3}&C={4}&COG={5}&FeI={6}&FeF={7}&Ej={8}", e.Row.DBCampo("CveProgramaOperativo").ToEntero, e.Row.DBCampo("CveFuenteFinanciamiento").ToEntero, e.Row.DBCampo("CveTipoGasto").ToEntero, e.Row.DBCampo("CveUnidadAdministrativa").ToEntero, e.Row.DBCampo("CveClasificacion").ToEntero, e.Row.DBCampo("CodigoOG").ToEntero, String.Format("01/01/{0}", DdlEjercicio.SelectedItem.Text), If(txtFechaF.Text <> "", txtFechaF.Text, Date.Now.ToString("dd/MM/yyyy")), DdlEjercicio.SelectedValue) + e.Row.FCHyperLink("HLPagado").NavigateUrl = String.Format("/AC/RepPresupuestoEgresosDetalle.aspx?MM=4&PO={0}&FF={1}&TG={2}&UA={3}&C={4}&COG={5}&FeI={6}&FeF={7}&Ej={8}", e.Row.DBCampo("CveProgramaOperativo").ToEntero, e.Row.DBCampo("CveFuenteFinanciamiento").ToEntero, e.Row.DBCampo("CveTipoGasto").ToEntero, e.Row.DBCampo("CveUnidadAdministrativa").ToEntero, e.Row.DBCampo("CveClasificacion").ToEntero, e.Row.DBCampo("CodigoOG").ToEntero, String.Format("01/01/{0}", DdlEjercicio.SelectedItem.Text), If(txtFechaF.Text <> "", txtFechaF.Text, NowADS().ToString("dd/MM/yyyy")), DdlEjercicio.SelectedValue) e.Row.FCHyperLink("HLPagado").CssClass = "Texto" 'End If 'End If diff --git a/AC/RepPresupuestoEgresosDetalle.aspx.vb b/AC/RepPresupuestoEgresosDetalle.aspx.vb index b6d7f0f3c..16502b52d 100644 --- a/AC/RepPresupuestoEgresosDetalle.aspx.vb +++ b/AC/RepPresupuestoEgresosDetalle.aspx.vb @@ -112,8 +112,8 @@ Partial Class AC_RepPresupuestoEgresosDetalle params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png") params.Add(New ReportParameter("Img", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) - params.Add(New ReportParameter("Fecha", Now.ToString("dd/MM/yyyy"))) - ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/RepPresupuestosEgresos.rdlc", DtDatos, params, $"Rep.PresupuestosEgresos - {Now.ToShortDateString}", Formato:=Formato) + params.Add(New ReportParameter("Fecha", NowADS().ToString("dd/MM/yyyy"))) + ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/RepPresupuestosEgresos.rdlc", DtDatos, params, $"Rep.PresupuestosEgresos - {NowADS().ToShortDateString}", Formato:=Formato) End Sub Private Sub HplDownPDF_Click(sender As Object, e As EventArgs) Handles HplDownPDF.Click diff --git a/AC/RepPresupuestoIngresos.aspx.vb b/AC/RepPresupuestoIngresos.aspx.vb index 51798f725..973cb0685 100644 --- a/AC/RepPresupuestoIngresos.aspx.vb +++ b/AC/RepPresupuestoIngresos.aspx.vb @@ -49,7 +49,7 @@ Partial Class AC_RepPresupuestoIngresos End If DdlEjercicio.DataBind() DdlEjercicio.SelectedValue = UsuarioActual.Empresa.EjercicioActual.ToString - txtFechaF.Text = Now.ToShortDateString + txtFechaF.Text = NowADS().ToShortDateString CargaDatos() End If End Sub @@ -118,23 +118,23 @@ Partial Class AC_RepPresupuestoIngresos 'e.Row.FCHyperLink("HLRecaudado").Visible = False Else - e.Row.FCHyperLink("HLEstimado").NavigateUrl = String.Format("/AC/RepPresupuestoIngresosDetalle.aspx?MM=1&FR={0}&RI={1}&FeI={2}&FeF={3}&Ej={4}", e.Row.DBCampo("CveFuenteRecaudacion").ToEntero, e.Row.DBCampo("CveRubroIngreso").ToEntero, String.Format("01/01/{0}", DdlEjercicio.SelectedItem.Text), If(txtFechaF.Text <> "", txtFechaF.Text, Date.Now.ToString("dd/MM/yyyy")), DdlEjercicio.SelectedValue) + e.Row.FCHyperLink("HLEstimado").NavigateUrl = String.Format("/AC/RepPresupuestoIngresosDetalle.aspx?MM=1&FR={0}&RI={1}&FeI={2}&FeF={3}&Ej={4}", e.Row.DBCampo("CveFuenteRecaudacion").ToEntero, e.Row.DBCampo("CveRubroIngreso").ToEntero, String.Format("01/01/{0}", DdlEjercicio.SelectedItem.Text), If(txtFechaF.Text <> "", txtFechaF.Text, NowADS().ToString("dd/MM/yyyy")), DdlEjercicio.SelectedValue) e.Row.FCHyperLink("HLEstimado").CssClass = "Texto" - e.Row.FCHyperLink("HLModificado").NavigateUrl = String.Format("/AC/RepPresupuestoIngresosDetalle.aspx?MM=2&FR={0}&RI={1}&FeI={2}&FeF={3}&Ej={4}", e.Row.DBCampo("CveFuenteRecaudacion").ToEntero, e.Row.DBCampo("CveRubroIngreso").ToEntero, String.Format("01/01/{0}", DdlEjercicio.SelectedItem.Text), If(txtFechaF.Text <> "", txtFechaF.Text, Date.Now.ToString("dd/MM/yyyy")), DdlEjercicio.SelectedValue) + e.Row.FCHyperLink("HLModificado").NavigateUrl = String.Format("/AC/RepPresupuestoIngresosDetalle.aspx?MM=2&FR={0}&RI={1}&FeI={2}&FeF={3}&Ej={4}", e.Row.DBCampo("CveFuenteRecaudacion").ToEntero, e.Row.DBCampo("CveRubroIngreso").ToEntero, String.Format("01/01/{0}", DdlEjercicio.SelectedItem.Text), If(txtFechaF.Text <> "", txtFechaF.Text, NowADS().ToString("dd/MM/yyyy")), DdlEjercicio.SelectedValue) e.Row.FCHyperLink("HLModificado").CssClass = "Texto" - e.Row.FCHyperLink("HLDevengado").NavigateUrl = String.Format("/AC/RepPresupuestoIngresosDetalle.aspx?MM=3&FR={0}&RI={1}&FeI={2}&FeF={3}&Ej={4}", e.Row.DBCampo("CveFuenteRecaudacion").ToEntero, e.Row.DBCampo("CveRubroIngreso").ToEntero, String.Format("01/01/{0}", DdlEjercicio.SelectedItem.Text), If(txtFechaF.Text <> "", txtFechaF.Text, Date.Now.ToString("dd/MM/yyyy")), DdlEjercicio.SelectedValue) + e.Row.FCHyperLink("HLDevengado").NavigateUrl = String.Format("/AC/RepPresupuestoIngresosDetalle.aspx?MM=3&FR={0}&RI={1}&FeI={2}&FeF={3}&Ej={4}", e.Row.DBCampo("CveFuenteRecaudacion").ToEntero, e.Row.DBCampo("CveRubroIngreso").ToEntero, String.Format("01/01/{0}", DdlEjercicio.SelectedItem.Text), If(txtFechaF.Text <> "", txtFechaF.Text, NowADS().ToString("dd/MM/yyyy")), DdlEjercicio.SelectedValue) e.Row.FCHyperLink("HLDevengado").CssClass = "Texto" - e.Row.FCHyperLink("HLRecaudado").NavigateUrl = String.Format("/AC/RepPresupuestoIngresosDetalle.aspx?MM=4&FR={0}&RI={1}&FeI={2}&FeF={3}&Ej={4}", e.Row.DBCampo("CveFuenteRecaudacion").ToEntero, e.Row.DBCampo("CveRubroIngreso").ToEntero, String.Format("01/01/{0}", DdlEjercicio.SelectedItem.Text), If(txtFechaF.Text <> "", txtFechaF.Text, Date.Now.ToString("dd/MM/yyyy")), DdlEjercicio.SelectedValue) + e.Row.FCHyperLink("HLRecaudado").NavigateUrl = String.Format("/AC/RepPresupuestoIngresosDetalle.aspx?MM=4&FR={0}&RI={1}&FeI={2}&FeF={3}&Ej={4}", e.Row.DBCampo("CveFuenteRecaudacion").ToEntero, e.Row.DBCampo("CveRubroIngreso").ToEntero, String.Format("01/01/{0}", DdlEjercicio.SelectedItem.Text), If(txtFechaF.Text <> "", txtFechaF.Text, NowADS().ToString("dd/MM/yyyy")), DdlEjercicio.SelectedValue) e.Row.FCHyperLink("HLRecaudado").CssClass = "Texto" - 'e.Row.FCHyperLink("HLEstimado").NavigateUrl = String.Format("/AC/RepPresupuestoIngresosDetalle.aspx?MM=1&FR={0}&RI={1}&FeI={2}&FeF={3}&Ej={4}", e.Row.DBCampo("CveFuenteRecaudacion").ToEntero, e.Row.DBCampo("CveRubroIngreso").ToEntero, String.Format("01/01/{0}", DdlEjercicio.SelectedItem.Text), If(txtFechaF.Text <> "", txtFechaF.Text, Date.Now.ToString("dd/MM/yyyy")), DdlEjercicio.SelectedValue) + 'e.Row.FCHyperLink("HLEstimado").NavigateUrl = String.Format("/AC/RepPresupuestoIngresosDetalle.aspx?MM=1&FR={0}&RI={1}&FeI={2}&FeF={3}&Ej={4}", e.Row.DBCampo("CveFuenteRecaudacion").ToEntero, e.Row.DBCampo("CveRubroIngreso").ToEntero, String.Format("01/01/{0}", DdlEjercicio.SelectedItem.Text), If(txtFechaF.Text <> "", txtFechaF.Text, NowADS().ToString("dd/MM/yyyy")), DdlEjercicio.SelectedValue) 'e.Row.FCHyperLink("HLEstimado").CssClass = "Texto" - 'e.Row.FCHyperLink("HLModificado").NavigateUrl = String.Format("/AC/RepPresupuestoIngresosDetalle.aspx?MM=2&FR={0}&RI={1}&FeI={2}&FeF={3}&Ej={4}", e.Row.DBCampo("CveFuenteRecaudacion").ToEntero, e.Row.DBCampo("CveRubroIngreso").ToEntero, String.Format("01/01/{0}", DdlEjercicio.SelectedItem.Text), If(txtFechaF.Text <> "", txtFechaF.Text, Date.Now.ToString("dd/MM/yyyy")), DdlEjercicio.SelectedValue) + 'e.Row.FCHyperLink("HLModificado").NavigateUrl = String.Format("/AC/RepPresupuestoIngresosDetalle.aspx?MM=2&FR={0}&RI={1}&FeI={2}&FeF={3}&Ej={4}", e.Row.DBCampo("CveFuenteRecaudacion").ToEntero, e.Row.DBCampo("CveRubroIngreso").ToEntero, String.Format("01/01/{0}", DdlEjercicio.SelectedItem.Text), If(txtFechaF.Text <> "", txtFechaF.Text, NowADS().ToString("dd/MM/yyyy")), DdlEjercicio.SelectedValue) 'e.Row.FCHyperLink("HLModificado").CssClass = "Texto" - 'e.Row.FCHyperLink("HLDevengado").NavigateUrl = String.Format("/AC/RepPresupuestoIngresosDetalle.aspx?MM=3&FR={0}&RI={1}&FeI={2}&FeF={3}&Ej={4}", e.Row.DBCampo("CveFuenteRecaudacion").ToEntero, e.Row.DBCampo("CveRubroIngreso").ToEntero, String.Format("01/01/{0}", DdlEjercicio.SelectedItem.Text), If(txtFechaF.Text <> "", txtFechaF.Text, Date.Now.ToString("dd/MM/yyyy")), DdlEjercicio.SelectedValue) + 'e.Row.FCHyperLink("HLDevengado").NavigateUrl = String.Format("/AC/RepPresupuestoIngresosDetalle.aspx?MM=3&FR={0}&RI={1}&FeI={2}&FeF={3}&Ej={4}", e.Row.DBCampo("CveFuenteRecaudacion").ToEntero, e.Row.DBCampo("CveRubroIngreso").ToEntero, String.Format("01/01/{0}", DdlEjercicio.SelectedItem.Text), If(txtFechaF.Text <> "", txtFechaF.Text, NowADS().ToString("dd/MM/yyyy")), DdlEjercicio.SelectedValue) 'e.Row.FCHyperLink("HLDevengado").CssClass = "Texto" - 'e.Row.FCHyperLink("HLRecaudado").NavigateUrl = String.Format("/AC/RepPresupuestoIngresosDetalle.aspx?MM=4&FR={0}&RI={1}&FeI={2}&FeF={3}&Ej={4}", e.Row.DBCampo("CveFuenteRecaudacion").ToEntero, e.Row.DBCampo("CveRubroIngreso").ToEntero, String.Format("01/01/{0}", DdlEjercicio.SelectedItem.Text), If(txtFechaF.Text <> "", txtFechaF.Text, Date.Now.ToString("dd/MM/yyyy")), DdlEjercicio.SelectedValue) + 'e.Row.FCHyperLink("HLRecaudado").NavigateUrl = String.Format("/AC/RepPresupuestoIngresosDetalle.aspx?MM=4&FR={0}&RI={1}&FeI={2}&FeF={3}&Ej={4}", e.Row.DBCampo("CveFuenteRecaudacion").ToEntero, e.Row.DBCampo("CveRubroIngreso").ToEntero, String.Format("01/01/{0}", DdlEjercicio.SelectedItem.Text), If(txtFechaF.Text <> "", txtFechaF.Text, NowADS().ToString("dd/MM/yyyy")), DdlEjercicio.SelectedValue) 'e.Row.FCHyperLink("HLRecaudado").CssClass = "Texto" End If diff --git a/AC/RepSituacionFinanciera.aspx.vb b/AC/RepSituacionFinanciera.aspx.vb index e4b336d2d..8a1a83a5d 100644 --- a/AC/RepSituacionFinanciera.aspx.vb +++ b/AC/RepSituacionFinanciera.aspx.vb @@ -153,8 +153,8 @@ Partial Class AC_SituacionFinanciera TotalPasivoPatrimonioActual = 0 TotalPasivoPatrimonioAnterior = 0 - 'TxtFechaInicio.Text = DateSerial(Year(Date.Now), 1, 1).ToShortDateString - 'TxtFechaFin.Text = Date.Now.ToShortDateString + 'TxtFechaInicio.Text = DateSerial(Year(NowADS()), 1, 1).ToShortDateString + 'TxtFechaFin.Text = NowADS().ToShortDateString CargaEjercicios() @@ -175,7 +175,7 @@ Partial Class AC_SituacionFinanciera DdlEjercicio.DataBind() DdlEjercicio.SelectedValueExist(UsuarioActual.Empresa.EjercicioActual.ToString) - DdlPeriodo.SelectedValue = Now.Month.ToString + DdlPeriodo.SelectedValue = NowADS().Month.ToString End Sub Private Sub CargaDatos() diff --git a/AC/RepVariacionHaciendaPublica.aspx.vb b/AC/RepVariacionHaciendaPublica.aspx.vb index b314e0dee..f005d156c 100644 --- a/AC/RepVariacionHaciendaPublica.aspx.vb +++ b/AC/RepVariacionHaciendaPublica.aspx.vb @@ -71,8 +71,8 @@ Partial Class AC_RepVariacionHaciendaPublica If Not Page.IsPostBack Then If UsuarioActual.Empresa.UsaAC Then - TxtFechaDel.Text = DateSerial(Year(Now), Month(Now), 1).ToShortDateString - TxtFechaAl.Text = Date.Now.ToShortDateString + TxtFechaDel.Text = DateSerial(Year(NowADS()), Month(NowADS()), 1).ToShortDateString + TxtFechaAl.Text = NowADS().ToShortDateString CargaDatos() @@ -88,8 +88,8 @@ Partial Class AC_RepVariacionHaciendaPublica Private Sub CargaDatos() Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) - Dim FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate) - Dim FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate) + Dim FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate) + Dim FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate) FechaDel = TxtFechaDel.Text FechaAl = TxtFechaAl.Text @@ -366,7 +366,7 @@ Partial Class AC_RepVariacionHaciendaPublica 'End Sub Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click - 'GvDatos.ExportToExcel("123456" & Now.ToShortDateString) + 'GvDatos.ExportToExcel("123456" & NowADS().ToShortDateString) If Not IsNothing(DtDatos) Then ImprimirReporte("Excel") 'Descarga reporte en Excel Else diff --git a/AF/AF.aspx.vb b/AF/AF.aspx.vb index 2ad4f8085..ab530b603 100644 --- a/AF/AF.aspx.vb +++ b/AF/AF.aspx.vb @@ -402,7 +402,7 @@ Partial Class AF_AF 'Configuración de Modalidad Insert ImgAddObs.Visible = False - LblFechaCaptura.Text = Now.ToShortDateString() + LblFechaCaptura.Text = NowADS().ToShortDateString() LblUsuarioCapturo.Text = UsuarioActual.Usuario BtnEliminar.Visible = False @@ -484,17 +484,17 @@ Partial Class AF_AF GVOrdenesdeServicio.DataBind() End Sub Private Sub CargaFechaGPS() - TxtFechaIH.Text = $"01/{DateTime.Now.ToString("MM")}/{DateTime.Now.Year} 00:00" - TxtFechaFH.Text = $"{DateTime.Now.ToString("dd/MM/yyyy")} 23:59" + TxtFechaIH.Text = $"01/{NowADS().ToString("MM")}/{NowADS().Year} 00:00" + TxtFechaFH.Text = $"{NowADS().ToString("dd/MM/yyyy")} 23:59" - TxtFechaIC.Text = $"01/{DateTime.Now.ToString("MM")}/{DateTime.Now.Year} 00:00" - TxtFechaFC.Text = $"{DateTime.Now.ToString("dd/MM/yyyy")} 23:59" + TxtFechaIC.Text = $"01/{NowADS().ToString("MM")}/{NowADS().Year} 00:00" + TxtFechaFC.Text = $"{NowADS().ToString("dd/MM/yyyy")} 23:59" - TxtFechaID.Text = $"01/{DateTime.Now.ToString("MM")}/{DateTime.Now.Year} 00:00" - TxtFechaFD.Text = $"{DateTime.Now.ToString("dd/MM/yyyy")} 23:59" + TxtFechaID.Text = $"01/{NowADS().ToString("MM")}/{NowADS().Year} 00:00" + TxtFechaFD.Text = $"{NowADS().ToString("dd/MM/yyyy")} 23:59" - TxtFechaIG.Text = $"01/{DateTime.Now.ToString("MM")}/{DateTime.Now.Year} 00:00" - TxtFechaFG.Text = $"{DateTime.Now.ToString("dd/MM/yyyy")} 23:59" + TxtFechaIG.Text = $"01/{NowADS().ToString("MM")}/{NowADS().Year} 00:00" + TxtFechaFG.Text = $"{NowADS().ToString("dd/MM/yyyy")} 23:59" End Sub Private Sub InicializaValores() @@ -2380,7 +2380,7 @@ Partial Class AF_AF Dim NewName As String For Each FileItem As Archivo In FilesGral Dim Retorno As Boolean = False - NewName = DateTime.Now.Ticks.ToString + NewName = NowADS().Ticks.ToString Dim ObjActivosFijos As New ClsAF Try FileMove = FileItem.filename @@ -2477,7 +2477,7 @@ Partial Class AF_AF If AFInvCvePS > 0 AndAlso AFInvCveAlmacen > 0 Then Dim CveUMInv = GlobalDTPS(CveEmpresaActual, CvePS:=AFInvCvePS).FiltroPrimeroValor("CveUM").ToEntero If CveUMInv > 0 Then - CveMovimientoSalidaInv = ObjInventarios.AddMovimiento(AFInvCveAlmacen, 3, 1, Now, -1, UsuarioActual.CveUsuario, CveEmpresaActual, -1, -1, -1, -1, Observaciones:=$"Salida de inventario para Activo Fijo | {TxtCodigo.Text.Trim}", Modulo:="AF1") + CveMovimientoSalidaInv = ObjInventarios.AddMovimiento(AFInvCveAlmacen, 3, 1, NowADS(), -1, UsuarioActual.CveUsuario, CveEmpresaActual, -1, -1, -1, -1, Observaciones:=$"Salida de inventario para Activo Fijo | {TxtCodigo.Text.Trim}", Modulo:="AF1") If Not ObjInventarios.AddMovimientoDetalle(CveMovimientoSalidaInv, 1, CveUMInv, AFInvCvePS, 0, -1, Serie:=AFInvSerie, CveSeccionAlmacen:=AFInvCveSeccionAlmacen) Then ErrorGuardar = True End If @@ -2578,7 +2578,7 @@ Partial Class AF_AF 'PREPOLIZA DE IMPORTACION DESDE ALMACEN If AFInvCvePS > 0 AndAlso AFInvCveAlmacen > 0 Then If Not ErrorGuardar Then - Dim CvePrePoliza As Integer = ObjContabilidad.AddPrePolizas("AF/ImportadoInv", 4, TxtValorCompra.Text.ToDouble, TxtValorCompra.Text.ToDouble, 1, Now, $"AF importado de Almacén {TxtCodigo.Text.Trim}", UsuarioActual.CveUsuario, CveEmpresaActual) + Dim CvePrePoliza As Integer = ObjContabilidad.AddPrePolizas("AF/ImportadoInv", 4, TxtValorCompra.Text.ToDouble, TxtValorCompra.Text.ToDouble, 1, NowADS(), $"AF importado de Almacén {TxtCodigo.Text.Trim}", UsuarioActual.CveUsuario, CveEmpresaActual) If ObjContabilidad.AddPrePolizasDetalle(CvePrePoliza, False, TxtValorCompra.Text.ToDecimal, TxtValorCompra.Text.ToDecimal, 49, $"{TxtCodigo.Text.Trim} - {TxtDescripcion.Text.Trim}", $"{TxtCodigo.Text.Trim} - {TxtDescripcion.Text.Trim}", CveActivoFijo:=CveActivoFijo) Then If Not ErrorGuardar Then If Not ObjContabilidad.AddPrePolizasDetalle(CvePrePoliza, True, TxtValorCompra.Text.ToDecimal, TxtValorCompra.Text.ToDecimal, 68, TxtCodigo.Text.Trim, TxtCodigo.Text.Trim, CveMovimientoAlmacen:=CveMovimientoSalidaInv) Then @@ -3534,12 +3534,12 @@ Partial Class AF_AF Dim ObjInventario As New ClsInventarios - Dim Existencia = ObjInventario.GetExistenciasPS(DdlAFInvPS.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa, DdlAFInvAlmacen.SelectedValue.ToEntero, CveSeccionAlmacen:=CveSeccionAlmacen, FechaMovto:=Now.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Serie:=AFInvSerie) + Dim Existencia = ObjInventario.GetExistenciasPS(DdlAFInvPS.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa, DdlAFInvAlmacen.SelectedValue.ToEntero, CveSeccionAlmacen:=CveSeccionAlmacen, FechaMovto:=NowADS().ToDateTime.ToString("yyyy/MM/dd HH:mm"), Serie:=AFInvSerie) Dim Costo As Decimal = 0 If Inv_CveMetodoInventario = 5 Then Costo = ObjInventario.GetCostoPSSerie(DdlAFInvPS.SelectedValue.ToEntero, AFInvSerie, DdlAFInvAlmacen.SelectedValue.ToEntero, CveEmpresaActual) Else - Costo = ObjInventario.GetCostoPS(DdlAFInvPS.SelectedValue.ToEntero, 1, DdlAFInvAlmacen.SelectedValue.ToEntero, AFInvSerie, Now) + Costo = ObjInventario.GetCostoPS(DdlAFInvPS.SelectedValue.ToEntero, 1, DdlAFInvAlmacen.SelectedValue.ToEntero, AFInvSerie, NowADS()) End If ObjInventario.Dispose() @@ -3557,7 +3557,7 @@ Partial Class AF_AF TxtDescripcion.Text = DdlAFInvPS.SelectedText TxtValorCompra.Text = Costo.FormatoNumero - TxtFechaCompra.Text = Now.ToShortDateString + TxtFechaCompra.Text = NowADS().ToShortDateString TxtFechaBaja.Text = "" TxtNoSerie.Text = TxtAFInvSerie.Text.Trim diff --git a/AF/CatAF.aspx.vb b/AF/CatAF.aspx.vb index 94b9ed1d3..4a021ea00 100644 --- a/AF/CatAF.aspx.vb +++ b/AF/CatAF.aspx.vb @@ -65,7 +65,7 @@ Partial Class AF_CatAF Grupo = If(Request("GPO") IsNot Nothing AndAlso Request("GPO").ToEntero() > 0, Request("GPO").ToEntero(), -1).ToString.ToEntero CveAgrupador = If(Request("CveAgrupador") IsNot Nothing AndAlso Request("CveAgrupador").ToEntero() > 0, Request("CveAgrupador").ToEntero(), -1).ToEntero - If ObjAF.GetActivosFijos(-1, UsuarioActual.CveEmpresa, "-1", "-1", IfNull(CveTipoActivoFijo, "-1").ToString.ToEntero, IfNull(CveSubTipoActivoFijo, "-1").ToString.ToEntero, "-1", IfNull(Request("Anio"), Now.Year).ToString.ToEntero, + If ObjAF.GetActivosFijos(-1, UsuarioActual.CveEmpresa, "-1", "-1", IfNull(CveTipoActivoFijo, "-1").ToString.ToEntero, IfNull(CveSubTipoActivoFijo, "-1").ToString.ToEntero, "-1", IfNull(Request("Anio"), NowADS().Year).ToString.ToEntero, IfNull(CvePersonalResponsable, "-1").ToString.ToEntero, DdlProyecto.SelectedValue.ToEntero, IfNull(CveSubProyecto, "-1").ToString.ToEntero, IfNull(CveEstadoActivoFijo, "-1").ToString.ToEntero, "", -1) Then If ObjAF.DtResultados.Rows.Count > 0 Then DtActivosFijos = ObjAF.DtResultados @@ -462,7 +462,7 @@ Partial Class AF_CatAF Dim Ruta As String = "" params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) diff --git a/AF/OrdenTrabajoAsignacion.aspx.vb b/AF/OrdenTrabajoAsignacion.aspx.vb index 9bcbb867a..61ae296a4 100644 --- a/AF/OrdenTrabajoAsignacion.aspx.vb +++ b/AF/OrdenTrabajoAsignacion.aspx.vb @@ -50,7 +50,7 @@ Partial Class AF_OrdenTrabajoAsignacion CargaCombos() CargaDatos() - Dim FechaActual As Date = Now + Dim FechaActual As Date = NowADS() 'TxtFechaF.Text = $"{FechaActual.Day.ToString("00")}/{FechaActual.Month.ToString("00")}/{FechaActual.Year}" diff --git a/AF/RegistroRevision.aspx.vb b/AF/RegistroRevision.aspx.vb index a7d770ea2..77f0c4d52 100644 --- a/AF/RegistroRevision.aspx.vb +++ b/AF/RegistroRevision.aspx.vb @@ -67,7 +67,7 @@ Partial Class AF_RegistroRevision 'CargaDatos() - TxtFecha.Text = $"{Now.Day.ToString("00")}/{Now.Month.ToString("00")}/{Now.Year}" + TxtFecha.Text = $"{NowADS().Day.ToString("00")}/{NowADS().Month.ToString("00")}/{NowADS().Year}" End If End Sub @@ -253,7 +253,7 @@ Partial Class AF_RegistroRevision If Not ErrorProceso Then ObjAF.Commit() - ExportToExcelG(GvDatos, $"RegistroRevision{Now.ToString("yyyyMMddmmss")}", UsuarioActual, "ReporteRevision", 100, 100, filtros:=$"Filtros {LblSubProyecto.Text}: {DdlSubProyecto.SelectedItem.Text} Fecha: {TxtFecha.Text}") + ExportToExcelG(GvDatos, $"RegistroRevision{NowADS().ToString("yyyyMMddmmss")}", UsuarioActual, "ReporteRevision", 100, 100, filtros:=$"Filtros {LblSubProyecto.Text}: {DdlSubProyecto.SelectedItem.Text} Fecha: {TxtFecha.Text}") RegistraScript("$('#ModalDescargaReporte').modal({ backdrop: 'static', keyboard: false });") GvDatos.DataSource = Nothing GvDatos.DataBind() @@ -390,7 +390,7 @@ Partial Class AF_RegistroRevision worksheet.Rows(IndexEndTable + 1).Cells(0).Value = Usuario.Nombre worksheet.Rows(IndexEndTable).Cells(2).Value = "Fecha Impresión" - worksheet.Rows(IndexEndTable + 1).Cells(2).Value = DateTime.Now.ToString("dd/MM/yyyy") + worksheet.Rows(IndexEndTable + 1).Cells(2).Value = NowADS().ToString("dd/MM/yyyy") Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", Usuario.Empresa.Ruta)) @@ -420,7 +420,7 @@ Partial Class AF_RegistroRevision Response.ContentType = "application/force-download" - Response.AppendHeader("Content-Disposition", $"attachment;filename=RegistroRevision{Now.ToString("yyyyMMddmmss")}.xlsx") + Response.AppendHeader("Content-Disposition", $"attachment;filename=RegistroRevision{NowADS().ToString("yyyyMMddmmss")}.xlsx") Response.BinaryWrite(ReporteBytes) Response.End() diff --git a/AF/RepAF.aspx.vb b/AF/RepAF.aspx.vb index bd5d72b0f..f53192c02 100644 --- a/AF/RepAF.aspx.vb +++ b/AF/RepAF.aspx.vb @@ -330,7 +330,7 @@ Partial Class AF_RepAF params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) ImprimirPDF(String.Format("{0}Formatos\RepAF.rdlc", UsuarioActual.Empresa.Ruta), DtActivosFijos, params, "ReporteActivosFijos", Formato:=Formato) diff --git a/AF/RepDepreciacion.aspx.vb b/AF/RepDepreciacion.aspx.vb index 80935ed10..8196671a1 100644 --- a/AF/RepDepreciacion.aspx.vb +++ b/AF/RepDepreciacion.aspx.vb @@ -13,7 +13,7 @@ Partial Class AF_RepDepreciacion #End Region Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not Page.IsPostBack Then - txtFechaI.Text = DateTime.Now.AddMonths(1).AddDays(-1).ToString("dd/MM/yyyy") + txtFechaI.Text = NowADS().AddMonths(1).AddDays(-1).ToString("dd/MM/yyyy") End If End Sub diff --git a/AF/RepOrdenTrabajo.aspx.vb b/AF/RepOrdenTrabajo.aspx.vb index d4be6f652..9371d2886 100644 --- a/AF/RepOrdenTrabajo.aspx.vb +++ b/AF/RepOrdenTrabajo.aspx.vb @@ -50,7 +50,7 @@ Partial Class AF_RepOrdenTrabajo CargaCombos() CargaDatos() - Dim FechaActual As Date = Now + Dim FechaActual As Date = NowADS() 'TxtFechaF.Text = $"{FechaActual.Day.ToString("00")}/{FechaActual.Month.ToString("00")}/{FechaActual.Year}" diff --git a/AF/RepRevision.aspx.vb b/AF/RepRevision.aspx.vb index f96ebab1d..c5e5306a6 100644 --- a/AF/RepRevision.aspx.vb +++ b/AF/RepRevision.aspx.vb @@ -50,7 +50,7 @@ Partial Class AF_RepRevision CargaCombos() CargaDatos() - Dim FechaActual As Date = Now + Dim FechaActual As Date = NowADS() TxtFechaF.Text = $"{FechaActual.Day.ToString("00")}/{FechaActual.Month.ToString("00")}/{FechaActual.Year}" diff --git a/AF/ResguardoAF.aspx.vb b/AF/ResguardoAF.aspx.vb index 03ab0ce02..5da763414 100644 --- a/AF/ResguardoAF.aspx.vb +++ b/AF/ResguardoAF.aspx.vb @@ -69,7 +69,7 @@ Partial Class AF_ResguardoAF CveResguardoPadre = -1 CargaDTResguardos() 'RESGUARDO - TxtFecha.Text = Now.ToShortDateString + TxtFecha.Text = NowADS().ToShortDateString CargaAFResguardos() DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa) DdlSubProyecto.DataBind() @@ -85,7 +85,7 @@ Partial Class AF_ResguardoAF 'TRASPASO - TxtFechaT.Text = Now.ToShortDateString + TxtFechaT.Text = NowADS().ToShortDateString CargaAFResguardosTraslado() DdlSubProyectoT.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa) DdlSubProyectoT.DataBind() @@ -110,7 +110,7 @@ Partial Class AF_ResguardoAF DdlSubProyectoRTA.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa) DdlSubProyectoRTA.DataBind() DdlSubProyectoRTA.Items.Insert(0, New ListItem("Seleccione", "-1")) - TxtFechaR.Text = Now.ToShortDateString + TxtFechaR.Text = NowADS().ToShortDateString 'LIBERACION @@ -123,7 +123,7 @@ Partial Class AF_ResguardoAF DdlSubProyectoL.DataBind() DdlSubProyectoL.Items.Insert(0, New ListItem("Seleccione", "-1")) - TxtFechaRecepcion.Text = Now.ToShortDateString + TxtFechaRecepcion.Text = NowADS().ToShortDateString DdlPersonalR.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa).FiltraParametros("", "NombreCompleto") @@ -253,7 +253,7 @@ Partial Class AF_ResguardoAF TxtObservacionesR.Text = "" TxtObservacionesRecepcion.Text = "" TxtObservacionesT.Text = "" - TxtFecha.Text = Now.ToShortDateString + TxtFecha.Text = NowADS().ToShortDateString End Sub #End Region @@ -331,7 +331,7 @@ Partial Class AF_ResguardoAF DdlSubProyectoT.SelectedValue = "-1" DdlResponsableT.SelectedValue = "-1" TxtObservacionesT.Text = "" - TxtFechaT.Text = Now.ToShortDateString + TxtFechaT.Text = NowADS().ToShortDateString UPTraslado.Update() End Sub #End Region @@ -419,7 +419,7 @@ Partial Class AF_ResguardoAF Private Sub LimpiaRT() GvAFTR.DataBind() TxtObservacionesR.Text = "" - TxtFechaR.Text = Now.ToShortDateString + TxtFechaR.Text = NowADS().ToShortDateString DdlPersonalRT.SelectedValue = "-1" TxtFolioT.Text = "" DdlSubProyectoRT.SelectedValue = "-1" @@ -507,7 +507,7 @@ Partial Class AF_ResguardoAF Private Sub LimpiaRecepcion() GvRecepcion.DataBind() TxtObservacionesRecepcion.Text = "" - TxtFechaRecepcion.Text = Now.ToShortDateString + TxtFechaRecepcion.Text = NowADS().ToShortDateString DdlPersonalR.SelectedValue = "-1" DdlSubProyectoRL.SelectedValue = "-1" TxtFolioRL.Text = "" diff --git a/AF/TipoOrdenTrabajo.aspx.vb b/AF/TipoOrdenTrabajo.aspx.vb index ee6e23080..aa2110249 100644 --- a/AF/TipoOrdenTrabajo.aspx.vb +++ b/AF/TipoOrdenTrabajo.aspx.vb @@ -449,7 +449,7 @@ Partial Class AF_TipoOrdenTrabajo ' worksheet.Rows(IndexEndTable + 1).Cells(0).Value = Usuario.Nombre ' worksheet.Rows(IndexEndTable).Cells(2).Value = "Fecha Impresión" - ' worksheet.Rows(IndexEndTable + 1).Cells(2).Value = DateTime.Now.ToString("dd/MM/yyyy") + ' worksheet.Rows(IndexEndTable + 1).Cells(2).Value = NowADS().ToString("dd/MM/yyyy") ' Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", Usuario.Empresa.Ruta)) @@ -479,7 +479,7 @@ Partial Class AF_TipoOrdenTrabajo ' Response.ContentType = "application/force-download" - ' Response.AppendHeader("Content-Disposition", $"attachment;filename=RegistroRevision{Now.ToString("yyyyMMddmmss")}.xlsx") + ' Response.AppendHeader("Content-Disposition", $"attachment;filename=RegistroRevision{NowADS().ToString("yyyyMMddmmss")}.xlsx") ' Response.BinaryWrite(ReporteBytes) ' Response.End() diff --git a/AF/ValesCombustible.aspx.vb b/AF/ValesCombustible.aspx.vb index c95960131..acb86af4e 100644 --- a/AF/ValesCombustible.aspx.vb +++ b/AF/ValesCombustible.aspx.vb @@ -22,7 +22,7 @@ Partial Class AF_ValesCombustible CargarCombos() CargaFolios() - TxtFechaVale.Text = DateTime.Now.ToShortDateString + TxtFechaVale.Text = NowADS().ToShortDateString BtnActualizar.Visible = False 'BtnAplicar.Visible = False diff --git a/AIMMGM/ConsultaCliente.aspx.vb b/AIMMGM/ConsultaCliente.aspx.vb index 1264906e2..41a244b30 100644 --- a/AIMMGM/ConsultaCliente.aspx.vb +++ b/AIMMGM/ConsultaCliente.aspx.vb @@ -49,7 +49,7 @@ Partial Class AIMMGM_ConsultaCliente Session("FileUpload") = "" ViewState("Orden") = "" ViewState("ONombre") = "Nombre DESC" - TxtFecha.Text = Now.ToShortDateString + TxtFecha.Text = NowADS().ToShortDateString If Request("CveCliente") IsNot Nothing Then CveCliente = Request("CveCliente").ToString.ToEntero() @@ -266,7 +266,7 @@ Partial Class AIMMGM_ConsultaCliente Venta.UpdateVentas(dr("SubTotal").ToString.ToDouble - Total, 0, 0, dr("SubTotal").ToString.ToDouble - Total, 1, 1, dr("Fecha").ToString.ToDate, "", 43, CveVenta, "Rem") Alert("El Registro ha sido eliminado", TipoMensaje.MsgInformacion) If MovimientosVentas.ToEntero = 1 Then 'se cancela la venta en su totalidad - Venta.UpdateEstatusFactura(4, "", "", Now, CveVenta) + Venta.UpdateEstatusFactura(4, "", "", NowADS(), CveVenta) End If Venta.Commit() @@ -473,10 +473,10 @@ Partial Class AIMMGM_ConsultaCliente ' Dim EsVistaPrevia As Boolean = True - ' xlsxFileOut = String.Format("Format{0}-{1}.xlsx", Opcion, Now.Ticks) + ' xlsxFileOut = String.Format("Format{0}-{1}.xlsx", Opcion, NowADS().Ticks) ' 'Exportar PDF - ' pdfFileOut = String.Format("Format{0}-{1}.pdf", Opcion, Now.Ticks) + ' pdfFileOut = String.Format("Format{0}-{1}.pdf", Opcion, NowADS().Ticks) ' Dim outputFileName As Object = Ruta & xlsxFileOut ' If IO.File.Exists(Ruta & "FormatoAIMMGM33.xlsx") Then @@ -758,7 +758,7 @@ Partial Class AIMMGM_ConsultaCliente Dim Liga As String = "http://aimmgm.adsistemas.mx/AIMMGM/Portal.aspx" - Dim LigaActivar As String = Liga & "?p=" & Extensiones.Encripta("CveU=" & CveUsr & "&Clave=" & CveCliente & "&Opcion=Activar&Hora=" & DateTime.Now.Ticks) + Dim LigaActivar As String = Liga & "?p=" & Extensiones.Encripta("CveU=" & CveUsr & "&Clave=" & CveCliente & "&Opcion=Activar&Hora=" & NowADS().Ticks) Dim strSQL As New StringBuilder strSQL.Append(" ") diff --git a/AIMMGM/Pagos.aspx.vb b/AIMMGM/Pagos.aspx.vb index 24ccdebfd..d6ea495af 100644 --- a/AIMMGM/Pagos.aspx.vb +++ b/AIMMGM/Pagos.aspx.vb @@ -130,7 +130,7 @@ Partial Class AIMMGM_Pagos Dim dt As DataTable If AIM.GetPagos(DdlCliente.SelectedValue.ToEntero, 2) Then dt = AIM.DtResultados.FiltraParametros("Facturado = 0 and RequiereFactura = 1") - ' GvE.Caption = String.Format("
    PersonalCuentaError
    {0}
    ", Now.ToLongDateString) + ' GvE.Caption = String.Format("
    {0}
    ", NowADS().ToLongDateString) GvE.CaptionAlign = TableCaptionAlign.Left GvE.DataSource = dt GvE.DataBind() diff --git a/AIMMGM/PopRegistro.aspx.vb b/AIMMGM/PopRegistro.aspx.vb index 6e590e2cf..34d29a09b 100644 --- a/AIMMGM/PopRegistro.aspx.vb +++ b/AIMMGM/PopRegistro.aspx.vb @@ -72,7 +72,7 @@ Partial Class AIMMGM_Registro For Each dr As DataRow In dtExcursiones.Rows Dim AIM As New ClsAIMMGM - If AIM.RepVentasPS(1, -1, -1, -1, "01/01/2014".ToDate, Now, 43) Then + If AIM.RepVentasPS(1, -1, -1, -1, "01/01/2014".ToDate, NowADS(), 43) Then Contador = AIM.DtResultados.COUNT("CvePS", "CvePS = " & dr("CvePS").ToString) If Contador >= 20 Then dr("CvePS") = 0 @@ -299,7 +299,7 @@ Partial Class AIMMGM_Registro If System.Web.HttpContext.Current IsNot Nothing AndAlso System.Web.HttpContext.Current.Handler IsNot Nothing Then Dim Img, Botones As String Dim Titulo As String - Dim Plus As String = DateTime.Now.Ticks.ToString + Dim Plus As String = NowADS().Ticks.ToString Mensaje = Mensaje.Replace("'"c, "\'") JSBtnAceptar = JSBtnAceptar.Replace("'"c, "\'") @@ -335,8 +335,8 @@ Partial Class AIMMGM_Registro Dim Pag As Page = DirectCast(System.Web.HttpContext.Current.Handler, Page) - 'ScriptManager.RegisterStartupScript(Pag, Pag.GetType(), (DateTime.Now.Ticks + 1).ToString(), "MuestraAlert('" & Alerta.ToString() & "', '" & Plus & "');", True) - ScriptManager.RegisterStartupScript(Pag, Pag.GetType(), (DateTime.Now.Ticks + 1).ToString(), String.Format("MuestraAlerta('{0}','{1}','{2}','{3}','{4}');", Titulo, Mensaje, Img, Botones, JSBtnAceptar), True) + 'ScriptManager.RegisterStartupScript(Pag, Pag.GetType(), (NowADS().Ticks + 1).ToString(), "MuestraAlert('" & Alerta.ToString() & "', '" & Plus & "');", True) + ScriptManager.RegisterStartupScript(Pag, Pag.GetType(), (NowADS().Ticks + 1).ToString(), String.Format("MuestraAlerta('{0}','{1}','{2}','{3}','{4}');", Titulo, Mensaje, Img, Botones, JSBtnAceptar), True) Pag = Nothing Catch ex As Exception @@ -420,7 +420,7 @@ Partial Class AIMMGM_Registro Dim tnombre As String Dim TieneExcursion As Boolean = False 'DdlFiscalMetodoPago.SelectedValue.ToEntero1, - If Venta.AddVenta("Rem", 0, CveCliente, 2069, TmpDT.SUM("Total"), 0, 0, 0, 0, 0, TmpDT.SUM("Total"), 1, 0, CveMetodoPago, 0, 0, Now, "", "", 0, Now, -1, -1, "", "", "", 0, 0, 0, 0, DateTime.MinValue, DateTime.MinValue, DateTime.MinValue, -1, -1, 0, 1, 0, 2069, 43) Then + If Venta.AddVenta("Rem", 0, CveCliente, 2069, TmpDT.SUM("Total"), 0, 0, 0, 0, 0, TmpDT.SUM("Total"), 1, 0, CveMetodoPago, 0, 0, NowADS(), "", "", 0, NowADS(), -1, -1, "", "", "", 0, 0, 0, 0, DateTime.MinValue, DateTime.MinValue, DateTime.MinValue, -1, -1, 0, 1, 0, 2069, 43) Then Dim CveVenta As Integer = Venta.CveVenta For Each dr As DataRow In TmpDT.Rows Dim CveUnidadMedida As Integer @@ -555,7 +555,7 @@ Partial Class AIMMGM_Registro Dim Liga As String = "http://aimmgm.adsistemas.mx/AIMMGM/Portal.aspx" - Dim LigaActivar As String = Liga & "?p=" & Encripta("CveU=" & CveUsr & "&Clave=" & CveCliente & "&Opcion=Activar&Hora=" & DateTime.Now.Ticks) + Dim LigaActivar As String = Liga & "?p=" & Encripta("CveU=" & CveUsr & "&Clave=" & CveCliente & "&Opcion=Activar&Hora=" & NowADS().Ticks) Dim strSQL As New StringBuilder strSQL.Append(" ") diff --git a/AIMMGM/Registro.aspx.vb b/AIMMGM/Registro.aspx.vb index f103fa711..1783c2cbe 100644 --- a/AIMMGM/Registro.aspx.vb +++ b/AIMMGM/Registro.aspx.vb @@ -96,7 +96,7 @@ Partial Class AIMMGM_Registro For Each dr As DataRow In dtExcursiones.Rows Dim AIM As New ClsAIMMGM - If AIM.RepVentasPS(1, -1, -1, -1, "01/01/2014".ToDate, Now, 43) Then + If AIM.RepVentasPS(1, -1, -1, -1, "01/01/2014".ToDate, NowADS(), 43) Then Contador = AIM.DtResultados.COUNT("CvePS", "CvePS = " & dr("CvePS").ToString) If Contador >= 20 Then dr("CvePS") = 0 @@ -387,7 +387,7 @@ Partial Class AIMMGM_Registro If System.Web.HttpContext.Current IsNot Nothing AndAlso System.Web.HttpContext.Current.Handler IsNot Nothing Then Dim Img, Botones As String Dim Titulo As String - Dim Plus As String = DateTime.Now.Ticks.ToString + Dim Plus As String = NowADS().Ticks.ToString Mensaje = Mensaje.Replace("'"c, "\'") JSBtnAceptar = JSBtnAceptar.Replace("'"c, "\'") @@ -423,8 +423,8 @@ Partial Class AIMMGM_Registro Dim Pag As Page = DirectCast(System.Web.HttpContext.Current.Handler, Page) - 'ScriptManager.RegisterStartupScript(Pag, Pag.GetType(), (DateTime.Now.Ticks + 1).ToString(), "MuestraAlert('" & Alerta.ToString() & "', '" & Plus & "');", True) - ScriptManager.RegisterStartupScript(Pag, Pag.GetType(), (DateTime.Now.Ticks + 1).ToString(), String.Format("MuestraAlerta('{0}','{1}','{2}','{3}','{4}');", Titulo, Mensaje, Img, Botones, JSBtnAceptar), True) + 'ScriptManager.RegisterStartupScript(Pag, Pag.GetType(), (NowADS().Ticks + 1).ToString(), "MuestraAlert('" & Alerta.ToString() & "', '" & Plus & "');", True) + ScriptManager.RegisterStartupScript(Pag, Pag.GetType(), (NowADS().Ticks + 1).ToString(), String.Format("MuestraAlerta('{0}','{1}','{2}','{3}','{4}');", Titulo, Mensaje, Img, Botones, JSBtnAceptar), True) Pag = Nothing Catch ex As Exception @@ -597,7 +597,7 @@ Partial Class AIMMGM_Registro Dim tnombre As String Dim TieneExcursion As Boolean = False - If Venta.AddVenta("Rem", 0, CveCliente, 2069, TmpDT.SUM("Total"), 0, 0, 0, 0, 0, TmpDT.SUM("Total"), 1, 0, DdlFiscalMetodoPago.SelectedValue.ToEntero, 0, 0, Now, "", "", 0, Now, -1, -1, "", "", "", 0, 0, 0, 0, DateTime.MinValue, DateTime.MinValue, DateTime.MinValue, -1, -1, 0, 0, 1, 2069, 43) Then + If Venta.AddVenta("Rem", 0, CveCliente, 2069, TmpDT.SUM("Total"), 0, 0, 0, 0, 0, TmpDT.SUM("Total"), 1, 0, DdlFiscalMetodoPago.SelectedValue.ToEntero, 0, 0, NowADS(), "", "", 0, NowADS(), -1, -1, "", "", "", 0, 0, 0, 0, DateTime.MinValue, DateTime.MinValue, DateTime.MinValue, -1, -1, 0, 0, 1, 2069, 43) Then Dim CveVenta As Integer = Venta.CveVenta For Each dr As DataRow In TmpDT.Rows Dim CveUnidadMedida As Integer @@ -715,7 +715,7 @@ Partial Class AIMMGM_Registro Dim tnombre As String Dim TieneExcursion As Boolean = False - If Venta.AddVenta("Rem", 0, CveCliente, 2069, TmpDT.SUM("Total"), 0, 0, 0, 0, 0, TmpDT.SUM("Total"), 1, 0, DdlFiscalMetodoPago.SelectedValue.ToEntero, 0, 0, Now, "", "", 0, Now, -1, -1, "", "", "", 0, 0, 0, 0, DateTime.MinValue, DateTime.MinValue, DateTime.MinValue, -1, -1, 0, 1, 0, 2069, 43) Then + If Venta.AddVenta("Rem", 0, CveCliente, 2069, TmpDT.SUM("Total"), 0, 0, 0, 0, 0, TmpDT.SUM("Total"), 1, 0, DdlFiscalMetodoPago.SelectedValue.ToEntero, 0, 0, NowADS(), "", "", 0, NowADS(), -1, -1, "", "", "", 0, 0, 0, 0, DateTime.MinValue, DateTime.MinValue, DateTime.MinValue, -1, -1, 0, 1, 0, 2069, 43) Then Dim CveVenta As Integer = Venta.CveVenta For Each dr As DataRow In TmpDT.Rows Dim CveUnidadMedida As Integer @@ -745,7 +745,7 @@ Partial Class AIMMGM_Registro If Not Errorr Then - If AIM.AddPago(CveCliente, Venta.CveVentaDetalle, dr("Total").ToString.ToDouble, 1, Now, "", "Pago en terminal", TxtNumeroAsesor.Text.Trim.ToEntero, TxtNumeroAprobacion.Text.Trim.ToEntero) <= 0 Then + If AIM.AddPago(CveCliente, Venta.CveVentaDetalle, dr("Total").ToString.ToDouble, 1, NowADS(), "", "Pago en terminal", TxtNumeroAsesor.Text.Trim.ToEntero, TxtNumeroAprobacion.Text.Trim.ToEntero) <= 0 Then Errorr = True End If @@ -853,7 +853,7 @@ Partial Class AIMMGM_Registro Dim Liga As String = "http://aimmgm.adsistemas.mx/AIMMGM/Portal.aspx" - Dim LigaActivar As String = Liga & "?p=" & Encripta("CveU=" & CveUsr & "&Clave=" & CveCliente & "&Opcion=Activar&Hora=" & DateTime.Now.Ticks) + Dim LigaActivar As String = Liga & "?p=" & Encripta("CveU=" & CveUsr & "&Clave=" & CveCliente & "&Opcion=Activar&Hora=" & NowADS().Ticks) Dim strSQL As New StringBuilder strSQL.Append(" ") @@ -1062,7 +1062,7 @@ Partial Class AIMMGM_Registro Cliente.Dispose() End If - Dim ClavePago As String = String.Format("{0}-{1}", CveCliente, Now.Ticks) + Dim ClavePago As String = String.Format("{0}-{1}", CveCliente, NowADS().Ticks) 'actualizo la clavedel cliente en todos los registros @@ -1079,8 +1079,8 @@ Partial Class AIMMGM_Registro myNameValueCollection.Add("ref", CveCliente.ToString) myNameValueCollection.Add("imp", TmpDT.SUM("Total").ToString) '".01" myNameValueCollection.Add("ema", TxtEmail.Text.Trim) - myNameValueCollection.Add("urlOk", String.Format("http://aimmgm.adsistemas.mx/AIMMGM/ePagos.aspx?p={0}", Encripta(String.Format("Cve={0}&F={1}&CveCliente={2}&P=1", ClavePago, Now, CveCliente)))) - myNameValueCollection.Add("urlKo", String.Format("http://aimmgm.adsistemas.mx/AIMMGM/ePagos.aspx?p={0}", Encripta(String.Format("Cve={0}&F={1}&CveCliente={2}&NP=1", ClavePago, Now, CveCliente)))) + myNameValueCollection.Add("urlOk", String.Format("http://aimmgm.adsistemas.mx/AIMMGM/ePagos.aspx?p={0}", Encripta(String.Format("Cve={0}&F={1}&CveCliente={2}&P=1", ClavePago, NowADS(), CveCliente)))) + myNameValueCollection.Add("urlKo", String.Format("http://aimmgm.adsistemas.mx/AIMMGM/ePagos.aspx?p={0}", Encripta(String.Format("Cve={0}&F={1}&CveCliente={2}&NP=1", ClavePago, NowADS(), CveCliente)))) myNameValueCollection.Add("autoBack", "1") myNameValueCollection.Add("datbloq", "1") @@ -1096,8 +1096,8 @@ Partial Class AIMMGM_Registro 'If Request.Form("__VIEWSTATE_KEY") IsNot Nothing Then Cache.Remove(Request.Form("__VIEWSTATE_KEY")) 'elimino la cachado anteriormente - Dim VSKey As String = String.Format("VIEWSTATE_{0}_{1}_{2}", Session.SessionID, Request.Path, Date.Now.Ticks) - Cache.Add(VSKey, pviewState, Nothing, Date.Now.AddMinutes(60), Cache.NoSlidingExpiration, CacheItemPriority.Default, Nothing) 'Store the ViewState on Cache + Dim VSKey As String = String.Format("VIEWSTATE_{0}_{1}_{2}", Session.SessionID, Request.Path, NowADS().Ticks) + Cache.Add(VSKey, pviewState, Nothing, NowADS().AddMinutes(60), Cache.NoSlidingExpiration, CacheItemPriority.Default, Nothing) 'Store the ViewState on Cache ClientScript.RegisterHiddenField("__VIEWSTATE_KEY", VSKey) End Sub diff --git a/AIMMGM/VentasPS.aspx.vb b/AIMMGM/VentasPS.aspx.vb index 7211c69b9..125350b66 100644 --- a/AIMMGM/VentasPS.aspx.vb +++ b/AIMMGM/VentasPS.aspx.vb @@ -10,8 +10,8 @@ Partial Class AIMMGM_Ventas Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load If Not Page.IsPostBack Then - txtFechaI.Text = "01/01/" & Now.Year - txtFechaF.Text = Now.ToShortDateString + txtFechaI.Text = "01/01/" & NowADS().Year + txtFechaF.Text = NowADS().ToShortDateString Dim dt As DataTable diff --git a/AIMMGM/ePagos.aspx.vb b/AIMMGM/ePagos.aspx.vb index 1e498a877..31874f43c 100644 --- a/AIMMGM/ePagos.aspx.vb +++ b/AIMMGM/ePagos.aspx.vb @@ -64,7 +64,7 @@ Partial Class AIMMGM_ePagos Dim Fecha As String = ClsPaginas.UrlParametros("F").ToString - If Fecha.ToDate > Now.AddHours(-1) AndAlso ClsPaginas.UrlParametros("P") IsNot Nothing AndAlso ClsPaginas.UrlParametros("P").ToString = "1" Then + If Fecha.ToDate > NowADS().AddHours(-1) AndAlso ClsPaginas.UrlParametros("P") IsNot Nothing AndAlso ClsPaginas.UrlParametros("P").ToString = "1" Then ClavePago = ClsPaginas.UrlParametros("CVE").ToString CargaCompra() @@ -124,7 +124,7 @@ Partial Class AIMMGM_ePagos Dim tnombre As String Dim TieneExcursion As Boolean = False - If Venta.AddVenta("Rem", 0, CveCliente, 2069, TmpDT.SUM("Total"), 0, 0, 0, 0, 0, TmpDT.SUM("Total"), 1, 0, CveMetodoPago, 0, 0, Now, "", "", -1, Now, -1, -1, "", "", "", 0, 0, 0, 0, DateTime.MinValue, DateTime.MinValue, DateTime.MinValue, -1, -1, 0, 1, 0, 2069, 43) Then + If Venta.AddVenta("Rem", 0, CveCliente, 2069, TmpDT.SUM("Total"), 0, 0, 0, 0, 0, TmpDT.SUM("Total"), 1, 0, CveMetodoPago, 0, 0, NowADS(), "", "", -1, NowADS(), -1, -1, "", "", "", 0, 0, 0, 0, DateTime.MinValue, DateTime.MinValue, DateTime.MinValue, -1, -1, 0, 1, 0, 2069, 43) Then Dim CveVenta As Integer = Venta.CveVenta For Each dr As DataRow In TmpDT.Rows Dim CveUnidadMedida As Integer @@ -154,7 +154,7 @@ Partial Class AIMMGM_ePagos Next If Not Errorr Then - If AIM.AddPago(CveCliente, -1, TmpDT.SUM("Total"), 1, Now, "", "Pago en línea", 0, 0) <= 0 Then + If AIM.AddPago(CveCliente, -1, TmpDT.SUM("Total"), 1, NowADS(), "", "Pago en línea", 0, 0) <= 0 Then Errorr = True End If If Not Errorr Then @@ -199,7 +199,7 @@ Partial Class AIMMGM_ePagos If System.Web.HttpContext.Current IsNot Nothing AndAlso System.Web.HttpContext.Current.Handler IsNot Nothing Then Dim Img, Botones As String Dim Titulo As String - Dim Plus As String = DateTime.Now.Ticks.ToString + Dim Plus As String = NowADS().Ticks.ToString Mensaje = Mensaje.Replace("'"c, "\'") JSBtnAceptar = JSBtnAceptar.Replace("'"c, "\'") @@ -235,8 +235,8 @@ Partial Class AIMMGM_ePagos Dim Pag As Page = DirectCast(System.Web.HttpContext.Current.Handler, Page) - 'ScriptManager.RegisterStartupScript(Pag, Pag.GetType(), (DateTime.Now.Ticks + 1).ToString(), "MuestraAlert('" & Alerta.ToString() & "', '" & Plus & "');", True) - ScriptManager.RegisterStartupScript(Pag, Pag.GetType(), (DateTime.Now.Ticks + 1).ToString(), String.Format("MuestraAlerta('{0}','{1}','{2}','{3}','{4}');", Titulo, Mensaje, Img, Botones, JSBtnAceptar), True) + 'ScriptManager.RegisterStartupScript(Pag, Pag.GetType(), (NowADS().Ticks + 1).ToString(), "MuestraAlert('" & Alerta.ToString() & "', '" & Plus & "');", True) + ScriptManager.RegisterStartupScript(Pag, Pag.GetType(), (NowADS().Ticks + 1).ToString(), String.Format("MuestraAlerta('{0}','{1}','{2}','{3}','{4}');", Titulo, Mensaje, Img, Botones, JSBtnAceptar), True) Pag = Nothing Catch ex As Exception @@ -312,7 +312,7 @@ Partial Class AIMMGM_ePagos Dim Liga As String = "http://aimmgm.adsistemas.mx/AIMMGM/Portal.aspx" - Dim LigaActivar As String = Liga & "?p=" & Encripta("CveU=" & CveUsr & "&Clave=" & CveCliente & "&Opcion=Activar&Hora=" & DateTime.Now.Ticks) + Dim LigaActivar As String = Liga & "?p=" & Encripta("CveU=" & CveUsr & "&Clave=" & CveCliente & "&Opcion=Activar&Hora=" & NowADS().Ticks) Dim strSQL As New StringBuilder strSQL.Append(" ") diff --git a/Acarreos/AcarreosConcluidos.aspx.vb b/Acarreos/AcarreosConcluidos.aspx.vb index 90a0d30f7..0770ad579 100644 --- a/Acarreos/AcarreosConcluidos.aspx.vb +++ b/Acarreos/AcarreosConcluidos.aspx.vb @@ -13,8 +13,8 @@ Partial Class Acarreos_AcarreosAutoConciliacion CargaDdlTransportista() CargaDdlMaterial() CargaDdlNumContrato() - txtFechaF.Text = Now.AddDays(0).ToShortDateString - txtFechaI.Text = Now.AddYears(-1).ToShortDateString + txtFechaF.Text = NowADS().AddDays(0).ToShortDateString + txtFechaI.Text = NowADS().AddYears(-1).ToShortDateString BtnAgregarAcarreoConcluido.Text = "Vincular" End If End Sub diff --git a/Acarreos/AcarreosPreEstimacion.aspx.vb b/Acarreos/AcarreosPreEstimacion.aspx.vb index 6e76fc51e..8c9f9be4b 100644 --- a/Acarreos/AcarreosPreEstimacion.aspx.vb +++ b/Acarreos/AcarreosPreEstimacion.aspx.vb @@ -14,7 +14,7 @@ Partial Class Acarreos_AcarreosPreEstimacion DdlTransportista.DataBind() DdlMaterial.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlMaterial.DataBind() - TxtFechaPreEstimacion.Text = Now.AddDays(0).ToShortDateString + TxtFechaPreEstimacion.Text = NowADS().AddDays(0).ToShortDateString BtnAgregarPreEstimacion.Text = "Pre-Estimar" CargaDdlNumContrato() End If @@ -65,7 +65,7 @@ Partial Class Acarreos_AcarreosPreEstimacion DdlMaterial.DataBind() CargaDdlNumContrato() TxtNumPreEstimacion.Text = "" - TxtFechaPreEstimacion.Text = Now.AddDays(0).ToShortDateString + TxtFechaPreEstimacion.Text = NowADS().AddDays(0).ToShortDateString GvPreEstimacion.DataSource = Nothing GvPreEstimacion.DataBind() Else diff --git a/Acarreos/RegistroAcarreo.aspx.vb b/Acarreos/RegistroAcarreo.aspx.vb index ec3533883..d3a4f625c 100644 --- a/Acarreos/RegistroAcarreo.aspx.vb +++ b/Acarreos/RegistroAcarreo.aspx.vb @@ -145,7 +145,7 @@ Partial Class Acarreos_EditarAcarreo DdlChofer.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlMaterial.Items.Insert(0, New ListItem("Seleccione", "-1")) CargaDdlNumContrato() - TxtFecha.Text = Now.AddDays(0).ToShortDateString + TxtFecha.Text = NowADS().AddDays(0).ToShortDateString CargaDatos() divEstatus.Visible = False SetPermisos() @@ -325,7 +325,7 @@ Partial Class Acarreos_EditarAcarreo DdlTransportista.Items.Clear() RBDestino.Checked = False RBOrigen.Checked = False - TxtFecha.Text = Now.AddDays(0).ToShortDateString + TxtFecha.Text = NowADS().AddDays(0).ToShortDateString DdlNumContrato.SelectedIndex = -1 DdlTransportista.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlUnidad.Items.Insert(0, New ListItem("Seleccione", "-1")) diff --git a/Acarreos/RegistroContratosAcarreos.aspx.vb b/Acarreos/RegistroContratosAcarreos.aspx.vb index 8f4149a4e..661f28235 100644 --- a/Acarreos/RegistroContratosAcarreos.aspx.vb +++ b/Acarreos/RegistroContratosAcarreos.aspx.vb @@ -74,8 +74,8 @@ Partial Class Acarreos_ContratosAcarreos CargaDdlUnidadMedida() CreaTmpTarifas() CreaTmpMaterialVolumen() - TxtFechaInicio.Text = Now.AddDays(0).ToShortDateString - TxtFechaFin.Text = Now.AddDays(0).ToShortDateString + TxtFechaInicio.Text = NowADS().AddDays(0).ToShortDateString + TxtFechaFin.Text = NowADS().AddDays(0).ToShortDateString CargaDatos() End If End Sub @@ -303,8 +303,8 @@ Partial Class Acarreos_ContratosAcarreos TxtVolumenTipo.Text = "" TxtDescripcion.Text = "" TxtNumContrato.Text = "" - TxtFechaInicio.Text = Now.AddDays(0).ToShortDateString - TxtFechaFin.Text = Now.AddDays(0).ToShortDateString + TxtFechaInicio.Text = NowADS().AddDays(0).ToShortDateString + TxtFechaFin.Text = NowADS().AddDays(0).ToShortDateString DTTarifa.Rows.Clear() DTMaterialVolumen.Rows.Clear() GvTarifa.DataSource = Nothing diff --git a/Acarreos/RepAcarreos.aspx.vb b/Acarreos/RepAcarreos.aspx.vb index c530964bc..0e43a11d2 100644 --- a/Acarreos/RepAcarreos.aspx.vb +++ b/Acarreos/RepAcarreos.aspx.vb @@ -22,8 +22,8 @@ Partial Class Acarreos_RepAcarreos CargaDdlTransportista() CargaDdlMaterial() CargaDdlNumContrato() - txtFechaF.Text = Now.AddDays(0).ToShortDateString - txtFechaI.Text = Now.AddYears(-1).ToShortDateString + txtFechaF.Text = NowADS().AddDays(0).ToShortDateString + txtFechaI.Text = NowADS().AddYears(-1).ToShortDateString End If End Sub diff --git a/Acarreos/RepAcarreosDetalle.aspx.vb b/Acarreos/RepAcarreosDetalle.aspx.vb index b39288317..c62913d3e 100644 --- a/Acarreos/RepAcarreosDetalle.aspx.vb +++ b/Acarreos/RepAcarreosDetalle.aspx.vb @@ -24,8 +24,8 @@ Partial Class Acarreos_RepAcarreosDetalle Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not Page.IsPostBack Then - txtFechaF.Text = Now.AddDays(0).ToShortDateString - txtFechaI.Text = Now.AddYears(-1).ToShortDateString + txtFechaF.Text = NowADS().AddDays(0).ToShortDateString + txtFechaI.Text = NowADS().AddYears(-1).ToShortDateString CargaDdlChofer() CargaDdlSubProyectoOrigen() CargaDdlSubProyectoDestino() diff --git a/Acarreos/RepContratosAcarreos.aspx.vb b/Acarreos/RepContratosAcarreos.aspx.vb index 62f3b8812..6adf28707 100644 --- a/Acarreos/RepContratosAcarreos.aspx.vb +++ b/Acarreos/RepContratosAcarreos.aspx.vb @@ -27,8 +27,8 @@ Partial Class Acarreos_RepContratosAcarreos CargaDdlSubProyectoOrigen() CargaDdlTransportista() CargaDdlProveedor() - txtFechaF.Text = Now.AddDays(0).ToShortDateString - txtFechaI.Text = Now.AddYears(-1).ToShortDateString + txtFechaF.Text = NowADS().AddDays(0).ToShortDateString + txtFechaI.Text = NowADS().AddYears(-1).ToShortDateString End If End Sub @@ -154,14 +154,14 @@ Partial Class Acarreos_RepContratosAcarreos Dim params As New List(Of ReportParameter) params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("Filtros", StrFiltro.ToString)) If Imagen.Exists Then params.Add(New ReportParameter("LogoPath", $"file://{Imagen}")) Else params.Add(New ReportParameter("LogoPath", "")) End If - ImprimirPDF("Empresas/Grales/Formatos/RepContratosAcarreos.rdlc", DTCont, params, String.Format("RepContratosAcarreos-{0}", Now.ToDateTime.ToShortDateString)) + ImprimirPDF("Empresas/Grales/Formatos/RepContratosAcarreos.rdlc", DTCont, params, String.Format("RepContratosAcarreos-{0}", NowADS().ToDateTime.ToShortDateString)) Else Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia) End If @@ -182,10 +182,10 @@ Partial Class Acarreos_RepContratosAcarreos Dim params As New List(Of ReportParameter) params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("Filtros", StrFiltro.ToString)) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) - ImprimirPDF("Empresas/Grales/Formatos/RepContratosAcarreos.rdlc", DTCont, params, String.Format("RepContratosAcarreos-{0}", Now.ToDateTime.ToShortDateString), "Excel") + ImprimirPDF("Empresas/Grales/Formatos/RepContratosAcarreos.rdlc", DTCont, params, String.Format("RepContratosAcarreos-{0}", NowADS().ToDateTime.ToShortDateString), "Excel") Else Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia) End If diff --git a/Acarreos/RepContratosAcarreosDetalle.aspx.vb b/Acarreos/RepContratosAcarreosDetalle.aspx.vb index 3333d3de7..0c148923e 100644 --- a/Acarreos/RepContratosAcarreosDetalle.aspx.vb +++ b/Acarreos/RepContratosAcarreosDetalle.aspx.vb @@ -183,7 +183,7 @@ Partial Class Acarreos_RepContratosAcarreosDetalle Dim params As New List(Of ReportParameter) params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("Contrato", LblContrato.Text)) params.Add(New ReportParameter("FechaInicio", LblFechaInicio.Text)) params.Add(New ReportParameter("FechaFin", LblFechaFin.Text)) @@ -205,7 +205,7 @@ Partial Class Acarreos_RepContratosAcarreosDetalle Else params.Add(New ReportParameter("LogoPath", "")) End If - ImprimirPDF("Empresas/Grales/Formatos/RepContratosAcarreosDetalle.rdlc", DTCont, params, String.Format("RepContratosAcarreosDetalle-{0}", Now.ToDateTime.ToShortDateString)) + ImprimirPDF("Empresas/Grales/Formatos/RepContratosAcarreosDetalle.rdlc", DTCont, params, String.Format("RepContratosAcarreosDetalle-{0}", NowADS().ToDateTime.ToShortDateString)) Else Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia) End If @@ -222,7 +222,7 @@ Partial Class Acarreos_RepContratosAcarreosDetalle Dim params As New List(Of ReportParameter) params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("Contrato", LblContrato.Text)) params.Add(New ReportParameter("FechaInicio", LblFechaInicio.Text)) params.Add(New ReportParameter("FechaFin", LblFechaFin.Text)) @@ -240,7 +240,7 @@ Partial Class Acarreos_RepContratosAcarreosDetalle params.Add(New ReportParameter("VolF", LblVolFaltante.Text)) params.Add(New ReportParameter("PresF", LblPresFaltante.Text)) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) - ImprimirPDF("Empresas/Grales/Formatos/RepContratosAcarreosDetalle.rdlc", DTCont, params, String.Format("RepContratosAcarreosDetalle-{0}", Now.ToDateTime.ToShortDateString), "Excel") + ImprimirPDF("Empresas/Grales/Formatos/RepContratosAcarreosDetalle.rdlc", DTCont, params, String.Format("RepContratosAcarreosDetalle-{0}", NowADS().ToDateTime.ToShortDateString), "Excel") Else Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia) End If diff --git a/Acarreos/RepPreEstimacionDetalle.aspx.vb b/Acarreos/RepPreEstimacionDetalle.aspx.vb index f89d915fc..119866856 100644 --- a/Acarreos/RepPreEstimacionDetalle.aspx.vb +++ b/Acarreos/RepPreEstimacionDetalle.aspx.vb @@ -100,14 +100,14 @@ Partial Class Acarreos_RepPreEstimacionDetalle Dim params As New List(Of ReportParameter) params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("Filtros", StrFiltro.ToString)) If Imagen.Exists Then params.Add(New ReportParameter("LogoPath", $"file://{Imagen}")) Else params.Add(New ReportParameter("LogoPath", "")) End If - ImprimirPDF("Empresas/Grales/Formatos/RepPreEstimacionDetalle.rdlc", DTCont, params, String.Format("RepPreEstimacionDetalle-{0}", Now.ToDateTime.ToShortDateString)) + ImprimirPDF("Empresas/Grales/Formatos/RepPreEstimacionDetalle.rdlc", DTCont, params, String.Format("RepPreEstimacionDetalle-{0}", NowADS().ToDateTime.ToShortDateString)) Else Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia) End If @@ -133,10 +133,10 @@ Partial Class Acarreos_RepPreEstimacionDetalle Dim params As New List(Of ReportParameter) params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("Filtros", StrFiltro.ToString)) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) - ImprimirPDF("Empresas/Grales/Formatos/RepPreEstimacionDetalle.rdlc", DTCont, params, String.Format("RepPreEstimacionDetalle-{0}", Now.ToDateTime.ToShortDateString), "Excel") + ImprimirPDF("Empresas/Grales/Formatos/RepPreEstimacionDetalle.rdlc", DTCont, params, String.Format("RepPreEstimacionDetalle-{0}", NowADS().ToDateTime.ToShortDateString), "Excel") Else Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia) End If diff --git a/Acumuladores/EntradasUsadosResumenRep.aspx.vb b/Acumuladores/EntradasUsadosResumenRep.aspx.vb index ea3a27693..3a33a5241 100644 --- a/Acumuladores/EntradasUsadosResumenRep.aspx.vb +++ b/Acumuladores/EntradasUsadosResumenRep.aspx.vb @@ -35,11 +35,11 @@ Partial Class Acumuladores_RepEntradasUsados End Sub Protected Sub CargarCombos() - Dim fecha As Date = Date.Now.AddMonths(-1) + Dim fecha As Date = NowADS().AddMonths(-1) Dim Años As New ListItem Dim i As Integer If Cargado = 0 Then - For i = Date.Now.Year.ToEntero To (fecha.Year.ToEntero - 5) Step -1 + For i = NowADS().Year.ToEntero To (fecha.Year.ToEntero - 5) Step -1 Años = New ListItem(i.ToString, i.ToString) DdlAño.Items.Add(Años) Next @@ -85,7 +85,7 @@ Partial Class Acumuladores_RepEntradasUsados Dim params As New List(Of ReportParameter) params.Add(New ReportParameter("Direccion", Direccion)) - params.Add(New ReportParameter("FechaConFormato", Date.Now.ToString)) + params.Add(New ReportParameter("FechaConFormato", NowADS().ToString)) params.Add(New ReportParameter("FechaInicial", txtFechaI.Text)) params.Add(New ReportParameter("FechaFinal", txtFechaF.Text)) params.Add(New ReportParameter("Sucursal", "Sucursal")) diff --git a/Acumuladores/RepAcumuladoresVigencia.aspx.cs b/Acumuladores/RepAcumuladoresVigencia.aspx.cs index da9ed60da..aa1e08d0a 100644 --- a/Acumuladores/RepAcumuladoresVigencia.aspx.cs +++ b/Acumuladores/RepAcumuladoresVigencia.aspx.cs @@ -17,7 +17,7 @@ public partial class Acumuladores_RepAcumuladoresVigencia : ClsPaginas { if (Consultado) { - GvAcum.ExportToExcelG("RepAcumuladoresVigencia " + DateTime.Now.ToString("dd-MM-yyyy"), "Reporte de Vigencia de Acumuladores", UsuarioActual); + GvAcum.ExportToExcelG("RepAcumuladoresVigencia " + NowADS().ToString("dd-MM-yyyy"), "Reporte de Vigencia de Acumuladores", UsuarioActual); } else { @@ -53,8 +53,8 @@ public partial class Acumuladores_RepAcumuladoresVigencia : ClsPaginas { Consultado = false; CargaCombos(); - txtFechaI.Text = DateTime.Now.FirstDayOfMonth().AddMonths(-24).ToShortDateString(); - txtFechaF.Text = DateTime.Now.LastDayOfMonth().AddMonths(-6).ToShortDateString(); + txtFechaI.Text = NowADS().FirstDayOfMonth().AddMonths(-24).ToShortDateString(); + txtFechaF.Text = NowADS().LastDayOfMonth().AddMonths(-6).ToShortDateString(); UpFiltros.Update(); } diff --git a/Acumuladores/RepEntradasUsadosClientes.aspx.vb b/Acumuladores/RepEntradasUsadosClientes.aspx.vb index 6a89cc2c4..d77d1166b 100644 --- a/Acumuladores/RepEntradasUsadosClientes.aspx.vb +++ b/Acumuladores/RepEntradasUsadosClientes.aspx.vb @@ -36,8 +36,8 @@ Partial Class Acumuladores_RepEntradasUsadosClientes DdlAlmacen.DataBind() DdlAlmacen.Items.Insert(0, New ListItem("Todos", "-1")) - TxtFechaI.Text = Now.FirstDayOfMonth.ToShortDateString - TxtFechaF.text = now.toshortdatestring + TxtFechaI.Text = NowADS().FirstDayOfMonth.ToShortDateString + TxtFechaF.text = NowADS().toshortdatestring End Sub diff --git a/Acumuladores/RepIndicadorDiario.aspx.vb b/Acumuladores/RepIndicadorDiario.aspx.vb index 1e0fbc7ab..8b9358b27 100644 --- a/Acumuladores/RepIndicadorDiario.aspx.vb +++ b/Acumuladores/RepIndicadorDiario.aspx.vb @@ -63,8 +63,8 @@ Partial Class ACumuladores_RepIndicadorDiario Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not IsPostBack Then - txtFechaI.Text = Now.FirstDayOfMonth().ToString("dd/MM/yyyy") - txtFechaF.Text = Now.ToString("dd/MM/yyyy") + txtFechaI.Text = NowADS().FirstDayOfMonth().ToString("dd/MM/yyyy") + txtFechaF.Text = NowADS().ToString("dd/MM/yyyy") CargaCombos() @@ -119,7 +119,7 @@ Partial Class ACumuladores_RepIndicadorDiario If RblTipoCambio.SelectedValue.ToEntero = 3 Then Dim TipoCambio As Double LiEspecifico.Visible = True - TipoCambio = GlobalTipoCambio(Now) + TipoCambio = GlobalTipoCambio(NowADS()) TxtEspecifico.Text = TipoCambio.ToString Else LiEspecifico.Visible = False @@ -162,7 +162,7 @@ Partial Class ACumuladores_RepIndicadorDiario #Region " IMPRIMIR " Protected Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click - 'GvDatos.ExportToExcel("ReporteComprasClasificacion" & Now.ToShortDateString) + 'GvDatos.ExportToExcel("ReporteComprasClasificacion" & NowADS().ToShortDateString) GenerarPDF("EXCEL") End Sub @@ -193,11 +193,11 @@ Partial Class ACumuladores_RepIndicadorDiario params.Add(New ReportParameter("FechaInicio", FechaI)) params.Add(New ReportParameter("FechaFin", FechaF)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString)) params.Add(New ReportParameter("AgrupadoPor", $"Filtros Por: {FechaIn} {FechaFn} {SubProyecto} ")) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) - ImprimirPDF("Empresas/Grales/Formatos/RepIndicadorDiario.rdlc", DtDatos, params, $"RepIndicadorDiario_{Now.ToString("yyyyMMddhhmmss")}", Opcion) + ImprimirPDF("Empresas/Grales/Formatos/RepIndicadorDiario.rdlc", DtDatos, params, $"RepIndicadorDiario_{NowADS().ToString("yyyyMMddhhmmss")}", Opcion) Else Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia) End If diff --git a/Acumuladores/RepPolizasVirtuales.aspx.vb b/Acumuladores/RepPolizasVirtuales.aspx.vb index 4ce6c4895..58be54395 100644 --- a/Acumuladores/RepPolizasVirtuales.aspx.vb +++ b/Acumuladores/RepPolizasVirtuales.aspx.vb @@ -13,7 +13,7 @@ Partial Class Acumuladores_RepPolizasVirtuales Private Sub CargaCombos() CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto:=LblSubProyecto) - txtFechaI.Text = DateTime.Now.FirstDayOfMonth.ToShortDateString() + txtFechaI.Text = NowADS().FirstDayOfMonth.ToShortDateString() End Sub diff --git a/Acumuladores/RepUsados.aspx.cs b/Acumuladores/RepUsados.aspx.cs index 082d114ee..fce9117cf 100644 --- a/Acumuladores/RepUsados.aspx.cs +++ b/Acumuladores/RepUsados.aspx.cs @@ -14,8 +14,8 @@ public partial class Ventas_RepUsados : ClsPaginas private void InicializaValores() { CargaCliente(); - txtFechaI.Text = DateTime.Now.FirstDayOfMonth().ToShortDateString(); - txtFechaF.Text = DateTime.Now.LastDayOfMonth().ToShortDateString(); + txtFechaI.Text = NowADS().FirstDayOfMonth().ToShortDateString(); + txtFechaF.Text = NowADS().LastDayOfMonth().ToShortDateString(); UpFiltros.Update(); } diff --git a/App_Code/ClsBancos.vb b/App_Code/ClsBancos.vb index 56dc02260..e7a21f5c5 100644 --- a/App_Code/ClsBancos.vb +++ b/App_Code/ClsBancos.vb @@ -987,7 +987,7 @@ Public Class ClsBancos Dim dttpagosimpuestos As DataTable = Nothing Dim dr As Data.DataRow = Nothing - If GetComplementoPagosRep(-1, Now.AddYears(-5), Now, If(CvePrePoliza > 0, -1, CveIE), CveVenta, If(EsRegeneracion, 2, 1), UsuarioActual.CveEmpresa, CvePrePoliza:=CvePrePoliza) Then + If GetComplementoPagosRep(-1, ClsPaginas.NowADS().AddYears(-5), ClsPaginas.NowADS(), If(CvePrePoliza > 0, -1, CveIE), CveVenta, If(EsRegeneracion, 2, 1), UsuarioActual.CveEmpresa, CvePrePoliza:=CvePrePoliza) Then dr = DtResultados.FiltroPrimero("CveVenta IS NULL") dttpagos = DtResultados.FiltraParametros("CveVenta > 0") End If @@ -1000,23 +1000,23 @@ Public Class ClsBancos RowFiltro = dttpagos.FiltroPrimero("") If RowFiltro IsNot Nothing Then - If Now.EsHorarioVerano Then + If ClsPaginas.NowADS().EsHorarioVerano Then Dim UTCOffsetVerano As Integer = RowFiltro("UTCOffsetVerano").ToString().ToEntero() If UTCOffsetVerano <> 0 Then FechaTimbrado = DateTime.UtcNow.AddHours(UTCOffsetVerano) Else - FechaTimbrado = DateTime.Now + FechaTimbrado = ClsPaginas.NowADS() End If Else Dim UTCOffsetInvierno As Integer = RowFiltro("UTCOffsetInvierno").ToString().ToEntero() If UTCOffsetInvierno <> 0 Then FechaTimbrado = DateTime.UtcNow.AddHours(UTCOffsetInvierno) Else - FechaTimbrado = DateTime.Now + FechaTimbrado = ClsPaginas.NowADS() End If End If Else - FechaTimbrado = DateTime.Now + FechaTimbrado = ClsPaginas.NowADS() End If End If diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb index 0f769cbbf..1edecc564 100644 --- a/App_Code/ClsContabilidad.vb +++ b/App_Code/ClsContabilidad.vb @@ -6328,7 +6328,7 @@ Public Class ClsContabilidad Return Retorno End Function - Public Function GetEstadosMensualHorizontal(FechaI As Date, FechaF As Date, CveProyecto As Integer, CveSubProyecto As Integer, Divisor As Integer, CveEmpresa As Integer, CveUsuario As Integer, Optional Tipo As Integer = 1) As Boolean + Public Function GetEstadosMensualHorizontal(FechaI As Date, FechaF As Date, CveProyecto As Integer, CveSubProyecto As Integer, Divisor As Integer, CveEmpresa As Integer, CveUsuario As Integer, Optional Tipo As Integer = 1, Optional VistaPorcentaje As Integer = 1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Conta2_EstadoResultadosMensualHorizontal") @@ -6342,6 +6342,7 @@ Public Class ClsContabilidad .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@Tipo", SqlDbType.Int).Value = Tipo + .Add("@VistaPorcentaje", SqlDbType.Int).Value = VistaPorcentaje End With @@ -6357,7 +6358,7 @@ Public Class ClsContabilidad Return Retorno End Function - Public Function GetEstadosAnualHorizontal(FechaI As Date, FechaF As Date, CveProyecto As Integer, CveSubProyecto As Integer, Divisor As Integer, CveEmpresa As Integer, CveUsuario As Integer, Optional Tipo As Integer = 1, Optional Periodo As Integer = 12) As Boolean + Public Function GetEstadosAnualHorizontal(FechaI As Date, FechaF As Date, CveProyecto As Integer, CveSubProyecto As Integer, Divisor As Integer, CveEmpresa As Integer, CveUsuario As Integer, Optional Tipo As Integer = 1, Optional Periodo As Integer = 12, Optional VistaPorcentaje As Integer = 1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Conta2_EstadoResultadosAnualHorizontal") @@ -6372,6 +6373,7 @@ Public Class ClsContabilidad .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@Tipo", SqlDbType.Int).Value = Tipo .Add("@Periodo", SqlDbType.Int).Value = Periodo + .Add("@VistaPorcentaje", SqlDbType.Int).Value = VistaPorcentaje End With @@ -6388,7 +6390,7 @@ Public Class ClsContabilidad End Function - Public Function GetEstadosSubProyectoHorizontal(FechaI As Date, FechaF As Date, CveProyecto As Integer, CveSubProyecto As Integer, Divisor As Integer, CveEmpresa As Integer, CveUsuario As Integer, Optional Tipo As Integer = 1) As Boolean + Public Function GetEstadosSubProyectoHorizontal(FechaI As Date, FechaF As Date, CveProyecto As Integer, CveSubProyecto As Integer, Divisor As Integer, CveEmpresa As Integer, CveUsuario As Integer, Optional Tipo As Integer = 1, Optional VistaPorcentaje As Integer = 1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Conta2_EstadoResultadosSubProyectolHorizontal") @@ -6402,7 +6404,7 @@ Public Class ClsContabilidad .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@Tipo", SqlDbType.Int).Value = Tipo - + .Add("@VistaPorcentaje", SqlDbType.Int).Value = VistaPorcentaje End With SqlAdapter.SelectCommand.CommandTimeout = 0 diff --git a/App_Code/ClsDG.vb b/App_Code/ClsDG.vb index 9a3f09070..500a506d0 100644 --- a/App_Code/ClsDG.vb +++ b/App_Code/ClsDG.vb @@ -611,7 +611,7 @@ Public Class ClsDG Public Sub GuardaLog(pTexto As String) Dim ArchivoW As StreamWriter Dim strLineaTMP As String - strLineaTMP = String.Format("{0} {1}:{2} {3} {0}", Chr(13), DateTime.Now.ToShortDateString, DateTime.Now.ToShortTimeString, pTexto) + strLineaTMP = String.Format("{0} {1}:{2} {3} {0}", Chr(13), ClsPaginas.NowADS().ToShortDateString, ClsPaginas.NowADS().ToShortTimeString, pTexto) Try ArchivoW = New StreamWriter(String.Format("{0}\LogDG.txt", AppDomain.CurrentDomain), True, System.Text.Encoding.UTF8) diff --git a/App_Code/ClsEncuestas.vb b/App_Code/ClsEncuestas.vb index fb9c893d5..d7a8e0a51 100644 --- a/App_Code/ClsEncuestas.vb +++ b/App_Code/ClsEncuestas.vb @@ -566,7 +566,7 @@ Public Class ClsEncuestas .Add("@CveCliente", SqlDbType.Int).Value = CveCliente .Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario - .Add("@Fecha", SqlDbType.Date).Value = Now + .Add("@Fecha", SqlDbType.Date).Value = ClsPaginas.NowADS() .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEncuestaAplicada", SqlDbType.Int).Direction = ParameterDirection.Output End With diff --git a/App_Code/ClsGenerales.vb b/App_Code/ClsGenerales.vb index 1b98bec8a..4367579f6 100644 --- a/App_Code/ClsGenerales.vb +++ b/App_Code/ClsGenerales.vb @@ -1728,7 +1728,7 @@ Public Class ClsGenerales .Add("@Estatus", SqlDbType.VarChar).Value = Estatus .Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda .Add("@CveCuentaDeposito", SqlDbType.Int).Value = CveCuentaDeposito - .Add("@FechaIng", SqlDbType.Date).Value = Date.Now + .Add("@FechaIng", SqlDbType.Date).Value = ClsPaginas.NowADS() .Add("@RefCrediProveedor", SqlDbType.VarChar).Value = RefCrediProveedor .Add("@CveUsuarioModifico", SqlDbType.Int).Value = CveUsuarioModifico .Add("@Correo", SqlDbType.VarChar).Value = Correo diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb index c0b1a6eb8..0209ab3a3 100644 --- a/App_Code/ClsInventarios.vb +++ b/App_Code/ClsInventarios.vb @@ -992,7 +992,7 @@ Public Class ClsInventarios DataAdapter("PA_Inv_MovimientosAdd") If FechaMovto.Hour = 0 AndAlso FechaMovto.Minute = 0 AndAlso FechaMovto.Second = 0 Then - FechaMovto = String.Format("{0} {1}:{2}:{3}", FechaMovto.ToShortDateString, Now.Hour, Now.Minute, Now.Second).ToDateTime + FechaMovto = String.Format("{0} {1}:{2}:{3}", FechaMovto.ToShortDateString, ClsPaginas.NowADS().Hour, ClsPaginas.NowADS().Minute, ClsPaginas.NowADS().Second).ToDateTime End If With SqlAdapter.SelectCommand.Parameters @@ -1981,7 +1981,7 @@ Public Class ClsInventarios Dim Retorno As Decimal = -1 If FechaMovto = "-1" Then - FechaMovto = String.Format("{0} 00:00", Now.AddDays(1).ToString("yyyy/MM/dd")) + FechaMovto = String.Format("{0} 00:00", ClsPaginas.NowADS().AddDays(1).ToString("yyyy/MM/dd")) End If DataAdapter("PA_Inv_ExistenciasPSGet") @@ -2176,7 +2176,7 @@ Public Class ClsInventarios Dim Retorno As Boolean = False If FechaMovto = "-1" Then - FechaMovto = String.Format("{0} 00:00", Now.AddDays(1).ToString("yyyy/MM/dd")) + FechaMovto = String.Format("{0} 00:00", ClsPaginas.NowADS().AddDays(1).ToString("yyyy/MM/dd")) End If DataAdapter("PA_Inv_ExistenciasPSEmpaqueGet") @@ -2216,7 +2216,7 @@ Public Class ClsInventarios Dim Retorno As Boolean = False If Fecha = "-1" Then - Fecha = String.Format("{0} 00:00", Now.AddDays(1).ToString("yyyy/MM/dd")) + Fecha = String.Format("{0} 00:00", ClsPaginas.NowADS().AddDays(1).ToString("yyyy/MM/dd")) End If DataAdapter("PA_Inv_ExistenciasPSXMLGet") diff --git a/App_Code/ClsMovimientos.vb b/App_Code/ClsMovimientos.vb index b9663aa48..123eec236 100644 --- a/App_Code/ClsMovimientos.vb +++ b/App_Code/ClsMovimientos.vb @@ -120,7 +120,7 @@ Public Class ClsMovimientos Public Function GetCxCClienteDetalle(CveCliente As Integer, FechaI As String, FechaF As String, CveMoneda As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, CveClienteSucursal As Integer, Optional TipoDocto As String = "-1", Optional FechaCorte As Date = MaxFecha, Optional FechaVencimientoI As Date = MinFecha, Optional FechaVencimientoF As Date = MaxFecha) As Boolean Dim Retorno As Boolean = False - FechaCorte = IIf(FechaCorte = Nothing, NowADS().AddYears(1), FechaCorte).ToString.ToDate + FechaCorte = IIf(FechaCorte = Nothing, ClsPaginas.NowADS().AddYears(1), FechaCorte).ToString.ToDate DataAdapter("PA_Vta_ClienteCxC") With SqlAdapter.SelectCommand.Parameters @@ -684,7 +684,7 @@ Public Class ClsMovimientos Optional TipoDocto As String = "-1", Optional TipoAgrupacion As Integer = -1, Optional CveProyecto As Integer = -1) As Boolean Dim Retorno As Boolean = False - If FechaCorte = Nothing Then FechaCorte = Now + If FechaCorte = Nothing Then FechaCorte = ClsPaginas.NowADS() DataAdapter("PA_Comp_RepCxP") With SqlAdapter.SelectCommand.Parameters @@ -1314,7 +1314,7 @@ Public Class ClsMovimientos Optional Comprobaciones As Integer = -1, Optional AplicaNC As Integer = -1, Optional TipoDocto As String = "-1", Optional CveProyecto As Integer = -1) As Boolean Dim Retorno As Boolean = False - If FechaCorte = Nothing Then FechaCorte = Now + If FechaCorte = Nothing Then FechaCorte = ClsPaginas.NowADS() DataAdapter("PA_Comp_RepCxPDetalle") With SqlAdapter.SelectCommand.Parameters diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index f2cdf778c..a3ada1cca 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -98,12 +98,21 @@ Public Class ClsPaginas End Try End Set End Property - Public Function NowADS() As DateTime + + Public Shared Function NowADS() As DateTime Dim tHora As Integer = 0 - If UsuarioActual IsNot Nothing AndAlso UsuarioActual.Empresa IsNot Nothing Then tHora = UsuarioActual.Empresa.UTCHora - Return If(tHora <> 0, Now.ToUniversalTime.AddHours(tHora), Now) + 'If UsuarioActual IsNot Nothing AndAlso UsuarioActual.Empresa IsNot Nothing Then tHora = UsuarioActual.Empresa.UTCOffset + Try + If HttpContext.Current.Session("UsuarioSIG") IsNot Nothing AndAlso CType(HttpContext.Current.Session("UsuarioSIG"), Usuario).Empresa IsNot Nothing Then tHora = CType(HttpContext.Current.Session("UsuarioSIG"), Usuario).Empresa.UTCOffset + Catch ex As Exception + + End Try + + + Return If(tHora <> 0, Now.ToUniversalTime.AddMinutes(tHora), Now) End Function + #End Region #Region "GlobalDTs" @@ -111,7 +120,7 @@ Public Class ClsPaginas Get If GlobalTipoCambio <= 0 Then 'sino tiene dato lo recargo por si ya esta insertado - If Fecha = MinFecha Then Fecha = Now + If Fecha = MinFecha Then Fecha = NowADS() Dim ObjGral As New ClsGenerales If ObjGral.GetTipoCambio(-1, Fecha) AndAlso ObjGral.DtResultados.Rows.Count > 0 Then HttpContext.Current.Application("GlobalTipoCambio") = ObjGral.DtResultados.Rows(0)("TipoCambio").ToString.ToDouble @@ -130,7 +139,7 @@ Public Class ClsPaginas Get If HttpContext.Current.Application("GlobalTipoCambioUltimaFluctuacion") Is Nothing Then Dim ObjGral As New ClsGenerales - If ObjGral.GetTipoCambioUltimaFluctuacion(-1, Now) AndAlso ObjGral.DtResultados.Rows.Count > 0 Then + If ObjGral.GetTipoCambioUltimaFluctuacion(-1, NowADS()) AndAlso ObjGral.DtResultados.Rows.Count > 0 Then HttpContext.Current.Application("GlobalTipoCambioUltimaFluctuacion") = ObjGral.DtResultados.Copy() Else HttpContext.Current.Application("GlobalTipoCambioUltimaFluctuacion") = Nothing @@ -142,7 +151,7 @@ Public Class ClsPaginas .FechaFluctuacion = MinFecha } 'sino tiene dato lo recargo por si ya esta insertado - If Fecha = MinFecha Then Fecha = Now + If Fecha = MinFecha Then Fecha = NowADS() If HttpContext.Current.Application("GlobalTipoCambioUltimaFluctuacion") IsNot Nothing Then Dim dr As DataRow = DirectCast(HttpContext.Current.Application("GlobalTipoCambioUltimaFluctuacion"), DataTable).FiltroPrimero(String.Format("Fecha < '{0}'", Fecha), Orderby:="Fecha DESC") @@ -165,7 +174,7 @@ Public Class ClsPaginas Get If GlobalTipoCambioEuro <= 0 Then 'sino tiene dato lo recargo por si ya esta insertado - If Fecha = MinFecha Then Fecha = Now + If Fecha = MinFecha Then Fecha = NowADS() Dim ObjGral As New ClsGenerales If ObjGral.GetTipoCambio(-1, Fecha) AndAlso ObjGral.DtResultados.Rows.Count > 0 Then Application("GlobalTipoCambioEuro") = ObjGral.DtResultados.Rows(0)("TipoCambioEuro").ToString.ToDouble @@ -4505,7 +4514,7 @@ Public Class ClsPaginas Public Shared Sub RegistraScript(Script As String, Optional valuetick As String = "") Dim page As Page = TryCast(HttpContext.Current.CurrentHandler, Page) Script = $"{Script.TrimEnd(";"c)};" 'sino trae ";" al final, se lo agregamos - ScriptManager.RegisterStartupScript(page, page.GetType(), $"{DateTime.Now.Ticks + 1}{ThreadSafeRandom.Next()}{valuetick}", Script, True) + ScriptManager.RegisterStartupScript(page, page.GetType(), $"{NowADS().Ticks + 1}{ThreadSafeRandom.Next()}{valuetick}", Script, True) End Sub Public Sub TabEnabled(Tab As System.Web.UI.HtmlControls.HtmlAnchor, Valor As Boolean) If Valor Then @@ -5510,7 +5519,7 @@ Public Class ClsPaginas params.Add(New ReportParameter("ClienteDiasCredito", "0")) params.Add(New ReportParameter("MonedaAbreviatura", If(Vta.MonedaAbreviatura.ToString IsNot Nothing, Vta.MonedaAbreviatura.ToString, ""))) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToString)) params.Add(New ReportParameter("Sucursal", Vta.SubProyecto.SubProyecto)) params.Add(New ReportParameter("EstatusFactura", If(Vta.TipoEstatus = 5, Vta.EstatusFactura, ""))) params.Add(New ReportParameter("EstatusEntrega", If(Vta.Inv_CveEstatusEntrega = 1, Vta.Inv_EstatusEntrega, ""))) @@ -6459,7 +6468,7 @@ Public Class ClsPaginas params.Add(New ReportParameter("EntregaDirecta", ObjOC.EntregaDirecta.ToString)) params.Add(New ReportParameter("NombreCliente", ObjOC.NombreCliente.ToString)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToString)) params.Add(New ReportParameter("DomicilioSucursal", DomicilioSucursal)) params.Add(New ReportParameter("ProveedorContacto", ObjOC.ProveedorContacto)) params.Add(New ReportParameter("Comprador", ObjOC.UsuarioAsignado)) @@ -6657,7 +6666,7 @@ Public Class ClsPaginas lista.Add(New CrystalParametro("Empresa", EmpresaActual.Empresa)) lista.Add(New CrystalParametro("TipoCuentas", "Todas")) lista.Add(New CrystalParametro("FechaInicio", "-")) - lista.Add(New CrystalParametro("FechaFin", DateTime.Now.ToShortDateString)) + lista.Add(New CrystalParametro("FechaFin", NowADS().ToShortDateString)) lista.Add(New CrystalParametro("NombreProveedor", NombreProv)) lista.Add(New CrystalParametro("DireccionProveedor", Direccion)) lista.Add(New CrystalParametro("ProveedorRFC", RFC)) @@ -7132,7 +7141,7 @@ Public Class ClsPaginas params.Add(New ReportParameter("EmpresaNoInt", UsuarioActual.Empresa.NoInt)) 'DATOS IMPRESION params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToString)) 'DATOS GENERALES Dim Ruta As String = UsuarioActual.Empresa.Ruta Dim PathXML As String = $"{Ruta}XML\Pag\{Serie}-{Folio}.xml" diff --git a/App_Code/ClsProspectos.vb b/App_Code/ClsProspectos.vb index 47fe6ac76..08aa72f85 100644 --- a/App_Code/ClsProspectos.vb +++ b/App_Code/ClsProspectos.vb @@ -658,7 +658,7 @@ Public Class ClsProspectos .Add("@CveProspectoEstatus", SqlDbType.Int).Value = CveProspectoEstatus .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa - .Add("@FechaIng", SqlDbType.DateTime).Value = If(FechaIngreso = "-1", Now, FechaIngreso.ToDate) + .Add("@FechaIng", SqlDbType.DateTime).Value = If(FechaIngreso = "-1", ClsPaginas.NowADS(), FechaIngreso.ToDate) .Add("@CveProspecto", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue End With diff --git a/App_Code/ClsRH.vb b/App_Code/ClsRH.vb index eedeea1c5..b470c6d70 100644 --- a/App_Code/ClsRH.vb +++ b/App_Code/ClsRH.vb @@ -7083,7 +7083,7 @@ Public Class ClsRH ListaTagsDocumentost.Add(New TagsDocumentos("{Estatura}", DtResultados(0)("Estatura").ToString)) ListaTagsDocumentost.Add(New TagsDocumentos("{Peso}", DtResultados(0)("Peso").ToString)) ListaTagsDocumentost.Add(New TagsDocumentos("{LugarNacimiento}", DtResultados(0)("LugarNacimiento").ToString)) - ListaTagsDocumentost.Add(New TagsDocumentos("{Edad}", If(DtResultados(0)("Edad").ToString = "", If(DtResultados(0)("FechaNacimiento").ToString = "", "", DateDiff(DateInterval.Year, DtResultados(0)("FechaNacimiento").ToString.ToDate, Now.Date).ToString), DtResultados(0)("Edad").ToString))) + ListaTagsDocumentost.Add(New TagsDocumentos("{Edad}", If(DtResultados(0)("Edad").ToString = "", If(DtResultados(0)("FechaNacimiento").ToString = "", "", DateDiff(DateInterval.Year, DtResultados(0)("FechaNacimiento").ToString.ToDate, ClsPaginas.NowADS().Date).ToString), DtResultados(0)("Edad").ToString))) ListaTagsDocumentost.Add(New TagsDocumentos("{NombreTelEmergencia}", DtResultados(0)("NombreTelEmergencia").ToString)) ListaTagsDocumentost.Add(New TagsDocumentos("{TipoSangre}", DtResultados(0)("TipoSangre").ToString)) ListaTagsDocumentost.Add(New TagsDocumentos("{SubProyecto}", DtResultados(0)("SubProyecto").ToString)) @@ -7135,8 +7135,8 @@ Public Class ClsRH ListaTagsDocumentost.Add(New TagsDocumentos("{FechaNacimiento}", DtResultados(0)("FechaNacimiento").ToString.ToDate.ToString("dd/MM/yyyy"))) - Dim fechaActual As String = $" { Now.Day } de { MesTexto(Now.Month) } del año { Now.Year}" - Dim FechaActualDF As String = Now.ToString("dd/MM/yyyy") + Dim fechaActual As String = $" { ClsPaginas.NowADS().Day } de { MesTexto(ClsPaginas.NowADS().Month) } del año { ClsPaginas.NowADS().Year}" + Dim FechaActualDF As String = ClsPaginas.NowADS().ToString("dd/MM/yyyy") ListaTagsDocumentost.Add(New TagsDocumentos("{FechaActual}", fechaActual)) ListaTagsDocumentost.Add(New TagsDocumentos("{FechaActualDF}", FechaActualDF)) diff --git a/App_Code/ClsSisEmpresas.vb b/App_Code/ClsSisEmpresas.vb index 9e12c8c4c..7218f50ce 100644 --- a/App_Code/ClsSisEmpresas.vb +++ b/App_Code/ClsSisEmpresas.vb @@ -440,6 +440,8 @@ Public Class ClsSisEmpresas _Empresa.FielPassword = Data.Rows(0)("FielPassword").ToString _Empresa.FielPFX = Data.Rows(0)("FielPFX").ToString _Empresa._RutaArchivos = Data.Rows(0)("RutaArchivos").ToString + _Empresa.CveZonaHoraria = Data.Rows(0)("CveZonaHoraria").ToString.ToEntero + _Empresa.UTCOffset = Data.Rows(0)("UTCOffset").ToString.ToEntero Else 'Alert("No se encontró la Empresa solicitada.", TipoMensaje.MsgAdvertencia) @@ -467,7 +469,7 @@ Public Class ClsSisEmpresas CIEC As String, CvePlataforma As Integer, UsaAC As Boolean, PorDepreciacion As Decimal, Extension As String, Localidad As String, MetodoInventario As Integer, PeriodoActual As Integer, EjercicioActual As Integer, RH_DefaultAsistencias As Boolean, DiasPermitidos As Integer, TipoCentroCosto As Integer, RequiereCentroCosto As Boolean, PV_TerminalTipo As Integer, Optional CveMetodoPago As Integer = 0, Optional CvePAC As Integer = 0, - Optional RegistroCompleto As Boolean = False + Optional RegistroCompleto As Boolean = False, Optional CveZonaHoraria As Integer = -1 ) As Boolean Dim Retorno As Boolean = False @@ -562,6 +564,7 @@ Public Class ClsSisEmpresas .Add("@RequiereCentroCosto", SqlDbType.Bit).Value = RequiereCentroCosto .Add("@PV_TerminalTipo", SqlDbType.Int).Value = PV_TerminalTipo .Add("@Importe", SqlDbType.Decimal).Value = Importe + .Add("@CveZonaHoraria", SqlDbType.Int).Value = CveZonaHoraria End With @@ -593,7 +596,7 @@ Public Class ClsSisEmpresas Soporte_Server As String, Soporte_Puerto As Integer, Soporte_SSL As Boolean, Soporte_USR As String, Soporte_PWD As String, Soporte_Tipo As String, RegistroPatronal As String, AreaGeografica As String, NombreCorto As String, CURP As String, CveRegimenFiscal As Integer, CvePAC As Integer, Importe As Decimal, CIEC As String, CvePlataforma As Integer, UsaAC As Boolean, PorDepreciacion As Decimal, Extension As String, Localidad As String, MetodoInventario As Integer, - PeriodoActual As Integer, EjercicioActual As Integer, RH_DefaultAsistencias As Boolean, DiasPermitidos As Integer, TipoCentroCosto As Integer, RequiereCentroCosto As Boolean, PV_TerminalTipo As Integer) As Boolean + PeriodoActual As Integer, EjercicioActual As Integer, RH_DefaultAsistencias As Boolean, DiasPermitidos As Integer, TipoCentroCosto As Integer, RequiereCentroCosto As Boolean, PV_TerminalTipo As Integer, Optional CveZonaHoraria As Integer = -1) As Boolean Dim Retorno As Boolean = False @@ -685,6 +688,8 @@ Public Class ClsSisEmpresas .Add("@RequiereCentroCosto", SqlDbType.Bit).Value = RequiereCentroCosto .Add("@PV_TerminalTipo", SqlDbType.Int).Value = PV_TerminalTipo .Add("@Importe", SqlDbType.Decimal).Value = Importe + .Add("@CveZonaHoraria", SqlDbType.Int).Value = CveZonaHoraria + End With Try @@ -1423,7 +1428,7 @@ Public Class ClsSisEmpresas .Add("@AsuntoPlantilla", SqlDbType.VarChar).Value = NombreCampoBDAsuntoPlantilla .Add("@ValorAsuntoPlantilla", SqlDbType.NVarChar).Value = AsuntoValor .Add("@Plantilla", SqlDbType.VarChar).Value = NombreCampoBDPlantilla - .Add("@ValorPlantilla", SqlDbType.NVarChar).Value = HTMLValorPlantilla + .Add("@ValorPlantilla", SqlDbType.VarChar).Value = HTMLValorPlantilla .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa End With Try diff --git a/App_Code/ClsSisNotificaciones.vb b/App_Code/ClsSisNotificaciones.vb index a7169b443..26574baba 100644 --- a/App_Code/ClsSisNotificaciones.vb +++ b/App_Code/ClsSisNotificaciones.vb @@ -758,7 +758,7 @@ Public Class ClsSisNotificaciones ' RptParametro.Add(New ReportParameter("FechaInicio", RowParada("FechaInicio").ToString)) ' RptParametro.Add(New ReportParameter("FechaFin", RowParada("FechaNotificacion").ToString)) ' RptParametro.Add(New ReportParameter("UsuarioImprimio", RowParada("UsuarioImprimio").ToString)) - ' RptParametro.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToShortDateString)) + ' RptParametro.Add(New ReportParameter("FechaImpresion", NowADS().ToShortDateString)) ' RptParametro.Add(New ReportParameter("Grupo", RowParada("Grupo").ToString)) ' Dim RowRep As DataRow = ObjGPS.DtResultados.FiltroPrimero("TipoColumna=1") @@ -866,7 +866,7 @@ Public Class ClsSisNotificaciones RptParametro.Add(New ReportParameter("FechaFin", FechaF.ToShortDateString)) RptParametro.Add(New ReportParameter("MapaURL", "")) RptParametro.Add(New ReportParameter("UsuarioImprimio", Correos)) - RptParametro.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToShortDateString)) + RptParametro.Add(New ReportParameter("FechaImpresion", ClsPaginas.NowADS().ToShortDateString)) Retorno = StreamPDF(Liga, DataSource, RptParametro, "ReporteUltimaPosicion", "PDF", MR:=Nothing, RDSName:="DsOC") Catch ex As Exception @@ -920,7 +920,7 @@ Public Class ClsSisNotificaciones RptParametro.Add(New CrystalParametro("FechaInicio", FechaI.ToString)) RptParametro.Add(New CrystalParametro("FechaFin", FechaF.ToString)) RptParametro.Add(New CrystalParametro("UsuarioImprimio", Correos)) - RptParametro.Add(New CrystalParametro("FechaImpresion", DateTime.Now.ToShortDateString)) + RptParametro.Add(New CrystalParametro("FechaImpresion", ClsPaginas.NowADS().ToShortDateString)) If DataSource.Rows.Count > 0 Then RptParametro.Add(New CrystalParametro("KMRecorridos", $"{DataSource.Rows(0)("KMRecorridos")} KM")) Else @@ -1002,7 +1002,7 @@ Public Class ClsSisNotificaciones RptParametro.Add(New ReportParameter("FechaInicio", FechaI.ToString)) RptParametro.Add(New ReportParameter("FechaFin", FechaF.ToString)) RptParametro.Add(New ReportParameter("UsuarioImprimio", Correos)) - RptParametro.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToShortDateString)) + RptParametro.Add(New ReportParameter("FechaImpresion", ClsPaginas.NowADS().ToShortDateString)) Retorno = StreamPDF(Liga, DataSource, RptParametro, "ReporteIgnicion", "PDF", MR:=Nothing, RDSName:="DsOC") Catch ex As Exception @@ -1075,7 +1075,7 @@ Public Class ClsSisNotificaciones RptParametro.Add(New CrystalParametro("FechaInicio", FechaI.ToString)) RptParametro.Add(New CrystalParametro("FechaFin", FechaF.ToString)) RptParametro.Add(New CrystalParametro("UsuarioImprimio", Correos)) - RptParametro.Add(New CrystalParametro("FechaImpresion", DateTime.Now.ToShortDateString)) + RptParametro.Add(New CrystalParametro("FechaImpresion", ClsPaginas.NowADS().ToShortDateString)) RptParametro.Add(New CrystalParametro("TiempoMuerto", "10 Min")) Retorno = StreamPDFCrystal(Liga, DataSource, RptParametro, NombreReporte, "PDF") @@ -1120,7 +1120,7 @@ Public Class ClsSisNotificaciones RptParametro.Add(New ReportParameter("FechaInicio", FechaI.ToShortDateString)) RptParametro.Add(New ReportParameter("FechaFin", FechaF.ToShortDateString)) RptParametro.Add(New ReportParameter("UsuarioImprimio", Correos)) - RptParametro.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToShortDateString)) + RptParametro.Add(New ReportParameter("FechaImpresion", ClsPaginas.NowADS().ToShortDateString)) Retorno = StreamPDF(Liga, DataSource, RptParametro, "ReporteRalenti", "PDF", MR:=Nothing, RDSName:="DsOC") Catch ex As Exception @@ -1171,7 +1171,7 @@ Public Class ClsSisNotificaciones RptParametro.Add(New CrystalParametro("FechaInicio", FechaI.ToString)) RptParametro.Add(New CrystalParametro("FechaFin", FechaF.ToString)) RptParametro.Add(New CrystalParametro("UsuarioImprimio", Correos)) - RptParametro.Add(New CrystalParametro("FechaImpresion", DateTime.Now.ToShortDateString)) + RptParametro.Add(New CrystalParametro("FechaImpresion", ClsPaginas.NowADS().ToShortDateString)) Retorno = StreamPDFCrystal(Liga, DataSource, RptParametro, "ReporteEvento", "PDF") Catch ex As Exception @@ -1227,7 +1227,7 @@ Public Class ClsSisNotificaciones RptParametro.Add(New ReportParameter("FechaFin", FechaF.ToShortDateString)) RptParametro.Add(New ReportParameter("UsuarioImprimio", Correos)) RptParametro.Add(New ReportParameter("MapaURL", "")) - RptParametro.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToShortDateString)) + RptParametro.Add(New ReportParameter("FechaImpresion", ClsPaginas.NowADS().ToShortDateString)) Retorno = StreamPDF(Liga, DataSource, RptParametro, "ReporteGeoReferencias", "PDF", MR:=Nothing, RDSName:="DsOC") Catch ex As Exception @@ -1247,7 +1247,7 @@ Public Class ClsSisNotificaciones RptParametro.Add(New ReportParameter("FechaFin", FechaF.ToShortDateString)) RptParametro.Add(New ReportParameter("UsuarioImprimio", Correos)) RptParametro.Add(New ReportParameter("MapaURL", "")) - RptParametro.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToShortDateString)) + RptParametro.Add(New ReportParameter("FechaImpresion", ClsPaginas.NowADS().ToShortDateString)) Retorno = StreamPDF(Liga, DataSource, RptParametro, "ReportePuntosInteres", "PDF", MR:=Nothing, RDSName:="DsOC") Catch ex As Exception @@ -1709,7 +1709,7 @@ Public Class ClsSisNotificaciones .lat = Lat, .lng = Lng }, - .timestamp = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + .timestamp = ClsPaginas.NowADS().ToString("yyyy-MM-dd HH:mm:ss") } } } diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index 56877acac..cfa37b684 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -3387,7 +3387,7 @@ Public Class ClsVentas Dim Resp As RespuestaCancelacionSAT = ObjCancelacion.CFDICancelar(Usuario.Empresa, FolioFiscal, Total, RFCReceptor, Usuario.Empresa.RFC) If Resp.Verificado Then - If Not ObjVentas.UpdateEstatusFactura(5, FolioFiscal, ObjCancelacion.CancelacionAcuse, Now, PCveVenta.ToEntero, -1, CvePAC:=Usuario.Empresa.CvePAC) Then + If Not ObjVentas.UpdateEstatusFactura(5, FolioFiscal, ObjCancelacion.CancelacionAcuse, ClsPaginas.NowADS(), PCveVenta.ToEntero, -1, CvePAC:=Usuario.Empresa.CvePAC) Then CveVentasError.Add(PCveVenta.ToEntero) End If Else diff --git a/App_Code/Empresa.vb b/App_Code/Empresa.vb index f99639f53..ff38fa730 100644 --- a/App_Code/Empresa.vb +++ b/App_Code/Empresa.vb @@ -134,7 +134,9 @@ Public Class Empresa Public Property FielPassword As String Public Property FielPFX 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 Dim Funcionalidades As HybridDictionary 'HybridDictionary, no se puede serializar, por eso no es propiedad, y se utilizar el setfuncionalidad, para asignarle valor diff --git a/App_Code/LogicNominas.vb b/App_Code/LogicNominas.vb index 1bc6491c8..8d486b968 100644 --- a/App_Code/LogicNominas.vb +++ b/App_Code/LogicNominas.vb @@ -426,7 +426,7 @@ Public Class LogicNominas Dim otrp = New CFDINominaOtrosPagos With {.TipoOtroPago = Row("SATCveConcepto").ToString(), .Clave = Row("Codigo").ToString(), .Concepto = Row("Concepto").ToString(), .Importe = Row("Importe").ToString().ToDecimal().Abs(), .Subsidiocausado = Row("ImporteValor").ToString().ToDecimal().Abs()} If Row("SATCveConcepto").ToString().ToEntero() = 4 Then - otrp.ejercicio = DateTime.Now.Year - If(DateTime.Now.Month = 12, 0, 1) + otrp.ejercicio = ClsPaginas.NowADS().Year - If(ClsPaginas.NowADS().Month = 12, 0, 1) otrp.SaldoAFavor = Row("ImporteValor").ToString().ToDecimal().Abs() otrp.RemanenteSalFav = Row("ImporteValor").ToString().ToDecimal().Abs() - Row("Importe").ToString().ToDecimal().Abs() End If @@ -463,7 +463,7 @@ Public Class LogicNominas cfdi.Comprobante.Version = If(versionTimbre = VersionTimbradoEnum.Version4_0, "4.0", "3.3") cfdi.Comprobante.Serie = Serie cfdi.Comprobante.Folio = Folio - cfdi.Comprobante.Fecha = Now + cfdi.Comprobante.Fecha = ClsPaginas.NowADS() cfdi.Comprobante.SubTotal = subTotalDb 'cfdi.Nomina.TotalPercepciones.ToString().ToDecimal() + cfdi.Nomina.TotalOtrosPagos.ToString().ToDecimal() cfdi.Comprobante.Descuentos = cfdi.Nomina.TotalDeducciones.ToString().ToDecimal() diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb index 90eb33622..4ab7ac9a0 100644 --- a/App_Code/Modelos.vb +++ b/App_Code/Modelos.vb @@ -562,12 +562,12 @@ Namespace Modelos Me.MonedaSAT = ClsPaginas.GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", $"CveMoneda = {CveMoneda} ") Me.RefDocto = "" ' Me.CveMesa = -1 - Me.Fecha = Now + Me.Fecha = ClsPaginas.NowADS() Me.CvePrePoliza = -1 - Me.FechaPago = Now + Me.FechaPago = ClsPaginas.NowADS() Me.MotivoDescuento = "" Me.Observaciones = "" - Me.FechaEjecucion = Now + Me.FechaEjecucion = ClsPaginas.NowADS() Me.CveCondicionEntrega = -1 Me.CondicionEntrega = "" Me.NumeroCuenta = "" @@ -1292,12 +1292,12 @@ Namespace Modelos ObjFactura.CveMoneda = CveMoneda ObjFactura.Moneda = ClsPaginas.GlobalDTMonedas.FiltroPrimeroValor("Moneda", $"CveMoneda = {ObjFactura.CveMoneda} ") ObjFactura.MonedaSAT = ClsPaginas.GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", $"CveMoneda = {ObjFactura.CveMoneda}") - ObjFactura.TipoCambio = If(ObjFactura.CveMoneda = 1, 1, ClsPaginas.GlobalTipoCambio(Now).ToDecimal()) + ObjFactura.TipoCambio = If(ObjFactura.CveMoneda = 1, 1, ClsPaginas.GlobalTipoCambio(ClsPaginas.NowADS()).ToDecimal()) ObjFactura.TipoDocto = "Ing" ObjFactura.RefDocto = "" ObjFactura.Folio = -1 ObjFactura.Serie = "-1" - ObjFactura.Fecha = Now + ObjFactura.Fecha = ClsPaginas.NowADS() ObjFactura.CvePrePoliza = -1 ObjFactura.CveMetodoPago = 1 ObjFactura.MetodoPago = "Efectivo" @@ -2942,7 +2942,7 @@ Namespace Modelos Dim CveMovimiento As Integer = -1 Try Dim CveConceptoSalidaUsado As Integer = 45 - Dim tFecha As DateTime = Now + Dim tFecha As DateTime = ClsPaginas.NowADS() CveMovimiento = ObjInventario.AddMovimiento(CveAlmacenUsado, CveConceptoSalidaUsado, 1, tFecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, factura.CveVenta, factura.CveSubProyecto, CveActivoFijo:=-1, Guia:="", Observaciones:="", CvePersonal:=-1, CveCliente:=factura.CveCliente, CveClienteSucursal:=-1, Modulo:="M/CU") If CveMovimiento <= 0 Then @@ -3140,7 +3140,7 @@ Namespace Modelos Dim TCFluctuacion As Decimal = tipoCambio 'TOMA EL TC DE LA ULTIMA FLUCTUACION If ValorMultiplicador = -1 AndAlso esMesAnterior AndAlso UsuarioActual.Empresa.Funcionalidad(703) = "1" AndAlso ObjFactura.CveMoneda = 2 Then - Dim UltimaFluctuacion As ClsPaginas.MTipoCambioFluctuacion = ClsPaginas.GlobalTipoCambioUltimaFluctuacion(Now) + Dim UltimaFluctuacion As ClsPaginas.MTipoCambioFluctuacion = ClsPaginas.GlobalTipoCambioUltimaFluctuacion(ClsPaginas.NowADS()) If UsuarioActual.Empresa.Funcionalidad(703) = "1" AndAlso UltimaFluctuacion IsNot Nothing Then If UltimaFluctuacion.FechaFluctuacion <= FechaCancelacion Then @@ -4274,7 +4274,7 @@ Namespace Modelos End If ' GENERA EL MOVIMIENTO DE GARANTIA SI TIENE - If Not GenerarMovimientoGarantia(14, "Entrada Garantía", Now, factura, ObjAcum, ObjInventario, ObjConta) Then + If Not GenerarMovimientoGarantia(14, "Entrada Garantía", ClsPaginas.NowADS(), factura, ObjAcum, ObjInventario, ObjConta) Then OcurrioError = True End If @@ -4532,7 +4532,7 @@ Namespace Modelos Dim ContadorMovtosDetalles As Integer = 0 'Creamos el movimiento - Dim CveMovimientoInventario As Integer = ObjInventario.AddMovimiento(CveAlmacen, ConceptoEntrada, CveMoneda, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta, -1, -1, CveMovimientoRelacionado:=CveMovimientoRelacionado, Modulo:="Mod/M2") + Dim CveMovimientoInventario As Integer = ObjInventario.AddMovimiento(CveAlmacen, ConceptoEntrada, CveMoneda, ClsPaginas.NowADS(), -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta, -1, -1, CveMovimientoRelacionado:=CveMovimientoRelacionado, Modulo:="Mod/M2") If CveMovimientoInventario > 0 Then @@ -5061,7 +5061,7 @@ Namespace Modelos End If 'CANCELA FACTURA - If Month(factura.Fecha) = Month(Now) OrElse BanderaGeneraNC = True Then + If Month(factura.Fecha) = Month(ClsPaginas.NowADS()) OrElse BanderaGeneraNC = True Then If CancelarFactura(ObjVentas, ObjConta, ObjBancos) Then Obj.Add(factura) Else @@ -5069,7 +5069,7 @@ Namespace Modelos End If Else FacturaDevolucion.TipoDocto = "Egs" - FacturaDevolucion.Fecha = Now + FacturaDevolucion.Fecha = ClsPaginas.NowADS() If RegistrarNC(ObjVentas, ObjConta, ObjInventario, ObjContr, FacturaDevolucion, ObjBancos, TmpDTconceptos, ObjEventos) Then Obj.Add(FacturaDevolucion) Else @@ -5420,13 +5420,13 @@ Namespace Modelos CancelacionFecha = xmlAcuse.SelectSingleNode("Acuse").Attributes("Fecha").Value.ToDate() CveEstatus = 5 Else - CancelacionFecha = Now.Date + CancelacionFecha = ClsPaginas.NowADS().Date CancelacionAcuse = "" CveEstatus = 5 End If Catch ex As Exception GuardaLog(ex.ToString()) - CancelacionFecha = Now.Date + CancelacionFecha = ClsPaginas.NowADS().Date CancelacionAcuse = "" End Try @@ -5436,7 +5436,7 @@ Namespace Modelos If Resp.Verificado Then 'GENERAMOS EL ACUSE Y MANDAMOS MAIL DE CON EL ACUSE DE CANCELACIÓN If RequiereAceptacion Then - CancelacionFecha = Now.Date + CancelacionFecha = ClsPaginas.NowADS().Date CveEstatus = 20 Else CancelacionFecha = ObjCancelacion.CancelacionFecha @@ -5478,7 +5478,7 @@ Namespace Modelos CveEstatus = 20 ContinuarCancelacion = False RequiereAceptacion = True - CancelacionFecha = Now.Date + CancelacionFecha = ClsPaginas.NowADS().Date CancelacionAcuse = "" End If End If @@ -5491,7 +5491,7 @@ Namespace Modelos Else ObtenerAcuse = False ContinuarCancelacion = True - CancelacionFecha = Now.Date + CancelacionFecha = ClsPaginas.NowADS().Date CancelacionAcuse = "" 'VERICA SI YA SE TIENE EL ESTADO DE CANCELACION, PARA SABER SI REQUIERE ACEPTACION @@ -5502,7 +5502,7 @@ Namespace Modelos RequiereAceptacion = True End If Else - Dim diasTimbrado As Decimal = DateDiff(DateInterval.Day, ObjFactura.FechaCP, Now) + Dim diasTimbrado As Decimal = DateDiff(DateInterval.Day, ObjFactura.FechaCP, ClsPaginas.NowADS()) If ObjFactura.Total < 1000D OrElse diasTimbrado <= 1 OrElse ObjFactura.Cliente.RFC.Contiene("XAXX010101000", "XEXX010101000") Then RequiereAceptacion = False @@ -5517,7 +5517,7 @@ Namespace Modelos If Resp.Verificado Then 'GENERAMOS EL ACUSE Y MANDAMOS MAIL DE CON EL ACUSE DE CANCELACIÓN 'If Resp.cve Then - ' CancelacionFecha = Now.Date + ' CancelacionFecha = ClsPaginas.NowADS().Date ' CveEstatus = 20 'Else ' CancelacionFecha = ObjCancelacion.CancelacionFecha @@ -5534,16 +5534,16 @@ Namespace Modelos Return Retorno End If Else - CancelacionFecha = Now.Date + CancelacionFecha = ClsPaginas.NowADS().Date CancelacionAcuse = "" End If End If Else - CancelacionFecha = Now.Date + CancelacionFecha = ClsPaginas.NowADS().Date CancelacionAcuse = "" End If Else - CancelacionFecha = Now.Date + CancelacionFecha = ClsPaginas.NowADS().Date CancelacionAcuse = "" End If Catch ex As Exception @@ -5558,7 +5558,7 @@ Namespace Modelos End Try Else CveEstatus = CveEstatusFacturaAsignado - CancelacionFecha = If(IsDate(FechaCancelacion), FechaCancelacion, Now.ToString("dd/MM/yyyy")).ToDateTime() + CancelacionFecha = If(IsDate(FechaCancelacion), FechaCancelacion, ClsPaginas.NowADS().ToString("dd/MM/yyyy")).ToDateTime() CancelacionAcuse = AcuseCancelacion End If @@ -5794,7 +5794,7 @@ Namespace Modelos 'SI TIENE SALDO PENDIENTE POR DEVOLVER GENERA UN MOVIMIENTO DE DEVOLUCION If ObjFactura.SaldoAlmacen <> 0 Then 'SALIDA DE ALMACEN - SALIDA POR TRASPASO CUANDO ES REMISION - DEVOLUCION (SI ES TRASPASO Y TIENE CONTRATO NO HACE DEVOLUCIóN) - CveMovimientoDevolucion = ObjInventario.AddMovimiento(CveAlmacenMovimiento, CveConceptoMovimiento, 1, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta, -1, -1, Observaciones:="", Guia:="", CveContrato:=CveContrato, CveAlmacenDestino:=-1, CveMovimientoRelacionado:=CveMovimientoSalida, Modulo:="Mod/CV1") + CveMovimientoDevolucion = ObjInventario.AddMovimiento(CveAlmacenMovimiento, CveConceptoMovimiento, 1, ClsPaginas.NowADS(), -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta, -1, -1, Observaciones:="", Guia:="", CveContrato:=CveContrato, CveAlmacenDestino:=-1, CveMovimientoRelacionado:=CveMovimientoSalida, Modulo:="Mod/CV1") Folio = ObjInventario.Folio If CveMovimientoDevolucion > 0 Then @@ -5837,7 +5837,7 @@ Namespace Modelos End If If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa) Then - Dim Fecha As Date = Now + Dim Fecha As Date = ClsPaginas.NowADS() Dim CveCliente As Integer = ObjVentas.DtResultados(0)("CveCliente").ToString.ToEntero Dim ClienteNombre As String = ObjVentas.DtResultados(0)("ClienteNombre").ToString Dim SerieFolio As String = ObjVentas.DtResultados(0)("SerieFolio").ToString @@ -5890,7 +5890,7 @@ Namespace Modelos End If End If Else - ErrorCancelar = True + ErrorCancelar = True MensajeError = "Ocurrió un Error al ingresar las prepolizas" End If End If @@ -6025,7 +6025,7 @@ Namespace Modelos 'CANCELAR MOVIMIENTOS DE GARANTIA SI TIENE If Not ErrorCancelar AndAlso UsuarioActual.Empresa.Funcionalidad(531) = "1" Then - If Not GenerarMovimientoGarantia(15, "Salida Garantía", Now, ObjRemision, ObjAcum, ObjInventario, ObjConta) Then + If Not GenerarMovimientoGarantia(15, "Salida Garantía", ClsPaginas.NowADS(), ObjRemision, ObjAcum, ObjInventario, ObjConta) Then ErrorCancelar = True End If End If @@ -6134,7 +6134,7 @@ Namespace Modelos 'CANCELAR MOVIMIENTOS DE GARANTIA SI TIENE If Not ErrorCancelar AndAlso UsuarioActual.Empresa.Funcionalidad(531) = "1" Then - If Not GenerarMovimientoGarantia(15, "Salida Garantía", Now, ObjFactura, ObjAcum, ObjInventario, ObjConta) Then + If Not GenerarMovimientoGarantia(15, "Salida Garantía", ClsPaginas.NowADS(), ObjFactura, ObjAcum, ObjInventario, ObjConta) Then ErrorCancelar = True End If End If @@ -6297,7 +6297,7 @@ Namespace Modelos End If Else If Not ObjVentas.UpdateEstatusFactura(CveEstatus, FolioFiscal, CancelacionAcuse, CancelacionFecha, CveVenta, IDPoliza, CvePAC:=CvePACCancelacion, CveEstatusRefacturacion:=CveEstatusRefacturacion, - CveUsuarioCambiaEstatus:=UsuarioActual.CveUsuario, FechaCambioEstatus:=Now.ToString("yyyy-MM-dd HH:mm:ss.mmm"), CveMotivoCancelacion:=CveMotivoCancelacion, + CveUsuarioCambiaEstatus:=UsuarioActual.CveUsuario, FechaCambioEstatus:=ClsPaginas.NowADS().ToString("yyyy-MM-dd HH:mm:ss.mmm"), CveMotivoCancelacion:=CveMotivoCancelacion, MotivoCancelacion:=MotivoCancelacion, EstadoCancelacion:=EstadoCancelacion, CveEstadoCancelacion:=CveEstadoCancelacion, SelloSolicitudDigitalSAT:=SolicitudCancelacionAcuse) Then ErrorCancelar = True MensajeError = "Ocurrió un error al guardar el estatus de cancelación." @@ -6418,7 +6418,7 @@ Namespace Modelos Dim CveMovimientoRelacionadoVirtual As Integer = CveMovimiento If DtPSVirtual IsNot Nothing AndAlso DtPSVirtual.Rows.Count > 0 AndAlso CveAlmacenVirtual > 0 AndAlso CveConceptoMovimientoVirtual > 0 Then - CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, CveConceptoMovimientoVirtual, 1, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta, -1, -1, + CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, CveConceptoMovimientoVirtual, 1, ClsPaginas.NowADS(), -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta, -1, -1, Observaciones:="", Guia:="", CveMovimientoRelacionado:=CveMovimientoRelacionadoVirtual, Modulo:="Modelos/CancelarVirtual") If CveMovimientoVirtual > 0 Then @@ -6497,7 +6497,7 @@ Namespace Modelos Dim CveMovimientoRelacionadoVirtual As Integer = CveMovimientoDevolucion If DtPSVirtual IsNot Nothing AndAlso DtPSVirtual.Rows.Count > 0 AndAlso CveAlmacenVirtual > 0 AndAlso CveConceptoMovimientoVirtual > 0 Then - CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, CveConceptoMovimientoVirtual, 1, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta, -1, -1, + CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, CveConceptoMovimientoVirtual, 1, ClsPaginas.NowADS(), -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta, -1, -1, Observaciones:="", Guia:="", CveMovimientoRelacionado:=CveMovimientoRelacionadoVirtual, Modulo:="Modelos/CancelarVirtual") If CveMovimientoVirtual > 0 Then @@ -6585,11 +6585,11 @@ Namespace Modelos End If 'SALIDA GENERAL - CveMovimientoSalidaDevRem = ObjInventario.AddMovimiento(CveAlmacenDevolucion, 8, 1, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, DrMovtos("CveRem").ToString.ToEntero, -1, -1, Observaciones:="", Guia:="", CveContrato:=CveContrato, CveMovimientoRelacionado:=CveMovimiento, CveAlmacenDestino:=CveAlmacenTraspasoDestinoDevRem, Modulo:="Mod/ExAR1") + CveMovimientoSalidaDevRem = ObjInventario.AddMovimiento(CveAlmacenDevolucion, 8, 1, ClsPaginas.NowADS(), -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, DrMovtos("CveRem").ToString.ToEntero, -1, -1, Observaciones:="", Guia:="", CveContrato:=CveContrato, CveMovimientoRelacionado:=CveMovimiento, CveAlmacenDestino:=CveAlmacenTraspasoDestinoDevRem, Modulo:="Mod/ExAR1") FolioMovimientoSalidaDevRem = ObjInventario.Folio 'ENTRADA ADELANTADO - CveMovimientoEntradaDevRem = ObjInventario.AddMovimiento(CveAlmacenTraspasoDestinoDevRem, 9, 1, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, DrMovtos("CveRem").ToString.ToEntero, -1, -1, Observaciones:="", Guia:="", CveContrato:=CveContrato, CveMovimientoRelacionado:=CveMovimientoSalidaDevRem, CveAlmacenDestino:=CveAlmacenDevolucion, Modulo:="Mod/ExAR2") + CveMovimientoEntradaDevRem = ObjInventario.AddMovimiento(CveAlmacenTraspasoDestinoDevRem, 9, 1, ClsPaginas.NowADS(), -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, DrMovtos("CveRem").ToString.ToEntero, -1, -1, Observaciones:="", Guia:="", CveContrato:=CveContrato, CveMovimientoRelacionado:=CveMovimientoSalidaDevRem, CveAlmacenDestino:=CveAlmacenDevolucion, Modulo:="Mod/ExAR2") FolioMovimientoEntradaDevRem = ObjInventario.Folio If Not (CveMovimientoSalidaDevRem > 0 And CveMovimientoEntradaDevRem > 0) Then @@ -6666,7 +6666,7 @@ Namespace Modelos Dim CveMovimientoEntradaDevRem As Integer = 0 Dim FolioMovimientoEntradaDevRem As Integer = 0 - Dim Fecha As DateTime = Now + Dim Fecha As DateTime = ClsPaginas.NowADS() 'SALIDA DE (ENTREGA POR ADELANTADO) CveMovimientoSalidaDevRem = ObjInventario.AddMovimiento(CveAlmacen, 8, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveRemision, -1, -1, Observaciones:="", Guia:="", CveContrato:=CveContrato, CveAlmacenDestino:=CveAlmacenDestino, Modulo:="Mod/CancExAR1") @@ -6773,7 +6773,7 @@ Namespace Modelos For Each Dr As DataRow In DtTempApartados.Rows If CveMovimientoSalidaApartado = -1 Or CveAlmacenApartado <> Dr("CveAlmacen").ToString.ToEntero Then - CveMovimientoSalidaApartado = ObjInventario.AddMovimiento(CveAlmacenOrigen, 8, 1, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta, -1, -1, Observaciones:="", Guia:="", CveContrato:=CveContrato, CveVendedor:=1, CveCliente:=CveCliente, CveAlmacenDestino:=Dr("CveAlmacen").ToString.ToEntero, Modulo:="Mod/Apar1") + CveMovimientoSalidaApartado = ObjInventario.AddMovimiento(CveAlmacenOrigen, 8, 1, ClsPaginas.NowADS(), -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta, -1, -1, Observaciones:="", Guia:="", CveContrato:=CveContrato, CveVendedor:=1, CveCliente:=CveCliente, CveAlmacenDestino:=Dr("CveAlmacen").ToString.ToEntero, Modulo:="Mod/Apar1") FolioSalida = ObjInventario.Folio CveAlmacenApartado = Dr("CveAlmacen").ToString.ToEntero @@ -6800,7 +6800,7 @@ Namespace Modelos For Each Dr1 As DataRow In DtTraspasos.Rows CveMovimientoSalida = Dr1("CveMovimientoSalida").ToString.ToEntero - CveMovimientoEntradaApartado = ObjInventario.AddMovimiento(Dr1("CveAlmacen").ToString.ToEntero, 9, 1, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta, -1, -1, Observaciones:="", CveAlmacenDestino:=CveAlmacenDevolucion, CveMovimientoRelacionado:=CveMovimientoSalida, Guia:="", CveContrato:=CveContrato, CveVendedor:=-1, CveCliente:=CveCliente, Modulo:="Mod/Apar2") + CveMovimientoEntradaApartado = ObjInventario.AddMovimiento(Dr1("CveAlmacen").ToString.ToEntero, 9, 1, ClsPaginas.NowADS(), -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta, -1, -1, Observaciones:="", CveAlmacenDestino:=CveAlmacenDevolucion, CveMovimientoRelacionado:=CveMovimientoSalida, Guia:="", CveContrato:=CveContrato, CveVendedor:=-1, CveCliente:=CveCliente, Modulo:="Mod/Apar2") FolioEntrada = ObjInventario.Folio If Not CveMovimientoEntradaApartado > 0 Then @@ -6859,7 +6859,7 @@ Namespace Modelos End If - CvePrePoliza = ObjConta.AddPrePolizas("Modelos/GuardaEstatus", CvePlantillaPoliza, Me.Total, Me.Total, Me.CveMoneda, Now, Me.Cliente.NombreComercial, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + CvePrePoliza = ObjConta.AddPrePolizas("Modelos/GuardaEstatus", CvePlantillaPoliza, Me.Total, Me.Total, Me.CveMoneda, ClsPaginas.NowADS(), Me.Cliente.NombreComercial, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) FacturaDevolucion.CveVenta = CveVenta FacturaDevolucion.CvePrePoliza = CvePrePoliza @@ -6879,7 +6879,7 @@ Namespace Modelos If CveEstatus = 4 Then - If ObjVentas.UpdateEstatusFactura(CveEstatus, FolioFiscal, "", Now, CveVenta, IDPoliza) Then + If ObjVentas.UpdateEstatusFactura(CveEstatus, FolioFiscal, "", ClsPaginas.NowADS(), CveVenta, IDPoliza) Then Mensaje = "El nuevo estatus se guardó correctamente" Else ErrorCancelar = True @@ -6901,7 +6901,7 @@ Namespace Modelos Dim Total As Decimal = Me.Total Dim RFCReceptor As String = Me.Cliente.RFC - If Not ObjVentas.UpdateEstatusFactura(13, FolioFiscal, "", Now, CveVenta, IDPoliza) Then 'Marcamos la factura como refacturada, si no se cancelo en el SAT el estatus nos dejara cancelarla despues + If Not ObjVentas.UpdateEstatusFactura(13, FolioFiscal, "", ClsPaginas.NowADS(), CveVenta, IDPoliza) Then 'Marcamos la factura como refacturada, si no se cancelo en el SAT el estatus nos dejara cancelarla despues ErrorCancelar = True End If @@ -6920,7 +6920,7 @@ Namespace Modelos 'End If If Not ErrorCancelar Then - If ObjVentas.UpdateEstatusFactura(CveEstatus, FolioFiscal, ObjCancelacion.CancelacionAcuse, Now, CveVenta, IDPoliza, CvePAC:=UsuarioActual.Empresa.CvePAC) Then + If ObjVentas.UpdateEstatusFactura(CveEstatus, FolioFiscal, ObjCancelacion.CancelacionAcuse, ClsPaginas.NowADS(), CveVenta, IDPoliza, CvePAC:=UsuarioActual.Empresa.CvePAC) Then Mensaje = "El nuevo estatus se guardó correctamente" Else ErrorCancelar = True @@ -7007,7 +7007,7 @@ Namespace Modelos ' Else ' Dim DTPresupuestoIngresos As New DataTable ' Dim AC As New ClsAC - ' If AC.GetPresupuestoIngresos(-1, Now.Year, True, UsuarioActual.CveEmpresa) Then + ' If AC.GetPresupuestoIngresos(-1, ClsPaginas.NowADS().Year, True, UsuarioActual.CveEmpresa) Then ' DTPresupuestoIngresos = AC.DtResultados.Copy() ' End If ' AC.Dispose() @@ -7202,7 +7202,7 @@ Namespace Modelos Public ReadOnly Property FechaCP As DateTime Get If Me.SubProyecto IsNot Nothing Then - If Now.EsHorarioVerano Then + If ClsPaginas.NowADS().EsHorarioVerano Then Return DateTime.UtcNow.AddHours(Me.SubProyecto.UTCOffsetVerano) Else Return DateTime.UtcNow.AddHours(Me.SubProyecto.UTCOffsetInvierno) diff --git a/App_Code/Thalamus.vb b/App_Code/Thalamus.vb index a8a3c4468..a5dcde4ca 100644 --- a/App_Code/Thalamus.vb +++ b/App_Code/Thalamus.vb @@ -16,7 +16,7 @@ Public Class Thalamus Public Function GenerarArchivos(CveEmpresa As Integer) As Boolean - Dim RutaArchivoVentas As String = $"C:\Temp\Ventas{Now.ToString("yyyyMMdd")}.xlsx" + Dim RutaArchivoVentas As String = $"C:\Temp\Ventas{ClsPaginas.NowADS().ToString("yyyyMMdd")}.xlsx" Dim DTVentas As New DataTable DTVentas.Columns.Add("systemId") @@ -34,7 +34,7 @@ Public Class Thalamus dr(0) = $"systemId {x}" dr(1) = $"Branch {x}" dr(2) = $"{x}" - dr(3) = $"{Now.ToString("yyyy-MM-dd")}" + dr(3) = $"{ClsPaginas.NowADS().ToString("yyyy-MM-dd")}" dr(4) = $"{x}" dr(5) = $"{x}.00" dr(6) = $"{x}" diff --git a/App_Code/Timbrado.vb b/App_Code/Timbrado.vb index b3f1d81d6..567b98f93 100644 --- a/App_Code/Timbrado.vb +++ b/App_Code/Timbrado.vb @@ -298,7 +298,7 @@ Public Class Timbrado MsgCancelacion.AppendFormat("-3.2") Dim resultadoCancelacion As Profact.TimbraCFDI.ResultadoCancelacionAck resultadoCancelacion = conector.CancelaCFDIAck40(RFCEmisor, FolioFiscal, CodigoSATMotivoCancelacion, FolioSustitucion) - CancelacionFecha = Now + CancelacionFecha = ClsPaginas.NowADS() resp = conector.ObtieneCFDI(RFCEmisor, FolioFiscal) MsgCancelacion.AppendFormat("-3.3") @@ -408,7 +408,7 @@ Public Class Timbrado End Try #End Region objCan.CancelacionCfdi = True - objCan.FechaCancelacion = System.DateTime.Now.AddMinutes(-120) ' operación requerida para que no se presente problemas con fechas adelantadas del PAC + objCan.FechaCancelacion = ClsPaginas.NowADS().AddMinutes(-120) ' operación requerida para que no se presente problemas con fechas adelantadas del PAC MsgCancelacion.AppendFormat("4.3-") objCan.GeneraCancelacionB64(certBase64, llaveBase64, Clave, FolioFiscal, CodigoSATMotivoCancelacion, FolioSustitucion) If (objCan.MensajeError = "") Then @@ -504,7 +504,7 @@ Public Class Timbrado If cancelacion IsNot Nothing Then 'EN PROCESO, CANCELABLE SIN ACEPTACION,CANCEALDO PREVIAMENTE If cancelacion.codigo.Contiene("96", "201", "202") Then - CancelacionFecha = Now + CancelacionFecha = ClsPaginas.NowADS() CancelacionAcuse = result.acuseCancelBase64 Retorno.Verificado = True @@ -3330,8 +3330,8 @@ Public Class Timbrado Dim ArchivoW As StreamWriter Dim strLineaTMP As String - ' strLineaTMP = Chr(13) & Chr(10) & Day(Now) & "/" & Month(Now) & "/" & Year(Now) & " " & Hour(Now) & ":" & Minuto & ". " & Str & Chr(13) & Chr(10) - strLineaTMP = String.Format("{0}{1} .. PAC: {2} - {3} ..{4}:{5}", Chr(13), Chr(10), CvePAC, Str, DateTime.Now.ToShortDateString, DateTime.Now.ToShortTimeString) + ' strLineaTMP = Chr(13) & Chr(10) & Day(NowADS()) & "/" & Month(NowADS()) & "/" & Year(NowADS()) & " " & Hour(NowADS()) & ":" & Minuto & ". " & Str & Chr(13) & Chr(10) + strLineaTMP = String.Format("{0}{1} .. PAC: {2} - {3} ..{4}:{5}", Chr(13), Chr(10), CvePAC, Str, ClsPaginas.NowADS().ToShortDateString, ClsPaginas.NowADS().ToShortTimeString) Try ArchivoW = New StreamWriter(String.Format("{0}\LogTimbrado.txt", AppDomain.CurrentDomain.BaseDirectory), True, System.Text.Encoding.UTF8) Catch ex As UnauthorizedAccessException diff --git a/App_Code/Timbres.vb b/App_Code/Timbres.vb index 70a2d5346..ceee944a6 100644 --- a/App_Code/Timbres.vb +++ b/App_Code/Timbres.vb @@ -56,9 +56,9 @@ Public Class Timbres ObjFactura.TipoDocto = TipoDocto ObjFactura.TipoComprobante = "T" - ObjFactura.Fecha = Now - ObjFactura.FechaPago = Now - ObjFactura.FechaEjecucion = Now + ObjFactura.Fecha = ClsPaginas.NowADS() + ObjFactura.FechaPago = ClsPaginas.NowADS() + ObjFactura.FechaEjecucion = ClsPaginas.NowADS() ObjFactura.UsuarioCreo = UsuarioActual.Usuario ObjFactura.TipoDocumento = "Traspaso" diff --git a/App_Code/Usuario.vb b/App_Code/Usuario.vb index 4cc510cf0..a0adb072c 100644 --- a/App_Code/Usuario.vb +++ b/App_Code/Usuario.vb @@ -71,9 +71,9 @@ Public Class Usuario Public ReadOnly Property FechaActualCliente As DateTime Get If UTCOffset <> 0 Then - FechaActualCliente = DateTime.Now.AddMinutes(UTCOffset + 10) + FechaActualCliente = ClsPaginas.NowADS().AddMinutes(UTCOffset + 10) Else - FechaActualCliente = DateTime.Now + FechaActualCliente = ClsPaginas.NowADS() End If End Get End Property @@ -256,10 +256,10 @@ Namespace ADSSession If Not IsNothing(HttpContext.Current) AndAlso Not IsNothing(HttpContext.Current.Session) AndAlso Not IsNothing(HttpContext.Current.Session(strsessionid)) Then obj = DirectCast(HttpContext.Current.Session(strsessionid), ADSSessionObj) obj.Modulo = modulo - obj.LastPostback = DateTime.Now + obj.LastPostback = ClsPaginas.NowADS() If _dicSessionobj.TryGetValue(obj.SessionID, obj) Then obj.Modulo = modulo - obj.LastPostback = DateTime.Now + obj.LastPostback = ClsPaginas.NowADS() End If retorno = obj End If @@ -321,7 +321,7 @@ Namespace ADSSession Public Sub New(CveUsuario As Integer, CveEmpresa As Integer) Me.CveUsuario = CveUsuario Me.CveEmpresa = CveEmpresa - FechaLogin = DateTime.Now + FechaLogin = ClsPaginas.NowADS() _SessionID = "" _ipAdrres = "" Try diff --git a/App_Code/WS/WSSIGVentas.vb b/App_Code/WS/WSSIGVentas.vb index 981381e7c..6aa25860c 100644 --- a/App_Code/WS/WSSIGVentas.vb +++ b/App_Code/WS/WSSIGVentas.vb @@ -24,8 +24,8 @@ Namespace SIG Dim respuesta As Data.DataTable = Nothing 'New With {.Correcto = False, .Mensaje = "", .Datos = New JObject} Dim CveCliente As Integer = -1 - Dim FechaI As DateTime = DateTime.Now - Dim FechaF As DateTime = DateTime.Now + Dim FechaI As DateTime = ClsPaginas.NowADS() + Dim FechaF As DateTime = ClsPaginas.NowADS() Dim CveIE As Integer = -1 Dim CveVenta As Integer = -1 Dim opcion As Integer = -1 @@ -67,7 +67,7 @@ Namespace SIG respuesta.AcceptChanges() Dim thencommit As Boolean = True Banco.IniciaTransacSQL() - If Banco.AddComplementoPagosSinc(CveUsuario, DateTime.Now.ToString("yyyy/MM/dd"), CveEmpresa) Then + If Banco.AddComplementoPagosSinc(CveUsuario, ClsPaginas.NowADS().ToString("yyyy/MM/dd"), CveEmpresa) Then Dim CveComplementoPagoSinc As Integer = Banco.DtResultados.Rows(0)("CveComplementoPagoSinc").ToString().ToEntero() For Each dr As System.Data.DataRow In respuesta.Select("CveVenta Is NULL") 'CveComplementoPagoTimbre = Banco.AddComplementoPago(dr("CveIE").ToString().ToEntero(), -1, Serie, Folio, Me.CveUsuario, CveEmpresa, CvePrePoliza:=-1, Estatus:=1) diff --git a/App_Code/WS/WSUSer.vb b/App_Code/WS/WSUSer.vb index c6a207031..9f8f2f502 100644 --- a/App_Code/WS/WSUSer.vb +++ b/App_Code/WS/WSUSer.vb @@ -25,7 +25,7 @@ Namespace SIG DateTime.TryParseExact(String.Format("{0} {1}", dataArray(2), dataArray(3)), "ddMMyyyy HHmm", New Globalization.CultureInfo("es-MX"), Globalization.DateTimeStyles.None, FechaPeticion) Dim CveEmpresa As Integer = dataArray(4).ToEntero() - Dim diferencia As Double = (FechaPeticion - DateTime.Now).TotalMinutes + Dim diferencia As Double = (FechaPeticion - ClsPaginas.NowADS()).TotalMinutes Token = diferencia.ToString("N0").ToEntero() End If End If diff --git a/App_Code/WS/WsUtility.vb b/App_Code/WS/WsUtility.vb index f5cd97649..df875f411 100644 --- a/App_Code/WS/WsUtility.vb +++ b/App_Code/WS/WsUtility.vb @@ -25,7 +25,7 @@ ' FechaPeticion = FechaPeticion.AddMinutes(Token) ' Dim CveEmpresa As Integer = dataArray(4) - ' Dim diferencia As Integer = Math.Abs((FechaPeticion - DateTime.Now).TotalMinutes) + ' Dim diferencia As Integer = Math.Abs((FechaPeticion - NowADS()).TotalMinutes) ' If diferencia < 30 Then ' noautorizado = False ' End If diff --git a/App_Code/WsSIGWeb.vb b/App_Code/WsSIGWeb.vb index cee8000b4..d2c3bfe73 100644 --- a/App_Code/WsSIGWeb.vb +++ b/App_Code/WsSIGWeb.vb @@ -19,7 +19,7 @@ Public Class WsSIGWeb End Function Private Function notcurrentdate(fecha As DateTime) As Boolean - Return Not (fecha > (DateTime.Now).AddMinutes(-15) And fecha < (DateTime.Now).AddMinutes(15)) + Return Not (fecha > (ClsPaginas.NowADS()).AddMinutes(-15) And fecha < (ClsPaginas.NowADS()).AddMinutes(15)) End Function diff --git a/App_Code/modExtensiones.vb b/App_Code/modExtensiones.vb index 0f5df56a9..644e8ed38 100644 --- a/App_Code/modExtensiones.vb +++ b/App_Code/modExtensiones.vb @@ -297,8 +297,8 @@ Namespace Extensiones End If Catch End Try - ' strLineaTMP = Chr(13) & Chr(10) & Day(Now) & "/" & Month(Now) & "/" & Year(Now) & " " & Hour(Now) & ":" & Minuto & ". " & Str & Chr(13) & Chr(10) - strLineaTMP = String.Format("{0}{1}Log: {5}{2}{3}:{4}", Chr(13), Chr(10), Str, DateTime.Now.ToShortDateString, DateTime.Now.ToShortTimeString, Urlstring) + ' strLineaTMP = Chr(13) & Chr(10) & Day(NowADS()) & "/" & Month(NowADS()) & "/" & Year(NowADS()) & " " & Hour(NowADS()) & ":" & Minuto & ". " & Str & Chr(13) & Chr(10) + strLineaTMP = String.Format("{0}{1}Log: {5}{2}{3}:{4}", Chr(13), Chr(10), Str, ClsPaginas.NowADS().ToShortDateString, ClsPaginas.NowADS().ToShortTimeString, Urlstring) Try ArchivoW = New StreamWriter(String.Format("{0}\Log\Log.txt", AppDomain.CurrentDomain.BaseDirectory), True, System.Text.Encoding.UTF8) Catch ex As UnauthorizedAccessException @@ -326,7 +326,7 @@ Namespace Extensiones Public Sub GuardaLogAD(Mensaje As String, Optional Archivo As String = "Log") Dim ArchivoW As StreamWriter - Dim MensajeFormato = String.Format("{0}{1}Log: {2} | Fecha:{3}", Chr(13), Chr(10), Mensaje, Now.ToString("dd/MM/yyyy HH:mm")) + Dim MensajeFormato = String.Format("{0}{1}Log: {2} | Fecha:{3}", Chr(13), Chr(10), Mensaje, ClsPaginas.NowADS().ToString("dd/MM/yyyy HH:mm")) Try ArchivoW = New StreamWriter(String.Format("{0}\Log\{1}.txt", AppDomain.CurrentDomain.BaseDirectory, Archivo), True, System.Text.Encoding.UTF8) @@ -352,7 +352,7 @@ Namespace Extensiones Dim strLineaTMP As String - strLineaTMP = String.Format("{0} {0}{3}{2}:{1}{0}", Chr(13), DateTime.Now.ToShortDateString, DateTime.Now.ToShortTimeString, pTexto) + strLineaTMP = String.Format("{0} {0}{3}{2}:{1}{0}", Chr(13), ClsPaginas.NowADS().ToShortDateString, ClsPaginas.NowADS().ToShortTimeString, pTexto) Try ArchivoW = New StreamWriter(String.Format("{0}\Log\Log.txt", AppDomain.CurrentDomain.BaseDirectory), True, System.Text.Encoding.UTF8) Catch ex As Exception @@ -372,7 +372,7 @@ Namespace Extensiones Public Sub GuardaLogMail(pTexto As String) Dim ArchivoW As StreamWriter Dim strLineaTMP As String - strLineaTMP = String.Format("{0} {1}:{2} {3} {0}", Chr(13), DateTime.Now.ToShortDateString, DateTime.Now.ToShortTimeString, pTexto) + strLineaTMP = String.Format("{0} {1}:{2} {3} {0}", Chr(13), ClsPaginas.NowADS().ToShortDateString, ClsPaginas.NowADS().ToShortTimeString, pTexto) Try ArchivoW = New StreamWriter(String.Format("{0}\Log\LogMail.txt", AppDomain.CurrentDomain.BaseDirectory), True, System.Text.Encoding.UTF8) Catch ex As Exception @@ -391,8 +391,8 @@ Namespace Extensiones Dim ArchivoW As StreamWriter Dim strLineaTMP As String - ' strLineaTMP = Chr(13) & Chr(10) & Day(Now) & "/" & Month(Now) & "/" & Year(Now) & " " & Hour(Now) & ":" & Minuto & ". " & Str & Chr(13) & Chr(10) - strLineaTMP = String.Format("{0}{1} .. PAC: {2} - Modulo: {3} ..{4}:{5}", Chr(13), Chr(10), CvePAC, Modulo, Str, DateTime.Now.ToShortDateString, DateTime.Now.ToShortTimeString) + ' strLineaTMP = Chr(13) & Chr(10) & Day(NowADS()) & "/" & Month(NowADS()) & "/" & Year(NowADS()) & " " & Hour(NowADS()) & ":" & Minuto & ". " & Str & Chr(13) & Chr(10) + strLineaTMP = String.Format("{0}{1} .. PAC: {2} - Modulo: {3} ..{4}:{5}", Chr(13), Chr(10), CvePAC, Modulo, Str, ClsPaginas.NowADS().ToShortDateString, ClsPaginas.NowADS().ToShortTimeString) Try ArchivoW = New StreamWriter(String.Format("{0}\Log\LogTimbrado.txt", AppDomain.CurrentDomain.BaseDirectory), True, System.Text.Encoding.UTF8) Catch ex As UnauthorizedAccessException @@ -414,7 +414,7 @@ Namespace Extensiones Public Sub GuardaLogCancelacionSAT(pTexto As String) Dim ArchivoW As StreamWriter Dim strLineaTMP As String - strLineaTMP = String.Format("{0} {1}:{2} {3} {0}", Chr(13), DateTime.Now.ToShortDateString, DateTime.Now.ToShortTimeString, pTexto) + strLineaTMP = String.Format("{0} {1}:{2} {3} {0}", Chr(13), ClsPaginas.NowADS().ToShortDateString, ClsPaginas.NowADS().ToShortTimeString, pTexto) Try ArchivoW = New StreamWriter(String.Format("{0}\Log\LogCancelacionSAT.txt", AppDomain.CurrentDomain.BaseDirectory), True, System.Text.Encoding.UTF8) @@ -458,7 +458,7 @@ Namespace Extensiones If System.Web.HttpContext.Current IsNot Nothing AndAlso System.Web.HttpContext.Current.CurrentHandler IsNot Nothing AndAlso System.Web.HttpContext.Current.CurrentHandler.GetType().IsSubclassOf(GetType(Page)) Then Dim Titulo As String = "" - Dim Plus As String = DateTime.Now.Ticks.ToString + Dim Plus As String = ClsPaginas.NowADS().Ticks.ToString Dim headerclas As String = "" Dim showalert = True @@ -545,7 +545,7 @@ Namespace Extensiones script = String.Format("alertatoast({3},'{0}',function(){{{1}}},{2});", Mensaje, JSBtnAceptar, TimeoutToast, DirectCast(pOpcion, Integer)) End If - ScriptManager.RegisterStartupScript(Pag, Pag.GetType(), String.Format("Alert{0}", (DateTime.Now.Ticks + 1).ToString()), script, True) + ScriptManager.RegisterStartupScript(Pag, Pag.GetType(), String.Format("Alert{0}", (ClsPaginas.NowADS().Ticks + 1).ToString()), script, True) Pag = Nothing Catch ex As Exception Mensaje.GuardaLog(String.Format("Error Alert : {0}", Mensaje)) @@ -561,7 +561,7 @@ Namespace Extensiones If System.Web.HttpContext.Current IsNot Nothing AndAlso System.Web.HttpContext.Current.CurrentHandler IsNot Nothing Then Dim Img, Botones As String Dim Titulo As String - Dim Plus As String = DateTime.Now.Ticks.ToString + Dim Plus As String = ClsPaginas.NowADS().Ticks.ToString Mensaje = Mensaje.Replace("'"c, "\'").Replace(vbCrLf, "") JSBtnAceptar = JSBtnAceptar.Replace("'"c, "\'") @@ -587,8 +587,8 @@ Namespace Extensiones Try Dim Pag As Page = DirectCast(System.Web.HttpContext.Current.CurrentHandler, Page) - 'ScriptManager.RegisterStartupScript(Pag, Pag.GetType(), (DateTime.Now.Ticks + 1).ToString(), "MuestraAlert('" & Alerta.ToString() & "', '" & Plus & "');", True) - ScriptManager.RegisterStartupScript(Pag, Pag.GetType(), (DateTime.Now.Ticks + 1).ToString(), String.Format("MuestraAlerta('{0}','{1}','{2}','{3}','{4}');", Titulo, Mensaje, Img, Botones, JSBtnAceptar), True) + 'ScriptManager.RegisterStartupScript(Pag, Pag.GetType(), (NowADS().Ticks + 1).ToString(), "MuestraAlert('" & Alerta.ToString() & "', '" & Plus & "');", True) + ScriptManager.RegisterStartupScript(Pag, Pag.GetType(), (ClsPaginas.NowADS().Ticks + 1).ToString(), String.Format("MuestraAlerta('{0}','{1}','{2}','{3}','{4}');", Titulo, Mensaje, Img, Botones, JSBtnAceptar), True) Pag = Nothing Catch ex As Exception @@ -1782,7 +1782,7 @@ Namespace Extensiones Public Sub GeneraChequePDF(pCveIE As Integer, tEmpresa As Empresa, Optional IDPoliza As Integer = -1, Optional MuestraAlert As Boolean = True) Dim Folio, Observacion, UsuarioRegistro, TextoImporte, PagueseA, Ruta, Banco, NumCuenta, AbonoCuenta, SubProyecto, NotificarA, RefCrediproveedor As String - Dim FechaExpedicion As Date = Now + Dim FechaExpedicion As Date = ClsPaginas.NowADS() Dim Importe As Double Dim tCveEmpresa As Integer = tEmpresa.CveEmpresa Dim CveTipoTransaccion, CveProveedor, CvePersonal As Integer @@ -2100,7 +2100,7 @@ Namespace Extensiones worksheet.Rows(IndexEndTable + 1).Cells(1).Value = Usuario.Nombre worksheet.Rows(IndexEndTable).Cells(3).Value = "Fecha Impresión" - worksheet.Rows(IndexEndTable + 1).Cells(3).Value = DateTime.Now.ToString("dd/MM/yyyy") + worksheet.Rows(IndexEndTable + 1).Cells(3).Value = ClsPaginas.NowADS().ToString("dd/MM/yyyy") Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", Usuario.Empresa.Ruta)) @@ -2430,7 +2430,7 @@ Namespace Extensiones worksheet.Rows(IndexEndTable + 1).Cells(2).Value = Usuario.Nombre worksheet.Rows(IndexEndTable).Cells(6).Value = "Fecha Impresión" - worksheet.Rows(IndexEndTable + 1).Cells(6).Value = DateTime.Now.ToString("dd/MM/yyyy") + worksheet.Rows(IndexEndTable + 1).Cells(6).Value = ClsPaginas.NowADS().ToString("dd/MM/yyyy") Dim Imagen As New System.IO.FileInfo($"{Usuario.Empresa.Ruta}/Logo.png") @@ -2523,7 +2523,7 @@ Namespace Extensiones worksheet.Rows(IndexEndTable + 1).Cells(2).Value = Usuario.Nombre worksheet.Rows(IndexEndTable).Cells(6).Value = "Fecha Impresión" - worksheet.Rows(IndexEndTable + 1).Cells(6).Value = DateTime.Now.ToString("dd/MM/yyyy") + worksheet.Rows(IndexEndTable + 1).Cells(6).Value = ClsPaginas.NowADS().ToString("dd/MM/yyyy") Dim Imagen As New System.IO.FileInfo($"{Usuario.Empresa.Ruta}/Logo.png") @@ -2889,7 +2889,7 @@ Namespace Extensiones If fechaI IsNot Nothing Or fechaF IsNot Nothing Then table.AddCell(New Element.Paragraph(String.Format("Inicio: {0} Fin: {1}", fechaI, fechaF)).SetFontSize(10)) Else - table.AddCell(New Element.Paragraph(String.Format("Fecha: {0}", Now.ToString("dd/MM/yyyy HH:mm"))).SetFontSize(10)) + table.AddCell(New Element.Paragraph(String.Format("Fecha: {0}", ClsPaginas.NowADS().ToString("dd/MM/yyyy HH:mm"))).SetFontSize(10)) End If document.Add(Borderless(table)) 'FIN ENCABEZADO @@ -2905,7 +2905,7 @@ Namespace Extensiones 'SECCIÓN PIE REPORTE table = New Element.Table(UnitValue.CreatePercentArray(New Single() {2, 1.25})) table.AddCell(New Element.Paragraph("Usuario imprimió: " + usuario.Nombre).SetFontSize(9)) - table.AddCell(New Element.Paragraph("Fecha de impresión: " + Now.ToString("dd/MM/yyyy")).SetTextAlignment(TextAlignment.RIGHT).SetFontSize(9)) + table.AddCell(New Element.Paragraph("Fecha de impresión: " + ClsPaginas.NowADS().ToString("dd/MM/yyyy")).SetTextAlignment(TextAlignment.RIGHT).SetFontSize(9)) document.Add(Borderless(table)) 'FIN PIE @@ -2915,7 +2915,7 @@ Namespace Extensiones If fechaI IsNot Nothing Or fechaF IsNot Nothing Then HttpContext.Current.Response.AddHeader("content-disposition", String.Format("attachment;filename={0} {1} a {2}.pdf", nombreReporte, fechaI.ToDate.ToString("dd-MM-yyyy"), fechaF.ToDate.ToString("dd-MM-yyyy"))) Else - HttpContext.Current.Response.AddHeader("content-disposition", String.Format("attachment;filename={0} {1}.pdf", nombreReporte, Now.ToString("dd-MM-yyyy"))) + HttpContext.Current.Response.AddHeader("content-disposition", String.Format("attachment;filename={0} {1}.pdf", nombreReporte, ClsPaginas.NowADS().ToString("dd-MM-yyyy"))) End If HttpContext.Current.Response.Cache.SetCacheability(HttpCacheability.NoCache) 'HtmlConverter.ConvertToPdf(sw.ToString(), HttpContext.Current.Response.OutputStream) @@ -3892,7 +3892,7 @@ Namespace Extensiones FechaPeticion = FechaPeticion.AddMinutes(Token) Dim CveEmpresa As Integer = dataArray(4).ToEntero() - Dim diferencia As Double = (FechaPeticion - DateTime.Now).TotalMinutes + Dim diferencia As Double = (FechaPeticion - ClsPaginas.NowADS()).TotalMinutes diferencia = Math.Abs(diferencia) If diferencia < 5 Then 'si la fecha que me envía es de cuando menos hace cinco minuto, se permite accesar, para que no se copie ese parámetro y se esté recuperando información "medida de seguridad" diff --git a/App_Code/wsRedes.vb b/App_Code/wsRedes.vb index 23b68792a..f2e9d9462 100644 --- a/App_Code/wsRedes.vb +++ b/App_Code/wsRedes.vb @@ -45,7 +45,7 @@ Public Class wsRedes ' 'si la fecha que me envía es de cuando menos hace un minuto, se permite accesar, para que no se copie ese parámetro y se esté recuperando información "medida de seguridad" - ' If Fecha > Now.AddSeconds(TiempoValido) Then + ' If Fecha > NowADS().AddSeconds(TiempoValido) Then ' Str.Append("-----xwsRed:3") ' 'debemos de saccar la clave electoral @@ -136,7 +136,7 @@ Public Class wsRedes Dim Fecha As DateTime Fecha = ArrCadena(0).ToString.ToDate 'si la fecha que me envía es de cuando menos hace un minuto, se permite accesar, para que no se copie ese parámetro y se esté recuperando información "medida de seguridad" - If Fecha > Now.AddSeconds(TiempoValido) Then + If Fecha > ClsPaginas.NowADS().AddSeconds(TiempoValido) Then Dim Tipo As New ClsProspectos diff --git a/App_Code/wsSIG.vb b/App_Code/wsSIG.vb index 7ca8b9f0e..1991e6c6b 100644 --- a/App_Code/wsSIG.vb +++ b/App_Code/wsSIG.vb @@ -37,7 +37,7 @@ Public Class wsSIG Usuario = ArrCadena(0) : Contrasenia = ArrCadena(1) : IMEI = ArrCadena(2) : Version = ArrCadena(3) : Fecha = ArrCadena(4).ToString.ToDate 'si la fecha que me envía es de cuando menos hace un minuto, se permite accesar, para que no se copie ese parámetro y se esté recuperando información "medida de seguridad" - If Fecha > Now.AddSeconds(TiempoValido) Then + If Fecha > ClsPaginas.NowADS().AddSeconds(TiempoValido) Then Dim ttDato As Usuario Dim tUsuario As New ClsSisUsuarios @@ -88,7 +88,7 @@ Public Class wsSIG validatesubproyecto = True End If 'si la fecha que me envía es de cuando menos hace un minuto, se permite accesar, para que no se copie ese parámetro y se esté recuperando información "medida de seguridad" - If Fecha > Now.AddSeconds(TiempoValido) Then + If Fecha > ClsPaginas.NowADS().AddSeconds(TiempoValido) Then Dim ttDato As Usuario = Nothing Using tUsuario As New ClsSisUsuarios() @@ -141,7 +141,7 @@ Public Class wsSIG ' IMEI = ArrCadena(0) : Tipo = ArrCadena(1).ToEntero : Fecha = ArrCadena(2).ToString.ToDate ' 'si la fecha que me envía es de cuando menos hace un minuto, se permite accesar, para que no se copie ese parámetro y se esté recuperando información "medida de seguridad" - ' If Fecha > Now.Addseconds(TiempoValido) Then + ' If Fecha > NowADS().Addseconds(TiempoValido) Then ' Dim tUsuario As New ClsSisUsuarios @@ -166,7 +166,7 @@ Public Class wsSIG Dim Fecha, FechaColonias As DateTime IMEI = ArrCadena(0) : FechaColonias = ArrCadena(1).ToString.ToDate : Fecha = ArrCadena(2).ToString.ToDate 'si la fecha que me envía es de cuando menos hace un minuto, se permite accesar, para que no se copie ese parámetro y se esté recuperando información "medida de seguridad" - If Fecha > Now.AddSeconds(TiempoValido) Then + If Fecha > ClsPaginas.NowADS().AddSeconds(TiempoValido) Then 'Dim Tipo As New ClsCircuitos 'ds = Tipo.GetTablas(IMEI, FechaColonias) 'Tipo.Dispose() @@ -188,7 +188,7 @@ Public Class wsSIG Dim Fecha As DateTime IMEI = ArrCadena(0) : CveEmpresa = ArrCadena(1).ToString.ToEntero : Fecha = ArrCadena(2).ToString.ToDate 'si la fecha que me envía es de cuando menos hace un minuto, se permite accesar, para que no se copie ese parámetro y se esté recuperando información "medida de seguridad" - If Fecha > Now.AddSeconds(TiempoValido) Then + If Fecha > ClsPaginas.NowADS().AddSeconds(TiempoValido) Then Dim Prosp As New ClsProspectos ds = Prosp.GetProspectosTablas(IMEI, CveEmpresa) @@ -211,7 +211,7 @@ Public Class wsSIG Dim Fecha As DateTime CveUsuario = ArrCadena(0).ToEntero : IMEI = ArrCadena(1) : CveEmpresa = ArrCadena(2).ToString.ToEntero : Fecha = ArrCadena(3).ToString.ToDate 'si la fecha que me envía es de cuando menos hace un minuto, se permite accesar, para que no se copie ese parámetro y se esté recuperando información "medida de seguridad" - If Fecha > Now.AddSeconds(TiempoValido) Then + If Fecha > ClsPaginas.NowADS().AddSeconds(TiempoValido) Then Dim Evento As New ClsOIEventos If Evento.GetAgendas(CveUsuario, CveEmpresa) Then @@ -248,7 +248,7 @@ Public Class wsSIG CveUsuarioIng = ArrCadena(26).ToEntero : CveEmpresa = ArrCadena(27).ToString.ToEntero : FechaEnvio = ArrCadena(28).ToString.ToDate FechaEnvio = ArrCadena(29).ToString.ToDate 'si la fecha que me envía es de cuando menos hace un minuto, se permite accesar, para que no se copie ese parámetro y se esté recuperando información "medida de seguridad" - If FechaEnvio > Now.AddSeconds(TiempoValido) Then + If FechaEnvio > ClsPaginas.NowADS().AddSeconds(TiempoValido) Then Dim Evento As New ClsOIEventos If Evento.AddEvento(CveTipoEvento, CveAgendaTipo, Asunto, Descripcion, Prioridad, CveUsuarioDe, CveUsuarioPara, FechaInicio, FechaFin, 0, CveRevision, Archivo, CveUsuarioIng, CveEmpresa, @@ -278,7 +278,7 @@ Public Class wsSIG FechaFin = ArrCadena(0).ToDate : CveEstatusEvento = ArrCadena(1).ToEntero : Geom = ArrCadena(2) : CveEvento = ArrCadena(3).ToEntero : Fecha = ArrCadena(4).ToDate 'si la fecha que me envía es de cuando menos hace un minuto, se permite accesar, para que no se copie ese parámetro y se esté recuperando información "medida de seguridad" - If Fecha > Now.AddSeconds(TiempoValido) Then + If Fecha > ClsPaginas.NowADS().AddSeconds(TiempoValido) Then Dim Evento As New ClsOIEventos Retorno = Evento.FinalizaEvento(FechaFin, CveEstatusEvento, Geom, CveEvento) @@ -306,7 +306,7 @@ Public Class wsSIG Imagen = ArrCadena(0) : TipoImagen = ArrCadena(1).ToEntero : Cve = ArrCadena(2).ToEntero : pCveUsuario = ArrCadena(3).ToEntero : pCveEmpresa = ArrCadena(4).ToEntero : pIMEI = ArrCadena(5) Fecha = ArrCadena(6).ToString.ToDate Fecha.ToShortDateString().GuardaLog() - If Fecha > Now.AddSeconds(TiempoValido) Then + If Fecha > ClsPaginas.NowADS().AddSeconds(TiempoValido) Then Dim Dir As String = String.Format("{0}Empresas\{1}\", ModExtensiones.DirectorioBaseEmpresas, pCveEmpresa) Dim Ruta As String = "" Dim RutaDB3 As String = "" @@ -412,7 +412,7 @@ Public Class wsSIG CveProspectoTipo = ArrCadena(34).ToEntero : Geom = ArrCadena(35) : CveVendedor = ArrCadena(36).ToEntero : CveUsuario = ArrCadena(37).ToEntero : CveEmpresa = ArrCadena(38).ToEntero : FechaCaptura = ArrCadena(39).ToString.ToDate : FechaEnvio = ArrCadena(40).ToString.ToDate 'si la fecha que me envía es de cuando menos hace un minuto, se permite accesar, para que no se copie ese parámetro y se esté recuperando información "medida de seguridad" - If FechaEnvio > Now.AddSeconds(TiempoValido) Then + If FechaEnvio > ClsPaginas.NowADS().AddSeconds(TiempoValido) Then Str.Append("-----xwsAdd:3") @@ -478,7 +478,7 @@ Public Class wsSIG 'si la fecha que me envía es de cuando menos hace un minuto, se permite accesar, para que no se copie ese parámetro y se esté recuperando información "medida de seguridad" - If FechaEnvio > Now.AddSeconds(TiempoValido) Then + If FechaEnvio > ClsPaginas.NowADS().AddSeconds(TiempoValido) Then Str.Append("-----xwsAdd:3") @@ -524,7 +524,7 @@ Public Class wsSIG CveProspecto = ArrCadena(0).ToEntero : Nombres = ArrCadena(1) : CveVendedor = ArrCadena(2).ToEntero() : CveEmpresa = ArrCadena(5).ToEntero : FechaEnvio = ArrCadena(6).ToString.ToDate 'si la fecha que me envía es de cuando menos hace un minuto, se permite accesar, para que no se copie ese parámetro y se esté recuperando información "medida de seguridad" - If FechaEnvio > Now.AddSeconds(TiempoValido) Then + If FechaEnvio > ClsPaginas.NowADS().AddSeconds(TiempoValido) Then Str.Append("-----xwsAdd:3") @@ -579,7 +579,7 @@ Public Class wsSIG CveProspecto = ArrCadena(0).ToEntero : CveEmpresa = ArrCadena(1).ToEntero : FechaEnvio = ArrCadena(2).ToString.ToDate 'si la fecha que me envía es de cuando menos hace un minuto, se permite accesar, para que no se copie ese parámetro y se esté recuperando información "medida de seguridad" - If FechaEnvio > Now.AddSeconds(TiempoValido) Then + If FechaEnvio > ClsPaginas.NowADS().AddSeconds(TiempoValido) Then Dim Prosp As New ClsProspectos @@ -616,7 +616,7 @@ Public Class wsSIG CveContrato = ArrCadena(0).ToEntero : CveEmpresa = ArrCadena(1).ToEntero : FechaEnvio = ArrCadena(2).ToString.ToDate 'si la fecha que me envía es de cuando menos hace un minuto, se permite accesar, para que no se copie ese parámetro y se esté recuperando información "medida de seguridad" - If FechaEnvio > Now.AddSeconds(TiempoValido) Then + If FechaEnvio > ClsPaginas.NowADS().AddSeconds(TiempoValido) Then Dim Cont As New ClsContratos @@ -650,7 +650,7 @@ Public Class wsSIG CveContratoSeccion = ArrCadena(0).ToEntero : Geom = ArrCadena(1) : FechaEnvio = ArrCadena(2).ToString.ToDate 'si la fecha que me envía es de cuando menos hace un minuto, se permite accesar, para que no se copie ese parámetro y se esté recuperando información "medida de seguridad" - If FechaEnvio > Now.AddSeconds(TiempoValido) Then + If FechaEnvio > ClsPaginas.NowADS().AddSeconds(TiempoValido) Then Dim Cont As New ClsContratos Cadena.GuardaLog() diff --git a/Ashx/CargaEventos.ashx b/Ashx/CargaEventos.ashx index 60ef44198..d40007c3b 100644 --- a/Ashx/CargaEventos.ashx +++ b/Ashx/CargaEventos.ashx @@ -238,7 +238,7 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState If Not cevent.recurrenciatipo > 0 Then 'AGREGAMOS CUANDO NO ES RECURRENTE - Dim tFecha As DateTime = DateAdd(DateInterval.Month, -6, Date.Now) + Dim tFecha As DateTime = DateAdd(DateInterval.Month, -6, ClsPaginas.NowADS()) 'SI LA FECHA DEL EVENTO ES MENOR DE 6 MESES DE LA FECHA ACTUAL NO LO AGREGA If dr("FechaFin").ToString.ToDateTime > tFecha Or dr("FechaInicio").ToString.ToDateTime > tFecha Then events.Add(cevent) @@ -319,7 +319,7 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState End If 'SI LA FECHA DEL EVENTO ES MENOR DE 6 MESES DE LA FECHA ACTUAL Y/0 SI LA FECHA INICIAL DE LA RECURRENCIA ES MENOR A LA FECHA QUE SE CREO EL EVENTO NO LO AGREGA - If FIT > DateAdd(DateInterval.Month, -6, Date.Now) And FIT >= dr("FechaInicio").ToString.ToDateTime Then + If FIT > DateAdd(DateInterval.Month, -6, ClsPaginas.NowADS()) And FIT >= dr("FechaInicio").ToString.ToDateTime Then events.Add(cevent) End If Next @@ -359,7 +359,7 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState End If 'SI LA FECHA DEL EVENTO ES MENOR DE 6 MESES DE LA FECHA ACTUAL NO LO AGREGA - If FI > DateAdd(DateInterval.Month, -6, Date.Now) Then + If FI > DateAdd(DateInterval.Month, -6, ClsPaginas.NowADS()) Then events.Add(cevent) End If End If diff --git a/Ashx/E119.ashx b/Ashx/E119.ashx index 9325d6b35..0a53e84c6 100644 --- a/Ashx/E119.ashx +++ b/Ashx/E119.ashx @@ -255,7 +255,7 @@ Public Class E119 : Implements IHttpHandler End If End Using - Dim Msg As String = "Información día " & Now.ToShortDateString & If(RespuestaError.message <> "", " Error: " & RespuestaError.message, "") + Dim Msg As String = "Información día " & ClsPaginas.NowADS().ToShortDateString & If(RespuestaError.message <> "", " Error: " & RespuestaError.message, "") Msg.GuardaLogAD("LogE119") If TieneError Then @@ -288,7 +288,7 @@ Public Class E119 : Implements IHttpHandler TieneError = True End Try - Dim Msg As String = "Información día " & Now.ToShortDateString & If(RespuestaError.message <> "", " Error: " & RespuestaError.message, "") + Dim Msg As String = "Información día " & ClsPaginas.NowADS().ToShortDateString & If(RespuestaError.message <> "", " Error: " & RespuestaError.message, "") Msg.GuardaLogAD("LogE119") If TieneError Then diff --git a/Ashx/E140.ashx b/Ashx/E140.ashx index 464c49e33..25a99bd7f 100644 --- a/Ashx/E140.ashx +++ b/Ashx/E140.ashx @@ -139,7 +139,7 @@ Public Class E140 : Implements IHttpHandler, IRequiresSessionState Dim RutaRDLC As String = If(File.Exists($"{RutaEmpresa}\Formatos\MetasVendedores.rdlc"), $"{RutaEmpresa}\Formatos\MetasVendedores.rdlc", $"{DirectorioBaseEmpresas}\Empresas\Grales\Formatos\MetasVendedores.rdlc") - If ObjGen.GetRepMetasVendedores(DateTime.Now, CveEmpresa, -1, -1, -1, -1, -1, CveSubProyecto, -1, -1, 0) Then + If ObjGen.GetRepMetasVendedores(ClsPaginas.NowADS(), CveEmpresa, -1, -1, -1, -1, -1, CveSubProyecto, -1, -1, 0) Then Dim Imagen As System.IO.FileInfo = New System.IO.FileInfo(String.Format("{0}/Logo.png", RutaEmpresa)) @@ -153,7 +153,7 @@ Public Class E140 : Implements IHttpHandler, IRequiresSessionState End If parametros.Add(New ReportParameter("UsuarioImprimio", "Sistema")) - parametros.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + parametros.Add(New ReportParameter("FechaImpresion", ClsPaginas.NowADS().ToString("dd/MM/yyyy"))) parametros.Add(New ReportParameter("SubProyecto", Sucursal)) parametros.Add(New ReportParameter("Agente", Vendedor)) @@ -216,7 +216,7 @@ Public Class E140 : Implements IHttpHandler, IRequiresSessionState End If - MandaCorreo(CorreoSupervisor, $"Envió de estado de scorecard sucursal {Sucursal} a {Now.ToString("dd/MM/yyyy")}", bytes) + MandaCorreo(CorreoSupervisor, $"Envió de estado de scorecard sucursal {Sucursal} a {ClsPaginas.NowADS().ToString("dd/MM/yyyy")}", bytes) bytes = Nothing End If diff --git a/Ashx/E141.ashx b/Ashx/E141.ashx index 648919343..493fb9767 100644 --- a/Ashx/E141.ashx +++ b/Ashx/E141.ashx @@ -797,11 +797,11 @@ Public Class E141 : Implements IHttpHandler ObjFactura.TipoDocto = TipoDocto ObjFactura.RefDocto = "" 'ObjFactura.CveMesa = -1 - ObjFactura.Fecha = Now + ObjFactura.Fecha = ClsPaginas.NowADS() ObjFactura.CvePrePoliza = -1 - ObjFactura.FechaPago = Now + ObjFactura.FechaPago = ClsPaginas.NowADS() ObjFactura.MotivoDescuento = "" - ObjFactura.FechaEjecucion = Now + ObjFactura.FechaEjecucion = ClsPaginas.NowADS() ObjFactura.UsuarioCreo = UsuarioActual.Usuario ObjFactura.CveCondicionEntrega = -1 ObjFactura.CondicionEntrega = "" @@ -1236,7 +1236,7 @@ Public Class E141 : Implements IHttpHandler TmpDT.Columns.Add("TotalImporte", GetType(Decimal)) TmpDT.Columns.Add("Total", GetType(Decimal)) 'Para uso del módulo contable - TmpDT.Columns.Add("AsientoContableVentas", GetType(Integer)) + TmpDT.Columns.Add("AsientoContableVentas", GetType(Integer)) TmpDT.Columns.Add("AplicaParaConcepto", GetType(Boolean)) TmpDT.Columns.Add("CveProyecto", GetType(Integer)) TmpDT.Columns.Add("Proyecto", GetType(String)) @@ -1780,9 +1780,9 @@ Public Class E141 : Implements IHttpHandler Dim msg As String = "" If sb.Length > 0 Then - msg = $"Se enviaron los siguientes productos:
    {sb.ToString()}
    Fecha y hora: {Now.ToString("dd/MM/yyyy hh:mm:ss tt")}" + msg = $"Se enviaron los siguientes productos:
    {sb.ToString()}
    Fecha y hora: {ClsPaginas.NowADS().ToString("dd/MM/yyyy hh:mm:ss tt")}" Else - msg = $"No se enviaron productos esta semana
    Fecha y hora: {Now.ToString("dd/MM/yyyy hh:mm:ss tt")}" + msg = $"No se enviaron productos esta semana
    Fecha y hora: {ClsPaginas.NowADS().ToString("dd/MM/yyyy hh:mm:ss tt")}" End If EnviarCorreoNotificacion("SIG - Productos enviados en la semana", msg) @@ -1873,7 +1873,7 @@ Public Class E141 : Implements IHttpHandler End While End If If DtPS.Rows.Count > 0 Then - EnviarCorreoNotificacion("SIG - Actualización de productos", $"Se ejecuto la tarea de actualización de productos.
    Fecha y hora: {Now.ToString("dd/MM/yyyy hh:mm:ss tt")}") + EnviarCorreoNotificacion("SIG - Actualización de productos", $"Se ejecuto la tarea de actualización de productos.
    Fecha y hora: {ClsPaginas.NowADS().ToString("dd/MM/yyyy hh:mm:ss tt")}") End If End If @@ -1957,7 +1957,7 @@ Public Class E141 : Implements IHttpHandler Private Function ActualizarPrecios(Todos As Boolean) As Boolean Dim Retorno As Boolean = False 'ENVIAR PRECIOS SOLO DE 8am a 7pm - If Now.Hour < 7 OrElse Now.Hour > 21 Then + If ClsPaginas.NowADS().Hour < 7 OrElse ClsPaginas.NowADS().Hour > 21 Then Retorno = True Return Retorno End If @@ -2040,7 +2040,7 @@ Public Class E141 : Implements IHttpHandler End If If DtPS.Rows.Count > 0 Then - EnviarCorreoNotificacion("SIG - Actualización de precios", $"Se ejecuto la tarea de actualización de precios.
    Fecha y hora: {Now.ToString("dd/MM/yyyy hh:mm:ss tt")}") + EnviarCorreoNotificacion("SIG - Actualización de precios", $"Se ejecuto la tarea de actualización de precios.
    Fecha y hora: {ClsPaginas.NowADS().ToString("dd/MM/yyyy hh:mm:ss tt")}") End If End If @@ -2097,7 +2097,7 @@ Public Class E141 : Implements IHttpHandler Dim CountPeticiones As Integer = 0, CountPeticionesExitosas As Integer = 0 'ENVIAR SOLO DE 8am a 8pm - If Now.Hour < 7 OrElse Now.Hour > 21 Then + If ClsPaginas.NowADS().Hour < 7 OrElse ClsPaginas.NowADS().Hour > 21 Then Retorno = True Return Retorno End If @@ -2176,7 +2176,7 @@ Public Class E141 : Implements IHttpHandler End If If DtPS.Rows.Count > 0 Then - EnviarCorreoNotificacion("SIG - Actualización de existencias", $"Se ejecuto la tarea de actualización de existencias.
    Fecha y hora: {Now.ToString("dd/MM/yyyy hh:mm:ss tt")}") + EnviarCorreoNotificacion("SIG - Actualización de existencias", $"Se ejecuto la tarea de actualización de existencias.
    Fecha y hora: {ClsPaginas.NowADS().ToString("dd/MM/yyyy hh:mm:ss tt")}") End If End If diff --git a/Ashx/E72.ashx b/Ashx/E72.ashx index 4068c10cd..c662e25d1 100644 --- a/Ashx/E72.ashx +++ b/Ashx/E72.ashx @@ -30,10 +30,10 @@ Public Class E72 : Implements IHttpHandler, IRequiresSessionState Dim ObjInv As New ClsInventarios Try Dim DtPS As DataTable = CreaDT() - ObjInv.GetRepEntradasSalidasXContrato(72, -1, MinFecha, Date.Now, -1, -1, 17, -1, -1, 3, -1, 1158) + ObjInv.GetRepEntradasSalidasXContrato(72, -1, MinFecha, ClsPaginas.NowADS(), -1, -1, 17, -1, -1, 3, -1, 1158) Dim DtRepEntradasSalidasXContrato As DataTable = ObjInv.DtResultados.FiltraParametros("CvePS > 0") - ObjInv.ApartadosRep(-1, 70437, 259, 72, -1, MinFecha, Date.Now) + ObjInv.ApartadosRep(-1, 70437, 259, 72, -1, MinFecha, ClsPaginas.NowADS()) Dim DtApartados As DataTable = ObjInv.DtResultados.FiltraParametros("CvePS > 0", "", {"CvePS", "Codigo", "Cantidad"}) Dim asd As Integer = DtApartados.Rows.Count diff --git a/Ashx/MHRedes.ashx b/Ashx/MHRedes.ashx index 3a4cb5172..49649d0f9 100644 --- a/Ashx/MHRedes.ashx +++ b/Ashx/MHRedes.ashx @@ -62,7 +62,7 @@ Public Class MobileHandler : Implements IHttpHandler If User IsNot Nothing Then - Dim Token As String = String.Format("{0}*{1}*{2}", Now.ToString, IP, User.CveUsuario) + Dim Token As String = String.Format("{0}*{1}*{2}", ClsPaginas.NowADS().ToString, IP, User.CveUsuario) Token = Encripta(Token) json.AppendFormat("{{ ""CveUsuario"" : ""{0}"", ""Nombre"" : ""{1}"", ""Token"" : ""{2}"" }} ", User.CveUsuario, User.Nombre, Token) Else diff --git a/Ashx/SIGFacturacion.ashx b/Ashx/SIGFacturacion.ashx index 988214be8..70cfe6ec9 100644 --- a/Ashx/SIGFacturacion.ashx +++ b/Ashx/SIGFacturacion.ashx @@ -63,7 +63,7 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState 'EnviarCorreoFactura(New Modelos.Factura(Usuario, 844966, 1, context.ModExtensiones.DirectorioBaseEmpresas), Usuario) If String.IsNullOrEmpty(pFechaI) AndAlso String.IsNullOrEmpty(pFechaF) Then - Dim FechaReferencia = Now + Dim FechaReferencia = ClsPaginas.NowADS() If FechaReferencia.DayOfWeek = DayOfWeek.Sunday Then Dim Sabado = FechaReferencia.AddDays(-1) Dim DomingoAnterior = FechaReferencia.AddDays(-7) @@ -290,11 +290,11 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState ObjFactura.TipoDocto = "Ing" ObjFactura.RefDocto = "" 'ObjFactura.CveMesa = -1 - ObjFactura.Fecha = Now + ObjFactura.Fecha = ClsPaginas.NowADS() ObjFactura.CvePrePoliza = -1 - ObjFactura.FechaPago = Now + ObjFactura.FechaPago = ClsPaginas.NowADS() ObjFactura.MotivoDescuento = "" - ObjFactura.FechaEjecucion = Now + ObjFactura.FechaEjecucion = ClsPaginas.NowADS() ObjFactura.UsuarioCreo = UsuarioActual.Usuario ObjFactura.CveCondicionEntrega = -1 ObjFactura.CondicionEntrega = "" @@ -384,7 +384,7 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState 'VALIDA PROMOCIONES Y EXISTENCIAS Dim ObjVentas As New ClsVentas - If ObjVentas.GetPromocionesPS(-1, Now, CveSubProyecto, ObjFactura.CveCliente, ObjFactura.CveVendedor, 1, UsuarioActual.CveEmpresa) Then + If ObjVentas.GetPromocionesPS(-1, ClsPaginas.NowADS(), CveSubProyecto, ObjFactura.CveCliente, ObjFactura.CveVendedor, 1, UsuarioActual.CveEmpresa) Then ObjFactura.DtPromociones = ObjVentas.DtResultados.Copy() End If @@ -905,8 +905,8 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState Dim ArchivoW As StreamWriter Dim strLineaTMP As String - ' strLineaTMP = Chr(13) & Chr(10) & Day(Now) & "/" & Month(Now) & "/" & Year(Now) & " " & Hour(Now) & ":" & Minuto & ". " & Str & Chr(13) & Chr(10) - strLineaTMP = String.Format("{0}{1}Log: {2}{3}:{4}", Chr(13), Chr(10), Str, DateTime.Now.ToShortDateString, DateTime.Now.ToShortTimeString) + ' strLineaTMP = Chr(13) & Chr(10) & Day(NowADS()) & "/" & Month(NowADS()) & "/" & Year(NowADS()) & " " & Hour(NowADS()) & ":" & Minuto & ". " & Str & Chr(13) & Chr(10) + strLineaTMP = String.Format("{0}{1}Log: {2}{3}:{4}", Chr(13), Chr(10), Str, ClsPaginas.NowADS().ToShortDateString, ClsPaginas.NowADS().ToShortTimeString) Try ArchivoW = New StreamWriter(String.Format("{0}\LogFacturacion.txt", ModExtensiones.DirectorioBaseEmpresas), True, System.Text.Encoding.UTF8) Catch ex As UnauthorizedAccessException diff --git a/Ashx/SIGFacturacionCiclica.ashx b/Ashx/SIGFacturacionCiclica.ashx index 6f8b1e66e..8e5998a6a 100644 --- a/Ashx/SIGFacturacionCiclica.ashx +++ b/Ashx/SIGFacturacionCiclica.ashx @@ -94,7 +94,7 @@ Public Class SIGFacturacionCiclica : Implements IHttpHandler, IRequiresSessionSt Private Function IniciaFacturacionMasiva() As Boolean Dim Retorno As Boolean = True - Dim FechaRef As DateTime = DateTime.Now + Dim FechaRef As DateTime = ClsPaginas.NowADS() Dim DTCicloComercial As DataTable = Nothing Using ObjContratos As New ClsContratos @@ -123,11 +123,11 @@ Public Class SIGFacturacionCiclica : Implements IHttpHandler, IRequiresSessionSt For Each Row As DataRow In DTCicloComercial.Rows If Row("Observaciones").ToString().Contains("{DIA}") Then - Row("Observaciones") = Row("Observaciones").ToString().Replace("{DIA}", DateTime.Now.Day.ToString()) + Row("Observaciones") = Row("Observaciones").ToString().Replace("{DIA}", ClsPaginas.NowADS().Day.ToString()) End If If Row("Observaciones").ToString().Contains("{MES}") Then - Dim fecha As DateTime = DateTime.Now + Dim fecha As DateTime = ClsPaginas.NowADS() Dim formatoFecha = Globalization.CultureInfo.CurrentCulture.DateTimeFormat Dim nombreMes = formatoFecha.GetMonthName(fecha.Month).ToUpper() @@ -135,11 +135,11 @@ Public Class SIGFacturacionCiclica : Implements IHttpHandler, IRequiresSessionSt End If If Row("Observaciones").ToString().Contains("{AÑO}") Then - Row("Observaciones") = Row("Observaciones").ToString().Replace("{AÑO}", DateTime.Now.Year.ToString()) + Row("Observaciones") = Row("Observaciones").ToString().Replace("{AÑO}", ClsPaginas.NowADS().Year.ToString()) End If If Row("Observaciones").ToString().Contains("{TC}") Then - Row("Observaciones") = Row("Observaciones").ToString().Replace("{TC}", ClsPaginas.GlobalTipoCambio(Now).FormatoNumero) + Row("Observaciones") = Row("Observaciones").ToString().Replace("{TC}", ClsPaginas.GlobalTipoCambio(ClsPaginas.NowADS()).FormatoNumero) End If Dim Resp = EmitirImprimir(UsuarioActual, Row) @@ -291,7 +291,7 @@ Public Class SIGFacturacionCiclica : Implements IHttpHandler, IRequiresSessionSt ObjFactura.CveMoneda = DR("CveMoneda").ToString.ToEntero ObjFactura.Moneda = ClsPaginas.GlobalDTMonedas.FiltroPrimeroValor("Moneda", $"CveMoneda = {ObjFactura.CveMoneda} ") ObjFactura.MonedaSAT = ClsPaginas.GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", $"CveMoneda = {DR("CveMoneda").ToString.ToEntero}") - ObjFactura.TipoCambio = If(ObjFactura.CveMoneda = 1, 1, ClsPaginas.GlobalTipoCambio(Now)).ToDecimal + ObjFactura.TipoCambio = If(ObjFactura.CveMoneda = 1, 1, ClsPaginas.GlobalTipoCambio(ClsPaginas.NowADS())).ToDecimal ObjFactura.TipoDocto = "Ing" ObjFactura.RefDocto = "" ObjFactura.Folio = -1 diff --git a/Ashx/SIGPolizaVirtual.ashx b/Ashx/SIGPolizaVirtual.ashx index 21d2372c7..f0d8daa67 100644 --- a/Ashx/SIGPolizaVirtual.ashx +++ b/Ashx/SIGPolizaVirtual.ashx @@ -468,7 +468,7 @@ Public Class SIGPolizaVirtual : Implements IHttpHandler, IRequiresSessionState obj.customer_car_year = ObjFactura.Fecha.Year 'DATOS DE VENTA - obj.sale_date = Now + obj.sale_date = ClsPaginas.NowADS() obj.sale_paidby = "01" obj.sale_type = "01" 'PISO obj.sale_type_service = "01" 'PARTICULAR @@ -499,7 +499,7 @@ Public Class SIGPolizaVirtual : Implements IHttpHandler, IRequiresSessionState obj.customer_name = "JOSE ENRIQUE" obj.customer_last_name1 = "VIZCARA" obj.customer_last_name2 = "RENDON" - obj.customer_birthday = Now + obj.customer_birthday = ClsPaginas.NowADS() obj.customer_phone = "8186545256" obj.customer_email = "mail@mail.com" obj.customer_gender = "02" @@ -509,7 +509,7 @@ Public Class SIGPolizaVirtual : Implements IHttpHandler, IRequiresSessionState obj.customer_car_year = 2015 'DATOS DE VENTA - obj.sale_date = Now + obj.sale_date = ClsPaginas.NowADS() obj.sale_paidby = "01" obj.sale_type = "01" obj.sale_type_service = "01" @@ -527,7 +527,7 @@ Public Class SIGPolizaVirtual : Implements IHttpHandler, IRequiresSessionState obj.used_bci = "25" obj.used_month = 1 obj.used_year = 2015 - obj.used_sale_date = Now + obj.used_sale_date = ClsPaginas.NowADS() EnviarPolizaVentaLTHWSD(context, obj) End Sub diff --git a/Ashx/SIGWeb.ashx b/Ashx/SIGWeb.ashx index 4c09b06b8..b7689a08c 100644 --- a/Ashx/SIGWeb.ashx +++ b/Ashx/SIGWeb.ashx @@ -58,13 +58,13 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState ActualizaPrePoliza(context) Dim obj As New MResponseModel(Of Object)() - obj.Result = DateTime.Now.ToString() + obj.Result = ClsPaginas.NowADS().ToString() Dim retorno = JsonConvert.SerializeObject(obj).ToString() context.Response.Write(retorno) context.Response.StatusCode = 200 Case "RevisaConexion" Dim obj As New MResponseModel(Of Object)() - obj.Result = DateTime.Now.ToString() + obj.Result = ClsPaginas.NowADS().ToString() Dim retorno = JsonConvert.SerializeObject(obj).ToString() context.Response.Write(retorno) context.Response.StatusCode = 200 @@ -282,7 +282,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState Dim tokenDescriptor = New Microsoft.IdentityModel.Tokens.SecurityTokenDescriptor With { .Subject = New System.Security.Claims.ClaimsIdentity(New System.Security.Claims.Claim() {New System.Security.Claims.Claim("CvePlataforma", usuario.CvePlataforma.ToString()), New System.Security.Claims.Claim("CveUsuario", usuario.CveUsuario.ToString()), New System.Security.Claims.Claim("CveEmpresa", usuario.CveEmpresa.ToString()), - New System.Security.Claims.Claim("CveRol", usuario.CveRol.ToString()), New System.Security.Claims.Claim("Fecha", Date.Now.ToLongDateString())}), + New System.Security.Claims.Claim("CveRol", usuario.CveRol.ToString()), New System.Security.Claims.Claim("Fecha", ClsPaginas.NowADS().ToLongDateString())}), .Expires = Date.UtcNow.AddHours(3), .SigningCredentials = New Microsoft.IdentityModel.Tokens.SigningCredentials( New Microsoft.IdentityModel.Tokens.SymmetricSecurityKey(Encoding.ASCII.GetBytes("*_AsistenciaDesarrolloSistemas-SIGAPI_*17-06-2020")), @@ -488,7 +488,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState savepath = context.Server.MapPath(tempPath) Dim filename As String Dim tick As String - tick = (DateTime.Now.Ticks + 1).ToString() + tick = (ClsPaginas.NowADS().Ticks + 1).ToString() If Not Directory.Exists(savepath) Then Directory.CreateDirectory(savepath) End If diff --git a/Ashx/TareasProgramadas.ashx b/Ashx/TareasProgramadas.ashx index 3e01ccf00..3334c5d08 100644 --- a/Ashx/TareasProgramadas.ashx +++ b/Ashx/TareasProgramadas.ashx @@ -70,7 +70,7 @@ Public Class TareasProgramadas : Implements IHttpHandler Dim retorno As String = "no se encontro la variable" Try Dim metodo As String = "" - Dim FechaActual As DateTime = Now + Dim FechaActual As DateTime = ClsPaginas.NowADS() Dim FechaEnvio As DateTime = FechaActual If context.Request("var") IsNot Nothing Then @@ -387,7 +387,7 @@ Public Class TareasProgramadas : Implements IHttpHandler Dim Json As New JObject( New JProperty("Empresa", UsuarioActual.Empresa.Empresa), New JProperty("Usuario", UsuarioActual.Usuario), - New JProperty("Fecha", DateTime.Now.ToString("dd/MM/yyy HH:mm:ss")) + New JProperty("Fecha", ClsPaginas.NowADS().ToString("dd/MM/yyy HH:mm:ss")) ) Dim DTClientes As DataTable = Nothing Dim EnviarPendientes As Boolean = False @@ -414,7 +414,7 @@ Public Class TareasProgramadas : Implements IHttpHandler Dim Grupo As Integer = 5 Dim TipoCambio As Integer = 1 Dim TipoDocto As String = "Ing" - Dim FechaCorte As DateTime = New DateTime(Now.Year, 12, 31) + Dim FechaCorte As DateTime = New DateTime(ClsPaginas.NowADS().Year, 12, 31) If ObjMov.GetCxC(FechaI, FechaF, CveCliente, CveSubProyecto, CveVendedor, -1, -1, "-1", UsuarioActual.CveEmpresa, Grupo, -1, TipoCambio, TCEspecifico, TipoDocto, FechaVI, FechaVF, FechaCorte:=FechaCorte, EstatusCliente:=1, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveCobranzaEstatus:=CveCobranzaEstatus, CveClienteClasificacion:=-1, TipoCliente:=-1, AplicaAnticiposPagados:=AplicaAnticipos) Then @@ -677,7 +677,7 @@ Public Class TareasProgramadas : Implements IHttpHandler lista.Add(New CrystalParametro("TipoCuentas", "Con Saldo")) lista.Add(New CrystalParametro("NombreCliente", Cliente.Nombre)) lista.Add(New CrystalParametro("FechaInicio", If(FI = "-1", "-", FI))) - lista.Add(New CrystalParametro("FechaFin", If(FF = "-1", DateTime.Now.ToShortDateString, FF))) + lista.Add(New CrystalParametro("FechaFin", If(FF = "-1", ClsPaginas.NowADS().ToShortDateString, FF))) lista.Add(New CrystalParametro("UsuarioImprimio", UsuarioActual.Nombre)) lista.Add(New CrystalParametro("DireccionCliente", String.Format("Calle {0} #{1} Colonia {2}", Cliente.Direccion, If(Cliente.NoExt = "", "S/N", Cliente.NoExt), Cliente.Colonia))) lista.Add(New CrystalParametro("ClienteCP", Cliente.CP)) @@ -719,7 +719,7 @@ Public Class TareasProgramadas : Implements IHttpHandler lista.Add(New CrystalParametro("TipoCuentas", "Con Saldo")) lista.Add(New CrystalParametro("NombreCliente", Cliente.Nombre)) lista.Add(New CrystalParametro("FechaInicio", If(FI = "-1", "-", FI))) - lista.Add(New CrystalParametro("FechaFin", If(FF = "-1", DateTime.Now.ToShortDateString, FF))) + lista.Add(New CrystalParametro("FechaFin", If(FF = "-1", ClsPaginas.NowADS().ToShortDateString, FF))) lista.Add(New CrystalParametro("UsuarioImprimio", UsuarioActual.Nombre)) lista.Add(New CrystalParametro("DireccionCliente", String.Format("Calle {0} #{1} Colonia {2}", Cliente.Direccion, If(Cliente.NoExt = "", "S/N", Cliente.NoExt), Cliente.Colonia))) lista.Add(New CrystalParametro("ClienteCP", Cliente.CP)) @@ -870,8 +870,8 @@ Public Class TareasProgramadas : Implements IHttpHandler Dim ArchivoW As StreamWriter Dim strLineaTMP As String - ' strLineaTMP = Chr(13) & Chr(10) & Day(Now) & "/" & Month(Now) & "/" & Year(Now) & " " & Hour(Now) & ":" & Minuto & ". " & Str & Chr(13) & Chr(10) - strLineaTMP = String.Format("{0}{1}Log: {2}{3}:{4}", Chr(13), Chr(10), Str, DateTime.Now.ToShortDateString, DateTime.Now.ToShortTimeString) + ' strLineaTMP = Chr(13) & Chr(10) & Day(NowADS()) & "/" & Month(NowADS()) & "/" & Year(NowADS()) & " " & Hour(NowADS()) & ":" & Minuto & ". " & Str & Chr(13) & Chr(10) + strLineaTMP = String.Format("{0}{1}Log: {2}{3}:{4}", Chr(13), Chr(10), Str, ClsPaginas.NowADS().ToShortDateString, ClsPaginas.NowADS().ToShortTimeString) Try ArchivoW = New StreamWriter(String.Format("{0}\Log\LogEdoCuenta.txt", ModExtensiones.DirectorioBaseEmpresas), True, System.Text.Encoding.UTF8) Catch ex As UnauthorizedAccessException @@ -1066,7 +1066,7 @@ Public Class TareasProgramadas : Implements IHttpHandler If Not String.IsNullOrEmpty(Mail) Then Try - Dim Asunto As String = $"ScoreCard: {Now.ToString("dd/MM/yyyy")}" + Dim Asunto As String = $"ScoreCard: {ClsPaginas.NowADS().ToString("dd/MM/yyyy")}" Dim Cuerpo As String = String.Empty Dim ResultadoMail As Integer = 0 diff --git a/Bancos/CIF.aspx.vb b/Bancos/CIF.aspx.vb index 2bcbfe125..1a47dfc6f 100644 --- a/Bancos/CIF.aspx.vb +++ b/Bancos/CIF.aspx.vb @@ -45,8 +45,8 @@ Partial Class Bancos_CIF 'For Each x As DataRow In GlobalDTContaPlantillasPolizasDetalle(DdlTipoMovimiento.SelectedValue.ToEntero).Rows ' TipoMovto = CBool(x("TipoMovto")) - ' 'If ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Importe, TxtConcepto.Text, DdlTipoMovimiento.SelectedValue.ToEntero, TxtObservacion.Text, Now, 0, -1, CveIE) Then - ' If ObjMov.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovto, Importe, TxtConcepto.Text, 30, TxtObservacion.Text, Now, 0, -1, CveIE) Then + ' 'If ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Importe, TxtConcepto.Text, DdlTipoMovimiento.SelectedValue.ToEntero, TxtObservacion.Text, NowADS(), 0, -1, CveIE) Then + ' If ObjMov.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovto, Importe, TxtConcepto.Text, 30, TxtObservacion.Text, NowADS(), 0, -1, CveIE) Then ' ''End If ' Else ' Alert("No se pudo insertar el Detalle de la Póliza", TipoMensaje.MsgAdvertencia) diff --git a/Bancos/CargarConciliacionesBancarias.aspx.vb b/Bancos/CargarConciliacionesBancarias.aspx.vb index e9b722155..3fd69f3ab 100644 --- a/Bancos/CargarConciliacionesBancarias.aspx.vb +++ b/Bancos/CargarConciliacionesBancarias.aspx.vb @@ -46,8 +46,8 @@ Partial Class Bancos_CargarConciliacionesBancarias DdlCuentaModal.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlCuentaModal.DataBind() - txtFechaI.Text = Now.FirstDayOfMonth.ToShortDateString - txtFechaF.Text = Now.ToShortDateString + txtFechaI.Text = NowADS().FirstDayOfMonth.ToShortDateString + txtFechaF.Text = NowADS().ToShortDateString Modalidad = "" End Sub @@ -237,7 +237,7 @@ Partial Class Bancos_CargarConciliacionesBancarias Protected Sub LnkAgregarMovimiento_Click(sender As Object, e As EventArgs) Modalidad = "A" TxtReferencia.Text = "" - TxtFecha.Text = Now.ToShortDateString + TxtFecha.Text = NowADS().ToShortDateString TxtImporte.Text = "" DdlTipo.SelectedIndex = 0 DdlCuentaModal.SelectedIndex = 0 diff --git a/Bancos/ConciliacionesBancarias.aspx.vb b/Bancos/ConciliacionesBancarias.aspx.vb index 584d740c0..a52804d80 100644 --- a/Bancos/ConciliacionesBancarias.aspx.vb +++ b/Bancos/ConciliacionesBancarias.aspx.vb @@ -78,8 +78,8 @@ Partial Class Bancos_ConciliacionesBancariasaspx DdlCuenta.Items.Insert(0, New ListItem("Todos", "-1")) DdlCuenta.DataBind() - txtFechaI.Text = Now.FirstDayOfMonth.ToShortDateString - txtFechaF.Text = Now.ToShortDateString + txtFechaI.Text = NowADS().FirstDayOfMonth.ToShortDateString + txtFechaF.Text = NowADS().ToShortDateString ModalidadConciliacion = "" ModalidadDesconciliar = "" @@ -398,7 +398,7 @@ Partial Class Bancos_ConciliacionesBancariasaspx Protected Sub LnkDesconciliarTodos_Click(sender As Object, e As EventArgs) ModalidadDesconciliar = "DT" - TxtFechaDesconciliado.Text = Now.ToShortDateString + TxtFechaDesconciliado.Text = NowADS().ToShortDateString CveIEDesconciliar = 0 UpDesconciliar.Update() RegistraScript("$('#DModalDesconciliar').modal()") @@ -563,7 +563,7 @@ Partial Class Bancos_ConciliacionesBancariasaspx Dim params As New List(Of ReportParameter)() params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString())) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString())) Dim FormatoFecha As DateTimeFormatInfo = CultureInfo.CurrentCulture.DateTimeFormat Dim NombreMes As String = FormatoFecha.GetMonthName(txtFechaI.Text.ToDate.Month).ToUpper params.Add(New ReportParameter("Encabezado", $"{DdlCuenta.SelectedItem.Text} {NombreMes} {txtFechaI.Text.ToDate.Year}")) diff --git a/Bancos/Creditos.aspx.vb b/Bancos/Creditos.aspx.vb index e7a644c22..57f66289e 100644 --- a/Bancos/Creditos.aspx.vb +++ b/Bancos/Creditos.aspx.vb @@ -160,7 +160,7 @@ Partial Class Bancos_Creditos RegeneraTablaAmortizacion = False 'Fecha Default - TxtFechaInicio.Text = DateTime.Now().ToString("dd/MM/yyyy") + TxtFechaInicio.Text = NowADS().ToString("dd/MM/yyyy") 'Carga Proveedores | Entidad Financiera DdlProveedores.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa) @@ -688,7 +688,7 @@ Partial Class Bancos_Creditos ' If CveIE < 0 Then ' ErrorCredito = True ' End If - ' 'If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtCSTotalCredito.Text.ToString.ToDouble, "Crédito", 50, "", Now, 0, -1, CveIE, ImporteMX:=TxtCSTotalCredito.Text.ToString.ToDouble) Then + ' 'If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtCSTotalCredito.Text.ToString.ToDouble, "Crédito", 50, "", NowADS(), 0, -1, CveIE, ImporteMX:=TxtCSTotalCredito.Text.ToString.ToDouble) Then ' ' ErrorCredito = True ' 'End If ' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtCSTotalCredito.Text.ToDecimal, TxtCSTotalCredito.Text.ToDecimal, 30, "Crédito", "", CveIE:=CveIE) Then @@ -878,19 +878,19 @@ Partial Class Bancos_Creditos 'If Not ErrorCredito AndAlso CveIE > 0 Then ' If CvePrePoliza > 0 Then - ' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtVehiculoAnticipo.Text.ToDouble, "Enganche", 53, "", Now, 0, -1, CveIE) Then + ' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtVehiculoAnticipo.Text.ToDouble, "Enganche", 53, "", NowADS(), 0, -1, CveIE) Then ' ErrorCredito = True ' End If - ' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtComisionAnticipo.Text.ToDouble, "Comisión", 54, "", Now, 0, -1, CveIE) Then + ' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtComisionAnticipo.Text.ToDouble, "Comisión", 54, "", NowADS(), 0, -1, CveIE) Then ' ErrorCredito = True ' End If - ' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtSeguroAnticipo.Text.ToDouble, "Seguro", 55, "", Now, 0, -1, CveIE) Then + ' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtSeguroAnticipo.Text.ToDouble, "Seguro", 55, "", NowADS(), 0, -1, CveIE) Then ' ErrorCredito = True ' End If - ' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtFondoGarantia.Text.ToDouble, "Fondo en Garantía", 58, "", Now, 0, -1, CveIE) Then + ' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtFondoGarantia.Text.ToDouble, "Fondo en Garantía", 58, "", NowADS(), 0, -1, CveIE) Then ' ErrorCredito = True ' End If - ' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, TotalAnticipo, "Banco", 30, "", Now, 0, -1, CveIE) Then + ' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, TotalAnticipo, "Banco", 30, "", NowADS(), 0, -1, CveIE) Then ' ErrorCredito = True ' End If ' Else @@ -1573,7 +1573,7 @@ Partial Class Bancos_Creditos Dim TipoMovimiento As Boolean = False Dim Concepto As String = "" Dim Referencia As String = $"Crédito: {TxtReferencia.Text}" - Dim FechaMovimiento As Date = Now.ToDate + Dim FechaMovimiento As Date = NowADS().ToDate Dim MsgError As String = "" CvePrePoliza = ObjContabilidad.AddPrePolizas("Creditos/RegistrodeRegistro", 69, TxtCSTotalCredito.Text.ToDouble, TxtCSTotalCredito.Text.ToDouble, DdlCSTipoMoneda.SelectedValue.ToEntero, FechaMovimiento, $"Crédito: {TxtReferencia.Text}", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) @@ -1585,7 +1585,7 @@ Partial Class Bancos_Creditos importeMovimiento = TxtVehiculoValor.Text.ToDecimal - TxtVehiculoAnticipo.Text.ToDecimal 'importe financiado Concepto = $"Crédito: {TxtReferencia.Text}" Dim Pago As New CompraPago - Pago.Fecha = Now + Pago.Fecha = NowADS() Pago.CveIE = CveIE Dim ObjCompra As New ClsCompras diff --git a/Bancos/CreditosPagoMultiple.aspx.vb b/Bancos/CreditosPagoMultiple.aspx.vb index 815b6f688..7efd21e80 100644 --- a/Bancos/CreditosPagoMultiple.aspx.vb +++ b/Bancos/CreditosPagoMultiple.aspx.vb @@ -28,7 +28,7 @@ Partial Class Bancos_CreditosPagoMultiple CveMoneda = 1 CargaTipoTransaccion() CargaCuentas(DdlTipoTransaccion.SelectedValue.ToEntero) - TxtFechaDocumento.Text = Now.ToShortDateString + TxtFechaDocumento.Text = NowADS().ToShortDateString CargaProveedores() ' CveProveedor = 19994 TxtPagueseA.Enabled = False diff --git a/Bancos/CuentasBancariasDetalle.aspx.vb b/Bancos/CuentasBancariasDetalle.aspx.vb index 3d5b641a6..f6a001b2e 100644 --- a/Bancos/CuentasBancariasDetalle.aspx.vb +++ b/Bancos/CuentasBancariasDetalle.aspx.vb @@ -59,7 +59,7 @@ Partial Class Bancos_CuentasBancariasDetalle InicializaConvenio() Else 'Configuración de Modalidad Insert - LblFecha.Text = Now.ToShortDateString() + LblFecha.Text = NowADS().ToShortDateString() LtlTitulo.Text = "Agregar Nueva Cuenta Bancaria" ViewState("CveCuenta") = -1 BtnEliminar.Visible = False diff --git a/Bancos/DepositoTerminal.aspx.vb b/Bancos/DepositoTerminal.aspx.vb index 555cba4c2..db7dfa7ec 100644 --- a/Bancos/DepositoTerminal.aspx.vb +++ b/Bancos/DepositoTerminal.aspx.vb @@ -20,7 +20,7 @@ Partial Class Bancos_DepositoTerminal Private Sub Bancos_DepositoTerminal_Load(sender As Object, e As EventArgs) Handles Me.Load If Not IsPostBack Then - TxtFecha.Text = Now.ToShortDateString + TxtFecha.Text = NowADS().ToShortDateString CargaCuentas() If UsuarioActual.CveEmpresa.Contiene(1, 4, 7, 11, 12, 72, 80, 119) Then diff --git a/Bancos/DepositosCaja.aspx.vb b/Bancos/DepositosCaja.aspx.vb index e6f789a9d..b3150609e 100644 --- a/Bancos/DepositosCaja.aspx.vb +++ b/Bancos/DepositosCaja.aspx.vb @@ -18,9 +18,9 @@ Partial Class Bancos_DepositosCaja Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not IsPostBack Then FacturasCheckadas = 0 - TxtFecha.Text = Now.ToShortDateString - txtFechaI.Text = Now.AddDays(-1).ToShortDateString - txtFechaF.Text = Now.ToShortDateString + TxtFecha.Text = NowADS().ToShortDateString + txtFechaI.Text = NowADS().AddDays(-1).ToShortDateString + txtFechaF.Text = NowADS().ToShortDateString TxtComision.Attributes.Add("onKeyUp", "txtSuma(this);") TxtDescuento.Attributes.Add("onKeyUp", "txtSumaDescuento(this);") TxtIVA.Attributes.Add("onKeyUp", "txtSumaIVA(this);") diff --git a/Bancos/Devoluciones.aspx.cs b/Bancos/Devoluciones.aspx.cs index 18763f816..3155be9f3 100644 --- a/Bancos/Devoluciones.aspx.cs +++ b/Bancos/Devoluciones.aspx.cs @@ -199,7 +199,7 @@ public partial class Bancos_Devoluciones : ClsPaginas ClsMovimientos ObjMov = new ClsMovimientos(); ClsClientes clsClientes = new ClsClientes(); - if (ObjMov.GetMovimientosIE(1, CveCliente, DdlCuenta.SelectedValue.ToEntero(), MinFecha, DateTime.Now, 1, -1, UsuarioActual.CveEmpresa)) + if (ObjMov.GetMovimientosIE(1, CveCliente, DdlCuenta.SelectedValue.ToEntero(), MinFecha, NowADS(), 1, -1, UsuarioActual.CveEmpresa)) { GvDevoluciones.DataSource = ObjMov.DtResultados.FiltraParametros("Saldo > 0 "); GvDevoluciones.DataBind(); @@ -419,7 +419,7 @@ public partial class Bancos_Devoluciones : ClsPaginas int vecesAplicar = TxtVecesAplicar.Text.ToEntero(); decimal montoLimite = 0; - string fechaInicioAplicacion = DateTime.Now.ToString("yyyy/MM/dd"); + string fechaInicioAplicacion = NowADS().ToString("yyyy/MM/dd"); bool estatus = true; int CveCuenta = -1; int CveMovtoPermanente = ObjNom.AddMovtoPermanente(cveConcepto, cvePersonal, descripcion, tipoDescuento, valor, vecesAplicar, montoLimite, fechaInicioAplicacion, estatus, CveCuenta); diff --git a/Bancos/FluctuacionCambiaria.aspx.vb b/Bancos/FluctuacionCambiaria.aspx.vb index 7a4eb6aee..b356bd7b9 100644 --- a/Bancos/FluctuacionCambiaria.aspx.vb +++ b/Bancos/FluctuacionCambiaria.aspx.vb @@ -47,9 +47,9 @@ Partial Class Bancos_FluctuacionCambiaria #Region "CARGAS" Private Sub CargaFechas() 'Año actual - DdlAnio.Items.Add(New ListItem(Now.Year.ToString(), Now.Year.ToString())) + DdlAnio.Items.Add(New ListItem(NowADS().Year.ToString(), NowADS().Year.ToString())) 'Año Anterior - DdlAnio.Items.Add(New ListItem(Now.AddYears(-1).Year.ToString(), Now.AddYears(-1).Year.ToString())) + DdlAnio.Items.Add(New ListItem(NowADS().AddYears(-1).Year.ToString(), NowADS().AddYears(-1).Year.ToString())) For i As Integer = 1 To 12 Dim fecha As DateTime = New DateTime(DdlAnio.SelectedValue.ToEntero(), i, 1) @@ -59,7 +59,7 @@ Partial Class Bancos_FluctuacionCambiaria DdlMes.Items.Add(New ListItem(mesStr, i.ToString())) Next - Dim UltimaFluctuacion As MTipoCambioFluctuacion = GlobalTipoCambioUltimaFluctuacion(Now) + Dim UltimaFluctuacion As MTipoCambioFluctuacion = GlobalTipoCambioUltimaFluctuacion(NowADS()) If UltimaFluctuacion IsNot Nothing Then DdlMes.SelectedValueExist(UltimaFluctuacion.FechaFluctuacion.Month) DdlMes.SelectedValueExist(UltimaFluctuacion.FechaFluctuacion.Year) @@ -98,17 +98,17 @@ Partial Class Bancos_FluctuacionCambiaria Private Sub CargaUltimaFluctuacion() - Dim UltimaFluctuacion As MTipoCambioFluctuacion = GlobalTipoCambioUltimaFluctuacion(Now) + Dim UltimaFluctuacion As MTipoCambioFluctuacion = GlobalTipoCambioUltimaFluctuacion(NowADS()) If UltimaFluctuacion IsNot Nothing Then LtlUltimaFluctuacion.Text = String.Format("Ultima Fluctuación : {0}", UltimaFluctuacion.FechaFluctuacion.ToShortDateString) 'si la ultima fluctuacion es mayor o igual al fin de mes anterior, entonces pon la fecha actual - If UltimaFluctuacion.FechaFluctuacion >= Now.AddMonths(-1).LastDayOfMonth Then - DdlMes.SelectedValueExist(Now.Month) - DdlAnio.SelectedValueExist(Now.Year) + If UltimaFluctuacion.FechaFluctuacion >= NowADS().AddMonths(-1).LastDayOfMonth Then + DdlMes.SelectedValueExist(NowADS().Month) + DdlAnio.SelectedValueExist(NowADS().Year) Else - DdlMes.SelectedValueExist(Now.AddMonths(-1).Month) - DdlAnio.SelectedValueExist(Now.AddMonths(-1).Year) + DdlMes.SelectedValueExist(NowADS().AddMonths(-1).Month) + DdlAnio.SelectedValueExist(NowADS().AddMonths(-1).Year) End If End If @@ -1238,7 +1238,7 @@ Partial Class Bancos_FluctuacionCambiaria StrFiltro.AppendFormat("TC: {0}", LtTipoCambioActual.Text) If (T.ActiveTabIndex = 0) Then - 'GvProveedores.ExportToExcelGembox("FluctuacionCambiariaProveedores_" & Now.ToShortDateString) + 'GvProveedores.ExportToExcelGembox("FluctuacionCambiariaProveedores_" & NowADS().ToShortDateString) GvProveedores.ExportToExcelGembox("Fluctuacion." + T.ActiveTab.HeaderText + "." + DdlMes.SelectedItem.ToString + "." + DdlAnio.SelectedValue, UsuarioActual, "Fluctuación Cambiaria - Proveedores", DatosFiltros:=StrFiltro.ToString()) ElseIf (T.ActiveTabIndex = 1) Then GvProveedoresAnt.ExportToExcelGembox("Fluctuacion." + T.ActiveTab.HeaderText + "." + DdlMes.SelectedItem.ToString + "." + DdlAnio.SelectedValue, UsuarioActual, "Fluctuación Cambiaria - Proveedores Anticipos", DatosFiltros:=StrFiltro.ToString()) diff --git a/Bancos/FlujoDiario.aspx.vb b/Bancos/FlujoDiario.aspx.vb index 0b80f2f92..23aa78957 100644 --- a/Bancos/FlujoDiario.aspx.vb +++ b/Bancos/FlujoDiario.aspx.vb @@ -44,7 +44,7 @@ Partial Class Bancos_FlujoDiario Private Sub Bancos_FlujoDiario_Load(sender As Object, e As EventArgs) Handles Me.Load If Not IsPostBack Then - TxtFecha.Text = Now.ToString + TxtFecha.Text = NowADS().ToString End If End Sub @@ -55,7 +55,7 @@ Partial Class Bancos_FlujoDiario params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("Fecha", TxtFecha.Text.ToDate.ToLongDateString)) If Imagen.Exists Then diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb index cb3668154..8d394b1fc 100644 --- a/Bancos/IE.aspx.vb +++ b/Bancos/IE.aspx.vb @@ -582,7 +582,7 @@ Partial Class Bancos_IE Folio = "" DirectCast(Master.FindControl("TSM"), ScriptManager).EnablePageMethods = True TxtImporte.Attributes.Add("onblur", "upIE(this);FncImporteCuenta(this);") - 'Calendario.StartDate = Now.AddMonths(-2).FirstDayOfMonth() + 'Calendario.StartDate = NowADS().AddMonths(-2).FirstDayOfMonth() ViewState("IDPoliza") = "-1" CveIEDeposito = -1 CveIEDeposito2 = -1 @@ -591,8 +591,8 @@ Partial Class Bancos_IE CvePrePoliza = -1 CveSolicitudViatico = -1 ComplementoSerieFolio = "" - 'TxtFechaDevuelto.Text = Now.ToShortDateString - TxtFechaCancelacion.Text = Now.ToShortDateString + 'TxtFechaDevuelto.Text = NowADS().ToShortDateString + TxtFechaCancelacion.Text = NowADS().ToShortDateString CveCompraDeCDin = -1 'If UsuarioActual.CveEmpresa.Contiene(66) Then trNotificar.Visible = True @@ -736,7 +736,7 @@ Partial Class Bancos_IE 'Configuración de Modalidad Insert ImgAddObs.Visible = False CveIE = -1 - TxtFechaDocumento.Text = Now.ToShortDateString + TxtFechaDocumento.Text = NowADS().ToShortDateString ImgUpdateCuentaDeposito.Visible = False TxtFechaDocumento.Attributes.Add("onchange", "CambiaTC(this);") End If @@ -2102,7 +2102,7 @@ Partial Class Bancos_IE If CveCliente > 0 AndAlso Not DivIvaIxC.Visible AndAlso TxtIvaIxC.Text.ToDouble = 0 Then 'RMF- CASO DONDE HAY UNA DEVOLUCION Y TENGO QUE AFECTAR LAS FACTURAS QUE SE HABIAN MARCADO COMO PAGADAS TENGO QUE REGRESARLAS A PENDIENTES Dim Mov As New ClsMovimientos - If Mov.GetMovimientosIE(2, DdlIEDevolucion.SelectedValue.ToEntero, -1, Now, Now, 1, 0, UsuarioActual.CveEmpresa) Then + If Mov.GetMovimientosIE(2, DdlIEDevolucion.SelectedValue.ToEntero, -1, NowADS(), NowADS(), 1, 0, UsuarioActual.CveEmpresa) Then Dim DtIE As DataTable = Mov.DtResultados For Each dr As DataRow In DtIE.Rows @@ -2148,7 +2148,7 @@ Partial Class Bancos_IE Dim ConceptoContable As Integer Dim TipoMovimiento As Boolean Dim importeMovimiento As Decimal - Dim FechaMovimiento As Date = Now + Dim FechaMovimiento As Date = NowADS() Dim Concepto As String = "" Dim Referencia As String = PagueseA @@ -2715,7 +2715,7 @@ Partial Class Bancos_IE Dim ConceptoContable As Integer Dim TipoMovimiento As Boolean Dim importeMovimiento As Decimal = TxtImporte.Text.ToDecimal - Dim FechaMovimiento As Date = Now + Dim FechaMovimiento As Date = NowADS() Dim Concepto As String = "" Dim Referencia As String = PagueseA Dim CveCredito As Integer @@ -3541,7 +3541,7 @@ Partial Class Bancos_IE Dim ObjCancelacion As New Timbrado If EstatusSATCancelado(FolioFiscalCancelar, UsuarioActual.Empresa.RFC, RFCReceptorCancelar) Then - If Banc.UpdateComplementoPagoCancelado(CveComplementoPagoCancelar, 2, CvePACCancelacion, UsuarioActual.CveEmpresa, Date.Now, "", 1) Then + If Banc.UpdateComplementoPagoCancelado(CveComplementoPagoCancelar, 2, CvePACCancelacion, UsuarioActual.CveEmpresa, NowADS(), "", 1) Then CargaComplementosPago() RegistraScript("$('#ModalCancelarComplemetno').modal('hide');") ErrorCancelarComplemento = False @@ -4031,7 +4031,7 @@ Partial Class Bancos_IE If HdnCveCliente.Value.ToEntero > 0 Then trIEDevolucion.Visible = True - If ObjMov.GetMovimientosIE(1, HdnCveCliente.Value.ToEntero, DdlCuenta.SelectedValue.ToEntero, Now.AddMonths(-24), Now, CveMoneda, -1, UsuarioActual.CveEmpresa) Then + If ObjMov.GetMovimientosIE(1, HdnCveCliente.Value.ToEntero, DdlCuenta.SelectedValue.ToEntero, NowADS().AddMonths(-24), NowADS(), CveMoneda, -1, UsuarioActual.CveEmpresa) Then DtIEDevolucion = ObjMov.DtResultados.FiltraParametros("Saldo > 0 ") Else Alert("Ocurrió un error al cargar los Egresos del Proveedor seleccionado. Por favor vuelva a intetar.", TipoMensaje.MsgError) @@ -4867,7 +4867,7 @@ Partial Class Bancos_IE Protected Sub LnkCancelar_Click(sender As Object, e As EventArgs) If ChkConciliado.Checked AndAlso UsuarioActual.CveEmpresa = 119 Then - 'TxtFechaDesconciliado.Text = Now.ToShortDateString + 'TxtFechaDesconciliado.Text = NowADS().ToShortDateString 'UpDesconciliar.Update() 'RegistraScript("$('#DModalDesconciliar').modal()") Dim fechaCancelacion As String = TxtFechaAplicado.Text.ToDate.AddMonths(1).FirstDayOfMonth.ToShortDateString @@ -4916,7 +4916,7 @@ Partial Class Bancos_IE Dim Banco As New ClsBancos - If Banco.GetComplementoPagosRep(-1, Now.AddYears(-2), Now, CveIE, -1, 1, UsuarioActual.CveEmpresa, -1) Then + If Banco.GetComplementoPagosRep(-1, NowADS().AddYears(-2), NowADS(), CveIE, -1, 1, UsuarioActual.CveEmpresa, -1) Then If Not Banco.DtResultados.Rows.Count > 0 Then Banco.Dispose() Alert("No se generaron complementos de pago porque no hay facturas con método de pago PPD", TipoMensaje.MsgAdvertencia) @@ -5381,7 +5381,7 @@ Partial Class Bancos_IE If EstatusSATCancelado(FolioFiscalCancelar, UsuarioActual.Empresa.RFC, RFCReceptorCancelar) Then - If ObjBanco.UpdateComplementoPagoCancelado(CveComplementoPagoCancelar, 2, CvePACCancelacion, UsuarioActual.CveEmpresa, Date.Now, "", 1) Then + If ObjBanco.UpdateComplementoPagoCancelado(CveComplementoPagoCancelar, 2, CvePACCancelacion, UsuarioActual.CveEmpresa, NowADS(), "", 1) Then CargaComplementosPago() Alert("El complemento se cancelo correctamente.") End If @@ -5612,8 +5612,8 @@ Partial Class Bancos_IE UpEliminarCotizacion.Update() End Sub Private Sub RVTxtFechaDocumento_Init(sender As Object, e As EventArgs) Handles RVTxtFechaDocumento.Init - RVTxtFechaDocumento.MaximumValue = DateTime.Now.ToShortDateString - Calendario.EndDate = DateTime.Now + RVTxtFechaDocumento.MaximumValue = NowADS().ToShortDateString + Calendario.EndDate = NowADS() End Sub Private Sub CargaOCRelacionadas() diff --git a/Bancos/IE2.aspx.vb b/Bancos/IE2.aspx.vb index c8a8bba77..caf5f55d1 100644 --- a/Bancos/IE2.aspx.vb +++ b/Bancos/IE2.aspx.vb @@ -94,7 +94,7 @@ Partial Class Bancos_IE DirectCast(Master.FindControl("TSM"), ScriptManager).EnablePageMethods = True TxtImporte.Attributes.Add("onblur", "upIE(this);") - Calendario.StartDate = Now.AddMonths(-1) + Calendario.StartDate = NowADS().AddMonths(-1) ' rbPagueseA.Attributes.Add("onchange", "upPagueseA(this);") 'If UsuarioActual.CveRol = 1 Then 'rbPagueseAFuncionarioEmpleado.Visible = True : lblPagueseAFuncionarioEmpleado.Visible = True : rbPagueseAProveedor.Visible = True : lblPagueseAProveedor.Visible = True @@ -210,7 +210,7 @@ Partial Class Bancos_IE 'Configuración de Modalidad Insert ImgAddObs.Visible = False CveIE = -1 - TxtFechaDocumento.Text = Now.ToShortDateString + TxtFechaDocumento.Text = NowADS().ToShortDateString End If @@ -889,14 +889,14 @@ Partial Class Bancos_IE If Not Opcion.Contiene("DEV", "ANTC") AndAlso MsgError = "" Then 'MOVIMIENTOS EGRESOS - If ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, TxtImporte.Text.ToDouble, TxtObservaciones.Text, CveConceptoContable, TxtObservaciones.Text, Now, 0, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle) Then + If ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, TxtImporte.Text.ToDouble, TxtObservaciones.Text, CveConceptoContable, TxtObservaciones.Text, NowADS(), 0, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle) Then Dim IVA As Double = 0 ' TxtImporte.Text.ToDouble * HdnProvPorIVA.Value.ToDouble - If ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtImporte.Text.ToDouble - IVA - CIF, TxtObservaciones.Text, CveConceptoCompra, TxtObservaciones.Text, Now, 0, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle) Then - If IVA > 0 AndAlso Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, IVA, TxtObservaciones.Text, 19, TxtObservaciones.Text, Now, 0, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle) Then + If ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtImporte.Text.ToDouble - IVA - CIF, TxtObservaciones.Text, CveConceptoCompra, TxtObservaciones.Text, NowADS(), 0, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle) Then + If IVA > 0 AndAlso Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, IVA, TxtObservaciones.Text, 19, TxtObservaciones.Text, NowADS(), 0, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle) Then MsgError = "Detalle" End If 'intereses pagados - If CIF > 0 AndAlso Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, CIF, TxtObservaciones.Text, 46, TxtObservaciones.Text, Now, 0, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle) Then + If CIF > 0 AndAlso Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, CIF, TxtObservaciones.Text, 46, TxtObservaciones.Text, NowADS(), 0, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle) Then MsgError = "Detalle" End If Else @@ -910,8 +910,8 @@ Partial Class Bancos_IE 'MOVIMIENTOS INGRESOS - DEVOLUCIONES ElseIf Opcion.Contiene("DEV", "ANTC") AndAlso MsgError = "" Then - 'If ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtImporte.Text.ToDouble, TxtObservaciones.Text, CveConceptoContable, TxtObservaciones.Text, Now, 0, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCliente:=CveCliente, CveCreditoDetalle:=CveCreditoDetalle) Then - ' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, TxtImporte.Text.ToDouble, TxtObservaciones.Text, CveConceptoCompra, TxtObservaciones.Text, Now, 0, -1, If(CveProveedor > 0, DdlIEDevolucion.SelectedValue.ToEntero, CveIE), CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCliente:=CveCliente, CveCreditoDetalle:=CveCreditoDetalle) Then + 'If ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtImporte.Text.ToDouble, TxtObservaciones.Text, CveConceptoContable, TxtObservaciones.Text, NowADS(), 0, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCliente:=CveCliente, CveCreditoDetalle:=CveCreditoDetalle) Then + ' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, TxtImporte.Text.ToDouble, TxtObservaciones.Text, CveConceptoCompra, TxtObservaciones.Text, NowADS(), 0, -1, If(CveProveedor > 0, DdlIEDevolucion.SelectedValue.ToEntero, CveIE), CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCliente:=CveCliente, CveCreditoDetalle:=CveCreditoDetalle) Then ' MsgError = "no se pudo insertar el detalle de la póliza 2" ' End If 'Else @@ -922,7 +922,7 @@ Partial Class Bancos_IE Dim tipoCambio As Decimal If DdlMoneda.SelectedValue.ToString.ToEntero = 2 Then - tipoCambio = GlobalTipoCambio(Now).ToString.ToDecimal + tipoCambio = GlobalTipoCambio(NowADS()).ToString.ToDecimal Else tipoCambio = 1 End If @@ -958,8 +958,8 @@ Partial Class Bancos_IE Else 'EMpresa Prueba - If ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtImporte.Text.ToDouble, TxtObservaciones.Text, CveConceptoContable, TxtObservaciones.Text, Now, 0, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle) Then - If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, TxtImporte.Text.ToDouble, TxtObservaciones.Text, CveConceptoCompra, TxtObservaciones.Text, Now, 0, -1, If(CveProveedor > 0, DdlIEDevolucion.SelectedValue.ToEntero, CveIE), CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle) Then + If ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtImporte.Text.ToDouble, TxtObservaciones.Text, CveConceptoContable, TxtObservaciones.Text, NowADS(), 0, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle) Then + If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, TxtImporte.Text.ToDouble, TxtObservaciones.Text, CveConceptoCompra, TxtObservaciones.Text, NowADS(), 0, -1, If(CveProveedor > 0, DdlIEDevolucion.SelectedValue.ToEntero, CveIE), CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle) Then MsgError = "no se pudo insertar el detalle de la póliza 2" End If Else diff --git a/Bancos/MovimientosBancarios.aspx.vb b/Bancos/MovimientosBancarios.aspx.vb index ff1c36c07..e12ee58a9 100644 --- a/Bancos/MovimientosBancarios.aspx.vb +++ b/Bancos/MovimientosBancarios.aspx.vb @@ -178,9 +178,9 @@ Partial Class Bancos_MovimientosBancarios '''''' LLENADO HEADER Dim convenio As String = "000775770" 'Campos #1-4 del Header - HeaderTexto = String.Format("H{0}{1}GRUPO01 ", convenio.PadLeft(9, PadCeros), DateTime.Now().ToString("yyyy-MM-dd")) + HeaderTexto = String.Format("H{0}{1}GRUPO01 ", convenio.PadLeft(9, PadCeros), NowADS().ToString("yyyy-MM-dd")) 'Campo #5 del Header - HeaderTexto &= String.Format("{0}{1}", DTProveedorActual(0)("CveProveedor"), DateTime.Now().ToString("yyyyMMdd")).PadRight(20) + HeaderTexto &= String.Format("{0}{1}", DTProveedorActual(0)("CveProveedor"), NowADS().ToString("yyyyMMdd")).PadRight(20) 'Campos #6-8 del Header HeaderTexto &= String.Format("00").PadRight(586) Dim HeaderLength = HeaderTexto.Length @@ -209,7 +209,7 @@ Partial Class Bancos_MovimientosBancarios 'Llenamos en blanco datos de otros bancos 'Campos 8-17 del detalle --- 64 de otros bancos y 45 para FILLER --- Fecha de Alta - DetalleTexto &= String.Format("{0}{1}", Vacio.PadLeft(109), DateTime.Now().ToString("yyyy-MM-dd")) + DetalleTexto &= String.Format("{0}{1}", Vacio.PadLeft(109), NowADS().ToString("yyyy-MM-dd")) 'Otros Bancos NACIONAL!! Else @@ -218,7 +218,7 @@ Partial Class Bancos_MovimientosBancarios 'Llenamos datos de otros bancos 'Campos 8- 17 del detalle --- 44 de otros bancos --- 20 de internacional --- 45 Filler -- Fecha de Alta - DetalleTexto &= String.Format("MXP40{0}0014{1}{2}{3}", RowBanco("CLABE").ToString.PadLeft(35, PadCeros), Vacio.PadRight(20), Vacio.PadRight(45), DateTime.Now().ToString("yyyy-MM-dd")) + DetalleTexto &= String.Format("MXP40{0}0014{1}{2}{3}", RowBanco("CLABE").ToString.PadLeft(35, PadCeros), Vacio.PadRight(20), Vacio.PadRight(45), NowADS().ToString("yyyy-MM-dd")) End If 'Llenamos datos de Tipo de Persona - Fisica o Moral @@ -282,7 +282,7 @@ Partial Class Bancos_MovimientosBancarios ' 'Campos 19-21 --- 60 Tipo Persona Moral y 10 FILLER ' DetalleTexto &= Vacio.PadLeft(70) ' 'Campos 22-26 --- Tipo Persona Fisica y #26 RFC - ' DetalleTexto &= String.Format("{0}{1}{2}{3}{4}", TxtNombrePF.Text.ToUpper.PadRight(20), TxtApellidoPPF.Text.ToUpper.PadRight(20), TxtApellidoMPF.Text.ToUpper.PadRight(20), DateTime.Now().ToString("yyyy-MM-dd"), TxtRFC.Text.ToUpper.PadRight(14)) + ' DetalleTexto &= String.Format("{0}{1}{2}{3}{4}", TxtNombrePF.Text.ToUpper.PadRight(20), TxtApellidoPPF.Text.ToUpper.PadRight(20), TxtApellidoMPF.Text.ToUpper.PadRight(20), NowADS().ToString("yyyy-MM-dd"), TxtRFC.Text.ToUpper.PadRight(14)) ' End If 'End Sub @@ -337,9 +337,9 @@ Partial Class Bancos_MovimientosBancarios '''''' LLENADO HEADER 'Campos #1-4 del Header - HeaderTexto = String.Format("H{0}{1}01", convenio.PadLeft(9, PadCeros), DateTime.Now().ToString("yyyy-MM-dd")) + HeaderTexto = String.Format("H{0}{1}01", convenio.PadLeft(9, PadCeros), NowADS().ToString("yyyy-MM-dd")) 'Campo #5 del Header - HeaderTexto &= String.Format("P{0}{1}", DateTime.Now().ToString("s").Replace("-", "").Replace(":", ""), Vacio.PadRight(14)) + HeaderTexto &= String.Format("P{0}{1}", NowADS().ToString("s").Replace("-", "").Replace(":", ""), Vacio.PadRight(14)) 'Campos #6-11 del Header HeaderTexto &= String.Format("00").PadRight(1314) @@ -377,7 +377,7 @@ Partial Class Bancos_MovimientosBancarios End If 'Campos 24-50 del Detalle 0 1 2 3 4 5 6 7 8 9 - DetalleTexto &= String.Format("{0}{1}FA{2}{3}01{4}N{5}{6}{7}{7}{7}{6}N {7}700{8}{9}{7}", Divisa, Vacio.PadLeft(20), Importe.FormatoNumero.Replace(",", "").Replace(".", "").PadLeft(15, PadCeros), Vacio.PadRight(15, PadCeros), Vacio.PadRight(50), Vacio.PadRight(12, PadCeros), DateTime.Now.ToString("yyyy-MM-dd"), "0001-01-01", Datos.PadRight(700), Vacio.PadRight(52)) + DetalleTexto &= String.Format("{0}{1}FA{2}{3}01{4}N{5}{6}{7}{7}{7}{6}N {7}700{8}{9}{7}", Divisa, Vacio.PadLeft(20), Importe.FormatoNumero.Replace(",", "").Replace(".", "").PadLeft(15, PadCeros), Vacio.PadRight(15, PadCeros), Vacio.PadRight(50), Vacio.PadRight(12, PadCeros), NowADS().ToString("yyyy-MM-dd"), "0001-01-01", Datos.PadRight(700), Vacio.PadRight(52)) TotalAcumulado += Importe.ToEntero End Sub #End Region diff --git a/Bancos/NotificacionCheques.aspx.vb b/Bancos/NotificacionCheques.aspx.vb index 76f991f84..4273f09c5 100644 --- a/Bancos/NotificacionCheques.aspx.vb +++ b/Bancos/NotificacionCheques.aspx.vb @@ -31,8 +31,8 @@ Partial Class Bancos_NotificacionCheques Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load If Not Page.IsPostBack Then - txtFechaI.Text = Now.AddMonths(-1).FirstDayOfMonth.ToShortDateString - txtFechaF.Text = Now.ToShortDateString + txtFechaI.Text = NowADS().AddMonths(-1).FirstDayOfMonth.ToShortDateString + txtFechaF.Text = NowADS().ToShortDateString CargaTipoTransaccion("Egs") CargaPorNotificar() CargaPorEntregar() @@ -470,7 +470,7 @@ Partial Class Bancos_NotificacionCheques Dim objIE As New ClsBancos - If objIE.UpdateBancos_IENotificaciones(2, Now.ToString("dd/MM/yyyy"), gvr.FCTextBox("txtObservacionEntrega").Text, gvr.DataKey("CveIE").ToEntero) Then + If objIE.UpdateBancos_IENotificaciones(2, NowADS().ToString("dd/MM/yyyy"), gvr.FCTextBox("txtObservacionEntrega").Text, gvr.DataKey("CveIE").ToEntero) Then Alert("Cheque marcado como Entregado") End If diff --git a/Bancos/PagoAcreedor.aspx.cs b/Bancos/PagoAcreedor.aspx.cs index b8b2856c6..42b3d4f01 100644 --- a/Bancos/PagoAcreedor.aspx.cs +++ b/Bancos/PagoAcreedor.aspx.cs @@ -44,10 +44,10 @@ public partial class Bancos_PagoAcreedor : ClsPaginas CargaProveedores(); CargaReporte(); CargaSubproyectos(); - TxtFechaDocumento.Text = DateTime.Now.ToShortDateString(); - TxtFechaPrestamo.Text = DateTime.Now.ToShortDateString(); - txtFechaI.Text = DateTime.Now.FirstDayOfMonth().ToShortDateString(); - txtFechaF.Text = DateTime.Now.ToShortDateString(); + TxtFechaDocumento.Text = NowADS().ToShortDateString(); + TxtFechaPrestamo.Text = NowADS().ToShortDateString(); + txtFechaI.Text = NowADS().FirstDayOfMonth().ToShortDateString(); + txtFechaF.Text = NowADS().ToShortDateString(); TxtImporte.Attributes.Add("disabled", "disabled"); } diff --git a/Bancos/PagoDeudor.aspx.cs b/Bancos/PagoDeudor.aspx.cs index 0330a0c2e..6bd3aeda1 100644 --- a/Bancos/PagoDeudor.aspx.cs +++ b/Bancos/PagoDeudor.aspx.cs @@ -47,10 +47,10 @@ public partial class Bancos_PagoDeudor : ClsPaginas CveMonedaPrestamo = 1; UsaComplementaria = false; if (UsuarioActual.CveEmpresa.Contiene(1, 119)) { UsaComplementaria = true; } - TxtFechaDocumento.Text = DateTime.Now.ToShortDateString(); - TxtFechaPrestamo.Text = DateTime.Now.ToShortDateString(); - txtFechaI.Text = DateTime.Now.FirstDayOfMonth().ToShortDateString(); - txtFechaF.Text = DateTime.Now.ToShortDateString(); + TxtFechaDocumento.Text = NowADS().ToShortDateString(); + TxtFechaPrestamo.Text = NowADS().ToShortDateString(); + txtFechaI.Text = NowADS().FirstDayOfMonth().ToShortDateString(); + txtFechaF.Text = NowADS().ToShortDateString(); TxtTCDolaresPrestamo.Text = get_GlobalTipoCambio(TxtFechaPrestamo.Text.ToDateTime()).FormatoNumero(4); TxtTCDolaresPago.Text = get_GlobalTipoCambio(TxtFechaDocumento.Text.ToDateTime()).FormatoNumero(4); TxtImporte.Attributes.Add("disabled", "disabled"); diff --git a/Bancos/PagoElectronico.aspx.vb b/Bancos/PagoElectronico.aspx.vb index 1ee047ded..707da915e 100644 --- a/Bancos/PagoElectronico.aspx.vb +++ b/Bancos/PagoElectronico.aspx.vb @@ -174,8 +174,8 @@ Partial Class Bancos_PagoElectronico CveCuenta = -1 TipoMasiva = 1 - txtFechaI.Text = Date.Now.ToShortDateString - txtFechaF.Text = Date.Now.ToShortDateString + txtFechaI.Text = NowADS().ToShortDateString + txtFechaF.Text = NowADS().ToShortDateString CargaCuentas() CargaProveedores() @@ -309,7 +309,7 @@ Partial Class Bancos_PagoElectronico .Clear() .Buffer = True .ContentType = "textplain" - .AddHeader("Content-Disposition", String.Format("attachment;filename={0}{1}.txt", NombreArchivo, Date.Now.ToString("ddMMyyyy"))) + .AddHeader("Content-Disposition", String.Format("attachment;filename={0}{1}.txt", NombreArchivo, NowADS().ToString("ddMMyyyy"))) .Charset = "UTF-8" .ContentEncoding = Encoding.Default .Write(TextoCompleto) @@ -337,7 +337,7 @@ Partial Class Bancos_PagoElectronico DirectoryExistsCreate(String.Format("{0}Layout", UsuarioActual.Empresa.Ruta)) - NombreArchivo = String.Format("{2}{1}{0}.txt", UsuarioActual.CveUsuario, Date.Now.ToString("yyyyMMdd-HH-mm"), If(Tipo = 1, "LAYOUTPAGO", "LAYOUTALTA")) + NombreArchivo = String.Format("{2}{1}{0}.txt", UsuarioActual.CveUsuario, NowADS().ToString("yyyyMMdd-HH-mm"), If(Tipo = 1, "LAYOUTPAGO", "LAYOUTALTA")) Dim path As String = String.Format("{0}Layout\{1}", UsuarioActual.Empresa.Ruta, NombreArchivo) Dim fs As FileStream = File.Create(path) @@ -412,7 +412,7 @@ Partial Class Bancos_PagoElectronico 'Si la fecha de generacion del archivo es diferente de hoy activamos el boton REGENERAR - 'If e.Row.DBCampo("Fecha").ToDate.ToShortDateString <> Date.Now.ToShortDateString Then + 'If e.Row.DBCampo("Fecha").ToDate.ToShortDateString <> NowADS().ToShortDateString Then ' e.Row.FCLinkButton("LBRegenerar").Visible = True 'End If If DTEnviadas.MAX("FueConciliado", String.Format("CveLayoutEnvio = {0}", e.Row.DBCampo("CveLayoutEnvio"))).ToEntero > 0 Then @@ -673,7 +673,7 @@ Partial Class Bancos_PagoElectronico 'Llenamos en blanco datos de otros bancos 'Campos 8-17 del detalle --- 64 de otros bancos y 45 para FILLER --- Fecha de Alta - DetalleTexto &= String.Format("{0}{1}", Vacio.PadLeft(109), DateTime.Now().ToString("yyyy-MM-dd")) + DetalleTexto &= String.Format("{0}{1}", Vacio.PadLeft(109), NowADS().ToString("yyyy-MM-dd")) 'Otros Bancos NACIONAL!! @@ -687,7 +687,7 @@ Partial Class Bancos_PagoElectronico 'Llenamos datos de otros bancos 'Campos 8- 17 del detalle --- 44 de otros bancos --- 20 de internacional --- 45 Filler -- Fecha de Alta - DetalleTexto &= String.Format("{0}40{1}{2}{3}{4}{5}", DTPendienteActual(0)("Abreviatura").ToString, DTPendienteActual(0)("CLABE").ToString.PadLeft(35, PadCeros), DTPendienteActual(0)("CLABE").ToString.Substring(0, 3).PadLeft(4, PadCeros), Vacio.PadRight(20), Vacio.PadRight(45), DateTime.Now().ToString("yyyy-MM-dd")) + DetalleTexto &= String.Format("{0}40{1}{2}{3}{4}{5}", DTPendienteActual(0)("Abreviatura").ToString, DTPendienteActual(0)("CLABE").ToString.PadLeft(35, PadCeros), DTPendienteActual(0)("CLABE").ToString.Substring(0, 3).PadLeft(4, PadCeros), Vacio.PadRight(20), Vacio.PadRight(45), NowADS().ToString("yyyy-MM-dd")) End If 'Llenamos datos de Tipo de Persona - Fisica o Moral @@ -800,14 +800,14 @@ Partial Class Bancos_PagoElectronico '''''' LLENADO HEADER Dim convenio As String = DTPendienteActual(0)("ConvenioPagoElectronico").ToString 'Campos #1-4 del Header - HeaderTexto = String.Format("H{0}{1}GRUPO01 ", convenio.PadLeft(9, PadCeros), DateTime.Now().ToString("yyyy-MM-dd")) + HeaderTexto = String.Format("H{0}{1}GRUPO01 ", convenio.PadLeft(9, PadCeros), NowADS().ToString("yyyy-MM-dd")) 'Campo #5 del Header Dim IdentificadoUsuario As String = UsuarioActual.Usuario.Replace(" ", "").Replace(".", "").Replace("@", "").Replace("/", "").Replace("\", "").Replace("-", "").Replace("&", "").Replace(",", "").Replace("+", "").Replace("_", "").ToUpper.Trim IdentificadoUsuario = If(IdentificadoUsuario.Length > 12, IdentificadoUsuario.Substring(0, 12), IdentificadoUsuario) - ' Dim Identificado As String = String.Format("{0}{1}", UsuarioActual.Usuario, DateTime.Now().ToString("yyyyMMdd"))) + ' Dim Identificado As String = String.Format("{0}{1}", UsuarioActual.Usuario, NowADS().ToString("yyyyMMdd"))) - HeaderTexto &= String.Format("{0}{1}", IdentificadoUsuario, DateTime.Now().ToString("yyyyMMdd")).PadRight(20) + HeaderTexto &= String.Format("{0}{1}", IdentificadoUsuario, NowADS().ToString("yyyyMMdd")).PadRight(20) 'Campos #6-8 del Header HeaderTexto &= String.Format("00").PadRight(586) Dim HeaderLength As Integer = HeaderTexto.Length @@ -893,7 +893,7 @@ Partial Class Bancos_PagoElectronico 'ACTUALIZA FECHADOCUMENTO DEL IE 'If CveBLE > 0 Then - ' ObjBancos.UpdateBancos_IE(Date.Now, Date.Now, DTPendienteActual(0)("CveIE").ToString.ToEntero) + ' ObjBancos.UpdateBancos_IE(NowADS(), NowADS(), DTPendienteActual(0)("CveIE").ToString.ToEntero) 'End If If TotalDetalles > 0 Then @@ -909,13 +909,13 @@ Partial Class Bancos_PagoElectronico If CveBLE > 0 Then 'ACTUALIZAMOS EL ENVIO SI ES REGENERACION - If Not ObjBancos.UpdateLayoutEnvios(CveBLE, Date.Now) Then + If Not ObjBancos.UpdateLayoutEnvios(CveBLE, NowADS()) Then ErrorLayout = True End If 'GUARDAMOS EL ENVIO SI NO ES REGENERACION Else - Dim CveLayoutEnvio As Integer = ObjBancos.AddLayoutEnvios(NombreArchivo, Date.Now, CveCuenta) + Dim CveLayoutEnvio As Integer = ObjBancos.AddLayoutEnvios(NombreArchivo, NowADS(), CveCuenta) If CveLayoutEnvio > 0 Then For Each dr As DataRow In DTTemp.Rows @@ -1006,7 +1006,7 @@ Partial Class Bancos_PagoElectronico 'Correo = If(Correo.Length > 0, Correo.ToUpper.PadRight(50), Vacio.PadRight(50)) 'Campos 24-50 del Detalle 0 1 2 3 4 5 6 7 8 9 - DetalleTexto &= String.Format("{0}{1}FA{2}{3}01{4}N{5}{6}{7}{7}{7}{6}N {7}700{8}{9}{7}", Divisa, Vacio.PadLeft(20), Importe.FormatoNumero.Replace(",", "").Replace(".", "").PadLeft(15, PadCeros), Vacio.PadRight(15, PadCeros), Correo, Vacio.PadRight(12, PadCeros), DateTime.Now.ToString("yyyy-MM-dd"), "0001-01-01", Observaciones.PadRight(700), Vacio.PadRight(52)) + DetalleTexto &= String.Format("{0}{1}FA{2}{3}01{4}N{5}{6}{7}{7}{7}{6}N {7}700{8}{9}{7}", Divisa, Vacio.PadLeft(20), Importe.FormatoNumero.Replace(",", "").Replace(".", "").PadLeft(15, PadCeros), Vacio.PadRight(15, PadCeros), Correo, Vacio.PadRight(12, PadCeros), NowADS().ToString("yyyy-MM-dd"), "0001-01-01", Observaciones.PadRight(700), Vacio.PadRight(52)) TotalAcumulado += Importe.ToDouble ''LLENA DTPAGOS PARA REPORTE @@ -1032,9 +1032,9 @@ Partial Class Bancos_PagoElectronico '''''' LLENADO HEADER 'Campos #1-4 del Header - HeaderTexto = String.Format("H{0}{1}01", convenio.PadLeft(9, PadCeros), DateTime.Now().ToString("yyyy-MM-dd")) + HeaderTexto = String.Format("H{0}{1}01", convenio.PadLeft(9, PadCeros), NowADS().ToString("yyyy-MM-dd")) 'Campo #5 del Header - HeaderTexto &= String.Format("P{0}{1}", DateTime.Now().ToString("s").Replace("-", "").Replace(":", ""), Vacio.PadRight(14)) + HeaderTexto &= String.Format("P{0}{1}", NowADS().ToString("s").Replace("-", "").Replace(":", ""), Vacio.PadRight(14)) 'Campos #6-11 del Header HeaderTexto &= String.Format("00").PadRight(1314) @@ -1799,7 +1799,7 @@ Partial Class Bancos_PagoElectronico 'Llenamos en blanco datos de otros bancos 'Campos 8-17 del detalle --- 64 de otros bancos y 45 para FILLER --- Fecha de Alta - DetalleTexto &= String.Format("{0}{1}", Vacio.PadLeft(109), DateTime.Now().ToString("yyyy-MM-dd")) + DetalleTexto &= String.Format("{0}{1}", Vacio.PadLeft(109), NowADS().ToString("yyyy-MM-dd")) 'Otros Bancos NACIONAL!! @@ -1813,7 +1813,7 @@ Partial Class Bancos_PagoElectronico 'Llenamos datos de otros bancos 'Campos 8- 17 del detalle --- 44 de otros bancos --- 20 de internacional --- 45 Filler -- Fecha de Alta - DetalleTexto &= String.Format("{0}40{1}{2}{3}{4}{5}", DTPendienteActual(0)("Abreviatura").ToString, DTPendienteActual(0)("CLABE").ToString.PadLeft(35, PadCeros), DTPendienteActual(0)("CLABE").ToString.Substring(0, 3).PadLeft(4, PadCeros), Vacio.PadRight(20), Vacio.PadRight(45), DateTime.Now().ToString("yyyy-MM-dd")) + DetalleTexto &= String.Format("{0}40{1}{2}{3}{4}{5}", DTPendienteActual(0)("Abreviatura").ToString, DTPendienteActual(0)("CLABE").ToString.PadLeft(35, PadCeros), DTPendienteActual(0)("CLABE").ToString.Substring(0, 3).PadLeft(4, PadCeros), Vacio.PadRight(20), Vacio.PadRight(45), NowADS().ToString("yyyy-MM-dd")) End If 'Llenamos datos de Tipo de Persona - Fisica @@ -1850,9 +1850,9 @@ Partial Class Bancos_PagoElectronico '''''' LLENADO HEADER Dim convenio As String = DTPendienteActual(0)("ConvenioPagoElectronico").ToString 'Campos #1-4 del Header - HeaderTexto = String.Format("H{0}{1}GRUPO01 ", convenio.PadLeft(9, PadCeros), DateTime.Now().ToString("yyyy-MM-dd")) + HeaderTexto = String.Format("H{0}{1}GRUPO01 ", convenio.PadLeft(9, PadCeros), NowADS().ToString("yyyy-MM-dd")) 'Campo #5 del Header - HeaderTexto &= String.Format("{0}{1}", UsuarioActual.CveUsuario, DateTime.Now().ToString("yyyyMMdd")).PadRight(20) + HeaderTexto &= String.Format("{0}{1}", UsuarioActual.CveUsuario, NowADS().ToString("yyyyMMdd")).PadRight(20) 'Campos #6-8 del Header HeaderTexto &= String.Format("00").PadRight(586) Dim HeaderLength As Integer = HeaderTexto.Length @@ -2289,7 +2289,7 @@ Partial Class Bancos_PagoElectronico ' strBody.Append("
    ") - ' strBody.AppendFormat(" Enviado el: {0} {1}
    ", Date.Now.ToLongDateString, Date.Now.ToShortTimeString) + ' strBody.AppendFormat(" Enviado el: {0} {1}
    ", NowADS().ToLongDateString, NowADS().ToShortTimeString) ' strBody.AppendFormat(" Para:{0}
    ", If(UsuarioActual.CveEmpresa = 66, "PAGOS@GLUYASCONSTRUCCIONES.COM", "")) ' strBody.Append(" Asunto: CONFIRMACION SIT DISPERSION ") ' strBody.Append("

    ") @@ -2751,7 +2751,7 @@ Partial Class Bancos_PagoElectronico params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("Direccion", UsuarioActual.Empresa.Direccion)) params.Add(New ReportParameter("RFC", UsuarioActual.Empresa.RFC)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) ImprimirPDF("Empresas/Grales/Formatos/LayoutAltaProveedor.rdlc", DtAlta, params, "LayoutAltaProveedor", RDSName:="DsPagoElectronico") @@ -2774,7 +2774,7 @@ Partial Class Bancos_PagoElectronico params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("Direccion", UsuarioActual.Empresa.Direccion)) params.Add(New ReportParameter("RFC", UsuarioActual.Empresa.RFC)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) ImprimirPDF("Empresas/Grales/Formatos/LayoutAltaProveedor.rdlc", DtAlta, params, "LayoutAltaProveedor", RDSName:="DsPagoElectronico") End If @@ -2795,7 +2795,7 @@ Partial Class Bancos_PagoElectronico params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("Direccion", UsuarioActual.Empresa.Direccion)) params.Add(New ReportParameter("RFC", UsuarioActual.Empresa.RFC)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) diff --git a/Bancos/PagoElectronicoGrupos.aspx.vb b/Bancos/PagoElectronicoGrupos.aspx.vb index 96344b11f..64de00235 100644 --- a/Bancos/PagoElectronicoGrupos.aspx.vb +++ b/Bancos/PagoElectronicoGrupos.aspx.vb @@ -298,8 +298,8 @@ Partial Class Bancos_PagoElectronicoGrupos CveCuenta = -1 TipoMasiva = 1 - txtFechaI.Text = Date.Now.ToShortDateString - txtFechaF.Text = Date.Now.ToShortDateString + txtFechaI.Text = NowADS().ToShortDateString + txtFechaF.Text = NowADS().ToShortDateString CargaCuentas() CargaProveedores() @@ -451,7 +451,7 @@ Partial Class Bancos_PagoElectronicoGrupos .Clear() .Buffer = True .ContentType = "textplain" - .AddHeader("Content-Disposition", String.Format("attachment;filename={0}{1}.txt", NombreArchivo, Date.Now.ToString("ddMMyyyy"))) + .AddHeader("Content-Disposition", String.Format("attachment;filename={0}{1}.txt", NombreArchivo, NowADS().ToString("ddMMyyyy"))) .Charset = "UTF-8" .ContentEncoding = Encoding.Default .Write(TextoCompleto) @@ -478,12 +478,12 @@ Partial Class Bancos_PagoElectronicoGrupos DirectoryExistsCreate(String.Format("{0}Layout", UsuarioActual.Empresa.Ruta)) - NombreArchivo = String.Format("{2}{1}{0}.txt", UsuarioActual.CveUsuario, Date.Now.ToString("yyyyMMdd-HH-mm-ss"), If(Tipo = 1, "LAYOUTPAGO", "LAYOUTALTA")) + NombreArchivo = String.Format("{2}{1}{0}.txt", UsuarioActual.CveUsuario, NowADS().ToString("yyyyMMdd-HH-mm-ss"), If(Tipo = 1, "LAYOUTPAGO", "LAYOUTALTA")) If Tipo = 1 Then - NombreArchivo = String.Format("{2}{1}{0}.txt", UsuarioActual.CveUsuario, Date.Now.ToString("yyyyMMdd-HH-mm-ss"), "LAYOUTPAGO") + NombreArchivo = String.Format("{2}{1}{0}.txt", UsuarioActual.CveUsuario, NowADS().ToString("yyyyMMdd-HH-mm-ss"), "LAYOUTPAGO") Else - NombreArchivo = String.Format("{2}{1}{0}{3}.txt", UsuarioActual.CveUsuario, Date.Now.ToString("yyyyMMdd-HH-mm-ss"), "LAYOUTALTA", If(MismoBanco, "BANCOMER", "INTERBANCARIO")) + NombreArchivo = String.Format("{2}{1}{0}{3}.txt", UsuarioActual.CveUsuario, NowADS().ToString("yyyyMMdd-HH-mm-ss"), "LAYOUTALTA", If(MismoBanco, "BANCOMER", "INTERBANCARIO")) End If If NombreArchivoEnviado.Length > 0 Then @@ -600,7 +600,7 @@ Partial Class Bancos_PagoElectronicoGrupos e.Row.FCLabel("LblArchivo").Text = e.Row.DataKey("Archivo") 'Si la fecha de generacion del archivo es diferente de hoy activamos el boton REGENERAR - 'If e.Row.DBCampo("Fecha").ToDate.ToShortDateString <> Date.Now.ToShortDateString Then + 'If e.Row.DBCampo("Fecha").ToDate.ToShortDateString <> NowADS().ToShortDateString Then ' e.Row.FCLinkButton("LBRegenerar").Visible = True 'End If If DTEnviadas.MAX("FueConciliado", String.Format("CveLayoutEnvio = {0}", e.Row.DBCampo("CveLayoutEnvio"))).ToEntero > 0 Then @@ -1029,7 +1029,7 @@ Partial Class Bancos_PagoElectronicoGrupos ' 'Llenamos en blanco datos de otros bancos ' 'Campos 8-17 del detalle --- 64 de otros bancos y 45 para FILLER --- Fecha de Alta - ' DetalleTexto &= String.Format("{0}{1}", Vacio.PadLeft(109), DateTime.Now().ToString("yyyy-MM-dd")) + ' DetalleTexto &= String.Format("{0}{1}", Vacio.PadLeft(109), NowADS().ToString("yyyy-MM-dd")) ' 'Otros Bancos NACIONAL!! @@ -1043,7 +1043,7 @@ Partial Class Bancos_PagoElectronicoGrupos ' 'Llenamos datos de otros bancos ' 'Campos 8- 17 del detalle --- 44 de otros bancos --- 20 de internacional --- 45 Filler -- Fecha de Alta - ' DetalleTexto &= String.Format("{0}40{1}{2}{3}{4}{5}", DTPendienteActual(0)("Abreviatura").ToString, DTPendienteActual(0)("CLABE").ToString.PadLeft(35, PadCeros), DTPendienteActual(0)("CLABE").ToString.Substring(0, 3).PadLeft(4, PadCeros), Vacio.PadRight(20), Vacio.PadRight(45), DateTime.Now().ToString("yyyy-MM-dd")) + ' DetalleTexto &= String.Format("{0}40{1}{2}{3}{4}{5}", DTPendienteActual(0)("Abreviatura").ToString, DTPendienteActual(0)("CLABE").ToString.PadLeft(35, PadCeros), DTPendienteActual(0)("CLABE").ToString.Substring(0, 3).PadLeft(4, PadCeros), Vacio.PadRight(20), Vacio.PadRight(45), NowADS().ToString("yyyy-MM-dd")) ' End If ' 'Llenamos datos de Tipo de Persona - Fisica o Moral @@ -1157,14 +1157,14 @@ Partial Class Bancos_PagoElectronicoGrupos '''''' LLENADO HEADER Dim convenio As String = DTPendienteActual(0)("ConvenioPagoElectronico").ToString 'Campos #1-4 del Header - HeaderTexto = String.Format("H{0}{1}GRUPO01 ", convenio.PadLeft(9, PadCeros), DateTime.Now().ToString("yyyy-MM-dd")) + HeaderTexto = String.Format("H{0}{1}GRUPO01 ", convenio.PadLeft(9, PadCeros), NowADS().ToString("yyyy-MM-dd")) 'Campo #5 del Header Dim IdentificadoUsuario As String = UsuarioActual.Usuario.Replace(" ", "").Replace(".", "").Replace("@", "").Replace("/", "").ToUpper.Trim IdentificadoUsuario = If(IdentificadoUsuario.Length > 12, IdentificadoUsuario.Substring(0, 12), IdentificadoUsuario) - ' Dim Identificado As String = String.Format("{0}{1}", UsuarioActual.Usuario, DateTime.Now().ToString("yyyyMMdd"))) + ' Dim Identificado As String = String.Format("{0}{1}", UsuarioActual.Usuario, NowADS().ToString("yyyyMMdd"))) - HeaderTexto &= String.Format("{0}{1}", IdentificadoUsuario, DateTime.Now().ToString("yyyyMMdd")).PadRight(20) + HeaderTexto &= String.Format("{0}{1}", IdentificadoUsuario, NowADS().ToString("yyyyMMdd")).PadRight(20) 'Campos #6-8 del Header HeaderTexto &= String.Format("00").PadRight(586) Dim HeaderLength = HeaderTexto.Length @@ -1422,7 +1422,7 @@ Partial Class Bancos_PagoElectronicoGrupos ObjBancos.IniciaTransacSQL() - Dim CveLayoutEnvio = ObjBancos.AddLayoutEnvios(NombreArchivo, Date.Now, CveCuenta, PorGrupos:=True) + Dim CveLayoutEnvio = ObjBancos.AddLayoutEnvios(NombreArchivo, NowADS(), CveCuenta, PorGrupos:=True) If CveLayoutEnvio > 0 Then For Each dr As DataRow In DTPendientesTemp.Rows @@ -1558,7 +1558,7 @@ Partial Class Bancos_PagoElectronicoGrupos ' 'ACTUALIZA FECHADOCUMENTO DEL IE ' 'If CveBLE > 0 Then - ' ' ObjBancos.UpdateBancos_IE(Date.Now, Date.Now, DTPendienteActual(0)("CveIE").ToString.ToEntero) + ' ' ObjBancos.UpdateBancos_IE(NowADS(), NowADS(), DTPendienteActual(0)("CveIE").ToString.ToEntero) ' 'End If ' If TotalDetalles > 0 Then @@ -1574,14 +1574,14 @@ Partial Class Bancos_PagoElectronicoGrupos ' If CveBLE > 0 Then ' 'ACTUALIZAMOS EL ENVIO SI ES REGENERACION - ' If Not ObjBancos.UpdateLayoutEnvios(CveBLE, Date.Now) Then + ' If Not ObjBancos.UpdateLayoutEnvios(CveBLE, NowADS()) Then ' ErrorLayout = True ' End If ' 'GUARDAMOS EL ENVIO SI NO ES REGENERACION ' Else - ' Dim CveLayoutEnvio = ObjBancos.AddLayoutEnvios(NombreArchivo, Date.Now, CveCuenta) + ' Dim CveLayoutEnvio = ObjBancos.AddLayoutEnvios(NombreArchivo, NowADS(), CveCuenta) ' If CveLayoutEnvio > 0 Then ' For Each dr As DataRow In DTTemp.Rows @@ -1674,7 +1674,7 @@ Partial Class Bancos_PagoElectronicoGrupos 'Correo = If(Correo.Length > 0, Correo.ToUpper.PadRight(50), Vacio.PadRight(50)) 'Campos 24-50 del Detalle 0 1 2 3 4 5 6 7 8 9 - DetalleTexto &= String.Format("{0}{1}FA{2}{3}01{4}N{5}{6}{7}{7}{7}{6}N {7}700{8}{9}{7}", Divisa, Vacio.PadLeft(20), Importe.FormatoNumero.Replace(",", "").Replace(".", "").PadLeft(15, PadCeros), Vacio.PadRight(15, PadCeros), Correo, Vacio.PadRight(12, PadCeros), DateTime.Now.ToString("yyyy-MM-dd"), "0001-01-01", Observaciones.PadRight(700), Vacio.PadRight(52)) + DetalleTexto &= String.Format("{0}{1}FA{2}{3}01{4}N{5}{6}{7}{7}{7}{6}N {7}700{8}{9}{7}", Divisa, Vacio.PadLeft(20), Importe.FormatoNumero.Replace(",", "").Replace(".", "").PadLeft(15, PadCeros), Vacio.PadRight(15, PadCeros), Correo, Vacio.PadRight(12, PadCeros), NowADS().ToString("yyyy-MM-dd"), "0001-01-01", Observaciones.PadRight(700), Vacio.PadRight(52)) TotalAcumulado += Importe.ToDouble @@ -1703,9 +1703,9 @@ Partial Class Bancos_PagoElectronicoGrupos '''''' LLENADO HEADER 'Campos #1-4 del Header - HeaderTexto = String.Format("H{0}{1}01", convenio.PadLeft(9, PadCeros), DateTime.Now().ToString("yyyy-MM-dd")) + HeaderTexto = String.Format("H{0}{1}01", convenio.PadLeft(9, PadCeros), NowADS().ToString("yyyy-MM-dd")) 'Campo #5 del Header - HeaderTexto &= String.Format("P{0}{1}", DateTime.Now().ToString("s").Replace("-", "").Replace(":", ""), Vacio.PadRight(14)) + HeaderTexto &= String.Format("P{0}{1}", NowADS().ToString("s").Replace("-", "").Replace(":", ""), Vacio.PadRight(14)) 'Campos #6-11 del Header HeaderTexto &= String.Format("00").PadRight(1314) @@ -2332,7 +2332,7 @@ Partial Class Bancos_PagoElectronicoGrupos params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("Direccion", UsuarioActual.Empresa.Direccion)) params.Add(New ReportParameter("RFC", UsuarioActual.Empresa.RFC)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) ImprimirPDF("Empresas/Grales/Formatos/LayoutAltaProveedor.rdlc", DtAlta, params, "LayoutAltaProveedor", RDSName:="DsPagoElectronico") @@ -2360,7 +2360,7 @@ Partial Class Bancos_PagoElectronicoGrupos params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("Direccion", UsuarioActual.Empresa.Direccion)) params.Add(New ReportParameter("RFC", UsuarioActual.Empresa.RFC)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) ImprimirPDF("Empresas/Grales/Formatos/LayoutAltaProveedor.rdlc", DtAlta, params, "LayoutAltaProveedor", RDSName:="DsPagoElectronico") End If @@ -2394,7 +2394,7 @@ Partial Class Bancos_PagoElectronicoGrupos params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("Direccion", UsuarioActual.Empresa.Direccion)) params.Add(New ReportParameter("RFC", UsuarioActual.Empresa.RFC)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) params.Add(New ReportParameter("Titulo", "Reporte Pago Proveedor Layout Grupos")) @@ -2777,7 +2777,7 @@ Partial Class Bancos_PagoElectronicoGrupos ObjAC.IniciaTransacSQL() End If - Dim FechaCancelacion As Date = Now + Dim FechaCancelacion As Date = NowADS() Dim ErrorCancelar = False Dim MensajeError = "" @@ -2990,7 +2990,7 @@ Partial Class Bancos_PagoElectronicoGrupos params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("Direccion", UsuarioActual.Empresa.Direccion)) params.Add(New ReportParameter("RFC", UsuarioActual.Empresa.RFC)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) params.Add(New ReportParameter("Titulo", "Reporte Pago Proveedor Layout")) diff --git a/Bancos/PolizaCheque.aspx.vb b/Bancos/PolizaCheque.aspx.vb index b1ff1319a..7fda562fd 100644 --- a/Bancos/PolizaCheque.aspx.vb +++ b/Bancos/PolizaCheque.aspx.vb @@ -487,7 +487,7 @@ Partial Class Bancos_PolizaCheque Private Function CreaArchivo() As Boolean DirectoryExistsCreate(String.Format("{0}Layout", UsuarioActual.Empresa.Ruta)) - NombreArchivo = String.Format("{2}{1}{0}.txt", UsuarioActual.CveUsuario, Date.Now.ToString("yyyyMMdd-HH-mm"), "LAYOUTPAGONOMINA") + NombreArchivo = String.Format("{2}{1}{0}.txt", UsuarioActual.CveUsuario, NowADS().ToString("yyyyMMdd-HH-mm"), "LAYOUTPAGONOMINA") Dim path As String = String.Format("{0}Layout\{1}", UsuarioActual.Empresa.Ruta, NombreArchivo) Dim fs As FileStream = File.Create(path) @@ -515,7 +515,7 @@ Partial Class Bancos_PolizaCheque Dim CodigoPago As String = "R23" Dim TipoServicio As String = "110" Dim ClaveEntrada As String = "1" - Dim FechaArchivo As String = Date.Now.ToString("yyyyMMdd") + Dim FechaArchivo As String = NowADS().ToString("yyyyMMdd") Dim FechaPago As String = TxtFechaDocumento.ToDate.ToString("yyyyMMdd") Dim Filler As String = GeneraCampo("", 142) diff --git a/Bancos/PopIECompras.aspx.vb b/Bancos/PopIECompras.aspx.vb index 8688ade3a..a093792e9 100644 --- a/Bancos/PopIECompras.aspx.vb +++ b/Bancos/PopIECompras.aspx.vb @@ -304,7 +304,7 @@ Partial Class Bancos_PopIECompras ArrIEFuncionariosEmpleados = New ArrayList() RFCProveedor = "" - TxtFechaDocumento.Text = Now.ToShortDateString + TxtFechaDocumento.Text = NowADS().ToShortDateString If Request("CveProveedor") IsNot Nothing Then HdnCveProveedor.Value = Request("CveProveedor").ToString @@ -345,10 +345,10 @@ Partial Class Bancos_PopIECompras If CveMoneda = 2 Then ChkPagarPesos.Visible = True - TxtTipoCambio.Text = GlobalTipoCambio(Now).FormatoNumero(4) + TxtTipoCambio.Text = GlobalTipoCambio(NowADS()).FormatoNumero(4) Else ChkPagarDolares.Visible = True - TxtTipoCambio.Text = GlobalTipoCambio(Now).FormatoNumero(4) + TxtTipoCambio.Text = GlobalTipoCambio(NowADS()).FormatoNumero(4) End If UpDatos.Update() End If @@ -1678,8 +1678,8 @@ Partial Class Bancos_PopIECompras End Sub Private Sub RVTxtFechaDocumento_Init(sender As Object, e As EventArgs) Handles RVTxtFechaDocumento.Init - RVTxtFechaDocumento.MaximumValue = DateTime.Now.ToShortDateString - Calendario.EndDate = DateTime.Now + RVTxtFechaDocumento.MaximumValue = NowADS().ToShortDateString + Calendario.EndDate = NowADS() End Sub diff --git a/Bancos/PopIEVentas.aspx.vb b/Bancos/PopIEVentas.aspx.vb index ffc69a6d8..d0212c8c6 100644 --- a/Bancos/PopIEVentas.aspx.vb +++ b/Bancos/PopIEVentas.aspx.vb @@ -311,7 +311,7 @@ Partial Class Bancos_PopIEVentas ArrIEFuncionariosEmpleados = New ArrayList() RFCCliente = "-1" - TxtFechaDocumento.Text = Now.ToShortDateString + TxtFechaDocumento.Text = NowADS().ToShortDateString If Request("CveVenta") IsNot Nothing AndAlso IsNumeric(Request("CveVenta")) AndAlso Request("CveVenta").ToEntero > 0 Then CveVenta = Request("CveVenta").ToEntero @@ -349,8 +349,8 @@ Partial Class Bancos_PopIEVentas - Dim dia As Integer = If(UsuarioActual.CveEmpresa = 13, Now.Day - 1, Now.Day) - Fecha = (dia.ToString + "/" + Now.Month.ToString + "/" + Now.Year.ToString).ToDate + Dim dia As Integer = If(UsuarioActual.CveEmpresa = 13, NowADS().Day - 1, NowADS().Day) + Fecha = (dia.ToString + "/" + NowADS().Month.ToString + "/" + NowADS().Year.ToString).ToDate If CveMoneda = 2 Then ChkPagarPesos.Visible = True @@ -1389,7 +1389,7 @@ Partial Class Bancos_PopIEVentas TxtFolio.Text = "" TxtObservaciones.Text = "" TxtImporte.Text = "" - TxtFechaDocumento.Text = Now.ToShortDateString + TxtFechaDocumento.Text = NowADS().ToShortDateString ChkComplementoPago.Checked = False UpDatos.Update() @@ -1408,7 +1408,7 @@ Partial Class Bancos_PopIEVentas 'For i = 0 To CveVentas.Count - 1 Dim ObjBancos As New ClsBancos - If ObjBancos.GetComplementoPagosRep(-1, Now.AddYears(-2), Now, CveIE, -1, 1, UsuarioActual.CveEmpresa, -1) Then + If ObjBancos.GetComplementoPagosRep(-1, NowADS().AddYears(-2), NowADS(), CveIE, -1, 1, UsuarioActual.CveEmpresa, -1) Then If Not ObjBancos.DtResultados.Rows.Count > 0 Then ObjBancos.Dispose() Alert("No se generaron complementos de pago porque no hay facturas con método de pago PPD", TipoMensaje.MsgAdvertencia) @@ -1465,8 +1465,8 @@ Partial Class Bancos_PopIEVentas #End Region Private Sub RVTxtFechaDocumento_Init(sender As Object, e As EventArgs) Handles RVTxtFechaDocumento.Init - RVTxtFechaDocumento.MaximumValue = DateTime.Now.ToShortDateString - Calendario.EndDate = DateTime.Now + RVTxtFechaDocumento.MaximumValue = NowADS().ToShortDateString + Calendario.EndDate = NowADS() End Sub diff --git a/Bancos/PopUpBuscarIE.aspx.vb b/Bancos/PopUpBuscarIE.aspx.vb index 52515e79c..9b40e213d 100644 --- a/Bancos/PopUpBuscarIE.aspx.vb +++ b/Bancos/PopUpBuscarIE.aspx.vb @@ -37,7 +37,7 @@ Partial Class Bancos_PopUpBuscarIE Opcion = Request("OPCION").ToString End If - txtFechaI.Text = Date.Now.AddMonths(-1).FirstDayOfMonth.ToShortDateString + txtFechaI.Text = NowADS().AddMonths(-1).FirstDayOfMonth.ToShortDateString CargaDatos() diff --git a/Bancos/PrestamoPersonal.aspx.cs b/Bancos/PrestamoPersonal.aspx.cs index ab7330f98..00075eb97 100644 --- a/Bancos/PrestamoPersonal.aspx.cs +++ b/Bancos/PrestamoPersonal.aspx.cs @@ -40,10 +40,10 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas CargaReporte(); CargaConceptos(); - TxtFechaDocumento.Text = DateTime.Now.ToShortDateString(); - TxtFechaPrestamo.Text = DateTime.Now.ToShortDateString(); - txtFechaI.Text = DateTime.Now.FirstDayOfMonth().ToShortDateString(); - txtFechaF.Text = DateTime.Now.ToShortDateString(); + TxtFechaDocumento.Text = NowADS().ToShortDateString(); + TxtFechaPrestamo.Text = NowADS().ToShortDateString(); + txtFechaI.Text = NowADS().FirstDayOfMonth().ToShortDateString(); + txtFechaF.Text = NowADS().ToShortDateString(); TxtImporte.Attributes.Add("disabled", "disabled"); //if (UsuarioActual.Empresa.Funcionalidad(281).ToEntero() == 1) diff --git a/Bancos/ProductosFinancieros.aspx.vb b/Bancos/ProductosFinancieros.aspx.vb index 0be160c8b..142179554 100644 --- a/Bancos/ProductosFinancieros.aspx.vb +++ b/Bancos/ProductosFinancieros.aspx.vb @@ -335,7 +335,7 @@ Partial Class Bancos_ProductosFinancieros Dim ConceptoContable As Integer = Row("CveConcepto").ToString.ToEntero Dim TipoMovimiento As Boolean = If(Row("TipoMovto").ToString = "True", True, False) Dim importeMovimiento As Decimal = 0 - Dim FechaMovimiento As Date = Now + Dim FechaMovimiento As Date = NowADS() Dim IdCtaContablePP As Integer = 0 Select Case ConceptoContable diff --git a/Bancos/ProveedoresAbonar.aspx.vb b/Bancos/ProveedoresAbonar.aspx.vb index e2b7b3d4f..7d0047881 100644 --- a/Bancos/ProveedoresAbonar.aspx.vb +++ b/Bancos/ProveedoresAbonar.aspx.vb @@ -224,7 +224,7 @@ Partial Class Bancos_ProveedoresAbonar End If PermiteModificarImporte = True - TxtFechaIncobrable.Text = Now.ToShortDateString + TxtFechaIncobrable.Text = NowADS().ToShortDateString If Request("CveProveedor") IsNot Nothing AndAlso Request("CveProveedor").ToString.ToEntero > 0 Then @@ -252,13 +252,13 @@ Partial Class Bancos_ProveedoresAbonar If UsuarioActual.TienePermisoProceso(98) Then PermiteModificarImporte = False End If - Calendario.StartDate = Now.AddMonths(-18) + Calendario.StartDate = NowADS().AddMonths(-18) 'proceso que restringue solo el pago de apartir del dia de hoy y como limite fin de mes If UsuarioActual.TienePermisoProceso(105) Then - Calendario.StartDate = Now - Calendario.EndDate = Now.LastDayOfMonth - MEVCalendario.MinimumValue = Now.ToShortDateString - MEVCalendario.MaximumValue = Now.LastDayOfMonth.ToShortDateString + Calendario.StartDate = NowADS() + Calendario.EndDate = NowADS().LastDayOfMonth + MEVCalendario.MinimumValue = NowADS().ToShortDateString + MEVCalendario.MaximumValue = NowADS().LastDayOfMonth.ToShortDateString MEVCalendario.Enabled = True End If @@ -293,16 +293,16 @@ Partial Class Bancos_ProveedoresAbonar If CveMoneda = 2 Then ChkPagarPesos.Visible = True - TxtTC.Text = GlobalTipoCambio(Now).FormatoNumero(4) - TxtTCDolaresDolares.Text = GlobalTipoCambio(Now).FormatoNumero(4) + TxtTC.Text = GlobalTipoCambio(NowADS()).FormatoNumero(4) + TxtTCDolaresDolares.Text = GlobalTipoCambio(NowADS()).FormatoNumero(4) DivDolaresDolares.Visible = True TxtFechaDocumento.Attributes.Add("onchange", "CambiaTC(this);") Else ChkPagarDolares.Visible = True - TxtTCDolares.Text = GlobalTipoCambio(Now).FormatoNumero(4) + TxtTCDolares.Text = GlobalTipoCambio(NowADS()).FormatoNumero(4) End If - RegistraScript($"TipoCambioActual = {GlobalTipoCambio(Now).FormatoNumero(4)}") + RegistraScript($"TipoCambioActual = {GlobalTipoCambio(NowADS()).FormatoNumero(4)}") UpDatos.Update() If UsuarioActual.TienePermisoProceso(215) Or UsuarioActual.TienePermisoProceso(204) Then @@ -379,7 +379,7 @@ Partial Class Bancos_ProveedoresAbonar CargaTipoTransaccion() CargaCuentas(DdlTipoTransaccion.SelectedValue.ToEntero) - TxtFechaDocumento.Text = Now.ToShortDateString + TxtFechaDocumento.Text = NowADS().ToShortDateString TxtPagueseA.Enabled = False @@ -615,7 +615,7 @@ Partial Class Bancos_ProveedoresAbonar End If 'proceso que restringue solo el pago de apartir del dia de hoy y como limite fin de mes - If UsuarioActual.TienePermisoProceso(105) AndAlso (TxtFechaDocumento.Text.ToDate < Now.Date Or TxtFechaDocumento.Text.ToDate > Now.LastDayOfMonth) Then + If UsuarioActual.TienePermisoProceso(105) AndAlso (TxtFechaDocumento.Text.ToDate < NowADS().Date Or TxtFechaDocumento.Text.ToDate > NowADS().LastDayOfMonth) Then Alert("Fecha No permitida", TipoMensaje.MsgAdvertencia) Exit Sub End If @@ -1026,7 +1026,7 @@ Partial Class Bancos_ProveedoresAbonar TxtObservaciones.Text = "" TxtImporte.Text = "" TxtTotal.Text = "" - TxtFechaDocumento.Text = Now.ToShortDateString + TxtFechaDocumento.Text = NowADS().ToShortDateString DdlSelectedValue(DdlCuenta, "-1") DdlSelectedValue(DdlTipoTransaccion, "-1") Anexo.Text = "[]" @@ -1616,7 +1616,7 @@ Partial Class Bancos_ProveedoresAbonar Dim params As New List(Of ReportParameter) params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToString)) params.Add(New ReportParameter("Sucursal", DtDatos.Rows(1)("SubProyecto").ToString)) params.Add(New ReportParameter("Importe", $"${StrImporte}")) params.Add(New ReportParameter("RazonSocial", TxtPagueseA.Text)) @@ -1649,10 +1649,10 @@ Partial Class Bancos_ProveedoresAbonar #End Region Private Sub RVTxtFechaDocumento_Init(sender As Object, e As EventArgs) Handles RVTxtFechaDocumento.Init - RVTxtFechaDocumento.MaximumValue = DateTime.Now.ToShortDateString - RVTxtFechaDocumentoMenor.MinimumValue = DateTime.Now.AddMonths(-18).ToShortDateString - RVTxtFechaDocumentoMenor.MaximumValue = DateTime.Now.ToShortDateString - Calendario.EndDate = DateTime.Now + RVTxtFechaDocumento.MaximumValue = NowADS().ToShortDateString + RVTxtFechaDocumentoMenor.MinimumValue = NowADS().AddMonths(-18).ToShortDateString + RVTxtFechaDocumentoMenor.MaximumValue = NowADS().ToShortDateString + Calendario.EndDate = NowADS() End Sub diff --git a/Bancos/ProveedoresCreditos.aspx.vb b/Bancos/ProveedoresCreditos.aspx.vb index e86949a0c..99759eb43 100644 --- a/Bancos/ProveedoresCreditos.aspx.vb +++ b/Bancos/ProveedoresCreditos.aspx.vb @@ -339,7 +339,7 @@ Partial Class Bancos_ProveedoresCreditos DirectCast(Master.FindControl("TSM"), ScriptManager).EnablePageMethods = True TxtImporte.Attributes.Add("onblur", $"upIE(this,{CveMoneda});FncImporteCuenta(this);") - Calendario.StartDate = Now.AddMonths(-1).FirstDayOfMonth() + Calendario.StartDate = NowADS().AddMonths(-1).FirstDayOfMonth() ViewState("IDPoliza") = "-1" CveIEDeposito = -1 ' rbPagueseA.Attributes.Add("onchange", "upPagueseA(this);") @@ -482,7 +482,7 @@ Partial Class Bancos_ProveedoresCreditos 'Configuración de Modalidad Insert CveIE = -1 - TxtFechaDocumento.Text = Now.ToShortDateString + TxtFechaDocumento.Text = NowADS().ToShortDateString ImgUpdateCuentaDeposito.Visible = False End If @@ -657,9 +657,9 @@ Partial Class Bancos_ProveedoresCreditos If dr IsNot Nothing Then CveMoneda = dr("CveMoneda").ToString.ToEntero If CveMoneda = 2 Then - TipoCambio = GlobalTipoCambio(Now).ToDecimal + TipoCambio = GlobalTipoCambio(NowADS()).ToDecimal ElseIf CveMoneda = 3 Then - TipoCambio = GlobalTipoCambioEuro(Now).ToDecimal + TipoCambio = GlobalTipoCambioEuro(NowADS()).ToDecimal Else TipoCambio = 0 End If @@ -993,7 +993,7 @@ Partial Class Bancos_ProveedoresCreditos Dim TipoMovimiento = False Dim Concepto = "" Dim Referencia = $"Crédito: {TxtFolio.Text}" - Dim FechaMovimiento = Now.ToDate + Dim FechaMovimiento = NowADS().ToDate For Each Row As DataRow In DtPlantilla.Rows diff --git a/Bancos/Reembolsos.aspx.vb b/Bancos/Reembolsos.aspx.vb index abdcb9314..210095b54 100644 --- a/Bancos/Reembolsos.aspx.vb +++ b/Bancos/Reembolsos.aspx.vb @@ -718,7 +718,7 @@ Partial Class Bancos_Reembolsos If CvePrePolizaNueva > 0 Then Str.AppendFormat("
    Cheque: {1} ", CveIE, Folio) 'Str.AppendFormat("
    Imprimir Cheque ") - Str.AppendFormat("
  • Imprimir Cheque
  • ", UsuarioActual.CveEmpresa, CveIE, Now.Ticks) + Str.AppendFormat("
  • Imprimir Cheque
  • ", UsuarioActual.CveEmpresa, CveIE, NowADS().Ticks) End If Alert(Str.ToString, TipoMensaje.MsgInformacion) @@ -936,7 +936,7 @@ Partial Class Bancos_Reembolsos TxtObservaciones.Text = "" TxtImporte.Text = "" TxtImporteVinculado.Text = "" - TxtFechaDocumento.Text = Date.Now.ToShortDateString + TxtFechaDocumento.Text = NowADS().ToShortDateString 'DdlCuenta.SelectedValue = "-1" DdlTipoTransaccion.SelectedValue = "-1" DdlTipoTransaccionDiferencia_SelectedIndexChanged(DdlTipoTransaccion, EventArgs.Empty) @@ -1046,7 +1046,7 @@ Partial Class Bancos_Reembolsos DDlCheques_SelectedIndexChanged(DDlCheques, EventArgs.Empty) If GvCxP.Rows.Count > 0 Then - TxtFechaDocumento.Text = Now.ToShortDateString + TxtFechaDocumento.Text = NowADS().ToShortDateString 'BtnIEGuardar.Enabled = True If Not DdlPersonal.SelectedValue = "-2" Then diff --git a/Bancos/RegistroPagoIntermediario.aspx.vb b/Bancos/RegistroPagoIntermediario.aspx.vb index 939ade0a5..b36642082 100644 --- a/Bancos/RegistroPagoIntermediario.aspx.vb +++ b/Bancos/RegistroPagoIntermediario.aspx.vb @@ -27,7 +27,7 @@ Partial Class Bancos_PagosIntermediarios Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not IsPostBack Then FacturasCheckadas = 0 - TxtFecha.Text = Now.ToShortDateString + TxtFecha.Text = NowADS().ToShortDateString CargaCuentas() CargaFiltros() End If @@ -193,7 +193,7 @@ Partial Class Bancos_PagosIntermediarios TxtObservaciones.Text = "" TxtTotalBancos.Text = "" TxtTotalComisiones.Text = "" - TxtFecha.Text = Now.ToShortDateString + TxtFecha.Text = NowADS().ToShortDateString CargaDatos() Alert(String.Format("El Depósito se ha registrado correctamente."), TipoMensaje.MsgInformacion) Else diff --git a/Bancos/RepClientesAnticipo.aspx.vb b/Bancos/RepClientesAnticipo.aspx.vb index d39a7f328..1a3d2eaff 100644 --- a/Bancos/RepClientesAnticipo.aspx.vb +++ b/Bancos/RepClientesAnticipo.aspx.vb @@ -167,7 +167,7 @@ Partial Class Bancos_RepClientesAnticipo params.Add(New ReportParameter("FechaInicio", FechaI)) params.Add(New ReportParameter("FechaFin", FechaF)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) diff --git a/Bancos/RepCobrado.aspx.vb b/Bancos/RepCobrado.aspx.vb index c6e43162a..5acea6733 100644 --- a/Bancos/RepCobrado.aspx.vb +++ b/Bancos/RepCobrado.aspx.vb @@ -52,8 +52,8 @@ Partial Class Ventas_RepRecuperacion DdlBanco.Items.Insert(0, New ListItem("Todos", "-1")) DdlBanco.DataBind() - txtFechaI.Text = $"01/{Now.Month}/{Now.Year}" - txtFechaF.Text = Now.ToShortDateString + txtFechaI.Text = $"01/{NowADS().Month}/{NowADS().Year}" + txtFechaF.Text = NowADS().ToShortDateString End Sub Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click @@ -148,10 +148,10 @@ Partial Class Ventas_RepRecuperacion Dim params As New List(Of ReportParameter) params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("Filtros", StrFiltro.ToString)) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) - ImprimirPDF(RutaPDF, DtDatos, params, "RepRecuperacion" & Now.ToString("yyyyMMddhhmmss"), Formato) + ImprimirPDF(RutaPDF, DtDatos, params, "RepRecuperacion" & NowADS().ToString("yyyyMMddhhmmss"), Formato) End Sub End Class diff --git a/Bancos/RepCobradoDetalle.aspx.vb b/Bancos/RepCobradoDetalle.aspx.vb index e70927ee4..52ee35b89 100644 --- a/Bancos/RepCobradoDetalle.aspx.vb +++ b/Bancos/RepCobradoDetalle.aspx.vb @@ -71,8 +71,8 @@ Partial Class Ventas_RepRecuperacionDetalle DdlBanco.Items.Insert(0, New ListItem("Todos", "-1")) DdlBanco.DataBind() - txtFechaI.Text = $"01/{Now.Month}/{Now.Year}" - txtFechaF.Text = Now.ToShortDateString + txtFechaI.Text = $"01/{NowADS().Month}/{NowADS().Year}" + txtFechaF.Text = NowADS().ToShortDateString 'Cargamos las fechas @@ -204,9 +204,9 @@ Partial Class Ventas_RepRecuperacionDetalle Dim params As New List(Of ReportParameter) params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("Filtros", StrFiltro.ToString)) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) - ImprimirPDF(RutaPDF, DtDatos, params, "RepRecuperacionDetalle" & Now.ToString("yyyyMMddhhmmss"), Formato) + ImprimirPDF(RutaPDF, DtDatos, params, "RepRecuperacionDetalle" & NowADS().ToString("yyyyMMddhhmmss"), Formato) End Sub End Class diff --git a/Bancos/RepCobradoPagado.aspx.vb b/Bancos/RepCobradoPagado.aspx.vb index 1c18b9c41..a9a301a3a 100644 --- a/Bancos/RepCobradoPagado.aspx.vb +++ b/Bancos/RepCobradoPagado.aspx.vb @@ -50,8 +50,8 @@ Partial Class Bancos_RepCobradoPagado #Region "CARGA DATOS" Private Sub CargaCombos() DdlGrupo.Items.Clear() - txtFechaI.Text = DateTime.Now.FirstDayOfMonth.ToShortDateString - txtFechaF.Text = DateTime.Now.LastDayOfMonth.ToShortDateString + txtFechaI.Text = NowADS().FirstDayOfMonth.ToShortDateString + txtFechaF.Text = NowADS().LastDayOfMonth.ToShortDateString If DdlModalidad.SelectedValue = "2" Then DdlGrupo.Items.Insert(0, New ListItem("Año", "1")) DdlGrupo.Items.Insert(1, New ListItem("Año/Mes", "2")) @@ -91,7 +91,7 @@ Partial Class Bancos_RepCobradoPagado If ObjBancos.GetCobradoPagado(DdlModalidad.SelectedValue.ToEntero, DdlGrupo.SelectedValue.ToEntero, If(txtFechaI.Text = "" Or txtFechaI.Text = "__/__/____", MinFecha, txtFechaI.Text.ToDate), - If(txtFechaF.Text = "" Or txtFechaF.Text = "__/__/____", Now, txtFechaF.Text.ToDate), + If(txtFechaF.Text = "" Or txtFechaF.Text = "__/__/____", NowADS(), txtFechaF.Text.ToDate), DdlProyecto.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, RblTipoCambio.SelectedValue.ToEntero, TCEspecifico) Then DtDatos = ObjBancos.DtResultados If DtDatos.Rows.Count > 0 Then @@ -128,13 +128,13 @@ Partial Class Bancos_RepCobradoPagado Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then 'If PrendeLink Then - ' e.Row.FCLiteral("Gpo").Text = $"{e.Row.DBCampo("GPO")}" + ' e.Row.FCLiteral("Gpo").Text = $"{e.Row.DBCampo("GPO")}" 'End If If e.Row.DBCampo("Orden") = "" Then e.Row.CssClass = "Totales" Else - e.Row.FCLiteral("Gpo").Text = $"{e.Row.DBCampo("GPO")}" + e.Row.FCLiteral("Gpo").Text = $"{e.Row.DBCampo("GPO")}" End If If e.Row.DBCampo("Grupo") = "10" Then If e.Row.DBCampo("CveSubProyecto") <> "" AndAlso e.Row.DBCampo("CveClasificacion") = "" Then @@ -157,7 +157,7 @@ Partial Class Bancos_RepCobradoPagado If RblTipoCambio.SelectedValue.ToEntero = 3 Then Dim TipoCambio As Double LiEspecifico.Visible = True - TipoCambio = GlobalTipoCambio(Now) + TipoCambio = GlobalTipoCambio(NowADS()) TxtEspecifico.Text = TipoCambio.ToString Else LiEspecifico.Visible = False @@ -171,7 +171,7 @@ Partial Class Bancos_RepCobradoPagado #Region "I M P R I M I R " Protected Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click - GvDatos.ExportToExcel("ReporteCobrado-Pagado" & Now.ToShortDateString) + GvDatos.ExportToExcel("ReporteCobrado-Pagado" & NowADS().ToShortDateString) End Sub Private Sub GenerarPDF() @@ -197,7 +197,7 @@ Partial Class Bancos_RepCobradoPagado params.Add(New ReportParameter("FechaFin", FechaF)) params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString)) params.Add(New ReportParameter("AgrupadoPor", $"Agrupado Por: {Grupo}{Moneda}{FechaIn}{FechaFn}")) params.Add(New ReportParameter("FUltimaSemana", FUltimaSemana)) params.Add(New ReportParameter("FUltimoMes", FUltimoMes)) diff --git a/Bancos/RepComplementoPago.aspx.vb b/Bancos/RepComplementoPago.aspx.vb index 92e996f75..a22070ac6 100644 --- a/Bancos/RepComplementoPago.aspx.vb +++ b/Bancos/RepComplementoPago.aspx.vb @@ -80,8 +80,8 @@ Partial Class Bancos_RepComplementoPago If Not Page.IsPostBack Then - txtFechaI.Text = $"{New DateTime(Now.Year, Now.Month, 1).ToString("dd/MM/yyyy")}" - txtFechaF.Text = DateTime.Now.ToString("dd/MM/yyyy") + txtFechaI.Text = $"{New DateTime(NowADS().Year, NowADS().Month, 1).ToString("dd/MM/yyyy")}" + txtFechaF.Text = NowADS().ToString("dd/MM/yyyy") DdlCliente.setEsWebService(True) DdlMotivoCancelacion.DataSource = GlobalDTMotivosCancelacionEmpresa(UsuarioActual.CveEmpresa).FiltraParametros("CveSATMotivoCancelacion = 2 or CveSATMotivoCancelacion = 3 ") @@ -139,11 +139,11 @@ Partial Class Bancos_RepComplementoPago For Each gvr As GridViewRow In GvD.Rows If gvr.FCCheckBox("Chk").Checked Then - Dim FechaTimbrado As DateTime = DateTime.Now + Dim FechaTimbrado As DateTime = NowADS() Dim UTCOffset As Integer = 0 - If Now.EsHorarioVerano Then + If NowADS().EsHorarioVerano Then If gvr.DataKey("UTCOffsetVerano").ToEntero() <> 0 Then UTCOffset = gvr.DataKey("UTCOffsetVerano").ToEntero() End If @@ -545,7 +545,7 @@ Partial Class Bancos_RepComplementoPago worksheet.Rows(IndexEndTable + 1).Cells(2).Value = Usuario.Nombre worksheet.Rows(IndexEndTable).Cells(6).Value = "Fecha Impresión" - worksheet.Rows(IndexEndTable + 1).Cells(6).Value = DateTime.Now.ToString("dd/MM/yyyy") + worksheet.Rows(IndexEndTable + 1).Cells(6).Value = NowADS().ToString("dd/MM/yyyy") Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", Usuario.Empresa.Ruta)) @@ -592,7 +592,7 @@ Partial Class Bancos_RepComplementoPago If EstatusSATCancelado(Can_FolioFiscalCancelar, UsuarioActual.Empresa.RFC, Can_RFCReceptorCancelar) Then - If ObjBanco.UpdateComplementoPagoCancelado(Can_CveComplementoPagoCancelar, 2, UsuarioActual.CveEmpresa, Can_CvePACCancelacion, Date.Now, "", CveSATMotivoCancelacion) Then + If ObjBanco.UpdateComplementoPagoCancelado(Can_CveComplementoPagoCancelar, 2, UsuarioActual.CveEmpresa, Can_CvePACCancelacion, NowADS(), "", CveSATMotivoCancelacion) Then Alert("El complemento se cancelo correctamente.") ErrorProceso = False End If diff --git a/Bancos/RepComprobaciones.aspx.cs b/Bancos/RepComprobaciones.aspx.cs index b71a3d400..9c8cb4dc8 100644 --- a/Bancos/RepComprobaciones.aspx.cs +++ b/Bancos/RepComprobaciones.aspx.cs @@ -81,7 +81,7 @@ public partial class Bancos_RepComprobaciones : ClsPaginas @params.Add(new ReportParameter("FechaInicio", TxtFechaInicio.Text)); @params.Add(new ReportParameter("FechaFin", TxtFechaFin.Text)); @params.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)); - @params.Add(new ReportParameter("FechaImpresion", DateTime.Now.ToString())); + @params.Add(new ReportParameter("FechaImpresion", NowADS().ToString())); @params.Add(new ReportParameter("Cuenta", DdlCuentas.SelectedItem.Text)); @params.Add(new ReportParameter("LogoPath", Imagen.Exists ? $"file://{Imagen.FullName}" : "")); diff --git a/Bancos/RepCortes.aspx.vb b/Bancos/RepCortes.aspx.vb index b6ba10c25..f5e4ccba6 100644 --- a/Bancos/RepCortes.aspx.vb +++ b/Bancos/RepCortes.aspx.vb @@ -63,8 +63,8 @@ Partial Class Bancos_RepCortes Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not Page.IsPostBack Then - txtFechaVI.Text = Now.ToShortDateString - txtFechaVF.Text = Now.ToShortDateString + txtFechaVI.Text = NowADS().ToShortDateString + txtFechaVF.Text = NowADS().ToShortDateString Me.Form.DefaultButton = BtnConsultar.UniqueID CargarCentrosDeCosto(Nothing, DdlSubProyectos, Nothing, LblSubProyecto) End If diff --git a/Bancos/RepCreditos.aspx.vb b/Bancos/RepCreditos.aspx.vb index 3ada99106..dc011d19c 100644 --- a/Bancos/RepCreditos.aspx.vb +++ b/Bancos/RepCreditos.aspx.vb @@ -270,7 +270,7 @@ Partial Class Bancos_RepCreditos e.Row.Cells(1).Text = e.Row.DBCampo("Contador") End If - If e.Row.DBCampo("FechaVencimiento") <> "" AndAlso e.Row.DBCampo("FechaVencimiento").ToDate <= Now Then + If e.Row.DBCampo("FechaVencimiento") <> "" AndAlso e.Row.DBCampo("FechaVencimiento").ToDate <= NowADS() Then e.Row.ForeColor = System.Drawing.Color.Red e.Row.ToolTip = "Fecha Vencida" End If @@ -309,7 +309,7 @@ Partial Class Bancos_RepCreditos ''Exportar Excel 'Protected Sub ImgExcel_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs) Handles ImgExcel.Click - ' GvDatos.ExportToExcel("RepClientes_" & Now.ToShortDateString) + ' GvDatos.ExportToExcel("RepClientes_" & NowADS().ToShortDateString) 'End Sub #Region "A C T U A L I Z A R - E X C E L" @@ -614,7 +614,7 @@ Partial Class Bancos_RepCreditos fs = File.Create(path) 'NombreArchivo = "hola.excel" ' Add text to the file. - Dim info As Byte() = New UTF8Encoding(True).GetBytes(String.Format("{0}|{1}", NombreArchivo, Date.Now.ToShortDateString)) + Dim info As Byte() = New UTF8Encoding(True).GetBytes(String.Format("{0}|{1}", NombreArchivo, NowADS().ToShortDateString)) fs.Write(info, 0, info.Length) fs.Close() Catch ex As Exception diff --git a/Bancos/RepCxCCliente.aspx.vb b/Bancos/RepCxCCliente.aspx.vb index c977428fc..87d5a678c 100644 --- a/Bancos/RepCxCCliente.aspx.vb +++ b/Bancos/RepCxCCliente.aspx.vb @@ -158,7 +158,7 @@ Partial Class Bancos_RepCxCCliente params.Add(New ReportParameter("FechaInicio", FI)) params.Add(New ReportParameter("FechaFin", FF)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToString)) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) ImprimirPDF("Empresas/Grales/Formatos/RepPagoClientes.rdlc", DTpp, params, "ReportePagoClientes") @@ -172,7 +172,7 @@ Partial Class Bancos_RepCxCCliente Protected Sub ImgExcel_Click(sender As Object, e As System.EventArgs) Handles ImgExcel.Click - GvCxC.ExportToExcel("CxC Cliente" & Now.ToShortDateString) + GvCxC.ExportToExcel("CxC Cliente" & NowADS().ToShortDateString) End Sub diff --git a/Bancos/RepEgresosSinComprobante.aspx.vb b/Bancos/RepEgresosSinComprobante.aspx.vb index fbf30577c..decc73eb3 100644 --- a/Bancos/RepEgresosSinComprobante.aspx.vb +++ b/Bancos/RepEgresosSinComprobante.aspx.vb @@ -168,7 +168,7 @@ Partial Class Bancos_RepEgresosSinComprobante Next TxtConcepto.Text = "Saldado de Egresos por comprobar" - TxtFechaSaldar.Text = Now.ToShortDateString + TxtFechaSaldar.Text = NowADS().ToShortDateString DVSaldar.Visible = True UpSaldar.Update() @@ -319,7 +319,7 @@ Partial Class Bancos_RepEgresosSinComprobante CveConceptoContable = 37 End Select - CvePrePoliza = ObjConta.AddPrePolizas("Bancos/RepEgresosSinComprobante", 6, gr.DataKey("Saldo").ToDecimal, gr.DataKey("Saldo").ToDecimal, gr.DataKey("CveMoneda").ToEntero, Now, + CvePrePoliza = ObjConta.AddPrePolizas("Bancos/RepEgresosSinComprobante", 6, gr.DataKey("Saldo").ToDecimal, gr.DataKey("Saldo").ToDecimal, gr.DataKey("CveMoneda").ToEntero, NowADS(), "Saldo de ExC por Sistema", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoConcepto, gr.DataKey("Saldo").ToDecimal, gr.DataKey("Saldo").ToDecimal, CveConceptoContable, "", "Saldo de ExC por Sistema", @@ -379,10 +379,10 @@ Partial Class Bancos_RepEgresosSinComprobante params.Add(New ReportParameter("FechaInicio", FechaI)) params.Add(New ReportParameter("FechaFin", FechaF)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("Filtros", StrFiltro.ToString)) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) - ImprimirPDF($"Empresas/Grales/Formatos/{Archivo}", DtDatos, params, String.Format("EgresosSinComprovante-{0}", Now.ToDateTime.ToShortDateString), Formato:=Formato) + ImprimirPDF($"Empresas/Grales/Formatos/{Archivo}", DtDatos, params, String.Format("EgresosSinComprovante-{0}", NowADS().ToDateTime.ToShortDateString), Formato:=Formato) End If End Sub diff --git a/Bancos/RepIE.aspx.vb b/Bancos/RepIE.aspx.vb index 15ad4ecba..f594d28de 100644 --- a/Bancos/RepIE.aspx.vb +++ b/Bancos/RepIE.aspx.vb @@ -46,8 +46,8 @@ Partial Class Bancos_RepIE If Not Page.IsPostBack Then GvDatos.DataBind() Me.Form.DefaultButton = BtnConsultar.UniqueID - txtFechaI.Text = Now.ToShortDateString - txtFechaF.Text = Now.ToShortDateString + txtFechaI.Text = NowADS().ToShortDateString + txtFechaF.Text = NowADS().ToShortDateString CargaGvBitacora() TipoPagina = "" ViewState("Orden") = "" @@ -84,8 +84,8 @@ Partial Class Bancos_RepIE GvDatos.Columns(15).Visible = True GvDatos.Columns(18).Visible = False - txtFechaI.Text = DateSerial(Year(Date.Now), Month(Date.Now), 1).ToShortDateString - txtFechaF.Text = Date.Now.ToShortDateString + txtFechaI.Text = DateSerial(Year(NowADS()), Month(NowADS()), 1).ToShortDateString + txtFechaF.Text = NowADS().ToShortDateString ImgConciliacion.Visible = True LblTitulo.Text = "Conciliación Bancaria" End If @@ -99,7 +99,7 @@ Partial Class Bancos_RepIE CargaUsuarioConcilio() DdlUsuarioRegistro.DataSource = GlobalDTUsuarios(CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros("", DistinctColumns:={"Nombre", "CveUsuario"}) DdlUsuarioRegistro.databind - txtFechaI.Text = Now.ToShortDateString + txtFechaI.Text = NowADS().ToShortDateString DivDdlTarjeta.Visible = False DivLabelTarjeta.Visible = False @@ -159,7 +159,7 @@ Partial Class Bancos_RepIE End If If ChkTotalizar.Checked Then - Dim SaldoDolares As Decimal = DtDatos.SUMD("Importe", "CveMoneda = 2") * GlobalTipoCambio(Now).ToDecimal + Dim SaldoDolares As Decimal = DtDatos.SUMD("Importe", "CveMoneda = 2") * GlobalTipoCambio(NowADS()).ToDecimal SaldoTotal.Text = DtDatos.SUM("ImporteMN").ToString.FormatoNumero '(DtDatos.SUM("Importe") + SaldoDolares).ToString.FormatoNumero LtlSaldo.Text = DtDatos.SUM("Importe", "CveMoneda = 1").ToString.FormatoNumero LtlSaldoDolares.Text = DtDatos.SUM("Importe", "CveMoneda = 2").ToString.FormatoNumero @@ -176,7 +176,7 @@ Partial Class Bancos_RepIE If GvDatos.Rows.Count > 0 AndAlso TipoPagina = "Conciliaciones" Then BtnGuardar.Visible = True - GvDatos.HeaderRow.FCTextBox("TxtFechaAplicadoHeader").Text = DateAdd("d", -1, Date.Now).ToShortDateString + GvDatos.HeaderRow.FCTextBox("TxtFechaAplicadoHeader").Text = DateAdd("d", -1, NowADS()).ToShortDateString If AceptaOtrosIngresos Then Dim ObjProveedores As New ClsCompProveedores @@ -214,7 +214,7 @@ Partial Class Bancos_RepIE If Row.FCCheckBox("ChkFueConciliado").Checked <> CBool(Row.FCHiddenField("HdnConciliado").Value) Then If Not CBool(Row.FCHiddenField("HdnConciliado").Value) Then - If Row.FCTextBox("TxtFechaAplicado").Text.Trim.ToDate >= Row.FCLiteral("LtlFechaDocumento").Text.Trim.ToDate AndAlso Row.FCTextBox("TxtFechaAplicado").Text.Trim.ToDate < Date.Now Then ' + If Row.FCTextBox("TxtFechaAplicado").Text.Trim.ToDate >= Row.FCLiteral("LtlFechaDocumento").Text.Trim.ToDate AndAlso Row.FCTextBox("TxtFechaAplicado").Text.Trim.ToDate < NowADS() Then ' Fecha = Row.FCTextBox("TxtFechaAplicado").Text.Trim.ToDate Else FolioError = Row.DataKey("Folio").ToString @@ -348,7 +348,7 @@ Partial Class Bancos_RepIE e.Row.Cells(13).Style.Add("background-color", "#dddddd") e.Row.Cells(15).Style.Add("background-color", "#dddddd") If Not CBool(e.Row.DBCampo("FueConciliado").ToString) Then - e.Row.FCTextBox("TxtFechaAplicado").Text = If(TipoTrasaccion, e.Row.DBCampo("FechaDocumento"), DateAdd("d", -1, Date.Now).ToShortDateString) + e.Row.FCTextBox("TxtFechaAplicado").Text = If(TipoTrasaccion, e.Row.DBCampo("FechaDocumento"), DateAdd("d", -1, NowADS()).ToShortDateString) e.Row.FCTextBox("TxtFechaAplicado").Style.Add("display", "none") If AceptaOtrosIngresos Then e.Row.FCTextBox("TxtOtIng").Style.Add("display", "none") e.Row.FCCalendarExtender("Calendario").StartDate = e.Row.DBCampo("FechaDocumento").ToDate @@ -451,7 +451,7 @@ Partial Class Bancos_RepIE GvDatos.Columns(14).Visible = True 'visualizo la columna oculta de fecha aplicacion cuando es conciliacion GvDatos.Columns(15).Visible = False 'oculto columna de fecha de aplicacion, en modo de registro - GvDatos.ExportToExcel("ReporteSaldos" & Now.ToShortDateString) + GvDatos.ExportToExcel("ReporteSaldos" & NowADS().ToShortDateString) 'Imprimir("EXCEL") GvDatos.Columns(13).Visible = True GvDatos.Columns(14).Visible = False @@ -545,7 +545,7 @@ Partial Class Bancos_RepIE params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToString)) Dim ParametrosReporte As String = "Caja chica: " & DdlCuenta.SelectedItem.Text & " Fecha inicio: " & txtFechaI.Text & " Fecha fin: " & txtFechaF.Text diff --git a/Bancos/RepIngresosPorComprobar.aspx.vb b/Bancos/RepIngresosPorComprobar.aspx.vb index 9644a1792..7f88b0a8e 100644 --- a/Bancos/RepIngresosPorComprobar.aspx.vb +++ b/Bancos/RepIngresosPorComprobar.aspx.vb @@ -53,7 +53,7 @@ Partial Class Bancos_RepIngresosPorComprobar DdlMoneda.DataSource = GlobalDTMonedas DdlMoneda.DataBind() - TxtFecha.Text = Now.ToShortDateString + TxtFecha.Text = NowADS().ToShortDateString CargaDatos() diff --git a/Bancos/RepProgramaciones.aspx.vb b/Bancos/RepProgramaciones.aspx.vb index 0a7d19d3d..77b92bd02 100644 --- a/Bancos/RepProgramaciones.aspx.vb +++ b/Bancos/RepProgramaciones.aspx.vb @@ -44,10 +44,10 @@ Partial Class Bancos_RepProgramaciones Dim drBC As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("CveTipoCuenta = 7") If drBC IsNot Nothing Then CveCuenta = drBC("CveCuenta").ToString.ToEntero - Dim CveCredito As Integer = ObjCredito.AddCreditos(1, Gvr.DataKey("Folio"), "", CveCuenta, Gvr.DataKey("CveCompra").ToEntero, -1, 1, Now, Now, 0, 0, 0.16, 0, -1, Gvr.DataKey("Total").ToDouble, 0, 0, -1, Gvr.DataKey("CveProveedor").ToEntero, 1, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + Dim CveCredito As Integer = ObjCredito.AddCreditos(1, Gvr.DataKey("Folio"), "", CveCuenta, Gvr.DataKey("CveCompra").ToEntero, -1, 1, NowADS(), NowADS(), 0, 0, 0.16, 0, -1, Gvr.DataKey("Total").ToDouble, 0, 0, -1, Gvr.DataKey("CveProveedor").ToEntero, 1, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) If CveCredito > 0 Then - If Not ObjCredito.AddCreditosDetalle(CveCredito, Now, + If Not ObjCredito.AddCreditosDetalle(CveCredito, NowADS(), Gvr.DataKey("Total").ToDouble, 0, 0.0, 0, 0.0, 0.0, 101) Then ErrorCompra = True End If @@ -99,11 +99,11 @@ Partial Class Bancos_RepProgramaciones Dim drBC As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("CveTipoCuenta = 7") If drBC IsNot Nothing Then CveCuenta = drBC("CveCuenta").ToString.ToEntero - Dim CveCredito As Integer = ObjCredito.AddCreditos(1, Gvr.DataKey("Folio"), "", CveCuenta, Gvr.DataKey("CveCompra").ToEntero, -1, 1, Now, Now, 0, 0, 0.16, 0, + Dim CveCredito As Integer = ObjCredito.AddCreditos(1, Gvr.DataKey("Folio"), "", CveCuenta, Gvr.DataKey("CveCompra").ToEntero, -1, 1, NowADS(), NowADS(), 0, 0, 0.16, 0, -1, Gvr.DataKey("Total").ToDouble, 0, 0, -1, Gvr.DataKey("CveProveedor").ToEntero, 1, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) If CveCredito > 0 Then - If Not ObjCredito.AddCreditosDetalle(CveCredito, Now, + If Not ObjCredito.AddCreditosDetalle(CveCredito, NowADS(), Gvr.DataKey("Total").ToDouble, 0, 0.0, 0, 0.0, 0.0, 101) Then ErrorCompra = True End If @@ -152,11 +152,11 @@ Partial Class Bancos_RepProgramaciones Dim drBC As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("CveTipoCuenta = 7") If drBC IsNot Nothing Then CveCuenta = drBC("CveCuenta").ToString.ToEntero - Dim CveCredito As Integer = ObjCredito.AddCreditos(1, Gvr.DataKey("Folio"), "", CveCuenta, Gvr.DataKey("CveCompra").ToEntero, -1, 1, Now, Now, 0, 0, 0.16, 0, + Dim CveCredito As Integer = ObjCredito.AddCreditos(1, Gvr.DataKey("Folio"), "", CveCuenta, Gvr.DataKey("CveCompra").ToEntero, -1, 1, NowADS(), NowADS(), 0, 0, 0.16, 0, -1, Gvr.DataKey("Total").ToDouble, 0, 0, -1, Gvr.DataKey("CveProveedor").ToEntero, 1, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) If CveCredito > 0 Then - If Not ObjCredito.AddCreditosDetalle(CveCredito, Now, + If Not ObjCredito.AddCreditosDetalle(CveCredito, NowADS(), Gvr.DataKey("Total").ToDouble, 0, 0.0, 0, 0.0, 0.0, 101) Then ErrorCompra = True End If diff --git a/Bancos/RepProgramarRecursos.aspx.vb b/Bancos/RepProgramarRecursos.aspx.vb index 1b4313d6a..a64e834f9 100644 --- a/Bancos/RepProgramarRecursos.aspx.vb +++ b/Bancos/RepProgramarRecursos.aspx.vb @@ -795,7 +795,7 @@ Partial Class Bancos_RepProgramarRecursos 'params.Add(New ReportParameter("Agrupador", DdlAgrupador.SelectedValue)) 'params.Add(New ReportParameter("LogoUrl", String.Format("{0}/Empresas/{1}/Logo.png", Request.Url.AbsoluteUri.Replace(Request.Url.AbsolutePath, ""), UsuarioActual.CveEmpresa))) 'params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - 'params.Add(New ReportParameter("FechaImpresion", Now.ToShortDateString)) + 'params.Add(New ReportParameter("FechaImpresion", NowADS().ToShortDateString)) 'params.Add(New ReportParameter("AgrupadoPor", $"{Programo} {Proveedor} {Registro} {Responsable} {Clasificacion} {Moneda} {Estatus} {SubProyecto} {FechaIn} {FechaFn}")) 'ImprimirPDF("Empresas/Grales/Formatos/ProgramarRecursos.rdlc", DtDatos, params, "Programación de Recursos") End Sub @@ -868,7 +868,7 @@ Partial Class Bancos_RepProgramarRecursos params.Add(New ReportParameter("LogoUrl", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToShortDateString)) params.Add(New ReportParameter("AgrupadoPor", $"{Programo}{Proveedor}{Clasificacion}{AplicaNC}{TipoProv}{FechaIn}{FechaFn}{FechaInV}{FechaFnV}{Moneda}{Registro}{Responsable}{Estatus}{Proyecto}{SubProyecto}{Comprobacion}")) Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos\ProgramarRecursos.rdlc", UsuarioActual.Empresa.Ruta)) diff --git a/Bancos/RepProveedoresPagos.aspx.vb b/Bancos/RepProveedoresPagos.aspx.vb index 210523456..c753e1c40 100644 --- a/Bancos/RepProveedoresPagos.aspx.vb +++ b/Bancos/RepProveedoresPagos.aspx.vb @@ -306,7 +306,7 @@ Partial Class Bancos_RepProveedoresPagos params.Add(New ReportParameter("FechaInicio", FI)) params.Add(New ReportParameter("FechaFin", FF)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToString)) params.Add(New ReportParameter("AgrupadoPor", $"{Programo} {Proveedor} {Registro} {Responsable} {Clasificacion} {Moneda} {Estatus} {SubProyecto} {FechaIn} {FechaFn}{FVI}{FVF}")) params.Add(New ReportParameter("Programadas", If(ChkProgramadas.Checked, "1", "0"))) diff --git a/Bancos/RepSaldos.aspx.vb b/Bancos/RepSaldos.aspx.vb index 7e182632d..5cc179836 100644 --- a/Bancos/RepSaldos.aspx.vb +++ b/Bancos/RepSaldos.aspx.vb @@ -21,8 +21,8 @@ Partial Class Bancos_RepSaldos 'CargaBanco() CargaCuenta() DdlCuenta.Items.Insert(0, New ListItem("Todas", "-1")) - txtFechaI.Text = Now.FirstDayOfMonth().ToShortDateString - txtFechaF.Text = Now.LastDayOfMonth().ToShortDateString + txtFechaI.Text = NowADS().FirstDayOfMonth().ToShortDateString + txtFechaF.Text = NowADS().LastDayOfMonth().ToShortDateString CargaMoneda() CargaDatos() @@ -139,7 +139,7 @@ Partial Class Bancos_RepSaldos #Region " EXPORTA EXCEL " Protected Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click - ' GvS.ExportToExcel("ReporteSaldos" & Now.ToShortDateString) + ' GvS.ExportToExcel("ReporteSaldos" & NowADS().ToShortDateString) ImprimirReportePdf("Excel") End Sub @@ -191,7 +191,7 @@ Partial Class Bancos_RepSaldos params.Add(New ReportParameter("RFC", UsuarioActual.Empresa.RFC)) params.Add(New ReportParameter("DireccionEmpresa", UsuarioActual.Empresa.Direccion)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToString())) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToString())) params.Add(New ReportParameter("FechaInicio", FechaI)) params.Add(New ReportParameter("FechaFin", FechaF)) diff --git a/Bancos/RepSaldosDetalle.aspx.vb b/Bancos/RepSaldosDetalle.aspx.vb index 1be4ef330..6a67ea3b1 100644 --- a/Bancos/RepSaldosDetalle.aspx.vb +++ b/Bancos/RepSaldosDetalle.aspx.vb @@ -206,7 +206,7 @@ Partial Class Bancos_RepSaldosDetalle params.Add(New ReportParameter("RFC", UsuarioActual.Empresa.RFC)) params.Add(New ReportParameter("DireccionEmpresa", UsuarioActual.Empresa.Direccion)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToString())) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToString())) params.Add(New ReportParameter("FechaInicio", FechaI)) params.Add(New ReportParameter("FechaFin", FechaF)) @@ -251,8 +251,8 @@ Partial Class Bancos_RepSaldosDetalle 'End Sub 'Protected Sub ImgExcel_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs) Handles ImgExcel.Click - ' 'GvS.ExportToExcel("ReporteSaldos" & Now.ToShortDateString) - ' 'GvRepConciliaciones.ExportToExcel("ReporteConciliacionBancaria" & Now.ToShortDateString) + ' 'GvS.ExportToExcel("ReporteSaldos" & NowADS().ToShortDateString) + ' 'GvRepConciliaciones.ExportToExcel("ReporteConciliacionBancaria" & NowADS().ToShortDateString) ' ExportExcel() 'End Sub @@ -273,7 +273,7 @@ Partial Class Bancos_RepSaldosDetalle ' Excel.ScreenUpdating = True ' Excel.DisplayAlerts = True - ' Dim NombreArchivo = String.Format("Conciliacion-{0}-{1}", Cuenta, Date.Now.ToShortDateString.Replace("/", "")) + ' Dim NombreArchivo = String.Format("Conciliacion-{0}-{1}", Cuenta, NowADS().ToShortDateString.Replace("/", "")) ' Dim ArchivoBase As New System.IO.FileInfo(String.Format("{0}Formatos\ReporteConciliaciones.xlsm", UsuarioActual.Empresa.Ruta)) ' ArchivoBase.CopyTo(String.Format("{0}Formatos\{1}.xlsm", UsuarioActual.Empresa.Ruta, NombreArchivo), True) @@ -346,7 +346,7 @@ Partial Class Bancos_RepSaldosDetalle ' ArchivoTemp.Delete() ' Dim Descargas As New StringBuilder() - ' Descargas.AppendFormat("
  • PDF
  • ", UsuarioActual.CveEmpresa, NombreArchivo, now.Ticks) + ' Descargas.AppendFormat("
  • PDF
  • ", UsuarioActual.CveEmpresa, NombreArchivo, NowADS().Ticks) ' Alert(String.Format("
    El reporte se generó correctamente.


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

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

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

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

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

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

    El proveedor tiene evaluaciones pendientes
    ") + Msg.Append("¿Desea realizar una evaluacion al proveedor?") + Msg.AppendFormat($"
    Evaluar Proveedor.") + End If + + BtnGuardar.Enabled = False + UpFacturar.Update() + + Alert(Msg.ToString, TipoMensaje.MsgInformacion, MsgAccionAceptar) + Else + ObjCompras.RollBack() + If ObjContaAC IsNot Nothing Then ObjContaAC.RollBack() + Alert("Ocurrio un error al guardar la compra. Por favor intente nuevamente.", TipoMensaje.MsgError) + End If + End If + Else + ObjCompras.RollBack() + If ObjContaAC IsNot Nothing Then ObjContaAC.RollBack() + Alert("Ocurrio un error al guardar la compra. Por favor intente nuevamente.", TipoMensaje.MsgError) End If + Else + Alert("Debe seleccionar un Funcionario/Empleado o Caja Chica para Reembolsos. Por favor vuelva a intentar.", TipoMensaje.MsgError) ObjCompras.RollBack() If ObjContaAC IsNot Nothing Then ObjContaAC.RollBack() - Alert("Ocurrio un error al guardar la compra. Por favor intente nuevamente.", TipoMensaje.MsgError) End If - Else - Alert("Debe seleccionar un Funcionario/Empleado o Caja Chica para Reembolsos. Por favor vuelva a intentar.", TipoMensaje.MsgError) + Alert("Ocurrió un error al agregar el movimiento bancario.
    Revise sus datos de pago y cualquier detalle comuníquese a Soporte Técnico", TipoMensaje.MsgAdvertencia) ObjCompras.RollBack() - If ObjContaAC IsNot Nothing Then ObjContaAC.RollBack() End If - Else - Alert("Ocurrió un error al agregar el movimiento bancario.
    Revise sus datos de pago y cualquier detalle comuníquese a Soporte Técnico", TipoMensaje.MsgAdvertencia) - ObjCompras.RollBack() End If - End If - - Catch ex As Exception - ObjCompras.RollBack() - If ObjContaAC IsNot Nothing Then ObjContaAC.RollBack() - Alert("Ocurrió un error al registrar la compra. Cualquier detalle comuníquese a Soporte Técnico", TipoMensaje.MsgError) - GuardaLog($"Ocurrió un error al registrar la compra. Cualquier detalle comuníquese a Soporte Técnico : {ex}") - ViewState("CveCompra") = -1 - End Try - ObjAcar.Dispose() - ObjCompras.Dispose() - ObjConta.Dispose() - ObjIE.Dispose() - ObjInventario.Dispose() - ObjAF.Dispose() - ObjOC.Dispose() - ObjProveedores.Dispose() - ObjCGame.Dispose() - ObjProductosServicios.Dispose() + Catch ex As Exception + ObjCompras.RollBack() + If ObjContaAC IsNot Nothing Then ObjContaAC.RollBack() + Alert("Ocurrió un error al registrar la compra. Cualquier detalle comuníquese a Soporte Técnico", TipoMensaje.MsgError) + GuardaLog($"Ocurrió un error al registrar la compra. Cualquier detalle comuníquese a Soporte Técnico : {ex}") + ViewState("CveCompra") = -1 + End Try + ObjAcar.Dispose() + ObjCompras.Dispose() + ObjConta.Dispose() + ObjIE.Dispose() + ObjInventario.Dispose() + ObjAF.Dispose() + ObjOC.Dispose() + ObjProveedores.Dispose() + ObjCGame.Dispose() + ObjProductosServicios.Dispose() End If End Sub @@ -10040,7 +10040,7 @@ Partial Class Compras_Compras End Sub Private Sub SetValues() 'Dim um As New ClsUnidadesMedida - TxtFecha.Text = Now.ToShortDateString() + TxtFecha.Text = NowADS().ToShortDateString() LblUsuarioCaptura.Text = UsuarioActual.Usuario DdlProveedor.Attributes.Add("onclick", "CargaProveedores();") 'DdlFuncionarioEmpleado.Attributes.Add("onclick", "CargaFuncionariosEmpleados();") @@ -12608,7 +12608,7 @@ Partial Class Compras_Compras If ObjInventario.GetExistenciasProducto(Dr.DataKey("CvePS").ToString.ToEntero, Dr.DataKey("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, CveAlmacen, - FechaMovto:=TxtFecha.Text.ToDateTime.AddHours(Now.Hour).AddMinutes(Now.Minute).AddSeconds(Now.Second).ToString("yyyy/MM/dd HH:mm")) Then + FechaMovto:=TxtFecha.Text.ToDateTime.AddHours(NowADS().Hour).AddMinutes(NowADS().Minute).AddSeconds(NowADS().Second).ToString("yyyy/MM/dd HH:mm")) Then Dim Existencia As Decimal = ObjInventario.DtResultados.FiltroPrimeroValor("ExistenciaFinal", String.Format("CveAlmacen = {0}", CveAlmacen)).ToDecimal @@ -12699,7 +12699,7 @@ Partial Class Compras_Compras ' Dim ObjInventario As New ClsInventarios() ' Dim cvecompra As Integer = 5221 ' Dim subtotal As Double = TextBox1.Text.ToDouble - ' guardardevolucion(ObjInventario, cvecompra, subtotal, Now.ToDate) + ' guardardevolucion(ObjInventario, cvecompra, subtotal, NowADS().ToDate) 'End Sub Protected Sub BtnVinculaDevolucion_Click(sender As Object, e As EventArgs) Try @@ -15395,15 +15395,15 @@ Partial Class Compras_Compras #Region " CIERRE PERIODO " Private Function ValidaCierrePeriodo() As Boolean 'solo se permiten, mes actual, mes anterior <= #dias - Dim mesesTrans As Integer = DateDiff(DateInterval.Month, TxtFecha.Text.ToDate, Now).ToEntero + Dim mesesTrans As Integer = DateDiff(DateInterval.Month, TxtFecha.Text.ToDate, NowADS()).ToEntero - If mesesTrans = 0 OrElse (mesesTrans = 1 AndAlso Day(Now) <= UsuarioActual.Empresa.Funcionalidad(123).ToEntero) Then + If mesesTrans = 0 OrElse (mesesTrans = 1 AndAlso Day(NowADS()) <= UsuarioActual.Empresa.Funcionalidad(123).ToEntero) Then Return True End If Return False - 'Dim mesesTrans As Integer = DateDiff(DateInterval.Month, TxtFecha.Text.ToDate, Now).ToEntero - 'If mesesTrans > 1 OrElse Day(Now) >= UsuarioActual.Empresa.Funcionalidad(123).ToEntero Then + 'Dim mesesTrans As Integer = DateDiff(DateInterval.Month, TxtFecha.Text.ToDate, NowADS()).ToEntero + 'If mesesTrans > 1 OrElse Day(NowADS()) >= UsuarioActual.Empresa.Funcionalidad(123).ToEntero Then ' Return True 'End If 'Return False @@ -15495,7 +15495,7 @@ Partial Class Compras_Compras DtDatosDetalle.Rows.Add(Row) TxtSerieLote.Text = "" - TxtFechaCaducidad.Text = Now.ToShortDateString + TxtFechaCaducidad.Text = NowADS().ToShortDateString CargaSerie() End Sub @@ -16450,7 +16450,7 @@ Partial Class Compras_Compras Autorizado = ObjCon.DtResultados.FiltraParametros($"CveClasificacion = {DdlClasificacion.SelectedValue.ToEntero} AND CveTipoGasto = {DdlTipoGasto.SelectedValue.ToEntero} AND Importe > 0").Rows(0)("Importe").ToString.ToDouble End If End If - If ObjCon.GetPresupuestosRep(CvePresupuesto, DdlTipoGasto.SelectedValue.ToEntero, 1, $"01/09/{DateTime.Now.Year - 1}".ToDate, Now, UsuarioActual.CveEmpresa, DdlProyecto.SelectedValue.ToEntero, + If ObjCon.GetPresupuestosRep(CvePresupuesto, DdlTipoGasto.SelectedValue.ToEntero, 1, $"01/09/{NowADS().Year - 1}".ToDate, NowADS(), UsuarioActual.CveEmpresa, DdlProyecto.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveUsuario, DdlClasificacion.SelectedValue.ToEntero) Then If ObjCon.DtResultados.Rows.Count > 0 Then Ejercido = ObjCon.DtResultados.Rows(0)("Ejercido").ToString.ToDouble @@ -16600,7 +16600,7 @@ Partial Class Compras_Compras End If Dim CveCompraDetalleDesvicnualarAF As Integer = TmpDT.FiltroPrimeroValor("CveCompraDetalle", $"Consec={Index}").ToEntero - 'If ObjAF.UpdateActivosFijosCompra(-1, CveCompraDetalleDesvicnualarAF, -1, 0, Now, Opcion:=2) Then + 'If ObjAF.UpdateActivosFijosCompra(-1, CveCompraDetalleDesvicnualarAF, -1, 0, NowADS(), Opcion:=2) Then For Each dRow As DataRow In TmpDT.Rows @@ -18057,7 +18057,7 @@ Partial Class Compras_Compras For Each Row2 As DataRow In DT.Rows ImporteMovimiento = DtTemporal.SUM("Total", String.Format("ISNULL(TipoAF,0) <> 2 AND ISNULL(CveAlmacen,0) = 0 AND ISNULL(AplicaCostoIndirecto,0) <> 1 AND CveClasificacion = {0} AND CveSubProyecto = {1}", Row2("CveClasificacion"), Row2("CveSubProyecto"))).ToString.ToDecimal - ImporteAlmacen = DtTemporal.SUM("ImporteEnAlmacen", String.Format("ISNULL(TipoAF,0) <> 2 AND CveClasificacion = {0} AND CveSubProyecto = {1}", Row2("CveClasificacion"), Row2("CveSubProyecto"))).ToString.ToDecimal + ImporteAlmacen = DtTemporal.SUM("ImporteEnAlmacen", String.Format("ISNULL(TipoAF,0) <> 2 AND CveClasificacion = {0} AND CveSubProyecto = {1}", Row2("CveClasificacion"), Row2("CveSubProyecto"))).ToString.ToDecimal ImporteMovimiento = (ImporteMovimiento - ImporteAlmacen) * Multiplicador importeMN = ImporteMovimiento * TipoCambioActual @@ -18453,7 +18453,7 @@ Partial Class Compras_Compras Private Sub CargaModalFletesImportaciones() - TxtFechaModalImportacionesFletes.Text = Now.ToShortDateString + TxtFechaModalImportacionesFletes.Text = NowADS().ToShortDateString TxtDescripcionModalFletesImportacion.Text = "" TxtPedimento.Text = "" RblTipo.SelectedValue = "1" @@ -18532,7 +18532,7 @@ Partial Class Compras_Compras Case 240 DdlImportaciones.SelectedValueExist(CveImportacion) End Select - TxtFechaModalImportacionesFletes.Text = Now.ToShortDateString + TxtFechaModalImportacionesFletes.Text = NowADS().ToShortDateString TxtDescripcionModalFletesImportacion.Text = "" TxtPedimento.Text = "" UpModalFletesImportaciones.Update() diff --git a/Compras/EvaluacionProveedor.aspx.vb b/Compras/EvaluacionProveedor.aspx.vb index 517bedcec..d755d2df7 100644 --- a/Compras/EvaluacionProveedor.aspx.vb +++ b/Compras/EvaluacionProveedor.aspx.vb @@ -85,7 +85,7 @@ Partial Class Compras_EvaluacionProveedor TxtSerieFolio.Text = "" TxtPS.Text = "" TxtCodigo.Text = "" - TxtFecha.Text = Now.ToString("dd/MM/yyyy") + TxtFecha.Text = NowADS().ToString("dd/MM/yyyy") TxtFirma.Text = UsuarioActual.Nombre TxtCalificacion.Text = "" @@ -147,14 +147,14 @@ Partial Class Compras_EvaluacionProveedor TxtRS.Text = Row.DataKey("RazonSocial") TxtCodigo.Text = Row.DataKey("Codigo") - TxtFecha.Text = Now.ToString("dd/MM/yyyy") + TxtFecha.Text = NowADS().ToString("dd/MM/yyyy") UpEvaluacion.Update() RegistraScript("$('#DvEvaluacion').modal('show');IniciarCalculo();") End Sub Protected Sub BtnEvaluarProveedor_Click(sender As Object, e As EventArgs) CalcularCalificacion() - Dim Fecha = Now + Dim Fecha = NowADS() Dim Mes = Fecha.ToString("MMMM", New CultureInfo("es-MX")) Dim Obs = TxtObs.Text.Trim() @@ -287,7 +287,7 @@ Partial Class Compras_EvaluacionProveedor Dim PathRoot As String = ModExtensiones.DirectorioBaseEmpresas Dim Documento As String = "CartaProveedor.docx" Dim PathSource As String = $"{UsuarioActual.Empresa.Ruta}\Formatos\Plantillas\{Documento}" - Dim PathDestino As String = PathRoot & "Temp\" & Now.Ticks & Documento + Dim PathDestino As String = PathRoot & "Temp\" & NowADS().Ticks & Documento If File.Exists(PathDestino) Then File.Delete(PathDestino) @@ -321,7 +321,7 @@ Partial Class Compras_EvaluacionProveedor Dim PathRoot As String = ModExtensiones.DirectorioBaseEmpresas Dim Documento As String = "FormatoEvaluacionProveedor.docx" Dim PathSource As String = $"{UsuarioActual.Empresa.Ruta}\Formatos\Plantillas\{Documento}" - Dim PathDestino As String = PathRoot & "Temp\" & Now.Ticks & Documento + Dim PathDestino As String = PathRoot & "Temp\" & NowADS().Ticks & Documento If File.Exists(PathDestino) Then File.Delete(PathDestino) @@ -354,7 +354,7 @@ Partial Class Compras_EvaluacionProveedor ListaTagsDocumentost.Add(New TagsDocumentos("{{Proveedor}}", Proveedor)) ListaTagsDocumentost.Add(New TagsDocumentos("{{Dia}}", Dia)) ListaTagsDocumentost.Add(New TagsDocumentos("{{Mes}}", Mes)) - ListaTagsDocumentost.Add(New TagsDocumentos("{{Anio}}", Now.Year.ToString)) + ListaTagsDocumentost.Add(New TagsDocumentos("{{Anio}}", NowADS().Year.ToString)) ListaTagsDocumentost.Add(New TagsDocumentos("{{Calificacion}}", Calificacion)) ListaTagsDocumentost.Add(New TagsDocumentos("{{Resultado}}", Resultado)) 'ListaTagsDocumentost.Add(New TagsDocumentos("{{Usuario}}", UsuarioActual.Nombre)) diff --git a/Compras/Importaciones.aspx.vb b/Compras/Importaciones.aspx.vb index 6b3621f02..cc2a0d2a9 100644 --- a/Compras/Importaciones.aspx.vb +++ b/Compras/Importaciones.aspx.vb @@ -65,7 +65,7 @@ Partial Class Compras_Importaciones DdlProveedores.SelectedText = "Todos" DdlProveedores.SelectedValue = "-1" - TxtFecha.Text = Now.ToShortDateString + TxtFecha.Text = NowADS().ToShortDateString End Sub #End Region diff --git a/Compras/PopUpBuscarFolioC.aspx.vb b/Compras/PopUpBuscarFolioC.aspx.vb index 40c5d023f..b567dfaf0 100644 --- a/Compras/PopUpBuscarFolioC.aspx.vb +++ b/Compras/PopUpBuscarFolioC.aspx.vb @@ -28,8 +28,8 @@ Partial Class Compras_PopUpBuscarFolioC 'RegistraScript("$get('tdContenido').style.height='470px'") CargaProveedor() - txtFechaI.Text = Now.AddDays(-30).ToShortDateString - txtFechaI.Text = Now.AddYears(-1).ToShortDateString + txtFechaI.Text = NowADS().AddDays(-30).ToShortDateString + txtFechaI.Text = NowADS().AddYears(-1).ToShortDateString If Request("Opt") = "Fact" Then ViewState("Opt") = "MandaCveCompra" diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index 0848d97b8..fc8cd8d8b 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -1578,7 +1578,7 @@ Partial Class PopUpVerFactura Dim params As New List(Of ReportParameter) params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("AgrupoPor", $"{FechaCorte}{Usuario}")) params.Add(New ReportParameter("LogoPath", RutaImagenLogo)) Dim lrds As New List(Of ReportDataSource) @@ -1692,7 +1692,7 @@ Partial Class PopUpVerFactura Dim params As New List(Of ReportParameter) params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("Contrato", $"{ObjContratos.NumeroContrato} - {ObjContratos.DescripcionContrato} ")) params.Add(New ReportParameter("Proveedor", If(ObjContratos.CveProveedor > 0, ObjContratos.RazonSocial.ToString, ObjContratos.NombreComercial.ToString))) params.Add(New ReportParameter("FechaInicio", ObjContratos.FechaInicial.ToShortDateString)) @@ -1748,13 +1748,13 @@ Partial Class PopUpVerFactura Dim params As New List(Of ReportParameter) params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("EnvioContacto", EnvioContacto)) params.Add(New ReportParameter("SerieFolio", SerieFolio)) params.Add(New ReportParameter("PedidoContrato", PedidoContrato)) params.Add(New ReportParameter("EnvioDireccion", EnvioDireccion)) params.Add(New ReportParameter("Guia", Guia)) - ImprimirPDF("Empresas/Grales/Formatos/Cicovisa.rdlc", Dt, params, String.Format("Formato Cicovisa -{0}", Now.ToDateTime.ToShortDateString)) + ImprimirPDF("Empresas/Grales/Formatos/Cicovisa.rdlc", Dt, params, String.Format("Formato Cicovisa -{0}", NowADS().ToDateTime.ToShortDateString)) End If End If End Sub @@ -2066,7 +2066,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("LogoPath", RutaImagenLogo)) params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("DomicilioFiscal", $"{UsuarioActual.Empresa.Direccion}, {UsuarioActual.Empresa.Colonia}, {UsuarioActual.Empresa.Localidad}, {UsuarioActual.Empresa.Estado}, Tel. {Telefono}")) params.Add(New ReportParameter("SerieFolio", SerieFolio)) params.Add(New ReportParameter("DomicilioSucursal", DomicilioSucursal)) @@ -2093,7 +2093,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("Ciudad", Ciudad)) params.Add(New ReportParameter("Licencia", Licencia)) - ImprimirPDF($"Empresas/Grales/Formatos/{FormatoRDLC}", Dt, params, String.Format("Carta Porte -{0}", Now.ToDateTime.ToShortDateString)) + ImprimirPDF($"Empresas/Grales/Formatos/{FormatoRDLC}", Dt, params, String.Format("Carta Porte -{0}", NowADS().ToDateTime.ToShortDateString)) End If @@ -2525,7 +2525,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("RegimenFiscal", UsuarioActual.Empresa.Regimen)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("DomicilioFiscal", $"{UsuarioActual.Empresa.Direccion}, {UsuarioActual.Empresa.Colonia}, {UsuarioActual.Empresa.Localidad}, {UsuarioActual.Empresa.Estado}, Tel. {Telefono}")) params.Add(New ReportParameter("SerieFolio", SerieFolio)) params.Add(New ReportParameter("RFC", UsuarioActual.Empresa.RFC)) @@ -2736,12 +2736,12 @@ Partial Class PopUpVerFactura ObjFactura.Folio = Folio ObjFactura.Serie = "Tra" 'ObjFactura.CveMesa = -1 - ObjFactura.Fecha = Now + ObjFactura.Fecha = NowADS() ObjFactura.CvePrePoliza = -1 - ObjFactura.FechaPago = Now + ObjFactura.FechaPago = NowADS() ObjFactura.MotivoDescuento = "" ObjFactura.Observaciones = "" - ObjFactura.FechaEjecucion = Now + ObjFactura.FechaEjecucion = NowADS() ObjFactura.UsuarioCreo = UsuarioActual.Usuario ObjFactura.CveCondicionEntrega = -1 ObjFactura.CondicionEntrega = "" @@ -2762,7 +2762,7 @@ Partial Class PopUpVerFactura ObjFactura.Amortizacion = 0 ObjFactura.CveContrato = 0 ObjFactura.CveVendedor = 0 - ObjFactura.FechaVencimiento = Now + ObjFactura.FechaVencimiento = NowADS() ObjFactura.TipoEstatus = 0 ObjFactura.Det_OrdenCompra = "" ObjFactura.Inv_CveEstatusEntrega = 0 @@ -3128,7 +3128,7 @@ Partial Class PopUpVerFactura End If End If - If Vta.Version.ToEntero() = 4 AndAlso dr1("CodigoObjetoImpuesto").ToString() = "02" AndAlso Now.Date >= New DateTime(2022, 11, 1) AndAlso dr1("Descuento").ToString().ToDecimal().RoundSQL(2) = dr1("Total").ToString().ToDecimal().RoundSQL(2) Then + If Vta.Version.ToEntero() = 4 AndAlso dr1("CodigoObjetoImpuesto").ToString() = "02" AndAlso NowADS().Date >= New DateTime(2022, 11, 1) AndAlso dr1("Descuento").ToString().ToDecimal().RoundSQL(2) = dr1("Total").ToString().ToDecimal().RoundSQL(2) Then dr1("CodigoObjetoImpuesto") = "04" End If @@ -3602,7 +3602,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("Concepto", "Inventario Inicial")) params.Add(New ReportParameter("Almacen", Almacen)) params.Add(New ReportParameter("Fecha", Fecha)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("Folio", Folio)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) 'params.Add(New ReportParameter("Descuentos", (dr("Descuentos").ToString.ToDouble).FormatoNumero(2))) @@ -3662,7 +3662,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("Concepto", ConceptoFormato)) params.Add(New ReportParameter("Almacen", Almacen)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("Folio", Folio)) @@ -3714,7 +3714,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("Concepto", concepto)) params.Add(New ReportParameter("Almacen", Almacen)) params.Add(New ReportParameter("Fecha", Fecha)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("Folio", Folio)) params.Add(New ReportParameter("FacturadoA", NombreCliente)) params.Add(New ReportParameter("FacturaProveedor", If(CveCompra > 0 AndAlso dr IsNot Nothing, dr("SerieFolio").ToString, ""))) @@ -3766,7 +3766,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("Concepto", "ENTRADA DE ALMACÉN")) params.Add(New ReportParameter("Almacen", Almacen)) params.Add(New ReportParameter("Fecha", Fecha)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("Folio", Folio)) params.Add(New ReportParameter("FacturadoA", NombreCliente)) params.Add(New ReportParameter("FacturaProveedor", If(CveCompra > 0 AndAlso dr IsNot Nothing, dr("SerieFolio").ToString, ""))) @@ -3836,7 +3836,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("Telefono", DtMovimientos(0)("Telefono").ToString)) params.Add(New ReportParameter("Correo", DtMovimientos(0)("Correo").ToString)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("NombreEntrego", Capturo)) params.Add(New ReportParameter("NombreRecibio", Recibio)) @@ -3916,7 +3916,7 @@ Partial Class PopUpVerFactura End If params.Add(New ReportParameter("Concepto", concepto)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("Folio", Folio)) params.Add(New ReportParameter("Almacen", Almacen)) params.Add(New ReportParameter("FacturaProveedor", FolioVenta)) @@ -3948,7 +3948,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("FacturaProveedor", FolioVenta)) params.Add(New ReportParameter("FacturadoA", If(DtMovimientos(0)("Nombre").ToString <> "", DtMovimientos(0)("Nombre").ToString, NombreCliente))) params.Add(New ReportParameter("Observaciones", Observaciones)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("Folio", Folio)) params.Add(New ReportParameter("Descuentos", "")) params.Add(New ReportParameter("IVA", "")) @@ -3984,7 +3984,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("FacturaProveedor", FolioVenta)) params.Add(New ReportParameter("FacturadoA", If(DtMovimientos(0)("Nombre").ToString <> "", DtMovimientos(0)("Nombre").ToString, NombreCliente))) params.Add(New ReportParameter("Observaciones", Observaciones)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("Folio", Folio)) params.Add(New ReportParameter("Descuentos", "")) params.Add(New ReportParameter("IVA", "")) @@ -4059,7 +4059,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("Concepto", "Entrada por Desarmado de Paquete")) params.Add(New ReportParameter("Almacen", Almacen)) params.Add(New ReportParameter("Fecha", Fecha)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("Folio", Folio)) params.Add(New ReportParameter("Descuentos", "")) params.Add(New ReportParameter("IVA", "")) @@ -4083,7 +4083,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("Concepto", "Salida por Armado de Paquete")) params.Add(New ReportParameter("Almacen", Almacen)) params.Add(New ReportParameter("Fecha", Fecha)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("Folio", Folio)) params.Add(New ReportParameter("Descuentos", "")) params.Add(New ReportParameter("IVA", "")) @@ -4126,7 +4126,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("AlmacenDestino", AlmacenDestino)) params.Add(New ReportParameter("NombreProveedor", Proveedor)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) End If ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/Resguardo.rdlc", DtMovimientos, params, String.Format("Resguardo - {0}", Folio.ToString), RDSName:="DsInventarios") @@ -4198,7 +4198,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("AlmacenDestino", AlmacenDestino)) params.Add(New ReportParameter("NombreProveedor", Proveedor)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) End If @@ -4359,7 +4359,7 @@ Partial Class PopUpVerFactura If UsuarioActual.CveEmpresa = 140 Then params.Add(New ReportParameter("Origen", Almacen)) params.Add(New ReportParameter("Destino", AlmacenDestino)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("CantidadProductos", CantidadProductos.ToString())) @@ -4369,7 +4369,7 @@ Partial Class PopUpVerFactura ElseIf UsuarioActual.CveEmpresa = 153 Then params.Add(New ReportParameter("Origen", Almacen)) params.Add(New ReportParameter("Destino", AlmacenDestino)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("Observaciones", Observaciones)) 'TxtObservaciones.Text @@ -4388,7 +4388,7 @@ Partial Class PopUpVerFactura End If If UsuarioActual.CveEmpresa = 72 Or UsuarioActual.CveEmpresa = 119 Then - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) params.Add(New ReportParameter("AlmacenOrigen", Almacen)) params.Add(New ReportParameter("AlmacenDestino", AlmacenDestino)) @@ -4404,7 +4404,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("LogoPath", RutaImagenLogo)) params.Add(New ReportParameter("Origen", Almacen)) params.Add(New ReportParameter("Destino", AlmacenDestino)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) If UsuarioActual.CveEmpresa.Contiene(172, 173) Then @@ -4439,7 +4439,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("Factura", DtMovimientos(0)("SerieFolio").ToString)) If UsuarioActual.CveEmpresa = 72 Or UsuarioActual.CveEmpresa = 119 Then - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) params.Add(New ReportParameter("AlmacenOrigen", Almacen)) params.Add(New ReportParameter("AlmacenDestino", AlmacenDestino)) @@ -4451,7 +4451,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("Origen", AlmacenDestino)) ' se invierte params.Add(New ReportParameter("Destino", Almacen)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("CveConceptoMovRelacionado", CveConceptoMovRelacionado.ToString())) @@ -4460,7 +4460,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("LogoPath", RutaImagenLogo)) params.Add(New ReportParameter("Origen", AlmacenDestino)) ' se invierte params.Add(New ReportParameter("Destino", Almacen)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) End If @@ -4473,7 +4473,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("Origen", Almacen)) params.Add(New ReportParameter("Destino", AlmacenDestino)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) ImprimirPDF(String.Format("Empresas/Grales/Formatos/Traslado.rdlc", UsuarioActual.Empresa.Ruta), DtMovimientos, params, String.Format("Recepción de Traslado - {0}", Folio), RDSName:="DsInventarios") @@ -4544,7 +4544,7 @@ Partial Class PopUpVerFactura End If If UsuarioActual.CveEmpresa = 119 Then - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) End If 'ObjInventarios.Dispose() @@ -4660,7 +4660,7 @@ Partial Class PopUpVerFactura End If params.Add(New ReportParameter("Concepto", "Entrada por garantia")) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("Folio", Folio)) params.Add(New ReportParameter("Fecha", Fecha)) params.Add(New ReportParameter("Almacen", Almacen)) @@ -4693,7 +4693,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("Concepto", "Salida Garantía")) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("Folio", Folio)) params.Add(New ReportParameter("Fecha", Fecha)) params.Add(New ReportParameter("Almacen", Almacen)) @@ -4740,7 +4740,7 @@ Partial Class PopUpVerFactura CiudadSucursal = String.Format("{0}, {1}", DtMovimientos(0)("Municipio").ToString, DtMovimientos(0)("Estado").ToString) DomicilioSucursal = String.Format("{0} #{1}, {2}, Col. {3}, CP: {4}, {5}, {6}", DtMovimientos(0)("Calle").ToString, DtMovimientos(0)("NoExt").ToString, DtMovimientos(0)("NoInt").ToString, DtMovimientos(0)("Colonia"), DtMovimientos(0)("CP").ToString, CiudadSucursal, DtMovimientos(0)("Pais").ToString) End If - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("Folio", Folio)) params.Add(New ReportParameter("Concepto", "DEVOLUCIÓN DEL CLIENTE")) params.Add(New ReportParameter("Fecha", Fecha)) @@ -4752,7 +4752,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("FacturadoA", DtMovimientos(0)("Nombre").ToString)) params.Add(New ReportParameter("EnviarA", DtMovimientos(0)("Mail").ToString)) params.Add(New ReportParameter("Entrega", DtMovimientos(0)("Entrega").ToString)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) If UsuarioActual.CveEmpresa = 72 Or UsuarioActual.CveEmpresa = 119 Then params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) @@ -4780,7 +4780,7 @@ Partial Class PopUpVerFactura CiudadSucursal = String.Format("{0}, {1}", DtMovimientos(0)("Municipio").ToString, DtMovimientos(0)("Estado").ToString) DomicilioSucursal = String.Format("{0} #{1}, {2}, Col. {3}, CP: {4}, {5}, {6}", DtMovimientos(0)("Calle").ToString, DtMovimientos(0)("NoExt").ToString, DtMovimientos(0)("NoInt").ToString, DtMovimientos(0)("Colonia"), DtMovimientos(0)("CP").ToString, CiudadSucursal, DtMovimientos(0)("Pais").ToString) End If - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("Folio", Folio)) params.Add(New ReportParameter("Concepto", "DEVOLUCIÓN DEL CLIENTE")) params.Add(New ReportParameter("Fecha", Fecha)) @@ -4792,7 +4792,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("FacturadoA", DtMovimientos(0)("Nombre").ToString)) params.Add(New ReportParameter("EnviarA", DtMovimientos(0)("Mail").ToString)) params.Add(New ReportParameter("Entrega", DtMovimientos(0)("Entrega").ToString)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) ImprimirPDF("Empresas/Grales/Formatos/DevolucionCliente.rdlc", DtMovimientos, params, String.Format("Devolucion del Cliente - {0}", Folio.ToString), RDSName:="DsInventarios") @@ -4810,7 +4810,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("Concepto", "Armado de Paquete")) params.Add(New ReportParameter("Almacen", Almacen)) params.Add(New ReportParameter("Fecha", Fecha)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("Folio", Folio)) params.Add(New ReportParameter("Descuentos", "")) params.Add(New ReportParameter("IVA", "")) @@ -4835,7 +4835,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("Concepto", "Desarmado de Paquete")) params.Add(New ReportParameter("Almacen", Almacen)) params.Add(New ReportParameter("Fecha", Fecha)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("Folio", Folio)) params.Add(New ReportParameter("Descuentos", "")) params.Add(New ReportParameter("IVA", "")) @@ -4861,7 +4861,7 @@ Partial Class PopUpVerFactura End If params.Add(New ReportParameter("Almacen", Almacen)) params.Add(New ReportParameter("Fecha", Fecha)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("Folio", Folio)) params.Add(New ReportParameter("Descuentos", "")) params.Add(New ReportParameter("IVA", "")) @@ -4888,7 +4888,7 @@ Partial Class PopUpVerFactura ' params.Add(New ReportParameter("Concepto", "Entrada por Prestamo")) ' params.Add(New ReportParameter("Almacen", Almacen)) ' params.Add(New ReportParameter("Fecha", Fecha)) - ' params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + ' params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) ' params.Add(New ReportParameter("Folio", Folio)) ' params.Add(New ReportParameter("Descuentos", "")) ' params.Add(New ReportParameter("IVA", "")) @@ -4915,7 +4915,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("Concepto", "Salida por resguardo")) params.Add(New ReportParameter("Almacen", Almacen)) params.Add(New ReportParameter("Fecha", Fecha)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("Folio", Folio)) params.Add(New ReportParameter("Descuentos", "")) params.Add(New ReportParameter("IVA", "")) @@ -4997,7 +4997,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("Concepto", ConceptoReporte)) params.Add(New ReportParameter("Almacen", Almacen)) params.Add(New ReportParameter("Fecha", Fecha)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("Folio", Folio)) params.Add(New ReportParameter("Proveedor", Proveedor)) params.Add(New ReportParameter("NombreRecibio", String.Format("RECIBIÓ{0}{1}", vbCrLf, Recibio))) @@ -5037,7 +5037,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("Telefono", DtMovimientos(0)("Telefono").ToString)) params.Add(New ReportParameter("Correo", DtMovimientos(0)("Correo").ToString)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("NombreEntrego", Capturo)) params.Add(New ReportParameter("NombreRecibio", Recibio)) params.Add(New ReportParameter("LogoPath", RutaImagenLogo)) @@ -5057,7 +5057,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("Observaciones", Observaciones)) params.Add(New ReportParameter("Almacen", Almacen)) params.Add(New ReportParameter("NombreRecibio", Recibio)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/SalidaDemostracion.rdlc", DtMovimientos, params, String.Format("Salida por Demostración - {0}", Folio.ToString), RDSName:="DsInventarios") End If @@ -5100,7 +5100,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("Telefono", DtMovimientos(0)("Telefono").ToString)) params.Add(New ReportParameter("Correo", DtMovimientos(0)("Correo").ToString)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("NombreEntrego", Capturo)) params.Add(New ReportParameter("NombreRecibio", Recibio)) @@ -5184,7 +5184,7 @@ Partial Class PopUpVerFactura End If params.Add(New ReportParameter("Concepto", ConceptoReporte)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("Folio", Folio)) params.Add(New ReportParameter("Almacen", Almacen)) params.Add(New ReportParameter("FacturaProveedor", FolioVenta)) @@ -5207,7 +5207,7 @@ Partial Class PopUpVerFactura Else If UsuarioActual.CveEmpresa = 140 Then params.Add(New ReportParameter("Concepto", ConceptoReporte)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("UsuarioRegistro", UsuarioRegistro)) End If params.Add(New ReportParameter("Folio", Folio)) @@ -5230,7 +5230,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("FacturaProveedor", FolioVenta)) params.Add(New ReportParameter("FacturadoA", DtMovimientos(0)("Nombre").ToString)) params.Add(New ReportParameter("Observaciones", Observaciones)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("Folio", Folio)) params.Add(New ReportParameter("Descuentos", "")) params.Add(New ReportParameter("IVA", "")) @@ -5306,7 +5306,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("Sucursal", "Sucursal")) params.Add(New ReportParameter("Cliente", NombreCliente)) params.Add(New ReportParameter("Folio", Folio)) - params.Add(New ReportParameter("FechaImpresion", Now.ToString("dd/MM/yyyy hh:mm tt"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy hh:mm tt"))) params.Add(New ReportParameter("Recibio", Recibio)) params.Add(New ReportParameter("Observaciones", Observaciones)) 'params.Add(New ReportParameter("Observaciones", "Observaciones con un tamaño mas grande para ver como se ve en el ticket chico.")) @@ -5331,7 +5331,7 @@ Partial Class PopUpVerFactura CiudadSucursal = String.Format("{0}, {1}", DtMovimientos(0)("Municipio").ToString, DtMovimientos(0)("Estado").ToString) DomicilioSucursal = String.Format("{0} #{1}, {2}, Col. {3}, CP: {4}, {5}, {6}", DtMovimientos(0)("Calle").ToString, DtMovimientos(0)("NoExt").ToString, DtMovimientos(0)("NoInt").ToString, DtMovimientos(0)("Colonia"), DtMovimientos(0)("CP").ToString, CiudadSucursal, DtMovimientos(0)("Pais").ToString) End If - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("Folio", Folio)) params.Add(New ReportParameter("Concepto", "DEVOLUCIÓN DEL CLIENTE")) params.Add(New ReportParameter("Fecha", Fecha)) @@ -5343,7 +5343,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("FacturadoA", DtMovimientos(0)("Nombre").ToString)) params.Add(New ReportParameter("EnviarA", DtMovimientos(0)("Mail").ToString)) params.Add(New ReportParameter("Entrega", DtMovimientos(0)("Entrega").ToString)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/DevolucionCliente.rdlc", DtMovimientos, params, String.Format("Devolucion del Cliente - {0}", Folio.ToString), RDSName:="DsInventarios") @@ -5479,7 +5479,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("Año", dr("Año").ToString)) params.Add(New ReportParameter("TelefonoContacto", dr("TelefonoContacto").ToString)) - params.Add(New ReportParameter("FechaImpresion", Now.ToString("dd/MM/yyyy"))) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario)) params.Add(New ReportParameter("Condiciones", dr("Condiciones").ToString)) params.Add(New ReportParameter("FechaAtencion", If(dr("FechaInicio").ToString.Length > 0, dr("FechaInicio").ToString.ToDate.ToString("dd/MM/yyyy hh:mm tt"), ""))) @@ -5503,7 +5503,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("LogoPath", RutaImagenLogo)) @@ -5976,7 +5976,7 @@ Partial Class PopUpVerFactura Tabla = ObjIE.DtResultados Dim params As New List(Of ReportParameter) - params.Add(New ReportParameter("Fecha", Now.ToDateTime.ToString)) + params.Add(New ReportParameter("Fecha", NowADS().ToDateTime.ToString)) params.Add(New ReportParameter("FechaIE", ObjIE.DtResultados(0)("FechaDocumento").ToString.ToDate.ToShortDateString)) params.Add(New ReportParameter("CuentaCaja", CuentaCaja)) params.Add(New ReportParameter("CuentaDeposito", CuentaDeposito)) @@ -6105,7 +6105,7 @@ Partial Class PopUpVerFactura ElseIf CveTipoTransaccion.Contiene(2, 8, 9, 10) Then Dim Folio, Observacion, UsuarioRegistro, TextoImporte, PagueseA, Ruta, Banco, NumCuenta, AbonoCuenta, SubProyecto, NotificarA, RefCrediproveedor As String - Dim FechaExpedicion As Date = Now + Dim FechaExpedicion As Date = NowADS() Dim Importe As Double Dim FormatoCheque As String = "" @@ -6218,7 +6218,7 @@ Partial Class PopUpVerFactura 'IMPRESION DE FORMATO DE IE PAGO EN EFECTIVO PARA COMPU - VIATICOS Dim Folio As String = "", Observacion As String = "", UsuarioRegistro As String = "", TextoImporte As String = "", PagueseA As String = "" Dim Ruta As String = UsuarioActual.Empresa.Ruta - Dim FechaExpedicion As Date = Now + Dim FechaExpedicion As Date = NowADS() Dim Importe As Double Dim FormatoCheque As String = "" @@ -6302,7 +6302,7 @@ Partial Class PopUpVerFactura If UsuarioActual.CveEmpresa = 72 Then params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToString)) params.Add(New ReportParameter("CveCajaChica", DtComprobacion.Rows(0)("CveCajaChica").ToString)) params.Add(New ReportParameter("CveFyE", "0")) ' @@ -6319,7 +6319,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("Numero", "")) ' params.Add(New ReportParameter("Anio", DtComprobacion.FiltraParametros("CveCompra > 0").MAX("Fecha").ToDate.Year.ToString)) params.Add(New ReportParameter("Nombre", DtComprobacion.MAX("SubProyecto"))) - params.Add(New ReportParameter("Fecha", Now.Date.ToString)) + params.Add(New ReportParameter("Fecha", NowADS().Date.ToString)) params.Add(New ReportParameter("Elaboro", "")) params.Add(New ReportParameter("Autorizo", "")) params.Add(New ReportParameter("ElaboroPuesto", "")) @@ -6329,7 +6329,7 @@ Partial Class PopUpVerFactura Else params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToString)) params.Add(New ReportParameter("cuentaRetiro", "Cuenta retiro: " & ParamComprobacion.Rows(0)("BancoNumCuentaMoneda").ToString)) params.Add(New ReportParameter("CajaChica", "Caja chica: " & ParamComprobacion.Rows(0)("BancoNumCuentaMoneda").ToString)) @@ -6382,7 +6382,7 @@ Partial Class PopUpVerFactura Dim paramList As New List(Of ReportParameter) With paramList .Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - .Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + .Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) .Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) .Add(New ReportParameter("Cuenta", ObjIE.NumCuenta, True)) .Add(New ReportParameter("Fecha", ObjIE.FechaDocumento.ToString("dd/MM/yyyy"), True)) diff --git a/Compras/Proveedores.aspx.vb b/Compras/Proveedores.aspx.vb index 7e10dd96d..ffd74af0e 100644 --- a/Compras/Proveedores.aspx.vb +++ b/Compras/Proveedores.aspx.vb @@ -449,7 +449,7 @@ Partial Class Compras_Proveedores Private Property FechaLimite As Date Get If ViewState("FechaLimite") Is Nothing Then - Return Date.Now.AddDays(15) + Return NowADS().AddDays(15) Else Return ViewState("FechaLimite").ToString.ToDate End If @@ -546,7 +546,7 @@ Partial Class Compras_Proveedores ImgAddObs.Visible = False ChkEstado.Checked = True : ChkEstado.Enabled = False - LblFechaCaptura.Text = Now.ToShortDateString() + LblFechaCaptura.Text = NowADS().ToShortDateString() LblUsuarioCapturo.Text = UsuarioActual.Usuario ViewState("CveProveedor") = -1 DivSucursales.Visible = False @@ -625,8 +625,8 @@ Partial Class Compras_Proveedores End If - TxtFechaICredito.Text = Now.AddYears(-2).ToShortDateString - TxtFechaFCredito.Text = Now.ToShortDateString + TxtFechaICredito.Text = NowADS().AddYears(-2).ToShortDateString + TxtFechaFCredito.Text = NowADS().ToShortDateString If UsuarioActual.Empresa.Funcionalidad(560) = "1" Then TabEvaluacion.Visible = True @@ -734,7 +734,7 @@ Partial Class Compras_Proveedores Private Function CargadeFactura(CveFactura As Integer) As Integer Dim ObjeFacturas As New ClsCompras - If ObjeFacturas.GetFacturas(CveFactura, "-1", Now.AddYears(-2), Now, "-1", "-1", -1, -1, -1, -1, "-1", UsuarioActual.CveEmpresa) Then + If ObjeFacturas.GetFacturas(CveFactura, "-1", NowADS().AddYears(-2), NowADS(), "-1", "-1", -1, -1, -1, -1, "-1", UsuarioActual.CveEmpresa) Then Dim XMLDoc As New XmlDocument Try @@ -2229,7 +2229,7 @@ Partial Class Compras_Proveedores Dim Para As String = TxtCorreoCobranza.Text.Trim Dim Liga As String = ObjParametro.Cadena1 & "LogIn.aspx" - Dim LigaActivar As String = Liga & "?p=" & Encripta("CveU=" & CveUsuario & "&Clave=" & "-acceso-" & "&Opcion=Activar&Hora=" & DateTime.Now.Ticks & "&CveE=" & UsuarioActual.CveEmpresa) + Dim LigaActivar As String = Liga & "?p=" & Encripta("CveU=" & CveUsuario & "&Clave=" & "-acceso-" & "&Opcion=Activar&Hora=" & NowADS().Ticks & "&CveE=" & UsuarioActual.CveEmpresa) Dim ObjMail As New ClsSisMail() @@ -3730,7 +3730,7 @@ Partial Class Compras_Proveedores lista.Add(New CrystalParametro("Empresa", UsuarioActual.Empresa.Empresa)) lista.Add(New CrystalParametro("TipoCuentas", DdlTipoCuentasCxP.SelectedItem.Text)) lista.Add(New CrystalParametro("FechaInicio", If(FI = "-1", "-", FI))) - lista.Add(New CrystalParametro("FechaFin", If(FF = "-1", DateTime.Now.ToShortDateString, FF))) + lista.Add(New CrystalParametro("FechaFin", If(FF = "-1", NowADS().ToShortDateString, FF))) lista.Add(New CrystalParametro("NombreProveedor", LtlProveedor.Text)) lista.Add(New CrystalParametro("DireccionProveedor", TxtDireccion.Text)) lista.Add(New CrystalParametro("ProveedorRFC", TxtRFC.Text)) @@ -3885,7 +3885,7 @@ Partial Class Compras_Proveedores ' ' ArchivoTemp.Delete() ' ' Dim Descargas As New StringBuilder() - ' ' Descargas.AppendFormat("
  • Reporte
  • ", UsuarioActual.CveEmpresa, CveProveedor, Now.Ticks) + ' ' Descargas.AppendFormat("
  • Reporte
  • ", UsuarioActual.CveEmpresa, CveProveedor, NowADS().Ticks) ' ' Dim Msg As String = String.Format("
    El Documento se generó correctamente.


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


    Descargas:
      {0}
    ", Descargas.ToString) 'TipoMensaje.MsgInformacion ' ' Msg.Alert(Msg, TipoMensaje.MsgInformacion) ' 'Catch ex As Exception @@ -4081,7 +4081,7 @@ Partial Class Compras_Proveedores params.Add(New ReportParameter("FechaInicio", FI)) params.Add(New ReportParameter("FechaFin", FF)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToString)) params.Add(New ReportParameter("NombreProveedor", LtlProveedor.Text)) params.Add(New ReportParameter("DireccionProveedor", TxtDireccion.Text)) params.Add(New ReportParameter("ProveedorRFC", TxtRFC.Text)) @@ -4482,7 +4482,7 @@ Partial Class Compras_Proveedores params.Add(New ReportParameter("NombreProveedor", TxtRazonSocial.Text)) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) - ImprimirPDF("Empresas/Grales/Formatos/ProveedorConciliacion.rdlc", ObjProveedores.DtResultados, params, String.Format("ProveedorConciliacion-{0}", Now.ToDateTime.ToShortDateString)) + ImprimirPDF("Empresas/Grales/Formatos/ProveedorConciliacion.rdlc", ObjProveedores.DtResultados, params, String.Format("ProveedorConciliacion-{0}", NowADS().ToDateTime.ToShortDateString)) End If ObjProveedores.Dispose() @@ -4949,7 +4949,7 @@ Partial Class Compras_Proveedores DtVencido = ObjProveedores.DtResultados End If - If ObjFinanzas.GetRotacionCarteraProveedores(TxtFechaICredito.Text.ToDate, TxtFechaFCredito.Text.ToDate, UsuarioActual.CveEmpresa, 1, "-1", " -1", CveProveedor, Now) Then + If ObjFinanzas.GetRotacionCarteraProveedores(TxtFechaICredito.Text.ToDate, TxtFechaFCredito.Text.ToDate, UsuarioActual.CveEmpresa, 1, "-1", " -1", CveProveedor, NowADS()) Then DtRotacion = ObjFinanzas.DtResultados End If @@ -5377,7 +5377,7 @@ Partial Class Compras_Proveedores TxtSerieFolio.Text = "" TxtPS.Text = "" TxtCodigoE.Text = "" - TxtFechaE.Text = Now.ToString("dd/MM/yyyy") + TxtFechaE.Text = NowADS().ToString("dd/MM/yyyy") TxtFirma.Text = "" TxtCalificacion.Text = "" @@ -6050,7 +6050,7 @@ Partial Class Compras_Proveedores params.Add(New ReportParameter("AgrupadoPor", "Proveedor: " & LtlProveedor.Text)) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) - ImprimirPDF("Empresas\Grales\Formatos\" & NombreFormato & ".rdlc", DtTemp, params, NombreFormato & "_" & Now.ToString("yyyyMMddhhmmss"), Formato:=Formato) + ImprimirPDF("Empresas\Grales\Formatos\" & NombreFormato & ".rdlc", DtTemp, params, NombreFormato & "_" & NowADS().ToString("yyyyMMddhhmmss"), Formato:=Formato) Else Alert("No se encontró información.", TipoMensaje.MsgAdvertencia) End If diff --git a/Compras/ProveedoresAuxiliar.aspx.vb b/Compras/ProveedoresAuxiliar.aspx.vb index 8524e6916..d2f406b5c 100644 --- a/Compras/ProveedoresAuxiliar.aspx.vb +++ b/Compras/ProveedoresAuxiliar.aspx.vb @@ -70,8 +70,8 @@ Partial Class Compras_ProveedoresAuxiliar 'DdlConceptosContables.Items.Insert(0, New ListItem("Todos", "-1")) - txtFechaI.Text = Now.AddDays(-30).ToString("dd/MM/yyyy") - txtFechaF.Text = Now.ToString("dd/MM/yyyy") + txtFechaI.Text = NowADS().AddDays(-30).ToString("dd/MM/yyyy") + txtFechaF.Text = NowADS().ToString("dd/MM/yyyy") End Sub @@ -123,7 +123,7 @@ Partial Class Compras_ProveedoresAuxiliar Dim params As New List(Of ReportParameter) params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString)) params.Add(New ReportParameter("Filtros", $"Filtros: {Proveedor}{FechaIn}{FechaFn}{OpcionP}{TipoProv}{ContaP}")) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) ImprimirPDF("Empresas/Grales/Formatos/AuxiliarProveedor.rdlc", DtDatos, params, "AuxiliarProveedor", Opcion) diff --git a/Compras/Reembolsos.aspx.vb b/Compras/Reembolsos.aspx.vb index ae77d15b6..bdafaa1c6 100644 --- a/Compras/Reembolsos.aspx.vb +++ b/Compras/Reembolsos.aspx.vb @@ -443,7 +443,7 @@ Partial Class Compras_Reembolsos TxtFolio.Text = "" TxtObservaciones.Text = "" TxtImporte.Text = "" - TxtFechaDocumento.Text = Date.Now.ToShortDateString + TxtFechaDocumento.Text = NowADS().ToShortDateString 'DdlCuenta.SelectedValue = "-1" DdlTipoTransaccion.SelectedValue = "-1" DdlTipoTransaccionDiferencia_SelectedIndexChanged(DdlTipoTransaccion, EventArgs.Empty) @@ -500,7 +500,7 @@ Partial Class Compras_Reembolsos DDlCheques.Items.Insert(0, New ListItem("Expedir Cheque", "-1")) If GvCxP.Rows.Count > 0 Then - TxtFechaDocumento.Text = Now.ToShortDateString + TxtFechaDocumento.Text = NowADS().ToShortDateString BtnIEGuardar.Enabled = True If Not DdlPersonal.SelectedValue = "-2" Then diff --git a/Compras/ReembolsosComprobaciones.aspx.vb b/Compras/ReembolsosComprobaciones.aspx.vb index 0f7b0acbd..6fdb67d3c 100644 --- a/Compras/ReembolsosComprobaciones.aspx.vb +++ b/Compras/ReembolsosComprobaciones.aspx.vb @@ -123,7 +123,7 @@ Partial Class Compras_ReembolsosComprobaciones If UsuarioActual.CveEmpresa = 119 Then ChkReembolsarSinBancos.Visible = True - TxtFechaPrePoliza.Text = Date.Now.ToShortDateString + TxtFechaPrePoliza.Text = NowADS().ToShortDateString End If @@ -886,7 +886,7 @@ Partial Class Compras_ReembolsosComprobaciones TxtObservaciones.Text = "" TxtImporte.Text = "" TxtImporteVinculado.Text = "" - TxtFechaDocumento.Text = Date.Now.ToShortDateString + TxtFechaDocumento.Text = NowADS().ToShortDateString 'DdlCuenta.SelectedValue = "-1" DdlTipoTransaccion.SelectedValue = "-1" DdlTipoTransaccionDiferencia_SelectedIndexChanged(DdlTipoTransaccion, EventArgs.Empty) @@ -1004,7 +1004,7 @@ Partial Class Compras_ReembolsosComprobaciones DDlCheques_SelectedIndexChanged(DDlCheques, EventArgs.Empty) If GvCxP.Rows.Count > 0 Then - TxtFechaDocumento.Text = Now.ToShortDateString + TxtFechaDocumento.Text = NowADS().ToShortDateString 'Valida Proceso 120 para ROL Administrador de obra - Si tiene el proceso no puede guardar If Not UsuarioActual.TienePermisoProceso(120) Then @@ -1161,7 +1161,7 @@ Partial Class Compras_ReembolsosComprobaciones If UsuarioActual.CveEmpresa = 72 Then params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToString)) params.Add(New ReportParameter("CveCajaChica", CveCajaChica.ToString)) params.Add(New ReportParameter("CveFyE", CvePersonal.ToString)) params.Add(New ReportParameter("CajaChica", If(DdlCajaChica.SelectedValue.ToEntero > 0, "Caja chica: " & DdlCajaChica.SelectedItem.Text, "Funcionario/Empleado: " & DdlPersonal.SelectedItem.Text))) @@ -1171,7 +1171,7 @@ Partial Class Compras_ReembolsosComprobaciones params.Add(New ReportParameter("Numero", NumeroReembolso)) params.Add(New ReportParameter("Anio", DtDatos.FiltraParametros("CveCompra > 0").MAX("Fecha").ToDate.Year.ToString)) params.Add(New ReportParameter("Nombre", DtDatos.MAX("SubProyecto"))) - params.Add(New ReportParameter("Fecha", Now.Date.ToString)) + params.Add(New ReportParameter("Fecha", NowADS().Date.ToString)) params.Add(New ReportParameter("Elaboro", "")) params.Add(New ReportParameter("Autorizo", "")) params.Add(New ReportParameter("ElaboroPuesto", "")) @@ -1181,7 +1181,7 @@ Partial Class Compras_ReembolsosComprobaciones Else params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToString)) params.Add(New ReportParameter("CajaChica", If(DdlCajaChica.SelectedValue.ToEntero > 0, "Caja chica: " & DdlCajaChica.SelectedItem.Text, "Funcionario/Empleado: " & DdlPersonal.SelectedItem.Text))) @@ -1242,8 +1242,8 @@ Partial Class Compras_ReembolsosComprobaciones #End Region Private Sub RVTxtFechaDocumento_Init(sender As Object, e As EventArgs) Handles RVTxtFechaDocumento.Init - RVTxtFechaDocumento.MaximumValue = DateTime.Now.ToShortDateString - Calendario.EndDate = DateTime.Now + RVTxtFechaDocumento.MaximumValue = NowADS().ToShortDateString + Calendario.EndDate = NowADS() End Sub End Class diff --git a/Compras/RepAnt-NC-EXC.aspx.cs b/Compras/RepAnt-NC-EXC.aspx.cs index aa51e72bf..b5ae1d458 100644 --- a/Compras/RepAnt-NC-EXC.aspx.cs +++ b/Compras/RepAnt-NC-EXC.aspx.cs @@ -115,7 +115,7 @@ public partial class Compras_RepAnt_NC_EXC : ClsPaginas List para = new List(); para.Add(new ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)); para.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)); - para.Add(new ReportParameter("FechaImpresion", DateTime.Now.ToString())); + para.Add(new ReportParameter("FechaImpresion", NowADS().ToString())); para.Add(new ReportParameter("AgrupadoPor", $"Agrupado Por: {Proveedor}{Sucursal}{FechaI}{FechaF}{FechaICorte}{FechaFCorte}")); if (Imagen.Exists) { @@ -181,7 +181,7 @@ public partial class Compras_RepAnt_NC_EXC : ClsPaginas if (TipoCambio == 3) { LiEspecifico.Visible = true; - TCEspecifico = get_GlobalTipoCambio(DateTime.Now).ToString().ToDouble(); + TCEspecifico = get_GlobalTipoCambio(NowADS()).ToString().ToDouble(); TxtEspecifico.Text = TCEspecifico.ToString(); } else diff --git a/Compras/RepAnt-NC-EXCDetalle.aspx.cs b/Compras/RepAnt-NC-EXCDetalle.aspx.cs index 26077cb2f..8ffc6d98d 100644 --- a/Compras/RepAnt-NC-EXCDetalle.aspx.cs +++ b/Compras/RepAnt-NC-EXCDetalle.aspx.cs @@ -59,8 +59,8 @@ public partial class Compras_RepAnt_NC_EXCDetalle : ClsPaginas DdlSucursal.SelectedValueExist(Request["CveSubProyecto"] == null ? "-1" : Request["CveSubProyecto"].ToString()); DdlTipo.SelectedValueExist(Request["Tipo"] == null ? "-1" : Request["Tipo"].ToString()); CveMoneda = Request["CveMoneda"] == null ? -1 : Request["CveMoneda"].ToString().ToEntero(); - txtFechaI.Text = Request["FechaI"] == null ? DateTime.Now.ToString() : Request["FechaI"].ToString(); - txtFechaF.Text = Request["FechaF"] == null ? DateTime.Now.ToString() : Request["FechaF"].ToString(); + txtFechaI.Text = Request["FechaI"] == null ? NowADS().ToString() : Request["FechaI"].ToString(); + txtFechaF.Text = Request["FechaF"] == null ? NowADS().ToString() : Request["FechaF"].ToString(); TipoCambio = Request["TipoCambio"] == null ? 1 : Request["TipoCambio"].ToString().ToEntero(); TCEspecifico = Request["TCEspecifico"] == null ? -1 : Request["TCEspecifico"].ToString().ToDouble(); RblTipoCambio.SelectedValue = TipoCambio.ToString(); @@ -152,7 +152,7 @@ public partial class Compras_RepAnt_NC_EXCDetalle : ClsPaginas List para = new List(); para.Add(new ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)); para.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)); - para.Add(new ReportParameter("FechaImpresion", DateTime.Now.ToString())); + para.Add(new ReportParameter("FechaImpresion", NowADS().ToString())); para.Add(new ReportParameter("Tipo", Tipo.ToString())); para.Add(new ReportParameter("AgrupadoPor", $"Agrupado Por: {Proveedor}{Sucursal}{ConSaldo}{Tipo2}{FechaI}{FechaF}{FechaICorte}{FechaFCorte}")); if (Imagen.Exists) @@ -252,7 +252,7 @@ public partial class Compras_RepAnt_NC_EXCDetalle : ClsPaginas if (TipoCambio == 3) { LiEspecifico.Visible = true; - TCEspecifico = get_GlobalTipoCambio(DateTime.Now).ToString().ToDouble(); + TCEspecifico = get_GlobalTipoCambio(NowADS()).ToString().ToDouble(); TxtEspecifico.Text = TCEspecifico.ToString(); } else diff --git a/Compras/RepComplementoPago.aspx.vb b/Compras/RepComplementoPago.aspx.vb index c6ec19c62..fe617bac8 100644 --- a/Compras/RepComplementoPago.aspx.vb +++ b/Compras/RepComplementoPago.aspx.vb @@ -33,8 +33,8 @@ Partial Class Compras_RepComplementoPago #Region " INICIALIZA VALORES " Private Sub InicializaValores() - TxtFiltrosFechaInicio.Text = Now.FirstDayOfMonth.ToShortDateString - TxtFiltrosFechaFin.Text = Now.ToShortDateString + TxtFiltrosFechaInicio.Text = NowADS().FirstDayOfMonth.ToShortDateString + TxtFiltrosFechaFin.Text = NowADS().ToShortDateString DdlProveedores.setEsWebService(True) DdlProveedores.Attributes.Add("data-metodo", "getproveedores") diff --git a/Compras/RepCompras.aspx.vb b/Compras/RepCompras.aspx.vb index 29c071940..dc5b5fb03 100644 --- a/Compras/RepCompras.aspx.vb +++ b/Compras/RepCompras.aspx.vb @@ -65,7 +65,7 @@ Partial Class Compras_RepCompras End Sub Private Sub CargaCombos() - txtFechaI.Text = $"01/01/{Now.Year}" + txtFechaI.Text = $"01/01/{NowADS().Year}" 'Carga Tipo Centro de Costo CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyecto, LblSubProyecto, divProyecto:=DivProyecto) @@ -114,7 +114,7 @@ Partial Class Compras_RepCompras If RblTipoCambio.SelectedValue.ToEntero = 3 Then Dim TipoCambio As Double LiEspecifico.Visible = True - TipoCambio = GlobalTipoCambio(Now) + TipoCambio = GlobalTipoCambio(NowADS()) TxtEspecifico.Text = TipoCambio.ToString Else LiEspecifico.Visible = False @@ -298,7 +298,7 @@ Partial Class Compras_RepCompras #Region "I M P R I M I R" Protected Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click - GvDatos.ExportToExcel("ReporteCompras" & Now.ToShortDateString) + GvDatos.ExportToExcel("ReporteCompras" & NowADS().ToShortDateString) End Sub Private Sub GenerarPDF() @@ -328,7 +328,7 @@ Partial Class Compras_RepCompras params.Add(New ReportParameter("FechaFin", FechaF)) params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString)) params.Add(New ReportParameter("AgrupadoPor", $"Agrupado Por: {Grupo}{Proveedor}{Capturo}{Moneda}{FechaIn}{FechaFn}{Proyecto}{SubProyecto}{TipoGasto}{TipoProveedor}{FechaICaptura}{FechaFCaptura}{TipoDocto}")) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) ImprimirPDF("Empresas/Grales/Formatos/RepCompras.rdlc", DtCompras, params, "ReporteCompras") diff --git a/Compras/RepComprasAF.aspx.vb b/Compras/RepComprasAF.aspx.vb index 781f65a9a..360e706c8 100644 --- a/Compras/RepComprasAF.aspx.vb +++ b/Compras/RepComprasAF.aspx.vb @@ -56,7 +56,7 @@ Partial Class Compras_RepComprasAF #Region "CARGAS" Private Sub CargaCombos() - txtFechaI.Text = $"01/{Now.Month}/{Now.Year}" + txtFechaI.Text = $"01/{NowADS().Month}/{NowADS().Year}" DdlProveedores.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa) DdlProveedores.DataBind() @@ -199,10 +199,10 @@ Partial Class Compras_RepComprasAF params.Add(New ReportParameter("FechaInicio", FechaI)) params.Add(New ReportParameter("FechaFin", FechaF)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) - ImprimirPDF("Empresas\Grales\Formatos\RepComprasAF.rdlc", DTDatos, params, "ReporteComprasAF_" & Now.ToString("yyyyMMddmmss"), Formato:=Formato) + ImprimirPDF("Empresas\Grales\Formatos\RepComprasAF.rdlc", DTDatos, params, "ReporteComprasAF_" & NowADS().ToString("yyyyMMddmmss"), Formato:=Formato) End Sub #End Region @@ -212,7 +212,7 @@ Partial Class Compras_RepComprasAF If RblTipoCambio.SelectedValue.ToEntero = 3 Then Dim TipoCambio As Double LiEspecifico.Visible = True - TipoCambio = GlobalTipoCambio(Now) + TipoCambio = GlobalTipoCambio(NowADS()) TxtEspecifico.Text = TipoCambio.ToString Else LiEspecifico.Visible = False diff --git a/Compras/RepComprasAFDetalle.aspx.vb b/Compras/RepComprasAFDetalle.aspx.vb index d475ebca4..74d1da9fb 100644 --- a/Compras/RepComprasAFDetalle.aspx.vb +++ b/Compras/RepComprasAFDetalle.aspx.vb @@ -304,7 +304,7 @@ Partial Class Compras_RepComprasAFDetalle GenerarPDF() End Sub Private Sub LnkExcelPersonalizado_Click(sender As Object, e As EventArgs) Handles LnkExcelPersonalizado.Click - GvDatos.ExportToExcel("ComprasDetalle_" + DdlPS.txtValue.Value + Now.ToShortDateString) + GvDatos.ExportToExcel("ComprasDetalle_" + DdlPS.txtValue.Value + NowADS().ToShortDateString) End Sub Private Sub GenerarPDF(Optional Formato As String = "PDF") @@ -331,10 +331,10 @@ Partial Class Compras_RepComprasAFDetalle params.Add(New ReportParameter("FechaInicio", FechaI)) params.Add(New ReportParameter("FechaFin", FechaF)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) - ImprimirPDF(RutaPDF, DTDatos, params, "ReporteComprasAFDetalle_" & Now.ToString("yyyyMMddmmss"), Formato:=Formato) + ImprimirPDF(RutaPDF, DTDatos, params, "ReporteComprasAFDetalle_" & NowADS().ToString("yyyyMMddmmss"), Formato:=Formato) End Sub @@ -344,7 +344,7 @@ Partial Class Compras_RepComprasAFDetalle If RblTipoCambio.SelectedValue.ToEntero = 3 Then Dim TipoCambio As Double LiEspecifico.Visible = True - TipoCambio = GlobalTipoCambio(Now) + TipoCambio = GlobalTipoCambio(NowADS()) TxtEspecifico.Text = TipoCambio.ToString Else LiEspecifico.Visible = False diff --git a/Compras/RepComprasDetalle.aspx.vb b/Compras/RepComprasDetalle.aspx.vb index 25c891941..b7e7c2946 100644 --- a/Compras/RepComprasDetalle.aspx.vb +++ b/Compras/RepComprasDetalle.aspx.vb @@ -229,7 +229,7 @@ Partial Class Compras_RepComprasDetalle Dim SubProyectos As String = IIf(DdlSubProyecto.GetSelectedValuesM = "", "-1", DdlSubProyecto.GetSelectedValuesM).ToString Dim TipoGasto As String = IIf(DdlTipoGasto.GetSelectedValuesM = "", "-1", DdlTipoGasto.GetSelectedValuesM).ToString - If ObjCompras.GetRepComprasDetalle(DdlGrupo.SelectedValue.ToEntero, IfNull(Request("Anio"), Now.Year).ToString.ToEntero, IfNull(Request("Mes"), "-1").ToString.ToEntero, AnioMes, IfNull(Request("Fecha"), "-1").ToString(), + If ObjCompras.GetRepComprasDetalle(DdlGrupo.SelectedValue.ToEntero, IfNull(Request("Anio"), NowADS().Year).ToString.ToEntero, IfNull(Request("Mes"), "-1").ToString.ToEntero, AnioMes, IfNull(Request("Fecha"), "-1").ToString(), DdlProveedores.SelectedValue.ToEntero, CveMoneda, DdlUsuario.SelectedValue.ToEntero, FechaI, FechaF, DDlUsuarioCaptura.SelectedValue.ToEntero, IfNull(Request("NumeroRemesa"), "-1").ToString.ToEntero, IfNull(Request("CveUsuarioRemesa"), "-1").ToString.ToEntero, FechaICaptura, FechaFCaptura, IfNull(Request("FechaCaptura"), "-1").ToString, SubProyectos, DdlTipoDocto.SelectedValue, UsuarioActual.CveEmpresa, @@ -264,7 +264,7 @@ Partial Class Compras_RepComprasDetalle If RblTipoCambio.SelectedValue.ToEntero = 3 Then Dim TipoCambio As Double LiEspecifico.Visible = True - TipoCambio = GlobalTipoCambio(Now) + TipoCambio = GlobalTipoCambio(NowADS()) TxtEspecifico.Text = TipoCambio.ToString Else LiEspecifico.Visible = False @@ -317,7 +317,7 @@ Partial Class Compras_RepComprasDetalle params.Add(New ReportParameter("Numero", NumeroRemesa)) params.Add(New ReportParameter("Anio", DtDatos.FiltraParametros("CveCompra > 0").MAX("Fecha").ToDate.Year.ToString)) params.Add(New ReportParameter("Nombre", DtDatos.MAX("SubProyecto"))) - params.Add(New ReportParameter("Fecha", Now.Date.ToString)) + params.Add(New ReportParameter("Fecha", NowADS().Date.ToString)) params.Add(New ReportParameter("Elaboro", Elaboro)) params.Add(New ReportParameter("Autorizo", "")) params.Add(New ReportParameter("ElaboroPuesto", "")) @@ -325,7 +325,7 @@ Partial Class Compras_RepComprasDetalle ImprimirPDF(String.Format("{0}Formatos\Remesa.rdlc", UsuarioActual.Empresa.Ruta), DtDatos.FiltraParametros("CveCompra > 0"), params, "Remesa", RDSName:="DsCompras") End Sub Protected Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click - 'GvDatos.ExportToExcel("ReporteComprasDetalles" & Now.ToShortDateString) + 'GvDatos.ExportToExcel("ReporteComprasDetalles" & NowADS().ToShortDateString) GenerarPDF("EXCEL") End Sub @@ -374,7 +374,7 @@ Partial Class Compras_RepComprasDetalle params.Add(New ReportParameter("FechaFin", FechaF)) params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString)) params.Add(New ReportParameter("AgrupadoPor", $"Agrupado Por: {Grupo}{Proveedor}{Capturo}{FechaIn}{FechaFn}{FechaCIn}{FechaCFn}{Proyecto}{SubProyecto}{TipoGasto}{TipoProveedor}{TipoDocto}")) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) ImprimirPDF("Empresas/Grales/Formatos/RepComprasDetalle.rdlc", DtDatos, params, "ReporteComprasDetalles", Opcion) diff --git a/Compras/RepComprasG.aspx.vb b/Compras/RepComprasG.aspx.vb index 29e787bee..4d2055c75 100644 --- a/Compras/RepComprasG.aspx.vb +++ b/Compras/RepComprasG.aspx.vb @@ -27,8 +27,8 @@ Partial Class Compras_RepComprasG DdlProveedores.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa) DdlProveedores.DataBind() - 'TxtFechaICaptura.Text = Now.AddMonths(-1).FirstDayOfMonth.ToShortDateString - 'TxtFechaFCaptura.Text = Now.ToShortDateString + 'TxtFechaICaptura.Text = NowADS().AddMonths(-1).FirstDayOfMonth.ToShortDateString + 'TxtFechaFCaptura.Text = NowADS().ToShortDateString DDlUsuarioCaptura.DataSource = GlobalDTUsuarioResponsable(UsuarioActual.CveEmpresa) DDlUsuarioCaptura.DataBind() @@ -89,7 +89,7 @@ Partial Class Compras_RepComprasG End If End Sub Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click - GvDatos.ExportToExcel("ReporteCompras" & Now.ToShortDateString) + GvDatos.ExportToExcel("ReporteCompras" & NowADS().ToShortDateString) End Sub End Class diff --git a/Compras/RepComprasInventarios.aspx.cs b/Compras/RepComprasInventarios.aspx.cs index 9fb9350fa..18a7fb9b4 100644 --- a/Compras/RepComprasInventarios.aspx.cs +++ b/Compras/RepComprasInventarios.aspx.cs @@ -37,10 +37,10 @@ public partial class Compras_RepComprasInventarios : ClsPaginas protected void InicializaDatos() { - txtFechaIC.Text = new DateTime(DateTime.Now.Year, DateTime.Now.Month - 1, DateTime.Now.Day).ToShortDateString(); - txtFechaFC.Text = DateTime.Now.ToShortDateString(); - txtFechaI.Text = new DateTime(DateTime.Now.Year, DateTime.Now.Month - 1, DateTime.Now.Day).ToShortDateString(); - txtFechaF.Text = DateTime.Now.ToShortDateString(); + txtFechaIC.Text = new DateTime(NowADS().Year, NowADS().Month - 1, NowADS().Day).ToShortDateString(); + txtFechaFC.Text = NowADS().ToShortDateString(); + txtFechaI.Text = new DateTime(NowADS().Year, NowADS().Month - 1, NowADS().Day).ToShortDateString(); + txtFechaF.Text = NowADS().ToShortDateString(); CargaCombos(); @@ -63,9 +63,9 @@ public partial class Compras_RepComprasInventarios : ClsPaginas ClsCompras ObjCompras = new ClsCompras(); DateTime FechaIC = (txtFechaIC.Text.ToString() != "" ? txtFechaIC.Text.ToDateTime() : MinFecha); - DateTime FechaFC = (txtFechaFC.Text.ToString() != "" ? txtFechaFC.Text.ToDateTime() : DateTime.Now); + DateTime FechaFC = (txtFechaFC.Text.ToString() != "" ? txtFechaFC.Text.ToDateTime() : NowADS()); DateTime FechaI = (txtFechaI.Text.ToString() != "" ? txtFechaI.Text.ToDateTime() : MinFecha); - DateTime FechaF = (txtFechaF.Text.ToString() != "" ? txtFechaF.Text.ToDateTime() : DateTime.Now); + DateTime FechaF = (txtFechaF.Text.ToString() != "" ? txtFechaF.Text.ToDateTime() : NowADS()); if (ObjCompras.GetRepComprasInventarios(FechaIC, FechaFC, FechaI, FechaF, UsuarioActual.CveEmpresa, DdlSubProyecto.SelectedValue.ToEntero(), DdlProveedor.SelectedValue.ToEntero())) { diff --git a/Compras/RepComprasPeriodo.aspx.vb b/Compras/RepComprasPeriodo.aspx.vb index 868cc3b53..dd1dc4b00 100644 --- a/Compras/RepComprasPeriodo.aspx.vb +++ b/Compras/RepComprasPeriodo.aspx.vb @@ -124,7 +124,7 @@ Partial Class Compras_RepComprasPeriodo If RblTipoCambio.SelectedValue.ToEntero = 3 Then Dim TipoCambio As Double LiEspecifico.Visible = True - TipoCambio = GlobalTipoCambio(Now) + TipoCambio = GlobalTipoCambio(NowADS()) TxtEspecifico.Text = TipoCambio.ToString Else LiEspecifico.Visible = False @@ -208,7 +208,7 @@ Partial Class Compras_RepComprasPeriodo #Region "IMPRIMIR" Protected Sub ImgExcel_Click(sender As Object, e As System.EventArgs) Handles LnkExportar.Click - GvDatos.ExportToExcel("ReporteComprasPeriodo_" & Now.ToShortDateString) + GvDatos.ExportToExcel("ReporteComprasPeriodo_" & NowADS().ToShortDateString) End Sub Private Sub ImgImprimir_Click(sender As Object, e As EventArgs) Handles LnkPdf.Click Dim ObjCompras As New ClsCompras() @@ -252,7 +252,7 @@ Partial Class Compras_RepComprasPeriodo params.Add(New ReportParameter("FechaFin", FechaF)) params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString)) params.Add(New ReportParameter("AgrupadoPor", $"Agrupado Por: {Proveedor}{Capturo}{Grupo}{Moneda}{FechaIn}{FechaFn}{Proyecto}{SubProyecto}")) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) ImprimirPDF("Empresas/Grales/Formatos/RepComprasPeriodo.rdlc", dt, params, "RepComprasPeriodo") diff --git a/Compras/RepComprasPersonal.aspx.vb b/Compras/RepComprasPersonal.aspx.vb index 064ec21c0..fa58a0fe8 100644 --- a/Compras/RepComprasPersonal.aspx.vb +++ b/Compras/RepComprasPersonal.aspx.vb @@ -197,10 +197,10 @@ Partial Class Compras_RepComprasPersonal params.Add(New ReportParameter("FechaInicio", FechaI)) params.Add(New ReportParameter("FechaFin", FechaF)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) - ImprimirPDF("Empresas\Grales\Formatos\RepComprasPersonal.rdlc", DTDatos, params, "ReporteComprasPersonal_" & Now.ToString("yyyyMMddmmss"), Formato:=Formato) + ImprimirPDF("Empresas\Grales\Formatos\RepComprasPersonal.rdlc", DTDatos, params, "ReporteComprasPersonal_" & NowADS().ToString("yyyyMMddmmss"), Formato:=Formato) End Sub #End Region @@ -210,7 +210,7 @@ Partial Class Compras_RepComprasPersonal If RblTipoCambio.SelectedValue.ToEntero = 3 Then Dim TipoCambio As Double LiEspecifico.Visible = True - TipoCambio = GlobalTipoCambio(Now) + TipoCambio = GlobalTipoCambio(NowADS()) TxtEspecifico.Text = TipoCambio.ToString Else LiEspecifico.Visible = False diff --git a/Compras/RepComprasPersonalDetalle.aspx.vb b/Compras/RepComprasPersonalDetalle.aspx.vb index 74cc74e0e..57e71572f 100644 --- a/Compras/RepComprasPersonalDetalle.aspx.vb +++ b/Compras/RepComprasPersonalDetalle.aspx.vb @@ -329,12 +329,12 @@ Partial Class Compras_RepComprasPersonalDetalle params.Add(New ReportParameter("FechaInicio", FechaI)) params.Add(New ReportParameter("FechaFin", FechaF)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) - ImprimirPDF("Empresas\Grales\Formatos\RepComprasPersonalDetalle.rdlc", DTDatos, params, "ReporteComprasPersonalDetalle_" & Now.ToString("yyyyMMddmmss"), Formato:=Formato) + ImprimirPDF("Empresas\Grales\Formatos\RepComprasPersonalDetalle.rdlc", DTDatos, params, "ReporteComprasPersonalDetalle_" & NowADS().ToString("yyyyMMddmmss"), Formato:=Formato) End Sub @@ -347,7 +347,7 @@ Partial Class Compras_RepComprasPersonalDetalle If RblTipoCambio.SelectedValue.ToEntero = 3 Then Dim TipoCambio As Double LiEspecifico.Visible = True - TipoCambio = GlobalTipoCambio(Now) + TipoCambio = GlobalTipoCambio(NowADS()) TxtEspecifico.Text = TipoCambio.ToString Else LiEspecifico.Visible = False diff --git a/Compras/RepCxP.aspx.vb b/Compras/RepCxP.aspx.vb index b312e35e6..18fc3d0ee 100644 --- a/Compras/RepCxP.aspx.vb +++ b/Compras/RepCxP.aspx.vb @@ -165,7 +165,7 @@ Partial Class Compras_RepCxP DdlUsuarioRegistro.DataBind() DdlUsuarioRegistro.Items.Insert(0, New ListItem("Todos", "-1")) - txtCorteA.Text = $"31/12/{Now.Year}" + txtCorteA.Text = $"31/12/{NowADS().Year}" 'Dim ObjSisUsuarios As New ClsSisUsuarios() @@ -557,7 +557,7 @@ Partial Class Compras_RepCxP FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim(), "-1") FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), "-1") FechaVI = If(IsDate(txtFechaVI.Text.Trim()), txtFechaVI.Text.Trim(), "-1") - FechaVF = If(IsDate(txtFechaVF.Text.Trim()), txtFechaVF.Text.Trim(), Date.Now.ToShortDateString) + FechaVF = If(IsDate(txtFechaVF.Text.Trim()), txtFechaVF.Text.Trim(), NowADS().ToShortDateString) If DdlGrupo.SelectedValue.ToEntero = 11 Then If e.Row.DBCampo("CveSubProyecto") = "-1" Then e.Row.CssClass = "Totales" @@ -1499,7 +1499,7 @@ Partial Class Compras_RepCxP params.Add(New ReportParameter("FechaInicio", FechaI)) params.Add(New ReportParameter("FechaFin", FechaF)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("Grupo", DdlGrupo.SelectedItem.Text)) params.Add(New ReportParameter("AgrupadoPor", $"{Grupo}{Proveedor}{Clasificacion}{FechaIn}{FechaFn}{Registro}{Responsable}{Proyecto}{Sucursal}{TipoMoneda}{FVI}{FVF}")) params.Add(New ReportParameter("CantColumnas", CantidadColumnas.ToString)) @@ -1519,7 +1519,7 @@ Partial Class Compras_RepCxP If RblTipoCambio.SelectedValue = "3" Then Dim TipoCambio As Double LiEspecifico.Visible = True - TipoCambio = GlobalTipoCambio(Now) + TipoCambio = GlobalTipoCambio(NowADS()) TxtEspecifico.Text = TipoCambio.ToString Else LiEspecifico.Visible = False diff --git a/Compras/RepCxPDetalle.aspx.vb b/Compras/RepCxPDetalle.aspx.vb index 76f381319..505901391 100644 --- a/Compras/RepCxPDetalle.aspx.vb +++ b/Compras/RepCxPDetalle.aspx.vb @@ -286,8 +286,8 @@ Partial Class RepCxPDetalle FechaFin = IfNull(Request("FechaF"), "-1").ToString FechaVInicio = IfNull(Request("FechaVI"), "-1").ToString FechaVFin = IfNull(Request("FechaVF"), "-1").ToString - FechaCorte = IfNull(Request("FechaCorte"), Now.ToDate.ToString).ToString - txtCorteA.Text = $"31/12/{Now.Year}" + FechaCorte = IfNull(Request("FechaCorte"), NowADS().ToDate.ToString).ToString + txtCorteA.Text = $"31/12/{NowADS().Year}" If Request("FechaI") <> "-1" AndAlso IsDate(Request("FechaI")) Then txtFechaI.Text = Request("FechaI") If Request("FechaF") <> "-1" AndAlso IsDate(Request("FechaF")) Then txtFechaF.Text = Request("FechaF") @@ -653,10 +653,10 @@ Partial Class RepCxPDetalle Protected Sub ImgExcelPersonalizado_Click(sender As Object, e As EventArgs) Handles ImgExcelPersonalizado.Click 'GvVsh.Visible = True - 'GvVsh.ExportToExcel("DetalleVentas_" & Now.ToShortDateString) + 'GvVsh.ExportToExcel("DetalleVentas_" & NowADS().ToShortDateString) 'GvVsh.Visible = False - GvDatos.ExportToExcel("DetalleCompras_" & Now.ToShortDateString & ".xls") - 'GvDatos.ExportToExcelG("DetalleVentas_" & Now.ToShortDateString & ".xlsx") + GvDatos.ExportToExcel("DetalleCompras_" & NowADS().ToShortDateString & ".xls") + 'GvDatos.ExportToExcelG("DetalleVentas_" & NowADS().ToShortDateString & ".xlsx") End Sub @@ -684,7 +684,7 @@ Partial Class RepCxPDetalle params.Add(New ReportParameter("FechaInicio", FechaI)) params.Add(New ReportParameter("FechaFin", FechaF)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) 'PARA REPORTE Dim Sucursal = If(DdlSubProyecto.SelectedValue = "-1", "", $" Sucursal: {DdlSubProyecto.SelectedItem.Text}") Dim Proveedor = If(DdlProveedores.SelectedValue = "-1", "", $" Proveedor: {DdlProveedores.SelectedText}") @@ -714,7 +714,7 @@ Partial Class RepCxPDetalle If RblTipoCambio.SelectedValue.ToEntero = 3 Then Dim TipoCambio As Double LiEspecifico.Visible = True - TipoCambio = GlobalTipoCambio(Now) + TipoCambio = GlobalTipoCambio(NowADS()) TxtEspecifico.Text = TipoCambio.ToString Else LiEspecifico.Visible = False diff --git a/Compras/RepCxPPeriodo.aspx.cs b/Compras/RepCxPPeriodo.aspx.cs index 95766a42b..a72690cca 100644 --- a/Compras/RepCxPPeriodo.aspx.cs +++ b/Compras/RepCxPPeriodo.aspx.cs @@ -85,7 +85,7 @@ public partial class Compras_RepCxPPeriodo : ClsPaginas DdlUsuarioRegistro.DataBind(); DdlUsuarioRegistro.Items.Insert(0, new ListItem("Todos", "-1")); - txtCorteA.Text = $"31/12/{DateTime.Now.Year}"; + txtCorteA.Text = $"31/12/{NowADS().Year}"; } private void Consulta() @@ -122,7 +122,7 @@ public partial class Compras_RepCxPPeriodo : ClsPaginas if (TipoCambio == 3) { LiEspecifico.Visible = true; - TCEspecifico = get_GlobalTipoCambio(DateTime.Now); + TCEspecifico = get_GlobalTipoCambio(NowADS()); TxtEspecifico.Text = TCEspecifico.ToString(); } else @@ -285,7 +285,7 @@ public partial class Compras_RepCxPPeriodo : ClsPaginas List para = new List(); para.Add(new ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)); para.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)); - para.Add(new ReportParameter("FechaImpresion", DateTime.Now.ToShortDateString())); + para.Add(new ReportParameter("FechaImpresion", NowADS().ToShortDateString())); para.Add(new ReportParameter("Filtros", StrFiltro.ToString())); if (Imagen.Exists) { @@ -295,7 +295,7 @@ public partial class Compras_RepCxPPeriodo : ClsPaginas { para.Add(new ReportParameter("LogoPath", "")); } - ImprimirPDF(RutaPDF, DtDatos, para, "RepCxPPeriodo" + DateTime.Now.ToString("yyyyMMddhhmmss"), Opcion); + ImprimirPDF(RutaPDF, DtDatos, para, "RepCxPPeriodo" + NowADS().ToString("yyyyMMddhhmmss"), Opcion); } protected void GvDatos_RowDataBound(object sender, GridViewRowEventArgs e) { diff --git a/Compras/RepDocumentacionProveedor.aspx.vb b/Compras/RepDocumentacionProveedor.aspx.vb index 5e8e053ac..31d5e5ed8 100644 --- a/Compras/RepDocumentacionProveedor.aspx.vb +++ b/Compras/RepDocumentacionProveedor.aspx.vb @@ -164,7 +164,7 @@ Partial Class Proveedores_RepDocumentacionProveedor Private Property FechaLimite As Date Get If ViewState("FechaLimite") Is Nothing Then - Return Date.Now.AddDays(15) + Return NowADS().AddDays(15) Else Return ViewState("FechaLimite").ToString.ToDate End If @@ -195,8 +195,8 @@ Partial Class Proveedores_RepDocumentacionProveedor If Not Page.IsPostBack Then CargaCombos() - 'TxtFechaI.Text = Now.AddMonths(-3).ToString("dd/MM/yyyy") - 'TxtFechaF.Text = Now.ToString("dd/MM/yyyy") + 'TxtFechaI.Text = NowADS().AddMonths(-3).ToString("dd/MM/yyyy") + 'TxtFechaF.Text = NowADS().ToString("dd/MM/yyyy") TxtFechaI.Text = "" TxtFechaF.Text = "" diff --git a/Compras/RepEvaluacionProveedor.aspx.vb b/Compras/RepEvaluacionProveedor.aspx.vb index 924970f9e..360411879 100644 --- a/Compras/RepEvaluacionProveedor.aspx.vb +++ b/Compras/RepEvaluacionProveedor.aspx.vb @@ -13,7 +13,7 @@ Partial Class RepEvaluacionProveedor DdlProveedor.DataBind() DdlProveedor.Items.Insert(0, New ListItem("Todos", "-1")) - Dim dNow As Date = Now + Dim dNow As Date = NowADS() TxtFechaF.Text = dNow.ToString("dd/MM/yyyy") dNow = dNow.AddDays(-30) TxtFechaI.Text = dNow.ToString("dd/MM/yyyy") diff --git a/Compras/RepEvaluacionesProveedores.aspx.vb b/Compras/RepEvaluacionesProveedores.aspx.vb index 1b7b7baa2..64da0dceb 100644 --- a/Compras/RepEvaluacionesProveedores.aspx.vb +++ b/Compras/RepEvaluacionesProveedores.aspx.vb @@ -27,7 +27,7 @@ Partial Class RepEvaluacionesProveedores DdlProveedor.DataBind() DdlProveedor.Items.Insert(0, New ListItem("Todos", "-1")) - Dim dNow As Date = Now + Dim dNow As Date = NowADS() TxtFechaF.Text = dNow.ToString("dd/MM/yyyy") dNow = dNow.AddDays(-30) TxtFechaI.Text = dNow.ToString("dd/MM/yyyy") @@ -65,6 +65,6 @@ Partial Class RepEvaluacionesProveedores End Sub Public Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click - GV.ExportToExcel("Evaluaciones de Proveedores" & Now.ToShortDateString & ".xls") + GV.ExportToExcel("Evaluaciones de Proveedores" & NowADS().ToShortDateString & ".xls") End Sub End Class \ No newline at end of file diff --git a/Compras/RepGastos.aspx.vb b/Compras/RepGastos.aspx.vb index 3b0b50dc7..72c6b1d71 100644 --- a/Compras/RepGastos.aspx.vb +++ b/Compras/RepGastos.aspx.vb @@ -33,8 +33,8 @@ Partial Class RepGastos Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not IsPostBack Then - TxtPA_VfechaInicio.Text = FirstDayOfMonth(Now).ToShortDateString - TxtPA_VfechaFin.Text = LastDayOfMonth(Now).ToShortDateString + TxtPA_VfechaInicio.Text = FirstDayOfMonth(NowADS()).ToShortDateString + TxtPA_VfechaFin.Text = LastDayOfMonth(NowADS()).ToShortDateString CargaPA_Vta_ReporteGastosCentroCostoGet() End If diff --git a/Compras/RepGastosFijos.aspx.cs b/Compras/RepGastosFijos.aspx.cs index d9d6c30bc..3092eaf99 100644 --- a/Compras/RepGastosFijos.aspx.cs +++ b/Compras/RepGastosFijos.aspx.cs @@ -96,8 +96,8 @@ public partial class Compras_RepGastosFijos : ClsPaginas protected void InicializaDatos() { - DateTime FI = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1); - DateTime FF = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.DaysInMonth(DateTime.Now.Year, DateTime.Now.Month)); + DateTime FI = new DateTime(NowADS().Year, NowADS().Month, 1); + DateTime FF = new DateTime(NowADS().Year, NowADS().Month, DateTime.DaysInMonth(NowADS().Year, NowADS().Month)); FechaInicio = FI.ToShortDateString(); FechaFin = FF.ToShortDateString(); TxtFechaI.Text = FechaInicio; @@ -236,7 +236,7 @@ public partial class Compras_RepGastosFijos : ClsPaginas @params.Add(new ReportParameter("FechaFin", FechaFinal)); @params.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)); - @params.Add(new ReportParameter("FechaImpresion", DateTime.Now.ToShortDateString())); + @params.Add(new ReportParameter("FechaImpresion", NowADS().ToShortDateString())); if (Imagen.Exists) { @@ -247,7 +247,7 @@ public partial class Compras_RepGastosFijos : ClsPaginas @params.Add(new ReportParameter("LogoPath", "")); } - ImprimirPDF(RutaPDF, DTDatos, @params, "RepGastosFijos " + DateTime.Now.ToString("yyyy-MM-dd"), Formato); + ImprimirPDF(RutaPDF, DTDatos, @params, "RepGastosFijos " + NowADS().ToString("yyyy-MM-dd"), Formato); } #endregion diff --git a/Compras/RepGastosSemanal.aspx.cs b/Compras/RepGastosSemanal.aspx.cs index 9e86f14ca..79b00b3c1 100644 --- a/Compras/RepGastosSemanal.aspx.cs +++ b/Compras/RepGastosSemanal.aspx.cs @@ -40,8 +40,8 @@ public partial class Compras_RepGastosSemanal : ClsPaginas private void InicializaValores() { - txtFechaI.Text = DateTime.Now.FirstDayOfMonth().ToShortDateString(); - txtFechaF.Text = DateTime.Now.ToShortDateString(); + txtFechaI.Text = NowADS().FirstDayOfMonth().ToShortDateString(); + txtFechaF.Text = NowADS().ToShortDateString(); } private void Consulta() @@ -170,7 +170,7 @@ public partial class Compras_RepGastosSemanal : ClsPaginas List para = new List(); para.Add(new ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)); para.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)); - para.Add(new ReportParameter("FechaImpresion", DateTime.Now.ToString())); + para.Add(new ReportParameter("FechaImpresion", NowADS().ToString())); para.Add(new ReportParameter("Filtros",$"Semana del {txtFechaI.Text} al {txtFechaF.Text}")); if (Imagen.Exists) diff --git a/Compras/RepImportaciones.aspx.vb b/Compras/RepImportaciones.aspx.vb index d95c5e716..8afa31c9f 100644 --- a/Compras/RepImportaciones.aspx.vb +++ b/Compras/RepImportaciones.aspx.vb @@ -26,8 +26,8 @@ Partial Class Compras_RepImportaciones End Sub Private Sub InicializaValores() - TxtFechaI.Text = Date.Now.AddDays(-Now.DayOfYear + 1).ToShortDateString - TxtFechaF.Text = Date.Now.ToShortDateString + TxtFechaI.Text = NowADS().AddDays(-NowADS().DayOfYear + 1).ToShortDateString + TxtFechaF.Text = NowADS().ToShortDateString DdlProveedores.setEsWebService(True) DdlProveedores.Attributes.Add("data-metodo", "getproveedores") diff --git a/Compras/RepNotasCredito.aspx.vb b/Compras/RepNotasCredito.aspx.vb index ba92ac5c9..02a971121 100644 --- a/Compras/RepNotasCredito.aspx.vb +++ b/Compras/RepNotasCredito.aspx.vb @@ -25,7 +25,7 @@ Partial Class Compras_RepNotasCredito DdlProveedores.SelectedText = "Todos" DdlProveedores.SelectedValue = "-1" - TxtFechaSaldar.Text = Now.ToShortDateString + TxtFechaSaldar.Text = NowADS().ToShortDateString CargaDatos() End If End Sub @@ -61,7 +61,7 @@ Partial Class Compras_RepNotasCredito End Sub Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click - GvDatos.ExportToExcel("RepNotasCredito." & Now.ToShortDateString) + GvDatos.ExportToExcel("RepNotasCredito." & NowADS().ToShortDateString) End Sub @@ -90,11 +90,11 @@ Partial Class Compras_RepNotasCredito params.Add(New ReportParameter("FechaInicio", FechaI)) params.Add(New ReportParameter("FechaFin", FechaF)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("Filtros", StrFiltro.ToString)) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) - ImprimirPDF("Empresas/Grales/Formatos/RepNotasCredito.rdlc", DtDatos, params, String.Format("ReporteVentas-{0}", Now.ToDateTime.ToShortDateString), Formato:=Formato) + ImprimirPDF("Empresas/Grales/Formatos/RepNotasCredito.rdlc", DtDatos, params, String.Format("ReporteVentas-{0}", NowADS().ToDateTime.ToShortDateString), Formato:=Formato) Else Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia) End If diff --git a/Compras/RepPUESinPago.aspx.vb b/Compras/RepPUESinPago.aspx.vb index a405e4c01..30acba57f 100644 --- a/Compras/RepPUESinPago.aspx.vb +++ b/Compras/RepPUESinPago.aspx.vb @@ -24,8 +24,8 @@ Partial Class Compras_RepPUESinPago End Sub Private Sub InicializaValores() - TxtFechaI.Text = FirstDayOfMonth(Now).ToShortDateString - TxtFechaF.Text = Now.LastDayOfMonth.ToShortDateString + TxtFechaI.Text = FirstDayOfMonth(NowADS()).ToShortDateString + TxtFechaF.Text = NowADS().LastDayOfMonth.ToShortDateString DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa) DdlSubProyecto.DataBind() diff --git a/Compras/RepPagado.aspx.cs b/Compras/RepPagado.aspx.cs index 77cf1f13a..9e6ec15c5 100644 --- a/Compras/RepPagado.aspx.cs +++ b/Compras/RepPagado.aspx.cs @@ -67,11 +67,11 @@ public partial class Compras_RepPagado : ClsPaginas CargaCuentasBancarias(); - txtFechaI.Text = $"01/{DateTime.Now.Month}/{DateTime.Now.Year}"; - txtFechaF.Text = DateTime.Now.ToShortDateString(); + txtFechaI.Text = $"01/{NowADS().Month}/{NowADS().Year}"; + txtFechaF.Text = NowADS().ToShortDateString(); - TxtFechaICompra.Text = MinFecha.ToShortDateString(); //$"01/01/{DateTime.Now.Year}"; - TxtFechaFCompra.Text = DateTime.Now.ToShortDateString(); + TxtFechaICompra.Text = MinFecha.ToShortDateString(); //$"01/01/{NowADS().Year}"; + TxtFechaFCompra.Text = NowADS().ToShortDateString(); } @@ -250,7 +250,7 @@ public partial class Compras_RepPagado : ClsPaginas List para = new List(); para.Add(new ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)); para.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)); - para.Add(new ReportParameter("FechaImpresion", DateTime.Now.ToShortDateString())); + para.Add(new ReportParameter("FechaImpresion", NowADS().ToShortDateString())); para.Add(new ReportParameter("Filtros", StrFiltro.ToString())); if (Imagen.Exists) @@ -262,7 +262,7 @@ public partial class Compras_RepPagado : ClsPaginas para.Add(new ReportParameter("LogoPath", "")); } - ImprimirPDF(RutaPDF,DtPagado, para, "RepPagado" + DateTime.Now.ToString("yyyyMMddhhmmss"), Opcion); + ImprimirPDF(RutaPDF,DtPagado, para, "RepPagado" + NowADS().ToString("yyyyMMddhhmmss"), Opcion); } protected void LnkVerGrafica_Click(object sender, EventArgs e) diff --git a/Compras/RepPagadoDetalle.aspx.cs b/Compras/RepPagadoDetalle.aspx.cs index 217deb3a5..7ad32a7a9 100644 --- a/Compras/RepPagadoDetalle.aspx.cs +++ b/Compras/RepPagadoDetalle.aspx.cs @@ -71,8 +71,8 @@ public partial class Compras_RepPágadoDetalle : ClsPaginas CargaCuentasBancarias(); - txtFechaI.Text = $"01/{DateTime.Now.Month}/{DateTime.Now.Year}"; - txtFechaF.Text = DateTime.Now.ToShortDateString(); + txtFechaI.Text = $"01/{NowADS().Month}/{NowADS().Year}"; + txtFechaF.Text = NowADS().ToShortDateString(); txtFechaI.Text = Request["FechaI"] == null ? "" : Request["FechaI"].ToString(); txtFechaF.Text = Request["FechaF"] == null ? "" : Request["FechaF"].ToString(); TxtFechaICompra.Text = Request["FechaICompra"] == null ? "" : Request["FechaICompra"].ToString(); @@ -245,7 +245,7 @@ public partial class Compras_RepPágadoDetalle : ClsPaginas List para = new List(); para.Add(new ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)); para.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)); - para.Add(new ReportParameter("FechaImpresion", DateTime.Now.ToShortDateString())); + para.Add(new ReportParameter("FechaImpresion", NowADS().ToShortDateString())); para.Add(new ReportParameter("Filtros", StrFiltro.ToString())); para.Add(new ReportParameter("TipoCentroCosto", UsuarioActual.Empresa.Tipo_CentroCosto.ToString())); if (Imagen.Exists) @@ -256,6 +256,6 @@ public partial class Compras_RepPágadoDetalle : ClsPaginas { para.Add(new ReportParameter("LogoPath", "")); } - ImprimirPDF(RutaPDF, DtPagado, para, "RepPagadoDetalle" + DateTime.Now.ToString("yyyyMMddhhmmss"), Opcion); + ImprimirPDF(RutaPDF, DtPagado, para, "RepPagadoDetalle" + NowADS().ToString("yyyyMMddhhmmss"), Opcion); } } \ No newline at end of file diff --git a/Compras/RepPagadoPeriodo.aspx.cs b/Compras/RepPagadoPeriodo.aspx.cs index 93e7839e1..977ffbc39 100644 --- a/Compras/RepPagadoPeriodo.aspx.cs +++ b/Compras/RepPagadoPeriodo.aspx.cs @@ -72,11 +72,11 @@ public partial class Compras_RepPagadoPeriodo : ClsPaginas CargaCuentasBancarias(); - txtFechaI.Text = $"01/{DateTime.Now.Month}/{DateTime.Now.Year}"; - txtFechaF.Text = DateTime.Now.ToShortDateString(); + txtFechaI.Text = $"01/{NowADS().Month}/{NowADS().Year}"; + txtFechaF.Text = NowADS().ToShortDateString(); - TxtFechaICompra.Text = MinFecha.ToShortDateString(); //'$"01/01/{DateTime.Now.Year}"; - TxtFechaFCompra.Text = DateTime.Now.ToShortDateString(); + TxtFechaICompra.Text = MinFecha.ToShortDateString(); //'$"01/01/{NowADS().Year}"; + TxtFechaFCompra.Text = NowADS().ToShortDateString(); CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyecto, LblSubProyecto, divProyecto:DivProyecto); } @@ -252,7 +252,7 @@ public partial class Compras_RepPagadoPeriodo : ClsPaginas List para = new List(); para.Add(new ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)); para.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)); - para.Add(new ReportParameter("FechaImpresion", DateTime.Now.ToShortDateString())); + para.Add(new ReportParameter("FechaImpresion", NowADS().ToShortDateString())); para.Add(new ReportParameter("Filtros", StrFiltro.ToString())); if (Imagen.Exists) { @@ -262,7 +262,7 @@ public partial class Compras_RepPagadoPeriodo : ClsPaginas { para.Add(new ReportParameter("LogoPath", "")); } - ImprimirPDF(RutaPDF, DtDatos, para, "RepPagadoPeriodo" + DateTime.Now.ToString("yyyyMMddhhmmss"), Opcion); + ImprimirPDF(RutaPDF, DtDatos, para, "RepPagadoPeriodo" + NowADS().ToString("yyyyMMddhhmmss"), Opcion); } protected void GvDatos_RowDataBound(object sender, GridViewRowEventArgs e) @@ -318,7 +318,7 @@ public partial class Compras_RepPagadoPeriodo : ClsPaginas if (TipoCambio == 3) { LiEspecifico.Visible = true; - TCEspecifico = get_GlobalTipoCambio(DateTime.Now); + TCEspecifico = get_GlobalTipoCambio(NowADS()); TxtEspecifico.Text = TCEspecifico.ToString(); } else diff --git a/Compras/RepProductosServicios.aspx.vb b/Compras/RepProductosServicios.aspx.vb index a916a4d5c..c663aa5a3 100644 --- a/Compras/RepProductosServicios.aspx.vb +++ b/Compras/RepProductosServicios.aspx.vb @@ -156,8 +156,8 @@ Partial Class Compras_RepProductosServicios RowActivoFijo.Visible = True 'Carga Fechas - txtFechaI.Text = FirstDayOfMonth(Now.AddMonths(-5)).ToShortDateString - txtFechaF.Text = Now.ToShortDateString + txtFechaI.Text = FirstDayOfMonth(NowADS().AddMonths(-5)).ToShortDateString + txtFechaF.Text = NowADS().ToShortDateString TipoCambio = 1 TCEspecifico = 0 @@ -390,7 +390,7 @@ Partial Class Compras_RepProductosServicios If RblTipoCambio.SelectedValue.ToEntero = 3 Then Dim TipoCambio As Double LiEspecifico.Visible = True - TipoCambio = GlobalTipoCambio(Now) + TipoCambio = GlobalTipoCambio(NowADS()) TxtEspecifico.Text = TipoCambio.ToString Else LiEspecifico.Visible = False @@ -416,7 +416,7 @@ Partial Class Compras_RepProductosServicios Private Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click GeneraPDF("Excel") - 'GvDatos.ExportToExcel("ReporteProductosServicios" & Now.ToShortDateString) + 'GvDatos.ExportToExcel("ReporteProductosServicios" & NowADS().ToShortDateString) End Sub Protected Sub GeneraPDF(Optional Formato As String = "PDF") @@ -439,7 +439,7 @@ Partial Class Compras_RepProductosServicios Dim params As New List(Of ReportParameter)() params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString())) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToString())) params.Add(New ReportParameter("Filtros", $"{Grupo}{Proveedor}{FechaInicio}{FechaFin}{TipoGasto}{Categoria}{Clasificacion}{PS}{Proyecto}{Estatus}{Usuario}{TipoAF}{SubTipoAF}{AF}")) 'params.Add(New ReportParameter("Proveedor", DdlProveedor.SelectedItem.Text)) diff --git a/Compras/RepProductosServiciosDetalle.aspx.vb b/Compras/RepProductosServiciosDetalle.aspx.vb index c35b95215..b15d64676 100644 --- a/Compras/RepProductosServiciosDetalle.aspx.vb +++ b/Compras/RepProductosServiciosDetalle.aspx.vb @@ -263,8 +263,8 @@ Partial Class Compras_RepProductosServiciosDetalle RowActivoFijo.Visible = True 'Carga Fechas - txtFechaI.Text = FirstDayOfMonth(Now.AddMonths(-5)).ToShortDateString - txtFechaF.Text = Now.ToShortDateString + txtFechaI.Text = FirstDayOfMonth(NowADS().AddMonths(-5)).ToShortDateString + txtFechaF.Text = NowADS().ToShortDateString TipoCambio = 1 TCEspecifico = 0 @@ -461,7 +461,7 @@ Partial Class Compras_RepProductosServiciosDetalle If RblTipoCambio.SelectedValue.ToEntero = 3 Then Dim TipoCambio As Double LiEspecifico.Visible = True - TipoCambio = GlobalTipoCambio(Now) + TipoCambio = GlobalTipoCambio(NowADS()) TxtEspecifico.Text = TipoCambio.ToString Else LiEspecifico.Visible = False @@ -520,7 +520,7 @@ Partial Class Compras_RepProductosServiciosDetalle 'params.Add(New ReportParameter("FechaInicio", FechaI)) 'params.Add(New ReportParameter("FechaFin", FechaF)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("AgrupoPor", $"{Grupo}{Proyecto}{TipoGasto}{SubProyecto}{Categoria}{Clasificacion}{PS}{Proveedor}{Estatus}{TipoAF}{SubTipoAF}{FechaIn}{FechaFn}")) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) diff --git a/Compras/RepProductosServiciosPeriodo.aspx.cs b/Compras/RepProductosServiciosPeriodo.aspx.cs index 132450a9d..5fd674633 100644 --- a/Compras/RepProductosServiciosPeriodo.aspx.cs +++ b/Compras/RepProductosServiciosPeriodo.aspx.cs @@ -192,7 +192,7 @@ public partial class Compras_RepProductosServiciosPeriodo : ClsPaginas if (RblTipoCambio.SelectedValue.ToEntero() == 3) { double TipoCambio=0; LiEspecifico.Visible = true; - TipoCambio = get_GlobalTipoCambio(DateTime.Now); + TipoCambio = get_GlobalTipoCambio(NowADS()); TxtEspecifico.Text = TipoCambio.ToString(); } else @@ -335,7 +335,7 @@ public partial class Compras_RepProductosServiciosPeriodo : ClsPaginas para.Add(new ReportParameter("FechaFin", FechaF)); para.Add(new ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)); para.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)); - para.Add(new ReportParameter("FechaImpresion", DateTime.Now.ToString())); + para.Add(new ReportParameter("FechaImpresion", NowADS().ToString())); para.Add(new ReportParameter("AgrupadoPor", $"Agrupado Por: {Proveedor}{Capturo}{Grupo}{Moneda}{FechaIn}{FechaFn}{Proyecto}{SubProyecto}")); if (Imagen.Exists) { @@ -355,7 +355,7 @@ public partial class Compras_RepProductosServiciosPeriodo : ClsPaginas protected void LnkExportar_Click(object sender, EventArgs e) { - GvDatos.ExportToExcel($"ReporteComprasPeriodo_{DateTime.Now.ToShortDateString()}"); + GvDatos.ExportToExcel($"ReporteComprasPeriodo_{NowADS().ToShortDateString()}"); } #endregion diff --git a/Compras/RepRembolsoComprobaciones.aspx.vb b/Compras/RepRembolsoComprobaciones.aspx.vb index 23e243447..4f611595d 100644 --- a/Compras/RepRembolsoComprobaciones.aspx.vb +++ b/Compras/RepRembolsoComprobaciones.aspx.vb @@ -301,7 +301,7 @@ Partial Class Compras_RepRembolsoComprobaciones params.Add(New ReportParameter("Numero", NumeroReembolso)) params.Add(New ReportParameter("Anio", DtDatos.FiltraParametros("CveCompra > 0").MAX("Fecha").ToDate.Year.ToString)) params.Add(New ReportParameter("Nombre", DtDatos.MAX("SubProyecto"))) - params.Add(New ReportParameter("Fecha", Now.Date.ToString)) + params.Add(New ReportParameter("Fecha", NowADS().Date.ToString)) params.Add(New ReportParameter("Elaboro", "")) params.Add(New ReportParameter("Autorizo", "")) params.Add(New ReportParameter("ElaboroPuesto", "")) @@ -309,7 +309,7 @@ Partial Class Compras_RepRembolsoComprobaciones params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToString)) params.Add(New ReportParameter("CveCajaChica", DtDatos.Rows(0)("CveCajaChica").ToString)) params.Add(New ReportParameter("CveFyE", "0")) ' @@ -325,7 +325,7 @@ Partial Class Compras_RepRembolsoComprobaciones Else params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToString)) params.Add(New ReportParameter("FechaInicio", txtFechaI.Text)) params.Add(New ReportParameter("FechaFin", txtFechaF.Text)) diff --git a/Compras/RepReqOCCompraInv.aspx.vb b/Compras/RepReqOCCompraInv.aspx.vb index 546b79131..24ddccc60 100644 --- a/Compras/RepReqOCCompraInv.aspx.vb +++ b/Compras/RepReqOCCompraInv.aspx.vb @@ -53,8 +53,8 @@ Partial Class RepReqOCCompraInv #End Region Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not Page.IsPostBack Then - txtFechaI.Text = Now.ToShortDateString - txtFechaF.Text = Now.ToShortDateString + txtFechaI.Text = NowADS().ToShortDateString + txtFechaF.Text = NowADS().ToShortDateString CargaSucursal() CargaProveedor() @@ -145,7 +145,7 @@ Partial Class RepReqOCCompraInv ' Else ' params.Add(New ReportParameter("LogoPath", "")) ' End If - ' ImprimirPDF("Empresas/Grales/Formatos/RepTraspasoAlmacen.rdlc", DtInventarios, params, String.Format("RepTraspasoAlmacen-{0}", Now.ToDateTime.ToShortDateString), Formato) + ' ImprimirPDF("Empresas/Grales/Formatos/RepTraspasoAlmacen.rdlc", DtInventarios, params, String.Format("RepTraspasoAlmacen-{0}", NowADS().ToDateTime.ToShortDateString), Formato) ' Else ' Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia) ' End If diff --git a/Compras/RepTopCompras.aspx b/Compras/RepTopCompras.aspx index 55c72e2cf..273a13e9d 100644 --- a/Compras/RepTopCompras.aspx +++ b/Compras/RepTopCompras.aspx @@ -80,7 +80,7 @@ - + @@ -88,7 +88,7 @@ - + @@ -96,7 +96,7 @@ - + diff --git a/Compras/RepTopCompras.aspx.vb b/Compras/RepTopCompras.aspx.vb index 586eff8c3..5c6338527 100644 --- a/Compras/RepTopCompras.aspx.vb +++ b/Compras/RepTopCompras.aspx.vb @@ -49,7 +49,7 @@ Partial Class Compras_RepTopCompras If RblTipoCambio.SelectedValue.ToEntero = 3 Then Dim TipoCambio As Double LiEspecifico.Visible = True - TipoCambio = GlobalTipoCambio(Now) + TipoCambio = GlobalTipoCambio(NowADS()) TxtEspecifico.Text = TipoCambio.ToString Else LiEspecifico.Visible = False diff --git a/Compras/eFacturas.aspx.vb b/Compras/eFacturas.aspx.vb index 10dd8f6d3..92b07f197 100644 --- a/Compras/eFacturas.aspx.vb +++ b/Compras/eFacturas.aspx.vb @@ -747,9 +747,9 @@ Partial Class Compras_eFacturas If UsuarioActual.CveEmpresa.Contiene(141, 152, 153, 160, 161, 162) Then System.Threading.Thread.Sleep(2000) - txtFechaI.Text = Now.AddMonths(-1).FirstDayOfMonth().ToShortDateString ' String.Format("01/01/{0}", If(Now.Month > 6, Now.Year, Now.Year - 1)) + txtFechaI.Text = NowADS().AddMonths(-1).FirstDayOfMonth().ToShortDateString ' String.Format("01/01/{0}", If(NowADS().Month > 6, NowADS().Year, NowADS().Year - 1)) - txtFechaF.Text = Now.ToShortDateString 'txtFechaI.Text.ToDate.AddMonths(1).AddDays(-1).ToShortDateString + txtFechaF.Text = NowADS().ToShortDateString 'txtFechaI.Text.ToDate.AddMonths(1).AddDays(-1).ToShortDateString Destino = String.Format("{0}Compras\", UsuarioActual.Empresa.Ruta) Ejecutable = "F:\Proyectos\wwwSIG\Utilerias\ADSUtilerias.exe" @@ -763,8 +763,8 @@ Partial Class Compras_eFacturas DdlClasificacionProv.DataBind() DdlClasificacionProv.Items.Insert(0, New ListItem("Todos", "-1")) - TxtFechaBitInicio.Text = Now.ToString("dd/MM/yyyy") - TxtFechaBitFin.Text = Now.ToString("dd/MM/yyyy") + TxtFechaBitInicio.Text = NowADS().ToString("dd/MM/yyyy") + TxtFechaBitFin.Text = NowADS().ToString("dd/MM/yyyy") TxtFolio.Focus() @@ -841,7 +841,7 @@ Partial Class Compras_eFacturas FechaI = MinFecha FechaF = MaxFecha txtFechaI.Text = MinFecha.ToString - txtFechaF.Text = Now.ToShortDateString + txtFechaF.Text = NowADS().ToShortDateString End If Dim DtPagos As DataTable = Nothing @@ -1488,7 +1488,7 @@ Partial Class Compras_eFacturas params.Add(New ReportParameter("FechaInicio", FechaI)) params.Add(New ReportParameter("FechaFin", FechaF)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) If Imagen.Exists Then params.Add(New ReportParameter("LogoPath", $"file//:{Imagen.FullName}")) @@ -1499,9 +1499,9 @@ Partial Class Compras_eFacturas If Tab.ActiveTabIndex = 2 Then - ImprimirPDF("Empresas/Grales/Formatos/RepFacturas.rdlc", DTTraslados, params, $"FacturasBuzon_{Now.ToString("yyyyMMyyddmmss")}", Tipo) + ImprimirPDF("Empresas/Grales/Formatos/RepFacturas.rdlc", DTTraslados, params, $"FacturasBuzon_{NowADS().ToString("yyyyMMyyddmmss")}", Tipo) Else - ImprimirPDF("Empresas/Grales/Formatos/RepFacturas.rdlc", dt, params, $"FacturasBuzon_{Now.ToString("yyyyMMyyddmmss")}", Tipo) + ImprimirPDF("Empresas/Grales/Formatos/RepFacturas.rdlc", dt, params, $"FacturasBuzon_{NowADS().ToString("yyyyMMyyddmmss")}", Tipo) End If @@ -1577,7 +1577,7 @@ Partial Class Compras_eFacturas 'ListaComprimidos.Add(filePath) ''CREO DIRECTORIO ALEATORIO 'Dim Aleatorio As New Random - 'Dim TempDirectorio As String = String.Format("{0}{1}\{2}{3}", UsuarioActual.Empresa.Ruta, "Temp\Facturas", Date.Now.Ticks, Aleatorio.Next(100, 999)) + 'Dim TempDirectorio As String = String.Format("{0}{1}\{2}{3}", UsuarioActual.Empresa.Ruta, "Temp\Facturas", NowADS().Ticks, Aleatorio.Next(100, 999)) 'Directory.CreateDirectory(TempDirectorio) 'ListaDirectoriosTemporales.Add(TempDirectorio) ''AGREGA DIRECTORIO A LA LISTA @@ -1631,12 +1631,12 @@ Partial Class Compras_eFacturas Dim Correo As New ClsSisMail - 'If Correo.SendMail(UsuarioActual.Empresa, "sig.buzon@gmail.com", "Facturas Efacturas " & Now.ToString("yyyyMMddhhmmss"), "Facturas", Archivos:=ListaArchivosMail) Then + 'If Correo.SendMail(UsuarioActual.Empresa, "sig.buzon@gmail.com", "Facturas Efacturas " & NowADS().ToString("yyyyMMddhhmmss"), "Facturas", Archivos:=ListaArchivosMail) Then - If Correo.SendMail(UsuarioActual.Empresa, UsuarioActual.Empresa.Buzon_Mail, "Facturas Efacturas " & Now.ToString("yyyyMMddhhmmss"), "Facturas", Archivos:=ListaArchivosMail) Then + If Correo.SendMail(UsuarioActual.Empresa, UsuarioActual.Empresa.Buzon_Mail, "Facturas Efacturas " & NowADS().ToString("yyyyMMddhhmmss"), "Facturas", Archivos:=ListaArchivosMail) Then sw.Stop() swTiempo.AppendFormat("EnvioCorreo: ({0}) {1} ", sw.ElapsedMilliseconds - swmili, sw.ElapsedMilliseconds) @@ -1776,8 +1776,8 @@ Partial Class Compras_eFacturas Dim ArchivoW As StreamWriter Dim strLineaTMP As String - ' strLineaTMP = Chr(13) & Chr(10) & Day(Now) & "/" & Month(Now) & "/" & Year(Now) & " " & Hour(Now) & ":" & Minuto & ". " & Str & Chr(13) & Chr(10) - strLineaTMP = String.Format("{0}{1}Log: {2}{3}:{4}", Chr(13), Chr(10), Str, DateTime.Now.ToShortDateString, DateTime.Now.ToShortTimeString) + ' strLineaTMP = Chr(13) & Chr(10) & Day(NowADS()) & "/" & Month(NowADS()) & "/" & Year(NowADS()) & " " & Hour(NowADS()) & ":" & Minuto & ". " & Str & Chr(13) & Chr(10) + strLineaTMP = String.Format("{0}{1}Log: {2}{3}:{4}", Chr(13), Chr(10), Str, NowADS().ToShortDateString, NowADS().ToShortTimeString) Try ArchivoW = New StreamWriter(String.Format("{0}\Logefacturas.txt", ModExtensiones.DirectorioBaseEmpresas), True, System.Text.Encoding.UTF8) Catch ex As UnauthorizedAccessException @@ -1957,7 +1957,7 @@ Partial Class Compras_eFacturas Catch exx As XmlException Valor = Nothing 'Using file__1 As New System.IO.StreamWriter([String].Format("{0}\UtileriasLOG.txt", Path.GetDirectoryName(Application.StartupPath)), True, System.Text.Encoding.UTF8) - ' file__1.WriteLine("{DateTime.Now}: {exx.Message}") + ' file__1.WriteLine("{NowADS()}: {exx.Message}") ' file__1.Close() ' file__1.Dispose() 'End Using @@ -2106,7 +2106,7 @@ Partial Class Compras_eFacturas 'Mensajes.AppendFormat("{0}|{1}|{2}|{3}|{4}|{5}{6}&", ValorXML(nodo, "serie"), ValorXML(nodo, "folio"), ValorXML(nodo, "fecha").ToDate().ToShortDateString(), Fact.EmisorNombre, ValorXML(nodo, "total").ToDouble().FormatoNumero(), '"Factura no timbrada correctamente.", "") 'CargaMensaje(ValorXML(nodo, "serie"), ValorXML(nodo, "folio"), ValorXML(nodo, "fecha").ToDate(), Fact.EmisorNombre, ValorXML(nodo, "total").ToDouble(), "Factura no timbrada correctamente.", - '"", DateTime.Now) + '"", NowADS()) End If 'limpio los valores porque realmente no es una factura @@ -2432,7 +2432,7 @@ Partial Class Compras_eFacturas Dim NombreArchivo As String = TmpArchivoPDF Dim CadenaOriginal As String = (Convert.ToString((Convert.ToString((Convert.ToString("||1.0|") & FolioFiscal) + "|" + FechaCertificacion.ToString("yyyy-MM-dd") + "T" + FechaCertificacion.ToString("HH:mm:ss") + "|") & SelloCFDi) + "|") & NoSerieCertificado) + "||" Dim RutaFormato As String = String.Format("{0}Empresas\Grales\Formatos\CFDI.rdlc", ModExtensiones.DirectorioBaseEmpresas) - 'Dim ArchivoTempXLS As String = String.Format("{0}\GenSis{1}-{2}", Path.GetDirectoryName(ArchivoBaseXLS), Now.Ticks, Path.GetFileName(ArchivoBaseXLS)) + 'Dim ArchivoTempXLS As String = String.Format("{0}\GenSis{1}-{2}", Path.GetDirectoryName(ArchivoBaseXLS), NowADS().Ticks, Path.GetFileName(ArchivoBaseXLS)) Dim Fiscal As String = String.Format("Domicilio Fiscal {0}{1} {2}{0}Col.{3}{0}CP. {4} {5},{6},{7}", vbCr, DomFisCalle, DomFisNoExt, DomFisCol, DomFisCP, DomFisMun, DomFisEst, DomFisPais) @@ -4335,7 +4335,7 @@ Partial Class Compras_eFacturas 'ModExtensiones.GuardaLog(" '--------PDF GenGoPdf Inicia ") Dim Respuesta As Boolean = False - Dim Inicio As DateTime = DateTime.Now + Dim Inicio As DateTime = NowADS() Dim goPdf As GoPdf.GoPdf = New GoPdf.GoPdf() Dim logotipo As Byte() = Nothing @@ -4343,7 +4343,7 @@ Partial Class Compras_eFacturas Dim result = goPdf.ExportarPdf(XmlRutaArchivo, logotipo, "", RutaRDLC, New GoPdf.Modelos.DatosAdicionales() With { .DomicilioReceptor = "" }) - Dim Fin As DateTime = DateTime.Now + Dim Fin As DateTime = NowADS() If result IsNot Nothing Then File.WriteAllBytes(PDFRutaArchivo, result) diff --git a/Contabilidad/AuxiliarPrePolizas.aspx.cs b/Contabilidad/AuxiliarPrePolizas.aspx.cs index 6b3a11e38..2bbd69ac8 100644 --- a/Contabilidad/AuxiliarPrePolizas.aspx.cs +++ b/Contabilidad/AuxiliarPrePolizas.aspx.cs @@ -29,8 +29,8 @@ public partial class Contabilidad_AuxiliarPrePolizas : ClsPaginas private void InicializaValores() { CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyecto, LblSubProyecto, divProyecto:DivProyecto); - txtFechaI.Text = DateTime.Now.FirstDayOfMonth().ToShortDateString(); - txtFechaF.Text = DateTime.Now.ToShortDateString(); + txtFechaI.Text = NowADS().FirstDayOfMonth().ToShortDateString(); + txtFechaF.Text = NowADS().ToShortDateString(); DdlPlantillaPoliza.DataSource = get_GlobalDTContaPlantillasPolizas(UsuarioActual.CveEmpresa); DdlPlantillaPoliza.Items.Insert(0, new ListItem("Seleccione", "-1")); DdlPlantillaPoliza.DataBind(); @@ -62,7 +62,7 @@ public partial class Contabilidad_AuxiliarPrePolizas : ClsPaginas List para = new List(); para.Add(new ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)); para.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)); - para.Add(new ReportParameter("FechaImpresion", DateTime.Now.ToString())); + para.Add(new ReportParameter("FechaImpresion", NowADS().ToString())); para.Add(new ReportParameter("AgrupadoPor", $"Agrupado Por: {PlantillaPoliza}{Concepto}{Proyecto}{SubProyecto}{FechaI}{FechaF}")); if (Imagen.Exists) { diff --git a/Contabilidad/CatCuentas.aspx.vb b/Contabilidad/CatCuentas.aspx.vb index a6b11098c..36f391f24 100644 --- a/Contabilidad/CatCuentas.aspx.vb +++ b/Contabilidad/CatCuentas.aspx.vb @@ -309,10 +309,10 @@ Partial Class Contabilidad_CatCuentas Dim params As New List(Of ReportParameter) params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) - ImprimirPDF("Empresas/Grales/Formatos/CatCuentas.rdlc", DtDatos.FiltraParametros("", "Orden ASC"), params, String.Format("Catalogo Cuentas-{0}", Now.ToDateTime.ToShortDateString)) + ImprimirPDF("Empresas/Grales/Formatos/CatCuentas.rdlc", DtDatos.FiltraParametros("", "Orden ASC"), params, String.Format("Catalogo Cuentas-{0}", NowADS().ToDateTime.ToShortDateString)) End Sub End Class \ No newline at end of file diff --git a/Contabilidad/ContabilidadElectronica.aspx.vb b/Contabilidad/ContabilidadElectronica.aspx.vb index a7ea5854d..7c2a2e4b8 100644 --- a/Contabilidad/ContabilidadElectronica.aspx.vb +++ b/Contabilidad/ContabilidadElectronica.aspx.vb @@ -34,8 +34,8 @@ Partial Class Contabilidad_ContabilidadElectronica #Region " INICIALIZA VALORES " Private Sub InicializaValores() - 'TxtFechaI.Text = String.Format("01/01/{0}", Now.Year) - 'TxtFechaI.Text = Now.ToShortDateString + 'TxtFechaI.Text = String.Format("01/01/{0}", NowADS().Year) + 'TxtFechaI.Text = NowADS().ToShortDateString 'If Not UsuarioActual.Empresa.UsaContabilidad Then ' BtnGenerar.Enabled = False @@ -63,8 +63,8 @@ Partial Class Contabilidad_ContabilidadElectronica End If - DdlEjercicio.SelectedValue = Now.Year.ToString - DdlPeriodo.SelectedValue = Now.Month.ToString + DdlEjercicio.SelectedValue = NowADS().Year.ToString + DdlPeriodo.SelectedValue = NowADS().Month.ToString End Sub #End Region diff --git a/Contabilidad/ContabilizacionCompras.aspx.cs b/Contabilidad/ContabilizacionCompras.aspx.cs index c4e68f737..37af9c6f3 100644 --- a/Contabilidad/ContabilizacionCompras.aspx.cs +++ b/Contabilidad/ContabilizacionCompras.aspx.cs @@ -65,8 +65,8 @@ public partial class Contabilidad_ContabilizacionCompras : ClsPaginas DdlPlantillasPolizas.Items.Insert(0, new ListItem("Todos", "-1")); DdlPlantillasPolizas.DataBind(); - txtFechaI.Text = DateTime.Now.FirstDayOfMonth().AddMonths(-1).ToShortDateString(); - txtFechaF.Text = DateTime.Now.ToShortDateString(); + txtFechaI.Text = NowADS().FirstDayOfMonth().AddMonths(-1).ToShortDateString(); + txtFechaF.Text = NowADS().ToShortDateString(); if (UsuarioActual.CveRol == 1 || UsuarioActual.CveUsuario == 17 || UsuarioActual.CveUsuario == 171 || UsuarioActual.TienePermisoProceso(221)) { @@ -74,8 +74,8 @@ public partial class Contabilidad_ContabilizacionCompras : ClsPaginas TienePermisoVerPoliza = true; } - txtFechaI.Text = DateTime.Now.ToShortDateString(); - txtFechaF.Text = DateTime.Now.ToShortDateString(); + txtFechaI.Text = NowADS().ToShortDateString(); + txtFechaF.Text = NowADS().ToShortDateString(); //else //{ // Alert("Este módulo requiere el uso de Contabilidad.", ModExtensiones.TipoMensaje.MsgAdvertencia); diff --git a/Contabilidad/ContabilizacionVentas.aspx.cs b/Contabilidad/ContabilizacionVentas.aspx.cs index 3232a689d..2549a4512 100644 --- a/Contabilidad/ContabilizacionVentas.aspx.cs +++ b/Contabilidad/ContabilizacionVentas.aspx.cs @@ -71,8 +71,8 @@ public partial class Contabilidad_ContabilizacionVentas : ClsPaginas DdlSubProyecto.Items.Insert(0, new ListItem("Todos", "-1")); DdlSubProyecto.DataBind(); - txtFechaI.Text = DateTime.Now.AddMonths(-1).FirstDayOfMonth().ToShortDateString(); - txtFechaF.Text = DateTime.Now.ToShortDateString(); + txtFechaI.Text = NowADS().AddMonths(-1).FirstDayOfMonth().ToShortDateString(); + txtFechaF.Text = NowADS().ToShortDateString(); //cargaPolizas(); } @@ -406,7 +406,7 @@ public partial class Contabilidad_ContabilizacionVentas : ClsPaginas protected void ImgExcel2_Click(object sender, EventArgs e) { - GvV.ExportToExcel("DiarioVentas_" + DateTime.Now.ToShortDateString()); + GvV.ExportToExcel("DiarioVentas_" + NowADS().ToShortDateString()); } protected void LnkSimplificarCompra_Click(object sender, EventArgs e) diff --git a/Contabilidad/DiarioAmortizaciones.aspx.vb b/Contabilidad/DiarioAmortizaciones.aspx.vb index 9ab699646..6d14073d2 100644 --- a/Contabilidad/DiarioAmortizaciones.aspx.vb +++ b/Contabilidad/DiarioAmortizaciones.aspx.vb @@ -99,8 +99,8 @@ Partial Class Contabilidad_DiarioAmortizaciones TxtFecha.AutoPostBack = True DtTiposPoliza = Nothing - txtFechaI.Text = Now.AddMonths(0).FirstDayOfMonth.ToShortDateString - txtFechaF.Text = Now.ToShortDateString + txtFechaI.Text = NowADS().AddMonths(0).FirstDayOfMonth.ToShortDateString + txtFechaF.Text = NowADS().ToShortDateString If UsuarioActual.Sesion("DiarioPagos-CveProveedor").ToString <> "" Then DdlProveedores.SelectedValue = UsuarioActual.Sesion("DiarioPagos-CveProveedor").ToString.Trim If UsuarioActual.Sesion("DiarioPagos-FI").ToString <> "" Then txtFechaI.Text = UsuarioActual.Sesion("DiarioPagos-FI").ToString.Trim diff --git a/Contabilidad/DiarioCompras.aspx.vb b/Contabilidad/DiarioCompras.aspx.vb index cb24916fa..3d3477894 100644 --- a/Contabilidad/DiarioCompras.aspx.vb +++ b/Contabilidad/DiarioCompras.aspx.vb @@ -34,8 +34,8 @@ Partial Class Contabilidad_DiarioCompras DdlProveedores.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa) DdlProveedores.DataBind() - txtFechaI.Text = Now.AddMonths(0).FirstDayOfMonth.ToShortDateString - txtFechaF.Text = Now.ToShortDateString + txtFechaI.Text = NowADS().AddMonths(0).FirstDayOfMonth.ToShortDateString + txtFechaF.Text = NowADS().ToShortDateString If UsuarioActual.Sesion("DiarioCompras-CveProveedor").ToString <> "" Then DdlProveedores.SelectedValue = UsuarioActual.Sesion("DiarioCompras-CveProveedor").ToString.Trim If UsuarioActual.Sesion("DiarioCompras-FI").ToString <> "" Then txtFechaI.Text = UsuarioActual.Sesion("DiarioCompras-FI").ToString.Trim diff --git a/Contabilidad/DiarioPagos.aspx.vb b/Contabilidad/DiarioPagos.aspx.vb index b3915c3a5..c903edb12 100644 --- a/Contabilidad/DiarioPagos.aspx.vb +++ b/Contabilidad/DiarioPagos.aspx.vb @@ -92,8 +92,8 @@ Partial Class Contabilidad_DiarioPagos DdlProveedores.DataBind() TxtFecha.AutoPostBack = True - txtFechaI.Text = Now.AddMonths(0).FirstDayOfMonth.ToShortDateString - txtFechaF.Text = Now.ToShortDateString + txtFechaI.Text = NowADS().AddMonths(0).FirstDayOfMonth.ToShortDateString + txtFechaF.Text = NowADS().ToShortDateString If UsuarioActual.Sesion("DiarioPagos-CveProveedor").ToString <> "" Then DdlProveedores.SelectedValue = UsuarioActual.Sesion("DiarioPagos-CveProveedor").ToString.Trim If UsuarioActual.Sesion("DiarioPagos-FI").ToString <> "" Then txtFechaI.Text = UsuarioActual.Sesion("DiarioPagos-FI").ToString.Trim diff --git a/Contabilidad/FiltraPolizas.aspx.vb b/Contabilidad/FiltraPolizas.aspx.vb index 88f7945d5..db5b664b3 100644 --- a/Contabilidad/FiltraPolizas.aspx.vb +++ b/Contabilidad/FiltraPolizas.aspx.vb @@ -38,9 +38,9 @@ Partial Class Contabilidad_FiltraPolizas If Not Page.IsPostBack Then ViewState("Orden") = "" - DdlPeriodo.SelectedValue = Now.Month.ToString - TxtFechaICredito.Text = Now.FirstDayOfMonth.ToShortDateString - TxtFechaFCredito.Text = Now.LastDayOfMonth.ToShortDateString + DdlPeriodo.SelectedValue = NowADS().Month.ToString + TxtFechaICredito.Text = NowADS().FirstDayOfMonth.ToShortDateString + TxtFechaFCredito.Text = NowADS().LastDayOfMonth.ToShortDateString If UsuarioActual.Empresa.UsaContabilidad OrElse UsuarioActual.Empresa.TipoContabilidad > 0 Then @@ -227,7 +227,7 @@ Partial Class Contabilidad_FiltraPolizas params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("Ejercicio", DdlEjercicio.SelectedItem.ToString)) params.Add(New ReportParameter("Periodo", DdlPeriodo.SelectedItem.ToString)) @@ -295,7 +295,7 @@ Partial Class Contabilidad_FiltraPolizas Dim ObjIE As New ClsBancos() Dim pathPoliza As String = "" Dim TieneComprobante As String = "" - Tick = DateTime.Now.Ticks.ToString + Tick = NowADS().Ticks.ToString Dim ObjContabilidad As New ClsContabilidad Dim CvePrePoliza As Integer Dim PolizasSinComprobante As String = "Polizas sin comprobante:
    " diff --git a/Contabilidad/FisImpuestos.aspx.vb b/Contabilidad/FisImpuestos.aspx.vb index 0b8cd716e..23aff67ea 100644 --- a/Contabilidad/FisImpuestos.aspx.vb +++ b/Contabilidad/FisImpuestos.aspx.vb @@ -402,7 +402,7 @@ Partial Class Contabilidad_FisImpuestos objConta.IniciaTransacSQL() - CvePrepoliza = objConta.AddPrePolizas("Contabilidad/Impuestos", 62, 0, 0, DdlMoneda.SelectedValue.ToEntero, Now, TxtConcepto.Text.Trim.ToUpper, UsuarioActual.CveUsuario, UsuarioActual.Empresa.CveEmpresa) + CvePrepoliza = objConta.AddPrePolizas("Contabilidad/Impuestos", 62, 0, 0, DdlMoneda.SelectedValue.ToEntero, NowADS(), TxtConcepto.Text.Trim.ToUpper, UsuarioActual.CveUsuario, UsuarioActual.Empresa.CveEmpresa) If CvePrepoliza > 0 Then If objConta.AddUpdateFisImpuestos(-1, DdlTipoImpuesto.SelectedValue.ToEntero, CvePrepoliza, DdlProveedores.SelectedValue.ToEntero, TxtFechaImpuesto.Text.ToDate, TxtFolio.Text.Trim.ToUpper, NombreArchivo, UsuarioActual.CveUsuario, UsuarioActual.Empresa.CveEmpresa) Then diff --git a/Contabilidad/LibroDiario.aspx.vb b/Contabilidad/LibroDiario.aspx.vb index e62f95577..3ba05710a 100644 --- a/Contabilidad/LibroDiario.aspx.vb +++ b/Contabilidad/LibroDiario.aspx.vb @@ -63,8 +63,8 @@ Partial Class Contabilidad_LibroDiario Private Sub InicializaValores() - TxtFechaDel.Text = $"01/01/{Now.Year}" - TxtFechaAl.Text = Now.ToShortDateString + TxtFechaDel.Text = $"01/01/{NowADS().Year}" + TxtFechaAl.Text = NowADS().ToShortDateString End Sub Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) @@ -230,15 +230,15 @@ Partial Class Contabilidad_LibroDiario #Region " IMPRIMIR " Protected Sub Imprimir_click(sender As Object, e As EventArgs) Handles Imprimir.Click - 'FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate) - 'FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate) + 'FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate) + 'FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate) 'DtDatos = DtDatos ImprimirReporte() End Sub Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click - 'FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate) - 'FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate) + 'FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate) + 'FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate) 'DtDatos = DtDatos ImprimirReporte("EXCEL") End Sub diff --git a/Contabilidad/LibroMayor.aspx.vb b/Contabilidad/LibroMayor.aspx.vb index ac374cbd7..10399300b 100644 --- a/Contabilidad/LibroMayor.aspx.vb +++ b/Contabilidad/LibroMayor.aspx.vb @@ -60,8 +60,8 @@ Partial Class Contabilidad_LibroMayor Private Sub InicializaValores() - TxtFechaDel.Text = $"01/01/{Now.Year}" - TxtFechaAl.Text = Now.ToShortDateString + TxtFechaDel.Text = $"01/01/{NowADS().Year}" + TxtFechaAl.Text = NowADS().ToShortDateString 'DdlMoneda.DataSource = GlobalDTMonedas 'DdlMoneda.DataBind() @@ -188,15 +188,15 @@ Partial Class Contabilidad_LibroMayor #End Region Protected Sub Imprimir_click(sender As Object, e As EventArgs) Handles Imprimir.Click - FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate) - FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate) + FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate) + FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate) DtDatos = DtDatos ImprimirReporte() End Sub Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click - FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate) - FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate) + FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate) + FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate) DtDatos = DtDatos ImprimirReporte("EXCEL") End Sub diff --git a/Contabilidad/Poliza.aspx.vb b/Contabilidad/Poliza.aspx.vb index 9c7535ba9..55c79cb4e 100644 --- a/Contabilidad/Poliza.aspx.vb +++ b/Contabilidad/Poliza.aspx.vb @@ -87,7 +87,7 @@ Partial Class Contabilidad_Poliza End Sub 'Protected Sub cmdExcel_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs) Handles cmdExcel.Click - ' tbl.ExportToExcel("Poliza_" & Now.Year & If(Now.Month.ToString.Length = 1, "0" & Now.Month.ToString, Now.Month.ToString) & If(Now.Day.ToString.Length = 1, "0" & Now.Day.ToString, Now.Day.ToString)) + ' tbl.ExportToExcel("Poliza_" & NowADS().Year & If(NowADS().Month.ToString.Length = 1, "0" & NowADS().Month.ToString, NowADS().Month.ToString) & If(NowADS().Day.ToString.Length = 1, "0" & NowADS().Day.ToString, NowADS().Day.ToString)) 'End Sub Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click diff --git a/Contabilidad/PolizasImpresion.aspx.vb b/Contabilidad/PolizasImpresion.aspx.vb index 0ea6f1bfa..4b3e80111 100644 --- a/Contabilidad/PolizasImpresion.aspx.vb +++ b/Contabilidad/PolizasImpresion.aspx.vb @@ -30,8 +30,8 @@ Partial Class Contabilidad_PolizasImpresion ContabilidadSIG = UsuarioActual.Empresa.TipoContabilidad = 1 OrElse UsuarioActual.CveEmpresa = 119 - TxtFechaInicio.Text = Now.AddDays(-1).ToShortDateString - TxtFechaFin.Text = Now.ToShortDateString + TxtFechaInicio.Text = NowADS().AddDays(-1).ToShortDateString + TxtFechaFin.Text = NowADS().ToShortDateString DdlUsuarioRegistro.DataSource = GlobalDTUsuarios(CveEmpresa:=UsuarioActual.CveEmpresa) DdlUsuarioRegistro.DataBind() diff --git a/Contabilidad/PopUpAuxiliar.aspx.vb b/Contabilidad/PopUpAuxiliar.aspx.vb index 72c7cfed2..fbd595cef 100644 --- a/Contabilidad/PopUpAuxiliar.aspx.vb +++ b/Contabilidad/PopUpAuxiliar.aspx.vb @@ -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 diff --git a/Contabilidad/RegPoliza.aspx.vb b/Contabilidad/RegPoliza.aspx.vb index 71221cb6f..d7d9dd9a5 100644 --- a/Contabilidad/RegPoliza.aspx.vb +++ b/Contabilidad/RegPoliza.aspx.vb @@ -157,8 +157,8 @@ Partial Class RegPoliza CvePrePoliza = -1 Me.Form.DefaultButton = BtnConsultar.UniqueID - TxtFecha.Text = Now.ToShortDateString - TxtFechaPoliza.Text = Now.ToShortDateString + TxtFecha.Text = NowADS().ToShortDateString + TxtFechaPoliza.Text = NowADS().ToShortDateString If UsuarioActual.Empresa.UsaAC Then @@ -258,7 +258,7 @@ Partial Class RegPoliza End If Else - TxtFechaPoliza.Text = Date.Now.ToShortDateString + TxtFechaPoliza.Text = NowADS().ToShortDateString IDPoliza = -1 End If @@ -559,7 +559,7 @@ Partial Class RegPoliza ' If TmpDT.Rows.Count = 0 Then ' Alert("Debe consultar una póliza antes de imprimir ...", TipoMensaje.MsgAdvertencia) ' Else - ' 'GeneraPDF(Now, "Sin Timbrar", "Sin Timbrar", New Date(1, 1, 1), "Sin Timbrar", TmpDT, "Sin Timbrar", "Sin Timbrar", RutaCBB, If(LblSerie.Text.Trim = String.Empty, TxtFolio.Text.Trim, LblSerie.Text.Trim & "-" & TxtFolio.Text.Trim), "", True, False) + ' 'GeneraPDF(NowADS(), "Sin Timbrar", "Sin Timbrar", New Date(1, 1, 1), "Sin Timbrar", TmpDT, "Sin Timbrar", "Sin Timbrar", RutaCBB, If(LblSerie.Text.Trim = String.Empty, TxtFolio.Text.Trim, LblSerie.Text.Trim & "-" & TxtFolio.Text.Trim), "", True, False) ' GeneraPDF() ' End If 'End Sub @@ -568,7 +568,7 @@ Partial Class RegPoliza 'If TmpDT.Rows.Count = 0 Then ' Alert("Debe consultar una póliza antes de imprimir ...", TipoMensaje.MsgAdvertencia) 'Else - ' 'GeneraPDF(Now, "Sin Timbrar", "Sin Timbrar", New Date(1, 1, 1), "Sin Timbrar", TmpDT, "Sin Timbrar", "Sin Timbrar", RutaCBB, If(LblSerie.Text.Trim = String.Empty, TxtFolio.Text.Trim, LblSerie.Text.Trim & "-" & TxtFolio.Text.Trim), "", True, False) + ' 'GeneraPDF(NowADS(), "Sin Timbrar", "Sin Timbrar", New Date(1, 1, 1), "Sin Timbrar", TmpDT, "Sin Timbrar", "Sin Timbrar", RutaCBB, If(LblSerie.Text.Trim = String.Empty, TxtFolio.Text.Trim, LblSerie.Text.Trim & "-" & TxtFolio.Text.Trim), "", True, False) ' GeneraPDF() 'End If End Sub @@ -639,7 +639,7 @@ Partial Class RegPoliza ChkPolizaComplementaria.Checked = True If DT.Rows.Count = 0 Then - TxtFechaPoliza.Text = Now.ToShortDateString + TxtFechaPoliza.Text = NowADS().ToShortDateString TxtNumeroPoliza.Text = "" LblCargo.Text = "" LblAbono.Text = "" @@ -821,7 +821,7 @@ Partial Class RegPoliza BtnGuardar.OnClientClick = "FncVerifica();" If DT.Rows.Count = 0 Then - TxtFechaPoliza.Text = Now.ToShortDateString + TxtFechaPoliza.Text = NowADS().ToShortDateString TxtNumeroPoliza.Text = "" LblCargo.Text = "" LblAbono.Text = "" @@ -1185,7 +1185,7 @@ Partial Class RegPoliza Dim tCveSub As Integer = If(drt("IdSegNeg").ToString <> "", GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"SubProyecto ='{drt("SegNeg")}'").ToEntero, -1) 'If tCveSub <= 0 AndAlso drt("IdSegNeg").ToString.ToEntero = 0 Then 'toma el primero ' tCveSub = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto").ToEntero - 'End If ' Now, drt("IdCuenta").ToString.ToEntero, 0, + 'End If ' NowADS(), drt("IdCuenta").ToString.ToEntero, 0, If ObjConta.AddPrePolizasDetalle(tCvePrePoliza, drt("TipoMovto").ToString = "True", drt("Importe").ToString.ToDecimal, drt("Importe").ToString.ToDecimal, 299, @@ -1312,7 +1312,7 @@ Partial Class RegPoliza If ObjConta.UpdateDevolucionesIVA(gvr.DataKey("Id").ToEntero, IDPoliza, DdlCuenta.SelectedValue.ToEntero, gvr.FCDropDownList("DdlProveedor").SelectedValue.ToEntero, gvr.FCDropDownList("DdlTasa").SelectedValue.ToDouble, gvr.FCTextBox("TxtImporteBase").Text.ToDouble, gvr.FCTextBox("TxtImporteIVA").Text.ToDouble, - gvr.FCTextBox("TxtRetIVA").Text.ToDouble, gvr.FCTextBox("TxtRetISR").Text.ToDouble, Date.Now, + gvr.FCTextBox("TxtRetIVA").Text.ToDouble, gvr.FCTextBox("TxtRetISR").Text.ToDouble, NowADS(), gvr.FCTextBox("TxtReferenciaDevolucion").Text, gvr.FCTextBox("TxtSerie").Text, gvr.FCTextBox("TxtFolio").Text.ToEntero) Then Alert("Devolución Actualizada con Éxito", TipoMensaje.MsgInformacion) Else diff --git a/Contabilidad/RegPrePoliza.aspx.vb b/Contabilidad/RegPrePoliza.aspx.vb index b859e5ddb..222bc4852 100644 --- a/Contabilidad/RegPrePoliza.aspx.vb +++ b/Contabilidad/RegPrePoliza.aspx.vb @@ -213,7 +213,7 @@ Partial Class ContabilidadC_RegPrePoliza Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load If Not Page.IsPostBack Then - Tick = DateTime.Now.Ticks.ToString() + Tick = NowADS().Ticks.ToString() If UsuarioActual.Empresa.TipoContabilizacion = 1 OrElse UsuarioActual.Empresa.TipoContabilidad = 1 OrElse UsuarioActual.CveEmpresa = 119 Then Response.Redirect(Request.Url.PathAndQuery.Replace("RegPrePoliza", "RegPrePolizaS")) @@ -2255,7 +2255,7 @@ Partial Class ContabilidadC_RegPrePoliza 'If YaExiste = False Then ' If IdCuenta > 0 Then - ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Importe, "", CveConceptoContable, Concepto, Now.ToDate(), IdCtaContable, -1, ImporteMX:=Importe, CveSubProyecto:=CveSubProyecto, CveCuenta:=IdCuenta) Then + ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Importe, "", CveConceptoContable, Concepto, NowADS().ToDate(), IdCtaContable, -1, ImporteMX:=Importe, CveSubProyecto:=CveSubProyecto, CveCuenta:=IdCuenta) Then ' TieneError = True ' Exit For ' End If diff --git a/Contabilidad/RegPrePolizaS.aspx.vb b/Contabilidad/RegPrePolizaS.aspx.vb index 62845214d..fec541fc1 100644 --- a/Contabilidad/RegPrePolizaS.aspx.vb +++ b/Contabilidad/RegPrePolizaS.aspx.vb @@ -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 diff --git a/Contabilidad/RepAnexoCatalogo.aspx.vb b/Contabilidad/RepAnexoCatalogo.aspx.vb index 5941f821a..e3dd29e2a 100644 --- a/Contabilidad/RepAnexoCatalogo.aspx.vb +++ b/Contabilidad/RepAnexoCatalogo.aspx.vb @@ -87,8 +87,8 @@ Partial Class AC_RepAnexoCatalogo DtDatos = Nothing CargaTipoCuentas() CargaSegmentosNegocio() - FechaInicio = DateSerial(Year(Now), Month(Now), 1) - FechaFin = Date.Now + FechaInicio = DateSerial(Year(NowADS()), Month(NowADS()), 1) + FechaFin = NowADS() If UsuarioActual.Empresa.UsaAC Then TipoReporte = -1 @@ -204,8 +204,8 @@ Partial Class AC_RepAnexoCatalogo If DdlTipoCuentas.SelectedValue.ToEntero = -2 AndAlso TxtCuenta.Text.Trim = "" Then Alert("El campo Cuenta es obligatorio.", TipoMensaje.MsgError) Else - FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate) - FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate) + FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate) + FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate) IdCuenta = If(DdlTipoCuentas.SelectedValue.ToEntero = -2, HdnCveCuenta.Value.ToEntero, DdlTipoCuentas.SelectedValue.ToEntero) CargaDatos() diff --git a/Contabilidad/RepAnexoCatalogoMes.aspx.vb b/Contabilidad/RepAnexoCatalogoMes.aspx.vb index 63ad7eedc..099414cd3 100644 --- a/Contabilidad/RepAnexoCatalogoMes.aspx.vb +++ b/Contabilidad/RepAnexoCatalogoMes.aspx.vb @@ -87,8 +87,8 @@ Partial Class AC_RepAnexoCatalogoMes DtDatos = Nothing CargaTipoCuentas() CargaSegmentosNegocio() - FechaInicio = DateSerial(Year(Now), Month(Now), 1) - FechaFin = Date.Now + FechaInicio = DateSerial(Year(NowADS()), Month(NowADS()), 1) + FechaFin = NowADS() If UsuarioActual.Empresa.UsaAC Then TipoReporte = -1 @@ -206,8 +206,8 @@ Partial Class AC_RepAnexoCatalogoMes If DdlTipoCuentas.SelectedValue.ToEntero = -2 AndAlso TxtCuenta.Text.Trim = "" Then Alert("El campo Cuenta es obligatorio.", TipoMensaje.MsgError) Else - FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate) - FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate) + FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate) + FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate) IdCuenta = If(DdlTipoCuentas.SelectedValue.ToEntero = -2, HdnCveCuenta.Value.ToEntero, DdlTipoCuentas.SelectedValue.ToEntero) CargaDatos() diff --git a/Contabilidad/RepAnexoCatalogoSegmento.aspx.vb b/Contabilidad/RepAnexoCatalogoSegmento.aspx.vb index c22931cc4..0ea1427a3 100644 --- a/Contabilidad/RepAnexoCatalogoSegmento.aspx.vb +++ b/Contabilidad/RepAnexoCatalogoSegmento.aspx.vb @@ -112,8 +112,8 @@ Partial Class AC_RepAnexoCatalogoSegmento DtDatos = Nothing CargaTipoCuentas() CargaSegmentosNegocio() - FechaInicio = DateSerial(Year(Now), Month(Now), 1) - FechaFin = Date.Now + FechaInicio = DateSerial(Year(NowADS()), Month(NowADS()), 1) + FechaFin = NowADS() If UsuarioActual.Empresa.UsaAC Then TipoReporte = -1 @@ -230,8 +230,8 @@ Partial Class AC_RepAnexoCatalogoSegmento End Sub Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) - FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate) - FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate) + FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate) + FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate) 'IdCuenta = If(DdlTipoCuentas.SelectedValue.ToEntero = -2, HdnCveCuenta.Value.ToEntero, DdlTipoCuentas.SelectedValue.ToEntero) CargaDatos() @@ -345,7 +345,7 @@ Partial Class AC_RepAnexoCatalogoSegmento SbFiltros.Append($"Fecha Inicio: {TxtFechaDel.Text} Fecha Fin: {TxtFechaAl.Text} ") SbFiltros.Append($" Cuenta: {TxtCuenta.Text}") - GvDatos.ExportToExcelGembox($"RepAnexoCatalogoSegmento{Now.ToString("yyyyMMddhhss")}", UsuarioActual, "Anexo del Catálogo Por Segmento", DatoTituloExtra:=$"", DatosFiltros:=SbFiltros.ToString()) + GvDatos.ExportToExcelGembox($"RepAnexoCatalogoSegmento{NowADS().ToString("yyyyMMddhhss")}", UsuarioActual, "Anexo del Catálogo Por Segmento", DatoTituloExtra:=$"", DatosFiltros:=SbFiltros.ToString()) End Sub diff --git a/Contabilidad/RepBalanceGeneral.aspx.vb b/Contabilidad/RepBalanceGeneral.aspx.vb index 01c5e437c..2d320e959 100644 --- a/Contabilidad/RepBalanceGeneral.aspx.vb +++ b/Contabilidad/RepBalanceGeneral.aspx.vb @@ -341,7 +341,7 @@ Partial Class Contabilidad_RepBalanceGeneral CargaEjercicios() - DdlEjercicio.SelectedValue = Now.Year.ToString + DdlEjercicio.SelectedValue = NowADS().Year.ToString 'Anual Anos = 0 @@ -461,7 +461,7 @@ Partial Class Contabilidad_RepBalanceGeneral Private Sub CargaDatos() Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) - Dim FechaI = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, CChar("0")), If(DdlEjercicio.SelectedValue.Length = 0, Now.Year.ToString, DdlEjercicio.SelectedValue)).ToDate + Dim FechaI = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, CChar("0")), If(DdlEjercicio.SelectedValue.Length = 0, NowADS().Year.ToString, DdlEjercicio.SelectedValue)).ToDate Dim FechaF = FechaI.ToDate.LastDayOfMonth TipoReporte = If(TipoReporte = -1, -1, DdlTipoReporte.SelectedValue.ToEntero) Dim IdCuentaAhorroDesahorro = If(UsuarioActual.CveEmpresa = 48, 87, 9999) @@ -828,7 +828,7 @@ Partial Class Contabilidad_RepBalanceGeneral End If ObjConta.Dispose() - Anos = (Year(Date.Now) - DdlEjercicio.SelectedValue.ToEntero) + 1 + Anos = (Year(NowADS()) - DdlEjercicio.SelectedValue.ToEntero) + 1 'Esconde todo For index = 1 To 20 @@ -1034,7 +1034,7 @@ Partial Class Contabilidad_RepBalanceGeneral End Sub Private Sub ProcesaImpresion() - Dim FechaI = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, CChar("0")), If(DdlEjercicio.SelectedValue.Length = 0, Now.Year.ToString, DdlEjercicio.SelectedValue)).ToDate + Dim FechaI = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, CChar("0")), If(DdlEjercicio.SelectedValue.Length = 0, NowADS().Year.ToString, DdlEjercicio.SelectedValue)).ToDate Dim FechaF = FechaI.ToDate.LastDayOfMonth TipoReporte = If(TipoReporte = -1, -1, DdlTipoReporte.SelectedValue.ToEntero) Dim IdCuentaAhorroDesahorro = If(UsuarioActual.CveEmpresa = 48, 87, 9999) @@ -1134,7 +1134,7 @@ Partial Class Contabilidad_RepBalanceGeneral params.Add(New ReportParameter("pFechaFin", FechaF)) params.Add(New ReportParameter("pSubtotal", DdlSubtotales.SelectedValue.ToString)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario)) - params.Add(New ReportParameter("FechaImpresion", Now.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToShortDateString)) ImprimirPDF(reportpath, DtDatosMensual, params, fileName, Formato) End Sub @@ -1157,7 +1157,7 @@ Partial Class Contabilidad_RepBalanceGeneral params.Add(New ReportParameter("pImg", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) params.Add(New ReportParameter("pFechaI", DdlEjercicio.SelectedValue)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario)) - params.Add(New ReportParameter("FechaImpresion", Now.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToShortDateString)) ImprimirPDF(reportpath, DtDatosAnual, params, fileName, Formato) End Sub diff --git a/Contabilidad/RepBalanceGeneralAnual.aspx.vb b/Contabilidad/RepBalanceGeneralAnual.aspx.vb index 36f691fff..756ef827b 100644 --- a/Contabilidad/RepBalanceGeneralAnual.aspx.vb +++ b/Contabilidad/RepBalanceGeneralAnual.aspx.vb @@ -54,7 +54,7 @@ Partial Class Contabilidad_RepBalanceGeneralAnual TipoReporte = 1 End If - DdlEjercicio.SelectedValue = Now.Year.ToString + DdlEjercicio.SelectedValue = NowADS().Year.ToString Anos = 0 CargaDatos() @@ -73,7 +73,7 @@ Partial Class Contabilidad_RepBalanceGeneralAnual End If ObjConta.Dispose() - Anos = (Year(Date.Now) - DdlEjercicio.SelectedValue.ToEntero) + 1 + Anos = (Year(NowADS()) - DdlEjercicio.SelectedValue.ToEntero) + 1 'Esconde todo For index = 1 To 20 diff --git a/Contabilidad/RepBalanceGeneralMensual.aspx.vb b/Contabilidad/RepBalanceGeneralMensual.aspx.vb index 380f5db62..0286662a9 100644 --- a/Contabilidad/RepBalanceGeneralMensual.aspx.vb +++ b/Contabilidad/RepBalanceGeneralMensual.aspx.vb @@ -38,7 +38,7 @@ Partial Class Contabilidad_RepBalanceGeneralMensual tdTipoReporte.Visible = True End If - DdlEjercicio.SelectedValue = Now.Year.ToString + DdlEjercicio.SelectedValue = NowADS().Year.ToString CargaDatos() End If diff --git a/Contabilidad/RepBalanceGeneralProForma.aspx.vb b/Contabilidad/RepBalanceGeneralProForma.aspx.vb index fe9c260c5..eedde2576 100644 --- a/Contabilidad/RepBalanceGeneralProForma.aspx.vb +++ b/Contabilidad/RepBalanceGeneralProForma.aspx.vb @@ -60,15 +60,15 @@ Partial Class Contabilidad_RepBalanceGeneralProForma - GvDatos.Columns(1).HeaderText = (Year(Date.Now) - 1).ToString - GvDatos.Columns(2).HeaderText = (Year(Date.Now) + 0).ToString - GvDatos.Columns(3).HeaderText = (Year(Date.Now) + 0).ToString - GvDatos.Columns(4).HeaderText = (Year(Date.Now) + 0).ToString - GvDatos.Columns(6).HeaderText = (Year(Date.Now) + 1).ToString - GvDatos.Columns(7).HeaderText = (Year(Date.Now) + 2).ToString - GvDatos.Columns(8).HeaderText = (Year(Date.Now) + 3).ToString + GvDatos.Columns(1).HeaderText = (Year(NowADS()) - 1).ToString + GvDatos.Columns(2).HeaderText = (Year(NowADS()) + 0).ToString + GvDatos.Columns(3).HeaderText = (Year(NowADS()) + 0).ToString + GvDatos.Columns(4).HeaderText = (Year(NowADS()) + 0).ToString + GvDatos.Columns(6).HeaderText = (Year(NowADS()) + 1).ToString + GvDatos.Columns(7).HeaderText = (Year(NowADS()) + 2).ToString + GvDatos.Columns(8).HeaderText = (Year(NowADS()) + 3).ToString - 'Anos = (Year(Date.Now) - DdlEjercicio.SelectedValue.ToEntero) + 1 + 'Anos = (Year(NowADS()) - DdlEjercicio.SelectedValue.ToEntero) + 1 ''Esconde todo 'For index = 1 To 40 Step 2 diff --git a/Contabilidad/RepBalanzaComprobacion.aspx.vb b/Contabilidad/RepBalanzaComprobacion.aspx.vb index 294aa9b2a..00372d807 100644 --- a/Contabilidad/RepBalanzaComprobacion.aspx.vb +++ b/Contabilidad/RepBalanzaComprobacion.aspx.vb @@ -59,8 +59,8 @@ Partial Class Contabilidad_RepBalanzaComprobacion If Not Page.IsPostBack Then Dim ErrorParametros = True ModoImpresion = False - TxtFechaDel.Text = DateSerial(Year(Now), Month(Now), 1).ToShortDateString - TxtFechaAl.Text = Date.Now.ToShortDateString + TxtFechaDel.Text = DateSerial(Year(NowADS()), Month(NowADS()), 1).ToShortDateString + TxtFechaAl.Text = NowADS().ToShortDateString If UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.UsaContabilidad Then BtnConsultar.Enabled = True @@ -81,8 +81,8 @@ Partial Class Contabilidad_RepBalanzaComprobacion End If If IsNothing(DtDatos) Then - FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate) - FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate) + FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate) + FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate) CargaDatos() End If Else @@ -115,8 +115,8 @@ Partial Class Contabilidad_RepBalanzaComprobacion Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) - FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate) - FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate) + FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate) + FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate) CargaDatos() @@ -173,8 +173,8 @@ Partial Class Contabilidad_RepBalanzaComprobacion ModoImpresion = True CargaGrid() - FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate) - FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate) + FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate) + FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate) 'RegistraScript("Enable();") @@ -220,8 +220,8 @@ Partial Class Contabilidad_RepBalanzaComprobacion ModoImpresion = True CargaGrid() - FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate) - FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate) + FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate) + FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate) 'RegistraScript("Enable();") diff --git a/Contabilidad/RepContabilidadDiaria.aspx.vb b/Contabilidad/RepContabilidadDiaria.aspx.vb index 16d5ad390..4d570a12c 100644 --- a/Contabilidad/RepContabilidadDiaria.aspx.vb +++ b/Contabilidad/RepContabilidadDiaria.aspx.vb @@ -17,8 +17,8 @@ Partial Class Contabilidad_FiltraPolizas Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not Page.IsPostBack Then ViewState("Orden") = "" - TxtFechaI.Text = Now.ToDate.ToShortDateString - TxtFechaF.Text = Now.ToShortDateString + TxtFechaI.Text = NowADS().ToDate.ToShortDateString + TxtFechaF.Text = NowADS().ToShortDateString CargaDatos() End If End Sub diff --git a/Contabilidad/RepEdoResultados2.aspx.vb b/Contabilidad/RepEdoResultados2.aspx.vb index 3d26b79df..27805f9e9 100644 --- a/Contabilidad/RepEdoResultados2.aspx.vb +++ b/Contabilidad/RepEdoResultados2.aspx.vb @@ -43,8 +43,8 @@ Partial Class Contabilidad_RepEdoResultados2 Private Sub Contabilidad_RepEdoResultados2_Load(sender As Object, e As EventArgs) Handles Me.Load If Not Page.IsPostBack Then CargaCombos() - txtFechaI.Text = $"01/01/{Now.Year}" - txtFechaF.Text = $"31/12/{Now.Year}" + txtFechaI.Text = $"01/01/{NowADS().Year}" + txtFechaF.Text = $"31/12/{NowADS().Year}" CargaDatos() End If @@ -222,7 +222,7 @@ Partial Class Contabilidad_RepEdoResultados2 params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToLongDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToLongDateString)) params.Add(New ReportParameter("Filtros", StrFiltro.ToString)) Dim rds1 As New ReportDataSource With {.Name = "DataSet1", .Value = If(DtIngresos IsNot Nothing, DtIngresos, New DataTable)} ' sino esta creado el objeto, lo creamos, para que no truene el reporte diff --git a/Contabilidad/RepEdoResultados2Detalle.aspx.cs b/Contabilidad/RepEdoResultados2Detalle.aspx.cs index 99d8319dc..067084904 100644 --- a/Contabilidad/RepEdoResultados2Detalle.aspx.cs +++ b/Contabilidad/RepEdoResultados2Detalle.aspx.cs @@ -38,8 +38,8 @@ public partial class Contabilidad_RepEdoResultados2Detalle : ClsPaginas DdlTipoGasto.DataBind(); DdlTipoGasto.Items.Insert(0, new ListItem("Todos", "-1")); - txtFechaI.Text = Request["FechaInicio"] == null ? DateTime.Now.ToShortDateString() : Request["FechaInicio"].ToString().ToDate().ToShortDateString(); - txtFechaF.Text = Request["FechaFin"] == null ? DateTime.Now.ToShortDateString() : Request["FechaFin"].ToString().ToDate().ToShortDateString(); + txtFechaI.Text = Request["FechaInicio"] == null ? NowADS().ToShortDateString() : Request["FechaInicio"].ToString().ToDate().ToShortDateString(); + txtFechaF.Text = Request["FechaFin"] == null ? NowADS().ToShortDateString() : Request["FechaFin"].ToString().ToDate().ToShortDateString(); int CveAgrupador = Request["CveAgrupador"] == null ? -1 : Request["CveAgrupador"].ToString().ToEntero(); int Gpo = Request["Gpo"] == null ? 0 : Request["Gpo"].ToString().ToEntero(); if (Gpo == 1) { DdlSubProyecto.SelectedValueExist(CveAgrupador); DdlClasificacion.SelectedValueExist(Request["CveClasificacion"] == null ? -1 : Request["CveClasificacion"].ToString().ToEntero()); DdlTipoGasto.SelectedValueExist(Request["CveTipoGasto"] == null ? -1 : Request["CveTipoGasto"].ToString().ToEntero()); } diff --git a/Contabilidad/RepEstadoResultados.aspx.vb b/Contabilidad/RepEstadoResultados.aspx.vb index d6cf044bf..fabfe41ef 100644 --- a/Contabilidad/RepEstadoResultados.aspx.vb +++ b/Contabilidad/RepEstadoResultados.aspx.vb @@ -163,14 +163,14 @@ Partial Class Contabilidad_RepEstadoResultados CargaDatosGenerales() - DdlEjercicio.SelectedValue = Now.Year.ToString + DdlEjercicio.SelectedValue = NowADS().Year.ToString Anos = 0 'Normal TotalActual = 0 TotalAnterior = 0 - DdlPeriodo.SelectedValue = Now.Month.ToString + DdlPeriodo.SelectedValue = NowADS().Month.ToString TabContainer_ActiveTabChanged(TabContainer, EventArgs.Empty) Else @@ -756,7 +756,7 @@ Partial Class Contabilidad_RepEstadoResultados LblTituloAniosRango.Text = $"{ UsuarioActual.Empresa.Empresa }" LblFechas.Text = $"{FechaInicio.ToString("dd/MMMM/yyyy")} al {FechaFin.ToString("dd/MMMM/yyyy")}" - LblFechaReporte.Text = Now.ToString("dd/MMMM/yyyy") + LblFechaReporte.Text = NowADS().ToString("dd/MMMM/yyyy") End Sub Protected Sub LnkDescarPersonalizados_Click(sender As Object, e As EventArgs) @@ -804,7 +804,7 @@ Partial Class Contabilidad_RepEstadoResultados Next - excel.Save(Me.Response, $"RepEstadoResultadosMensual_{Now.ToString("yyyyMMddhhmmss")}.xlsx") + excel.Save(Me.Response, $"RepEstadoResultadosMensual_{NowADS().ToString("yyyyMMddhhmmss")}.xlsx") End Sub @@ -826,7 +826,7 @@ Partial Class Contabilidad_RepEstadoResultados End If ObjConta.Dispose() - Anos = (Year(Date.Now) - DdlEjercicio.SelectedValue.ToEntero) + 1 + Anos = (Year(NowADS()) - DdlEjercicio.SelectedValue.ToEntero) + 1 'Esconde todo For index = 1 To 40 Step 2 @@ -998,7 +998,7 @@ Partial Class Contabilidad_RepEstadoResultados End Sub Private Sub ProcesaImpresion() - Dim FechaI = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, CChar("0")), If(DdlEjercicio.SelectedValue.Length = 0, Now.Year.ToString, DdlEjercicio.SelectedValue)).ToDate + Dim FechaI = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, CChar("0")), If(DdlEjercicio.SelectedValue.Length = 0, NowADS().Year.ToString, DdlEjercicio.SelectedValue)).ToDate Dim FechaF = FechaI.ToDate.LastDayOfMonth TipoReporte = If(TipoReporte = -1, -1, DdlTipoReporte.SelectedValue.ToEntero) Dim IdCuentaAhorroDesahorro = If(UsuarioActual.CveEmpresa = 48, 87, 9999) @@ -1096,7 +1096,7 @@ Partial Class Contabilidad_RepEstadoResultados params.Add(New ReportParameter("pFechaFin", FechaF)) params.Add(New ReportParameter("pSubtotal", DdlSubtotales.SelectedValue.ToString)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario)) - params.Add(New ReportParameter("FechaImpresion", Now.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToShortDateString)) ImprimirPDF(reportpath, DtDatosMensual, params, fileName, Formato) End Sub @@ -1119,7 +1119,7 @@ Partial Class Contabilidad_RepEstadoResultados params.Add(New ReportParameter("pImg", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) params.Add(New ReportParameter("pFechaI", DdlEjercicio.SelectedValue)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario)) - params.Add(New ReportParameter("FechaImpresion", Now.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToShortDateString)) ImprimirPDF(reportpath, DtDatosAnual, params, fileName, Formato) End Sub diff --git a/Contabilidad/RepEstadoResultadosAnual.aspx.vb b/Contabilidad/RepEstadoResultadosAnual.aspx.vb index 14c51ab24..85d839bac 100644 --- a/Contabilidad/RepEstadoResultadosAnual.aspx.vb +++ b/Contabilidad/RepEstadoResultadosAnual.aspx.vb @@ -46,7 +46,7 @@ Partial Class Contabilidad_RepEstadoResultadosAnual tdTipoReporte.Visible = True End If - DdlEjercicio.SelectedValue = Now.Year.ToString + DdlEjercicio.SelectedValue = NowADS().Year.ToString Anos = 0 CargaDatos() @@ -65,7 +65,7 @@ Partial Class Contabilidad_RepEstadoResultadosAnual End If ObjConta.Dispose() - Anos = (Year(Date.Now) - DdlEjercicio.SelectedValue.ToEntero) + 1 + Anos = (Year(NowADS()) - DdlEjercicio.SelectedValue.ToEntero) + 1 'Esconde todo For index = 1 To 40 Step 2 diff --git a/Contabilidad/RepEstadoResultadosMensual.aspx.vb b/Contabilidad/RepEstadoResultadosMensual.aspx.vb index 61fe82d05..31e9ad68b 100644 --- a/Contabilidad/RepEstadoResultadosMensual.aspx.vb +++ b/Contabilidad/RepEstadoResultadosMensual.aspx.vb @@ -38,7 +38,7 @@ Partial Class Contabilidad_RepEstadoResultadosMensual tdTipoReporte.Visible = True End If - DdlEjercicio.SelectedValue = Now.Year.ToString + DdlEjercicio.SelectedValue = NowADS().Year.ToString CargaDatos() End If diff --git a/Contabilidad/RepEstadoResultadosPorSegmento.aspx.vb b/Contabilidad/RepEstadoResultadosPorSegmento.aspx.vb index f1953d5d4..c7617d7e3 100644 --- a/Contabilidad/RepEstadoResultadosPorSegmento.aspx.vb +++ b/Contabilidad/RepEstadoResultadosPorSegmento.aspx.vb @@ -189,14 +189,14 @@ Partial Class Contabilidad_RepEstadoResultadosPorSegmento CargaDatosGenerales() - DdlEjercicio.SelectedValue = Now.Year.ToString + DdlEjercicio.SelectedValue = NowADS().Year.ToString Anos = 0 'Normal TotalActual = 0 TotalAnterior = 0 - DdlPeriodo.SelectedValue = Now.Month.ToString + DdlPeriodo.SelectedValue = NowADS().Month.ToString TabContainer_ActiveTabChanged(TabContainer, EventArgs.Empty) Else @@ -774,7 +774,7 @@ Partial Class Contabilidad_RepEstadoResultadosPorSegmento LblTituloAniosRango.Text = $"{ UsuarioActual.Empresa.Empresa }" LblFechas.Text = $"{FechaInicio.ToString("dd/MMMM/yyyy")} al {FechaFin.ToString("dd/MMMM/yyyy")}" - LblFechaReporte.Text = Now.ToString("dd/MMMM/yyyy") + LblFechaReporte.Text = NowADS().ToString("dd/MMMM/yyyy") End Sub Protected Sub LnkDescarPersonalizados_Click(sender As Object, e As EventArgs) @@ -822,7 +822,7 @@ Partial Class Contabilidad_RepEstadoResultadosPorSegmento Next - excel.Save(Me.Response, $"RepEstadoResultadosPorSegmento_{Now.ToString("yyyyMMddhhmmss")}.xlsx") + excel.Save(Me.Response, $"RepEstadoResultadosPorSegmento_{NowADS().ToString("yyyyMMddhhmmss")}.xlsx") End Sub diff --git a/Contabilidad/RepEstadoResultadosProForma.aspx.vb b/Contabilidad/RepEstadoResultadosProForma.aspx.vb index 8e381affe..6e4bbf687 100644 --- a/Contabilidad/RepEstadoResultadosProForma.aspx.vb +++ b/Contabilidad/RepEstadoResultadosProForma.aspx.vb @@ -54,15 +54,15 @@ Partial Class Contabilidad_RepEstadoResultadosProForma ObjConta.Dispose() - GvDatos.Columns(1).HeaderText = (Year(Date.Now) - 1).ToString - GvDatos.Columns(3).HeaderText = (Year(Date.Now) + 0).ToString - GvDatos.Columns(5).HeaderText = (Year(Date.Now) + 0).ToString - GvDatos.Columns(7).HeaderText = (Year(Date.Now) + 0).ToString - GvDatos.Columns(9).HeaderText = (Year(Date.Now) + 1).ToString - GvDatos.Columns(11).HeaderText = (Year(Date.Now) + 2).ToString - GvDatos.Columns(13).HeaderText = (Year(Date.Now) + 3).ToString + GvDatos.Columns(1).HeaderText = (Year(NowADS()) - 1).ToString + GvDatos.Columns(3).HeaderText = (Year(NowADS()) + 0).ToString + GvDatos.Columns(5).HeaderText = (Year(NowADS()) + 0).ToString + GvDatos.Columns(7).HeaderText = (Year(NowADS()) + 0).ToString + GvDatos.Columns(9).HeaderText = (Year(NowADS()) + 1).ToString + GvDatos.Columns(11).HeaderText = (Year(NowADS()) + 2).ToString + GvDatos.Columns(13).HeaderText = (Year(NowADS()) + 3).ToString - 'Anos = (Year(Date.Now) - DdlEjercicio.SelectedValue.ToEntero) + 1 + 'Anos = (Year(NowADS()) - DdlEjercicio.SelectedValue.ToEntero) + 1 ''Esconde todo 'For index = 1 To 40 Step 2 diff --git a/Contabilidad/RepFlujoEfectivo.aspx.vb b/Contabilidad/RepFlujoEfectivo.aspx.vb index eaa2fd164..c5fd9648c 100644 --- a/Contabilidad/RepFlujoEfectivo.aspx.vb +++ b/Contabilidad/RepFlujoEfectivo.aspx.vb @@ -53,8 +53,8 @@ Partial Class Contabilidad_RepFlujoEfectivo If Not Page.IsPostBack Then - 'TxtFechaDel.Text = DateSerial(Year(Now), Month(Now), 1).ToShortDateString - TxtFechaAl.Text = Date.Now.ToShortDateString + 'TxtFechaDel.Text = DateSerial(Year(NowADS()), Month(NowADS()), 1).ToShortDateString + TxtFechaAl.Text = NowADS().ToShortDateString CargaDatos() @@ -68,8 +68,8 @@ Partial Class Contabilidad_RepFlujoEfectivo Private Sub CargaDatos() Dim ObjConta As New ClsContabilidad - 'Dim FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate) - Dim FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate) + 'Dim FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate) + Dim FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate) FechaAl = TxtFechaAl.Text diff --git a/Contabilidad/RepGastosCC.aspx.vb b/Contabilidad/RepGastosCC.aspx.vb index 4f668faae..553e99dab 100644 --- a/Contabilidad/RepGastosCC.aspx.vb +++ b/Contabilidad/RepGastosCC.aspx.vb @@ -23,8 +23,8 @@ Partial Class RepGastosCC If Not Page.IsPostBack Then - txtFechaI.Text = Now.FirstDayOfMonth.ToShortDateString() - txtFechaF.Text = Now.ToShortDateString + txtFechaI.Text = NowADS().FirstDayOfMonth.ToShortDateString() + txtFechaF.Text = NowADS().ToShortDateString OrdenaDatos() End If @@ -61,7 +61,7 @@ Partial Class RepGastosCC If e.Row.RowType = DataControlRowType.DataRow Then ' e.Row.FCLiteral("LtlFolio").Text = "" & e.Row.FCLiteral("LtlFolio").Text & "" - ' If e.Row.DBCampo("FechaVencimiento").ToDate < Now Then + ' If e.Row.DBCampo("FechaVencimiento").ToDate < NowADS() Then ' ' e.Row.Cells(2).CssClass = "danger" ' e.Row.Cells(2).ForeColor = Drawing.Color.Red ' End If @@ -126,14 +126,14 @@ Partial Class RepGastosCC ' params.Add(New ReportParameter("FechaInicio", FechaI)) ' params.Add(New ReportParameter("FechaFin", FechaF)) ' params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - ' params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + ' params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) ' params.Add(New ReportParameter("Filtros", StrFiltro.ToString)) ' If Imagen.Exists Then ' params.Add(New ReportParameter("LogoPath", $"file://{Imagen.FullName}")) ' Else ' params.Add(New ReportParameter("LogoPath", "")) ' End If - ' ImprimirPDF("Empresas/Grales/Formatos/RepRemisiones.rdlc", DtVentas, params, String.Format("ReporteRemisiones-{0}", Now.ToDateTime.ToShortDateString)) + ' ImprimirPDF("Empresas/Grales/Formatos/RepRemisiones.rdlc", DtVentas, params, String.Format("ReporteRemisiones-{0}", NowADS().ToDateTime.ToShortDateString)) ' Else ' Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia) ' End If @@ -148,7 +148,7 @@ Partial Class RepGastosCC Dim StrFiltro As New StringBuilder If txtFechaI.Text <> "" Then StrFiltro.AppendFormat(" Fecha Inicio: {0}", txtFechaI.Text) If txtFechaF.Text <> "" Then StrFiltro.AppendFormat(" Fecha Fin: {0}", txtFechaF.Text) - GvDatos.ExportToExcelG("ReporteGastos" & Now.ToShortDateString, "Gastos Acumulados", UsuarioActual, StrFiltro.ToString, 100, 200) + GvDatos.ExportToExcelG("ReporteGastos" & NowADS().ToShortDateString, "Gastos Acumulados", UsuarioActual, StrFiltro.ToString, 100, 200) End Sub ' Note, it is important to override the form verification in order to successfully call a GridView1.RenderControl method. Public Overrides Sub VerifyRenderingInServerForm(control As Control) diff --git a/Contabilidad/RepIEPS.aspx.vb b/Contabilidad/RepIEPS.aspx.vb index 8fa87384e..f86547faf 100644 --- a/Contabilidad/RepIEPS.aspx.vb +++ b/Contabilidad/RepIEPS.aspx.vb @@ -22,8 +22,8 @@ Partial Class Contabilidad_RepIEPS End If End Sub Private Sub CargaFechas() - txtFechaI.Text = $"01/{Now.Month}/{Now.Year}" - txtFechaF.Text = Now.ToString("dd/MM/yyyy") + txtFechaI.Text = $"01/{NowADS().Month}/{NowADS().Year}" + txtFechaF.Text = NowADS().ToString("dd/MM/yyyy") End Sub Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) @@ -128,7 +128,7 @@ Partial Class Contabilidad_RepIEPS Dim para As List(Of ReportParameter) = New List(Of ReportParameter)() para.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) para.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - para.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString())) + para.Add(New ReportParameter("FechaImpresion", NowADS().ToString())) para.Add(New ReportParameter("Filtros", $"Filtros: {FechaI}{FechaF}{TipoOperacion}{Modalidad}")) para.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) diff --git a/Contabilidad/RepIVA.aspx.cs b/Contabilidad/RepIVA.aspx.cs index 2cf5180da..7281c9988 100644 --- a/Contabilidad/RepIVA.aspx.cs +++ b/Contabilidad/RepIVA.aspx.cs @@ -63,7 +63,7 @@ public partial class Contabilidad_RepIVA : ClsPaginas { TipoCambio = 1; TCEspecifico = -1; - DateTime FF = DateTime.Now.AddMonths(-1); + DateTime FF = NowADS().AddMonths(-1); txtFechaI.Text = $"01/{FF.Month}/{FF.Year}"; txtFechaF.Text = FF.LastDayOfMonth().ToShortDateString(); @@ -284,7 +284,7 @@ public partial class Contabilidad_RepIVA : ClsPaginas if (TipoCambio == 3) { LiEspecifico.Visible = true; - TCEspecifico = get_GlobalTipoCambio(DateTime.Now).ToString().ToDouble(); + TCEspecifico = get_GlobalTipoCambio(NowADS()).ToString().ToDouble(); TxtEspecifico.Text = TCEspecifico.ToString(); } else diff --git a/Contabilidad/RepIVADiferencias.aspx.vb b/Contabilidad/RepIVADiferencias.aspx.vb index 22a9ee915..8bbbabb8a 100644 --- a/Contabilidad/RepIVADiferencias.aspx.vb +++ b/Contabilidad/RepIVADiferencias.aspx.vb @@ -60,9 +60,9 @@ Partial Class Contabilidad_RepIVADiferencias End Sub Private Sub CargaCombos() - DdlEjercicio.Items.Insert(0, Now.Year.ToString) - DdlEjercicio.Items.Insert(1, Now.AddYears(-1).Year.ToString) - DdlPeriodo.SelectedValue = Now.Month.ToString + DdlEjercicio.Items.Insert(0, NowADS().Year.ToString) + DdlEjercicio.Items.Insert(1, NowADS().AddYears(-1).Year.ToString) + DdlPeriodo.SelectedValue = NowADS().Month.ToString End Sub Private Sub CargaDatos() Dim ObjCont As New ClsContPAQi(UsuarioActual.Empresa) @@ -109,7 +109,7 @@ Partial Class Contabilidad_RepIVADiferencias params.Add(New ReportParameter("Ejercicio", Ejercicio.ToString)) params.Add(New ReportParameter("Periodo", Periodo)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario)) - params.Add(New ReportParameter("FechaImpresion", Now.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToShortDateString)) ImprimirPDF(reportpath, DtDatos, params, fileName, Formato) Else diff --git a/Contabilidad/RepMovimientosAuxiliaresCatalogo.aspx.vb b/Contabilidad/RepMovimientosAuxiliaresCatalogo.aspx.vb index e07f09135..66d1d0bfb 100644 --- a/Contabilidad/RepMovimientosAuxiliaresCatalogo.aspx.vb +++ b/Contabilidad/RepMovimientosAuxiliaresCatalogo.aspx.vb @@ -173,8 +173,8 @@ Partial Class AC_RepMovimientosAuxiliaresCatalogo Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) - FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate) - FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate) + FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate) + FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate) IdCuenta = If(DdlTipoCuentas.SelectedValue.ToEntero <> -2, DdlTipoCuentas.SelectedValue.ToEntero, HdnCveCuenta.Value.ToEntero) CargaDatos() @@ -393,8 +393,8 @@ Partial Class AC_RepMovimientosAuxiliaresCatalogo If DdlTipoCuentas.SelectedValue.ToEntero = -2 AndAlso TxtCuenta.Text.Trim = "" Then Alert("El campo Cuenta es obligatorio.", TipoMensaje.MsgError) Else - FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate) - FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate) + FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate) + FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate) IdCuenta = If(DdlTipoCuentas.SelectedValue.ToEntero <> -1, DdlTipoCuentas.SelectedValue.ToEntero, HdnCveCuenta.Value.ToEntero) 'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) diff --git a/Contabilidad/RepOrigenAplicacion.aspx.vb b/Contabilidad/RepOrigenAplicacion.aspx.vb index f3ffed8e0..d52d018a1 100644 --- a/Contabilidad/RepOrigenAplicacion.aspx.vb +++ b/Contabilidad/RepOrigenAplicacion.aspx.vb @@ -72,12 +72,12 @@ Partial Class Contabilidad_RepOrigenAplicacion End If 'Normal - TxtFechaDel.Text = DateSerial(Year(Now), Month(Now), 1).ToShortDateString - TxtFechaAl.Text = Date.Now.ToShortDateString + TxtFechaDel.Text = DateSerial(Year(NowADS()), Month(NowADS()), 1).ToShortDateString + TxtFechaAl.Text = NowADS().ToShortDateString 'Anual Anos = 0 - DdlEjercicio.SelectedValue = Now.Year.ToString + DdlEjercicio.SelectedValue = NowADS().Year.ToString TabContainer_ActiveTabChanged(TabContainer, EventArgs.Empty) @@ -190,8 +190,8 @@ Partial Class Contabilidad_RepOrigenAplicacion Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) - Dim FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate) - Dim FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate) + Dim FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate) + Dim FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate) If ObjConta.GetOrigenAplicacion(FechaInicio, FechaFin) Then DtDatos = ObjConta.DtResultados @@ -382,7 +382,7 @@ Partial Class Contabilidad_RepOrigenAplicacion End If ObjConta.Dispose() - Anos = (Year(Date.Now) - DdlEjercicio.SelectedValue.ToEntero) + 1 + Anos = (Year(NowADS()) - DdlEjercicio.SelectedValue.ToEntero) + 1 If DtDatosAnual IsNot Nothing Then CargaGridAnual() diff --git a/Contabilidad/RepOrigenAplicacionAnual.aspx.vb b/Contabilidad/RepOrigenAplicacionAnual.aspx.vb index 6729d29d4..7e3d6a506 100644 --- a/Contabilidad/RepOrigenAplicacionAnual.aspx.vb +++ b/Contabilidad/RepOrigenAplicacionAnual.aspx.vb @@ -41,7 +41,7 @@ Partial Class Contabilidad_RepOrigenAplicacionAnual TipoReporte = -1 Anos = 0 - DdlEjercicio.SelectedValue = Now.Year.ToString + DdlEjercicio.SelectedValue = NowADS().Year.ToString CargaDatos() End If @@ -60,7 +60,7 @@ Partial Class Contabilidad_RepOrigenAplicacionAnual End If ObjConta.Dispose() - Anos = (Year(Date.Now) - DdlEjercicio.SelectedValue.ToEntero) + 1 + Anos = (Year(NowADS()) - DdlEjercicio.SelectedValue.ToEntero) + 1 If DtDatos IsNot Nothing Then CargaGrid() diff --git a/Contabilidad/RepOrigenAplicacionMensual.aspx.vb b/Contabilidad/RepOrigenAplicacionMensual.aspx.vb index 06521fd2b..d0c515d9c 100644 --- a/Contabilidad/RepOrigenAplicacionMensual.aspx.vb +++ b/Contabilidad/RepOrigenAplicacionMensual.aspx.vb @@ -32,7 +32,7 @@ Partial Class Contabilidad_RepOrigenAplicacionMensual If Not Page.IsPostBack Then TipoReporte = -1 - DdlEjercicio.SelectedValue = Now.Year.ToString + DdlEjercicio.SelectedValue = NowADS().Year.ToString CargaDatos() End If diff --git a/Contabilidad/RepPolizasCuadre.aspx.vb b/Contabilidad/RepPolizasCuadre.aspx.vb index 5f8e52790..74f15c79d 100644 --- a/Contabilidad/RepPolizasCuadre.aspx.vb +++ b/Contabilidad/RepPolizasCuadre.aspx.vb @@ -93,9 +93,9 @@ Partial Class Contabilidad_RepPolizasCuadre Clsconta.Dispose() DdlEjercicio.DataBind() - DdlEjercicio.SelectedValue = Now.Year.ToString + DdlEjercicio.SelectedValue = NowADS().Year.ToString - DdlPeriodo.SelectedValue = Now.Month.ToString + DdlPeriodo.SelectedValue = NowADS().Month.ToString End Sub diff --git a/Contabilidad2/CatContaEjercicios.aspx.vb b/Contabilidad2/CatContaEjercicios.aspx.vb index 2cee4cf42..59ebeb39c 100644 --- a/Contabilidad2/CatContaEjercicios.aspx.vb +++ b/Contabilidad2/CatContaEjercicios.aspx.vb @@ -129,8 +129,8 @@ Partial Class Contabilidad2_CatContaEjercicios Protected Sub LbGenerarPoliza_Click(sender As Object, e As EventArgs) Handles LbGenerarPoliza.Click Dim ObjConta As New ClsContabilidad - Dim FechaI As String = $"01/01/{DateTime.Now.Year}" - Dim FechaF As String = $"{DateTime.DaysInMonth(DateTime.Now.Year, 12)}/12/{DateTime.Now.Year}" + Dim FechaI As String = $"01/01/{NowADS().Year}" + Dim FechaF As String = $"{DateTime.DaysInMonth(NowADS().Year, 12)}/12/{NowADS().Year}" Dim CvePrePolizaCierre As Integer = -1 CvePrePolizaCierre = ObjConta.CierreEjercicio(UsuarioActual.CveEmpresa, Ejercicio, DdlCuentas.SelectedValue.ToEntero, FechaI, FechaF, UsuarioActual.CvePersonal) If CvePrePolizaCierre > 0 Then diff --git a/Contabilidad2/MovimientosconProveedores.aspx.vb b/Contabilidad2/MovimientosconProveedores.aspx.vb index a54167118..b68002ad5 100644 --- a/Contabilidad2/MovimientosconProveedores.aspx.vb +++ b/Contabilidad2/MovimientosconProveedores.aspx.vb @@ -77,8 +77,8 @@ Partial Class MovimientosconProveedores DtDatos = Nothing CargaTipoCuentas() - FechaInicio = DateSerial(Year(Now), Month(Now), 1) - FechaFin = Date.Now + FechaInicio = DateSerial(Year(NowADS()), Month(NowADS()), 1) + FechaFin = NowADS() 'If UsuarioActual.Empresa.UsaAC Then ' TipoReporte = -1 @@ -288,8 +288,8 @@ Partial Class MovimientosconProveedores If DdlTipoCuentas.SelectedValue.ToEntero = -2 AndAlso TxtCuenta.Text.Trim = "" Then Alert("El campo Cuenta es obligatorio.", TipoMensaje.MsgError) Else - FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate) - FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate) + FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate) + FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate) IdCuenta = If(DdlTipoCuentas.SelectedValue.ToEntero = -2, HdnCveCuenta.Value.ToEntero, DdlTipoCuentas.SelectedValue.ToEntero) CargaDatos() diff --git a/Contabilidad2/RepAnexoCatalogo.aspx.vb b/Contabilidad2/RepAnexoCatalogo.aspx.vb index 3267b6c7d..0a1b31544 100644 --- a/Contabilidad2/RepAnexoCatalogo.aspx.vb +++ b/Contabilidad2/RepAnexoCatalogo.aspx.vb @@ -90,8 +90,8 @@ Partial Class AC2_RepAnexoCatalogo DtDatos = Nothing CargaTipoCuentas() - FechaInicio = Now.FirstDayOfMonth - FechaFin = Date.Now + FechaInicio = NowADS().FirstDayOfMonth + FechaFin = NowADS() 'If UsuarioActual.Empresa.UsaAC Then ' TipoReporte = -1 @@ -289,7 +289,7 @@ Partial Class AC2_RepAnexoCatalogo Protected Sub LnkExcel_Click(sender As Object, e As EventArgs) Handles LnkExcel.Click If Not IsNothing(DtDatos) Then ImprimirReporte("Excel") - 'GvDatos.ExportToExcelG("AnexoCatalogo" & Now.ToShortDateString & ".xlsx") + 'GvDatos.ExportToExcelG("AnexoCatalogo" & NowADS().ToShortDateString & ".xlsx") 'GvDatos.ExportToExcelG("ExistenciasHorizontal.xlsx", "Anexo Catalogo", UsuarioActual, "".ToString, 100, 200) End If End Sub @@ -315,8 +315,8 @@ Partial Class AC2_RepAnexoCatalogo If DdlCuentas.SelectedValue.ToEntero = -1 Then Alert("El campo Cuenta es obligatorio.", TipoMensaje.MsgError) Else - FechaInicio = If(txtFechaI.Text = "" Or txtFechaI.Text = "__/__/____", Date.Now, txtFechaI.Text.ToDate) - FechaFin = If(txtFechaF.Text = "" Or txtFechaF.Text = "__/__/____", Date.Now, txtFechaF.Text.ToDate) + FechaInicio = If(txtFechaI.Text = "" Or txtFechaI.Text = "__/__/____", NowADS(), txtFechaI.Text.ToDate) + FechaFin = If(txtFechaF.Text = "" Or txtFechaF.Text = "__/__/____", NowADS(), txtFechaF.Text.ToDate) IdCuenta = DdlCuentas.SelectedValue.ToEntero CargaDatos() End If diff --git a/Contabilidad2/RepAnexoCatalogoCC.aspx.vb b/Contabilidad2/RepAnexoCatalogoCC.aspx.vb index acd3de93f..e11533f3b 100644 --- a/Contabilidad2/RepAnexoCatalogoCC.aspx.vb +++ b/Contabilidad2/RepAnexoCatalogoCC.aspx.vb @@ -115,8 +115,8 @@ Partial Class Contabilidad2_RepAnexoCatalogoCC #Region " INICIALIZA VALORES " Private Sub InicializaValores() CargaCombos() - txtFechaI.Text = Now.FirstDayOfMonth.ToShortDateString - txtFechaF.Text = Now.LastDayOfMonth.ToShortDateString + txtFechaI.Text = NowADS().FirstDayOfMonth.ToShortDateString + txtFechaF.Text = NowADS().LastDayOfMonth.ToShortDateString End Sub Private Sub CargaCombos() diff --git a/Contabilidad2/RepAnexoCatalogoMensual.aspx.vb b/Contabilidad2/RepAnexoCatalogoMensual.aspx.vb index ae4657321..5d6558f86 100644 --- a/Contabilidad2/RepAnexoCatalogoMensual.aspx.vb +++ b/Contabilidad2/RepAnexoCatalogoMensual.aspx.vb @@ -113,7 +113,7 @@ Partial Class Contabilidad2_RepAnexoCatalogoMensual DdlCuentas.DataBind() DdlEjercicio.DataBind() - DdlEjercicio.SelectedValueExist(Now.Year.ToString) + DdlEjercicio.SelectedValueExist(NowADS().Year.ToString) CargarCentrosDeCosto(DdlProyecto, DdlSubproyecto, LblProyecto, LblSubProyecto, divProyecto:=DivProyecto) diff --git a/Contabilidad2/RepAnexoCatalogoMensualHorizontal.aspx.vb b/Contabilidad2/RepAnexoCatalogoMensualHorizontal.aspx.vb index 679c87fc5..856c8d68f 100644 --- a/Contabilidad2/RepAnexoCatalogoMensualHorizontal.aspx.vb +++ b/Contabilidad2/RepAnexoCatalogoMensualHorizontal.aspx.vb @@ -77,8 +77,8 @@ Partial Class Contabilidad_RepAnexoCatalogoMensualHorizontal DtDatos = Nothing CargaTipoCuentas() - FechaInicio = Now.FirstDayOfMonth - FechaFin = Date.Now + FechaInicio = NowADS().FirstDayOfMonth + FechaFin = NowADS() 'If UsuarioActual.Empresa.UsaAC Then ' TipoReporte = -1 @@ -279,7 +279,7 @@ Partial Class Contabilidad_RepAnexoCatalogoMensualHorizontal 'Protected Sub LnkExcel_Click(sender As Object, e As EventArgs) Handles LnkExcel.Click ' If Not IsNothing(DtDatos) Then ' ImprimirReporte("Excel") - ' 'GvDatos.ExportToExcelG("AnexoCatalogo" & Now.ToShortDateString & ".xlsx") + ' 'GvDatos.ExportToExcelG("AnexoCatalogo" & NowADS().ToShortDateString & ".xlsx") ' 'GvDatos.ExportToExcelG("ExistenciasHorizontal.xlsx", "Anexo Catalogo", UsuarioActual, "".ToString, 100, 200) ' End If 'End Sub @@ -305,8 +305,8 @@ Partial Class Contabilidad_RepAnexoCatalogoMensualHorizontal If DdlTipoCuentas.SelectedValue.ToEntero = -2 AndAlso DdlCuentas.SelectedValue.ToEntero = -1 Then Alert("El campo Cuenta es obligatorio.", TipoMensaje.MsgError) Else - FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate) - FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate) + FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate) + FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate) IdCuenta = If(DdlTipoCuentas.SelectedValue.ToEntero = -2, DdlCuentas.SelectedValue.ToEntero, DdlTipoCuentas.SelectedValue.ToEntero) CargaDatos() diff --git a/Contabilidad2/RepAnexoCatalogoSAT.aspx.vb.exclude b/Contabilidad2/RepAnexoCatalogoSAT.aspx.vb.exclude index ec0ceb8dc..08ec57651 100644 --- a/Contabilidad2/RepAnexoCatalogoSAT.aspx.vb.exclude +++ b/Contabilidad2/RepAnexoCatalogoSAT.aspx.vb.exclude @@ -77,8 +77,8 @@ Partial Class FinanzasSAT_RepAnexoCatalogo DtDatos = Nothing CargaTipoCuentas() - FechaInicio = DateSerial(Year(Now), Month(Now), 1) - FechaFin = Date.Now + FechaInicio = DateSerial(Year(NowADS()), Month(NowADS()), 1) + FechaFin = NowADS() 'If UsuarioActual.Empresa.UsaAC Then ' TipoReporte = -1 @@ -288,8 +288,8 @@ Partial Class FinanzasSAT_RepAnexoCatalogo If DdlTipoCuentas.SelectedValue.ToEntero = -2 AndAlso TxtCuenta.Text.Trim = "" Then Alert("El campo Cuenta es obligatorio.", TipoMensaje.MsgError) Else - FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate) - FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate) + FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate) + FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate) IdCuenta = If(DdlTipoCuentas.SelectedValue.ToEntero = -2, HdnCveCuenta.Value.ToEntero, DdlTipoCuentas.SelectedValue.ToEntero) CargaDatos() diff --git a/Contabilidad2/RepAnexoCatalogoVertical.aspx.vb b/Contabilidad2/RepAnexoCatalogoVertical.aspx.vb index 3c863a3dd..0d54bd46a 100644 --- a/Contabilidad2/RepAnexoCatalogoVertical.aspx.vb +++ b/Contabilidad2/RepAnexoCatalogoVertical.aspx.vb @@ -53,7 +53,7 @@ Partial Class Contabilidad2_RepAnexoCatalogoVertical Conta.Dispose() DdlEjercicio.DataBind() - DdlEjercicio.SelectedValueExist(Now.Year.ToString) + DdlEjercicio.SelectedValueExist(NowADS().Year.ToString) DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa) DdlSubProyecto.DataBind() @@ -71,7 +71,7 @@ Partial Class Contabilidad2_RepAnexoCatalogoVertical Private Sub CargaDatos() Dim Conta As New ClsContabilidad - If Conta.GetAnexoCatalagoCC(CveCuenta, Now, Now, DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, 1, UsuarioActual.CveUsuario) Then + If Conta.GetAnexoCatalagoCC(CveCuenta, NowADS(), NowADS(), DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, 1, UsuarioActual.CveUsuario) Then Dim DtHeaders As DataTable = Conta.DSResultados.Tables(0) GvCC.DataSource = Conta.DSResultados.Tables(1) diff --git a/Contabilidad2/RepBalanceGeneral.aspx.vb.exclude b/Contabilidad2/RepBalanceGeneral.aspx.vb.exclude index 02759e36a..45a0fcf15 100644 --- a/Contabilidad2/RepBalanceGeneral.aspx.vb.exclude +++ b/Contabilidad2/RepBalanceGeneral.aspx.vb.exclude @@ -208,7 +208,7 @@ Partial Class Contabilidad2_RepBalanceGeneral CargaDatosGenerales() - DdlEjercicio.SelectedValue = Now.Year.ToString + DdlEjercicio.SelectedValue = NowADS().Year.ToString 'Anual Anos = 0 @@ -254,7 +254,7 @@ Partial Class Contabilidad2_RepBalanceGeneral Private Sub CargaDatos() 'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) - Dim Anio As String = If(DdlEjercicio.SelectedValue <> "", DdlEjercicio.SelectedValue, Now.Year.ToString) + Dim Anio As String = If(DdlEjercicio.SelectedValue <> "", DdlEjercicio.SelectedValue, NowADS().Year.ToString) Dim ObjConta As New ClsContabilidad Dim FechaI = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, "0"c), Anio) Dim FechaF = DateAdd(DateInterval.Day, -1, DateAdd(DateInterval.Month, 1, CDate(FechaI))).ToString("dd/MM/yyyy") @@ -749,7 +749,7 @@ Partial Class Contabilidad2_RepBalanceGeneral End If ObjConta.Dispose() - Anos = (Year(Date.Now) - DdlEjercicio.SelectedValue.ToEntero) + 1 + Anos = (Year(NowADS()) - DdlEjercicio.SelectedValue.ToEntero) + 1 'Esconde todo 'For index = 1 To 20 diff --git a/Contabilidad2/RepBalanceGeneralHorizontal.aspx.vb b/Contabilidad2/RepBalanceGeneralHorizontal.aspx.vb index 9f6ccba22..ff4e3a003 100644 --- a/Contabilidad2/RepBalanceGeneralHorizontal.aspx.vb +++ b/Contabilidad2/RepBalanceGeneralHorizontal.aspx.vb @@ -408,13 +408,13 @@ Partial Class Contabilidad_RepBalanceGeneralHorizontal Clsconta.Dispose() DdlEjercicio.DataBind() - DdlEjercicio.SelectedValue = Now.Year.ToString + DdlEjercicio.SelectedValue = NowADS().Year.ToString 'DdlEjercicio.SelectedValueExist(UsuarioActual.Empresa.EjercicioActual.ToString) - DdlPeriodo.SelectedValue = Now.Month.ToString + DdlPeriodo.SelectedValue = NowADS().Month.ToString End Sub diff --git a/Contabilidad2/RepBalanceGeneralVertical.aspx.vb b/Contabilidad2/RepBalanceGeneralVertical.aspx.vb index 4eef352d3..3d5d736f5 100644 --- a/Contabilidad2/RepBalanceGeneralVertical.aspx.vb +++ b/Contabilidad2/RepBalanceGeneralVertical.aspx.vb @@ -18,7 +18,7 @@ Partial Class Contabilidad_RepBalanceGeneralVertical Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not IsPostBack Then - DdlEjercicio.SelectedValueExist(Now.Year.ToString) + DdlEjercicio.SelectedValueExist(NowADS().Year.ToString) InicializaValores() End If End Sub @@ -42,14 +42,14 @@ Partial Class Contabilidad_RepBalanceGeneralVertical Conta.Dispose() DdlEjercicio.DataBind() - DdlEjercicio.SelectedValueExist(Now.Year.ToString) + DdlEjercicio.SelectedValueExist(NowADS().Year.ToString) DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa) DdlSubProyecto.DataBind() DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1")) DdlSubProyecto.SelectedValue = "-1" - DdlPeriodo.SelectedValue = Now.Month.ToString + DdlPeriodo.SelectedValue = NowADS().Month.ToString End Sub #End Region diff --git a/Contabilidad2/RepBalanzaComprobacion.aspx.vb b/Contabilidad2/RepBalanzaComprobacion.aspx.vb index 20c0bced9..76372a053 100644 --- a/Contabilidad2/RepBalanzaComprobacion.aspx.vb +++ b/Contabilidad2/RepBalanzaComprobacion.aspx.vb @@ -82,8 +82,8 @@ Partial Class Contabilidad2_RepBalanzaComprobacion Dim ErrorParametros = True ModoImpresion = False - TxtFechaDel.Text = DateSerial(Year(Now), Month(Now), 1).ToShortDateString - TxtFechaAl.Text = Date.Now.ToShortDateString + TxtFechaDel.Text = DateSerial(Year(NowADS()), Month(NowADS()), 1).ToShortDateString + TxtFechaAl.Text = NowADS().ToShortDateString If Request("CveCuenta") IsNot Nothing AndAlso IsNumeric(Request("CveCuenta")) AndAlso Request("CveCuenta").ToEntero > 0 Then @@ -144,8 +144,8 @@ Partial Class Contabilidad2_RepBalanzaComprobacion Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) - FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate) - FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate) + FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate) + FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate) CargaDatos() diff --git a/Contabilidad2/RepBalanzaComprobacionSAT.aspx.vb.exclude b/Contabilidad2/RepBalanzaComprobacionSAT.aspx.vb.exclude index 09c7a34ef..4888f50af 100644 --- a/Contabilidad2/RepBalanzaComprobacionSAT.aspx.vb.exclude +++ b/Contabilidad2/RepBalanzaComprobacionSAT.aspx.vb.exclude @@ -59,8 +59,8 @@ Partial Class Contabilidad2_RepBalanzaComprobacion If Not Page.IsPostBack Then Dim ErrorParametros = True ModoImpresion = False - TxtFechaDel.Text = DateSerial(Year(Now), Month(Now), 1).ToShortDateString - TxtFechaAl.Text = Date.Now.ToShortDateString + TxtFechaDel.Text = DateSerial(Year(NowADS()), Month(NowADS()), 1).ToShortDateString + TxtFechaAl.Text = NowADS().ToShortDateString If Request("CveCuenta") IsNot Nothing AndAlso IsNumeric(Request("CveCuenta")) AndAlso Request("CveCuenta").ToEntero > 0 Then @@ -116,8 +116,8 @@ Partial Class Contabilidad2_RepBalanzaComprobacion Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) - FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate) - FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate) + FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate) + FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate) CargaDatos() diff --git a/Contabilidad2/RepCambiosSituacionFinanciera.aspx.vb b/Contabilidad2/RepCambiosSituacionFinanciera.aspx.vb index 49470a8f0..227457d64 100644 --- a/Contabilidad2/RepCambiosSituacionFinanciera.aspx.vb +++ b/Contabilidad2/RepCambiosSituacionFinanciera.aspx.vb @@ -125,8 +125,8 @@ Partial Class AC2_RepCambiosSituacionFinanciera Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load If Not Page.IsPostBack Then - 'TxtFechaDel.Text = DateSerial(Year(Now), Month(Now), 1).ToShortDateString - 'TxtFechaAl.Text = Date.Now.ToShortDateString + 'TxtFechaDel.Text = DateSerial(Year(NowADS()), Month(NowADS()), 1).ToShortDateString + 'TxtFechaAl.Text = NowADS().ToShortDateString Dim Clsconta As New ClsContabilidad DdlSubproyecto.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, -1) @@ -140,7 +140,7 @@ Partial Class AC2_RepCambiosSituacionFinanciera Clsconta.Dispose() DdlEjercicio.DataBind() - DdlEjercicio.SelectedValue = Now.Year.ToString + DdlEjercicio.SelectedValue = NowADS().Year.ToString CargaDatos() diff --git a/Contabilidad2/RepEstadoActividades.aspx.vb b/Contabilidad2/RepEstadoActividades.aspx.vb index 9aab64b5f..4a318ffb0 100644 --- a/Contabilidad2/RepEstadoActividades.aspx.vb +++ b/Contabilidad2/RepEstadoActividades.aspx.vb @@ -93,8 +93,8 @@ Partial Class AC_RepEstadoActividades TotalActual = 0 TotalAnterior = 0 - 'TxtFechaInicio.Text = DateSerial(Year(Date.Now), 1, 1).ToShortDateString - 'TxtFechaFin.Text = Date.Now.ToShortDateString + 'TxtFechaInicio.Text = DateSerial(Year(NowADS()), 1, 1).ToShortDateString + 'TxtFechaFin.Text = NowADS().ToShortDateString CargaEjercicios() CargaDatos() @@ -127,9 +127,9 @@ Partial Class AC_RepEstadoActividades DdlEjercicio.SelectedValueExist(UsuarioActual.Empresa.EjercicioActual.ToString) If DdlEjercicio.Items.Count = 0 Then - DdlEjercicio.Items.Add(New ListItem(Now.Year.ToString, Now.Year.ToString)) + DdlEjercicio.Items.Add(New ListItem(NowADS().Year.ToString, NowADS().Year.ToString)) End If - DdlPeriodo.SelectedValue = Now.Month.ToString + DdlPeriodo.SelectedValue = NowADS().Month.ToString CargarCentrosDeCosto(DdlProyecto, DdlSubproyecto, LblProyecto, LblSubProyecto, divProyecto:=DivProyecto) diff --git a/Contabilidad2/RepEstadoActividadesSAT.aspx.vb.exclude b/Contabilidad2/RepEstadoActividadesSAT.aspx.vb.exclude index 3300292c2..801a9890c 100644 --- a/Contabilidad2/RepEstadoActividadesSAT.aspx.vb.exclude +++ b/Contabilidad2/RepEstadoActividadesSAT.aspx.vb.exclude @@ -92,8 +92,8 @@ Partial Class AC_RepEstadoActividades TotalActual = 0 TotalAnterior = 0 - 'TxtFechaInicio.Text = DateSerial(Year(Date.Now), 1, 1).ToShortDateString - 'TxtFechaFin.Text = Date.Now.ToShortDateString + 'TxtFechaInicio.Text = DateSerial(Year(NowADS()), 1, 1).ToShortDateString + 'TxtFechaFin.Text = NowADS().ToShortDateString CargaEjercicios() CargaDatos() @@ -112,7 +112,7 @@ Partial Class AC_RepEstadoActividades DdlEjercicio.DataBind() DdlEjercicio.SelectedValueExist(UsuarioActual.Empresa.EjercicioActual.ToString) - DdlPeriodo.SelectedValue = Now.Month.ToString + DdlPeriodo.SelectedValue = NowADS().Month.ToString End Sub Private Sub CargaDatos() diff --git a/Contabilidad2/RepEstadoResultados.aspx.vb b/Contabilidad2/RepEstadoResultados.aspx.vb index 03ad46471..8f64e7627 100644 --- a/Contabilidad2/RepEstadoResultados.aspx.vb +++ b/Contabilidad2/RepEstadoResultados.aspx.vb @@ -137,14 +137,14 @@ Partial Class Contabilidad2_RepEstadoResultados CargaDatosGenerales() - DdlEjercicio.SelectedValue = Now.Year.ToString + DdlEjercicio.SelectedValue = NowADS().Year.ToString Anos = 0 'Normal TotalActual = 0 TotalAnterior = 0 - DdlPeriodo.SelectedValue = Now.Month.ToString + DdlPeriodo.SelectedValue = NowADS().Month.ToString TabContainer_ActiveTabChanged(TabContainer, EventArgs.Empty) End If @@ -535,7 +535,7 @@ Partial Class Contabilidad2_RepEstadoResultados End If ObjConta.Dispose() - Anos = (Year(Date.Now) - DdlEjercicio.SelectedValue.ToEntero) + 1 + Anos = (Year(NowADS()) - DdlEjercicio.SelectedValue.ToEntero) + 1 'Esconde todo For index = 1 To 40 Step 2 diff --git a/Contabilidad2/RepEstadoResultadosHorizontal.aspx b/Contabilidad2/RepEstadoResultadosHorizontal.aspx index 5f9404414..83ea70d21 100644 --- a/Contabilidad2/RepEstadoResultadosHorizontal.aspx +++ b/Contabilidad2/RepEstadoResultadosHorizontal.aspx @@ -110,7 +110,8 @@
    -
    +
    +
    @@ -144,8 +145,19 @@ + Vista Porcentaje: +
    + + Horizontal + Vertical + +
    + + + + @@ -182,7 +194,7 @@ - + <%-- --%> @@ -190,7 +202,7 @@ - + <%-- --%> diff --git a/Contabilidad2/RepEstadoResultadosHorizontal.aspx.vb b/Contabilidad2/RepEstadoResultadosHorizontal.aspx.vb index 871e030c1..b1c8f07be 100644 --- a/Contabilidad2/RepEstadoResultadosHorizontal.aspx.vb +++ b/Contabilidad2/RepEstadoResultadosHorizontal.aspx.vb @@ -367,7 +367,10 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal Protected Sub Tab_ActiveTabChanged(sender As Object, e As EventArgs) - If TAB.ActiveTabIndex = 0 Then + LblVistaPorcentaje.Visible = False + DVVistaPorcentaje.Visible = False + + If Tab.ActiveTabIndex = 0 Then 'LiSubProyectoDdl.Visible = True 'LiSubProyectoLbl.Visible = True @@ -387,7 +390,7 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal DVTri.Visible = False End If - If TAB.ActiveTabIndex = 1 Then + If Tab.ActiveTabIndex = 1 Then 'LiSubProyectoDdl.Visible = True 'LiSubProyectoLbl.Visible = True @@ -409,12 +412,13 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal LblTri.Visible = True DVTri.Visible = True - + LblVistaPorcentaje.Visible = True + DVVistaPorcentaje.Visible = True End If - If TAB.ActiveTabIndex = 2 Then + If Tab.ActiveTabIndex = 2 Then ValidaEjercicios() @@ -438,9 +442,12 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal DdlPeriodo.SelectedValueExist(12) + LblVistaPorcentaje.Visible = True + DVVistaPorcentaje.Visible = True + End If - If TAB.ActiveTabIndex = 3 Then + If Tab.ActiveTabIndex = 3 Then 'LiSubProyectoDdl.Visible = True 'LiSubProyectoLbl.Visible = True @@ -462,6 +469,9 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal LiPeriodoLbl.Visible = True DdlPeriodo.SelectedValueExist(12) + LblVistaPorcentaje.Visible = True + DVVistaPorcentaje.Visible = True + End If UpFiltros.Update() @@ -516,9 +526,9 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal DdlEjercicio.SelectedValueExist(UsuarioActual.Empresa.EjercicioActual.ToString) If DdlEjercicio.Items.Count = 0 Then - DdlEjercicio.Items.Add(New ListItem(Now.Year.ToString, Now.Year.ToString)) + DdlEjercicio.Items.Add(New ListItem(NowADS().Year.ToString, NowADS().Year.ToString)) End If - DdlPeriodo.SelectedValue = Now.Month.ToString + DdlPeriodo.SelectedValue = NowADS().Month.ToString End Sub Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) @@ -526,17 +536,17 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal TotalAnteriorMes = 0 'Mes - If TAB.ActiveTabIndex = 0 Then + If Tab.ActiveTabIndex = 0 Then CargaDatosMes() End If 'MES HORIZONTAL - If TAB.ActiveTabIndex = 1 Then + If Tab.ActiveTabIndex = 1 Then CargaDatosMesH() End If 'AÑO HORIZONTAL - If TAB.ActiveTabIndex = 2 Then + If Tab.ActiveTabIndex = 2 Then If DdlEjercicio.SelectedValue.ToEntero > DdlEjercicio2.SelectedValue.ToEntero Then Alert("El ejercicio inicio no debe ser mayor al ejercicio fin.", TipoMensaje.MsgAdvertencia) @@ -546,7 +556,7 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal End If 'SUBPROYECTO - If TAB.ActiveTabIndex = 3 Then + If Tab.ActiveTabIndex = 3 Then CargaDatosSubProyectoH() End If @@ -596,9 +606,9 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal Next Row.Item("Nombre") = "TOTAL INGRESOS " - Row.Item("ImporteActual") = TotalActual.ToString + Row.Item("ImporteActual") = TotalActual Row.Item("PorcentajeActual") = "100.00" - Row.Item("ImporteAcumulado") = TotalAnterior.ToString + Row.Item("ImporteAcumulado") = TotalAnterior Row.Item("PorcentajeAcumulado") = "100.00" Row.Item("CtaMayor") = -1 DtIngresosMes.Rows.Add(Row) @@ -773,7 +783,7 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal 'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) Dim ObjConta As New ClsContabilidad - If ObjConta.GetEstadosMensualHorizontal(FechaIMes.ToDate, FechaFMes.ToDate, CveProyecto, CveSubProyecto, DdlDivisor.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then + If ObjConta.GetEstadosMensualHorizontal(FechaIMes.ToDate, FechaFMes.ToDate, CveProyecto, CveSubProyecto, DdlDivisor.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, VistaPorcentaje:=DdlvistaPorcentaje.SelectedValue.ToEntero) Then DtDatosMesH = ObjConta.DtResultados.FiltraParametros("(ImporteActual <> 0 OR ImporteAcumulado <> 0)") Else DtDatosMesH = Nothing @@ -847,25 +857,27 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal Row.Item("Cua2") = Cua2 Row.Item("Cua3") = Cua3 - Row.Item("PorcentajeEnero") = If(Enero <> 0, Enero * 100 / TotalAnterior, 0) - Row.Item("PorcentajeFebrero") = If(Febrero <> 0, Febrero * 100 / TotalAnterior, 0) - Row.Item("PorcentajeMarzo") = If(Marzo <> 0, Marzo * 100 / TotalAnterior, 0) - Row.Item("PorcentajeAbril") = If(Abril <> 0, Abril * 100 / TotalAnterior, 0) - Row.Item("PorcentajeMayo") = If(Mayo <> 0, Mayo * 100 / TotalAnterior, 0) - Row.Item("PorcentajeJunio") = If(Junio <> 0, Junio * 100 / TotalAnterior, 0) - Row.Item("PorcentajeJulio") = If(Julio <> 0, Julio * 100 / TotalAnterior, 0) - Row.Item("PorcentajeAgosto") = If(Agosto <> 0, Agosto * 100 / TotalAnterior, 0) - Row.Item("PorcentajeSeptiembre") = If(Septiembre <> 0, Septiembre * 100 / TotalAnterior, 0) - Row.Item("PorcentajeOctubre") = If(Octubre <> 0, Octubre * 100 / TotalAnterior, 0) - Row.Item("PorcentajeNoviembre") = If(Noviembre <> 0, Noviembre * 100 / TotalAnterior, 0) - Row.Item("PorcentajeDiciembre") = If(Diciembre <> 0, Diciembre * 100 / TotalAnterior, 0) - Row.Item("PorcentajeTri1") = If(Tri1 <> 0, Tri1 * 100 / TotalAnterior, 0) - Row.Item("PorcentajeTri2") = If(Tri2 <> 0, Tri2 * 100 / TotalAnterior, 0) - Row.Item("PorcentajeTri3") = If(Tri3 <> 0, Tri3 * 100 / TotalAnterior, 0) - Row.Item("PorcentajeTri4") = If(Tri4 <> 0, Tri4 * 100 / TotalAnterior, 0) - Row.Item("PorcentajeCua1") = If(Cua1 <> 0, Cua1 * 100 / TotalAnterior, 0) - Row.Item("PorcentajeCua2") = If(Cua2 <> 0, Cua2 * 100 / TotalAnterior, 0) - Row.Item("PorcentajeCua3") = If(Cua3 <> 0, Cua3 * 100 / TotalAnterior, 0) + Row.Item("PorcentajeEnero") = If(Enero <> 0, Enero * 100 / If(DdlvistaPorcentaje.SelectedValue.ToEntero = 1, TotalAnterior, Enero), 0) + Row.Item("PorcentajeFebrero") = If(Febrero <> 0, Febrero * 100 / If(DdlvistaPorcentaje.SelectedValue.ToEntero = 1, TotalAnterior, Febrero), 0) + Row.Item("PorcentajeMarzo") = If(Marzo <> 0, Marzo * 100 / If(DdlvistaPorcentaje.SelectedValue.ToEntero = 1, TotalAnterior, Marzo), 0) + Row.Item("PorcentajeAbril") = If(Abril <> 0, Abril * 100 / If(DdlvistaPorcentaje.SelectedValue.ToEntero = 1, TotalAnterior, Abril), 0) + Row.Item("PorcentajeMayo") = If(Mayo <> 0, Mayo * 100 / If(DdlvistaPorcentaje.SelectedValue.ToEntero = 1, TotalAnterior, Mayo), 0) + Row.Item("PorcentajeJunio") = If(Junio <> 0, Junio * 100 / If(DdlvistaPorcentaje.SelectedValue.ToEntero = 1, TotalAnterior, Junio), 0) + Row.Item("PorcentajeJulio") = If(Julio <> 0, Julio * 100 / If(DdlvistaPorcentaje.SelectedValue.ToEntero = 1, TotalAnterior, Julio), 0) + Row.Item("PorcentajeAgosto") = If(Agosto <> 0, Agosto * 100 / If(DdlvistaPorcentaje.SelectedValue.ToEntero = 1, TotalAnterior, Agosto), 0) + Row.Item("PorcentajeSeptiembre") = If(Septiembre <> 0, Septiembre * 100 / If(DdlvistaPorcentaje.SelectedValue.ToEntero = 1, TotalAnterior, Septiembre), 0) + Row.Item("PorcentajeOctubre") = If(Octubre <> 0, Octubre * 100 / If(DdlvistaPorcentaje.SelectedValue.ToEntero = 1, TotalAnterior, Octubre), 0) + Row.Item("PorcentajeNoviembre") = If(Noviembre <> 0, Noviembre * 100 / If(DdlvistaPorcentaje.SelectedValue.ToEntero = 1, TotalAnterior, Noviembre), 0) + Row.Item("PorcentajeDiciembre") = If(Diciembre <> 0, Diciembre * 100 / If(DdlvistaPorcentaje.SelectedValue.ToEntero = 1, TotalAnterior, Diciembre), 0) + + Row.Item("PorcentajeTri1") = If(Tri1 <> 0, Tri1 * 100 / If(DdlvistaPorcentaje.SelectedValue.ToEntero = 1, TotalAnterior, Tri1), 0) + Row.Item("PorcentajeTri2") = If(Tri2 <> 0, Tri2 * 100 / If(DdlvistaPorcentaje.SelectedValue.ToEntero = 1, TotalAnterior, Tri2), 0) + Row.Item("PorcentajeTri3") = If(Tri3 <> 0, Tri3 * 100 / If(DdlvistaPorcentaje.SelectedValue.ToEntero = 1, TotalAnterior, Tri3), 0) + + Row.Item("PorcentajeTri4") = If(Tri4 <> 0, Tri4 * 100 / If(DdlvistaPorcentaje.SelectedValue.ToEntero = 1, TotalAnterior, Tri4), 0) + Row.Item("PorcentajeCua1") = If(Cua1 <> 0, Cua1 * 100 / If(DdlvistaPorcentaje.SelectedValue.ToEntero = 1, TotalAnterior, Cua1), 0) + Row.Item("PorcentajeCua2") = If(Cua2 <> 0, Cua2 * 100 / If(DdlvistaPorcentaje.SelectedValue.ToEntero = 1, TotalAnterior, Cua2), 0) + Row.Item("PorcentajeCua3") = If(Cua3 <> 0, Cua3 * 100 / If(DdlvistaPorcentaje.SelectedValue.ToEntero = 1, TotalAnterior, Cua3), 0) Row.Item("Nombre") = "TOTAL INGRESOS" @@ -918,6 +930,26 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal Dim Cua2 As Decimal = (DtGastosMesH.SUM("Cua2", "NOT CtaMayor in (3,4)")).ToDecimal Dim Cua3 As Decimal = (DtGastosMesH.SUM("Cua3", "NOT CtaMayor in (3,4)")).ToDecimal + Dim Ingreso_Enero As Decimal = (DtIngresosMesH.SUM("Enero", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal + Dim Ingreso_Febrero As Decimal = (DtIngresosMesH.SUM("Febrero", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal + Dim Ingreso_Marzo As Decimal = (DtIngresosMesH.SUM("Marzo", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal + Dim Ingreso_Abril As Decimal = (DtIngresosMesH.SUM("Abril", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal + Dim Ingreso_Mayo As Decimal = (DtIngresosMesH.SUM("Mayo", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal + Dim Ingreso_Junio As Decimal = (DtIngresosMesH.SUM("Junio", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal + Dim Ingreso_Julio As Decimal = (DtIngresosMesH.SUM("Julio", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal + Dim Ingreso_Agosto As Decimal = (DtIngresosMesH.SUM("Agosto", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal + Dim Ingreso_Septiembre As Decimal = (DtIngresosMesH.SUM("Septiembre", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal + Dim Ingreso_Octubre As Decimal = (DtIngresosMesH.SUM("Octubre", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal + Dim Ingreso_Noviembre As Decimal = (DtIngresosMesH.SUM("Noviembre", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal + Dim Ingreso_Diciembre As Decimal = (DtIngresosMesH.SUM("Diciembre", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal + Dim Ingreso_Tri1 As Decimal = (DtIngresosMesH.SUM("Tri1", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal + Dim Ingreso_Tri2 As Decimal = (DtIngresosMesH.SUM("Tri2", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal + Dim Ingreso_Tri3 As Decimal = (DtIngresosMesH.SUM("Tri3", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal + Dim Ingreso_Tri4 As Decimal = (DtIngresosMesH.SUM("Tri4", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal + Dim Ingreso_Cua1 As Decimal = (DtIngresosMesH.SUM("Cua1", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal + Dim Ingreso_Cua2 As Decimal = (DtIngresosMesH.SUM("Cua2", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal + Dim Ingreso_Cua3 As Decimal = (DtIngresosMesH.SUM("Cua3", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal + Row.Item("Enero") = Enero Row.Item("Febrero") = Febrero Row.Item("Marzo") = Marzo @@ -938,25 +970,27 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal Row.Item("Cua2") = Cua2 Row.Item("Cua3") = Cua3 - Row.Item("PorcentajeEnero") = If(Enero <> 0, Enero * 100 / TotalAnterior, 0) - Row.Item("PorcentajeFebrero") = If(Febrero <> 0, Febrero * 100 / TotalAnterior, 0) - Row.Item("PorcentajeMarzo") = If(Marzo <> 0, Marzo * 100 / TotalAnterior, 0) - Row.Item("PorcentajeAbril") = If(Abril <> 0, Abril * 100 / TotalAnterior, 0) - Row.Item("PorcentajeMayo") = If(Mayo <> 0, Mayo * 100 / TotalAnterior, 0) - Row.Item("PorcentajeJunio") = If(Junio <> 0, Junio * 100 / TotalAnterior, 0) - Row.Item("PorcentajeJulio") = If(Julio <> 0, Julio * 100 / TotalAnterior, 0) - Row.Item("PorcentajeAgosto") = If(Agosto <> 0, Agosto * 100 / TotalAnterior, 0) - Row.Item("PorcentajeSeptiembre") = If(Septiembre <> 0, Septiembre * 100 / TotalAnterior, 0) - Row.Item("PorcentajeOctubre") = If(Octubre <> 0, Octubre * 100 / TotalAnterior, 0) - Row.Item("PorcentajeNoviembre") = If(Noviembre <> 0, Noviembre * 100 / TotalAnterior, 0) - Row.Item("PorcentajeDiciembre") = If(Diciembre <> 0, Diciembre * 100 / TotalAnterior, 0) - Row.Item("PorcentajeTri1") = If(Tri1 <> 0, Tri1 * 100 / TotalAnterior, 0) - Row.Item("PorcentajeTri2") = If(Tri2 <> 0, Tri2 * 100 / TotalAnterior, 0) - Row.Item("PorcentajeTri3") = If(Tri3 <> 0, Tri3 * 100 / TotalAnterior, 0) - Row.Item("PorcentajeTri4") = If(Tri4 <> 0, Tri4 * 100 / TotalAnterior, 0) - Row.Item("PorcentajeCua1") = If(Cua1 <> 0, Cua1 * 100 / TotalAnterior, 0) - Row.Item("PorcentajeCua2") = If(Cua2 <> 0, Cua2 * 100 / TotalAnterior, 0) - Row.Item("PorcentajeCua3") = If(Cua3 <> 0, Cua3 * 100 / TotalAnterior, 0) + + + Row.Item("PorcentajeEnero") = If(Enero <> 0, Enero * 100 / If(DdlvistaPorcentaje.SelectedValue.ToEntero = 1, TotalAnterior, Ingreso_Enero), 0) + Row.Item("PorcentajeFebrero") = If(Febrero <> 0, Febrero * 100 / If(DdlvistaPorcentaje.SelectedValue.ToEntero = 1, TotalAnterior, Ingreso_Febrero), 0) + Row.Item("PorcentajeMarzo") = If(Marzo <> 0, Marzo * 100 / If(DdlvistaPorcentaje.SelectedValue.ToEntero = 1, TotalAnterior, Ingreso_Marzo), 0) + Row.Item("PorcentajeAbril") = If(Abril <> 0, Abril * 100 / If(DdlvistaPorcentaje.SelectedValue.ToEntero = 1, TotalAnterior, Ingreso_Abril), 0) + Row.Item("PorcentajeMayo") = If(Mayo <> 0, Mayo * 100 / If(DdlvistaPorcentaje.SelectedValue.ToEntero = 1, TotalAnterior, Ingreso_Mayo), 0) + Row.Item("PorcentajeJunio") = If(Junio <> 0, Junio * 100 / If(DdlvistaPorcentaje.SelectedValue.ToEntero = 1, TotalAnterior, Ingreso_Junio), 0) + Row.Item("PorcentajeJulio") = If(Julio <> 0, Julio * 100 / If(DdlvistaPorcentaje.SelectedValue.ToEntero = 1, TotalAnterior, Ingreso_Julio), 0) + Row.Item("PorcentajeAgosto") = If(Agosto <> 0, Agosto * 100 / If(DdlvistaPorcentaje.SelectedValue.ToEntero = 1, TotalAnterior, Ingreso_Agosto), 0) + Row.Item("PorcentajeSeptiembre") = If(Septiembre <> 0, Septiembre * 100 / If(DdlvistaPorcentaje.SelectedValue.ToEntero = 1, TotalAnterior, Ingreso_Septiembre), 0) + Row.Item("PorcentajeOctubre") = If(Octubre <> 0, Octubre * 100 / If(DdlvistaPorcentaje.SelectedValue.ToEntero = 1, TotalAnterior, Ingreso_Octubre), 0) + Row.Item("PorcentajeNoviembre") = If(Noviembre <> 0, Noviembre * 100 / If(DdlvistaPorcentaje.SelectedValue.ToEntero = 1, TotalAnterior, Ingreso_Noviembre), 0) + Row.Item("PorcentajeDiciembre") = If(Diciembre <> 0, Diciembre * 100 / If(DdlvistaPorcentaje.SelectedValue.ToEntero = 1, TotalAnterior, Ingreso_Diciembre), 0) + Row.Item("PorcentajeTri1") = If(Tri1 <> 0, Tri1 * 100 / If(DdlvistaPorcentaje.SelectedValue.ToEntero = 1, TotalAnterior, Ingreso_Tri1), 0) + Row.Item("PorcentajeTri2") = If(Tri2 <> 0, Tri2 * 100 / If(DdlvistaPorcentaje.SelectedValue.ToEntero = 1, TotalAnterior, Ingreso_Tri2), 0) + Row.Item("PorcentajeTri3") = If(Tri3 <> 0, Tri3 * 100 / If(DdlvistaPorcentaje.SelectedValue.ToEntero = 1, TotalAnterior, Ingreso_Tri3), 0) + Row.Item("PorcentajeTri4") = If(Tri4 <> 0, Tri4 * 100 / If(DdlvistaPorcentaje.SelectedValue.ToEntero = 1, TotalAnterior, Ingreso_Tri4), 0) + Row.Item("PorcentajeCua1") = If(Cua1 <> 0, Cua1 * 100 / If(DdlvistaPorcentaje.SelectedValue.ToEntero = 1, TotalAnterior, Ingreso_Cua1), 0) + Row.Item("PorcentajeCua2") = If(Cua2 <> 0, Cua2 * 100 / If(DdlvistaPorcentaje.SelectedValue.ToEntero = 1, TotalAnterior, Ingreso_Cua2), 0) + Row.Item("PorcentajeCua3") = If(Cua3 <> 0, Cua3 * 100 / If(DdlvistaPorcentaje.SelectedValue.ToEntero = 1, TotalAnterior, Ingreso_Cua3), 0) Row.Item("Nombre") = "TOTAL GASTOS" @@ -999,6 +1033,26 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal Dim Cua2 As Decimal = (DtIngresosMesH.SUM("Cua2", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("Cua2", "NOT CtaMayor in (-1,3,4)")).ToDecimal Dim Cua3 As Decimal = (DtIngresosMesH.SUM("Cua3", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("Cua3", "NOT CtaMayor in (-1,3,4)")).ToDecimal + Dim Ingreso_Enero As Decimal = (DtIngresosMesH.SUM("Enero", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal + Dim Ingreso_Febrero As Decimal = (DtIngresosMesH.SUM("Febrero", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal + Dim Ingreso_Marzo As Decimal = (DtIngresosMesH.SUM("Marzo", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal + Dim Ingreso_Abril As Decimal = (DtIngresosMesH.SUM("Abril", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal + Dim Ingreso_Mayo As Decimal = (DtIngresosMesH.SUM("Mayo", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal + Dim Ingreso_Junio As Decimal = (DtIngresosMesH.SUM("Junio", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal + Dim Ingreso_Julio As Decimal = (DtIngresosMesH.SUM("Julio", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal + Dim Ingreso_Agosto As Decimal = (DtIngresosMesH.SUM("Agosto", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal + Dim Ingreso_Septiembre As Decimal = (DtIngresosMesH.SUM("Septiembre", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal + Dim Ingreso_Octubre As Decimal = (DtIngresosMesH.SUM("Octubre", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal + Dim Ingreso_Noviembre As Decimal = (DtIngresosMesH.SUM("Noviembre", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal + Dim Ingreso_Diciembre As Decimal = (DtIngresosMesH.SUM("Diciembre", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal + Dim Ingreso_Tri1 As Decimal = (DtIngresosMesH.SUM("Tri1", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal + Dim Ingreso_Tri2 As Decimal = (DtIngresosMesH.SUM("Tri2", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal + Dim Ingreso_Tri3 As Decimal = (DtIngresosMesH.SUM("Tri3", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal + Dim Ingreso_Tri4 As Decimal = (DtIngresosMesH.SUM("Tri4", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal + Dim Ingreso_Cua1 As Decimal = (DtIngresosMesH.SUM("Cua1", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal + Dim Ingreso_Cua2 As Decimal = (DtIngresosMesH.SUM("Cua2", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal + Dim Ingreso_Cua3 As Decimal = (DtIngresosMesH.SUM("Cua3", "NOT CtaMayor in (3,4) AND CveCuenta > 0 ")).ToDecimal + Row.Item("Enero") = Enero Row.Item("Febrero") = Febrero Row.Item("Marzo") = Marzo @@ -1022,28 +1076,28 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal Row.Item("Nombre") = "Resultados del Ejercicio:" Row.Item("ImporteAcumulado") = DtIngresosMesH.SUM("ImporteAcumulado", "NOT CtaMayor in (-1,3,4)") - DtGastosMesH.SUM("ImporteAcumulado", "NOT CtaMayor in (-1,3,4)") ' TotalAnterior.ToString + 'Row.Item("PorcentajeEnero") = If(Enero <> 0, Enero * 100 / If(DdlvistaPorcentaje.SelectedValue.ToEntero = 1, ImporteAcumuladoTotal, Ingreso_Enero), 0) + Row.Item("PorcentajeEnero") = If(Enero <> 0, Enero * 100 / If(DdlvistaPorcentaje.SelectedValue.ToEntero = 1, ImporteAcumuladoTotal, Ingreso_Enero), 0) + Row.Item("PorcentajeFebrero") = If(Febrero <> 0, Febrero * 100 / If(DdlvistaPorcentaje.SelectedValue.ToEntero = 1, ImporteAcumuladoTotal, Ingreso_Febrero), 0) + Row.Item("PorcentajeMarzo") = If(Marzo <> 0, Marzo * 100 / If(DdlvistaPorcentaje.SelectedValue.ToEntero = 1, ImporteAcumuladoTotal, Ingreso_Marzo), 0) + Row.Item("PorcentajeAbril") = If(Abril <> 0, Abril * 100 / If(DdlvistaPorcentaje.SelectedValue.ToEntero = 1, ImporteAcumuladoTotal, Ingreso_Abril), 0) + Row.Item("PorcentajeMayo") = If(Mayo <> 0, Mayo * 100 / If(DdlvistaPorcentaje.SelectedValue.ToEntero = 1, ImporteAcumuladoTotal, Ingreso_Mayo), 0) + Row.Item("PorcentajeJunio") = If(Junio <> 0, Junio * 100 / If(DdlvistaPorcentaje.SelectedValue.ToEntero = 1, ImporteAcumuladoTotal, Ingreso_Junio), 0) + Row.Item("PorcentajeJulio") = If(Julio <> 0, Julio * 100 / If(DdlvistaPorcentaje.SelectedValue.ToEntero = 1, ImporteAcumuladoTotal, Ingreso_Julio), 0) + Row.Item("PorcentajeAgosto") = If(Agosto <> 0, Agosto * 100 / If(DdlvistaPorcentaje.SelectedValue.ToEntero = 1, ImporteAcumuladoTotal, Ingreso_Agosto), 0) + Row.Item("PorcentajeSeptiembre") = If(Septiembre <> 0, Septiembre * 100 / If(DdlvistaPorcentaje.SelectedValue.ToEntero = 1, ImporteAcumuladoTotal, Ingreso_Septiembre), 0) + Row.Item("PorcentajeOctubre") = If(Octubre <> 0, Octubre * 100 / If(DdlvistaPorcentaje.SelectedValue.ToEntero = 1, ImporteAcumuladoTotal, Ingreso_Octubre), 0) + Row.Item("PorcentajeNoviembre") = If(Noviembre <> 0, Noviembre * 100 / If(DdlvistaPorcentaje.SelectedValue.ToEntero = 1, ImporteAcumuladoTotal, Ingreso_Noviembre), 0) + Row.Item("PorcentajeDiciembre") = If(Diciembre <> 0, Diciembre * 100 / If(DdlvistaPorcentaje.SelectedValue.ToEntero = 1, ImporteAcumuladoTotal, Ingreso_Diciembre), 0) - Row.Item("PorcentajeEnero") = If(Enero <> 0, Enero * 100 / ImporteAcumuladoTotal, 0) - Row.Item("PorcentajeFebrero") = If(Febrero <> 0, Febrero * 100 / ImporteAcumuladoTotal, 0) - Row.Item("PorcentajeMarzo") = If(Marzo <> 0, Marzo * 100 / ImporteAcumuladoTotal, 0) - Row.Item("PorcentajeAbril") = If(Abril <> 0, Abril * 100 / ImporteAcumuladoTotal, 0) - Row.Item("PorcentajeMayo") = If(Mayo <> 0, Mayo * 100 / ImporteAcumuladoTotal, 0) - Row.Item("PorcentajeJunio") = If(Junio <> 0, Junio * 100 / ImporteAcumuladoTotal, 0) - Row.Item("PorcentajeJulio") = If(Julio <> 0, Julio * 100 / ImporteAcumuladoTotal, 0) - Row.Item("PorcentajeAgosto") = If(Agosto <> 0, Agosto * 100 / ImporteAcumuladoTotal, 0) - Row.Item("PorcentajeSeptiembre") = If(Septiembre <> 0, Septiembre * 100 / ImporteAcumuladoTotal, 0) - Row.Item("PorcentajeOctubre") = If(Octubre <> 0, Octubre * 100 / ImporteAcumuladoTotal, 0) - Row.Item("PorcentajeNoviembre") = If(Noviembre <> 0, Noviembre * 100 / ImporteAcumuladoTotal, 0) - Row.Item("PorcentajeDiciembre") = If(Diciembre <> 0, Diciembre * 100 / ImporteAcumuladoTotal, 0) - - Row.Item("PorcentajeTri1") = If(Tri1 <> 0, Tri1 * 100 / ImporteAcumuladoTotal, 0) - Row.Item("PorcentajeTri2") = If(Tri2 <> 0, Tri2 * 100 / ImporteAcumuladoTotal, 0) - Row.Item("PorcentajeTri3") = If(Tri3 <> 0, Tri3 * 100 / ImporteAcumuladoTotal, 0) - Row.Item("PorcentajeTri4") = If(Tri4 <> 0, Tri4 * 100 / ImporteAcumuladoTotal, 0) - Row.Item("PorcentajeCua1") = If(Cua1 <> 0, Cua1 * 100 / ImporteAcumuladoTotal, 0) - Row.Item("PorcentajeCua2") = If(Cua2 <> 0, Cua2 * 100 / ImporteAcumuladoTotal, 0) - Row.Item("PorcentajeCua3") = If(Cua3 <> 0, Cua3 * 100 / ImporteAcumuladoTotal, 0) + Row.Item("PorcentajeTri1") = If(Tri1 <> 0, Tri1 * 100 / If(DdlvistaPorcentaje.SelectedValue.ToEntero = 1, ImporteAcumuladoTotal, Ingreso_Tri1), 0) + Row.Item("PorcentajeTri2") = If(Tri2 <> 0, Tri2 * 100 / If(DdlvistaPorcentaje.SelectedValue.ToEntero = 1, ImporteAcumuladoTotal, Ingreso_Tri2), 0) + Row.Item("PorcentajeTri3") = If(Tri3 <> 0, Tri3 * 100 / If(DdlvistaPorcentaje.SelectedValue.ToEntero = 1, ImporteAcumuladoTotal, Ingreso_Tri3), 0) + Row.Item("PorcentajeTri4") = If(Tri4 <> 0, Tri4 * 100 / If(DdlvistaPorcentaje.SelectedValue.ToEntero = 1, ImporteAcumuladoTotal, Ingreso_Tri4), 0) + Row.Item("PorcentajeCua1") = If(Cua1 <> 0, Cua1 * 100 / If(DdlvistaPorcentaje.SelectedValue.ToEntero = 1, ImporteAcumuladoTotal, Ingreso_Cua1), 0) + Row.Item("PorcentajeCua2") = If(Cua2 <> 0, Cua2 * 100 / If(DdlvistaPorcentaje.SelectedValue.ToEntero = 1, ImporteAcumuladoTotal, Ingreso_Cua2), 0) + Row.Item("PorcentajeCua3") = If(Cua3 <> 0, Cua3 * 100 / If(DdlvistaPorcentaje.SelectedValue.ToEntero = 1, ImporteAcumuladoTotal, Ingreso_Cua3), 0) DTTotalesMesH.Rows.Add(Row) @@ -1554,7 +1608,7 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal 'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) Dim ObjConta As New ClsContabilidad - If ObjConta.GetEstadosAnualHorizontal(FechaIMes.ToDate, FechaFMes.ToDate, CveProyecto, CveSubProyecto, DdlDivisor.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, DdlPeriodo.SelectedValue.ToEntero, Periodo:=DdlPeriodo.SelectedValue.ToEntero) Then + If ObjConta.GetEstadosAnualHorizontal(FechaIMes.ToDate, FechaFMes.ToDate, CveProyecto, CveSubProyecto, DdlDivisor.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, DdlPeriodo.SelectedValue.ToEntero, Periodo:=DdlPeriodo.SelectedValue.ToEntero, VistaPorcentaje:=DdlvistaPorcentaje.SelectedValue.ToEntero) Then DtDatosAnualH = ObjConta.DtResultados.FiltraParametros("(ImporteActual <> 0 OR ImporteAcumulado <> 0)") Else DtDatosAnualH = Nothing @@ -1650,9 +1704,21 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal IndexData = 13 For IndexData = 13 To IndexMax - Row.Item(IndexData) = DtIngresosAnualH.SUM($"[{DtIngresosAnualH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (3,4)") - If DtIngresosAnualH.SUM($"[{DtIngresosAnualH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (3,4)") > 0 Then - Row.Item($"Porcentaje{DtIngresosAnualH.Columns(IndexData).ColumnName}") = DtIngresosAnualH.SUM($"[{DtIngresosAnualH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (3,4)") * 100 / DtIngresosAnualH.SUM("ImporteAcumulado", "NOT CtaMayor in (3,4)") + + Dim TotalAnioIngreso As Decimal = DtIngresosAnualH.FiltroPrimeroValor($"{DtIngresosAnualH.Columns(IndexData).ColumnName}").ToDecimal + Dim TotalCuentaIngreso As Decimal = DtIngresosAnualH.SUMD("ImporteAcumulado", "NOT CtaMayor in (3,4)") + + Row.Item(IndexData) = TotalAnioIngreso + + + If TotalAnioIngreso <> 0 Then + + If DdlvistaPorcentaje.SelectedValue.ToEntero = 1 Then + Row.Item($"Porcentaje{DtIngresosAnualH.Columns(IndexData).ColumnName}") = TotalAnioIngreso * 100 / TotalCuentaIngreso + Else + Row.Item($"Porcentaje{DtIngresosAnualH.Columns(IndexData).ColumnName}") = TotalAnioIngreso * 100 / TotalAnioIngreso + End If + Else Row.Item($"Porcentaje{DtIngresosAnualH.Columns(IndexData).ColumnName}") = "0" End If @@ -1730,17 +1796,26 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal IndexData = 13 For IndexData = 13 To IndexMax - Row.Item(IndexData) = DtGastosAnualH.SUM($"[{DtGastosAnualH.Columns(IndexData).ColumnName}]", "Not CtaMayor In (3,4)") - If DtGastosAnualH.SUM($"[{DtGastosAnualH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (3,4)") > 0 Then - Row.Item($"Porcentaje{DtGastosAnualH.Columns(IndexData).ColumnName}") = DtGastosAnualH.SUM($"[{DtGastosAnualH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (3,4)") * 100 / DtGastosAnualH.SUM("ImporteAcumulado", "NOT CtaMayor in (3,4)") + Dim TotalAnioIngreso As Decimal = DtIngresosAnualH.FiltroPrimeroValor($"{DtIngresosAnualH.Columns(IndexData).ColumnName}").ToDecimal + Dim TotalAnioGasto As Decimal = DtGastosAnualH.SUMD($"[{DtGastosAnualH.Columns(IndexData).ColumnName}]", "Not CtaMayor In (3,4)") + Dim TotalCuentaGasto As Decimal = DtGastosAnualH.SUMD("ImporteAcumulado", "NOT CtaMayor in (3,4)") + + Row.Item(IndexData) = TotalAnioGasto + + If TotalAnioGasto <> 0 Then + + If DdlvistaPorcentaje.SelectedValue.ToEntero = 1 Then + Row.Item($"Porcentaje{DtGastosAnualH.Columns(IndexData).ColumnName}") = TotalAnioGasto * 100 / TotalCuentaGasto + Else + Row.Item($"Porcentaje{DtGastosAnualH.Columns(IndexData).ColumnName}") = TotalAnioGasto * 100 / TotalAnioIngreso + End If + Else Row.Item($"Porcentaje{DtGastosAnualH.Columns(IndexData).ColumnName}") = "0" End If - - Next Row.Item("Nombre") = "TOTAL GASTOS" @@ -1766,11 +1841,24 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal IndexData = 13 For IndexData = 13 To IndexMax - Row.Item(IndexData) = DtIngresosAnualH.SUM($"[{DtIngresosAnualH.Columns(IndexData).ColumnName}]", "Not CtaMayor In (-1,3,4)") - DtGastosAnualH.SUM($"[{DtGastosAnualH.Columns(IndexData).ColumnName}]", "Not CtaMayor In (-1,3,4)") - If DtIngresosAnualH.SUM($"[{DtIngresosAnualH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (-1,3,4)") > 0 Then - Row.Item($"Porcentaje{DtIngresosAnualH.Columns(IndexData).ColumnName}") = DtIngresosAnualH.SUM($"[{DtIngresosAnualH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (-1,3,4)") * 100 / DtIngresosAnualH.SUM("ImporteAcumulado", "NOT CtaMayor in (-1,3,4)") + Dim TotalAnioIngreso As Decimal = DtIngresosAnualH.SUMD($"[{DtIngresosAnualH.Columns(IndexData).ColumnName}]", "Not CtaMayor In (-1,3,4)") + Dim TotalAnioGasto As Decimal = DtGastosAnualH.SUMD($"[{DtGastosAnualH.Columns(IndexData).ColumnName}]", "Not CtaMayor In (-1,3,4)") + Dim TotalCuentaGasto As Decimal = DtGastosAnualH.SUMD("ImporteAcumulado", "NOT CtaMayor in (3,4)") + + Row.Item(IndexData) = TotalAnioIngreso - TotalAnioGasto + + + If (TotalAnioIngreso - TotalAnioGasto) <> 0 Then + + If DdlvistaPorcentaje.SelectedValue.ToEntero = 1 Then + ' Row.Item($"Porcentaje{DtIngresosAnualH.Columns(IndexData).ColumnName}") = DtIngresosAnualH.SUM($"[{DtIngresosAnualH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (-1,3,4)") * 100 / DtIngresosAnualH.SUM("ImporteAcumulado", "NOT CtaMayor in (-1,3,4)") + Row.Item($"Porcentaje{DtIngresosAnualH.Columns(IndexData).ColumnName}") = (TotalAnioIngreso - TotalAnioGasto) * 100 / TotalCuentaGasto + Else + Row.Item($"Porcentaje{DtIngresosAnualH.Columns(IndexData).ColumnName}") = (TotalAnioIngreso - TotalAnioGasto) * 100 / TotalAnioIngreso + End If + Else Row.Item($"Porcentaje{DtIngresosAnualH.Columns(IndexData).ColumnName}") = "0" End If @@ -1967,7 +2055,7 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal Dim ObjConta As New ClsContabilidad - If ObjConta.GetEstadosSubProyectoHorizontal(FechaIMes.ToDate, FechaFMes.ToDate, CveProyecto, CveSubProyecto, DdlDivisor.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then + If ObjConta.GetEstadosSubProyectoHorizontal(FechaIMes.ToDate, FechaFMes.ToDate, CveProyecto, CveSubProyecto, DdlDivisor.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, VistaPorcentaje:=DdlvistaPorcentaje.SelectedValue.ToEntero) Then DTSubProyectosCabecerasH = ObjConta.DSResultados.Tables(0) DtDatosSubProyectoH = ObjConta.DSResultados.Tables(1).FiltraParametros("(ImporteActual <> 0 OR ImporteAcumulado <> 0)") 'se limpian los subproyectos con importe cero @@ -2022,8 +2110,8 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal Dim IndexSubProyectoMax As Integer = DTSubProyectosCabecerasH.Rows.Count - 1 - If IndexSubProyectoMAx > GvIngresosSubProyectoH.Columns.Count - 2 Then - IndexSubProyectoMAx = GvIngresosSubProyectoH.Columns.Count - 2 + If IndexSubProyectoMax > GvIngresosSubProyectoH.Columns.Count - 2 Then + IndexSubProyectoMax = GvIngresosSubProyectoH.Columns.Count - 2 End If Dim IndexTotales As Integer = 13 + IndexSubProyectoMax If IndexTotales > DtIngresosSubProyectoH.Columns.Count - 2 Then @@ -2085,6 +2173,11 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal GvGastosSubProyectoH.Columns(IndexGv + 1).Visible = True End If + If dColumn.ColumnName = "SinSubProyecto" Then + GvIngresosSubProyectoH.Columns(IndexGv).Visible = False + GvIngresosSubProyectoH.Columns(IndexGv + 1).Visible = False + End If + End If listaCampos.Add(New String() {dColumn.ColumnName.ToString(), DTSubProyectosCabecerasH.Rows(IndexSubProyecto)(0).ToString()}) End If @@ -2127,7 +2220,15 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal Row.Item(IndexData) = DtIngresosSubProyectoH.SUM($"[{DtIngresosSubProyectoH.Columns(IndexData).ColumnName}]", "Not CtaMayor In (3,4)") If DtIngresosSubProyectoH.SUM($"[{DtIngresosSubProyectoH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (3,4)") <> 0 Then - Row.Item($"Porcentaje{DtIngresosSubProyectoH.Columns(IndexData).ColumnName}") = DtIngresosSubProyectoH.SUM($"[{DtIngresosSubProyectoH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (3,4)") * 100 / DtIngresosSubProyectoH.SUM("ImporteAcumulado", "NOT CtaMayor in (3,4)") + + If DdlvistaPorcentaje.SelectedValue.ToEntero = 1 Then + Row.Item($"Porcentaje{DtIngresosSubProyectoH.Columns(IndexData).ColumnName}") = DtIngresosSubProyectoH.SUM($"[{DtIngresosSubProyectoH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (3,4)") * 100 / DtIngresosSubProyectoH.SUM("ImporteAcumulado", "NOT CtaMayor in (3,4)") + Else + Dim TotalProyectoIngreso As Decimal = DtIngresosSubProyectoH.FiltroPrimeroValor($"{DtIngresosSubProyectoH.Columns(IndexData).ColumnName}").ToDecimal + Dim TotalCuentaIngreso As Decimal = DtIngresosSubProyectoH.SUMD($"[{DtIngresosSubProyectoH.Columns(IndexData).ColumnName}]", "Not CtaMayor In (3,4)") + Row.Item($"Porcentaje{DtIngresosSubProyectoH.Columns(IndexData).ColumnName}") = TotalCuentaIngreso * 100 / TotalProyectoIngreso + End If + Else Row.Item($"Porcentaje{DtIngresosSubProyectoH.Columns(IndexData).ColumnName}") = "0" End If @@ -2157,6 +2258,7 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal DtIngresosSubProyectoH.Rows.Add(Row) End If + DtIngresosSubProyectoH.Rows.Add(DtIngresosSubProyectoH.NewRow()) Dim T1 = TotalActual, T2 = TotalAnterior @@ -2172,12 +2274,24 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal IndexData = 13 For IndexData = 13 To IndexTotales If DtIngresosSubProyectoH.Columns(IndexData).ColumnName.ToEntero > 0 Then 'filtro solo los que tienen número - Row.Item(IndexData) = DtIngresosSubProyectoH.SUM($"[{DtIngresosSubProyectoH.Columns(IndexData).ColumnName}]", "Not CtaMayor In (-1,3,4)") - DtGastosSubProyectoH.SUM($"[{DtGastosSubProyectoH.Columns(IndexData).ColumnName}]", "Not CtaMayor In (-1,3,4)") - 'Row.Item($"Porcentaje{DtIngresosSubProyectoH.Columns(IndexData).ColumnName}") = DtIngresosSubProyectoH.SUM($"[{DtIngresosSubProyectoH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (-1, 3,4)") * 100 / DtIngresosSubProyectoH.SUM("ImporteAcumulado", "NOT CtaMayor in (-1,3,4)") + Dim TotalProyectoIngreso As Decimal = DtIngresosSubProyectoH.FiltroPrimeroValor($"{DtIngresosSubProyectoH.Columns(IndexData).ColumnName}").ToDecimal + Dim TotalProyectoEgreso As Decimal = DtGastosSubProyectoH.FiltroPrimeroValor($"{DtGastosSubProyectoH.Columns(IndexData).ColumnName}").ToDecimal + + Row.Item(IndexData) = TotalProyectoIngreso - TotalProyectoEgreso + + 'Row.Item(IndexData) = DtIngresosSubProyectoH.SUM($"[{DtIngresosSubProyectoH.Columns(IndexData).ColumnName}]", "Not CtaMayor In (-1,3,4)") - DtGastosSubProyectoH.SUM($"[{DtGastosSubProyectoH.Columns(IndexData).ColumnName}]", "Not CtaMayor In (-1,3,4)") + + If TotalProyectoIngreso <> 0 Or TotalProyectoEgreso <> 0 Then + + If DdlvistaPorcentaje.SelectedValue.ToEntero = 1 Then + 'Row.Item($"Porcentaje{DtIngresosSubProyectoH.Columns(IndexData).ColumnName}") = DtIngresosSubProyectoH.SUM($"[{DtIngresosSubProyectoH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (-1, 3,4)") * 100 / DtIngresosSubProyectoH.SUM("ImporteAcumulado", "NOT CtaMayor in (-1,3,4)") + Row.Item($"Porcentaje{DtIngresosSubProyectoH.Columns(IndexData).ColumnName}") = (TotalProyectoIngreso - TotalProyectoEgreso) * 100 / DtIngresosSubProyectoH.SUM("ImporteAcumulado", "NOT CtaMayor in (-1,3,4)") + Else + Row.Item($"Porcentaje{DtIngresosSubProyectoH.Columns(IndexData).ColumnName}") = (TotalProyectoIngreso - TotalProyectoEgreso) * 100 / TotalProyectoIngreso + End If + - If DtIngresosSubProyectoH.SUM($"[{DtIngresosSubProyectoH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (-1, 3,4)").ToDecimal <> 0 Then - Row.Item($"Porcentaje{DtIngresosSubProyectoH.Columns(IndexData).ColumnName}") = DtIngresosSubProyectoH.SUM($"[{DtIngresosSubProyectoH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (-1, 3,4)") * 100 / DtIngresosSubProyectoH.SUM("ImporteAcumulado", "NOT CtaMayor in (-1,3,4)") Else Row.Item($"Porcentaje{DtIngresosSubProyectoH.Columns(IndexData).ColumnName}") = "0" End If @@ -2222,6 +2336,9 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal Protected Sub GvIngresosSubProyectoH_RowDataBound(sender As Object, e As GridViewRowEventArgs) If e.Row.RowType = DataControlRowType.DataRow Then + + e.Row.FCHyperLink("Hypgrafica").Visible = If(e.Row.DBCampo("Nombre").ToString.Length > 0, True, False) + If e.Row.DBCampo("CtaMayor").ToString.ToEntero = -1 Then TotalActualMes += e.Row.DBCampo("ImporteActual").ToString.ToDouble TotalAnteriorMes += e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble @@ -2375,14 +2492,14 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal Private Sub Imprimir(Optional reporte As String = "PDF") - If TAB.ActiveTabIndex = 0 AndAlso GvIngresosMes.Rows.Count > 0 Then + If Tab.ActiveTabIndex = 0 AndAlso GvIngresosMes.Rows.Count > 0 Then ExportToExcelG(GvIngresosMes, GvGastosMes, TMesT1, "Reporte_Mensual", UsuarioActual, "Mensual") - ElseIf TAB.ActiveTabIndex = 1 AndAlso GvIngresosMesH.Rows.Count > 0 Then + ElseIf Tab.ActiveTabIndex = 1 AndAlso GvIngresosMesH.Rows.Count > 0 Then ExportToExcelG(GvIngresosMesH, GvGastosMesH, TMesT1, "Reporte_Mensual_Horizontal", UsuarioActual, "Mensual Horizontal", Gv3:=GvTotalesMesH) - ElseIf TAB.ActiveTabIndex = 2 AndAlso GvIngresosAnualH.Rows.Count > 0 Then + ElseIf Tab.ActiveTabIndex = 2 AndAlso GvIngresosAnualH.Rows.Count > 0 Then ExportToExcelG(GvIngresosAnualH, GvGastosAnualH, TMesT1, "Reporte_Anual_Horizontal", UsuarioActual, "Anual Horizontal", Gv3:=GvTotalesAnualH) - ElseIf TAB.ActiveTabIndex = 3 AndAlso GvIngresosSubProyectoH.Rows.Count > 0 Then + ElseIf Tab.ActiveTabIndex = 3 AndAlso GvIngresosSubProyectoH.Rows.Count > 0 Then ExportToExcelG(GvIngresosSubProyectoH, GvGastosSubProyectoH, TMesT1, "Reporte_Proyecto_Horizontal", UsuarioActual, $"Estado de Resultados Horizontal por {LblSubProyecto.Text}", Gv3:=GvTotalesSubProyectoH, EsPorSubProtyecto:=True) @@ -2556,7 +2673,7 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal worksheet.Rows(IndexEndTable + 1).Cells(0).Value = Usuario.Nombre worksheet.Rows(IndexEndTable).Cells(2).Value = "Fecha Impresión" - worksheet.Rows(IndexEndTable + 1).Cells(2).Value = DateTime.Now.ToString("dd/MM/yyyy") + worksheet.Rows(IndexEndTable + 1).Cells(2).Value = NowADS().ToString("dd/MM/yyyy") Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", Usuario.Empresa.Ruta)) diff --git a/Contabilidad2/RepFlujoEfectivo.aspx.vb b/Contabilidad2/RepFlujoEfectivo.aspx.vb index 97d163776..ea01c9228 100644 --- a/Contabilidad2/RepFlujoEfectivo.aspx.vb +++ b/Contabilidad2/RepFlujoEfectivo.aspx.vb @@ -52,8 +52,8 @@ Partial Class AC2_RepFlujoEfectivo Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load If Not Page.IsPostBack Then - TxtFechaDel.Text = DateSerial(Year(Now), Month(Now), 1).ToShortDateString - TxtFechaAl.Text = Date.Now.ToShortDateString + TxtFechaDel.Text = DateSerial(Year(NowADS()), Month(NowADS()), 1).ToShortDateString + TxtFechaAl.Text = NowADS().ToShortDateString CargaDatos() End If @@ -67,8 +67,8 @@ Partial Class AC2_RepFlujoEfectivo DdlSubproyecto.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, -1) DdlSubproyecto.DataBind() - 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 Dim CveSubProyecto As String = DdlSubproyecto.SelectedValue.ToString Dim TipoReporte = DdlTipoReporte.SelectedValue.ToEntero @@ -215,7 +215,7 @@ Partial Class AC2_RepFlujoEfectivo 'End Sub Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click - 'GvDatos.ExportToExcel("ReporteFlujoEfectivo" & Now.ToShortDateString) + 'GvDatos.ExportToExcel("ReporteFlujoEfectivo" & NowADS().ToShortDateString) ImprimirReporte("Excel") End Sub diff --git a/Contabilidad2/RepLibroDiario.aspx.vb b/Contabilidad2/RepLibroDiario.aspx.vb index 070b45a63..425085a8f 100644 --- a/Contabilidad2/RepLibroDiario.aspx.vb +++ b/Contabilidad2/RepLibroDiario.aspx.vb @@ -46,8 +46,8 @@ Partial Class Contabilidad2_RepLibroDiario 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) @@ -156,15 +156,15 @@ Partial Class Contabilidad2_RepLibroDiario #Region " IMPRIMIR " Protected Sub Imprimir_click(sender As Object, e As EventArgs) Handles Imprimir.Click - 'FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate) - 'FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate) + 'FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate) + 'FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate) 'DtDatos = DtDatos ImprimirReporte() End Sub Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click - 'FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate) - 'FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate) + 'FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate) + 'FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate) 'DtDatos = DtDatos ImprimirReporte("EXCEL") End Sub diff --git a/Contabilidad2/RepMovimientosAuxiliaresCatalogo.aspx.vb b/Contabilidad2/RepMovimientosAuxiliaresCatalogo.aspx.vb index 5d5d8e2a6..876464b03 100644 --- a/Contabilidad2/RepMovimientosAuxiliaresCatalogo.aspx.vb +++ b/Contabilidad2/RepMovimientosAuxiliaresCatalogo.aspx.vb @@ -91,8 +91,8 @@ Partial Class Conta_RepMovimientosAuxiliaresCatalogo CargaTipoCuentas() 'TxtCuenta.Enabled = False - txtFechaI.Text = Now.FirstDayOfMonth.ToShortDateString - txtFechaF.Text = Now.LastDayOfMonth.ToShortDateString + txtFechaI.Text = NowADS().FirstDayOfMonth.ToShortDateString + txtFechaF.Text = NowADS().LastDayOfMonth.ToShortDateString If Request("CveCuenta") IsNot Nothing AndAlso IsNumeric(Request("CveCuenta")) AndAlso Request("CveCuenta").ToEntero > 0 Then @@ -158,8 +158,8 @@ Partial Class Conta_RepMovimientosAuxiliaresCatalogo If DdlCuentas.SelectedValue.ToEntero = -1 Then Alert("El campo Cuenta es obligatorio.", TipoMensaje.MsgError) Else - FechaInicio = If(txtFechaI.Text = "" Or txtFechaI.Text = "__/__/____", Date.Now, txtFechaI.Text.ToDate) - FechaFin = If(txtFechaF.Text = "" Or txtFechaF.Text = "__/__/____", Date.Now, txtFechaF.Text.ToDate) + FechaInicio = If(txtFechaI.Text = "" Or txtFechaI.Text = "__/__/____", NowADS(), txtFechaI.Text.ToDate) + FechaFin = If(txtFechaF.Text = "" Or txtFechaF.Text = "__/__/____", NowADS(), txtFechaF.Text.ToDate) CargaDatos() End If @@ -382,8 +382,8 @@ Partial Class Conta_RepMovimientosAuxiliaresCatalogo If DdlCuentas.SelectedValue.ToEntero = -1 Then Alert("El campo Cuenta es obligatorio.", TipoMensaje.MsgError) Else - FechaInicio = If(txtFechaI.Text = "" Or txtFechaI.Text = "__/__/____", Date.Now, txtFechaI.Text.ToDate) - FechaFin = If(txtFechaF.Text = "" Or txtFechaF.Text = "__/__/____", Date.Now, txtFechaF.Text.ToDate) + FechaInicio = If(txtFechaI.Text = "" Or txtFechaI.Text = "__/__/____", NowADS(), txtFechaI.Text.ToDate) + FechaFin = If(txtFechaF.Text = "" Or txtFechaF.Text = "__/__/____", NowADS(), txtFechaF.Text.ToDate) DtDatos = DtDatos ImprimirReporte() @@ -407,7 +407,7 @@ Partial Class Conta_RepMovimientosAuxiliaresCatalogo ' strinLiteral = $" ' ' - ' + ' ' ' '

    {UsuarioActual.Empresa.Empresa}
    Movimientos Auxiliares del Catálogo

    Fecha:{Now.ToString("dd/MM/yyyy")} Fecha:{NowADS().ToString("dd/MM/yyyy")}
    @@ -419,7 +419,7 @@ Partial Class Conta_RepMovimientosAuxiliaresCatalogo ' strinLiteral = $" ' ' - ' + ' ' ' '

    {UsuarioActual.Empresa.Empresa}
    Movimientos Auxiliares del Catálogo

    Fecha:{Now.ToString("dd/MM/yyyy")} Fecha:{NowADS().ToString("dd/MM/yyyy")}
    @@ -431,7 +431,7 @@ Partial Class Conta_RepMovimientosAuxiliaresCatalogo 'End If 'EncabezadoLiteral.Text = strinLiteral - 'GvDatos.ExportToExcel($"MovimientosAuxiliares_{Now.ToString("yyyyMMddmmss")}", Encabezado2:=EncabezadoLiteral) + 'GvDatos.ExportToExcel($"MovimientosAuxiliares_{NowADS().ToString("yyyyMMddmmss")}", Encabezado2:=EncabezadoLiteral) End Sub diff --git a/Contabilidad2/RepOrigenAplicacion.aspx.vb b/Contabilidad2/RepOrigenAplicacion.aspx.vb index 9bdb3b8fb..f13ef4a3b 100644 --- a/Contabilidad2/RepOrigenAplicacion.aspx.vb +++ b/Contabilidad2/RepOrigenAplicacion.aspx.vb @@ -72,8 +72,8 @@ Partial Class Contabilidad2_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 @@ -87,7 +87,7 @@ Partial Class Contabilidad2_RepOrigenAplicacion DdlSubproyecto.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, -1) DdlSubproyecto.DataBind() - DdlEjercicio.SelectedValue = Now.Year.ToString + DdlEjercicio.SelectedValue = NowADS().Year.ToString TabContainer_ActiveTabChanged(TabContainer, EventArgs.Empty) @@ -155,8 +155,8 @@ Partial Class Contabilidad2_RepOrigenAplicacion ' Dim FechaI = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, "0"c), Anio) ' Dim FechaF = DateAdd(DateInterval.Day, -1, DateAdd(DateInterval.Month, 1, CDate(FechaI))).ToString("dd/MM/yyyy") - 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) TipoReporte = If(TipoReporte = -1, -1, DdlTipoReporte.SelectedValue.ToEntero) Dim CveSubProyecto As String = DdlSubproyecto.SelectedValue.ToString @@ -296,7 +296,7 @@ Partial Class Contabilidad2_RepOrigenAplicacion TipoReporte = If(TipoReporte = -1, -1, DdlTipoReporte.SelectedValue.ToEntero) Dim CveSubProyecto As String = DdlSubproyecto.SelectedValue.ToString - Anos = (Year(Date.Now) - DdlEjercicio.SelectedValue.ToEntero) + 1 + Anos = (Year(NowADS()) - DdlEjercicio.SelectedValue.ToEntero) + 1 If ObjConta.GetOrigenAplicacionAnual(DdlEjercicio.SelectedValue.ToEntero, TipoReporte, CveSubProyecto, UsuarioActual.CveEmpresa) Then DtDatosAnual = ObjConta.DtResultados diff --git a/Contabilidad2/RepSituacionFinanciera.aspx.vb b/Contabilidad2/RepSituacionFinanciera.aspx.vb index 307be617a..2ca674bfc 100644 --- a/Contabilidad2/RepSituacionFinanciera.aspx.vb +++ b/Contabilidad2/RepSituacionFinanciera.aspx.vb @@ -144,8 +144,8 @@ Partial Class AC2_SituacionFinanciera TotalPasivoPatrimonioActual = 0 TotalPasivoPatrimonioAnterior = 0 - 'TxtFechaInicio.Text = DateSerial(Year(Date.Now), 1, 1).ToShortDateString - 'TxtFechaFin.Text = Date.Now.ToShortDateString + 'TxtFechaInicio.Text = DateSerial(Year(NowADS()), 1, 1).ToShortDateString + 'TxtFechaFin.Text = NowADS().ToShortDateString CargaEjercicios() @@ -170,10 +170,10 @@ Partial Class AC2_SituacionFinanciera End If Clsconta.Dispose() DdlEjercicioCierre.DataBind() - DdlEjercicioCierre.SelectedValue = Now.Year.ToString + DdlEjercicioCierre.SelectedValue = NowADS().Year.ToString DdlEjercicio.DataBind() - DdlEjercicio.SelectedValue = Now.Year.ToString + DdlEjercicio.SelectedValue = NowADS().Year.ToString DdlSubproyecto.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, -1) DdlSubproyecto.DataBind() @@ -181,7 +181,7 @@ Partial Class AC2_SituacionFinanciera If UsuarioActual.TienePermisoProceso(346) Then LnkCerrar.Visible = True 'DdlEjercicio.SelectedValueExist(UsuarioActual.Empresa.EjercicioActual.ToString) - DdlPeriodo.SelectedValue = Now.Month.ToString + DdlPeriodo.SelectedValue = NowADS().Month.ToString End Sub Private Sub CargaDatos() diff --git a/Contabilidad2/RepSituacionFinanciera.aspx.vb_old b/Contabilidad2/RepSituacionFinanciera.aspx.vb_old index b199785e1..b5aa278b7 100644 --- a/Contabilidad2/RepSituacionFinanciera.aspx.vb_old +++ b/Contabilidad2/RepSituacionFinanciera.aspx.vb_old @@ -144,8 +144,8 @@ Partial Class AC2_SituacionFinanciera TotalPasivoPatrimonioActual = 0 TotalPasivoPatrimonioAnterior = 0 - 'TxtFechaInicio.Text = DateSerial(Year(Date.Now), 1, 1).ToShortDateString - 'TxtFechaFin.Text = Date.Now.ToShortDateString + 'TxtFechaInicio.Text = DateSerial(Year(NowADS()), 1, 1).ToShortDateString + 'TxtFechaFin.Text = NowADS().ToShortDateString CargaEjercicios() @@ -164,14 +164,14 @@ Partial Class AC2_SituacionFinanciera Clsconta.Dispose() DdlEjercicio.DataBind() - DdlEjercicio.SelectedValue = Now.Year.ToString + DdlEjercicio.SelectedValue = NowADS().Year.ToString DdlSubproyecto.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, -1) DdlSubproyecto.DataBind() 'DdlEjercicio.SelectedValueExist(UsuarioActual.Empresa.EjercicioActual.ToString) - DdlPeriodo.SelectedValue = Now.Month.ToString + DdlPeriodo.SelectedValue = NowADS().Month.ToString End Sub Private Sub CargaDatos() diff --git a/Contabilidad2/RepSituacionFinancieraSAT.aspx.vb.exclude b/Contabilidad2/RepSituacionFinancieraSAT.aspx.vb.exclude index d2854b78f..909c79d1e 100644 --- a/Contabilidad2/RepSituacionFinancieraSAT.aspx.vb.exclude +++ b/Contabilidad2/RepSituacionFinancieraSAT.aspx.vb.exclude @@ -145,8 +145,8 @@ Partial Class AC2_SituacionFinanciera TotalPasivoPatrimonioActual = 0 TotalPasivoPatrimonioAnterior = 0 - 'TxtFechaInicio.Text = DateSerial(Year(Date.Now), 1, 1).ToShortDateString - 'TxtFechaFin.Text = Date.Now.ToShortDateString + 'TxtFechaInicio.Text = DateSerial(Year(NowADS()), 1, 1).ToShortDateString + 'TxtFechaFin.Text = NowADS().ToShortDateString CargaEjercicios() @@ -165,14 +165,14 @@ Partial Class AC2_SituacionFinanciera ClsConta.Dispose() DdlEjercicio.DataBind() - DdlEjercicio.SelectedValue = Now.Year.ToString + DdlEjercicio.SelectedValue = NowADS().Year.ToString DdlSubproyecto.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, -1) DdlSubproyecto.DataBind() 'DdlEjercicio.SelectedValueExist(UsuarioActual.Empresa.EjercicioActual.ToString) - DdlPeriodo.SelectedValue = Now.Month.ToString + DdlPeriodo.SelectedValue = NowADS().Month.ToString End Sub Private Sub CargaDatos() diff --git a/Contabilidad2/RepVariacionHaciendaPublica.aspx.vb b/Contabilidad2/RepVariacionHaciendaPublica.aspx.vb index 9ae8d10c3..6c0466cd1 100644 --- a/Contabilidad2/RepVariacionHaciendaPublica.aspx.vb +++ b/Contabilidad2/RepVariacionHaciendaPublica.aspx.vb @@ -78,8 +78,8 @@ Partial Class AC_RepVariacionHaciendaPublica Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load If Not Page.IsPostBack Then - TxtFechaDel.Text = DateSerial(Year(Now), Month(Now), 1).ToShortDateString - TxtFechaAl.Text = Date.Now.ToShortDateString + TxtFechaDel.Text = DateSerial(Year(NowADS()), Month(NowADS()), 1).ToShortDateString + TxtFechaAl.Text = NowADS().ToShortDateString CargaDatos() @@ -92,8 +92,8 @@ Partial Class AC_RepVariacionHaciendaPublica 'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) 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) FechaDel = TxtFechaDel.Text FechaAl = TxtFechaAl.Text @@ -371,7 +371,7 @@ Partial Class AC_RepVariacionHaciendaPublica 'End Sub Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click - 'GvDatos.ExportToExcel("123456" & Now.ToShortDateString) + 'GvDatos.ExportToExcel("123456" & NowADS().ToShortDateString) ImprimirReporte("Excel") 'Descarga reporte en Excel End Sub diff --git a/Contabilidad2/Reportes/RepSituacionFinanciera.rdlc b/Contabilidad2/Reportes/RepSituacionFinanciera.rdlc index c19542d96..88f3e7afc 100644 --- a/Contabilidad2/Reportes/RepSituacionFinanciera.rdlc +++ b/Contabilidad2/Reportes/RepSituacionFinanciera.rdlc @@ -23,15 +23,15 @@ ImporteActual - System.Int16 + System.Decimal ImporteAnterior - System.Int16 + System.Decimal CtaMayor - System.Int16 + System.Decimal Orden @@ -3040,7 +3040,7 @@ =Sum(iif(Fields!Tipo.Value.ToString() = "A" OR Fields!Tipo.Value.ToString() = "B" OR Fields!Tipo.Value.ToString() = "C" OR Cint(Fields!TipoCuenta.Value) = 9 , Fields!ImporteActual.Value, 0) , "DataSet1") - =Sum( iif(Fields!Sup.Value = "ACTIVO NO CIRCULANTE" OR Fields!Sup.Value="ACTIVO CIRCULANTE" OR Cint(Fields!TipoCuenta.value) = 9 , Fields!ImporteAnterior.Value, 0), "DataSet1") + =Sum( iif(Fields!Sup.Value = "ACTIVO NO CIRCULANTE" OR Fields!Sup.Value="ACTIVO CIRCULANTE" OR Cint(Fields!TipoCuenta.value) = 9 , Cint(Fields!ImporteAnterior.Value) , 0.0), "DataSet1") =Sum( iif(Fields!Sup.Value = "PASIVO CIRCULANTE" OR Fields!Sup.Value = "PASIVO NO CIRCULANTE" OR Fields!Sup.Value = "Pasivo a corto plazo" OR Fields!Sup.Value = "Pasivo a largo plazo", diff --git a/Contratos/CatPresupuestos.aspx.vb b/Contratos/CatPresupuestos.aspx.vb index f30cabaac..b1d26379f 100644 --- a/Contratos/CatPresupuestos.aspx.vb +++ b/Contratos/CatPresupuestos.aspx.vb @@ -20,8 +20,8 @@ Partial Class Contratos_CatPresupuestos CargaProyecto() Dim CveProyecto = DdlSubProyecto.SelectedValue.ToEntero CargaSubProyecto(CveProyecto) - txtFechaI.Text = $"01/01/{Now.Year}" - txtFechaF.Text = Now.ToString("dd/MM/yyyy") + txtFechaI.Text = $"01/01/{NowADS().Year}" + txtFechaF.Text = NowADS().ToString("dd/MM/yyyy") UPFiltros.Update() End Sub diff --git a/Contratos/CatRefrendos.aspx.cs b/Contratos/CatRefrendos.aspx.cs index f649ef7dc..0c311619e 100644 --- a/Contratos/CatRefrendos.aspx.cs +++ b/Contratos/CatRefrendos.aspx.cs @@ -492,10 +492,10 @@ public partial class Contratos_CatRefrendos : ClsPaginas List @params = new List(); @params.Add(new ReportParameter("FechaInicio", txtFechaI.Text)); - @params.Add(new ReportParameter("FechaActual", DateTime.Now.ToShortDateString())); + @params.Add(new ReportParameter("FechaActual", NowADS().ToShortDateString())); @params.Add(new ReportParameter("FechaFin", txtFechaF.Text)); @params.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)); - @params.Add(new ReportParameter("FechaImpresion", DateTime.Now.ToShortDateString())); + @params.Add(new ReportParameter("FechaImpresion", NowADS().ToShortDateString())); @params.Add(new ReportParameter("Cliente", DdlCliente.SelectedItem.Text)); @params.Add(new ReportParameter("Usuario", DdlUsuario.SelectedItem.Text)); @params.Add(new ReportParameter("FechaVencInicio", txtFechaVencI.Text)); diff --git a/Contratos/Contrato.aspx.vb b/Contratos/Contrato.aspx.vb index 50d451713..63649550f 100644 --- a/Contratos/Contrato.aspx.vb +++ b/Contratos/Contrato.aspx.vb @@ -382,7 +382,7 @@ Partial Class Contratos_Default If Request("Opt") IsNot Nothing AndAlso IsNumeric(Request("Opt")) Then Tab.ActiveTabIndex = Request("Opt").ToEntero Else 'Configuración de Modalidad Insert - LblFechaCaptura.Text = Now.ToShortDateString() + LblFechaCaptura.Text = NowADS().ToShortDateString() LblUsuarioCapturo.Text = UsuarioActual.Usuario ViewState("CveContrato") = -1 @@ -2961,7 +2961,7 @@ Partial Class Contratos_Default params.Add(New ReportParameter("FechaInicio", "-1")) params.Add(New ReportParameter("FechaFin", "-1")) 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", Me.Titulo)) params.Add(New ReportParameter("Estatus", "")) params.Add(New ReportParameter("Tipo", "-1")) @@ -3745,7 +3745,7 @@ Partial Class Contratos_Default Dim params As New List(Of ReportParameter) params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("Contrato", Titulo)) 'Datos NUEVOS @@ -3766,7 +3766,7 @@ Partial Class Contratos_Default Dim params As New List(Of ReportParameter) params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("Contrato", Titulo)) 'DATOS DEL CONTRATO params.Add(New ReportParameter("NoContrato", TxtNumeroContrato.Text.Trim)) @@ -3824,7 +3824,7 @@ Partial Class Contratos_Default Dim params As New List(Of ReportParameter) params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("Contrato", TituloCorto)) 'Datos NUEVOS @@ -3862,7 +3862,7 @@ Partial Class Contratos_Default Dim params As New List(Of ReportParameter) params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("Contrato", TituloCorto)) 'Datos NUEVOS @@ -3889,7 +3889,7 @@ Partial Class Contratos_Default Dim params As New List(Of ReportParameter) params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("Contrato", TituloCorto)) 'Datos NUEVOS @@ -3920,7 +3920,7 @@ Partial Class Contratos_Default Dim params As New List(Of ReportParameter) params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("Contrato", TituloCorto)) 'Datos NUEVOS @@ -3962,7 +3962,7 @@ Partial Class Contratos_Default Dim params As New List(Of ReportParameter) params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("Contrato", TituloCorto)) 'Datos NUEVOS @@ -4005,7 +4005,7 @@ Partial Class Contratos_Default File.Copy(PathSource, pathDesti) Dim objDoc As New clsGemBoxDocument(pathDesti) - Dim FechaActual As String = Now.Day.ToString("0#") & " de " & CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(1).ToString & " del " & Now.Year.ToString() + Dim FechaActual As String = NowADS().Day.ToString("0#") & " de " & CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(1).ToString & " del " & NowADS().Year.ToString() objDoc.SustituirTags(GetDatosTagsDocumentos) objDoc.Guardar(pathDesti) @@ -4229,7 +4229,7 @@ Partial Class Contratos_Default ' Dim CveVentaAlmacen As Integer = Dr("CveVenta").ToString.ToEntero ' 'Movimiento de salida por traspaso al almacen destino - ' Dim CveMovimientoSalida As Integer = ObjInv.AddMovimiento(CveAlmacenDestino, CveConceptoSalida, CveMoneda, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, DdlSubProyectoContrato.SelectedValue.ToEntero, -1, CveContrato:=CveContrato, CveCliente:=CveCliente, CveAlmacenDestino:=CveAlmacenOrigen) + ' Dim CveMovimientoSalida As Integer = ObjInv.AddMovimiento(CveAlmacenDestino, CveConceptoSalida, CveMoneda, NowADS(), -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, DdlSubProyectoContrato.SelectedValue.ToEntero, -1, CveContrato:=CveContrato, CveCliente:=CveCliente, CveAlmacenDestino:=CveAlmacenOrigen) ' If CveMovimientoSalida > 0 Then ' For Each Row As DataRow In Dt.FiltraParametros($"CvePS IS NOT NULL AND CveVenta = {CveVentaAlmacen}").Rows @@ -4251,7 +4251,7 @@ Partial Class Contratos_Default ' End If ' 'Movimeinto de entrada por traspaso al almacen origen - ' Dim CveMovimientoEntrada As Integer = ObjInv.AddMovimiento(CveAlmacenOrigen, CveConceptoEntrada, CveMoneda, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, DdlSubProyectoContrato.SelectedValue.ToEntero, -1, CveContrato:=CveContratoHijo, CveCliente:=CveCliente, CveAlmacenDestino:=CveAlmacenDestino) + ' Dim CveMovimientoEntrada As Integer = ObjInv.AddMovimiento(CveAlmacenOrigen, CveConceptoEntrada, CveMoneda, NowADS(), -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, DdlSubProyectoContrato.SelectedValue.ToEntero, -1, CveContrato:=CveContratoHijo, CveCliente:=CveCliente, CveAlmacenDestino:=CveAlmacenDestino) ' If CveMovimientoEntrada > 0 Then ' For Each Row As DataRow In Dt.FiltraParametros($"CvePS IS NOT NULL AND CveVenta = {CveVentaAlmacen}").Rows @@ -4595,11 +4595,11 @@ Partial Class Contratos_Default Dim Plantilla As String = TxtObservaciones.Text If Plantilla.Contains("{DIA}") Then - Plantilla = Plantilla.Replace("{DIA}", DateTime.Now.Day.ToString()) + Plantilla = Plantilla.Replace("{DIA}", NowADS().Day.ToString()) End If If Plantilla.Contains("{MES}") Then - Dim fecha As DateTime = DateTime.Now + Dim fecha As DateTime = NowADS() Dim formatoFecha = Globalization.CultureInfo.CurrentCulture.DateTimeFormat Dim nombreMes = formatoFecha.GetMonthName(fecha.Month).ToUpper() @@ -4607,15 +4607,15 @@ Partial Class Contratos_Default End If If Plantilla.Contains("{AÑO}") Then - Plantilla = Plantilla.Replace("{AÑO}", DateTime.Now.Year.ToString()) + Plantilla = Plantilla.Replace("{AÑO}", NowADS().Year.ToString()) End If If Plantilla.Contains("{TC}") Then - Plantilla = Plantilla.Replace("{TC}", GlobalTipoCambio(Now).FormatoNumero) + Plantilla = Plantilla.Replace("{TC}", GlobalTipoCambio(NowADS()).FormatoNumero) End If If Plantilla.Contains("{MESANTERIOR}") Then - Dim fecha As DateTime = DateTime.Now.AddMonths(-1) + Dim fecha As DateTime = NowADS().AddMonths(-1) Dim formatoFecha = Globalization.CultureInfo.CurrentCulture.DateTimeFormat Dim nombreMes = formatoFecha.GetMonthName(fecha.Month).ToUpper() @@ -4623,7 +4623,7 @@ Partial Class Contratos_Default End If If Plantilla.Contains("{INICIOMESANTERIOR}") Then - Dim fecha As DateTime = DateTime.Now.AddMonths(-1) + Dim fecha As DateTime = NowADS().AddMonths(-1) Dim formatoFecha = Globalization.CultureInfo.CurrentCulture.DateTimeFormat Dim nombreMes = formatoFecha.GetMonthName(fecha.Month).ToUpper() @@ -4633,7 +4633,7 @@ Partial Class Contratos_Default End If If Plantilla.Contains("{FINMESANTERIOR}") Then - Dim fecha As DateTime = DateTime.Now.AddMonths(-1) + Dim fecha As DateTime = NowADS().AddMonths(-1) Dim formatoFecha = Globalization.CultureInfo.CurrentCulture.DateTimeFormat Dim nombreMes = formatoFecha.GetMonthName(fecha.Month).ToUpper() @@ -4650,11 +4650,11 @@ Partial Class Contratos_Default Dim Plantilla As String = TxtObsGeneral.Text If Plantilla.Contains("{DIA}") Then - Plantilla = Plantilla.Replace("{DIA}", DateTime.Now.Day.ToString()) + Plantilla = Plantilla.Replace("{DIA}", NowADS().Day.ToString()) End If If Plantilla.Contains("{MES}") Then - Dim fecha As DateTime = DateTime.Now + Dim fecha As DateTime = NowADS() Dim formatoFecha = Globalization.CultureInfo.CurrentCulture.DateTimeFormat Dim nombreMes = formatoFecha.GetMonthName(fecha.Month).ToUpper() @@ -4662,15 +4662,15 @@ Partial Class Contratos_Default End If If Plantilla.Contains("{AÑO}") Then - Plantilla = Plantilla.Replace("{AÑO}", DateTime.Now.Year.ToString()) + Plantilla = Plantilla.Replace("{AÑO}", NowADS().Year.ToString()) End If If Plantilla.Contains("{TC}") Then - Plantilla = Plantilla.Replace("{TC}", GlobalTipoCambio(Now).FormatoNumero) + Plantilla = Plantilla.Replace("{TC}", GlobalTipoCambio(NowADS()).FormatoNumero) End If If Plantilla.Contains("{MESANTERIOR}") Then - Dim fecha As DateTime = DateTime.Now.AddMonths(-1) + Dim fecha As DateTime = NowADS().AddMonths(-1) Dim formatoFecha = Globalization.CultureInfo.CurrentCulture.DateTimeFormat Dim nombreMes = formatoFecha.GetMonthName(fecha.Month).ToUpper() @@ -4678,7 +4678,7 @@ Partial Class Contratos_Default End If If Plantilla.Contains("{INICIOMESANTERIOR}") Then - Dim fecha As DateTime = DateTime.Now.AddMonths(-1) + Dim fecha As DateTime = NowADS().AddMonths(-1) Dim formatoFecha = Globalization.CultureInfo.CurrentCulture.DateTimeFormat Dim nombreMes = formatoFecha.GetMonthName(fecha.Month).ToUpper() @@ -4688,7 +4688,7 @@ Partial Class Contratos_Default End If If Plantilla.Contains("{FINMESANTERIOR}") Then - Dim fecha As DateTime = DateTime.Now.AddMonths(-1) + Dim fecha As DateTime = NowADS().AddMonths(-1) Dim formatoFecha = Globalization.CultureInfo.CurrentCulture.DateTimeFormat Dim nombreMes = formatoFecha.GetMonthName(fecha.Month).ToUpper() diff --git a/Contratos/Contrato.vb b/Contratos/Contrato.vb index 152d82f72..9e0faaffb 100644 --- a/Contratos/Contrato.vb +++ b/Contratos/Contrato.vb @@ -171,7 +171,7 @@ Partial Class Contratos_Default If Request("Opt") IsNot Nothing AndAlso IsNumeric(Request("Opt")) Then Tab.ActiveTabIndex = Request("Opt").ToEntero Else 'Configuración de Modalidad Insert - LblFechaCaptura.Text = Now.ToShortDateString() + LblFechaCaptura.Text = NowADS().ToShortDateString() LblUsuarioCapturo.Text = UsuarioActual.Usuario ViewState("CveContrato") = -1 @@ -1873,7 +1873,7 @@ Partial Class Contratos_Default Dim params As New List(Of ReportParameter) params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("Contrato", Titulo)) If Imagen.Exists Then @@ -1892,7 +1892,7 @@ Partial Class Contratos_Default Dim params As New List(Of ReportParameter) params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("Contrato", Titulo)) 'DATOS DEL CONTRATO params.Add(New ReportParameter("NoContrato", TxtNumeroContrato.Text.Trim)) diff --git a/Contratos/ContratoAvance.aspx.vb b/Contratos/ContratoAvance.aspx.vb index 98077ab3a..d8d7ab00c 100644 --- a/Contratos/ContratoAvance.aspx.vb +++ b/Contratos/ContratoAvance.aspx.vb @@ -560,7 +560,7 @@ Partial Class Contratos_ContratoAvance 'Private Sub BtnDescargarGenerado_Click(sender As Object, e As EventArgs) Handles BtnDescargarGenerado.Click - ' GeneraAnexo(CveEstimacionNueva, NuemeroEstimacionNuevo, Now, DDlContratosEstimaciones.SelectedItem.Text) + ' GeneraAnexo(CveEstimacionNueva, NuemeroEstimacionNuevo, NowADS(), DDlContratosEstimaciones.SelectedItem.Text) 'End Sub diff --git a/Contratos/ContratoObra.aspx.vb b/Contratos/ContratoObra.aspx.vb index 69ebddbdd..bffda357c 100644 --- a/Contratos/ContratoObra.aspx.vb +++ b/Contratos/ContratoObra.aspx.vb @@ -469,7 +469,7 @@ Partial Class Contratos_ContratoObra Else 'Configuración de Modalidad Insert - LblFechaCaptura.Text = Now.ToShortDateString() + LblFechaCaptura.Text = NowADS().ToShortDateString() LblUsuarioCapturo.Text = UsuarioActual.Usuario ViewState("CveContrato") = -1 @@ -2928,7 +2928,7 @@ Partial Class Contratos_ContratoObra params.Add(New ReportParameter("FechaInicio", "-1")) params.Add(New ReportParameter("FechaFin", "-1")) 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", Me.Titulo)) params.Add(New ReportParameter("Estatus", "")) params.Add(New ReportParameter("Tipo", "-1")) @@ -3425,7 +3425,7 @@ Partial Class Contratos_ContratoObra Dim params As New List(Of ReportParameter) params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("Contrato", Titulo)) 'Datos NUEVOS @@ -3459,7 +3459,7 @@ Partial Class Contratos_ContratoObra Dim params As New List(Of ReportParameter) params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("Contrato", TituloCorto)) 'Datos NUEVOS @@ -3497,7 +3497,7 @@ Partial Class Contratos_ContratoObra Dim params As New List(Of ReportParameter) params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("Contrato", TituloCorto)) 'Datos NUEVOS @@ -3524,7 +3524,7 @@ Partial Class Contratos_ContratoObra Dim params As New List(Of ReportParameter) params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("Contrato", TituloCorto)) 'Datos NUEVOS @@ -3552,7 +3552,7 @@ Partial Class Contratos_ContratoObra Dim params As New List(Of ReportParameter) params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("Contrato", TituloCorto)) 'Datos NUEVOS @@ -3594,7 +3594,7 @@ Partial Class Contratos_ContratoObra Dim params As New List(Of ReportParameter) params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("Contrato", TituloCorto)) 'Datos NUEVOS @@ -3637,7 +3637,7 @@ Partial Class Contratos_ContratoObra File.Copy(PathSource, pathDesti) Dim objDoc As New clsGemBoxDocument(pathDesti) - Dim FechaActual As String = Now.Day.ToString("0#") & " de " & CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(1).ToString & " del " & Now.Year.ToString() + Dim FechaActual As String = NowADS().Day.ToString("0#") & " de " & CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(1).ToString & " del " & NowADS().Year.ToString() objDoc.SustituirTags(GetDatosTagsDocumentos) objDoc.Guardar(pathDesti) @@ -3866,7 +3866,7 @@ Partial Class Contratos_ContratoObra ' Dim CveVentaAlmacen As Integer = Dr("CveVenta").ToString.ToEntero ' 'Movimiento de salida por traspaso al almacen destino - ' Dim CveMovimientoSalida As Integer = ObjInv.AddMovimiento(CveAlmacenDestino, CveConceptoSalida, CveMoneda, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, DdlSubProyectoContrato.SelectedValue.ToEntero, -1, CveContrato:=CveContrato, CveCliente:=CveCliente, CveAlmacenDestino:=CveAlmacenOrigen) + ' Dim CveMovimientoSalida As Integer = ObjInv.AddMovimiento(CveAlmacenDestino, CveConceptoSalida, CveMoneda, NowADS(), -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, DdlSubProyectoContrato.SelectedValue.ToEntero, -1, CveContrato:=CveContrato, CveCliente:=CveCliente, CveAlmacenDestino:=CveAlmacenOrigen) ' If CveMovimientoSalida > 0 Then ' For Each Row As DataRow In Dt.FiltraParametros($"CvePS IS NOT NULL AND CveVenta = {CveVentaAlmacen}").Rows @@ -3888,7 +3888,7 @@ Partial Class Contratos_ContratoObra ' End If ' 'Movimeinto de entrada por traspaso al almacen origen - ' Dim CveMovimientoEntrada As Integer = ObjInv.AddMovimiento(CveAlmacenOrigen, CveConceptoEntrada, CveMoneda, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, DdlSubProyectoContrato.SelectedValue.ToEntero, -1, CveContrato:=CveContratoHijo, CveCliente:=CveCliente, CveAlmacenDestino:=CveAlmacenDestino) + ' Dim CveMovimientoEntrada As Integer = ObjInv.AddMovimiento(CveAlmacenOrigen, CveConceptoEntrada, CveMoneda, NowADS(), -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, DdlSubProyectoContrato.SelectedValue.ToEntero, -1, CveContrato:=CveContratoHijo, CveCliente:=CveCliente, CveAlmacenDestino:=CveAlmacenDestino) ' If CveMovimientoEntrada > 0 Then ' For Each Row As DataRow In Dt.FiltraParametros($"CvePS IS NOT NULL AND CveVenta = {CveVentaAlmacen}").Rows @@ -5299,7 +5299,7 @@ Partial Class Contratos_ContratoObra Dim ObjContratos As New ClsContratos - If ObjContratos.AddContratoGasto(CveContrato, TxtGastosDescripcion.Text, TxtGastosImporte.Text.ToDecimal, Now, UsuarioActual.CveUsuario) Then + If ObjContratos.AddContratoGasto(CveContrato, TxtGastosDescripcion.Text, TxtGastosImporte.Text.ToDecimal, NowADS(), UsuarioActual.CveUsuario) Then ErrorProceso = False End If diff --git a/Contratos/ContratoObraAutorizacion.aspx.vb b/Contratos/ContratoObraAutorizacion.aspx.vb index 881aaeac4..c52b77b93 100644 --- a/Contratos/ContratoObraAutorizacion.aspx.vb +++ b/Contratos/ContratoObraAutorizacion.aspx.vb @@ -272,7 +272,7 @@ Partial Class Contratos_ContratoObraAutorizacion Private Sub BtnDescargarGenerado_Click(sender As Object, e As EventArgs) Handles BtnDescargarGenerado.Click - GeneraAnexo(CveEstimacionNueva, NuemeroEstimacionNuevo, Now, DDlContratosEstimaciones.SelectedItem.Text) + GeneraAnexo(CveEstimacionNueva, NuemeroEstimacionNuevo, NowADS(), DDlContratosEstimaciones.SelectedItem.Text) End Sub diff --git a/Contratos/Contratos.aspx.vb b/Contratos/Contratos.aspx.vb index c9c69e3b3..47718ff8f 100644 --- a/Contratos/Contratos.aspx.vb +++ b/Contratos/Contratos.aspx.vb @@ -75,7 +75,7 @@ Partial Class Contratos_Contratos #Region "I M P R I M I R " Protected Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click - GvDatos.ExportToExcel("ReporteCompras" & Now.ToShortDateString) + GvDatos.ExportToExcel("ReporteCompras" & NowADS().ToShortDateString) End Sub Private Sub GenerarPDF() @@ -92,7 +92,7 @@ Partial Class Contratos_Contratos params.Add(New ReportParameter("FechaFin", "-1")) 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("AgrupadoPor", $"Agrupado Por: {Cliente}{Estatus}")) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) ImprimirPDF("Empresas/Grales/Formatos/RepContratos.rdlc", dt, params, "ReporteContratos") diff --git a/Contratos/ContratosSecciones.aspx.vb b/Contratos/ContratosSecciones.aspx.vb index c312fd5c5..acda57fa7 100644 --- a/Contratos/ContratosSecciones.aspx.vb +++ b/Contratos/ContratosSecciones.aspx.vb @@ -101,7 +101,7 @@ Partial Class Contratos_ContratosSecciones ' DdlPS.Items.Insert(0, New System.Web.UI.WebControls.ListItem("Todas", "-1")) - ' 'Me.txtFechaF.Text = Now.ToShortDateString + ' 'Me.txtFechaF.Text = NowADS().ToShortDateString ' 'Dim Row() As DataRow = GlobalDTFechasContratosSecciones.Select("CveContratosQueja = -1 AND CveEstatus = 1") ' 'If Row.Length > 0 Then ' ' txtFechaI.Text = Row(0)("Fecha").ToString.ToDate.ToShortDateString() @@ -120,8 +120,8 @@ Partial Class Contratos_ContratosSecciones ' ' TrBitacora.Visible = True ' ' LblTitulo.Text = "Bitácoras" ' ' Page.Title = "SAT - Imprimir Bitácoras" - ' ' TxtFechaIBit.Text = Now.ToShortDateString - ' ' TxtFechaFBit.Text = Now.ToShortDateString + ' ' TxtFechaIBit.Text = NowADS().ToShortDateString + ' ' TxtFechaFBit.Text = NowADS().ToShortDateString ' 'End If ' End Sub diff --git a/Contratos/Estimaciones.aspx.vb b/Contratos/Estimaciones.aspx.vb index a4804defb..c12ae8a0c 100644 --- a/Contratos/Estimaciones.aspx.vb +++ b/Contratos/Estimaciones.aspx.vb @@ -113,7 +113,7 @@ Partial Class Contratos_Estimaciones 'debe de ser por contrato el movimiento If Str.Length > 0 Then Dim Con As New ClsContratos - Con.AddEstimaciones(7, Now, -1, -1, Str.ToString, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + Con.AddEstimaciones(7, NowADS(), -1, -1, Str.ToString, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Con.Dispose() End If CargaDatos() diff --git a/Contratos/FacturacionMasiva.aspx.vb b/Contratos/FacturacionMasiva.aspx.vb index a39bb1f7b..b2f28a7b1 100644 --- a/Contratos/FacturacionMasiva.aspx.vb +++ b/Contratos/FacturacionMasiva.aspx.vb @@ -92,7 +92,7 @@ Partial Class Contratos_FacturacionMasiva If Not IsPostBack Then FolioVigentes = False CargaCombos() - Dim FechaRef = DateTime.Now + Dim FechaRef = NowADS() txtFechaI.Text = $"01/{FechaRef.Month}/{FechaRef.Year}" txtFechaF.Text = txtFechaI.Text.ToDate().AddMonths(1).ToString("dd/MM/yyyy") CargaDatos(-1, -1) @@ -120,11 +120,11 @@ Partial Class Contratos_FacturacionMasiva For Each Row As DataRow In ObjContratos.DtResultados().FiltraParametros($"FueFacturado = 0").Rows If Row("Observaciones").ToString().Contains("{DIA}") Then - Row("Observaciones") = Row("Observaciones").ToString().Replace("{DIA}", DateTime.Now.Day.ToString()) + Row("Observaciones") = Row("Observaciones").ToString().Replace("{DIA}", NowADS().Day.ToString()) End If If Row("Observaciones").ToString().Contains("{MES}") Then - Dim fecha As DateTime = DateTime.Now + Dim fecha As DateTime = NowADS() Dim formatoFecha = Globalization.CultureInfo.CurrentCulture.DateTimeFormat Dim nombreMes = formatoFecha.GetMonthName(fecha.Month).ToUpper() @@ -132,7 +132,7 @@ Partial Class Contratos_FacturacionMasiva End If If Row("Observaciones").ToString().Contains("{MESANTERIOR}") Then - Dim fecha As DateTime = DateTime.Now.AddMonths(-1) + Dim fecha As DateTime = NowADS().AddMonths(-1) Dim formatoFecha = Globalization.CultureInfo.CurrentCulture.DateTimeFormat Dim nombreMes = formatoFecha.GetMonthName(fecha.Month).ToUpper() @@ -140,11 +140,11 @@ Partial Class Contratos_FacturacionMasiva End If If Row("Observaciones").ToString().Contains("{AÑO}") Then - Row("Observaciones") = Row("Observaciones").ToString().Replace("{AÑO}", DateTime.Now.Year.ToString()) + Row("Observaciones") = Row("Observaciones").ToString().Replace("{AÑO}", NowADS().Year.ToString()) End If If Row("Observaciones").ToString().Contains("{TC}") Then - Row("Observaciones") = Row("Observaciones").ToString().Replace("{TC}", GlobalTipoCambio(Now).FormatoNumero) + Row("Observaciones") = Row("Observaciones").ToString().Replace("{TC}", GlobalTipoCambio(NowADS()).FormatoNumero) End If DTCicloComercial.Rows.Add(Row.ItemArray) @@ -421,7 +421,7 @@ Partial Class Contratos_FacturacionMasiva ObjFactura.Folio = -1 ObjFactura.Serie = "-1" 'ObjFactura.CveMesa = -1 - ObjFactura.Fecha = If(DR("FechaVenc").ToString.ToDate > Now, Now, DR("FechaVenc").ToString.ToDate) + ObjFactura.Fecha = If(DR("FechaVenc").ToString.ToDate > NowADS(), NowADS(), DR("FechaVenc").ToString.ToDate) ObjFactura.CvePrePoliza = -1 ObjFactura.CveMetodoPago = 1 diff --git a/Contratos/ModificarPresupuesto.aspx.vb b/Contratos/ModificarPresupuesto.aspx.vb index 9d7dd45dc..a15b37859 100644 --- a/Contratos/ModificarPresupuesto.aspx.vb +++ b/Contratos/ModificarPresupuesto.aspx.vb @@ -94,7 +94,7 @@ Partial Class Contratos_ModificarPresupuesto Dim CveUsuario = -1 Dim Agrupador = 1 'CLASIFICACION If CvePresupuesto > 0 Then - TxtFecha.Text = Now.ToString("dd/MM/yyyy") + TxtFecha.Text = NowADS().ToString("dd/MM/yyyy") Dim DrPresupuesto = DtPresupuestos.FiltroPrimero($"CvePresupuesto = {CvePresupuesto}") 'Dim DrPresupuesto = DtPresupuestos.AsEnumerable.Where(Function(a) a("CvePresupuesto").ToString.ToEntero = CvePresupuesto).FirstOrDefault diff --git a/Contratos/Presupuestos.aspx.vb b/Contratos/Presupuestos.aspx.vb index 4573c51e7..ef8d30620 100644 --- a/Contratos/Presupuestos.aspx.vb +++ b/Contratos/Presupuestos.aspx.vb @@ -60,8 +60,8 @@ Partial Class Contratos_Presupuestos #Region "I N I C I A L I Z A - V A L O R E S" Private Sub InicializaValores() - TxtFechaI.Text = $"01/01/{Now.Year}" - TxtFechaF.Text = Now.ToShortDateString + TxtFechaI.Text = $"01/01/{NowADS().Year}" + TxtFechaF.Text = NowADS().ToShortDateString CargaProyecto() CargaMoneda() End Sub @@ -306,7 +306,7 @@ Partial Class Contratos_Presupuestos Dim CveProyecto = DdlProyecto.SelectedValue.ToEntero Dim FechaI = TxtFechaI.Text.ToDate Dim FechaF = TxtFechaF.Text.ToDate - Dim FechaIng = Now + Dim FechaIng = NowADS() Dim CveSubProyecto = DdlSubProyecto.SelectedValue.ToEntero Dim Archivo = "" Dim Estatus = 1 @@ -314,7 +314,7 @@ Partial Class Contratos_Presupuestos Dim ObjCont As New ClsContratos ObjCont.IniciaTransacSQL() - TieneError = Not ObjCont.UpdatePresupuesto(CvePresupuesto, Nombre, Observacion, CveSubProyecto, FechaI, FechaF, Estatus, Archivo, Now, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + TieneError = Not ObjCont.UpdatePresupuesto(CvePresupuesto, Nombre, Observacion, CveSubProyecto, FechaI, FechaF, Estatus, Archivo, NowADS(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) If Not TieneError Then For Each GvRow As GridViewRow In GvPresupuestos.Rows @@ -378,7 +378,7 @@ Partial Class Contratos_Presupuestos Dim CveProyecto = DdlProyecto.SelectedValue.ToEntero Dim FechaI = TxtFechaI.Text.ToDate Dim FechaF = TxtFechaF.Text.ToDate - Dim FechaIng = Now + Dim FechaIng = NowADS() Dim CveSubProyecto = DdlSubProyecto.SelectedValue.ToEntero Dim Archivo = "" Dim TieneError = False @@ -389,7 +389,7 @@ Partial Class Contratos_Presupuestos If ObjCont.GetContratosEstatus(UsuarioActual.CveEmpresa) Then - Dim CvePresupuestoNuevo = ObjCont.AddPresupuesto(Nombre, Observacion, CveSubProyecto, FechaI, FechaF, Estatus, Archivo, Now, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + Dim CvePresupuestoNuevo = ObjCont.AddPresupuesto(Nombre, Observacion, CveSubProyecto, FechaI, FechaF, Estatus, Archivo, NowADS(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) If CvePresupuestoNuevo > 0 Then Dim ImporteClasi = 0.0D @@ -497,7 +497,7 @@ Partial Class Contratos_Presupuestos End Sub Protected Sub LnkFormatoPresup_Click(sender As Object, e As EventArgs) Handles LnkFormatoPresup.Click - GvPresupuestos.ExportToExcelX("Plantilla Presupuesto " + DateTime.Now.ToShortDateString) + GvPresupuestos.ExportToExcelX("Plantilla Presupuesto " + NowADS().ToShortDateString) End Sub Protected Sub LnkCargarPresup_Click(sender As Object, e As EventArgs) Handles LnkCargarPresup.Click diff --git a/Contratos/RepContratosAvancesCP.aspx.vb b/Contratos/RepContratosAvancesCP.aspx.vb index 1234ee355..843b4d293 100644 --- a/Contratos/RepContratosAvancesCP.aspx.vb +++ b/Contratos/RepContratosAvancesCP.aspx.vb @@ -121,7 +121,7 @@ Partial Class Contratos_RepContratosAvancesCP #Region "Imprimir" Protected Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click - GvDatos.ExportToExcel("ReporteCompras" & Now.ToShortDateString) + GvDatos.ExportToExcel("ReporteCompras" & NowADS().ToShortDateString) End Sub Private Sub GenerarPDF() @@ -141,7 +141,7 @@ Partial Class Contratos_RepContratosAvancesCP params.Add(New ReportParameter("FechaFin", "-1")) 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("AgrupadoPor", $"Agrupado Por: {Cliente}{Estatus}{Tipo}{Grupo}")) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) ImprimirPDF("Empresas/Grales/Formatos/RepContratosAvanceCP.rdlc", dt, params, "ReporteContratosAvanceCP") diff --git a/Contratos/RepContratosCostos.aspx.vb b/Contratos/RepContratosCostos.aspx.vb index e1157792e..919d9cdfe 100644 --- a/Contratos/RepContratosCostos.aspx.vb +++ b/Contratos/RepContratosCostos.aspx.vb @@ -20,8 +20,8 @@ Partial Class Contratos_RepContratosCostos Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load If Not Page.IsPostBack Then - txtFechaI.Text = Now.FirstDayOfMonth.ToShortDateString - txtFechaF.Text = Now.LastDayOfMonth.ToShortDateString + txtFechaI.Text = NowADS().FirstDayOfMonth.ToShortDateString + txtFechaF.Text = NowADS().LastDayOfMonth.ToShortDateString CargaDatos() @@ -85,7 +85,7 @@ Partial Class Contratos_RepContratosCostos 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("Contrato", Contrato.Text)) params.Add(New ReportParameter("Estatus", DdlEstatus.SelectedItem.Text)) params.Add(New ReportParameter("Tipo", DdlTipo.SelectedItem.Text)) diff --git a/Contratos/RepContratosFianzas.aspx.cs b/Contratos/RepContratosFianzas.aspx.cs index 6096a2dd7..c6fbb2851 100644 --- a/Contratos/RepContratosFianzas.aspx.cs +++ b/Contratos/RepContratosFianzas.aspx.cs @@ -128,7 +128,7 @@ public partial class Contratos_RepContratosFianzas : ClsPaginas @params.Add(new ReportParameter("FechaInicio", FechaI)); @params.Add(new ReportParameter("FechaFin", FechaF)); @params.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)); - @params.Add(new ReportParameter("FechaImpresion", DateTime.Now.ToShortDateString())); + @params.Add(new ReportParameter("FechaImpresion", NowADS().ToShortDateString())); @params.Add(new ReportParameter("Contrato", Contrato.Text)); @params.Add(new ReportParameter("Estatus", Estatus.Text)); @params.Add(new ReportParameter("LogoPath", Imagen.Exists ? $"file://{Imagen.FullName}" : "")); diff --git a/Contratos/RepContratosObraAvancesDetalle.aspx.vb b/Contratos/RepContratosObraAvancesDetalle.aspx.vb index c19b65748..f242449b1 100644 --- a/Contratos/RepContratosObraAvancesDetalle.aspx.vb +++ b/Contratos/RepContratosObraAvancesDetalle.aspx.vb @@ -98,7 +98,7 @@ Partial Class RepContratosObraAvancesDetalle Dim TotalFaltantePorcentaje As Decimal = 100 - TotalAvancePorcentaje Dim FechaFinal As Date = DTDatos(0)("FechaFinal").ToString.ToDate - Dim Dias As Integer = (FechaFinal - Now).Days + Dim Dias As Integer = (FechaFinal - NowADS()).Days diff --git a/Contratos/RepContratosSuministros.aspx.vb b/Contratos/RepContratosSuministros.aspx.vb index 4e722ea3f..637f09b90 100644 --- a/Contratos/RepContratosSuministros.aspx.vb +++ b/Contratos/RepContratosSuministros.aspx.vb @@ -20,8 +20,8 @@ Partial Class Contratos_RepContratosSuministros Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load If Not Page.IsPostBack Then - txtFechaI.Text = Now.FirstDayOfMonth.ToShortDateString - txtFechaF.Text = Now.LastDayOfMonth.ToShortDateString + txtFechaI.Text = NowADS().FirstDayOfMonth.ToShortDateString + txtFechaF.Text = NowADS().LastDayOfMonth.ToShortDateString CargaDatos() @@ -84,7 +84,7 @@ Partial Class Contratos_RepContratosSuministros '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("Contrato", Contrato.Text)) params.Add(New ReportParameter("AgrupadoPor", $"{FechaI}{FechaF}{Contrato}{Estatus}{Tipo}")) diff --git a/Contratos/RepPedidosDevolucionesXContrato.aspx.vb b/Contratos/RepPedidosDevolucionesXContrato.aspx.vb index 2f1cbb463..7054eaa51 100644 --- a/Contratos/RepPedidosDevolucionesXContrato.aspx.vb +++ b/Contratos/RepPedidosDevolucionesXContrato.aspx.vb @@ -20,8 +20,8 @@ Partial Class Ventas_RepPedidosDevolucionesXContrato Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load If Not Page.IsPostBack Then - txtFechaI.Text = Now.FirstDayOfMonth.AddYears(-1).ToShortDateString - txtFechaF.Text = Now.ToShortDateString + txtFechaI.Text = NowADS().FirstDayOfMonth.AddYears(-1).ToShortDateString + txtFechaF.Text = NowADS().ToShortDateString CargaContratos() End If @@ -78,7 +78,7 @@ Partial Class Ventas_RepPedidosDevolucionesXContrato 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("Contrato", Contrato.Text)) params.Add(New ReportParameter("Estatus", "")) params.Add(New ReportParameter("Tipo", DdlTipo.SelectedItem.Text)) diff --git a/Contratos/RepPresupuestos.aspx.vb b/Contratos/RepPresupuestos.aspx.vb index 990a416df..072b886aa 100644 --- a/Contratos/RepPresupuestos.aspx.vb +++ b/Contratos/RepPresupuestos.aspx.vb @@ -30,8 +30,8 @@ Partial Class Contratos_RepPresupuestos #Region " INICIALIZA VALORES " Private Sub InicializaValores() - TxtFiltrosFechaInicio.Text = $"01/08/{Now.Year - 1}" - TxtFiltrosFechaFin.Text = $"31/07/{Now.Year}" + TxtFiltrosFechaInicio.Text = $"01/08/{NowADS().Year - 1}" + TxtFiltrosFechaFin.Text = $"31/07/{NowADS().Year}" DdlTipoGasto.DataSource = GlobalDTTiposGastos(UsuarioActual.CveEmpresa) DdlTipoGasto.DataBind() @@ -548,7 +548,7 @@ Partial Class Contratos_RepPresupuestos 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("AgrupadoPor", $"{FechaIn}{FechaFn}{Agrupador}{Proyecto}{SubProyecto}{Clasificacion}{TipoGasto}")) params.Add(New ReportParameter("Autorizado", LtlAutorizado.Text.FormatoNumero())) params.Add(New ReportParameter("Ejercido", LtlEjercido.Text.FormatoNumero())) diff --git a/Contratos/RepPresupuestosDetalle.aspx.vb b/Contratos/RepPresupuestosDetalle.aspx.vb index af74319ad..06966b86a 100644 --- a/Contratos/RepPresupuestosDetalle.aspx.vb +++ b/Contratos/RepPresupuestosDetalle.aspx.vb @@ -42,8 +42,8 @@ Partial Class Contratos_RepPresupuestosDetalle #Region " INICIALIZA VALORES " Private Sub InicializaValores() - TxtFiltrosFechaInicio.Text = $"01/09/{Now.Year - 1}" - TxtFiltrosFechaFin.Text = $"31/08/{Now.Year}" + TxtFiltrosFechaInicio.Text = $"01/09/{NowADS().Year - 1}" + TxtFiltrosFechaFin.Text = $"31/08/{NowADS().Year}" Dim dtAgrupador = (From dr In GlobalDTClasificaciones(UsuarioActual.CveEmpresa) Select New With {.CveAgrupador = dr("CveClasificacion").ToString().ToEntero(), .Agrupador = dr("Clasificacion").ToString()} @@ -78,8 +78,8 @@ Partial Class Contratos_RepPresupuestosDetalle End Sub Private Sub CargaUrlParametros() Dim CveClasificacion = IfNull(Request("CveClasificacion"), -1).ToString.ToEntero - Dim FechaInicio = IfNull(Request("FechaInicio"), $"01/09/{Now.Year}").ToString - Dim FechaFin = IfNull(Request("FechaFin"), $"31/08/{Now.Year + 1}").ToString + Dim FechaInicio = IfNull(Request("FechaInicio"), $"01/09/{NowADS().Year}").ToString + Dim FechaFin = IfNull(Request("FechaFin"), $"31/08/{NowADS().Year + 1}").ToString Dim CveProyecto = IfNull(Request("CveProyecto"), -1).ToString.ToEntero Dim CveSubProyecto = IfNull(Request("CveSubProyecto"), -1).ToString.ToEntero Dim CveTipoGasto = IfNull(Request("CveTipoGasto"), -1).ToString.ToEntero @@ -343,7 +343,7 @@ Partial Class Contratos_RepPresupuestosDetalle 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("AgrupadoPor", $"{FechaIn}{FechaFn}{Agrupador}{Proyecto}{SubProyecto}{Clasificacion}{TipoGasto}")) params.Add(New ReportParameter("Autorizado", DtPresupuestos.Rows(0)("Autorizado").ToString.FormatoNumero())) params.Add(New ReportParameter("Ejercido", DtPresupuestos.Rows(0)("Ejercido").ToString.FormatoNumero())) diff --git a/Contratos/RepPresupuestosDetalleCompras.aspx.vb b/Contratos/RepPresupuestosDetalleCompras.aspx.vb index 89ac7a195..08d386d3f 100644 --- a/Contratos/RepPresupuestosDetalleCompras.aspx.vb +++ b/Contratos/RepPresupuestosDetalleCompras.aspx.vb @@ -30,8 +30,8 @@ Partial Class Contratos_RepPresupuestosDetalleCompras #Region " INICIALIZA VALORES " Private Sub InicializaValores() - TxtFiltrosFechaInicio.Text = $"01/09/{Now.Year - 1}" - TxtFiltrosFechaFin.Text = $"31/08/{Now.Year}" + TxtFiltrosFechaInicio.Text = $"01/09/{NowADS().Year - 1}" + TxtFiltrosFechaFin.Text = $"31/08/{NowADS().Year}" Dim dtAgrupador = (From dr In GlobalDTClasificaciones(UsuarioActual.CveEmpresa) Select New With {.CveAgrupador = dr("CveClasificacion").ToString().ToEntero(), .Agrupador = dr("Clasificacion").ToString()} @@ -66,8 +66,8 @@ Partial Class Contratos_RepPresupuestosDetalleCompras End Sub Private Sub CargaUrlParametros() Dim CveClasificacion = IfNull(Request("CveClasificacion"), -1).ToString.ToEntero - Dim FechaInicio = IfNull(Request("FechaInicio"), $"01/09/{Now.Year}").ToString - Dim FechaFin = IfNull(Request("FechaFin"), $"31/08/{Now.Year + 1}").ToString + Dim FechaInicio = IfNull(Request("FechaInicio"), $"01/09/{NowADS().Year}").ToString + Dim FechaFin = IfNull(Request("FechaFin"), $"31/08/{NowADS().Year + 1}").ToString Dim CveProyecto = IfNull(Request("CveProyecto"), -1).ToString.ToEntero Dim CveSubProyecto = IfNull(Request("CveSubProyecto"), -1).ToString.ToEntero Dim CveTipoGasto = IfNull(Request("CveTipoGasto"), -1).ToString.ToEntero diff --git a/CxC/GestionCobranza.aspx.vb b/CxC/GestionCobranza.aspx.vb index 836c147bf..08631a82b 100644 --- a/CxC/GestionCobranza.aspx.vb +++ b/CxC/GestionCobranza.aspx.vb @@ -198,7 +198,7 @@ Partial Class Ventas_GestionCobranza params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("FechaInicio", If(txtFechaI.Text = "", "", txtFechaI.Text))) params.Add(New ReportParameter("FechaFin", If(txtFechaF.Text = "", "", txtFechaF.Text))) 'params.Add(New ReportParameter("Cobrador", DdlUsuarioCobranza.SelectedItem.Text)) @@ -226,7 +226,7 @@ Partial Class Ventas_GestionCobranza TipoCambio = RblTipoCambio.SelectedValue.ToEntero If TipoCambio = 3 Then LiEspecifico.Visible = True - TCEspecifico = GlobalTipoCambio(Now).ToDecimal + TCEspecifico = GlobalTipoCambio(NowADS()).ToDecimal TxtEspecifico.Text = TCEspecifico.ToString Else LiEspecifico.Visible = False diff --git a/CxC/RepCxC.aspx.vb b/CxC/RepCxC.aspx.vb index 4d164ee30..71a394c9e 100644 --- a/CxC/RepCxC.aspx.vb +++ b/CxC/RepCxC.aspx.vb @@ -174,7 +174,7 @@ Partial Class RepCxC DdlResponsable.DataBind() ' DdlTipoDocto.Items.Add(New ListItem("Ing X Comp", "IxC")) - txtCorteA.Text = $"31/12/{Now.Year}" + txtCorteA.Text = $"31/12/{NowADS().Year}" 'Carga Cobranza Estatus DdlCobranzaEstatus.DataSource = GlobalDTVtaCobranzaEstatus(UsuarioActual.CveEmpresa) @@ -760,7 +760,7 @@ Partial Class RepCxC params.Add(New ReportParameter("FechaInicio", FechaI)) params.Add(New ReportParameter("FechaFin", FechaF)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString)) params.Add(New ReportParameter("Grupo", DdlGrupo.SelectedItem.Text)) params.Add(New ReportParameter("AgrupadoPor", $"{Cliente}{Sucursal}{Grupo}{Vendedor}{FechaIn}{FechaFn}{Registro}{Responsable}{TipoDocto}{EstatusCob}{FVI}{FVF}{EstatusCli}{ClasificacionCli}{CorteA}")) params.Add(New ReportParameter("TituloReporte", TituloReporte)) @@ -782,7 +782,7 @@ Partial Class RepCxC If RblTipoCambio.SelectedValue.ToEntero = 3 Then Dim TipoCambio As Double LiEspecifico.Visible = True - TipoCambio = GlobalTipoCambio(Now) + TipoCambio = GlobalTipoCambio(NowADS()) TxtEspecifico.Text = TipoCambio.ToString Else LiEspecifico.Visible = False @@ -999,7 +999,7 @@ Partial Class RepCxC Select Case UsuarioActual.CveEmpresa Case 4 - Mensaje = $"Cliente de VSH Seguridad su saldo pendiente es de {StrSaldo} fecha limite 25/{Now.ToString("MM/yyyy")} llamar al 6622106400 #REFERENCIA {If(UsuarioActual.CveEmpresa = 4, Dr("NombreCorto").ToString, Dr("CodigoCliente").ToString)} " + Mensaje = $"Cliente de VSH Seguridad su saldo pendiente es de {StrSaldo} fecha limite 25/{NowADS().ToString("MM/yyyy")} llamar al 6622106400 #REFERENCIA {If(UsuarioActual.CveEmpresa = 4, Dr("NombreCorto").ToString, Dr("CodigoCliente").ToString)} " End Select If StrSaldo.Length > 0 Then @@ -1095,7 +1095,7 @@ Partial Class RepCxC If ObjMov.GetDescargaSegmentos(UsuarioActual.CveEmpresa) Then If ObjMov.DtResultados.Rows.Count > 0 Then Dim SB As New StringBuilder - SB.Append($"HDBNCPM0099990100000299903204{Now.ToString("dd")}{Now.ToString("MM")}{Now.Year}05{Now.ToString("MM")}{Now.Year}060307 ") + SB.Append($"HDBNCPM0099990100000299903204{NowADS().ToString("dd")}{NowADS().ToString("MM")}{NowADS().Year}05{NowADS().ToString("MM")}{NowADS().Year}060307 ") For Each Dr As DataRow In ObjMov.DtResultados.Rows SB.Append("EM") SB.Append("EM") diff --git a/CxC/RepCxCDetalle.aspx.vb b/CxC/RepCxCDetalle.aspx.vb index d8eb1cdfc..a68d4d298 100644 --- a/CxC/RepCxCDetalle.aspx.vb +++ b/CxC/RepCxCDetalle.aspx.vb @@ -233,7 +233,7 @@ Partial Class RepCxCDetalle ChkCuentaContableReferencia.Visible = True End If CargaAsignarCobranza() - TxtFechaCobranza.Text = Now.ToShortDateString + TxtFechaCobranza.Text = NowADS().ToShortDateString If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then DVCartera.Visible = True @@ -248,7 +248,7 @@ Partial Class RepCxCDetalle Dim CveCliente, CveVendedor, CveUsuario, CveSubProyecto, CveEstatus, CveResponsable, CveAgrupador, CveClienteClasificacion As Integer - txtFechaF.Text = Now.LastDayOfMonth.ToShortDateString + txtFechaF.Text = NowADS().LastDayOfMonth.ToShortDateString If UsuarioActual.Empresa.Funcionalidad(105) = "1" Then DdlClientesWS.setEsWebService(True) @@ -293,7 +293,7 @@ Partial Class RepCxCDetalle FechaF = If(Request("FechaF") IsNot Nothing, Request("FechaF").ToString, "-1").ToString FechaVI = If(Request("FechaVI") IsNot Nothing, Request("FechaVI").ToString, "-1").ToString FechaVF = If(Request("FechaVF") IsNot Nothing, Request("FechaVF").ToString, "-1").ToString - FechaCorte = IfNull(Request("FechaCorte"), Now.ToDate.ToString).ToString + FechaCorte = IfNull(Request("FechaCorte"), NowADS().ToDate.ToString).ToString CveCobranzaEstatus = If(Request("CveCobranzaEstatus") IsNot Nothing, Request("CveCobranzaEstatus").ToString, "-1").ToString.ToEntero CveClienteClasificacion = If(Request("CveClienteClasificacion") IsNot Nothing, Request("CveClienteClasificacion").ToString, "-1").ToString.ToEntero LimiteCredito = If(Request("LimiteCredito") IsNot Nothing, Request("LimiteCredito").ToString, "-1").ToString.ToDecimal @@ -321,7 +321,7 @@ Partial Class RepCxCDetalle txtFechaF.Text = Fecha End If - txtCorteA.Text = $"31/12/{Now.Year}" + txtCorteA.Text = $"31/12/{NowADS().Year}" txtFechaI.Text = If(Anio <> -1, String.Format("01/01/{0}", Anio), txtFechaI.Text) txtFechaI.Text = If(Mes <> -1, txtFechaI.Text, txtFechaI.Text) @@ -393,7 +393,7 @@ Partial Class RepCxCDetalle Else Dim TipoCambio As Double LiEspecifico.Visible = True - TipoCambio = GlobalTipoCambio(Now) + TipoCambio = GlobalTipoCambio(NowADS()) TxtEspecifico.Text = TipoCambio.ToString End If End If @@ -1011,7 +1011,7 @@ Partial Class RepCxCDetalle 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("AgrupadoPor", $"{Cliente}{Sucursal}{Grupo}{Vendedor}{FechaIn}{FechaFn}{Registro}{Responsable}{TipoDocto}{EstatusCob}{FVI}{FVF}{ClasificacionCli}{CorteA}")) params.Add(New ReportParameter("TituloReporte", TituloReporte)) @@ -1063,7 +1063,7 @@ Partial Class RepCxCDetalle If RblTipoCambio.SelectedValue.ToEntero = 3 Then Dim TipoCambio As Double LiEspecifico.Visible = True - TipoCambio = GlobalTipoCambio(Now) + TipoCambio = GlobalTipoCambio(NowADS()) TxtEspecifico.Text = TipoCambio.ToString Else LiEspecifico.Visible = False @@ -1290,7 +1290,7 @@ Partial Class RepCxCDetalle worksheet.Rows(IndexEndTable + 1).Cells(1).Value = Usuario.Nombre worksheet.Rows(IndexEndTable).Cells(3).Value = "Fecha Impresión" - worksheet.Rows(IndexEndTable + 1).Cells(3).Value = DateTime.Now.ToString("dd/MM/yyyy") + worksheet.Rows(IndexEndTable + 1).Cells(3).Value = NowADS().ToString("dd/MM/yyyy") Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", Usuario.Empresa.Ruta)) diff --git a/CxC/RepCxCPeriodo.aspx.cs b/CxC/RepCxCPeriodo.aspx.cs index 83ab94427..277c96ef7 100644 --- a/CxC/RepCxCPeriodo.aspx.cs +++ b/CxC/RepCxCPeriodo.aspx.cs @@ -78,7 +78,7 @@ public partial class CxC_RepCxCPeriodo : ClsPaginas DdlResponsable.DataSource = get_GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa); DdlResponsable.DataBind(); - txtCorteA.Text = $"31/12/{DateTime.Now.Year}"; + txtCorteA.Text = $"31/12/{NowADS().Year}"; //Carga Cobranza Estatus DdlCobranzaEstatus.DataSource = get_GlobalDTVtaCobranzaEstatus(UsuarioActual.CveEmpresa); @@ -161,7 +161,7 @@ public partial class CxC_RepCxCPeriodo : ClsPaginas if (TipoCambio == 3) { LiEspecifico.Visible = true; - TCEspecifico = get_GlobalTipoCambio(DateTime.Now); + TCEspecifico = get_GlobalTipoCambio(NowADS()); TxtEspecifico.Text = TCEspecifico.ToString(); } else @@ -328,7 +328,7 @@ public partial class CxC_RepCxCPeriodo : ClsPaginas List para = new List(); para.Add(new ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)); para.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)); - para.Add(new ReportParameter("FechaImpresion", DateTime.Now.ToShortDateString())); + para.Add(new ReportParameter("FechaImpresion", NowADS().ToShortDateString())); para.Add(new ReportParameter("Filtros", StrFiltro.ToString())); if (Imagen.Exists) { @@ -338,7 +338,7 @@ public partial class CxC_RepCxCPeriodo : ClsPaginas { para.Add(new ReportParameter("LogoPath", "")); } - ImprimirPDF(RutaPDF, DtDatos, para, "RepCxCPeriodo" + DateTime.Now.ToString("yyyyMMddhhmmss"), Opcion); + ImprimirPDF(RutaPDF, DtDatos, para, "RepCxCPeriodo" + NowADS().ToString("yyyyMMddhhmmss"), Opcion); } protected void GvDatos_RowDataBound(object sender, GridViewRowEventArgs e) { diff --git a/CxC/RepCxCSemanal.aspx.vb b/CxC/RepCxCSemanal.aspx.vb index b34046384..86d85e691 100644 --- a/CxC/RepCxCSemanal.aspx.vb +++ b/CxC/RepCxCSemanal.aspx.vb @@ -259,6 +259,6 @@ Partial Class CxC_RepCxCSemanal End Sub 'Protected Sub ImgExcel_Click(sender As Object, e As System.EventArgs) Handles ImgExcel.Click - ' GvDatos.ExportToExcel("ReporteCxC_" & Now.ToShortDateString) + ' GvDatos.ExportToExcel("ReporteCxC_" & NowADS().ToShortDateString) 'End Sub End Class diff --git a/Documentacion/TableroMaterialidad.aspx.cs b/Documentacion/TableroMaterialidad.aspx.cs index 1e14b1ed5..765a4f253 100644 --- a/Documentacion/TableroMaterialidad.aspx.cs +++ b/Documentacion/TableroMaterialidad.aspx.cs @@ -75,8 +75,8 @@ public partial class Documentacion_TableroMaterialidad : ClsPaginas if (!IsPostBack) { - Txtanio.Text = DateTime.Now.Year.ToString(); - int mes = DateTime.Now.Month; + Txtanio.Text = NowADS().Year.ToString(); + int mes = NowADS().Month; ddlMes.SelectedValueExist(String.Format("{0}{1}", (mes < 10 ? "0" : ""), mes)); Txtanio.Text = "2021"; ddlMes.SelectedValueExist("11"); diff --git a/Edoc/Contratos.aspx.vb b/Edoc/Contratos.aspx.vb index 5e531a8e4..fe005fe36 100644 --- a/Edoc/Contratos.aspx.vb +++ b/Edoc/Contratos.aspx.vb @@ -39,8 +39,8 @@ Partial Class Proveedores_Contratos CargaCombos() CargaDatos() - txtFechaI.Text = $"01/01/{Now.Year}" - txtFechaF.Text = $"31/12/{Now.AddYears(3).Year}" + txtFechaI.Text = $"01/01/{NowADS().Year}" + txtFechaF.Text = $"31/12/{NowADS().AddYears(3).Year}" End If diff --git a/Empresas/119/Formatos/Cotizacion.rdlc b/Empresas/119/Formatos/Cotizacion.rdlc index 6881a405a..51e22dcf5 100644 --- a/Empresas/119/Formatos/Cotizacion.rdlc +++ b/Empresas/119/Formatos/Cotizacion.rdlc @@ -2781,6 +2781,18 @@ true ReportParameter1 + + String + true + true + ReportParameter1 + + + String + true + true + ReportParameter1 + diff --git a/Empresas/119/Formatos/DevolucionCliente.rdlc b/Empresas/119/Formatos/DevolucionCliente.rdlc index 6aca3ed7e..586f4d00b 100644 --- a/Empresas/119/Formatos/DevolucionCliente.rdlc +++ b/Empresas/119/Formatos/DevolucionCliente.rdlc @@ -1,5 +1,5 @@ - + 0 @@ -1636,6 +1636,18 @@ Hermosillo, Sonora, Mexico true ReportParameter1 + + String + true + true + ReportParameter1 + + + String + true + true + ReportParameter1 + diff --git a/Empresas/119/Formatos/DevolucionConsignacion.rdlc b/Empresas/119/Formatos/DevolucionConsignacion.rdlc index bffbd1f5a..7269b08cd 100644 --- a/Empresas/119/Formatos/DevolucionConsignacion.rdlc +++ b/Empresas/119/Formatos/DevolucionConsignacion.rdlc @@ -1,5 +1,5 @@ - + 0 @@ -53,18 +53,10 @@ Almacen System.String - - SerieLote + + Serie System.String - - Lote - System.String - - - FechaCaducidad - System.Date - DsInventarios @@ -87,19 +79,16 @@ 1.29426cm - 2.1047cm + 2.28892cm - 2.02126cm + 2.26037cm - 9.49634cm + 11.53418cm - 2.00734cm - - - 2.99034cm + 2.53651cm @@ -305,7 +294,7 @@ - Lote + Serie - - - - - - Textbox9 - - - - Black - - 1pt - - - Black - - 1pt - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - @@ -506,7 +449,7 @@ =Fields!PS.Value @@ -530,14 +473,14 @@ - + true true - =Fields!Lote.Value + =Fields!Serie.Value @@ -548,41 +491,7 @@ - Lote - - - Bottom - 2pt - 2pt - =IIf(rownumber(nothing) = 1, "2pt", "0pt") - - - - - - - - true - true - - - - - =Fields!FechaCaducidad.Value - - - - - - - FechaCaducidad + Serie @@ -606,7 +515,6 @@ - @@ -1682,8 +1590,13 @@ Hermosillo, Sonora, Mexico true ReportParameter1 + + String + true + true + ReportParameter1 + - image/jpeg diff --git a/Empresas/119/Formatos/Factura.rdlc b/Empresas/119/Formatos/Factura.rdlc index 622e8b810..c1bcbec28 100644 --- a/Empresas/119/Formatos/Factura.rdlc +++ b/Empresas/119/Formatos/Factura.rdlc @@ -156,10 +156,10 @@ CodigoObjetoImpuesto System.String - - NumeroPedimento - System.String - + + NumeroPedimento + System.String + DsOC @@ -4844,6 +4844,42 @@ true ReportParameter1 + + String + true + true + ReportParameter1 + + + String + true + true + ReportParameter1 + + + String + true + true + ReportParameter1 + + + String + true + true + ReportParameter1 + + + String + true + true + ReportParameter1 + + + String + true + true + ReportParameter1 + diff --git a/Empresas/119/Formatos/NotaDevolucion.rdlc b/Empresas/119/Formatos/NotaDevolucion.rdlc index b970f1584..72d10e370 100644 --- a/Empresas/119/Formatos/NotaDevolucion.rdlc +++ b/Empresas/119/Formatos/NotaDevolucion.rdlc @@ -1,2635 +1,5 @@ - - - - - true - 5.67653in - 0.06096in - 1.11356in - 8.15264in - - - - - - - - true - true - - - - - "Este documento es una representación impresa de un CFDI" - - - - - - - - - Folio fiscal: - - - - =Parameters!FolioFiscal.Value - - - - - - - =Parameters!FechaCertificacion.Value - - - - Número de serie del Certificado de Sello Digital: - - - - =Parameters!CertificadoContribuyente.Value - - - - - - - =Parameters!SerieCertificadoSAT.Value - - - - - - - - - - - - - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - External - =Parameters!QR.Value - FitProportional - 0.02916in - 6.58817in - 1.2939in - 1.53682in - 1 - - - - - - true - 3.99463in - 0.16719in - 1.4758in - 8.12499in - 1 - - - - - - - - - 0.74171in - - - 0.56728in - - - 0.7806in - - - 3.75819in - - - 0.61647in - - - 0.66705in - - - 1.10597in - - - - - 0.19645in - - - - - true - true - - - - - CANT - - - - - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - UNIDAD - - - - - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - CODIGO - - - - - - - Textbox29 - - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - DESCRIPCIÓN - - - - - - - Textbox17 - - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - %DESC - - - - - - - Textbox21 - - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - PU - - - - - - - Textbox23 - - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - TOTAL - - - - - - - Textbox1 - - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.14436in - - - - - true - true - - - - - =Fields!Cantidad.Value - - - - - - - Cantidad1 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!UM.Value - - - - - - - UM - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Codigo.Value - - - - - - - Codigo - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!PS.Value & " " & Fields!Obs.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Descuento.Value - - - - - - - Descuento - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!PU.Value - - - - - - - PU - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Cantidad.Value * Fields!PU.Value - - - - - - - TiempoEntrega - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - - - - - After - - - - - - - DsOC - 7.33778cm - 0.04219in - 0.34081in - 8.23727in - 2 - - - - - - true - true - - - - - =UCase(Parameters!ImporteLetra.Value) - - - - - - - ImporteLetra - 3.63142in - 0.77448in - 0.18861in - 7.22552in - 3 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - - - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - - - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - - - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Observaciones.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - 3.67012cm - - - - - 0.48004cm - - - - - true - true - - - - - =Fields!Importe.Value - - - - - - - Importe - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - =Fields!ImpuestoLocal.Value - - - - 3.61046cm - - - true - true - - - - - =IIF(Fields!ImpuestoLocal.Value = "Total",UCase(Fields!ImpuestoLocal.Value),Fields!ImpuestoLocal.Value) - - - - - - White - 2pt - 2pt - 2pt - 2pt - - - - - - - - DataSet1 - 8.53005cm - 12.94818cm - 0.48004cm - 7.28058cm - 8 - - - - - - true - true - - - - - - - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Devolución: - - - - - - - - - Cliente: - - - - =Parameters!ClienteNombre.Value - - - - - - - - - RFC: - - - - =Parameters!ClienteRFC.Value - - - - - - - - - Calle: - - - - - - - - =Parameters!ClienteCalle.Value & IIF(Parameters!ClienteNoExt.Value <> "", " No.Ext: " & Parameters!ClienteNoExt.Value & iif(Parameters!ClienteNoInt.Value <> ""," No.Int: " & Parameters!ClienteNoInt.Value,""),iif(Parameters!ClienteNoInt.Value <> ""," No.Int: " & Parameters!ClienteNoInt.Value,"")) - - - - - - - - - Colonia: - - - - - - - - =Parameters!ClienteColonia.Value - - - - - - - - - Ciudad: - - - - =Parameters!ClienteCiudad.Value - - - - - - - - Estado: - - - - - - - - =Parameters!ClienteEstado.Value - - - - - - - - - Municipio y/o Delegación: - - - - =Parameters!ClienteMunicipio.Value - - - - - - - - - - - - - Pais: - - - - =Parameters!ClientePais.Value - - - - - - - - CP: - - - - - - - - =Parameters!ClienteCP.Value - - - - - - - - - Pedido/Contrato: - - - - =Parameters!PedidoContrato.Value - - - - - - - - - Orden Compra: - - - - =Parameters!OrdenCompra.Value - - - - - - - - - Reg.fiscal: - - - - - - - - =Parameters!RegimenFiscalCodigo.Value - - - - - - - Textbox2 - 0.00137in - 4.38498cm - 1.80958in - 3.6362in - 10 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Domicilio fiscal: - - - - - - - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - - - - - NOTA DEVOLUCIÓN - - - - - - - - - - - - - Serie: - - - - =Parameters!Serie.Value - - - - Folio: - - - - =Parameters!Folio.Value - - - - - - - - - Fecha: - - - - - - - - = Parameters!Fecha.Value - - - - - - - - - Moneda: - - - - - - - - =Parameters!MonedaAbreviatura.Value - - - - - - - - - Forma de pago: - - - - =Parameters!FormaPago.Value - - - - - - - - - Método de pago: - - - - =Parameters!MetodoPago.Value - - - - - - - - - Uso CFDI: - - - - =Parameters!UsoCFDI.Value - - - - - - - - - Régimen fiscal: - - - - - - - - - - - - - Regimen General de Ley Personas Morales - - - - - - - - - - - Textbox4 - 5.59571in - 1.62345in - 2.64893in - 12 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Expedido en - - - - : - - - - - - - - - =Parameters!DomicilioSucursal.Value - - - - - - - - - AJA850608L7A - - - - - - - - - - - - - - - - - - Vendedor: - - - - - - - - - - - - - =Parameters!VendedorNombre.Value - - - - - - - Textbox40 - 4.29995cm - 15.01302cm - 2.63207cm - 5.92837cm - 13 - - - 2pt - 2pt - 2pt - 2pt - - - - Embedded - Logo119 - Fit - 0.00348cm - 0.04219in - 0.99993in - 1.62599in - 14 - - - - - - - - - 2.42456cm - - - 2.05585cm - - - 3.03631cm - - - 7.7847cm - - - - - 0.44125cm - - - - - true - true - - - - - Folio - - - - - - - Textbox10 - - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Fecha - - - - - - - Textbox12 - - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Importe - - - - - - - Textbox2222 - - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Folio Fiscal - - - - - - - Textbox11 - - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.41479cm - - - - - true - true - - - - - =Fields!SerieFolio.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Fecha.Value - - - - - - - Fecha - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Importe.Value - - - - - - - Importe1 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!FolioFiscal.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - - After - - - - - - - DataSet4 - 15.68638cm - 3.50335cm - 0.85604cm - 15.30142cm - 15 - - - - - - true - true - - - - - Tipo Relación: - - - - - - - Textbox29 - 15.12759cm - 4.93316cm - 0.41981cm - 5.31841cm - 16 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!TipoRelacionTexto.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - CFDI Relacionados - - - - - - - Textbox5 - 14.4466cm - 0.21692cm - 0.54004cm - 20.7077cm - 18 - - - #008204 - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - VERSION - - - - =Parameters!CFDIVersion.Value - - - - - - - Textbox5 - 16.55158cm - 17.56899cm - 0.6cm - 3.32021cm - 19 - - - 2pt - 2pt - 2pt - 2pt - - - - 6.91125in - - - - =Parameters!UsuarioImprimio.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha Impresión: - - - - =Parameters!FechaImpresion.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - ="Página " & Globals.PageNumber & " de " & Globals.TotalPages - - - - - - - Textbox35 - 0.17639cm - 18.21638cm - 0.41981cm - 2.5cm - 2 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 27.94cm - 21.59cm - 0cm - 0cm - 0.5cm - 0.5cm - 1.27cm - + + + + + + + true + true + + + + + "Este documento es una representación impresa de un CFDI" + + + + + + + + + Folio fiscal: + + + + =Parameters!FolioFiscal.Value + + + + + + + =Parameters!FechaCertificacion.Value + + + + Número de serie del Certificado de Sello Digital: + + + + =Parameters!CertificadoContribuyente.Value + + + + + + + =Parameters!SerieCertificadoSAT.Value + + + + + + + + + + + + + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + External + =Parameters!QR.Value + FitProportional + 0.02916in + 6.58817in + 1.2939in + 1.53682in + 1 + + + + + + true + 3.99463in + 0.16719in + 1.4758in + 8.12499in + 1 + + + + + + + + + 0.74171in + + + 0.56728in + + + 0.7806in + + + 3.75819in + + + 0.61647in + + + 0.66705in + + + 1.10597in + + + + + 0.19645in + + + + + true + true + + + + + CANT + + + + + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + UNIDAD + + + + + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + CODIGO + + + + + + + Textbox29 + + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + DESCRIPCIÓN + + + + + + + Textbox17 + + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + %DESC + + + + + + + Textbox21 + + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + PU + + + + + + + Textbox23 + + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + TOTAL + + + + + + + Textbox1 + + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.14436in + + + + + true + true + + + + + =Fields!Cantidad.Value + + + + + + + Cantidad1 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!UM.Value + + + + + + + UM + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Codigo.Value + + + + + + + Codigo + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!PS.Value & " " & Fields!Obs.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Descuento.Value + + + + + + + Descuento + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!PU.Value + + + + + + + PU + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Cantidad.Value * Fields!PU.Value + + + + + + + TiempoEntrega + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + + + After + + + + + + + DsOC + 7.33778cm + 0.04219in + 0.34081in + 8.23727in + 2 + + + + + + true + true + + + + + =UCase(Parameters!ImporteLetra.Value) + + + + + + + ImporteLetra + 3.63142in + 0.77448in + 0.18861in + 7.22552in + 3 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Observaciones.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + 3.67012cm + + + + + 0.48004cm + + + + + true + true + + + + + =Fields!Importe.Value + + + + + + + Importe + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + =Fields!ImpuestoLocal.Value + + + + 3.61046cm + + + true + true + + + + + =IIF(Fields!ImpuestoLocal.Value = "Total",UCase(Fields!ImpuestoLocal.Value),Fields!ImpuestoLocal.Value) + + + + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + DataSet1 + 8.53005cm + 12.94818cm + 0.48004cm + 7.28058cm + 8 + + + + + + true + true + + + + + + + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Devolución: + + + + + + + + + Cliente: + + + + =Parameters!ClienteNombre.Value + + + + + + + + + RFC: + + + + =Parameters!ClienteRFC.Value + + + + + + + + + Calle: + + + + + + + + =Parameters!ClienteCalle.Value & IIF(Parameters!ClienteNoExt.Value <> "", " No.Ext: " & Parameters!ClienteNoExt.Value & iif(Parameters!ClienteNoInt.Value <> ""," No.Int: " & Parameters!ClienteNoInt.Value,""),iif(Parameters!ClienteNoInt.Value <> ""," No.Int: " & Parameters!ClienteNoInt.Value,"")) + + + + + + + + + Colonia: + + + + + + + + =Parameters!ClienteColonia.Value + + + + + + + + + Ciudad: + + + + =Parameters!ClienteCiudad.Value + + + + + + + + Estado: + + + + + + + + =Parameters!ClienteEstado.Value + + + + + + + + + Municipio y/o Delegación: + + + + =Parameters!ClienteMunicipio.Value + + + + + + + + + + + + + Pais: + + + + =Parameters!ClientePais.Value + + + + + + + + CP: + + + + + + + + =Parameters!ClienteCP.Value + + + + + + + + + Pedido/Contrato: + + + + =Parameters!PedidoContrato.Value + + + + + + + + + Orden Compra: + + + + =Parameters!OrdenCompra.Value + + + + + + + + + Reg.fiscal: + + + + + + + + =Parameters!RegimenFiscalCodigo.Value + + + + + + + Textbox2 + 0.00137in + 4.38498cm + 1.80958in + 3.6362in + 10 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Domicilio fiscal: + + + + + + + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + + NOTA DEVOLUCIÓN + + + + + + + + + + + + + Serie: + + + + =Parameters!Serie.Value + + + + Folio: + + + + =Parameters!Folio.Value + + + + + + + + + Fecha: + + + + + + + + = Parameters!Fecha.Value + + + + + + + + + Moneda: + + + + + + + + =Parameters!MonedaAbreviatura.Value + + + + + + + + + Forma de pago: + + + + =Parameters!FormaPago.Value + + + + + + + + + Método de pago: + + + + =Parameters!MetodoPago.Value + + + + + + + + + Uso CFDI: + + + + =Parameters!UsoCFDI.Value + + + + + + + + + Régimen fiscal: + + + + + + + + + + + + + Regimen General de Ley Personas Morales + + + + + + + + + + + Textbox4 + 5.59571in + 1.62345in + 2.64893in + 12 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Expedido en + + + + : + + + + + + + + + =Parameters!DomicilioSucursal.Value + + + + + + + + + AJA850608L7A + + + + + + + + + + + + + + + + + + Vendedor: + + + + + + + + + + + + + =Parameters!VendedorNombre.Value + + + + + + + Textbox40 + 4.29995cm + 15.01302cm + 2.63207cm + 5.92837cm + 13 + + + 2pt + 2pt + 2pt + 2pt + + + + Embedded + Logo119 + Fit + 0.00348cm + 0.04219in + 0.99993in + 1.62599in + 14 + + + + + + + + + 2.42456cm + + + 2.05585cm + + + 3.03631cm + + + 7.7847cm + + + + + 0.44125cm + + + + + true + true + + + + + Folio + + + + + + + Textbox10 + + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Fecha + + + + + + + Textbox12 + + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Importe + + + + + + + Textbox2222 + + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Folio Fiscal + + + + + + + Textbox11 + + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.41479cm + + + + + true + true + + + + + =Fields!SerieFolio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Fecha.Value + + + + + + + Fecha + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Importe.Value + + + + + + + Importe1 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!FolioFiscal.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + After + + + + + + + DataSet4 + 15.68638cm + 3.50335cm + 0.85604cm + 15.30142cm + 15 + + + + + + true + true + + + + + Tipo Relación: + + + + + + + Textbox29 + 15.12759cm + 4.93316cm + 0.41981cm + 5.31841cm + 16 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!TipoRelacionTexto.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + CFDI Relacionados + + + + + + + Textbox5 + 14.4466cm + 0.21692cm + 0.54004cm + 20.7077cm + 18 + + + #008204 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + VERSION + + + + =Parameters!CFDIVersion.Value + + + + + + + Textbox5 + 16.55158cm + 17.56899cm + 0.6cm + 3.32021cm + 19 + + + 2pt + 2pt + 2pt + 2pt + + + + 6.91125in + + + + =Parameters!UsuarioImprimio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Impresión: + + + + =Parameters!FechaImpresion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + ="Página " & Globals.PageNumber & " de " & Globals.TotalPages + + + + + + + Textbox35 + 0.17639cm + 18.21638cm + 0.41981cm + 2.5cm + 2 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 27.94cm + 21.59cm + 0cm + 0cm + 0.5cm + 0.5cm + 1.27cm + - - Embedded - Logo - Fit - 0.05159in - 0.0375in - 0.99993in - 1.60289in - 1 - - - - true true @@ -438,7 +423,7 @@ 0.08425cm 3.13993cm 7.68184cm - 2 + 1 @@ -646,7 +631,7 @@ 5.39311in 1.27833in 2.8593in - 3 + 2 @@ -758,7 +743,7 @@ 13.72673cm 2.47332cm 7.26261cm - 4 + 3 @@ -1493,7 +1478,7 @@ 0.04048in 0.34081in 8.22304in - 5 + 4 @@ -1519,7 +1504,7 @@ 0.10282cm 0.14316cm 20.88652cm - 6 + 5 @@ -1550,7 +1535,7 @@ 15.05252cm 0.14316cm 5.93682cm - 7 + 6 @@ -1587,7 +1572,7 @@ 1.038in 0.18861in 7.22552in - 8 + 7 @@ -1705,7 +1690,7 @@ 15.05252cm 0.48004cm 5.93682cm - 9 + 8 @@ -1733,7 +1718,7 @@ 3.49882cm 0.57354cm 12.91587cm - 10 + 9 @@ -1749,7 +1734,7 @@ 7.56391cm 0cm 5.675cm - 11 + 10 @@ -1777,7 +1762,7 @@ 7.56391cm 0.6cm 5.675cm - 12 + 11 @@ -1840,7 +1825,7 @@ 0.10282cm 0.99688cm 8.10248cm - 13 + 12 @@ -1851,6 +1836,21 @@ 2pt + + Embedded + Logo1 + FitProportional + 0.13104cm + 0.00316cm + 2.00271cm + 4.28301cm + 13 + + + + 14.80346cm - true @@ -2099,7 +2098,7 @@ DsOC 2.25503in - 0.05854in + 0.0698in 0.36345in 8.21571in 5 @@ -2125,7 +2124,7 @@ Textbox5 6.77831cm - 0.14868cm + 0.17727cm 0.14316cm 20.88652cm 6 @@ -2156,7 +2155,7 @@ Textbox5 7.54968cm - 15.09838cm + 15.12697cm 0.14316cm 5.93682cm 7 @@ -2193,7 +2192,7 @@ ImporteLetra 3.05676in - 2.30237in + 2.31363in 0.18861in 5.97921in 8 @@ -2223,7 +2222,7 @@ Textbox5 9.51148cm - 0.13011cm + 0.1587cm 0.1cm 20.88652cm 9 @@ -2254,7 +2253,7 @@ Textbox5 12.974cm - 0.18043cm + 0.20902cm 0.14316cm 20.85477cm 10 @@ -2288,7 +2287,7 @@ Textbox1 7.0273cm - 5.62203cm + 5.65062cm 0.44477cm 9.30316cm 11 @@ -2406,7 +2405,7 @@ DataSet1 6.99203cm - 15.09838cm + 15.12697cm 0.48004cm 5.93682cm 12 @@ -2904,7 +2903,7 @@ true 14.89676cm - 0.13702cm + 0.16561cm 2.97096cm 20.89818cm 13 @@ -3179,7 +3178,7 @@ DataSet3 2.75704in - 0.05854in + 0.0698in 0.34081in 2.08542in 14 @@ -3226,6 +3225,7 @@ Textbox1 8.39473cm + 0.02859cm 1.07794cm 20.85477cm 15 @@ -3239,21 +3239,6 @@ 2pt - - Embedded - Logo - FitProportional - 0.12756cm - 0.15969cm - 2.38455cm - 3.48217cm - 16 - - - - true true @@ -3333,10 +3318,10 @@ Textbox4 3.9157cm - 4.38884cm + 4.41743cm 1.63569cm 8.12128cm - 17 + 16 @@ -3349,10 +3334,10 @@ 14.16139cm - 14.38124cm + 14.40983cm 0cm 6.65396cm - 18 + 17 @@ -3380,10 +3365,10 @@ Textbox39 14.33778cm - 14.38124cm + 14.40983cm 0.47784cm 6.65396cm - 19 + 18 @@ -3419,10 +3404,10 @@ Textbox38 13.25486cm - 14.38124cm + 14.40983cm 0.4148cm 6.65396cm - 20 + 19 @@ -3468,10 +3453,10 @@ Textbox16 2.16641cm - 0.13011cm + 0.1587cm 1.21002cm 4.23014cm - 21 + 20 @@ -4091,15 +4076,30 @@ true 18.18344cm + 0.02859cm 6.3095cm 21.01663cm - 22 + 21 + + Embedded + Logo1 + FitProportional + 0.13104cm + 2.00271cm + 4.28301cm + 22 + + + + 24.49294cm - 21.03521cm + 21.0638cm 0.5327cm @@ -4141,7 +4141,7 @@ Textbox31 0.11289cm - 8.90321cm + 8.9318cm 0.41981cm 6.02198cm - + Embedded - Logo + Logo1 FitProportional - 0.13104cm + 0.19454cm 0.08425cm - 2.5433cm - 4.13cm + 2.00271cm + 4.28301cm 17 @@ -1543,21 +1543,6 @@ 2pt - - Embedded - Logo - FitProportional - 0.17584cm - 0.08599cm - 2.24083cm - 4.1049cm - 6 - - - - true true @@ -1633,7 +1618,7 @@ 9.93011cm 0.98905in 3.84786in - 7 + 6 @@ -1644,6 +1629,20 @@ 2pt + + Embedded + Logo1 + FitProportional + 0.19657cm + 2.00271cm + 4.28301cm + 7 + + + + - - - =Parameters!ClienteNombre.Value - - - - - - - - - RFC: - - - - =Parameters!ClienteRFC.Value - - - - - - - - - Calle: - - - - - - - - =Parameters!ClienteCalle.Value & IIF(Parameters!ClienteNoExt.Value <> "", " No.Ext: " & Parameters!ClienteNoExt.Value & iif(Parameters!ClienteNoInt.Value <> ""," No.Int: " & Parameters!ClienteNoInt.Value,""),iif(Parameters!ClienteNoInt.Value <> ""," No.Int: " & Parameters!ClienteNoInt.Value,"")) - - - - - - - - - Colonia: - - - - - - - - =Parameters!ClienteColonia.Value - - - - - - - - - Ciudad: - - - - =Parameters!ClienteCiudad.Value - - - - - - - - Estado: - - - - - - - - =Parameters!ClienteEstado.Value - - - - - - - - - Municipio y/o Delegación: - - - - =Parameters!ClienteMunicipio.Value - - - - - - - - - - - - - Pais: - - - - =Parameters!ClientePais.Value - - - - - - - - CP: - - - - - - - - =Parameters!ClienteCP.Value - - - - - - - - - Pedido/Contrato: - - - - =Parameters!PedidoContrato.Value - - - - - - - - - Orden Compra: - - - - =Parameters!OrdenCompra.Value - - - - - - - Textbox2 - 1.08277in - 0.15466cm - 1.48139in - 4.29918in - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Domicilio fiscal: - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - - - - - - - - - Remisión - - - - - - - - - - - - - Serie: - - - - =Parameters!Serie.Value - - - - Folio: - - - - =Parameters!Folio.Value - - - - - - - - - Fecha: - - - - - - - - =cdate(Parameters!Fecha.Value) - - - - - - - - - Vendedor: - - - - =Parameters!VendedorNombre.Value - - - - - - - Textbox4 - 0.04117in - 5.62784in - 0.99993in - 2.66068in - 2 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - 0.84089in - - - 0.75902in - - - 1.18379in - - - 0.94204in - - - 4.47563in - - - - - 0.19645in - - - - - true - true - - - - - CANT - - - - - - - Textbox22 - - - #3a4173 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - UNIDAD - - - - - - - Textbox15 - - - #3a4173 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - CODIGO - - - - - - - Textbox29 - - - #3a4173 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - CLAVE SAT - - - - - - - Textbox5 - - - #3a4173 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - DESCRIPCIÓN - - - - - - - Textbox17 - - - #3a4173 - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.17561in - - - - - true - true - - - - - =Fields!Cantidad.Value - - - - - - - Cantidad1 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!UM.Value - - - - - - - UM - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Codigo.Value - - - - - - - Codigo - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!SATClaveProdServ.Value - - - - - - - Textbox6 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!PS.Value & " " & Fields!Obs.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - - - After - - - - - - - DsOC - 2.74327in - 0.06548in - 0.37206in - 8.20137in - 3 - - - - - - true - true - - - - - - - - #3a4173 - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - - - - #3a4173 - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Observaciones.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - Embedded - Logo - Fit - 0.04117in - 0.06089in - 0.99993in - 1.6045in - 7 - - - - - - true - true - - - - - Expedido en - - - - : - - - - - - - - - =Parameters!DomicilioSucursal.Value - - - - - - - - - BBD021220APA - - - - - - - Textbox4 - 0.10457cm - 9.52183cm - 1.40387cm - 4.08234cm - 8 - - - 2pt - 2pt - 2pt - 2pt - - - - - - 2.51986cm - 1.75262cm - 0cm - 4.9765cm - - - - - - true - true - - - - - Nombre y Firma - - - - Textbox31 - 2.69625cm - 1.33778cm - 0.6cm - 5.7988cm - 1 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Elaborado por: - - - - Textbox31 - 0.68161cm - 1.31521cm - 0.6cm - 5.7988cm - 2 - - - 2pt - 2pt - 2pt - 2pt - - - - 2.51986cm - 13.20338cm - 0cm - 4.9765cm - 3 - - - - - - true - true - - - - - Nombre y Firma - - - - Textbox31 - 2.69625cm - 12.78854cm - 0.6cm - 5.7988cm - 4 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Almacén: - - - - Textbox31 - 0.68161cm - 12.76597cm - 0.6cm - 5.7988cm - 5 - - - 2pt - 2pt - 2pt - 2pt - - - - 6.94912cm - 1.90541cm - 0cm - 4.9765cm - 6 - - - - - - true - true - - - - - Nombre y Firma - - - - Textbox31 - 7.12551cm - 1.49057cm - 0.6cm - 5.7988cm - 7 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Recibió (Chofer): - - - - Textbox31 - 5.11087cm - 1.468cm - 0.6cm - 5.7988cm - 8 - - - 2pt - 2pt - 2pt - 2pt - - - - 6.94912cm - 13.35617cm - 0cm - 4.9765cm - 9 - - - - - - true - true - - - - - Nombre y Firma - - - - Textbox31 - 7.12551cm - 12.94133cm - 0.6cm - 5.7988cm - 10 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Recibió (Cliente): - - - - Textbox31 - 5.11087cm - 12.91876cm - 0.6cm - 5.7988cm - 11 - - - 2pt - 2pt - 2pt - 2pt - - - - true - 9.2202cm - 0.15466cm - 8.67801cm - 20.84313cm - 9 - - - - - - - - - 2.99824cm - - - - - 0.48004cm - - - - - true - true - - - - - =Fields!Importe.Value - - - - - - - Importe - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - =Fields!ImpuestoLocal.Value - - - - 2.93858cm - - - true - true - - - - - =IIF(Fields!ImpuestoLocal.Value = "Total",UCase(Fields!ImpuestoLocal.Value),Fields!ImpuestoLocal.Value) - - - - - - White - 2pt - 2pt - 2pt - 2pt - - - - - - - - DataSet1 - 8.14637cm - 15.11602cm - 0.48004cm - 5.93682cm - 10 - - - - - - 18.12046cm - - - - =Parameters!FechaImpresion.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - ="Página " & Globals.PageNumber & " de " & Globals.TotalPages - - - - - - - Textbox35 - 0.17639cm - 18.49779cm - 0.41981cm - 2.5cm - 1 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 27.94cm - 21.59cm - 0cm - 0cm - 0.5cm - 0.5cm - 1.27cm - + + + =Parameters!ClienteNombre.Value + + + + + + + + + RFC: + + + + =Parameters!ClienteRFC.Value + + + + + + + + + Calle: + + + + + + + + =Parameters!ClienteCalle.Value & IIF(Parameters!ClienteNoExt.Value <> "", " No.Ext: " & Parameters!ClienteNoExt.Value & iif(Parameters!ClienteNoInt.Value <> ""," No.Int: " & Parameters!ClienteNoInt.Value,""),iif(Parameters!ClienteNoInt.Value <> ""," No.Int: " & Parameters!ClienteNoInt.Value,"")) + + + + + + + + + Colonia: + + + + + + + + =Parameters!ClienteColonia.Value + + + + + + + + + Ciudad: + + + + =Parameters!ClienteCiudad.Value + + + + + + + + Estado: + + + + + + + + =Parameters!ClienteEstado.Value + + + + + + + + + Municipio y/o Delegación: + + + + =Parameters!ClienteMunicipio.Value + + + + + + + + + + + + + Pais: + + + + =Parameters!ClientePais.Value + + + + + + + + CP: + + + + + + + + =Parameters!ClienteCP.Value + + + + + + + + + Pedido/Contrato: + + + + =Parameters!PedidoContrato.Value + + + + + + + + + Orden Compra: + + + + =Parameters!OrdenCompra.Value + + + + + + + Textbox2 + 1.08277in + 0.15466cm + 1.48139in + 4.29918in + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Domicilio fiscal: + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + + + + + + Remisión + + + + + + + + + + + + + Serie: + + + + =Parameters!Serie.Value + + + + Folio: + + + + =Parameters!Folio.Value + + + + + + + + + Fecha: + + + + + + + + =cdate(Parameters!Fecha.Value) + + + + + + + + + Vendedor: + + + + =Parameters!VendedorNombre.Value + + + + + + + Textbox4 + 0.04117in + 5.62784in + 0.99993in + 2.66068in + 2 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + 0.84089in + + + 0.75902in + + + 1.18379in + + + 0.94204in + + + 4.47563in + + + + + 0.19645in + + + + + true + true + + + + + CANT + + + + + + + Textbox22 + + + #3a4173 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + UNIDAD + + + + + + + Textbox15 + + + #3a4173 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + CODIGO + + + + + + + Textbox29 + + + #3a4173 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + CLAVE SAT + + + + + + + Textbox5 + + + #3a4173 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + DESCRIPCIÓN + + + + + + + Textbox17 + + + #3a4173 + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.17561in + + + + + true + true + + + + + =Fields!Cantidad.Value + + + + + + + Cantidad1 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!UM.Value + + + + + + + UM + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Codigo.Value + + + + + + + Codigo + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!SATClaveProdServ.Value + + + + + + + Textbox6 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!PS.Value & " " & Fields!Obs.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + After + + + + + + + DsOC + 2.74327in + 0.06548in + 0.37206in + 8.20137in + 3 + + + + + + true + true + + + + + + + + #3a4173 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + #3a4173 + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Observaciones.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Expedido en + + + + : + + + + + + + + + =Parameters!DomicilioSucursal.Value + + + + + + + + + BBD021220APA + + + + + + + Textbox4 + 0.10457cm + 9.52183cm + 1.40387cm + 4.08234cm + 7 + + + 2pt + 2pt + 2pt + 2pt + + + + + + 2.51986cm + 1.75262cm + 0cm + 4.9765cm + + + + + + true + true + + + + + Nombre y Firma + + + + Textbox31 + 2.69625cm + 1.33778cm + 0.6cm + 5.7988cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Elaborado por: + + + + Textbox31 + 0.68161cm + 1.31521cm + 0.6cm + 5.7988cm + 2 + + + 2pt + 2pt + 2pt + 2pt + + + + 2.51986cm + 13.20338cm + 0cm + 4.9765cm + 3 + + + + + + true + true + + + + + Nombre y Firma + + + + Textbox31 + 2.69625cm + 12.78854cm + 0.6cm + 5.7988cm + 4 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Almacén: + + + + Textbox31 + 0.68161cm + 12.76597cm + 0.6cm + 5.7988cm + 5 + + + 2pt + 2pt + 2pt + 2pt + + + + 6.94912cm + 1.90541cm + 0cm + 4.9765cm + 6 + + + + + + true + true + + + + + Nombre y Firma + + + + Textbox31 + 7.12551cm + 1.49057cm + 0.6cm + 5.7988cm + 7 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Recibió (Chofer): + + + + Textbox31 + 5.11087cm + 1.468cm + 0.6cm + 5.7988cm + 8 + + + 2pt + 2pt + 2pt + 2pt + + + + 6.94912cm + 13.35617cm + 0cm + 4.9765cm + 9 + + + + + + true + true + + + + + Nombre y Firma + + + + Textbox31 + 7.12551cm + 12.94133cm + 0.6cm + 5.7988cm + 10 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Recibió (Cliente): + + + + Textbox31 + 5.11087cm + 12.91876cm + 0.6cm + 5.7988cm + 11 + + + 2pt + 2pt + 2pt + 2pt + + + + true + 9.2202cm + 0.15466cm + 8.67801cm + 20.84313cm + 8 + + + + + + + + + 2.99824cm + + + + + 0.48004cm + + + + + true + true + + + + + =Fields!Importe.Value + + + + + + + Importe + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + =Fields!ImpuestoLocal.Value + + + + 2.93858cm + + + true + true + + + + + =IIF(Fields!ImpuestoLocal.Value = "Total",UCase(Fields!ImpuestoLocal.Value),Fields!ImpuestoLocal.Value) + + + + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + DataSet1 + 8.14637cm + 15.11602cm + 0.48004cm + 5.93682cm + 9 + + + + + + Embedded + Logo1 + FitProportional + 0.10457cm + 2.00271cm + 4.28301cm + 10 + + + + + + 18.12046cm + + + + =Parameters!FechaImpresion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + ="Página " & Globals.PageNumber & " de " & Globals.TotalPages + + + + + + + Textbox35 + 0.17639cm + 18.49779cm + 0.41981cm + 2.5cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 27.94cm + 21.59cm + 0cm + 0cm + 0.5cm + 0.5cm + 1.27cm + - - - true @@ -1018,7 +1004,6 @@ 4.45435cm 0.94396cm 6.51432cm - 1 @@ -1072,7 +1057,7 @@ 5.75736cm 0.6cm 10.1061cm - 2 + 1 @@ -1106,7 +1091,7 @@ 5.75736cm 0.6cm 10.1061cm - 3 + 2 @@ -1138,7 +1123,7 @@ 4.45435cm 0.54708cm 6.51432cm - 4 + 3 @@ -1149,6 +1134,21 @@ 2pt + + Embedded + Logo1 + FitProportional + 0.25214cm + 0.17134cm + 2.00271cm + 4.28301cm + 4 + + + + - - - true true @@ -464,7 +450,6 @@ 4.45435cm 1.92292cm 11.8589cm - 1 @@ -516,7 +501,7 @@ 6.20715cm 0.6cm 10.1061cm - 2 + 1 @@ -546,7 +531,7 @@ 16.48964cm 0.6cm 3.64648cm - 3 + 2 @@ -579,7 +564,7 @@ 3.27766cm 0.6cm 1.68911cm - 4 + 3 @@ -614,7 +599,7 @@ 1.68911cm 0.6cm 5.44232cm - 5 + 4 @@ -649,7 +634,7 @@ 17.13143cm 0.6cm 2.5cm - 6 + 5 @@ -684,7 +669,7 @@ 7.13143cm 0.6cm 2.5cm - 7 + 6 @@ -719,7 +704,7 @@ 9.63143cm 0.6cm 2.5cm - 8 + 7 @@ -754,7 +739,7 @@ 12.13143cm 0.6cm 2.5cm - 9 + 8 @@ -789,7 +774,7 @@ 14.63143cm 0.6cm 2.5cm - 10 + 9 @@ -801,6 +786,21 @@ 2pt + + Embedded + Logo1 + FitProportional + 0.28742cm + 0.13606cm + 2.00271cm + 4.28301cm + 10 + + + + - - - - - - Textbox7 - - - - Black - - 1pt - - - Black - - 1pt - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Código - - - - - - - Textbox9 - - - - Black - - 1pt - - - Black - - 1pt - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Descripción - - - - - - - Textbox11 - - - - Black - - 1pt - - - Black - - 1pt - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Serie Lote - - - - - - - Textbox6 - - - - Black - - 1pt - - - Black - - 1pt - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Lote - - - - - - - Textbox5 - - - - Black - - 1pt - - - Black - - 1pt - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Batch - - - - - - - Textbox12 - - - - Black - - 1pt - - - Black - - 1pt - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.69042cm - - - - - true - true - - - - - =Fields!Cantidad.Value - - - - - - - Cantidad - - - 2pt - 2pt - =IIf(RowNumber(Nothing)=1,"1pt","0pt") - - - - - - - - true - true - - - - - =Fields!Codigo.Value - - - - - - - Codigo - - - 2pt - 2pt - =IIf(RowNumber(Nothing)=1,"1pt","0pt") - - - - - - - - true - true - - - - - =Fields!PS.Value - - - - - - 2pt - 2pt - =IIf(RowNumber(Nothing)=1,"1pt","0pt") - - - - - - - - true - true - - - - - =Fields!SerieLote.Value - - - - - - 2pt - 2pt - =IIf(RowNumber(Nothing)=1,"1pt","0pt") - - - - - - - - true - true - - - - - =Fields!Lote.Value - - - - - - 2pt - 2pt - =IIf(RowNumber(Nothing)=1,"1pt","0pt") - - - - - - - - true - true - - - - - =Fields!Batch.Value - - - - - - 2pt - 2pt - =IIf(RowNumber(Nothing)=1,"1pt","0pt") - - - - - - - - - - - - - - - - - =IIF(String.IsNullOrEmpty(Fields!Lote.Value), True,False) - - - - - =IIF(String.IsNullOrEmpty(Fields!Batch.Value), True,False) - - - - - - - - After - - - - - - - DsInventarios - 1.05941cm - 0.2731cm - 1.11096cm - 19.86301cm - - - - - - true - true - - - - - Cliente: - - - - =Parameters!Cliente.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - 0.99032in - - - - - 8.2362in - - - 3.1764cm - true - true - - - Embedded - Logo - Fit - 0.09927in - 0.10752in - 0.99993in - 1.6045in - - - - - - true - true - - - - - BDH BATERÍAS DISTRIBUCIONES DE - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!FechaConFormato.Value - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Globals!PageNumber - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Entradas de Usados - - - - - - - Textbox37 - 2.19197cm - 4.52492cm - 0.6cm - 11.78833cm - 4 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - 0.85929cm - true - true - - - 0.127cm - 0.01325cm - 0cm - 20.90669cm - - - - - - true - true - - - - - Fecha Impresión: - - - - - - - - =Today - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 27.94cm - 21.59cm - 0.5cm - 0cm - 0.5cm - 1cm - 0.13cm - + + + + + + Textbox7 + + + + Black + + 1pt + + + Black + + 1pt + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Código + + + + + + + Textbox9 + + + + Black + + 1pt + + + Black + + 1pt + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Descripción + + + + + + + Textbox11 + + + + Black + + 1pt + + + Black + + 1pt + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Serie Lote + + + + + + + Textbox6 + + + + Black + + 1pt + + + Black + + 1pt + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Lote + + + + + + + Textbox5 + + + + Black + + 1pt + + + Black + + 1pt + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.69042cm + + + + + true + true + + + + + =Fields!Cantidad.Value + + + + + + + Cantidad + + + 2pt + 2pt + =IIf(RowNumber(Nothing)=1,"1pt","0pt") + + + + + + + + true + true + + + + + =Fields!Codigo.Value + + + + + + + Codigo + + + 2pt + 2pt + =IIf(RowNumber(Nothing)=1,"1pt","0pt") + + + + + + + + true + true + + + + + =Fields!PS.Value + + + + + + 2pt + 2pt + =IIf(RowNumber(Nothing)=1,"1pt","0pt") + + + + + + + + true + true + + + + + =Fields!SerieLote.Value + + + + + + 2pt + 2pt + =IIf(RowNumber(Nothing)=1,"1pt","0pt") + + + + + + + + true + true + + + + + =Fields!Lote.Value + + + + + + 2pt + 2pt + =IIf(RowNumber(Nothing)=1,"1pt","0pt") + + + + + + + + + + + + + + + + + =IIF(String.IsNullOrEmpty(Fields!Lote.Value), True,False) + + + + + + + + After + + + + + + + DsInventarios + 1.05941cm + 0.2731cm + 1.11096cm + 20.64684cm + + + + + + true + true + + + + + Cliente: + + + + =Parameters!Cliente.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + 0.99032in + + + + + 8.2362in + + + 3.1764cm + true + true + + + true + true + + + + + BDH BATERÍAS DISTRIBUCIONES DE + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!FechaConFormato.Value + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Globals!PageNumber + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Entradas de Usados + + + + + + + Textbox37 + 2.19197cm + 4.52492cm + 0.6cm + 11.78833cm + 3 + + + 2pt + 2pt + 2pt + 2pt + + + + Embedded + Logo1 + FitProportional + 0.28742cm + 0.1008cm + 2.00271cm + 4.28301cm + 4 + + + + + + + + + + + 0.85929cm + true + true + + + 0.127cm + 0.01325cm + 0cm + 20.90669cm + + + + + + true + true + + + + + Fecha Impresión: + + + + + + + + =Today + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 27.94cm + 21.59cm + 0.5cm + 0cm + 0.5cm + 1cm + 0.13cm + - - - - - - Textbox7 - - - - Black - - 1pt - - - Black - - 1pt - - White - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Código - - - - - - - Textbox9 - - - - Black - - 1pt - - - Black - - 1pt - - White - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Descripción - - - - - - - Textbox11 - - - - Black - - 1pt - - - Black - - 1pt - - White - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Serie - - - - - - - Textbox6 - - - - Black - - 1pt - - - Black - - 1pt - - White - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Lote - - - - - - - Textbox5 - - - - Black - - 1pt - - - Black - - 1pt - - White - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.47875cm - - - - - true - - - - - =Fields!Cantidad.Value - - - - - - - Cantidad - - - 2pt - 2pt - =IIf(RowNumber(Nothing)=1,"1pt","0pt") - - - - - - - - true - - - - - =Fields!Codigo.Value - - - - - - - Codigo - - - 2pt - 2pt - =IIf(RowNumber(Nothing)=1,"1pt","0pt") - - - - - - - - true - - - - - =Fields!PS.Value - - - - - - 2pt - 2pt - =IIf(RowNumber(Nothing)=1,"1pt","0pt") - - - - - - - - true - true - - - - - =Fields!SerieLote.Value - - - - - - 2pt - 2pt - =IIf(RowNumber(Nothing)=1,"1pt","0pt") - - - - - - - - true - - - - - =Fields!Lote.Value - - - - - - 2pt - 2pt - =IIf(RowNumber(Nothing)=1,"1pt","0pt") - - - - - - - - - - - - - - - - - =IIF(String.IsNullOrEmpty(Fields!Lote.Value), True,False) - - - - - - - - After - - - - - - - - - - DsInventarios - 0.17639cm - 0.22456cm - 0.89929cm - 20.39972cm - - - - - - true - true - - - - - Observaciones: - - - - =Parameters!Observaciones.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Total Productos : - - - - =Sum(iif(Not Fields!Clasificacion.Value = "USADOS",CInt(Fields!Cantidad.Value),0),"DsInventarios") - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Total Usados: - - - - =Sum(iif(Fields!Clasificacion.Value = "USADOS",CInt(Fields!Cantidad.Value),0),"DsInventarios") - - - - - - 2pt - 2pt - 2pt - 2pt - - - - 1.03125in - - - - - - - Textbox34 - 1.71608cm - 0.67239cm - 20.62428cm - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!FacturaProveedor.Value - - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - =Parameters!FacturadoA.Value - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Proveedor: - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Factura: - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Folio: - - - - - - - Textbox3 - 0.22328cm - 13.63291cm - 0.89103cm - 3.51794cm - 5 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Folio.Value - - - - - - - Textbox31 - 0.1905cm - 17.15085cm - 0.9263cm - 3.15064cm - 6 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha: - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - =Parameters!Almacen.Value - - - - Textbox6 - 2.70516cm - 2.13321cm - 0.54736cm - 6.43631cm - 8 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Fecha.Value - - - - - - - Textbox32 - 3.42537cm - 2.13321cm - 0.58913cm - 6.43631cm - 9 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Almacén: - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =IIF(Parameters!CveConceptoMovRelacionado.Value = 37,"Folio Virtual:","Folio Relacionado:") - - - - - - - Textbox3 - 1.20956cm - 13.63291cm - 0.47477cm - 4.09693cm - 11 - - =IIF(Parameters!FolioRelacionado.Value = "",true,false) - - - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - =Parameters!FolioRelacionado.Value - - - - - - - Textbox31 - 1.20956cm - 17.72984cm - 0.47477cm - 2.57165cm - 12 - - =IIF(Parameters!FolioRelacionado.Value = "",true,false) - - - - 2pt - 2pt - 2pt - 2pt - - - - Embedded - Logo2 - Fit - 0.1299in - 0.61281in - 1.32508in - 13 - - - - - - true - true - - - - - BDH BATERÍAS DISTRIBUCIONES DE HERMOSILLO S.A. DE C.V. - - - - - - - Textbox2 - 3.83674cm - 1.55733cm - 9.26108cm - 14 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - 2.22251cm - true - true - - - 0.28886cm - 2.22221cm - 0cm - 4.95004cm - - - - - - true - true - - - - - =Parameters!NombreRecibio.Value - - - - Textbox31 - 0.46525cm - 1.74387cm - 0.6cm - 5.95755cm - 1 - - - 2pt - 2pt - 2pt - 2pt - - - - 0.28886cm - 12.20081cm - 0cm - 4.95004cm - 2 - - - - - - true - true - - - - - =Parameters!Almacen.Value - - - - Textbox31 - 0.42997cm - 11.80394cm - 0.6cm - 5.95755cm - 3 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha Impresion: - - - - - - - Textbox5 - 1.49022cm - 11.96388cm - 0.6cm - 2.90426cm - 4 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!FechaImpresion.Value - - - - - - - Textbox33 - 1.49022cm - 14.86814cm - 0.6cm - 2.89335cm - 5 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Usuario Registró: - - - - - - - Textbox5 - 1.62251cm - 0.79137cm - 0.6cm - 2.90426cm - 6 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!UsuarioRegistro.Value - - - - - - - Textbox33 - 1.62251cm - 3.69563cm - 0.6cm - 5.93606cm - 7 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 29.7cm - 21cm - 0.5cm - 1.5cm - 2cm - 2cm - 0.13cm - + + + + + + Textbox7 + + + + Black + + 1pt + + + Black + + 1pt + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Código + + + + + + + Textbox9 + + + + Black + + 1pt + + + Black + + 1pt + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Descripción + + + + + + + Textbox11 + + + + Black + + 1pt + + + Black + + 1pt + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Serie + + + + + + + Textbox6 + + + + Black + + 1pt + + + Black + + 1pt + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Lote + + + + + + + Textbox5 + + + + Black + + 1pt + + + Black + + 1pt + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.47875cm + + + + + true + + + + + =Fields!Cantidad.Value + + + + + + + Cantidad + + + 2pt + 2pt + =IIf(RowNumber(Nothing)=1,"1pt","0pt") + + + + + + + + true + + + + + =Fields!Codigo.Value + + + + + + + Codigo + + + 2pt + 2pt + =IIf(RowNumber(Nothing)=1,"1pt","0pt") + + + + + + + + true + + + + + =Fields!PS.Value + + + + + + 2pt + 2pt + =IIf(RowNumber(Nothing)=1,"1pt","0pt") + + + + + + + + true + true + + + + + =Fields!SerieLote.Value + + + + + + 2pt + 2pt + =IIf(RowNumber(Nothing)=1,"1pt","0pt") + + + + + + + + true + + + + + =Fields!Lote.Value + + + + + + 2pt + 2pt + =IIf(RowNumber(Nothing)=1,"1pt","0pt") + + + + + + + + + + + + + + + + + =IIF(String.IsNullOrEmpty(Fields!Lote.Value), True,False) + + + + + + + + After + + + + + + + + + + DsInventarios + 0.17639cm + 0.22456cm + 0.89929cm + 20.39972cm + + + + + + true + true + + + + + Observaciones: + + + + =Parameters!Observaciones.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Total Productos : + + + + =Sum(iif(Not Fields!Clasificacion.Value = "USADOS",CInt(Fields!Cantidad.Value),0),"DsInventarios") + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Total Usados: + + + + =Sum(iif(Fields!Clasificacion.Value = "USADOS",CInt(Fields!Cantidad.Value),0),"DsInventarios") + + + + + + 2pt + 2pt + 2pt + 2pt + + + + 1.03125in + + + + + + + Textbox34 + 1.71608cm + 0.67239cm + 20.62428cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!FacturaProveedor.Value + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!FacturadoA.Value + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Proveedor: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Factura: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Folio: + + + + + + + Textbox3 + 0.22328cm + 13.63291cm + 0.89103cm + 3.51794cm + 5 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Folio.Value + + + + + + + Textbox31 + 0.1905cm + 17.15085cm + 0.9263cm + 3.15064cm + 6 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!Almacen.Value + + + + Textbox6 + 2.70516cm + 2.13321cm + 0.54736cm + 6.43631cm + 8 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Fecha.Value + + + + + + + Textbox32 + 3.42537cm + 2.13321cm + 0.58913cm + 6.43631cm + 9 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Almacén: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =IIF(Parameters!CveConceptoMovRelacionado.Value = 37,"Folio Virtual:","Folio Relacionado:") + + + + + + + Textbox3 + 1.20956cm + 13.63291cm + 0.47477cm + 4.09693cm + 11 + + =IIF(Parameters!FolioRelacionado.Value = "",true,false) + + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!FolioRelacionado.Value + + + + + + + Textbox31 + 1.20956cm + 17.72984cm + 0.47477cm + 2.57165cm + 12 + + =IIF(Parameters!FolioRelacionado.Value = "",true,false) + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + BDH BATERÍAS DISTRIBUCIONES DE HERMOSILLO S.A. DE C.V. + + + + + + + Textbox2 + 3.83674cm + 1.55733cm + 9.26108cm + 13 + + + 2pt + 2pt + 2pt + 2pt + + + + Embedded + Logo1 + FitProportional + 1.71608cm + 3.73091cm + 14 + + + + + + + + + + + 2.22251cm + true + true + + + 0.28886cm + 2.22221cm + 0cm + 4.95004cm + + + + + + true + true + + + + + =Parameters!NombreRecibio.Value + + + + Textbox31 + 0.46525cm + 1.74387cm + 0.6cm + 5.95755cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + 0.28886cm + 12.20081cm + 0cm + 4.95004cm + 2 + + + + + + true + true + + + + + =Parameters!Almacen.Value + + + + Textbox31 + 0.42997cm + 11.80394cm + 0.6cm + 5.95755cm + 3 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Impresion: + + + + + + + Textbox5 + 1.49022cm + 11.96388cm + 0.6cm + 2.90426cm + 4 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!FechaImpresion.Value + + + + + + + Textbox33 + 1.49022cm + 14.86814cm + 0.6cm + 2.89335cm + 5 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Usuario Registró: + + + + + + + Textbox5 + 1.62251cm + 0.79137cm + 0.6cm + 2.90426cm + 6 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!UsuarioRegistro.Value + + + + + + + Textbox33 + 1.62251cm + 3.69563cm + 0.6cm + 5.93606cm + 7 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 29.7cm + 21cm + 0.5cm + 1.5cm + 2cm + 2cm + 0.13cm + - - - - - - Textbox7 - - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Código - - - - - - - Textbox9 - - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Descripción - - - - - - - Textbox11 - - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.32cm - - - - - true - - - - - =Fields!Cantidad.Value - - - - - - - Cantidad - - - 2pt - 2pt - =IIf(RowNumber(Nothing)=1,"1pt","0pt") - - - - - - - - true - - - - - =Fields!Codigo.Value - - - - - - - Codigo - - - 2pt - 2pt - =IIf(RowNumber(Nothing)=1,"1pt","0pt") - - - - - - - - true - - - - - =Fields!PS.Value - - - - - - 2pt - 2pt - =IIf(RowNumber(Nothing)=1,"1pt","0pt") - - - - - - - - - - - - - - - - - - - After - - - - - - - DsInventarios - 0.74054cm - 2.9in - - - - - - 0.29155in - - - - - 2.9in - - - 1.01598in - true - true - - - true - true - - - - - BDH BATERÍAS DISTRIBUCIONES DE HERMOSILLO S.A. DE C.V. - - - - - - - - - =Parameters!Direccion.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - =Parameters!FechaConFormato.Value - - - - - - - - - - - FechaConFormato - 1.64702cm - 4.45513cm - 0.4473cm - 2.91087cm - 1 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Entradas de Usados - - - - - - - Textbox37 - 1.16344cm - 0.38833cm - 7.366cm - 2 - - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - Folio: - - - - =Parameters!Folio.Value - - - - - - - Textbox37 - 1.64932cm - 0.4473cm - 4.45513cm - 3 - - - 2pt - 2pt - 2pt - 2pt - - - - Embedded - Logo2 - Fit - 0.00031in - 0.00522in - 0.3541in - 0.69825in - 4 - - - - - - true - - - - - Cliente: - - - - =Parameters!Cliente.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - 0.59803in - true - true - - - 1.143cm - 0cm - 2.9in - - - - - - true - true - - - - - Fecha Impresión: - - - - - - - - =Parameters!FechaImpresion.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - Recibió: - - - - =Parameters!Recibio.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - 0.03454cm - 0cm - 2.9in - 3 - - 0.5pt - - - - - true - - - - - Observaciones: - - - - =Parameters!Observaciones.Value - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 3.1in - 3.1in - 0.1in - 0.1in - 0.2in - 0.05118in - + + + + + + Textbox7 + + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Código + + + + + + + Textbox9 + + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Descripción + + + + + + + Textbox11 + + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.32cm + + + + + true + + + + + =Fields!Cantidad.Value + + + + + + + Cantidad + + + 2pt + 2pt + =IIf(RowNumber(Nothing)=1,"1pt","0pt") + + + + + + + + true + + + + + =Fields!Codigo.Value + + + + + + + Codigo + + + 2pt + 2pt + =IIf(RowNumber(Nothing)=1,"1pt","0pt") + + + + + + + + true + + + + + =Fields!PS.Value + + + + + + 2pt + 2pt + =IIf(RowNumber(Nothing)=1,"1pt","0pt") + + + + + + + + + + + + + + + + + + + After + + + + + + + DsInventarios + 0.00427cm + 0.74054cm + 2.80227in + + + + + + 0.29155in + + + + + 2.80395in + + + 1.01636in + true + true + + + true + true + + + + + BDH BATERÍAS DISTRIBUCIONES DE HERMOSILLO S.A. DE C.V. + + + + + + + + + =Parameters!Direccion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!FechaConFormato.Value + + + + + + + + + + + FechaConFormato + 1.64798cm + 4.4594cm + 0.4473cm + 2.66264cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Entradas de Usados + + + + + + + Textbox37 + 1.1644cm + 0.00427cm + 0.38833cm + 7.11776cm + 2 + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Folio: + + + + =Parameters!Folio.Value + + + + + + + Textbox37 + 1.65028cm + 0.00427cm + 0.4473cm + 4.45513cm + 3 + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Cliente: + + + + =Parameters!Cliente.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + Embedded + Logo1 + FitProportional + 0.01921cm + 1.07463cm + 1.87452cm + 5 + + + + + + + + + + + 0.59803in + true + true + + + 1.143cm + 0.00427cm + 0cm + 2.80227in + + + + + + true + true + + + + + Fecha Impresión: + + + + + + + + =Parameters!FechaImpresion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Recibió: + + + + =Parameters!Recibio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + 0.03454cm + 0.00427cm + 0cm + 2.80227in + 3 + + 0.5pt + + + + + true + + + + + Observaciones: + + + + =Parameters!Observaciones.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 3.1in + 3.1in + 0.1in + 0.1in + 0.2in + 0.05118in + - - - - - - Textbox24 - - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - UM - - - - - - - Textbox27 - - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Descripción - - - - - - - Textbox26 - - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - P. Unitario - - - - - - - Textbox36 - - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Importe - - - - - - - Textbox38 - - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.52062cm - - - - - true - true - - - - - =Parameters!Cantidad.Value - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!UnidadMedida.Value - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!Descripcion.Value - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!PU.Value - - - - - - - Textbox37 - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - es-MX - - - - - - - - true - true - - - - - =Parameters!Importe.Value - - - - - - - Textbox39 - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - es-MX - - - - - - - - - - - - - - - - - - - - - - - - DataSet2 - 3.16535cm - 1.01062cm - 20.53564cm - - - - - - - - - 1.96151cm - - - 1.75095cm - - - 1.99729cm - - - 2.0393cm - - - 1.8cm - - - 1.70388cm - - - 1.8cm - - - 1.99576cm - - - 2.49576cm - - - 3.00539cm - - - - - 0.49cm - - - - - true - true - - - - - UUID - - - - - - - Textbox6 - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - 4 - - - - - - - - - true - true - - - - - Serie - - - - - - - Textbox3 - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Folio - - - - - - - Textbox9 - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Moneda - - - - - - - Textbox31 - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Num. Parc. - - - - - - - Textbox8 - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Saldo Anterior - - - - - - - Textbox19 - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Monto Pagado - - - - - - - Textbox25 - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.6cm - - - - - true - true - - - - - =Fields!IdDocumento.Value - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - 4 - - - - - - - - - true - true - - - - - =Fields!Serie.Value - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Folio.Value - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!MonedaDR.Value - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!NumParcialidad.Value - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!ImpSaldoAnt.Value - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - es-MX - - - - - - - - true - true - - - - - =Fields!ImpPagado.Value - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.39cm - - - - - true - true - - - - - Impuesto - - - - - - - Textbox108 - - = IIF( - Fields!Tra001BaseDR.Value > 0 - OR Fields!Tra002BaseDR.Value > 0 - OR Fields!Tra003BaseDR.Value > 0 - OR Fields!Ret001BaseDR.Value > 0 - OR Fields!Ret002BaseDR.Value > 0 - OR Fields!Ret003BaseDR.Value > 0 - ,False,true) - - - - - - - - - - - - - - - - Top - - - - - - - - true - true - - - - - Tipo - - - - - - - Textbox109 - - = IIF( - Fields!Tra001BaseDR.Value > 0 - OR Fields!Tra002BaseDR.Value > 0 - OR Fields!Tra003BaseDR.Value > 0 - OR Fields!Ret001BaseDR.Value > 0 - OR Fields!Ret002BaseDR.Value > 0 - OR Fields!Ret003BaseDR.Value > 0 - ,False,true) - - - - - - - - - - - - - - - - Top - - - - - - - - true - true - - - - - Base - - - - - - - Textbox110 - - = IIF( - Fields!Tra001BaseDR.Value > 0 - OR Fields!Tra002BaseDR.Value > 0 - OR Fields!Tra003BaseDR.Value > 0 - OR Fields!Ret001BaseDR.Value > 0 - OR Fields!Ret002BaseDR.Value > 0 - OR Fields!Ret003BaseDR.Value > 0 - ,False,true) - - - - - - - - - - - - - - - - Top - - - - - - - - true - true - - - - - Tipo Factor - - - - - - - Textbox111 - - = IIF( - Fields!Tra001BaseDR.Value > 0 - OR Fields!Tra002BaseDR.Value > 0 - OR Fields!Tra003BaseDR.Value > 0 - OR Fields!Ret001BaseDR.Value > 0 - OR Fields!Ret002BaseDR.Value > 0 - OR Fields!Ret003BaseDR.Value > 0 - ,False,true) - - - - - - - - - - - - - - - - Top - - - - - - - - true - true - - - - - Tasa/Cuota - - - - - - - Textbox112 - - = IIF( - Fields!Tra001BaseDR.Value > 0 - OR Fields!Tra002BaseDR.Value > 0 - OR Fields!Tra003BaseDR.Value > 0 - OR Fields!Ret001BaseDR.Value > 0 - OR Fields!Ret002BaseDR.Value > 0 - OR Fields!Ret003BaseDR.Value > 0 - ,False,true) - - - - - - - - - - - - - - - - Top - - - true - - - - - - true - true - - - - - Importe - - - - - - - Textbox113 - - = IIF( - Fields!Tra001BaseDR.Value > 0 - OR Fields!Tra002BaseDR.Value > 0 - OR Fields!Tra003BaseDR.Value > 0 - OR Fields!Ret001BaseDR.Value > 0 - OR Fields!Ret002BaseDR.Value > 0 - OR Fields!Ret003BaseDR.Value > 0 - ,False,true) - - - - - - - - - - - - - - - - Top - - - - - - - - true - true - - - - - - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.07938cm - - - - - true - true - - - - - ISR - - - - - - - Textbox61 - - = IIF( - Fields!Tra001BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - Traslado - - - - - - - Textbox204 - - = IIF( - Fields!Tra001BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - =Fields!ImpPagado.Value - - - - - - - ImpPagado - - = IIF( - Fields!Tra001BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - =Fields!Tra001TipoFactorDR.Value - - - - - - - ImpPagado - - = IIF( - Fields!Tra001BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - =Fields!Tra001TasaOCuotaDR.Value - - - - - - - ImpPagado - - = IIF( - Fields!Tra001BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - =Fields!Tra001ImporteDR.Value - - - - - - - ImpPagado - - = IIF( - Fields!Tra001BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.07938cm - - - - - true - true - - - - - IVA - - - - - - - Textbox61 - - = IIF( - Fields!Tra002BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - Traslado - - - - - - - Textbox204 - - = IIF( - Fields!Tra002BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - =Fields!ImpPagado.Value - - - - - - - ImpPagado - - = IIF( - Fields!Tra002BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - =Fields!Tra002TipoFactorDR.Value - - - - - - - ImpPagado - - = IIF( - Fields!Tra002BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - =Fields!Tra002TasaOCuotaDR.Value - - - - - - - ImpPagado - - = IIF( - Fields!Tra002BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - =Fields!Tra002ImporteDR.Value - - - - - - - ImpPagado - - = IIF( - Fields!Tra002BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.07938cm - - - - - true - true - - - - - IEPS - - - - - - - Textbox61 - - = IIF( - Fields!Tra003BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - Traslado - - - - - - - Textbox204 - - = IIF( - Fields!Tra003BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - =Fields!ImpPagado.Value - - - - - - - ImpPagado - - = IIF( - Fields!Tra003BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - =Fields!Tra003TipoFactorDR.Value - - - - - - - ImpPagado - - = IIF( - Fields!Tra003BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - =Fields!Tra003TasaOCuotaDR.Value - - - - - - - ImpPagado - - = IIF( - Fields!Tra003BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - =Fields!Tra003ImporteDR.Value - - - - - - - ImpPagado - - = IIF( - Fields!Tra003BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.07938cm - - - - - true - true - - - - - ISR - - - - - - - Textbox61 - - = IIF( - Fields!Ret001BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - Retención - - - - - - - Textbox207 - - = IIF( - Fields!Ret001BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - =Fields!ImpPagado.Value - - - - - - - ImpPagado - - = IIF( - Fields!Ret001BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - =Fields!Ret001TipoFactorDR.Value - - - - - - - ImpPagado - - = IIF( - Fields!Ret001BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - =Fields!Ret001TasaOCuotaDR.Value - - - - - - - ImpPagado - - = IIF( - Fields!Ret001BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - =Fields!Ret001ImporteDR.Value - - - - - - - ImpPagado - - = IIF( - Fields!Ret001BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.07938cm - - - - - true - true - - - - - IVA - - - - - - - Textbox61 - - = IIF( - Fields!Ret002BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - Retención - - - - - - - Textbox207 - - = IIF( - Fields!Ret002BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - =Fields!ImpPagado.Value - - - - - - - ImpPagado - - = IIF( - Fields!Ret002BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - =Fields!Ret002TipoFactorDR.Value - - - - - - - ImpPagado - - = IIF( - Fields!Ret002BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - =Fields!Ret002TasaOCuotaDR.Value - - - - - - - ImpPagado - - = IIF( - Fields!Ret002BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - =Fields!Ret002ImporteDR.Value - - - - - - - ImpPagado - - = IIF( - Fields!Ret002BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.07938cm - - - - - true - true - - - - - IEPS - - - - - - - Textbox59 - - = IIF( - Fields!Ret003BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - Retención - - - - - - - Textbox207 - - = IIF( - Fields!Ret003BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - =Fields!ImpPagado.Value - - - - - - - ImpPagado - - = IIF( - Fields!Ret003BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - =Fields!Ret003TipoFactorDR.Value - - - - - - - ImpPagado - - = IIF( - Fields!Ret003BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - =Fields!Ret003TasaOCuotaDR.Value - - - - - - - ImpPagado - - = IIF( - Fields!Ret003BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - - - - - - - - true - true - - - - - =Fields!Ret003ImporteDR.Value - - - - - - - ImpPagado - - = IIF( - Fields!Ret003BaseDR.Value > 0 - ,False,True) - - - - - - - - - - - - - - - - es-MX - - - - - - - - true - true - - - - - - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - - - - - - - - After - - - - - - - - - - - - - - - - - DataSet2 - 5.05cm - 1.95625cm - 20.54984cm - 1 - - - - - - - - - 4.5cm - - - 1.74905cm - - - 1.5cm - - - 2.96606cm - - - 6.82934cm - - - 2.98695cm - - - - - 0.49cm - - - - - true - true - - - - - Fecha y hora de pago - - - - - - - Textbox45 - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Moneda - - - - - - - Textbox21 - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - TC - - - - - - - Textbox5 - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Cta Ordenante - - - - - - - Textbox12 - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Forma de Pago - - - - - - - Textbox48 - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Total de Pago - - - - - - - Textbox50 - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.52062cm - - - - - true - true - - - - - =Fields!FechaPago.Value - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!MonedaP.Value - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!TipoCambioP.Value - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - es-MX - - - - - - - - true - true - - - - - =Fields!CtaOrdenante.Value - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!FormaDePagoP.Value - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Monto.Value - - - - - - - Monto - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - es-MX - - - - - - - - 0.6cm - - - - - true - true - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Total de Pago con letra: - - - - =Parameters!CantidadLetra.Value - - - - - - - Textbox16 - - - 2pt - 2pt - 2pt - 2pt - - - 3 - - - - - - - - - - - - - - - - - - - - - - After - - - - - - Before - - - - DataSet1 - 7.262cm - 1.61062cm - 20.5314cm - 2 - - - - - - true - true - - - - - CFDI RELACIONADOS - - - - - - - Textbox5 - 4.5cm - 0.01844cm - 0.5cm - 20.5314cm - 3 - - - 2pt - 2pt - 2pt - 2pt - - - - External - =Parameters!QR.Value - FitProportional - 6.14523in - 1.3in - 1.5in - 4 - - - - - - true - true - - - - - Cadena original del complemento de certificación digital del SAT: - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!CadenaOriginal.Value - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - No. Certificado: - - - - - - - White - - 1pt - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - UUID: - - - - - - - White - - 1pt - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Sello.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!SelloSAT.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!NoCertificado.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!UUIDPago.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Regímen: Regímen General de Ley Personas Morales - - - - - - - - - Éste documento es una representación impresa de un CFDi - - - - - - - Textbox171 - 15.85422cm - 4.00059cm - 0.89979cm - 16.50467cm - 13 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Datos del Cliente: - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Cliente: - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Cliente.Value - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!ClienteDireccion.Value - - - - , - - - - =Parameters!ClienteColonia.Value - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Dirección: - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Ciudad: - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!ClienteCiudad.Value - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!ClienteCP.Value - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - CP: - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - RFC Ordenante: - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!RFCOrdenante.Value - - - - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Sello: - - - - - - - White - - 1pt - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Sello digital del SAT: - - - - - - - White - - 1pt - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - 18.91088cm - - - - - 20.54984cm - - - 3.03264cm - true - true - - - true - - - - - RECIBO DE PAGO - - - - - - - Textbox3 - 5.84339in - 0.5cm - 2.24597in - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - =Parameters!SerieFolio.Value - - - - - - - Textbox3 - 0.20833in - 5.84339in - 0.60856cm - 2.24597in - 1 - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - Fecha Timbre - - - - - - - - - - - - - - - - Textbox3 - 0.44792in - 5.84339in - 0.5cm - 2.24597in - 2 - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - =Parameters!FechaTimbre.Value - - - - - - - Textbox3 - 0.64477in - 5.84339in - 0.25114in - 2.24597in - 3 - - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - - #c4d79b - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - Embedded - Logo4 - FitProportional - 0.34994cm - 0.14111cm - 2.47832cm - 4.42323cm - 4 - - - - - - true - - - - - ECLIPSE DEL NOROESTE SA DE CV - - - - - - - - - R.F.C ENO970305TL4 - - - - - - - - - | www.eclisedelnoroeste.com.mx | - - - - - - - Textbox4 - 0.00516cm - 1.87249in - 0.59155in - 3.92923in - 5 - - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - Domicilio Fiscal - - - - - - - - - Camelia num 346, colonia Luis Encinas, - - - - - - - - - Hermosillo, Sonora. C.P: 83138, - - - - - - - - - México Tel.: (662) 14-6826 - - - - - - - Textbox4 - 1.32572cm - 1.87249in - 0.59155in - 3.92923in - 6 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - 0.41981cm - true - true - - - true - true - - - - - ="Página " & Globals.PageNumber & " de " & Globals.TotalPages - - - - - - - Textbox35 - 17.56289cm - 0.41981cm - 2.94979cm - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Usuario: - - - - - - - - =Parameters!UsuarioImprimio.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha Impresión: - - - - - - - - =Parameters!FechaImpresion.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 27.94cm - 21.59cm - 0.5cm - 0.5cm - 0.5cm - 0.5cm - 1.27cm - + + + + + + Textbox24 + + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + UM + + + + + + + Textbox27 + + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Descripción + + + + + + + Textbox26 + + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + P. Unitario + + + + + + + Textbox36 + + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Importe + + + + + + + Textbox38 + + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.52062cm + + + + + true + true + + + + + =Parameters!Cantidad.Value + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!UnidadMedida.Value + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!Descripcion.Value + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!PU.Value + + + + + + + Textbox37 + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + es-MX + + + + + + + + true + true + + + + + =Parameters!Importe.Value + + + + + + + Textbox39 + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + es-MX + + + + + + + + + + + + + + + + + + + + + + + + DataSet2 + 3.16535cm + 1.01062cm + 20.53564cm + + + + + + + + + 1.96151cm + + + 1.75095cm + + + 1.99729cm + + + 2.0393cm + + + 1.8cm + + + 1.70388cm + + + 1.8cm + + + 1.99576cm + + + 2.49576cm + + + 3.00539cm + + + + + 0.49cm + + + + + true + true + + + + + UUID + + + + + + + Textbox6 + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + 4 + + + + + + + + + true + true + + + + + Serie + + + + + + + Textbox3 + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Folio + + + + + + + Textbox9 + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Moneda + + + + + + + Textbox31 + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Num. Parc. + + + + + + + Textbox8 + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Saldo Anterior + + + + + + + Textbox19 + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Monto Pagado + + + + + + + Textbox25 + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.46085cm + + + + + true + true + + + + + =Fields!IdDocumento.Value + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + 4 + + + + + + + + + true + true + + + + + =Fields!Serie.Value + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Folio.Value + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!MonedaDR.Value + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!NumParcialidad.Value + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ImpSaldoAnt.Value + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + es-MX + + + + + + + + true + true + + + + + =Fields!ImpPagado.Value + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.37042cm + + + + + true + true + + + + + Impuesto + + + + + + + Textbox108 + + = IIF( + Fields!Tra001BaseDR.Value > 0 + OR Fields!Tra002BaseDR.Value > 0 + OR Fields!Tra003BaseDR.Value > 0 + OR Fields!Ret001BaseDR.Value > 0 + OR Fields!Ret002BaseDR.Value > 0 + OR Fields!Ret003BaseDR.Value > 0 + ,False,true) + + + + + + + + + + + + + + + + Top + + + + + + + + true + true + + + + + Tipo + + + + + + + Textbox109 + + = IIF( + Fields!Tra001BaseDR.Value > 0 + OR Fields!Tra002BaseDR.Value > 0 + OR Fields!Tra003BaseDR.Value > 0 + OR Fields!Ret001BaseDR.Value > 0 + OR Fields!Ret002BaseDR.Value > 0 + OR Fields!Ret003BaseDR.Value > 0 + ,False,true) + + + + + + + + + + + + + + + + Top + + + + + + + + true + true + + + + + Base + + + + + + + Textbox110 + + = IIF( + Fields!Tra001BaseDR.Value > 0 + OR Fields!Tra002BaseDR.Value > 0 + OR Fields!Tra003BaseDR.Value > 0 + OR Fields!Ret001BaseDR.Value > 0 + OR Fields!Ret002BaseDR.Value > 0 + OR Fields!Ret003BaseDR.Value > 0 + ,False,true) + + + + + + + + + + + + + + + + Top + + + + + + + + true + true + + + + + Tipo Factor + + + + + + + Textbox111 + + = IIF( + Fields!Tra001BaseDR.Value > 0 + OR Fields!Tra002BaseDR.Value > 0 + OR Fields!Tra003BaseDR.Value > 0 + OR Fields!Ret001BaseDR.Value > 0 + OR Fields!Ret002BaseDR.Value > 0 + OR Fields!Ret003BaseDR.Value > 0 + ,False,true) + + + + + + + + + + + + + + + + Top + + + + + + + + true + true + + + + + Tasa/Cuota + + + + + + + Textbox112 + + = IIF( + Fields!Tra001BaseDR.Value > 0 + OR Fields!Tra002BaseDR.Value > 0 + OR Fields!Tra003BaseDR.Value > 0 + OR Fields!Ret001BaseDR.Value > 0 + OR Fields!Ret002BaseDR.Value > 0 + OR Fields!Ret003BaseDR.Value > 0 + ,False,true) + + + + + + + + + + + + + + + + Top + + + + + + + + true + true + + + + + Importe + + + + + + + Textbox113 + + = IIF( + Fields!Tra001BaseDR.Value > 0 + OR Fields!Tra002BaseDR.Value > 0 + OR Fields!Tra003BaseDR.Value > 0 + OR Fields!Ret001BaseDR.Value > 0 + OR Fields!Ret002BaseDR.Value > 0 + OR Fields!Ret003BaseDR.Value > 0 + ,False,true) + + + + + + + + + + + + + + + + Top + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.07938cm + + + + + true + true + + + + + ISR + + + + + + + Textbox61 + + = IIF( + Fields!Tra001BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + Traslado + + + + + + + Textbox204 + + = IIF( + Fields!Tra001BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =CDbl(Fields!Tra001BaseDR.Value).ToString("C") + + + + + + + ImpPagado + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Tra001ImporteDR.Value > 0, False, True) + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Tra001TipoFactorDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Tra001BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =Fields!Tra001TasaOCuotaDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Tra001BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =Fields!Tra001ImporteDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Tra001BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.07938cm + + + + + true + true + + + + + IVA + + + + + + + Textbox61 + + = IIF( + Fields!Tra002BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + Traslado + + + + + + + Textbox204 + + = IIF( + Fields!Tra002BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =CDbl(Fields!Tra002BaseDR.Value).ToString("C") + + + + + + + ImpPagado + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Tra002ImporteDR.Value > 0, False, True) + + + + 2pt + 2pt + 2pt + 2pt + es-MX + + + + + + + + true + true + + + + + =Fields!Tra002TipoFactorDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Tra002BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =Fields!Tra002TasaOCuotaDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Tra002BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =Fields!Tra002ImporteDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Tra002BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.07938cm + + + + + true + true + + + + + IEPS + + + + + + + Textbox61 + + = IIF( + Fields!Tra003BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + Traslado + + + + + + + Textbox204 + + = IIF( + Fields!Tra003BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =CDbl(Fields!Tra003BaseDR.Value).ToString("C") + + + + + + + ImpPagado + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Tra003ImporteDR.Value > 0, False, True) + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Tra003TipoFactorDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Tra003BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =Fields!Tra003TasaOCuotaDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Tra003BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =Fields!Tra003ImporteDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Tra003BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.07938cm + + + + + true + true + + + + + ISR + + + + + + + Textbox61 + + = IIF( + Fields!Ret001BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + Retención + + + + + + + Textbox207 + + = IIF( + Fields!Ret001BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =CDbl(Fields!Ret001BaseDR.Value).ToString("C") + + + + + + + ImpPagado + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Ret001ImporteDR.Value > 0, False, True) + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Ret001TipoFactorDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Ret001BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =Fields!Ret001TasaOCuotaDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Ret001BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =Fields!Ret001ImporteDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Ret001BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.07938cm + + + + + true + true + + + + + IVA + + + + + + + Textbox61 + + = IIF( + Fields!Ret002BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + Retención + + + + + + + Textbox207 + + = IIF( + Fields!Ret002BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + = CDbl(Fields!Ret002BaseDR.Value).ToString("C") + + + + + + + ImpPagado + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Ret002ImporteDR.Value > 0, False, True) + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Ret002TipoFactorDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Ret002BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =Fields!Ret002TasaOCuotaDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Ret002BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =Fields!Ret002ImporteDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Ret002BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.07938cm + + + + + true + true + + + + + IEPS + + + + + + + Textbox59 + + = IIF( + Fields!Ret003BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + Retención + + + + + + + Textbox207 + + = IIF( + Fields!Ret003BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =CDbl(Fields!Ret003BaseDR.Value).ToString("C") + + + + + + + ImpPagado + + =Microsoft.VisualBasic.Interaction.IIF(Fields!Ret003ImporteDR.Value > 0, False, True) + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Ret003TipoFactorDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Ret003BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =Fields!Ret003TasaOCuotaDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Ret003BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + + + + + + + + true + true + + + + + =Fields!Ret003ImporteDR.Value + + + + + + + ImpPagado + + = IIF( + Fields!Ret003BaseDR.Value > 0 + ,False,True) + + + + + + + + + + + + + + + + es-MX + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + + + + + + After + + + + + + + + + + + + + + + + + DataSet2 + 5.05cm + 1.79752cm + 20.54984cm + 1 + + + + + + + + + 4.5cm + + + 1.74905cm + + + 1.5cm + + + 2.96606cm + + + 6.82934cm + + + 2.98695cm + + + + + 0.49cm + + + + + true + true + + + + + Fecha y hora de pago + + + + + + + Textbox45 + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Moneda + + + + + + + Textbox21 + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + TC + + + + + + + Textbox5 + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Cta Ordenante + + + + + + + Textbox12 + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Forma de Pago + + + + + + + Textbox48 + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Total de Pago + + + + + + + Textbox50 + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.52062cm + + + + + true + true + + + + + =Fields!FechaPago.Value + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!MonedaP.Value + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!TipoCambioP.Value + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + es-MX + + + + + + + + true + true + + + + + =Fields!CtaOrdenante.Value + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!FormaDePagoP.Value + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Monto.Value + + + + + + + Monto + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + es-MX + + + + + + + + 0.6cm + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Total de Pago con letra: + + + + =Parameters!CantidadLetra.Value + + + + + + + Textbox16 + + + 2pt + 2pt + 2pt + 2pt + + + 3 + + + + + + + + + + + + + + + + + + + + + + After + + + + + + Before + + + + DataSet1 + 7.262cm + 1.61062cm + 20.5314cm + 2 + + + + + + true + true + + + + + CFDI RELACIONADOS + + + + + + + Textbox5 + 4.5cm + 0.01844cm + 0.5cm + 20.5314cm + 3 + + + 2pt + 2pt + 2pt + 2pt + + + + External + =Parameters!QR.Value + FitProportional + 6.14523in + 1.3in + 1.5in + 4 + + + + + + true + true + + + + + Cadena original del complemento de certificación digital del SAT: + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!CadenaOriginal.Value + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + No. Certificado: + + + + + + + White + + 1pt + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + UUID: + + + + + + + White + + 1pt + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Sello.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!SelloSAT.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!NoCertificado.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!UUIDPago.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Regímen: Regímen General de Ley Personas Morales + + + + + + + + + Éste documento es una representación impresa de un CFDi + + + + + + + Textbox171 + 15.85422cm + 4.00059cm + 0.89979cm + 16.50467cm + 13 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Datos del Cliente: + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Cliente: + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Cliente.Value + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!ClienteDireccion.Value + + + + , + + + + =Parameters!ClienteColonia.Value + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Dirección: + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Ciudad: + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!ClienteCiudad.Value + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!ClienteCP.Value + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + CP: + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + RFC Ordenante: + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!RFCOrdenante.Value + + + + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Sello: + + + + + + + White + + 1pt + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Sello digital del SAT: + + + + + + + White + + 1pt + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + 18.91088cm + + + + + 20.54984cm + + + 3.03264cm + true + true + + + true + + + + + RECIBO DE PAGO + + + + + + + Textbox3 + 5.84339in + 0.5cm + 2.24597in + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!SerieFolio.Value + + + + + + + Textbox3 + 0.20833in + 5.84339in + 0.60856cm + 2.24597in + 1 + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Fecha Timbre + + + + + + + + + + + + + + + + Textbox3 + 0.44792in + 5.84339in + 0.5cm + 2.24597in + 2 + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!FechaTimbre.Value + + + + + + + Textbox3 + 0.64477in + 5.84339in + 0.25114in + 2.24597in + 3 + + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + + #c4d79b + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + Embedded + Logo4 + FitProportional + 0.34994cm + 0.14111cm + 2.47832cm + 4.42323cm + 4 + + + + + + true + + + + + ECLIPSE DEL NOROESTE SA DE CV + + + + + + + + + R.F.C ENO970305TL4 + + + + + + + + + | www.eclisedelnoroeste.com.mx | + + + + + + + Textbox4 + 0.00516cm + 1.87249in + 0.59155in + 3.92923in + 5 + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Domicilio Fiscal + + + + + + + + + Camelia num 346, colonia Luis Encinas, + + + + + + + + + Hermosillo, Sonora. C.P: 83138, + + + + + + + + + México Tel.: (662) 14-6826 + + + + + + + Textbox4 + 1.32572cm + 1.87249in + 0.59155in + 3.92923in + 6 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + 0.41981cm + true + true + + + true + true + + + + + ="Página " & Globals.PageNumber & " de " & Globals.TotalPages + + + + + + + Textbox35 + 0cm + 17.56289cm + 0.41981cm + 2.94979cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Usuario: + + + + + + + + =Parameters!UsuarioImprimio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Impresión: + + + + + + + + =Parameters!FechaImpresion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 27.94cm + 21.59cm + 0.5cm + 0.5cm + 0.5cm + 0.5cm + 1.27cm + @@ -195,6 +211,12 @@ + + +
    + +
    + Orden:
    @@ -236,29 +258,29 @@ - + - + Código -
    - -
    + + +
    - - - Producto - + + + Producto -
    - -
    + + +
    diff --git a/Inventarios/KardexAlmacenHorizontal.aspx.vb b/Inventarios/KardexAlmacenHorizontal.aspx.vb index c82773a48..db5db824f 100644 --- a/Inventarios/KardexAlmacenHorizontal.aspx.vb +++ b/Inventarios/KardexAlmacenHorizontal.aspx.vb @@ -155,7 +155,7 @@ Partial Class Inventarios_KardexAlmacen If ObjMovimientos.GetKardexAlmacenHorizontal(CvePS, FechaF, -1, DdlUnidadMedida.SelectedValue.ToEntero, CveProveedorCompra, DdlTipoAlmacen.SelectedValue.ToEntero(), IncluyeTransitorios, DdlClasificacion.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CondicionExistencias:=DdlExistencia.SelectedValue.ToEntero, - Orden:=DdlOrden.SelectedValue.ToEntero(), Marcas:=Marcas, IncluyeProyectado:=DdlProyeccionFiltro.SelectedValue.ToEntero, CveAlmacenes:=CveAlmacenes, GPO:=GPO) Then + Orden:=DdlOrden.SelectedValue.ToEntero(), Marcas:=Marcas, IncluyeProyectado:=DdlProyeccionFiltro.SelectedValue.ToEntero, CveAlmacenes:=CveAlmacenes, GPO:=GPO, CodigoPS:=TxtPS.Text) Then If ObjMovimientos.DtResultados IsNot Nothing AndAlso ObjMovimientos.DtResultados.Rows.Count > 0 Then dt = ObjMovimientos.DtResultados Dim ListaBorrar As New List(Of DataColumn) diff --git a/TareasProgramadas/Tareas119.ashx b/TareasProgramadas/Tareas119.ashx index 36d57ea04..4bb8c6f7f 100644 --- a/TareasProgramadas/Tareas119.ashx +++ b/TareasProgramadas/Tareas119.ashx @@ -66,10 +66,10 @@ public class TareasJam : IHttpHandler DataTable DTClientes = new DataTable(); DataTable DTAlmacenes = new DataTable(); - string RutaProductos = $@"{ HttpContext.Current.Server.MapPath("~") }Temp\Productos{NowADS().ToString("yyyyMMdd")}.xlsx"; - string RutaVentas = $@"{ HttpContext.Current.Server.MapPath("~") }Temp\Ventas{NowADS().ToString("yyyyMMdd")}.xlsx"; - string RutaClientes = $@"{ HttpContext.Current.Server.MapPath("~") }Temp\Clientes{NowADS().ToString("yyyyMMdd")}.xlsx"; - string RutaAlmacenes = $@"{ HttpContext.Current.Server.MapPath("~") }Temp\Almacenes{NowADS().ToString("yyyyMMdd")}.xlsx"; + string RutaProductos = $@"{ HttpContext.Current.Server.MapPath("~") }Temp\Productos{ClsPaginas.NowADS().ToString("yyyyMMdd")}.xlsx"; + string RutaVentas = $@"{ HttpContext.Current.Server.MapPath("~") }Temp\Ventas{ClsPaginas.NowADS().ToString("yyyyMMdd")}.xlsx"; + string RutaClientes = $@"{ HttpContext.Current.Server.MapPath("~") }Temp\Clientes{ClsPaginas.NowADS().ToString("yyyyMMdd")}.xlsx"; + string RutaAlmacenes = $@"{ HttpContext.Current.Server.MapPath("~") }Temp\Almacenes{ClsPaginas.NowADS().ToString("yyyyMMdd")}.xlsx"; string FormatoVentas = $@"{ HttpContext.Current.Server.MapPath("~") }\TareasProgramadas\FormatosThalamus\FormatoVentas.xlsx"; @@ -543,7 +543,7 @@ public class TareasJam : IHttpHandler ClsSisMail Correo = new ClsSisMail(); string Para = "julian@adssistemas.mx;rene.molina@adssistemas.mx;oscar.irigoyen@adssistemas.mx"; // string Para = "oscar.irigoyen@adssistemas.mx"; - string Asunto = ErrorProceso ? $"Carga Layout Corteva {NowADS().ToString("yyyy-MM-dd")}" : $"Carga Layout Corteva Error {NowADS().ToString("yyyy-MM-dd")}"; + string Asunto = ErrorProceso ? $"Carga Layout Corteva {ClsPaginas.NowADS().ToString("yyyy-MM-dd")}" : $"Carga Layout Corteva Error {ClsPaginas.NowADS().ToString("yyyy-MM-dd")}"; Correo.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Cuerpo, Archivos:ListaArchivos); this.GuardaLog($"EjecutaThalamus: MandaCorreo() correo enviado. "); diff --git a/Ventas/RepVentasUtilidadPadre.aspx b/Ventas/RepVentasUtilidadPadre.aspx index 43a586407..0b3c08446 100644 --- a/Ventas/RepVentasUtilidadPadre.aspx +++ b/Ventas/RepVentasUtilidadPadre.aspx @@ -233,6 +233,7 @@ + From b277b22403c6d48466ef44eb96caed7d04bdb09e Mon Sep 17 00:00:00 2001 From: rakcsle Date: Thu, 19 Oct 2023 13:07:40 -0700 Subject: [PATCH 082/100] Correciones karedes alamcen horizontal, Proveedores abonar error al pagar dolares en dolares --- Bancos/ProveedoresAbonar.aspx.vb | 12 ++++-- .../RepEstadoResultadosHorizontal.aspx | 15 +++++-- Inventarios/KardexAlmacenHorizontal.aspx | 41 +++++++------------ Inventarios/KardexAlmacenHorizontal.aspx.vb | 3 ++ Ventas/RepVentasUtilidadPadre.aspx.vb | 2 +- 5 files changed, 38 insertions(+), 35 deletions(-) diff --git a/Bancos/ProveedoresAbonar.aspx.vb b/Bancos/ProveedoresAbonar.aspx.vb index 913c32a1a..4aa540ba3 100644 --- a/Bancos/ProveedoresAbonar.aspx.vb +++ b/Bancos/ProveedoresAbonar.aspx.vb @@ -804,7 +804,7 @@ Partial Class Bancos_ProveedoresAbonar Pago.TCPago = 1 ' TxtTC.Text.ToDecimal Pago.ImportePago = (gvr.FCTextBox("TxtAbonar").Text.ToDecimal * TxtTC.Text.ToDecimal).RoundSQL ElseIf Pago.CveMonedaPago = 2 AndAlso CompraActual.CveMoneda = 2 Then 'Si la venta viene en Dolares y se va a pagar en DOLARES - Pago.TCPago = TxtTCDolares.Text.ToDecimal + Pago.TCPago = TxtTCDolaresDolares.Text.ToDecimal ElseIf Pago.CveMonedaPago = 2 AndAlso CompraActual.CveMoneda = 1 Then 'Si la venta viene en pesos y se va a pagar en DOLARES Pago.TCPago = TxtTCDolares.Text.ToDecimal Pago.ImportePago = (gvr.FCTextBox("TxtAbonar").Text.ToDecimal / TxtTCDolares.Text.ToDecimal) @@ -844,9 +844,13 @@ Partial Class Bancos_ProveedoresAbonar tImporteMN = (tImporteMN * Pago.TCPago).RoundSQL End If - If MsgError = "" AndAlso Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, tImporteMN, 30, Referencia, ConceptoMovimiento, CveIE:=CveIE, CveProveedor:=CveProveedor, TipoCambio:=Pago.TCPago, CveSubProyecto:=CveSubProyecto, ImporteME:=ImporteME) Then - MsgError = "No se pudo insertar la póliza" - End If + If UsuarioActual.CveRol = 1 Then + Alert($" TxtImporte.Text: { TxtImporte.Text} tImporteMN: {tImporteMN}") + End If + + If MsgError = "" AndAlso Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, tImporteMN, 30, Referencia, ConceptoMovimiento, CveIE:=CveIE, CveProveedor:=CveProveedor, TipoCambio:=Pago.TCPago, CveSubProyecto:=CveSubProyecto, ImporteME:=ImporteME) Then + MsgError = "No se pudo insertar la póliza" + End If If Pago.CveMonedaPago = 2 AndAlso UsaComplementariaBancos Then If MsgError = "" AndAlso Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, (Pago.ImportePago * Pago.TCPago - Pago.ImportePago).RoundSQL, 204, Referencia, ConceptoMovimiento, CveIE:=CveIE, CveProveedor:=CveProveedor, ImporteME:=Pago.ImportePago, TipoCambio:=Pago.TCPago, CveSubProyecto:=CveSubProyecto) Then diff --git a/Contabilidad2/RepEstadoResultadosHorizontal.aspx b/Contabilidad2/RepEstadoResultadosHorizontal.aspx index 2345d64c8..eed74d468 100644 --- a/Contabilidad2/RepEstadoResultadosHorizontal.aspx +++ b/Contabilidad2/RepEstadoResultadosHorizontal.aspx @@ -7,12 +7,12 @@ @@ -258,32 +248,31 @@ - + Código - - - + + - - Producto - + + Producto - - - +
    + +
    +
    +
    diff --git a/Inventarios/KardexAlmacenHorizontal.aspx.vb b/Inventarios/KardexAlmacenHorizontal.aspx.vb index db5db824f..a99613ff7 100644 --- a/Inventarios/KardexAlmacenHorizontal.aspx.vb +++ b/Inventarios/KardexAlmacenHorizontal.aspx.vb @@ -203,6 +203,9 @@ Partial Class Inventarios_KardexAlmacen e.Row.CssClass = "Totales" End If + + 'e.Row.Attributes.Add("style", " max-height:31px!important") + e.Row.HorizontalAlign = HorizontalAlign.Right e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Left diff --git a/Ventas/RepVentasUtilidadPadre.aspx.vb b/Ventas/RepVentasUtilidadPadre.aspx.vb index fe43320eb..83879613c 100644 --- a/Ventas/RepVentasUtilidadPadre.aspx.vb +++ b/Ventas/RepVentasUtilidadPadre.aspx.vb @@ -252,7 +252,7 @@ Partial Class Ventas_RepVentasUtilidadPadre e.Row.DBCampo("Grupo"), e.Row.DBCampo("GPO"), e.Row.DBCampo("CvePS"), e.Row.DBCampo("CveClasificacion"), e.Row.DBCampo("CveMarca"), e.Row.DBCampo("CveCategoria")) e.Row.Cells(0).Text = String.Format("{2}", Css, Liga, e.Row.Cells(0).Text) Else - e.Row.Cells(9).BackColor = Drawing.Color.LightGray + e.Row.Cells(10).BackColor = Drawing.Color.LightGray End If From 9e9f4fa9b7424f39b9f238a08c94df462cf93c6f Mon Sep 17 00:00:00 2001 From: rakcsle Date: Thu, 19 Oct 2023 13:09:38 -0700 Subject: [PATCH 083/100] local --- Bancos/ProveedoresAbonar.aspx.vb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Bancos/ProveedoresAbonar.aspx.vb b/Bancos/ProveedoresAbonar.aspx.vb index 4aa540ba3..d4d3312cd 100644 --- a/Bancos/ProveedoresAbonar.aspx.vb +++ b/Bancos/ProveedoresAbonar.aspx.vb @@ -844,9 +844,7 @@ Partial Class Bancos_ProveedoresAbonar tImporteMN = (tImporteMN * Pago.TCPago).RoundSQL End If - If UsuarioActual.CveRol = 1 Then - Alert($" TxtImporte.Text: { TxtImporte.Text} tImporteMN: {tImporteMN}") - End If + If MsgError = "" AndAlso Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, tImporteMN, 30, Referencia, ConceptoMovimiento, CveIE:=CveIE, CveProveedor:=CveProveedor, TipoCambio:=Pago.TCPago, CveSubProyecto:=CveSubProyecto, ImporteME:=ImporteME) Then MsgError = "No se pudo insertar la póliza" From 822282e87824cdfa56dc7be72332dda0150e4cd5 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 19 Oct 2023 13:16:17 -0700 Subject: [PATCH 084/100] =?UTF-8?q?--=20Unificar=20un=20solo=20TC=20de=20p?= =?UTF-8?q?ago=20en=20d=C3=B3lares?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bancos/ProveedoresAbonar.aspx | 10 +--------- Bancos/ProveedoresAbonar.aspx.vb | 34 +++++++++----------------------- 2 files changed, 10 insertions(+), 34 deletions(-) diff --git a/Bancos/ProveedoresAbonar.aspx b/Bancos/ProveedoresAbonar.aspx index 2f6fc70de..874770e8c 100644 --- a/Bancos/ProveedoresAbonar.aspx +++ b/Bancos/ProveedoresAbonar.aspx @@ -79,15 +79,7 @@ -
    -
    - T.C: - - - - -
    -