Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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}", "")))
|
||||
|
||||
|
||||
@@ -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}"
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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}"
|
||||
|
||||
@@ -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}"
|
||||
|
||||
@@ -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 = ""
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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(" <html> ")
|
||||
|
||||
@@ -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("<table style='width:100%; background-color:#ADD8E6;'><tr><td>{0}</td></tr></table>", Now.ToLongDateString)
|
||||
' GvE.Caption = String.Format("<table style='width:100%; background-color:#ADD8E6;'><tr><td>{0}</td></tr></table>", NowADS().ToLongDateString)
|
||||
GvE.CaptionAlign = TableCaptionAlign.Left
|
||||
GvE.DataSource = dt
|
||||
GvE.DataBind()
|
||||
|
||||
@@ -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(" <html> ")
|
||||
|
||||
@@ -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(" <html> ")
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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(" <html> ")
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"))
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"))
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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", $"<b>Filtros Por:</b> {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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -14,8 +14,8 @@ public partial class Ventas_RepUsados : ClsPaginas
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
InicializaValores();
|
||||
}
|
||||
InicializaValores();
|
||||
}
|
||||
}
|
||||
|
||||
private void InicializaValores()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -292,7 +292,7 @@ Public Class ClsContabilidad
|
||||
|
||||
Public Function UpdatePrePolizasDetalle(CvePrePolizaDetalle As Integer, Concepto As String, CveSubProyecto As Integer, IdCtaContable As Integer, TipoMovto As Boolean, ImporteMN As Decimal, Optional CveTipoGasto As Integer = -1,
|
||||
Optional CveConceptoContable As Integer = -1, Optional CveProveedor As Integer = -1, Optional CveCompra As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveCliente As Integer = -1, Optional CveVenta As Integer = -1,
|
||||
Optional Referencia As String = "-1", Optional CveUsuarioModifico As Integer = -1, Optional CveCuenta As Integer = -1, Optional PorcentajeImpuesto As Decimal = -1, Optional Importe As Decimal = -1, Optional CveIE As Integer = -1) As Boolean
|
||||
Optional Referencia As String = "-1", Optional CveUsuarioModifico As Integer = -1, Optional CveCuenta As Integer = -1, Optional PorcentajeImpuesto As Decimal = -1, Optional Importe As Decimal = -1, Optional CveIE As Integer = -1, Optional TipoCambio As Decimal = -1) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
@@ -305,7 +305,7 @@ Public Class ClsContabilidad
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
.Add("@IdCtaContable", SqlDbType.Int).Value = IdCtaContable
|
||||
.Add("@TipoMovto", SqlDbType.Bit).Value = TipoMovto
|
||||
'.Add("@Importe", SqlDbType.Money).Value = Importe
|
||||
.Add("@TipoCambio", SqlDbType.Decimal).Value = TipoCambio
|
||||
.Add("@ImporteMN", SqlDbType.Money).Value = ImporteMN
|
||||
.Add("@CveTipoGasto", SqlDbType.Int).Value = CveTipoGasto
|
||||
.Add("@CveConceptoContable", SqlDbType.Int).Value = CveConceptoContable
|
||||
@@ -968,9 +968,6 @@ Public Class ClsContabilidad
|
||||
.Add("@TCPago", SqlDbType.Decimal).Value = TipoCambioPago
|
||||
.Add("@Referencia", SqlDbType.VarChar).Value = Referencia
|
||||
.Add("@Concepto", SqlDbType.VarChar).Value = Concepto
|
||||
'.Add("@FechaVencimiento", SqlDbType.Date).Value = FechaVencimiento
|
||||
'.Add("@IdCtaContable", SqlDbType.Int).Value = IdCtaContable
|
||||
'.Add("@IdSegmentoNegocio", SqlDbType.Int).Value = IdSegmentoNegocio
|
||||
.Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
|
||||
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
|
||||
@@ -993,6 +990,7 @@ Public Class ClsContabilidad
|
||||
.Add("@CveCreditoDetalle", SqlDbType.Int).Value = CveCreditoDetalle
|
||||
.Add("@PorcentajeImpuesto", SqlDbType.Money).Value = PorcentajeImpuesto
|
||||
.Add("@CveNominaMovtoPermanente", SqlDbType.Money).Value = CveNominaMovtoPermanente
|
||||
.Add("@CveColectiva", SqlDbType.Int).Value = CveColectiva
|
||||
|
||||
.Add("@CvePrePolizaDetalle", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
End With
|
||||
@@ -5664,7 +5662,7 @@ Public Class ClsContabilidad
|
||||
Public Function AddCuentasAsignaciones(CveConceptoContable As Integer, CveEmpresa As Integer, CveCuenta As Integer,
|
||||
Optional CveProveedor As Integer = -1, Optional CveCliente As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveClasificacion As Integer = -1,
|
||||
Optional CveAlmacen As Integer = -1, Optional PorcentajeIVA As Decimal = -1, Optional CveConceptoNomina As Decimal = -1, Optional CveBancoCuenta As Integer = -1,
|
||||
Optional CveSubProyecto As Integer = -1, Optional CveActivoFijo As Integer = -1, Optional CveTipoGasto As Integer = -1, Optional CveCredito As Integer = -1,
|
||||
Optional CveSubProyecto As Integer = -1, Optional CveActivoFijo As Integer = -1, Optional CveTipoGasto As Integer = -1, Optional CveCredito As Integer = -1, Optional CveColectiva As Integer = -1,
|
||||
Optional RegeneraCuenta As Boolean = False,
|
||||
Optional OpActualizarClasificacion As Boolean = False) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
@@ -5687,6 +5685,7 @@ Public Class ClsContabilidad
|
||||
.Add("@CveActivoFijo", SqlDbType.Int).Value = CveActivoFijo
|
||||
.Add("@CveTipoGasto", SqlDbType.Int).Value = CveTipoGasto
|
||||
.Add("@CveCredito", SqlDbType.Int).Value = CveCredito
|
||||
.Add("@CveColectiva", SqlDbType.Int).Value = CveColectiva
|
||||
.Add("@RegeneraCuenta", SqlDbType.Bit).Value = RegeneraCuenta
|
||||
.Add("@OpActualizarClasificacion", SqlDbType.Bit).Value = OpActualizarClasificacion
|
||||
End With
|
||||
@@ -5706,7 +5705,7 @@ Public Class ClsContabilidad
|
||||
Optional CvePersonal As Integer = -1, Optional CveClasificacion As Integer = -1, Optional CveAlmacen As Integer = -1,
|
||||
Optional PorcentajeIVA As Decimal = -1, Optional CveConceptoNomina As Decimal = -1, Optional CveBancoCuenta As Integer = -1,
|
||||
Optional CveSubProyecto As Integer = -1, Optional CveActivoFijo As Integer = -1, Optional CveTipoGasto As Integer = -1,
|
||||
Optional CveCredito As Integer = -1, Optional RegeneraCuenta As Boolean = False) As Boolean
|
||||
Optional CveCredito As Integer = -1, Optional CveColectiva As Integer = -1, Optional RegeneraCuenta As Boolean = False) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Conta_CuentasAsignacionesUpdate")
|
||||
@@ -5727,6 +5726,7 @@ Public Class ClsContabilidad
|
||||
.Add("@CveActivoFijo", SqlDbType.Int).Value = CveActivoFijo
|
||||
.Add("@CveTipoGasto", SqlDbType.Int).Value = CveTipoGasto
|
||||
.Add("@CveCredito", SqlDbType.Int).Value = CveCredito
|
||||
.Add("@CveColectiva", SqlDbType.Int).Value = CveColectiva
|
||||
.Add("@RegeneraCuenta", SqlDbType.Bit).Value = RegeneraCuenta
|
||||
End With
|
||||
|
||||
@@ -6328,7 +6328,7 @@ Public Class ClsContabilidad
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GetEstadosMensualHorizontal(FechaI As Date, FechaF As Date, CveProyecto As Integer, CveSubProyecto As Integer, Divisor As Integer, CveEmpresa As Integer, CveUsuario As Integer, Optional Tipo As Integer = 1) As Boolean
|
||||
Public Function GetEstadosMensualHorizontal(FechaI As Date, FechaF As Date, CveProyecto As Integer, CveSubProyecto As Integer, Divisor As Integer, CveEmpresa As Integer, CveUsuario As Integer, Optional Tipo As Integer = 1, Optional VistaPorcentaje As Integer = 1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Conta2_EstadoResultadosMensualHorizontal")
|
||||
@@ -6342,6 +6342,7 @@ Public Class ClsContabilidad
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@Tipo", SqlDbType.Int).Value = Tipo
|
||||
.Add("@VistaPorcentaje", SqlDbType.Int).Value = VistaPorcentaje
|
||||
|
||||
End With
|
||||
|
||||
@@ -6357,7 +6358,7 @@ Public Class ClsContabilidad
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GetEstadosAnualHorizontal(FechaI As Date, FechaF As Date, CveProyecto As Integer, CveSubProyecto As Integer, Divisor As Integer, CveEmpresa As Integer, CveUsuario As Integer, Optional Tipo As Integer = 1, Optional Periodo As Integer = 12) As Boolean
|
||||
Public Function GetEstadosAnualHorizontal(FechaI As Date, FechaF As Date, CveProyecto As Integer, CveSubProyecto As Integer, Divisor As Integer, CveEmpresa As Integer, CveUsuario As Integer, Optional Tipo As Integer = 1, Optional Periodo As Integer = 12, Optional VistaPorcentaje As Integer = 1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Conta2_EstadoResultadosAnualHorizontal")
|
||||
@@ -6372,6 +6373,7 @@ Public Class ClsContabilidad
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@Tipo", SqlDbType.Int).Value = Tipo
|
||||
.Add("@Periodo", SqlDbType.Int).Value = Periodo
|
||||
.Add("@VistaPorcentaje", SqlDbType.Int).Value = VistaPorcentaje
|
||||
|
||||
End With
|
||||
|
||||
@@ -6388,7 +6390,7 @@ Public Class ClsContabilidad
|
||||
End Function
|
||||
|
||||
|
||||
Public Function GetEstadosSubProyectoHorizontal(FechaI As Date, FechaF As Date, CveProyecto As Integer, CveSubProyecto As Integer, Divisor As Integer, CveEmpresa As Integer, CveUsuario As Integer, Optional Tipo As Integer = 1) As Boolean
|
||||
Public Function GetEstadosSubProyectoHorizontal(FechaI As Date, FechaF As Date, CveProyecto As Integer, CveSubProyecto As Integer, Divisor As Integer, CveEmpresa As Integer, CveUsuario As Integer, Optional Tipo As Integer = 1, Optional VistaPorcentaje As Integer = 1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Conta2_EstadoResultadosSubProyectolHorizontal")
|
||||
@@ -6402,7 +6404,7 @@ Public Class ClsContabilidad
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@Tipo", SqlDbType.Int).Value = Tipo
|
||||
|
||||
.Add("@VistaPorcentaje", SqlDbType.Int).Value = VistaPorcentaje
|
||||
End With
|
||||
|
||||
SqlAdapter.SelectCommand.CommandTimeout = 0
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -32,8 +32,6 @@ Public Class ClsGenerales
|
||||
Public Property Telefono As String
|
||||
Public Property Correo As String
|
||||
Public Property Tipo As Integer
|
||||
Public Property IdCtaContable As Integer
|
||||
Public Property CtaContable As String
|
||||
Public Property Estatus As Boolean
|
||||
Public Property FechaIng As DateTime
|
||||
Public Property CveUsuario As Integer
|
||||
@@ -1249,14 +1247,13 @@ Public Class ClsGenerales
|
||||
#End Region
|
||||
|
||||
#Region "C O L E C T I V A S"
|
||||
Public Function GetColectivas(Optional CveColectiva As Integer = -1, Optional Colectiva As String = "-1", Optional Codigo As String = "-1", Optional Tipo As String = "-1", Optional CveEmpresa As Integer = -1) As Boolean
|
||||
Public Function GetColectivas(CveEmpresa As Integer, Optional CveColectiva As Integer = -1, Optional Tipo As String = "-1", Optional CveConceptoContable As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Gral_ColectivasGet")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveColectiva", SqlDbType.Int).Value = CveColectiva
|
||||
.Add("@Colectiva", SqlDbType.VarChar).Value = Colectiva
|
||||
.Add("@Codigo", SqlDbType.VarChar).Value = Codigo
|
||||
.Add("@CveConceptoContable", SqlDbType.Int).Value = CveConceptoContable
|
||||
.Add("@Tipo", SqlDbType.VarChar).Value = Tipo
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
@@ -1271,8 +1268,6 @@ Public Class ClsGenerales
|
||||
Me.Telefono = Data.Rows(0)("Telefono").ToString
|
||||
Me.Correo = Data.Rows(0)("Correo").ToString
|
||||
Me.Tipo = Data.Rows(0)("Tipo").ToString.ToEntero
|
||||
Me.IdCtaContable = Data.Rows(0)("IdCtaContable").ToString.ToEntero
|
||||
Me.CtaContable = Data.Rows(0)("CtaContable").ToString
|
||||
Me.Estatus = CBool(Data.Rows(0)("Estatus").ToString)
|
||||
Me.FechaIng = Data.Rows(0)("FechaIng").ToString.ToDateTime
|
||||
Me.Usuario = Data.Rows(0)("Usuario").ToString
|
||||
@@ -1728,7 +1723,7 @@ Public Class ClsGenerales
|
||||
.Add("@Estatus", SqlDbType.VarChar).Value = Estatus
|
||||
.Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda
|
||||
.Add("@CveCuentaDeposito", SqlDbType.Int).Value = CveCuentaDeposito
|
||||
.Add("@FechaIng", SqlDbType.Date).Value = Date.Now
|
||||
.Add("@FechaIng", SqlDbType.Date).Value = ClsPaginas.NowADS()
|
||||
.Add("@RefCrediProveedor", SqlDbType.VarChar).Value = RefCrediProveedor
|
||||
.Add("@CveUsuarioModifico", SqlDbType.Int).Value = CveUsuarioModifico
|
||||
.Add("@Correo", SqlDbType.VarChar).Value = Correo
|
||||
|
||||
@@ -992,7 +992,7 @@ Public Class ClsInventarios
|
||||
DataAdapter("PA_Inv_MovimientosAdd")
|
||||
|
||||
If FechaMovto.Hour = 0 AndAlso FechaMovto.Minute = 0 AndAlso FechaMovto.Second = 0 Then
|
||||
FechaMovto = String.Format("{0} {1}:{2}:{3}", FechaMovto.ToShortDateString, Now.Hour, Now.Minute, Now.Second).ToDateTime
|
||||
FechaMovto = String.Format("{0} {1}:{2}:{3}", FechaMovto.ToShortDateString, ClsPaginas.NowADS().Hour, ClsPaginas.NowADS().Minute, ClsPaginas.NowADS().Second).ToDateTime
|
||||
End If
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
@@ -1535,7 +1535,8 @@ Public Class ClsInventarios
|
||||
End Function
|
||||
Public Function GetKardexAlmacenHorizontal(CvePS As Integer, FechaFin As Date, CveAlmacen As Integer, CveUnidadMedida As Integer, CveProveedor As Integer, CveTipoAlmacen As Integer,
|
||||
IncluyeTransitorios As Integer, CveClasificacion As Integer, CveUsuario As Integer, CveEmpresa As Integer, Optional CondicionExistencias As Integer = 0,
|
||||
Optional Orden As Integer = -1, Optional Marcas As String = "-1", Optional IncluyeProyectado As Integer = -1, Optional CveAlmacenes As String = "-1", Optional GPO As Integer = 1) As Boolean
|
||||
Optional Orden As Integer = -1, Optional Marcas As String = "-1", Optional IncluyeProyectado As Integer = -1, Optional CveAlmacenes As String = "-1",
|
||||
Optional GPO As Integer = 1, Optional CodigoPS As String = "-1") As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Inv_KardexAlmacenHorizontalGet")
|
||||
@@ -1558,6 +1559,7 @@ Public Class ClsInventarios
|
||||
.Add("@IncluyeProyectado", SqlDbType.TinyInt).Value = IncluyeProyectado
|
||||
.Add("@CveAlmacenes", SqlDbType.NVarChar).Value = CveAlmacenes
|
||||
.Add("@GPO", SqlDbType.Int).Value = GPO
|
||||
.Add("@CodigoPS", SqlDbType.VarChar).Value = CodigoPS
|
||||
|
||||
End With
|
||||
|
||||
@@ -1981,7 +1983,7 @@ Public Class ClsInventarios
|
||||
Dim Retorno As Decimal = -1
|
||||
|
||||
If FechaMovto = "-1" Then
|
||||
FechaMovto = String.Format("{0} 00:00", Now.AddDays(1).ToString("yyyy/MM/dd"))
|
||||
FechaMovto = String.Format("{0} 00:00", ClsPaginas.NowADS().AddDays(1).ToString("yyyy/MM/dd"))
|
||||
End If
|
||||
|
||||
DataAdapter("PA_Inv_ExistenciasPSGet")
|
||||
@@ -2176,7 +2178,7 @@ Public Class ClsInventarios
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
If FechaMovto = "-1" Then
|
||||
FechaMovto = String.Format("{0} 00:00", Now.AddDays(1).ToString("yyyy/MM/dd"))
|
||||
FechaMovto = String.Format("{0} 00:00", ClsPaginas.NowADS().AddDays(1).ToString("yyyy/MM/dd"))
|
||||
End If
|
||||
|
||||
DataAdapter("PA_Inv_ExistenciasPSEmpaqueGet")
|
||||
@@ -2216,7 +2218,7 @@ Public Class ClsInventarios
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
If Fecha = "-1" Then
|
||||
Fecha = String.Format("{0} 00:00", Now.AddDays(1).ToString("yyyy/MM/dd"))
|
||||
Fecha = String.Format("{0} 00:00", ClsPaginas.NowADS().AddDays(1).ToString("yyyy/MM/dd"))
|
||||
End If
|
||||
|
||||
DataAdapter("PA_Inv_ExistenciasPSXMLGet")
|
||||
@@ -5630,7 +5632,7 @@ Public Class ClsInventarios
|
||||
NumPolizaSeguro As String, CveUsuario As Integer, NombreAseguradoraMedioAmbiente As String, NumPolizaSeguroMedioAmbiente As String, NombreAseguradoraCarga As String, NumPolizaSeguroCarga As String,
|
||||
Optional CveTipoCamion As Integer = 1, Optional LongitudCaja As String = "", Optional LineaTransportacion As String = "", Optional SCAC As String = "", Optional CAAT As String = "",
|
||||
Optional CveTipoRemolque As Integer = -1, Optional NumeroTrailer As String = "", Optional Estatus As Boolean = False, Optional CveProveedor As Integer = -1,
|
||||
Optional Marca As String = "", Optional Color As String = "") As Boolean
|
||||
Optional Marca As String = "", Optional Color As String = "", Optional CveChoferAsignado As Integer = -1, Optional CveRemolque1Asignado As Integer = -1, Optional CveRemolque2Asignado As Integer = -1) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Inv_CamionesAdd")
|
||||
@@ -5660,6 +5662,9 @@ Public Class ClsInventarios
|
||||
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
|
||||
.Add("@Marca", SqlDbType.VarChar).Value = Marca
|
||||
.Add("@Color", SqlDbType.VarChar).Value = Color
|
||||
.Add("@CveChoferAsignado", SqlDbType.Int).Value = CveChoferAsignado
|
||||
.Add("@CveRemolque1Asignado", SqlDbType.Int).Value = CveRemolque1Asignado
|
||||
.Add("@CveRemolque2Asignado", SqlDbType.Int).Value = CveRemolque2Asignado
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
@@ -5694,7 +5699,7 @@ Public Class ClsInventarios
|
||||
NumPolizaSeguro As String, CveUsuario As Integer, CveEmpresa As Integer, NombreAseguradoraMedioAmbiente As String, NumPolizaSeguroMedioAmbiente As String, NombreAseguradoraCarga As String,
|
||||
NumPolizaSeguroCarga As String, Optional CveTipoCamion As Integer = -1, Optional LongitudCaja As String = "", Optional LineaTransportacion As String = "", Optional SCAC As String = "", Optional CAAT As String = "",
|
||||
Optional CveTipoRemolque As Integer = -1, Optional NumeroTrailer As String = "", Optional Estatus As Boolean = False, Optional CveProveedor As Integer = -1,
|
||||
Optional Marca As String = "", Optional Color As String = "") As Boolean
|
||||
Optional Marca As String = "", Optional Color As String = "", Optional CveChoferAsignado As Integer = -1, Optional CveRemolque1Asignado As Integer = -1, Optional CveRemolque2Asignado As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Inv_CamionesUpdate")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
@@ -5724,6 +5729,9 @@ Public Class ClsInventarios
|
||||
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
|
||||
.Add("@Marca", SqlDbType.VarChar).Value = Marca
|
||||
.Add("@Color", SqlDbType.VarChar).Value = Color
|
||||
.Add("@CveChoferAsignado", SqlDbType.Int).Value = CveChoferAsignado
|
||||
.Add("@CveRemolque1Asignado", SqlDbType.Int).Value = CveRemolque1Asignado
|
||||
.Add("@CveRemolque2Asignado", SqlDbType.Int).Value = CveRemolque2Asignado
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
|
||||
@@ -120,7 +120,7 @@ Public Class ClsMovimientos
|
||||
Public Function GetCxCClienteDetalle(CveCliente As Integer, FechaI As String, FechaF As String, CveMoneda As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, CveClienteSucursal As Integer, Optional TipoDocto As String = "-1", Optional FechaCorte As Date = MaxFecha, Optional FechaVencimientoI As Date = MinFecha, Optional FechaVencimientoF As Date = MaxFecha) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
FechaCorte = IIf(FechaCorte = Nothing, Date.Now.AddYears(1), FechaCorte).ToString.ToDate
|
||||
FechaCorte = IIf(FechaCorte = Nothing, ClsPaginas.NowADS().AddYears(1), FechaCorte).ToString.ToDate
|
||||
|
||||
DataAdapter("PA_Vta_ClienteCxC")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
@@ -684,7 +684,7 @@ Public Class ClsMovimientos
|
||||
Optional TipoDocto As String = "-1", Optional TipoAgrupacion As Integer = -1, Optional CveProyecto As Integer = -1) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
If FechaCorte = Nothing Then FechaCorte = Now
|
||||
If FechaCorte = Nothing Then FechaCorte = ClsPaginas.NowADS()
|
||||
DataAdapter("PA_Comp_RepCxP")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
@@ -1314,7 +1314,7 @@ Public Class ClsMovimientos
|
||||
Optional Comprobaciones As Integer = -1, Optional AplicaNC As Integer = -1, Optional TipoDocto As String = "-1", Optional CveProyecto As Integer = -1) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
If FechaCorte = Nothing Then FechaCorte = Now
|
||||
If FechaCorte = Nothing Then FechaCorte = ClsPaginas.NowADS()
|
||||
DataAdapter("PA_Comp_RepCxPDetalle")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
@@ -1481,7 +1481,7 @@ Public Class ClsMovimientos
|
||||
#End Region
|
||||
|
||||
#Region "Anticipos de Proveedores"
|
||||
Public Function GetAnticiposProveedor(CveProveedor As Integer, CveProveedorSucursal As Integer, Optional CveMoneda As Integer = -1, Optional SelectTop As Integer = -1, Optional FechaI As String = "-1", Optional FechaF As String = "-1", Optional TipoDocto As String = "-1") As Boolean
|
||||
Public Function GetAnticiposProveedor(CveProveedor As Integer, CveEmpresa As Integer, Optional CveMoneda As Integer = -1, Optional CveProveedorSucursal As Integer = -1, Optional SelectTop As Integer = -1, Optional FechaI As Date = MinFecha, Optional FechaF As Date = MaxFecha, Optional TipoDocto As String = "-1") As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Comp_ProveedorAnticipos")
|
||||
@@ -1490,12 +1490,12 @@ Public Class ClsMovimientos
|
||||
.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("@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
|
||||
|
||||
@@ -706,7 +706,8 @@ Public Class ClsOC
|
||||
Optional CveCliente As Integer = -1, Optional CveVendedor As Integer = -1, Optional PrioridadObservacion As String = "",
|
||||
Optional PorcentajeIVA As Decimal = 0.16D, Optional IVA As Decimal = 0, Optional RetIVA As Decimal = 0, Optional RetISR As Decimal = 0, Optional FechaExpiracion As Date = Nothing, Optional CveCotizacion As Integer = -1,
|
||||
Optional FolioAdicional As String = "", Optional EntregaDirecta As Integer = -1, Optional CveDireccionEnvio As Integer = -1, Optional Guia As String = "-1", Optional IEPS As Decimal = -1,
|
||||
Optional CveIEAnticipo As Integer = -1, Optional ImporteAnticipo As Decimal = 0, Optional UsoCFDI As Integer = -1, Optional Promocion As String = "-1", Optional CveProveedorContacto As Integer = -1, Optional NumRemision As String = "-1") As Boolean
|
||||
Optional CveIEAnticipo As Integer = -1, Optional ImporteAnticipo As Decimal = 0, Optional UsoCFDI As Integer = -1, Optional Promocion As String = "-1", Optional CveProveedorContacto As Integer = -1, Optional NumRemision As String = "-1",
|
||||
Optional CveColectiva As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_OC_OrdenesCompraAdd")
|
||||
@@ -750,6 +751,7 @@ Public Class ClsOC
|
||||
.Add("@Promocion", SqlDbType.VarChar).Value = Promocion
|
||||
.Add("@CveProveedorContacto", SqlDbType.Int).Value = CveProveedorContacto
|
||||
.Add("@NumRemision", SqlDbType.VarChar).Value = NumRemision
|
||||
.Add("@CveColectiva", SqlDbType.Int).Value = CveColectiva
|
||||
|
||||
.Add("@vCveOrdenCompra", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
.Add("@vFolio", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
@@ -1156,7 +1158,7 @@ Public Class ClsOC
|
||||
pObservacion As String, pCveUsuario As Integer, Optional pCveOrdenCompraPadre As Integer = -1, Optional CvePresupuestoEgreso As Integer = -1, Optional Descuento As Decimal = 0,
|
||||
Optional IEPSPS As Decimal = 0, Optional IEPSPSIVA As Decimal = 0, Optional IVA As Decimal = 0, Optional RetIVA As Decimal = 0, Optional RetISR As Decimal = 0, Optional Total As Decimal = 0,
|
||||
Optional CveContratoDetalle As Integer = -1, Optional IVAPorcentaje As Decimal = 0, Optional RetIVAPorcentaje As Decimal = 0, Optional RetISRPorcentaje As Decimal = 0, Optional IEPSPSPorcentaje As Decimal = 0,
|
||||
Optional IEPSPSIVAPorcentaje As Decimal = 0, Optional CveVentaDetalleCotizacion As Integer = -1, Optional CveTipoGastoObra As Integer = -1, Optional CveCultivoCuadroDetalle As Integer = -1) As Boolean
|
||||
Optional IEPSPSIVAPorcentaje As Decimal = 0, Optional CveVentaDetalleCotizacion As Integer = -1, Optional CveTipoGastoObra As Integer = -1, Optional CveCultivoCuadroDetalle As Integer = -1, Optional CveColectiva As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_OC_OrdenesCompraDetalleAdd")
|
||||
|
||||
@@ -1189,6 +1191,7 @@ Public Class ClsOC
|
||||
.Add("@CveVentaDetalleCotizacion", SqlDbType.Int).Value = CveVentaDetalleCotizacion
|
||||
.Add("@CveTipoGastoObra", SqlDbType.Int).Value = CveTipoGastoObra
|
||||
.Add("@CveCultivoCuadroDetalle", SqlDbType.Int).Value = CveCultivoCuadroDetalle
|
||||
.Add("@CveColectiva", SqlDbType.Int).Value = CveColectiva
|
||||
|
||||
End With
|
||||
|
||||
|
||||
@@ -98,6 +98,21 @@ Public Class ClsPaginas
|
||||
End Try
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Shared Function NowADS() As DateTime
|
||||
Dim tHora As Integer = 0
|
||||
'If UsuarioActual IsNot Nothing AndAlso UsuarioActual.Empresa IsNot Nothing Then tHora = UsuarioActual.Empresa.UTCOffset
|
||||
Try
|
||||
If HttpContext.Current.Session("UsuarioSIG") IsNot Nothing AndAlso CType(HttpContext.Current.Session("UsuarioSIG"), Usuario).Empresa IsNot Nothing Then tHora = CType(HttpContext.Current.Session("UsuarioSIG"), Usuario).Empresa.UTCOffset
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
|
||||
|
||||
Return If(tHora <> 0, Now.ToUniversalTime.AddMinutes(tHora), Now)
|
||||
End Function
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "GlobalDTs"
|
||||
@@ -105,7 +120,7 @@ Public Class ClsPaginas
|
||||
Get
|
||||
If GlobalTipoCambio <= 0 Then
|
||||
'sino tiene dato lo recargo por si ya esta insertado
|
||||
If Fecha = MinFecha Then Fecha = Now
|
||||
If Fecha = MinFecha Then Fecha = NowADS()
|
||||
Dim ObjGral As New ClsGenerales
|
||||
If ObjGral.GetTipoCambio(-1, Fecha) AndAlso ObjGral.DtResultados.Rows.Count > 0 Then
|
||||
HttpContext.Current.Application("GlobalTipoCambio") = ObjGral.DtResultados.Rows(0)("TipoCambio").ToString.ToDouble
|
||||
@@ -124,7 +139,7 @@ Public Class ClsPaginas
|
||||
Get
|
||||
If HttpContext.Current.Application("GlobalTipoCambioUltimaFluctuacion") Is Nothing Then
|
||||
Dim ObjGral As New ClsGenerales
|
||||
If ObjGral.GetTipoCambioUltimaFluctuacion(-1, Now) AndAlso ObjGral.DtResultados.Rows.Count > 0 Then
|
||||
If ObjGral.GetTipoCambioUltimaFluctuacion(-1, NowADS()) AndAlso ObjGral.DtResultados.Rows.Count > 0 Then
|
||||
HttpContext.Current.Application("GlobalTipoCambioUltimaFluctuacion") = ObjGral.DtResultados.Copy()
|
||||
Else
|
||||
HttpContext.Current.Application("GlobalTipoCambioUltimaFluctuacion") = Nothing
|
||||
@@ -136,7 +151,7 @@ Public Class ClsPaginas
|
||||
.FechaFluctuacion = MinFecha
|
||||
}
|
||||
'sino tiene dato lo recargo por si ya esta insertado
|
||||
If Fecha = MinFecha Then Fecha = Now
|
||||
If Fecha = MinFecha Then Fecha = NowADS()
|
||||
If HttpContext.Current.Application("GlobalTipoCambioUltimaFluctuacion") IsNot Nothing Then
|
||||
|
||||
Dim dr As DataRow = DirectCast(HttpContext.Current.Application("GlobalTipoCambioUltimaFluctuacion"), DataTable).FiltroPrimero(String.Format("Fecha < '{0}'", Fecha), Orderby:="Fecha DESC")
|
||||
@@ -159,7 +174,7 @@ Public Class ClsPaginas
|
||||
Get
|
||||
If GlobalTipoCambioEuro <= 0 Then
|
||||
'sino tiene dato lo recargo por si ya esta insertado
|
||||
If Fecha = MinFecha Then Fecha = Now
|
||||
If Fecha = MinFecha Then Fecha = NowADS()
|
||||
Dim ObjGral As New ClsGenerales
|
||||
If ObjGral.GetTipoCambio(-1, Fecha) AndAlso ObjGral.DtResultados.Rows.Count > 0 Then
|
||||
Application("GlobalTipoCambioEuro") = ObjGral.DtResultados.Rows(0)("TipoCambioEuro").ToString.ToDouble
|
||||
@@ -1083,6 +1098,7 @@ Public Class ClsPaginas
|
||||
Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Shared Property GlobalDTClasificacionesPresupuestos(CveEmpresa As Integer) As DataTable
|
||||
Get
|
||||
Dim AppNombre As String = $"GlobalDTClasificacionesPresupuestos-{CveEmpresa}"
|
||||
@@ -1763,7 +1779,7 @@ Public Class ClsPaginas
|
||||
Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
Property GlobalDTInvCamiones(CveEmpresa As Integer, Optional CveCamion As Integer = -1) As DataTable
|
||||
Property GlobalDTInvCamiones(CveEmpresa As Integer, Optional CveCamion As Integer = -1, Optional CveTipoCamion As Integer = -1) As DataTable
|
||||
Get
|
||||
Dim AppNombre As String = $"GlobalDTInvCamiones-{CveEmpresa}"
|
||||
If Application(AppNombre) Is Nothing Then
|
||||
@@ -1773,6 +1789,7 @@ Public Class ClsPaginas
|
||||
End If
|
||||
Dim Str As New StringBuilder
|
||||
If CveCamion > 0 Then Str.AppendFormat("CveCamion = {0}", CveCamion)
|
||||
If CveTipoCamion > 0 Then Str.AppendFormat("CveTipoCamion = {0}", CveTipoCamion)
|
||||
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
|
||||
GlobalDTInvCamiones = Dv.ToTable
|
||||
Dv.Dispose()
|
||||
@@ -4374,9 +4391,7 @@ Public Class ClsPaginas
|
||||
End If
|
||||
Else
|
||||
LocalStopwatch.Value.Restart()
|
||||
If EsProduccion Then
|
||||
If UsuarioActual.CveEmpresa.Contiene(141, 152, 159, 160, 161, 162, 166) Then System.Threading.Thread.Sleep(1100)
|
||||
End If
|
||||
|
||||
If Not Page.IsPostBack Then
|
||||
'If Not CType(Session("UsuarioSIG"), Usuario).SeleccionoEmpresa AndAlso Request.ServerVariables("URL") <> "/Sistemas/PopUpSeleccionarEmpresa.aspx" Then
|
||||
' Response.Redirect("/Sistemas/PopUpSeleccionarEmpresa.aspx")
|
||||
@@ -4426,7 +4441,7 @@ Public Class ClsPaginas
|
||||
End Sub
|
||||
Private Shared Function GetCurrentPageViewState() As System.Web.UI.StateBag
|
||||
Dim page As Page = TryCast(HttpContext.Current.CurrentHandler, Page)
|
||||
Dim viewStateProp = page?.[GetType]().GetProperty("ViewState", Reflection.BindingFlags.FlattenHierarchy Or Reflection.BindingFlags.Instance Or Reflection.BindingFlags.NonPublic)
|
||||
Dim viewStateProp As Reflection.PropertyInfo = page?.[GetType]().GetProperty("ViewState", Reflection.BindingFlags.FlattenHierarchy Or Reflection.BindingFlags.Instance Or Reflection.BindingFlags.NonPublic)
|
||||
Return CType(viewStateProp?.GetValue(page), System.Web.UI.StateBag)
|
||||
End Function
|
||||
Public Shared Sub Alert(Mensaje As String, Optional pOpcion As TipoMensaje = TipoMensaje.MsgInformacion, Optional JSBtnAceptar As String = "", Optional timeout As Integer = 5, Optional ShowCloseButton As Boolean = True, Optional TextoConfirmacion As String = "", Optional TextoSegundoBoton As String = "", Optional JSBtn2 As String = "")
|
||||
@@ -4499,7 +4514,7 @@ Public Class ClsPaginas
|
||||
Public Shared Sub RegistraScript(Script As String, Optional valuetick As String = "")
|
||||
Dim page As Page = TryCast(HttpContext.Current.CurrentHandler, Page)
|
||||
Script = $"{Script.TrimEnd(";"c)};" 'sino trae ";" al final, se lo agregamos
|
||||
ScriptManager.RegisterStartupScript(page, page.GetType(), $"{DateTime.Now.Ticks + 1}{ThreadSafeRandom.Next()}{valuetick}", Script, True)
|
||||
ScriptManager.RegisterStartupScript(page, page.GetType(), $"{NowADS().Ticks + 1}{ThreadSafeRandom.Next()}{valuetick}", Script, True)
|
||||
End Sub
|
||||
Public Sub TabEnabled(Tab As System.Web.UI.HtmlControls.HtmlAnchor, Valor As Boolean)
|
||||
If Valor Then
|
||||
@@ -4521,11 +4536,11 @@ Public Class ClsPaginas
|
||||
End Sub
|
||||
Public Sub NotificacionesPendientes(Nota As String)
|
||||
'incremento el contador de alertas
|
||||
Dim Type = Master.GetType
|
||||
Dim Prop = Type.GetProperty("countNotificaciones")
|
||||
Dim Type As System.Type = Master.GetType
|
||||
Dim Prop As Reflection.PropertyInfo = Type.GetProperty("countNotificaciones")
|
||||
Prop.SetValue(Master, 1 + CInt(Prop.GetValue(Master)))
|
||||
'end incremento contador de alertas
|
||||
Dim ltl = DirectCast(Master.FindControl("LtlMNotificaciones"), Literal)
|
||||
Dim ltl As Literal = DirectCast(Master.FindControl("LtlMNotificaciones"), Literal)
|
||||
ltl.Text = String.Format(" {0} {1}", ltl.Text, Nota)
|
||||
End Sub
|
||||
Public Sub Confirmacion(Mensaje As String, Tipo As String, FuncionOK As String, FuncionCancel As String)
|
||||
@@ -4628,7 +4643,7 @@ Public Class ClsPaginas
|
||||
lrds.Add(rds)
|
||||
ImprimirPDF(RutaReporte, lrds, Parametros, NombreArchivo, Formato, MR, Content_Disposition)
|
||||
End Sub
|
||||
Public Sub ImprimirPDFStimulsoft(RutaReporte As String, DtDatos As DataTable, Parametros As List(Of ReportParameter), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional RDSName As String = "Datos", Optional Content_Disposition As String = "attachment")
|
||||
Public Sub ImprimirPDFStimul(RutaReporte As String, DtDatos As DataTable, Parametros As List(Of ReportParameter), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional RDSName As String = "Datos", Optional Content_Disposition As String = "attachment")
|
||||
Dim lrds As New List(Of ReportDataSource)
|
||||
Dim rds As New ReportDataSource
|
||||
rds.Name = RDSName
|
||||
@@ -4638,7 +4653,7 @@ Public Class ClsPaginas
|
||||
If Formato.ToLower() = "excel" Then
|
||||
Extension = "xlsx"
|
||||
End If
|
||||
ImprimirbytesPDF(StreamBytesStimulsoft("Facturas", RutaReporte, lrds, Parametros, NombreArchivo:=NombreArchivo, Formato:=Formato), NombreArchivo, Formato, Content_Disposition:=Content_Disposition, Extension:=Extension)
|
||||
ImprimirbytesPDF(StreamBytesStimul("Facturas", RutaReporte, lrds, Parametros, NombreArchivo:=NombreArchivo, Formato:=Formato), NombreArchivo, Formato, Content_Disposition:=Content_Disposition, Extension:=Extension)
|
||||
End Sub
|
||||
Public Sub ImprimirPDFMultiDS(RutaReporte As String, lrds As List(Of ReportDataSource), Parametros As List(Of ReportParameter), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional RDSName As String = "DataSet1", Optional MR As ReportViewer = Nothing)
|
||||
ImprimirPDF(RutaReporte, lrds, Parametros, NombreArchivo, Formato, MR)
|
||||
@@ -5110,7 +5125,7 @@ Public Class ClsPaginas
|
||||
#End Region
|
||||
#Region "IMPRIMIR FACTURA"
|
||||
|
||||
Public Function PdfFactura(ByRef Vta As Modelos.Factura, Optional AplicaPagare As String = "0", Optional Guardar As Boolean = True, Optional SubReportData As Modelos.MSubReportData = Nothing, Optional UsarStimulsoft As Boolean = False) As Byte()
|
||||
Public Function PdfFactura(ByRef Vta As Modelos.Factura, Optional AplicaPagare As String = "0", Optional Guardar As Boolean = True, Optional SubReportData As Modelos.MSubReportData = Nothing, Optional UsarStimul As Boolean = False) As Byte()
|
||||
Dim retorno As Byte() = Nothing
|
||||
' Dim ObjVentas As New ClsVentas
|
||||
'DATOS GENERALES
|
||||
@@ -5504,7 +5519,7 @@ Public Class ClsPaginas
|
||||
params.Add(New ReportParameter("ClienteDiasCredito", "0"))
|
||||
params.Add(New ReportParameter("MonedaAbreviatura", If(Vta.MonedaAbreviatura.ToString IsNot Nothing, Vta.MonedaAbreviatura.ToString, "")))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToString))
|
||||
params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToString))
|
||||
params.Add(New ReportParameter("Sucursal", Vta.SubProyecto.SubProyecto))
|
||||
params.Add(New ReportParameter("EstatusFactura", If(Vta.TipoEstatus = 5, Vta.EstatusFactura, "")))
|
||||
params.Add(New ReportParameter("EstatusEntrega", If(Vta.Inv_CveEstatusEntrega = 1, Vta.Inv_EstatusEntrega, "")))
|
||||
@@ -5947,7 +5962,7 @@ Public Class ClsPaginas
|
||||
lrds.Add(rds3)
|
||||
Dim rds4 As New ReportDataSource With {.Name = "DataSet4", .Value = If(Vta.DtDocumentosRelacionados IsNot Nothing, Vta.DtDocumentosRelacionados, New DataTable)} ' sino esta creado el objeto, lo creamos, para que no truene el reporte
|
||||
lrds.Add(rds4)
|
||||
If UsuarioActual.Empresa.Funcionalidad(707) = "1" OrElse UsarStimulsoft Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(707) = "1" OrElse UsarStimul Then
|
||||
If Vta.Cliente.CodigoRegimenFiscal.ToString.Length > 0 Then
|
||||
params.Add(New ReportParameter("ClienteRegimenFiscal", $"{Vta.Cliente.CodigoRegimenFiscal}-{Vta.Cliente.RegimenFiscal}"))
|
||||
End If
|
||||
@@ -5993,11 +6008,11 @@ Public Class ClsPaginas
|
||||
If UsuarioActual.Empresa.Funcionalidad(707) = "1" Then
|
||||
Dim ArchivoStimulsfot As New System.IO.FileInfo(RutaFormato.Replace(".rdlc", ".mrt"))
|
||||
If ArchivoStimulsfot.Exists Then
|
||||
UsarStimulsoft = True
|
||||
UsarStimul = True
|
||||
params.Add(New ReportParameter("RegimenFiscalEmpresa", String.Format("{0} - {1}", UsuarioActual.Empresa.CodigoRegimenFiscal, UsuarioActual.Empresa.RegimenFiscal)))
|
||||
End If
|
||||
End If
|
||||
If Not UsarStimulsoft Then
|
||||
If Not UsarStimul Then
|
||||
Dim Archivo As New System.IO.FileInfo(RutaFormato)
|
||||
If Archivo.Exists Then
|
||||
|
||||
@@ -6029,7 +6044,10 @@ Public Class ClsPaginas
|
||||
End If
|
||||
Else
|
||||
RutaFormato = RutaFormato.Replace(".rdlc", ".mrt")
|
||||
retorno = StreamBytesStimulsoft("Facturas", RutaFormato, lrds, params, NombreArchivo:=NombreArchivo, Formato:="PDF")
|
||||
|
||||
params.Add(New ReportParameter("SucursalCliente", If(Vta.ClienteSucursal.Sucursal Is Nothing, "", Vta.ClienteSucursal.Sucursal.ToString)))
|
||||
|
||||
retorno = StreamBytesStimul("Facturas", RutaFormato, lrds, params, NombreArchivo:=NombreArchivo, Formato:="PDF")
|
||||
If UsuarioActual.Empresa.Funcionalidad(707) = "1" Then
|
||||
Dim ArchivoPDF As New System.IO.FileInfo(String.Format("{0}PDF\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, Vta.TipoDocto, Vta.SerieFolio))
|
||||
If Guardar Then
|
||||
@@ -6057,7 +6075,7 @@ Public Class ClsPaginas
|
||||
End Try
|
||||
Return retorno
|
||||
End Function
|
||||
Protected Function StreamBytesStimulsoft(Opcion As String, RutaReporte As String, DataSource As List(Of ReportDataSource), Parametros As List(Of ReportParameter), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional NombreDataSource As String = "Datos") As Byte()
|
||||
Protected Function StreamBytesStimul(Opcion As String, RutaReporte As String, DataSource As List(Of ReportDataSource), Parametros As List(Of ReportParameter), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional NombreDataSource As String = "Datos") As Byte()
|
||||
'limpio ReportViwer
|
||||
Dim sw As Stopwatch = Stopwatch.StartNew()
|
||||
|
||||
@@ -6119,12 +6137,12 @@ Public Class ClsPaginas
|
||||
New JProperty("parametros", paramsArray),
|
||||
New JProperty("dataSource", dataSourceArray)
|
||||
)
|
||||
Dim data = New StringContent(payload.ToString(), Encoding.UTF8, "application/json")
|
||||
Using httpClient = New HttpClient()
|
||||
Using request = New HttpRequestMessage(HttpMethod.Post, Url)
|
||||
Dim data As New StringContent(payload.ToString(), Encoding.UTF8, "application/json")
|
||||
Using httpClient As New HttpClient()
|
||||
Using request As New HttpRequestMessage(HttpMethod.Post, Url)
|
||||
'request.Headers.Add("ADSToken", Encripta(String.Format("CVEEMPRESA={0}&TICKS={1}&CVEUSUARIO=100", CveEmpresa, DateTime.UtcNow.Ticks)))
|
||||
request.Content = New StringContent(payload.ToString(), Encoding.UTF8, "application/json")
|
||||
Dim response = httpClient.SendAsync(request).Result
|
||||
Dim response As HttpResponseMessage = httpClient.SendAsync(request).Result
|
||||
If response.StatusCode = Net.HttpStatusCode.OK Then
|
||||
Bytes = response.Content.ReadAsByteArrayAsync().Result
|
||||
End If
|
||||
@@ -6453,7 +6471,7 @@ Public Class ClsPaginas
|
||||
params.Add(New ReportParameter("EntregaDirecta", ObjOC.EntregaDirecta.ToString))
|
||||
params.Add(New ReportParameter("NombreCliente", ObjOC.NombreCliente.ToString))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToString))
|
||||
params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToString))
|
||||
params.Add(New ReportParameter("DomicilioSucursal", DomicilioSucursal))
|
||||
params.Add(New ReportParameter("ProveedorContacto", ObjOC.ProveedorContacto))
|
||||
params.Add(New ReportParameter("Comprador", ObjOC.UsuarioAsignado))
|
||||
@@ -6651,7 +6669,7 @@ Public Class ClsPaginas
|
||||
lista.Add(New CrystalParametro("Empresa", EmpresaActual.Empresa))
|
||||
lista.Add(New CrystalParametro("TipoCuentas", "Todas"))
|
||||
lista.Add(New CrystalParametro("FechaInicio", "-"))
|
||||
lista.Add(New CrystalParametro("FechaFin", DateTime.Now.ToShortDateString))
|
||||
lista.Add(New CrystalParametro("FechaFin", NowADS().ToShortDateString))
|
||||
lista.Add(New CrystalParametro("NombreProveedor", NombreProv))
|
||||
lista.Add(New CrystalParametro("DireccionProveedor", Direccion))
|
||||
lista.Add(New CrystalParametro("ProveedorRFC", RFC))
|
||||
@@ -7126,7 +7144,7 @@ Public Class ClsPaginas
|
||||
params.Add(New ReportParameter("EmpresaNoInt", UsuarioActual.Empresa.NoInt))
|
||||
'DATOS IMPRESION
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToString))
|
||||
params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToString))
|
||||
'DATOS GENERALES
|
||||
Dim Ruta As String = UsuarioActual.Empresa.Ruta
|
||||
Dim PathXML As String = $"{Ruta}XML\Pag\{Serie}-{Folio}.xml"
|
||||
@@ -7457,9 +7475,9 @@ Public Class ClsPaginas
|
||||
ImporteMovimiento = (PorcentajePago * CompraActual.RetISR).RoundSQL
|
||||
ImporteMN = (ImporteMovimiento * CompraActual.TC).RoundSQL
|
||||
If CompraActual.CveMoneda > 1 Then ImporteME = ImporteMovimiento
|
||||
Dim ContabilizableISR As Boolean = False
|
||||
If UsuarioActual.CveEmpresa.Contiene(140, 7, 11, 12, 122, 145, 172, 173, 174) Then
|
||||
ContabilizableISR = True
|
||||
Dim ContabilizableISR As Boolean = True
|
||||
If UsuarioActual.CveEmpresa.Contiene(13, 83, 141, 153, 154, 158) Then
|
||||
ContabilizableISR = False
|
||||
End If
|
||||
Dim Ret As ConceptosRetenciones = CompraActual.ConceptoPrePolizaRetISR
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, ImporteMN, Ret.CveConceptoxAcreditar, CompraActual.SerieFolio, Concepto, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambio:=CompraActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, Contabilizable:=ContabilizableISR, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True
|
||||
@@ -7865,6 +7883,11 @@ Public Class ClsPaginas
|
||||
Dim Contabilizable As Boolean = True
|
||||
If PorcentajePago > 1 Then PorcentajePago = 1
|
||||
|
||||
''validación
|
||||
If Pago.TipoPago = "I" AndAlso Pago.CveClientePago <= 0 Then
|
||||
Return True
|
||||
End If
|
||||
|
||||
Dim Concepto As String = String.Format("{0} F:{1}", VentaActual.ClienteNombre, VentaActual.SerieFolio)
|
||||
Dim FuncionalidadFluctuacionImpuestos As Boolean = If(VentaActual.UsuarioActual.Empresa.Funcionalidad(159) = "1", True, False)
|
||||
Dim tFecha As Date = Pago.Fecha
|
||||
@@ -8028,12 +8051,12 @@ Public Class ClsPaginas
|
||||
End If
|
||||
If Pago.CveMonedaPago > 1 Then
|
||||
'Agregamos la Extranjera
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, 92, Pago.Referencia, Concepto, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=VentaActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, 92, Pago.Referencia, Concepto, CveVenta:=VentaActual.CveVenta, CveCliente:=Pago.CveClientePago, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=VentaActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
|
||||
ImporteMN = (Pago.ImportePago * TCValuacionPago - Pago.ImportePago).RoundSQL
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, ImporteMN, 332, Pago.Referencia, Concepto, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=VentaActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, ImporteMN, 332, Pago.Referencia, Concepto, CveVenta:=VentaActual.CveVenta, CveCliente:=Pago.CveClientePago, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=VentaActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
|
||||
Else
|
||||
'Agregamos Nacional
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, 92, Pago.Referencia, Concepto, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CveSubProyecto:=VentaActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, 92, Pago.Referencia, Concepto, CveVenta:=VentaActual.CveVenta, CveCliente:=Pago.CveClientePago, CveIE:=Pago.CveIE, CveSubProyecto:=VentaActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
|
||||
End If
|
||||
End If
|
||||
'si tiene otros gastos/ingresos
|
||||
@@ -8106,7 +8129,7 @@ Public Class ClsPaginas
|
||||
Public Property AplicaTraslado As Boolean = True
|
||||
Public Property Referencia As String
|
||||
Public Property CveConceptoPago As Integer = -1
|
||||
|
||||
Public Property CveClientePago As Integer = -1
|
||||
Public Property ImporteFluctuacionAdicional As Decimal = 0
|
||||
Public Property ValorMultiplicador As Decimal = 1
|
||||
End Class
|
||||
@@ -8465,7 +8488,7 @@ Public Class ClsPaginas
|
||||
PaginaDict.Add("/Bancos/RepCobradoPagadoDetalle.aspx".ToUpper(), -1)
|
||||
PaginaDict.Add("/Bancos/RepCobradoPagado.aspx".ToUpper(), 368)
|
||||
PaginaDict.Add("/Bancos/RepIngresosPorComprobar.aspx".ToUpper(), 381)
|
||||
PaginaDict.Add("/Bancos/Documentos.aspx".ToUpper(), 319)
|
||||
'PaginaDict.Add("/Bancos/Documentos.aspx".ToUpper(), 319)
|
||||
PaginaDict.Add("/Bancos/RepCreditos.aspx".ToUpper(), 320)
|
||||
PaginaDict.Add("/Bancos/RepSaldosDAP.aspx".ToUpper(), 385)
|
||||
PaginaDict.Add("/Bancos/DepositosCaja.aspx".ToUpper(), 560)
|
||||
@@ -9310,7 +9333,7 @@ Public Class ClsPaginas
|
||||
PaginaDict.Add("/Ventas/RepLineasAdicionales.aspx".ToUpper(), 1331)
|
||||
PaginaDict.Add("/Ventas/RepLineasAdicionales.aspx?OP=OP".ToUpper(), 1332)
|
||||
|
||||
PaginaDict.Add("/Ventas/FacturacionAcarreos.aspx".ToUpper(), 774)
|
||||
PaginaDict.Add("/Ventas/FacturacionAcarreos.aspx".ToUpper(), 784)
|
||||
|
||||
|
||||
PaginaDict.Add("/Ventas/RepIndicadoresPorProyecto.aspx".ToUpper(), 617)
|
||||
|
||||
@@ -411,7 +411,8 @@ Public Class ClsProductosServicios
|
||||
Optional ClaveCategoriaToxicidad As String = "", Optional ClaveImpuestoTipoProducto As String = "", Optional Litraje As Double = -1, Optional AplicaSerie As Boolean = False, Optional AplicaLote As Boolean = False,
|
||||
Optional AplicaCaducidad As Boolean = False, Optional AplicaSeccion As Boolean = False, Optional TiempoCaducidad As Integer = -1, Optional CvePSAdicionalVigencia As Integer = -1, Optional PrecioLibre As Boolean = False,
|
||||
Optional CveMaterialPeligroso As Integer = -1, Optional CveEmbalaje As Integer = -1, Optional PesoKg As Decimal = -1, Optional Dimensiones As String = "", Optional CveObjetoImpuesto As Integer = 0,
|
||||
Optional RegistroRSCO As String = "-1", Optional FechaVigenciaRSCO As Date = MinFecha, Optional VigenciaIndeterminadaRSCO As Boolean = False, Optional CveTipoEmpacado As Integer = -1, Optional CveTipoOrganico As Integer = -1) As Integer
|
||||
Optional RegistroRSCO As String = "-1", Optional FechaVigenciaRSCO As Date = MinFecha, Optional VigenciaIndeterminadaRSCO As Boolean = False, Optional CveTipoEmpacado As Integer = -1, Optional CveTipoOrganico As Integer = -1,
|
||||
Optional NombreComercial As String = "", Optional NotasAdicionales As String = "", Optional EcommerceEtiquetas As String = "", Optional ActivoEcommerce As Boolean = False, Optional EcommercePrecio As Decimal = 0) As Integer
|
||||
Dim Retorno As Integer = -1
|
||||
|
||||
DataAdapter("PA_ProductosServiciosAdd")
|
||||
@@ -509,6 +510,11 @@ Public Class ClsProductosServicios
|
||||
'Nuevo MLopez 18/11/2022
|
||||
.Add("@CveTipoEmpacado", SqlDbType.Int).Value = CveTipoEmpacado
|
||||
.Add("@CveTipoOrganico", SqlDbType.Int).Value = CveTipoOrganico
|
||||
.Add("@NombreComercial", SqlDbType.VarChar).Value = NombreComercial
|
||||
.Add("@NotasAdicionales", SqlDbType.VarChar).Value = NotasAdicionales
|
||||
.Add("@EcommerceEtiquetas", SqlDbType.VarChar).Value = EcommerceEtiquetas
|
||||
.Add("@ActivoEcommerce", SqlDbType.VarChar).Value = ActivoEcommerce
|
||||
.Add("@EcommercePrecio", SqlDbType.SmallMoney).Value = EcommercePrecio
|
||||
|
||||
End With
|
||||
|
||||
@@ -634,7 +640,7 @@ Public Class ClsProductosServicios
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function UpdatePS(CveClasificacion As Integer, CveClasificacionCosto As Integer, CveUnidadMedida As Integer, Codigo As String, Codigo2 As String, CodigoBarras As String, PS As String, Precio As Double, IVA As Double, RetIVA As Double, Inventariable As Boolean, CveProveedorCompra As Integer,
|
||||
AplicaParaConcepto As Boolean, AplicaParaVenta As Boolean, Estado As Boolean, CveUsuario As Integer, CvePS As Integer, CveMetodoInventario As Integer, EsPaquete As Integer, CveSATPS As Integer, Optional CveTipoPS As Integer = -1, Optional TipoServicio As Integer = -1,
|
||||
AplicaParaConcepto As Boolean, AplicaParaVenta As Boolean, Estado As Boolean, CveUsuario As Integer, CvePS As Integer, CveMetodoInventario As Integer, EsPaquete As Integer, CveSATPS As Integer, CveEmpresa As Integer, Optional CveTipoPS As Integer = -1, Optional TipoServicio As Integer = -1,
|
||||
Optional CveClasificacion2 As Integer = -1, Optional CveMarca As Integer = -1, Optional AlmacenSeccion As String = "", Optional AplicaIEPS As Boolean = False, Optional IEPSPorcentaje As Decimal = -1,
|
||||
Optional CveCompuesto As Integer = -1, Optional IEPSGrabaIVA As Boolean = False, Optional VentaMinima As Decimal = 0,
|
||||
Optional CveMoneda As Integer = 1, Optional RetISR As Double = 0, Optional PrecioMinimo As Decimal = Nothing, Optional CveTipoFactor As Integer = 1,
|
||||
@@ -643,7 +649,8 @@ Public Class ClsProductosServicios
|
||||
Optional ClaveCategoriaToxicidad As String = "", Optional ClaveImpuestoTipoProducto As String = "", Optional Litraje As Double = -1,
|
||||
Optional AplicaSerie As Boolean = False, Optional AplicaLote As Boolean = False, Optional AplicaCaducidad As Boolean = False, Optional AplicaSeccion As Boolean = False, Optional TiempoCaducidad As Integer = -1, Optional CvePSAdicionalVigencia As Integer = -1, Optional PrecioLibre As Boolean = False,
|
||||
Optional CveMaterialPeligroso As Integer = -1, Optional CveEmbalaje As Integer = -1, Optional PesoKg As Decimal = -1, Optional Dimensiones As String = "", Optional CveObjetoImpuesto As Integer = 0,
|
||||
Optional RegistroRSCO As String = "-1", Optional FechaVigenciaRSCO As Date = MinFecha, Optional VigenciaIndeterminadaRSCO As Boolean = False, Optional CveTipoEmpacado As Integer = -1, Optional CveTipoOrganico As Integer = -1) As Boolean
|
||||
Optional RegistroRSCO As String = "-1", Optional FechaVigenciaRSCO As Date = MinFecha, Optional VigenciaIndeterminadaRSCO As Boolean = False, Optional CveTipoEmpacado As Integer = -1, Optional CveTipoOrganico As Integer = -1,
|
||||
Optional NombreComercial As String = "", Optional NotasAdicionales As String = "", Optional EcommerceEtiquetas As String = "", Optional ActivoEcommerce As Boolean = False, Optional EcommercePrecio As Decimal = 0) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
@@ -677,6 +684,7 @@ Public Class ClsProductosServicios
|
||||
.Add("@IEPSPorcentaje", SqlDbType.SmallMoney).Value = IEPSPorcentaje
|
||||
.Add("@CveCompuesto", SqlDbType.Int).Value = CveCompuesto
|
||||
.Add("@CveSATPS", SqlDbType.Int).Value = CveSATPS
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
|
||||
'Nuevo R: 26/09/2017'
|
||||
.Add("@Inventariable", SqlDbType.Bit).Value = Inventariable
|
||||
@@ -740,6 +748,11 @@ Public Class ClsProductosServicios
|
||||
'Nuevo MLopez 18/11/2022
|
||||
.Add("@CveTipoEmpacado", SqlDbType.Int).Value = CveTipoEmpacado
|
||||
.Add("@CveTipoOrganico", SqlDbType.Int).Value = CveTipoOrganico
|
||||
.Add("@NombreComercial", SqlDbType.VarChar).Value = NombreComercial
|
||||
.Add("@NotasAdicionales", SqlDbType.VarChar).Value = NotasAdicionales
|
||||
.Add("@EcommerceEtiquetas", SqlDbType.VarChar).Value = EcommerceEtiquetas
|
||||
.Add("@ActivoEcommerce", SqlDbType.VarChar).Value = ActivoEcommerce
|
||||
.Add("@EcommercePrecio", SqlDbType.SmallMoney).Value = EcommercePrecio
|
||||
|
||||
End With
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -7085,7 +7085,7 @@ Public Class ClsRH
|
||||
ListaTagsDocumentost.Add(New TagsDocumentos("{Estatura}", DtResultados(0)("Estatura").ToString))
|
||||
ListaTagsDocumentost.Add(New TagsDocumentos("{Peso}", DtResultados(0)("Peso").ToString))
|
||||
ListaTagsDocumentost.Add(New TagsDocumentos("{LugarNacimiento}", DtResultados(0)("LugarNacimiento").ToString))
|
||||
ListaTagsDocumentost.Add(New TagsDocumentos("{Edad}", If(DtResultados(0)("Edad").ToString = "", If(DtResultados(0)("FechaNacimiento").ToString = "", "", DateDiff(DateInterval.Year, DtResultados(0)("FechaNacimiento").ToString.ToDate, Now.Date).ToString), DtResultados(0)("Edad").ToString)))
|
||||
ListaTagsDocumentost.Add(New TagsDocumentos("{Edad}", If(DtResultados(0)("Edad").ToString = "", If(DtResultados(0)("FechaNacimiento").ToString = "", "", DateDiff(DateInterval.Year, DtResultados(0)("FechaNacimiento").ToString.ToDate, ClsPaginas.NowADS().Date).ToString), DtResultados(0)("Edad").ToString)))
|
||||
ListaTagsDocumentost.Add(New TagsDocumentos("{NombreTelEmergencia}", DtResultados(0)("NombreTelEmergencia").ToString))
|
||||
ListaTagsDocumentost.Add(New TagsDocumentos("{TipoSangre}", DtResultados(0)("TipoSangre").ToString))
|
||||
ListaTagsDocumentost.Add(New TagsDocumentos("{SubProyecto}", DtResultados(0)("SubProyecto").ToString))
|
||||
@@ -7137,8 +7137,8 @@ Public Class ClsRH
|
||||
|
||||
ListaTagsDocumentost.Add(New TagsDocumentos("{FechaNacimiento}", DtResultados(0)("FechaNacimiento").ToString.ToDate.ToString("dd/MM/yyyy")))
|
||||
|
||||
Dim fechaActual As String = $" { Now.Day } de { MesTexto(Now.Month) } del año { Now.Year}"
|
||||
Dim FechaActualDF As String = Now.ToString("dd/MM/yyyy")
|
||||
Dim fechaActual As String = $" { ClsPaginas.NowADS().Day } de { MesTexto(ClsPaginas.NowADS().Month) } del año { ClsPaginas.NowADS().Year}"
|
||||
Dim FechaActualDF As String = ClsPaginas.NowADS().ToString("dd/MM/yyyy")
|
||||
|
||||
ListaTagsDocumentost.Add(New TagsDocumentos("{FechaActual}", fechaActual))
|
||||
ListaTagsDocumentost.Add(New TagsDocumentos("{FechaActualDF}", FechaActualDF))
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -134,6 +134,9 @@ Public Class Empresa
|
||||
Public Property FielPassword As String
|
||||
Public Property FielPFX As String
|
||||
Public Property AsuntoPlantillaMailVentaCotizacion As String
|
||||
|
||||
Public Property UTCOffset As Integer
|
||||
Public Property CveZonaHoraria As Integer
|
||||
Public Property PlantillaMailVentaCotizacion As String
|
||||
Dim Funcionalidades As HybridDictionary
|
||||
'HybridDictionary, no se puede serializar, por eso no es propiedad, y se utilizar el setfuncionalidad, para asignarle valor
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -562,12 +562,12 @@ Namespace Modelos
|
||||
Me.MonedaSAT = ClsPaginas.GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", $"CveMoneda = {CveMoneda} ")
|
||||
Me.RefDocto = ""
|
||||
' Me.CveMesa = -1
|
||||
Me.Fecha = Now
|
||||
Me.Fecha = ClsPaginas.NowADS()
|
||||
Me.CvePrePoliza = -1
|
||||
Me.FechaPago = Now
|
||||
Me.FechaPago = ClsPaginas.NowADS()
|
||||
Me.MotivoDescuento = ""
|
||||
Me.Observaciones = ""
|
||||
Me.FechaEjecucion = Now
|
||||
Me.FechaEjecucion = ClsPaginas.NowADS()
|
||||
Me.CveCondicionEntrega = -1
|
||||
Me.CondicionEntrega = ""
|
||||
Me.NumeroCuenta = ""
|
||||
@@ -1292,12 +1292,12 @@ Namespace Modelos
|
||||
ObjFactura.CveMoneda = CveMoneda
|
||||
ObjFactura.Moneda = ClsPaginas.GlobalDTMonedas.FiltroPrimeroValor("Moneda", $"CveMoneda = {ObjFactura.CveMoneda} ")
|
||||
ObjFactura.MonedaSAT = ClsPaginas.GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", $"CveMoneda = {ObjFactura.CveMoneda}")
|
||||
ObjFactura.TipoCambio = If(ObjFactura.CveMoneda = 1, 1, ClsPaginas.GlobalTipoCambio(Now).ToDecimal())
|
||||
ObjFactura.TipoCambio = If(ObjFactura.CveMoneda = 1, 1, ClsPaginas.GlobalTipoCambio(ClsPaginas.NowADS()).ToDecimal())
|
||||
ObjFactura.TipoDocto = "Ing"
|
||||
ObjFactura.RefDocto = ""
|
||||
ObjFactura.Folio = -1
|
||||
ObjFactura.Serie = "-1"
|
||||
ObjFactura.Fecha = Now
|
||||
ObjFactura.Fecha = ClsPaginas.NowADS()
|
||||
ObjFactura.CvePrePoliza = -1
|
||||
ObjFactura.CveMetodoPago = 1
|
||||
ObjFactura.MetodoPago = "Efectivo"
|
||||
@@ -2942,7 +2942,7 @@ Namespace Modelos
|
||||
Dim CveMovimiento As Integer = -1
|
||||
Try
|
||||
Dim CveConceptoSalidaUsado As Integer = 45
|
||||
Dim tFecha As DateTime = Now
|
||||
Dim tFecha As DateTime = ClsPaginas.NowADS()
|
||||
CveMovimiento = ObjInventario.AddMovimiento(CveAlmacenUsado, CveConceptoSalidaUsado, 1, tFecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, factura.CveVenta,
|
||||
factura.CveSubProyecto, CveActivoFijo:=-1, Guia:="", Observaciones:="", CvePersonal:=-1, CveCliente:=factura.CveCliente, CveClienteSucursal:=-1, Modulo:="M/CU")
|
||||
If CveMovimiento <= 0 Then
|
||||
@@ -3140,7 +3140,7 @@ Namespace Modelos
|
||||
Dim TCFluctuacion As Decimal = tipoCambio
|
||||
'TOMA EL TC DE LA ULTIMA FLUCTUACION
|
||||
If ValorMultiplicador = -1 AndAlso esMesAnterior AndAlso UsuarioActual.Empresa.Funcionalidad(703) = "1" AndAlso ObjFactura.CveMoneda = 2 Then
|
||||
Dim UltimaFluctuacion As ClsPaginas.MTipoCambioFluctuacion = ClsPaginas.GlobalTipoCambioUltimaFluctuacion(Now)
|
||||
Dim UltimaFluctuacion As ClsPaginas.MTipoCambioFluctuacion = ClsPaginas.GlobalTipoCambioUltimaFluctuacion(ClsPaginas.NowADS())
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(703) = "1" AndAlso UltimaFluctuacion IsNot Nothing Then
|
||||
If UltimaFluctuacion.FechaFluctuacion <= FechaCancelacion Then
|
||||
@@ -4274,7 +4274,7 @@ Namespace Modelos
|
||||
End If
|
||||
|
||||
' GENERA EL MOVIMIENTO DE GARANTIA SI TIENE
|
||||
If Not GenerarMovimientoGarantia(14, "Entrada Garantía", Now, factura, ObjAcum, ObjInventario, ObjConta) Then
|
||||
If Not GenerarMovimientoGarantia(14, "Entrada Garantía", ClsPaginas.NowADS(), factura, ObjAcum, ObjInventario, ObjConta) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
|
||||
@@ -4532,7 +4532,7 @@ Namespace Modelos
|
||||
Dim ContadorMovtosDetalles As Integer = 0
|
||||
|
||||
'Creamos el movimiento
|
||||
Dim CveMovimientoInventario As Integer = ObjInventario.AddMovimiento(CveAlmacen, ConceptoEntrada, CveMoneda, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta, -1, -1, CveMovimientoRelacionado:=CveMovimientoRelacionado, Modulo:="Mod/M2")
|
||||
Dim CveMovimientoInventario As Integer = ObjInventario.AddMovimiento(CveAlmacen, ConceptoEntrada, CveMoneda, ClsPaginas.NowADS(), -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta, -1, -1, CveMovimientoRelacionado:=CveMovimientoRelacionado, Modulo:="Mod/M2")
|
||||
|
||||
If CveMovimientoInventario > 0 Then
|
||||
|
||||
@@ -5061,7 +5061,7 @@ Namespace Modelos
|
||||
End If
|
||||
|
||||
'CANCELA FACTURA
|
||||
If Month(factura.Fecha) = Month(Now) OrElse BanderaGeneraNC = True Then
|
||||
If Month(factura.Fecha) = Month(ClsPaginas.NowADS()) OrElse BanderaGeneraNC = True Then
|
||||
If CancelarFactura(ObjVentas, ObjConta, ObjBancos) Then
|
||||
Obj.Add(factura)
|
||||
Else
|
||||
@@ -5069,7 +5069,7 @@ Namespace Modelos
|
||||
End If
|
||||
Else
|
||||
FacturaDevolucion.TipoDocto = "Egs"
|
||||
FacturaDevolucion.Fecha = Now
|
||||
FacturaDevolucion.Fecha = ClsPaginas.NowADS()
|
||||
If RegistrarNC(ObjVentas, ObjConta, ObjInventario, ObjContr, FacturaDevolucion, ObjBancos, TmpDTconceptos, ObjEventos) Then
|
||||
Obj.Add(FacturaDevolucion)
|
||||
Else
|
||||
@@ -5420,13 +5420,13 @@ Namespace Modelos
|
||||
CancelacionFecha = xmlAcuse.SelectSingleNode("Acuse").Attributes("Fecha").Value.ToDate()
|
||||
CveEstatus = 5
|
||||
Else
|
||||
CancelacionFecha = Now.Date
|
||||
CancelacionFecha = ClsPaginas.NowADS().Date
|
||||
CancelacionAcuse = ""
|
||||
CveEstatus = 5
|
||||
End If
|
||||
Catch ex As Exception
|
||||
GuardaLog(ex.ToString())
|
||||
CancelacionFecha = Now.Date
|
||||
CancelacionFecha = ClsPaginas.NowADS().Date
|
||||
CancelacionAcuse = ""
|
||||
End Try
|
||||
|
||||
@@ -5436,7 +5436,7 @@ Namespace Modelos
|
||||
If Resp.Verificado Then
|
||||
'GENERAMOS EL ACUSE Y MANDAMOS MAIL DE CON EL ACUSE DE CANCELACIÓN
|
||||
If RequiereAceptacion Then
|
||||
CancelacionFecha = Now.Date
|
||||
CancelacionFecha = ClsPaginas.NowADS().Date
|
||||
CveEstatus = 20
|
||||
Else
|
||||
CancelacionFecha = ObjCancelacion.CancelacionFecha
|
||||
@@ -5478,7 +5478,7 @@ Namespace Modelos
|
||||
CveEstatus = 20
|
||||
ContinuarCancelacion = False
|
||||
RequiereAceptacion = True
|
||||
CancelacionFecha = Now.Date
|
||||
CancelacionFecha = ClsPaginas.NowADS().Date
|
||||
CancelacionAcuse = ""
|
||||
End If
|
||||
End If
|
||||
@@ -5491,7 +5491,7 @@ Namespace Modelos
|
||||
Else
|
||||
ObtenerAcuse = False
|
||||
ContinuarCancelacion = True
|
||||
CancelacionFecha = Now.Date
|
||||
CancelacionFecha = ClsPaginas.NowADS().Date
|
||||
CancelacionAcuse = ""
|
||||
|
||||
'VERICA SI YA SE TIENE EL ESTADO DE CANCELACION, PARA SABER SI REQUIERE ACEPTACION
|
||||
@@ -5502,7 +5502,7 @@ Namespace Modelos
|
||||
RequiereAceptacion = True
|
||||
End If
|
||||
Else
|
||||
Dim diasTimbrado As Decimal = DateDiff(DateInterval.Day, ObjFactura.FechaCP, Now)
|
||||
Dim diasTimbrado As Decimal = DateDiff(DateInterval.Day, ObjFactura.FechaCP, ClsPaginas.NowADS())
|
||||
|
||||
If ObjFactura.Total < 1000D OrElse diasTimbrado <= 1 OrElse ObjFactura.Cliente.RFC.Contiene("XAXX010101000", "XEXX010101000") Then
|
||||
RequiereAceptacion = False
|
||||
@@ -5517,7 +5517,7 @@ Namespace Modelos
|
||||
If Resp.Verificado Then
|
||||
'GENERAMOS EL ACUSE Y MANDAMOS MAIL DE CON EL ACUSE DE CANCELACIÓN
|
||||
'If Resp.cve Then
|
||||
' CancelacionFecha = Now.Date
|
||||
' CancelacionFecha = ClsPaginas.NowADS().Date
|
||||
' CveEstatus = 20
|
||||
'Else
|
||||
' CancelacionFecha = ObjCancelacion.CancelacionFecha
|
||||
@@ -5534,16 +5534,16 @@ Namespace Modelos
|
||||
Return Retorno
|
||||
End If
|
||||
Else
|
||||
CancelacionFecha = Now.Date
|
||||
CancelacionFecha = ClsPaginas.NowADS().Date
|
||||
CancelacionAcuse = ""
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
CancelacionFecha = Now.Date
|
||||
CancelacionFecha = ClsPaginas.NowADS().Date
|
||||
CancelacionAcuse = ""
|
||||
End If
|
||||
Else
|
||||
CancelacionFecha = Now.Date
|
||||
CancelacionFecha = ClsPaginas.NowADS().Date
|
||||
CancelacionAcuse = ""
|
||||
End If
|
||||
Catch ex As Exception
|
||||
@@ -5558,7 +5558,7 @@ Namespace Modelos
|
||||
End Try
|
||||
Else
|
||||
CveEstatus = CveEstatusFacturaAsignado
|
||||
CancelacionFecha = If(IsDate(FechaCancelacion), FechaCancelacion, Now.ToString("dd/MM/yyyy")).ToDateTime()
|
||||
CancelacionFecha = If(IsDate(FechaCancelacion), FechaCancelacion, ClsPaginas.NowADS().ToString("dd/MM/yyyy")).ToDateTime()
|
||||
CancelacionAcuse = AcuseCancelacion
|
||||
End If
|
||||
|
||||
@@ -5794,7 +5794,7 @@ Namespace Modelos
|
||||
'SI TIENE SALDO PENDIENTE POR DEVOLVER GENERA UN MOVIMIENTO DE DEVOLUCION
|
||||
If ObjFactura.SaldoAlmacen <> 0 Then
|
||||
'SALIDA DE ALMACEN - SALIDA POR TRASPASO CUANDO ES REMISION - DEVOLUCION (SI ES TRASPASO Y TIENE CONTRATO NO HACE DEVOLUCIóN)
|
||||
CveMovimientoDevolucion = ObjInventario.AddMovimiento(CveAlmacenMovimiento, CveConceptoMovimiento, 1, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta, -1, -1, Observaciones:="", Guia:="", CveContrato:=CveContrato, CveAlmacenDestino:=-1, CveMovimientoRelacionado:=CveMovimientoSalida, Modulo:="Mod/CV1")
|
||||
CveMovimientoDevolucion = ObjInventario.AddMovimiento(CveAlmacenMovimiento, CveConceptoMovimiento, 1, ClsPaginas.NowADS(), -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta, -1, -1, Observaciones:="", Guia:="", CveContrato:=CveContrato, CveAlmacenDestino:=-1, CveMovimientoRelacionado:=CveMovimientoSalida, Modulo:="Mod/CV1")
|
||||
Folio = ObjInventario.Folio
|
||||
|
||||
If CveMovimientoDevolucion > 0 Then
|
||||
@@ -5837,7 +5837,7 @@ Namespace Modelos
|
||||
End If
|
||||
|
||||
If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa) Then
|
||||
Dim Fecha As Date = Now
|
||||
Dim Fecha As Date = ClsPaginas.NowADS()
|
||||
Dim CveCliente As Integer = ObjVentas.DtResultados(0)("CveCliente").ToString.ToEntero
|
||||
Dim ClienteNombre As String = ObjVentas.DtResultados(0)("ClienteNombre").ToString
|
||||
Dim SerieFolio As String = ObjVentas.DtResultados(0)("SerieFolio").ToString
|
||||
@@ -5890,7 +5890,7 @@ Namespace Modelos
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
ErrorCancelar = True
|
||||
ErrorCancelar = True
|
||||
MensajeError = "Ocurrió un Error al ingresar las prepolizas"
|
||||
End If
|
||||
End If
|
||||
@@ -6025,7 +6025,7 @@ Namespace Modelos
|
||||
|
||||
'CANCELAR MOVIMIENTOS DE GARANTIA SI TIENE
|
||||
If Not ErrorCancelar AndAlso UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
If Not GenerarMovimientoGarantia(15, "Salida Garantía", Now, ObjRemision, ObjAcum, ObjInventario, ObjConta) Then
|
||||
If Not GenerarMovimientoGarantia(15, "Salida Garantía", ClsPaginas.NowADS(), ObjRemision, ObjAcum, ObjInventario, ObjConta) Then
|
||||
ErrorCancelar = True
|
||||
End If
|
||||
End If
|
||||
@@ -6134,7 +6134,7 @@ Namespace Modelos
|
||||
|
||||
'CANCELAR MOVIMIENTOS DE GARANTIA SI TIENE
|
||||
If Not ErrorCancelar AndAlso UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
If Not GenerarMovimientoGarantia(15, "Salida Garantía", Now, ObjFactura, ObjAcum, ObjInventario, ObjConta) Then
|
||||
If Not GenerarMovimientoGarantia(15, "Salida Garantía", ClsPaginas.NowADS(), ObjFactura, ObjAcum, ObjInventario, ObjConta) Then
|
||||
ErrorCancelar = True
|
||||
End If
|
||||
End If
|
||||
@@ -6297,7 +6297,7 @@ Namespace Modelos
|
||||
End If
|
||||
Else
|
||||
If Not ObjVentas.UpdateEstatusFactura(CveEstatus, FolioFiscal, CancelacionAcuse, CancelacionFecha, CveVenta, IDPoliza, CvePAC:=CvePACCancelacion, CveEstatusRefacturacion:=CveEstatusRefacturacion,
|
||||
CveUsuarioCambiaEstatus:=UsuarioActual.CveUsuario, FechaCambioEstatus:=Now.ToString("yyyy-MM-dd HH:mm:ss.mmm"), CveMotivoCancelacion:=CveMotivoCancelacion,
|
||||
CveUsuarioCambiaEstatus:=UsuarioActual.CveUsuario, FechaCambioEstatus:=ClsPaginas.NowADS().ToString("yyyy-MM-dd HH:mm:ss.mmm"), CveMotivoCancelacion:=CveMotivoCancelacion,
|
||||
MotivoCancelacion:=MotivoCancelacion, EstadoCancelacion:=EstadoCancelacion, CveEstadoCancelacion:=CveEstadoCancelacion, SelloSolicitudDigitalSAT:=SolicitudCancelacionAcuse) Then
|
||||
ErrorCancelar = True
|
||||
MensajeError = "Ocurrió un error al guardar el estatus de cancelación."
|
||||
@@ -6418,7 +6418,7 @@ Namespace Modelos
|
||||
Dim CveMovimientoRelacionadoVirtual As Integer = CveMovimiento
|
||||
|
||||
If DtPSVirtual IsNot Nothing AndAlso DtPSVirtual.Rows.Count > 0 AndAlso CveAlmacenVirtual > 0 AndAlso CveConceptoMovimientoVirtual > 0 Then
|
||||
CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, CveConceptoMovimientoVirtual, 1, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta, -1, -1,
|
||||
CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, CveConceptoMovimientoVirtual, 1, ClsPaginas.NowADS(), -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta, -1, -1,
|
||||
Observaciones:="", Guia:="", CveMovimientoRelacionado:=CveMovimientoRelacionadoVirtual, Modulo:="Modelos/CancelarVirtual")
|
||||
|
||||
If CveMovimientoVirtual > 0 Then
|
||||
@@ -6497,7 +6497,7 @@ Namespace Modelos
|
||||
Dim CveMovimientoRelacionadoVirtual As Integer = CveMovimientoDevolucion
|
||||
|
||||
If DtPSVirtual IsNot Nothing AndAlso DtPSVirtual.Rows.Count > 0 AndAlso CveAlmacenVirtual > 0 AndAlso CveConceptoMovimientoVirtual > 0 Then
|
||||
CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, CveConceptoMovimientoVirtual, 1, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta, -1, -1,
|
||||
CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, CveConceptoMovimientoVirtual, 1, ClsPaginas.NowADS(), -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta, -1, -1,
|
||||
Observaciones:="", Guia:="", CveMovimientoRelacionado:=CveMovimientoRelacionadoVirtual, Modulo:="Modelos/CancelarVirtual")
|
||||
|
||||
If CveMovimientoVirtual > 0 Then
|
||||
@@ -6585,11 +6585,11 @@ Namespace Modelos
|
||||
End If
|
||||
|
||||
'SALIDA GENERAL
|
||||
CveMovimientoSalidaDevRem = ObjInventario.AddMovimiento(CveAlmacenDevolucion, 8, 1, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, DrMovtos("CveRem").ToString.ToEntero, -1, -1, Observaciones:="", Guia:="", CveContrato:=CveContrato, CveMovimientoRelacionado:=CveMovimiento, CveAlmacenDestino:=CveAlmacenTraspasoDestinoDevRem, Modulo:="Mod/ExAR1")
|
||||
CveMovimientoSalidaDevRem = ObjInventario.AddMovimiento(CveAlmacenDevolucion, 8, 1, ClsPaginas.NowADS(), -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, DrMovtos("CveRem").ToString.ToEntero, -1, -1, Observaciones:="", Guia:="", CveContrato:=CveContrato, CveMovimientoRelacionado:=CveMovimiento, CveAlmacenDestino:=CveAlmacenTraspasoDestinoDevRem, Modulo:="Mod/ExAR1")
|
||||
FolioMovimientoSalidaDevRem = ObjInventario.Folio
|
||||
|
||||
'ENTRADA ADELANTADO
|
||||
CveMovimientoEntradaDevRem = ObjInventario.AddMovimiento(CveAlmacenTraspasoDestinoDevRem, 9, 1, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, DrMovtos("CveRem").ToString.ToEntero, -1, -1, Observaciones:="", Guia:="", CveContrato:=CveContrato, CveMovimientoRelacionado:=CveMovimientoSalidaDevRem, CveAlmacenDestino:=CveAlmacenDevolucion, Modulo:="Mod/ExAR2")
|
||||
CveMovimientoEntradaDevRem = ObjInventario.AddMovimiento(CveAlmacenTraspasoDestinoDevRem, 9, 1, ClsPaginas.NowADS(), -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, DrMovtos("CveRem").ToString.ToEntero, -1, -1, Observaciones:="", Guia:="", CveContrato:=CveContrato, CveMovimientoRelacionado:=CveMovimientoSalidaDevRem, CveAlmacenDestino:=CveAlmacenDevolucion, Modulo:="Mod/ExAR2")
|
||||
FolioMovimientoEntradaDevRem = ObjInventario.Folio
|
||||
|
||||
If Not (CveMovimientoSalidaDevRem > 0 And CveMovimientoEntradaDevRem > 0) Then
|
||||
@@ -6666,7 +6666,7 @@ Namespace Modelos
|
||||
|
||||
Dim CveMovimientoEntradaDevRem As Integer = 0
|
||||
Dim FolioMovimientoEntradaDevRem As Integer = 0
|
||||
Dim Fecha As DateTime = Now
|
||||
Dim Fecha As DateTime = ClsPaginas.NowADS()
|
||||
|
||||
'SALIDA DE (ENTREGA POR ADELANTADO)
|
||||
CveMovimientoSalidaDevRem = ObjInventario.AddMovimiento(CveAlmacen, 8, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveRemision, -1, -1, Observaciones:="", Guia:="", CveContrato:=CveContrato, CveAlmacenDestino:=CveAlmacenDestino, Modulo:="Mod/CancExAR1")
|
||||
@@ -6773,7 +6773,7 @@ Namespace Modelos
|
||||
For Each Dr As DataRow In DtTempApartados.Rows
|
||||
|
||||
If CveMovimientoSalidaApartado = -1 Or CveAlmacenApartado <> Dr("CveAlmacen").ToString.ToEntero Then
|
||||
CveMovimientoSalidaApartado = ObjInventario.AddMovimiento(CveAlmacenOrigen, 8, 1, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta, -1, -1, Observaciones:="", Guia:="", CveContrato:=CveContrato, CveVendedor:=1, CveCliente:=CveCliente, CveAlmacenDestino:=Dr("CveAlmacen").ToString.ToEntero, Modulo:="Mod/Apar1")
|
||||
CveMovimientoSalidaApartado = ObjInventario.AddMovimiento(CveAlmacenOrigen, 8, 1, ClsPaginas.NowADS(), -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta, -1, -1, Observaciones:="", Guia:="", CveContrato:=CveContrato, CveVendedor:=1, CveCliente:=CveCliente, CveAlmacenDestino:=Dr("CveAlmacen").ToString.ToEntero, Modulo:="Mod/Apar1")
|
||||
FolioSalida = ObjInventario.Folio
|
||||
CveAlmacenApartado = Dr("CveAlmacen").ToString.ToEntero
|
||||
|
||||
@@ -6800,7 +6800,7 @@ Namespace Modelos
|
||||
For Each Dr1 As DataRow In DtTraspasos.Rows
|
||||
CveMovimientoSalida = Dr1("CveMovimientoSalida").ToString.ToEntero
|
||||
|
||||
CveMovimientoEntradaApartado = ObjInventario.AddMovimiento(Dr1("CveAlmacen").ToString.ToEntero, 9, 1, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta, -1, -1, Observaciones:="", CveAlmacenDestino:=CveAlmacenDevolucion, CveMovimientoRelacionado:=CveMovimientoSalida, Guia:="", CveContrato:=CveContrato, CveVendedor:=-1, CveCliente:=CveCliente, Modulo:="Mod/Apar2")
|
||||
CveMovimientoEntradaApartado = ObjInventario.AddMovimiento(Dr1("CveAlmacen").ToString.ToEntero, 9, 1, ClsPaginas.NowADS(), -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta, -1, -1, Observaciones:="", CveAlmacenDestino:=CveAlmacenDevolucion, CveMovimientoRelacionado:=CveMovimientoSalida, Guia:="", CveContrato:=CveContrato, CveVendedor:=-1, CveCliente:=CveCliente, Modulo:="Mod/Apar2")
|
||||
FolioEntrada = ObjInventario.Folio
|
||||
|
||||
If Not CveMovimientoEntradaApartado > 0 Then
|
||||
@@ -6859,7 +6859,7 @@ Namespace Modelos
|
||||
End If
|
||||
|
||||
|
||||
CvePrePoliza = ObjConta.AddPrePolizas("Modelos/GuardaEstatus", CvePlantillaPoliza, Me.Total, Me.Total, Me.CveMoneda, Now, Me.Cliente.NombreComercial, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
CvePrePoliza = ObjConta.AddPrePolizas("Modelos/GuardaEstatus", CvePlantillaPoliza, Me.Total, Me.Total, Me.CveMoneda, ClsPaginas.NowADS(), Me.Cliente.NombreComercial, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
FacturaDevolucion.CveVenta = CveVenta
|
||||
FacturaDevolucion.CvePrePoliza = CvePrePoliza
|
||||
|
||||
@@ -6879,7 +6879,7 @@ Namespace Modelos
|
||||
|
||||
If CveEstatus = 4 Then
|
||||
|
||||
If ObjVentas.UpdateEstatusFactura(CveEstatus, FolioFiscal, "", Now, CveVenta, IDPoliza) Then
|
||||
If ObjVentas.UpdateEstatusFactura(CveEstatus, FolioFiscal, "", ClsPaginas.NowADS(), CveVenta, IDPoliza) Then
|
||||
Mensaje = "El nuevo estatus se guardó correctamente"
|
||||
Else
|
||||
ErrorCancelar = True
|
||||
@@ -6901,7 +6901,7 @@ Namespace Modelos
|
||||
Dim Total As Decimal = Me.Total
|
||||
Dim RFCReceptor As String = Me.Cliente.RFC
|
||||
|
||||
If Not ObjVentas.UpdateEstatusFactura(13, FolioFiscal, "", Now, CveVenta, IDPoliza) Then 'Marcamos la factura como refacturada, si no se cancelo en el SAT el estatus nos dejara cancelarla despues
|
||||
If Not ObjVentas.UpdateEstatusFactura(13, FolioFiscal, "", ClsPaginas.NowADS(), CveVenta, IDPoliza) Then 'Marcamos la factura como refacturada, si no se cancelo en el SAT el estatus nos dejara cancelarla despues
|
||||
ErrorCancelar = True
|
||||
End If
|
||||
|
||||
@@ -6920,7 +6920,7 @@ Namespace Modelos
|
||||
'End If
|
||||
|
||||
If Not ErrorCancelar Then
|
||||
If ObjVentas.UpdateEstatusFactura(CveEstatus, FolioFiscal, ObjCancelacion.CancelacionAcuse, Now, CveVenta, IDPoliza, CvePAC:=UsuarioActual.Empresa.CvePAC) Then
|
||||
If ObjVentas.UpdateEstatusFactura(CveEstatus, FolioFiscal, ObjCancelacion.CancelacionAcuse, ClsPaginas.NowADS(), CveVenta, IDPoliza, CvePAC:=UsuarioActual.Empresa.CvePAC) Then
|
||||
Mensaje = "El nuevo estatus se guardó correctamente"
|
||||
Else
|
||||
ErrorCancelar = True
|
||||
@@ -7007,7 +7007,7 @@ Namespace Modelos
|
||||
' Else
|
||||
' Dim DTPresupuestoIngresos As New DataTable
|
||||
' Dim AC As New ClsAC
|
||||
' If AC.GetPresupuestoIngresos(-1, Now.Year, True, UsuarioActual.CveEmpresa) Then
|
||||
' If AC.GetPresupuestoIngresos(-1, ClsPaginas.NowADS().Year, True, UsuarioActual.CveEmpresa) Then
|
||||
' DTPresupuestoIngresos = AC.DtResultados.Copy()
|
||||
' End If
|
||||
' AC.Dispose()
|
||||
@@ -7115,7 +7115,7 @@ Namespace Modelos
|
||||
Public Property CvePAC As Integer
|
||||
Public Property CveAnticipo As Integer
|
||||
Public Property RemisionesLista As List(Of Integer)
|
||||
Public Property CveAlmacen As Integer
|
||||
Public Property CveAlmacen As Integer = -1
|
||||
Public Property GenerarSalidaAlmacen As Boolean = False
|
||||
Public Property CveConceptoMovimiento As Integer
|
||||
Public Property MovimientoObservaciones As String
|
||||
@@ -7202,7 +7202,7 @@ Namespace Modelos
|
||||
Public ReadOnly Property FechaCP As DateTime
|
||||
Get
|
||||
If Me.SubProyecto IsNot Nothing Then
|
||||
If Now.EsHorarioVerano Then
|
||||
If ClsPaginas.NowADS().EsHorarioVerano Then
|
||||
Return DateTime.UtcNow.AddHours(Me.SubProyecto.UTCOffsetVerano)
|
||||
Else
|
||||
Return DateTime.UtcNow.AddHours(Me.SubProyecto.UTCOffsetInvierno)
|
||||
@@ -7323,7 +7323,7 @@ Namespace Modelos
|
||||
Public Property TipoCambioDolares As Decimal
|
||||
Public Property ConvertirPesos As Boolean
|
||||
Public Property ConvertirDolares As Boolean
|
||||
Public Property FormaPago As Integer
|
||||
Public Property FormaPago As Integer = 0
|
||||
|
||||
Public ReadOnly Property FormaPagoText As String
|
||||
Get
|
||||
@@ -7338,7 +7338,7 @@ Namespace Modelos
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Property CondicionesPago As Integer
|
||||
Public Property CondicionesPago As Integer = 0 ' 0 - Contado, 1 - Credito (CHECAR)
|
||||
|
||||
Public ReadOnly Property CondicionesPagoText As String
|
||||
Get
|
||||
@@ -7589,10 +7589,10 @@ Namespace Modelos
|
||||
Public Property NumeroContrato As String = ""
|
||||
Public Property PedidoContrato As String = ""
|
||||
Public Property OrdenCompra As String = ""
|
||||
Public Property CveMetodoPago As Integer
|
||||
Public Property CveMetodoPago As Integer = 0
|
||||
Public Property MetodoPago As String = ""
|
||||
Public Property ClaveMetodoPagoSAT As String = ""
|
||||
Public Property CveMetodoPago33 As Integer
|
||||
Public Property CveMetodoPago33 As Integer = 1
|
||||
Public Property MetodoPago33 As String = ""
|
||||
Public Property CveFormaPago33 As Integer
|
||||
Public Property MetodoPagoSAT33 As String = ""
|
||||
|
||||
@@ -16,7 +16,7 @@ Public Class Thalamus
|
||||
<WebMethod()>
|
||||
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}"
|
||||
|
||||
@@ -252,255 +252,6 @@ Public Class Timbrado
|
||||
MsgCancelacion.AppendFormat("CvePAC:{0}", CvePACCancelacion)
|
||||
|
||||
Select Case CvePACCancelacion
|
||||
Case 1
|
||||
MsgCancelacion.AppendFormat("1.1")
|
||||
Try
|
||||
Dim CFDi As New ClbNegBICFDv3_2.ClsNegEDI
|
||||
Dim Respuesta As New ClbNegBICFDv3_2.ClsNegRespuesta
|
||||
Respuesta = CFDi.CancelaCFdi(Empresa.BIUsuario, Empresa.BIContraseña, Empresa.Ruta & "Certificados\" & Empresa.ArchivoPfx, Empresa.ContraseñaKey, Empresa.RFC, FolioFiscal, "http://portalbiinform.com.mx/srvCFDi/service1.asmx")
|
||||
|
||||
If Respuesta IsNot Nothing AndAlso Respuesta.SelloSAT <> "" Then
|
||||
Dim xml64 As String = ""
|
||||
Dim myXml As String = Respuesta.SelloSAT
|
||||
Dim resp As XElement = XElement.Parse(myXml)
|
||||
For Each elem As XElement In resp.Descendants
|
||||
If elem.Name = "xmlBase64" Then xml64 = elem.Value
|
||||
Next
|
||||
|
||||
'If Respuesta.UUDI.Contiene("0", "201", "202") Then
|
||||
Dim xmlDoc As New System.Xml.XmlDocument()
|
||||
xmlDoc.LoadXml(If(xml64 = "", Respuesta.SelloSAT, Encoding.UTF8.GetString(Convert.FromBase64String(xml64))))
|
||||
Dim AcuseChild = xmlDoc.ChildNodes.Cast(Of XmlNode).Where(Function(a) a.Name.Equals("Acuse", StringComparison.CurrentCultureIgnoreCase)).FirstOrDefault()
|
||||
|
||||
Dim FoliosChild = AcuseChild.ChildNodes.Cast(Of XmlNode).Where(Function(a) a.LocalName.Equals("Folios", StringComparison.CurrentCultureIgnoreCase)).FirstOrDefault()
|
||||
Dim SignatureChild = AcuseChild.ChildNodes.Cast(Of XmlNode).Where(Function(a) a.LocalName.Equals("Signature", StringComparison.CurrentCultureIgnoreCase)).FirstOrDefault()
|
||||
|
||||
Dim prefixFol As String = FoliosChild.Prefix
|
||||
If prefixFol <> "" Then prefixFol = $"{prefixFol}:" 'se le agregan los ":" si tiene prefijo
|
||||
|
||||
CancelacionState = xmlDoc.GetElementsByTagName($"{prefixFol}EstatusUUID")(0).InnerText.ToEntero
|
||||
'verificación basada en el resultado del xml.
|
||||
If CancelacionState.Contiene(201, 202) Then
|
||||
|
||||
Dim prefixSig = SignatureChild.Prefix
|
||||
If prefixSig <> "" Then prefixSig = $"{prefixSig}:" 'se le agregan los ":" si tiene prefijo
|
||||
Dim SignatureValue = xmlDoc.GetElementsByTagName($"{prefixSig}SignatureValue")
|
||||
CancelacionAcuse = If(SignatureValue.Count < 1, SignatureValue(0).InnerText, SignatureValue(0).InnerText)
|
||||
Try
|
||||
CancelacionFecha = AcuseChild.Attributes("Fecha").Value.ToDate
|
||||
Catch ex As Exception
|
||||
CancelacionFecha = xmlDoc.GetElementsByTagName("CancelaCFDResult")(0).Attributes("Fecha").Value.ToDate
|
||||
End Try
|
||||
|
||||
Retorno.Verificado = True
|
||||
Retorno.CancelacionFecha = CancelacionFecha
|
||||
Retorno.CancelacionAcuse = CancelacionAcuse
|
||||
End If
|
||||
|
||||
'End If
|
||||
|
||||
Else
|
||||
Me.GuardaLog(CFDi.MsgError)
|
||||
End If
|
||||
Respuesta = Nothing
|
||||
CFDi = Nothing
|
||||
Catch ex As Exception
|
||||
GuardaLog($"{ex.Message}")
|
||||
End Try
|
||||
|
||||
Case 2
|
||||
MsgCancelacion.AppendFormat("2.1")
|
||||
Dim ArchivoLLave As String = $"{Empresa.Ruta}Certificados\{Empresa.ArchivoKey}"
|
||||
Dim ArchivoCertificado As String = $"{Empresa.Ruta}Certificados\{Empresa.ArchivoCer}"
|
||||
Dim UsuarioServicio As String = If(CvePACCancelacion = 2, Empresa.RFC, "rene.molina@adsistemas.mx")
|
||||
Dim ClaveServicio As String = If(CvePACCancelacion = 2, Empresa.RFC.ToLower, "rene2018")
|
||||
Dim Clave As String = Empresa.ContraseñaKey
|
||||
Dim UrlServicio As String = "" ' Produccion
|
||||
Select Case CvePACCancelacion
|
||||
Case 2
|
||||
UrlServicio = "http://generacfdi.com.mx/rvltimbrado/service1.asmx?WSDL"
|
||||
Case 4
|
||||
UrlServicio = "http://192.168.0.2:8080/ADSistemas/Timbrado.asmx?WSDL"
|
||||
End Select
|
||||
|
||||
If Not Empresa.FacturaProduccion Then
|
||||
ArchivoLLave = $"{Empresa.Ruta}Certificados\CSD01_AAA010101AAA.key"
|
||||
ArchivoCertificado = $"{Empresa.Ruta}Certificados\CSD01_AAA010101AAA.cer"
|
||||
Select Case CvePACCancelacion
|
||||
Case 2
|
||||
UsuarioServicio = "fgomez"
|
||||
ClaveServicio = "12121212"
|
||||
UrlServicio = "http://generacfdi.com.mx/rvltimbrado/service1.asmx?WSDL"
|
||||
Case 4
|
||||
UsuarioServicio = "UserTest"
|
||||
ClaveServicio = "1234567890"
|
||||
UrlServicio = "http://192.168.0.2:8080/ADSistemas/Timbrado.asmx?WSDL"
|
||||
End Select
|
||||
End If
|
||||
|
||||
#Region "Valida"
|
||||
If Not File.Exists(ArchivoCertificado) Then
|
||||
Alert("El archivo de certificado no existe", TipoMensaje.MsgError)
|
||||
Retorno.Verificado = False
|
||||
End If
|
||||
If Not File.Exists(ArchivoLLave) Then
|
||||
Alert("El archivo de llave privada no existe", TipoMensaje.MsgError)
|
||||
Retorno.Verificado = False
|
||||
End If
|
||||
If Empresa.ContraseñaKey = "" Then
|
||||
Alert("La clave no puede ser vacía", TipoMensaje.MsgError)
|
||||
Retorno.Verificado = False
|
||||
End If
|
||||
#End Region
|
||||
|
||||
#Region "Variables"
|
||||
Dim llaveByte As Byte(), certByte As Byte()
|
||||
Dim llaveBase64 As String = "", certBase64 As String = ""
|
||||
Dim cfdi As New RVCFDI.GeneraCFDI()
|
||||
Dim complemento As String = ""
|
||||
Dim complementoConcepto As String = ""
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Verifica"
|
||||
Try
|
||||
llaveByte = System.IO.File.ReadAllBytes(ArchivoLLave)
|
||||
llaveBase64 = Convert.ToBase64String(llaveByte)
|
||||
Catch ex As Exception
|
||||
Alert($"Error al leer la llave privada: {ex.Message}", TipoMensaje.MsgError)
|
||||
Retorno.Verificado = False
|
||||
End Try
|
||||
|
||||
|
||||
Try
|
||||
certByte = System.IO.File.ReadAllBytes(ArchivoCertificado)
|
||||
certBase64 = Convert.ToBase64String(certByte)
|
||||
Catch ex As Exception
|
||||
Alert($"Error al leer el certificado: {ex.Message}", TipoMensaje.MsgError)
|
||||
Retorno.Verificado = False
|
||||
End Try
|
||||
#End Region
|
||||
|
||||
|
||||
Dim base64 As String
|
||||
Dim ObjCancelacion As New RVCancelacion.Cancelacion()
|
||||
|
||||
Dim xmlCancelacion As String = ObjCancelacion.crearXMLCancelacion(certBase64, llaveBase64, Clave, FolioFiscal)
|
||||
If (ObjCancelacion.MensajeDeError = "") Then
|
||||
|
||||
base64 = CodificarABase64(xmlCancelacion)
|
||||
|
||||
Dim objWS As RVCFDI.WSGeneraCFDI.Service = Nothing
|
||||
Dim objAuthSoapHD As RVCFDI.WSGeneraCFDI.AuthSoapHd
|
||||
Dim objResponse As RVCFDI.WSGeneraCFDI.StructCfd
|
||||
Dim objCancel As RVCFDI.WSGeneraCFDI.StructCancel
|
||||
|
||||
Try
|
||||
|
||||
|
||||
'Variables de consumo de servicio web
|
||||
objWS = New RVCFDI.WSGeneraCFDI.Service()
|
||||
objAuthSoapHD = New RVCFDI.WSGeneraCFDI.AuthSoapHd()
|
||||
'creacion de Autorizacion de cabecera Soap
|
||||
objCancel = New RVCFDI.WSGeneraCFDI.StructCancel()
|
||||
'Configura el servicio
|
||||
objWS.Url = UrlServicio
|
||||
|
||||
objAuthSoapHD.strPassword = ClaveServicio
|
||||
objAuthSoapHD.strUserName = UsuarioServicio
|
||||
'Coloca la cabecera
|
||||
objWS.AuthSoapHdValue = objAuthSoapHD
|
||||
'Obtiene el resultado
|
||||
objCancel = objWS.CancelTicket(base64)
|
||||
'Valida la respuesta
|
||||
''Codigos del SAT
|
||||
''201 - El folio se ha cancelado con éxito.
|
||||
''202 - El CFDI ya había sido cancelado previamente.
|
||||
''203 - UUID no corresponde al emisor.
|
||||
''204 - El CFDI no aplica para cancelación.
|
||||
''205 - El UUID no existe o no ha sido procesado por el SAT.
|
||||
''402 - El Contribuyente no se encuentra el la LCO o la validez de obligaciones se reporta como negativa.
|
||||
CancelacionState = objCancel.state
|
||||
CancelacionMensaje = objCancel.Descripcion
|
||||
|
||||
If objCancel.state.Contiene(0, 201, 202) Then
|
||||
CancelacionFecha = Now
|
||||
|
||||
Select Case CvePACCancelacion
|
||||
Case 2
|
||||
Dim solicitud As New WSRVConsultas.Service1SoapClient
|
||||
Dim resp As New WSRVConsultas.resp_Acuse()
|
||||
resp = solicitud.ConsultarAcuseCancelacion(RFCEmisor, UsuarioServicio, ClaveServicio, FolioFiscal, CancelacionFecha.ToShortDateString)
|
||||
CancelacionMensaje = objCancel.Descripcion
|
||||
|
||||
If (resp.Estado = 0) Then
|
||||
|
||||
Dim xmlDoc As New System.Xml.XmlDocument()
|
||||
xmlDoc.LoadXml(Encoding.UTF8.GetString(Convert.FromBase64String(resp.Xml)))
|
||||
Dim xpath As String = "Acuse/Folios"
|
||||
Dim nodes As XmlNodeList = xmlDoc.SelectNodes(xpath)
|
||||
CancelacionState = xmlDoc.GetElementsByTagName("EstatusUUID")(0).InnerText.ToEntero
|
||||
|
||||
xpath = "Acuse/Signature"
|
||||
nodes = xmlDoc.SelectNodes(xpath)
|
||||
|
||||
CancelacionAcuse = xmlDoc.GetElementsByTagName("SignatureValue")(0).InnerText
|
||||
CancelacionFecha = xmlDoc.SelectSingleNode("Acuse").Attributes("Fecha").Value.ToDate
|
||||
Retorno.Verificado = True
|
||||
Retorno.CancelacionFecha = CancelacionFecha
|
||||
Retorno.CancelacionAcuse = CancelacionAcuse
|
||||
Else
|
||||
CancelacionAcuse = resp.MensajeDeError
|
||||
Retorno.Verificado = True
|
||||
Retorno.CancelacionFecha = CancelacionFecha
|
||||
Retorno.CancelacionAcuse = CancelacionAcuse
|
||||
End If
|
||||
solicitud = Nothing
|
||||
Case 4
|
||||
|
||||
Dim solicitud As New WSGF.Service1SoapClient
|
||||
Dim resp As New WSGF.StructXml()
|
||||
resp = solicitud.GetAcuse(RFCEmisor, UsuarioServicio, ClaveServicio, FolioFiscal)
|
||||
CancelacionMensaje = objCancel.Descripcion
|
||||
|
||||
If (resp.Estado = 0) Then
|
||||
|
||||
Dim xmlDoc As New System.Xml.XmlDocument()
|
||||
xmlDoc.LoadXml(Encoding.UTF8.GetString(Convert.FromBase64String(resp.CfdiB64)))
|
||||
Dim xpath As String = "Acuse/Folios"
|
||||
Dim nodes As XmlNodeList = xmlDoc.SelectNodes(xpath)
|
||||
CancelacionState = xmlDoc.GetElementsByTagName("EstatusUUID")(0).InnerText.ToEntero
|
||||
|
||||
xpath = "Acuse/Signature"
|
||||
nodes = xmlDoc.SelectNodes(xpath)
|
||||
|
||||
CancelacionAcuse = xmlDoc.GetElementsByTagName("SignatureValue")(0).InnerText
|
||||
CancelacionFecha = xmlDoc.SelectSingleNode("Acuse").Attributes("Fecha").Value.ToDate
|
||||
Retorno.Verificado = True
|
||||
Retorno.CancelacionFecha = CancelacionFecha
|
||||
Retorno.CancelacionAcuse = CancelacionAcuse
|
||||
Else
|
||||
CancelacionAcuse = resp.Descripcion
|
||||
Retorno.Verificado = True
|
||||
Retorno.CancelacionAcuse = CancelacionAcuse
|
||||
End If
|
||||
solicitud = Nothing
|
||||
End Select
|
||||
|
||||
|
||||
End If
|
||||
Catch ex As Exception
|
||||
CancelacionMensaje += $" | ex: {ex}"
|
||||
Retorno.Verificado = False
|
||||
End Try
|
||||
|
||||
'Libera memoria
|
||||
objWS.Dispose()
|
||||
objResponse = Nothing
|
||||
objAuthSoapHD = Nothing
|
||||
GC.Collect()
|
||||
End If
|
||||
|
||||
|
||||
Case 3
|
||||
MsgCancelacion.AppendFormat("3.1")
|
||||
@@ -522,7 +273,6 @@ Public Class Timbrado
|
||||
AmbienteProductivo = False
|
||||
End If
|
||||
|
||||
|
||||
#Region "Valida"
|
||||
If Not File.Exists(ArchivoCertificado) Then
|
||||
Alert("El archivo de certificado no existe", TipoMensaje.MsgError)
|
||||
@@ -537,7 +287,6 @@ Public Class Timbrado
|
||||
Retorno.Verificado = False
|
||||
End If
|
||||
#End Region
|
||||
|
||||
Dim conector As New Profact.TimbraCFDI40.Conector(AmbienteProductivo)
|
||||
|
||||
If Not AmbienteProductivo Then
|
||||
@@ -545,16 +294,17 @@ Public Class Timbrado
|
||||
Else
|
||||
conector.EstableceCredenciales("vSGxMFWnNRy/nDoowxqrqw==|Sia123654")
|
||||
End If
|
||||
MsgCancelacion.AppendFormat("-3.2")
|
||||
Dim resultadoCancelacion As Profact.TimbraCFDI.ResultadoCancelacion
|
||||
resultadoCancelacion = conector.CancelaCFDI40(RFCEmisor, FolioFiscal, CodigoSATMotivoCancelacion, FolioSustitucion)
|
||||
CancelacionFecha = Now
|
||||
Dim resp As Profact.TimbraCFDI.ResultadoConsulta
|
||||
MsgCancelacion.AppendFormat("-3.2")
|
||||
Dim resultadoCancelacion As Profact.TimbraCFDI.ResultadoCancelacionAck
|
||||
resultadoCancelacion = conector.CancelaCFDIAck40(RFCEmisor, FolioFiscal, CodigoSATMotivoCancelacion, FolioSustitucion)
|
||||
CancelacionFecha = ClsPaginas.NowADS()
|
||||
|
||||
resp = conector.ObtieneCFDI(RFCEmisor, FolioFiscal)
|
||||
MsgCancelacion.AppendFormat("-3.3")
|
||||
|
||||
'VERIFICA SI SE CANCELO O FUE CANCELADO PREVIAMENTE (CODIGO DE ERROR "330279")
|
||||
If resultadoCancelacion.Exitoso OrElse resultadoCancelacion.NumeroError.Contiene("202", "330279") Then
|
||||
If resultadoCancelacion.Exitoso OrElse resultadoCancelacion.NumeroError.Contiene("202", "330279", "330280") Then
|
||||
MsgCancelacion.AppendFormat("-3.4")
|
||||
CancelacionMensaje = resultadoCancelacion.Descripcion
|
||||
Retorno.CancelacionFecha = CancelacionFecha
|
||||
@@ -563,7 +313,7 @@ Public Class Timbrado
|
||||
|
||||
MsgCancelacion.AppendFormat("-3.4.1")
|
||||
Try
|
||||
xmlDoc.LoadXml(Encoding.UTF8.GetString(Convert.FromBase64String(resp.Xml)))
|
||||
xmlDoc.LoadXml(Encoding.UTF8.GetString(Convert.FromBase64String(resultadoCancelacion.Xml)))
|
||||
Catch ex As Exception
|
||||
If resp.NumeroError.ToEntero() > 0 Then
|
||||
CancelacionMensaje = resp.Descripcion
|
||||
@@ -592,13 +342,11 @@ Public Class Timbrado
|
||||
Else
|
||||
Retorno.Verificado = False
|
||||
End If
|
||||
|
||||
|
||||
Else
|
||||
MsgCancelacion.AppendFormat("-3.5")
|
||||
CancelacionAcuse = resp.NumeroError
|
||||
CancelacionMensaje = resultadoCancelacion.Descripcion
|
||||
Retorno.Verificado = True
|
||||
Retorno.Verificado = False
|
||||
End If
|
||||
|
||||
Case 4
|
||||
@@ -610,7 +358,6 @@ Public Class Timbrado
|
||||
Dim Clave As String = Empresa.ContraseñaKey
|
||||
Dim UrlServicio As String = "" ' Produccion
|
||||
|
||||
'UrlServicio = "http://alterno.gofac.com.mx/cfdi/timbrado.asmx?WSDL" ' alterno
|
||||
UrlServicio = "https://cfdi.gofac.com.mx/timbrado.asmx?WSDL"
|
||||
|
||||
If Not Empresa.FacturaProduccion Then
|
||||
@@ -620,9 +367,7 @@ Public Class Timbrado
|
||||
UsuarioServicio = "UserTest"
|
||||
ClaveServicio = "1234567890"
|
||||
'UrlServicio = "http://juancalderon-001-site6.ftempurl.com/cancelacion.asmx?WSDL"
|
||||
|
||||
End If
|
||||
|
||||
#Region "Valida"
|
||||
If Not File.Exists(ArchivoCertificado) Then
|
||||
Alert("El archivo de certificado no existe", TipoMensaje.MsgError)
|
||||
@@ -644,8 +389,6 @@ Public Class Timbrado
|
||||
Dim objCan As New GoFac.GoCfdi()
|
||||
Dim complemento As String = ""
|
||||
Dim complementoConcepto As String = ""
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Verifica"
|
||||
@@ -656,8 +399,6 @@ Public Class Timbrado
|
||||
Alert($"Error al leer la llave privada: {ex.Message}", TipoMensaje.MsgError)
|
||||
Retorno.Verificado = False
|
||||
End Try
|
||||
|
||||
|
||||
Try
|
||||
certByte = System.IO.File.ReadAllBytes(ArchivoCertificado)
|
||||
certBase64 = Convert.ToBase64String(certByte)
|
||||
@@ -667,7 +408,7 @@ Public Class Timbrado
|
||||
End Try
|
||||
#End Region
|
||||
objCan.CancelacionCfdi = True
|
||||
objCan.FechaCancelacion = System.DateTime.Now.AddMinutes(-120) ' operación requerida para que no se presente problemas con fechas adelantadas del PAC
|
||||
objCan.FechaCancelacion = ClsPaginas.NowADS().AddMinutes(-120) ' operación requerida para que no se presente problemas con fechas adelantadas del PAC
|
||||
MsgCancelacion.AppendFormat("4.3-")
|
||||
objCan.GeneraCancelacionB64(certBase64, llaveBase64, Clave, FolioFiscal, CodigoSATMotivoCancelacion, FolioSustitucion)
|
||||
If (objCan.MensajeError = "") Then
|
||||
@@ -759,11 +500,11 @@ Public Class Timbrado
|
||||
|
||||
If result IsNot Nothing Then
|
||||
If result.statusOk Then
|
||||
Dim cancelacion = result.cancelaciones.First()
|
||||
Dim cancelacion As PADECancelacion = result.cancelaciones.First()
|
||||
If cancelacion IsNot Nothing Then
|
||||
'EN PROCESO, CANCELABLE SIN ACEPTACION,CANCEALDO PREVIAMENTE
|
||||
If cancelacion.codigo.Contiene("96", "201", "202") Then
|
||||
CancelacionFecha = Now
|
||||
CancelacionFecha = ClsPaginas.NowADS()
|
||||
|
||||
CancelacionAcuse = result.acuseCancelBase64
|
||||
Retorno.Verificado = True
|
||||
@@ -1549,7 +1290,7 @@ Public Class Timbrado
|
||||
|
||||
Dim y As Integer = 0
|
||||
|
||||
For Each Tras In ObjCFDITimbre.Traslados
|
||||
For Each Tras As CFDITraslados In ObjCFDITimbre.Traslados
|
||||
comprobante.Impuestos.Traslados(y) = New Profact.TimbraCFDI40.ComprobanteImpuestosTraslado()
|
||||
comprobante.Impuestos.Traslados(y).Base = Tras.Base.RoundSQL(NumDecimalesImporte)
|
||||
comprobante.Impuestos.Traslados(y).Impuesto = Tras.Impuesto
|
||||
@@ -1588,7 +1329,7 @@ Public Class Timbrado
|
||||
|
||||
|
||||
If ObjCFDITimbre.RetencionesLocales.Sum(Function(x) x.Importe) > 0 Then
|
||||
Dim Imp = New Profact.TimbraCFDI.Complementos.ImpuestoLocal.ImpuestosLocales()
|
||||
Dim Imp As New Profact.TimbraCFDI.Complementos.ImpuestoLocal.ImpuestosLocales()
|
||||
Imp.version = "1.0"
|
||||
Imp.TotaldeRetenciones = ObjCFDITimbre.RetencionesLocales.Sum(Function(x) x.Importe).FormatoNumero().ToDecimal
|
||||
Imp.TotaldeTraslados = 0
|
||||
@@ -2064,7 +1805,7 @@ Public Class Timbrado
|
||||
|
||||
Dim j As Integer = 0
|
||||
ComCartaPorte.Mercancias.Mercancia(i).CantidadTransporta = New ProfactCartaPorte.CartaPorteMercanciasMercanciaCantidadTransporta(Carta.Mercancias.Mercancias.Count - 1) {}
|
||||
For Each transp In concep.MercanciasCantidadTransporta
|
||||
For Each transp As CFDICartaPorteMercanciaTransporta In concep.MercanciasCantidadTransporta
|
||||
ComCartaPorte.Mercancias.Mercancia(i).CantidadTransporta(j) = New ProfactCartaPorte.CartaPorteMercanciasMercanciaCantidadTransporta
|
||||
ComCartaPorte.Mercancias.Mercancia(i).CantidadTransporta(j).Cantidad = transp.Cantidad
|
||||
ComCartaPorte.Mercancias.Mercancia(i).CantidadTransporta(j).IDOrigen = transp.IDOrigen
|
||||
@@ -2484,7 +2225,7 @@ Public Class Timbrado
|
||||
|
||||
If Not String.IsNullOrEmpty(resultadoTimbre.Detalle) Then
|
||||
Try
|
||||
Dim Resultados = Newtonsoft.Json.Linq.JArray.Parse(resultadoTimbre.Detalle)
|
||||
Dim Resultados As JArray = Newtonsoft.Json.Linq.JArray.Parse(resultadoTimbre.Detalle)
|
||||
|
||||
If Resultados.Count > 0 Then
|
||||
If resultadoTimbre.Descripcion.Contains("RFC del receptor no existe") Then
|
||||
@@ -2620,13 +2361,13 @@ Public Class Timbrado
|
||||
|
||||
If ObjCFDITimbre.Retenciones.Sum(Function(x) x.Importe) > 0 Then
|
||||
''se acumulan los importes
|
||||
For Each Ret In ObjCFDITimbre.Retenciones
|
||||
For Each Ret As CFDIRetenciones In ObjCFDITimbre.Retenciones
|
||||
cfdi.Retencion(Ret.Impuesto, Ret.Importe)
|
||||
Next
|
||||
End If
|
||||
|
||||
''se acumulan los importes
|
||||
For Each Tras In ObjCFDITimbre.Traslados
|
||||
For Each Tras As CFDITraslados In ObjCFDITimbre.Traslados
|
||||
cfdi.Traslado(Tras.Base, Tras.Impuesto, Tras.TipoFactor, Tras.TasaOCuota, Tras.Importe)
|
||||
Next
|
||||
#End Region
|
||||
@@ -2791,7 +2532,7 @@ Public Class Timbrado
|
||||
For Each concep As CFDICartaPorteMercancia In Carta.Mercancias.Mercancias
|
||||
If concep.ValorMercancia <= 0 Then concep.Moneda = ""
|
||||
cfdi.CartaPorteMercancia(concep.BienesTransp, concep.ClaveSTCC, concep.Descripción, concep.Cantidad, concep.ClaveUnidad, concep.Unidad, concep.Dimensiones, concep.MaterialPeligroso, concep.ClaveMaterialPeligroso, If(concep.ClaveMaterialPeligroso <> "", concep.Embalaje, ""), If(concep.ClaveMaterialPeligroso <> "", concep.DescripEmbalaje, ""), concep.PesoenKg, concep.ValorMercancia, concep.Moneda, concep.FraccionArrancelaria, concep.UUIDComercioExt)
|
||||
For Each transp In concep.MercanciasCantidadTransporta
|
||||
For Each transp As CFDICartaPorteMercanciaTransporta In concep.MercanciasCantidadTransporta
|
||||
cfdi.CartaPorteCantidadTransporta(transp.Cantidad, transp.IDOrigen, transp.IDDestino, transp.CvesTransportes)
|
||||
Next
|
||||
Next
|
||||
@@ -3380,11 +3121,11 @@ Public Class Timbrado
|
||||
#Region "Timbra"
|
||||
If RespGeneracionXML = "" Then
|
||||
'OBTENER EL XML DE LA VARIABLE PRIVADA "_xml" YA QUE NO ES ACCESIBLE POR MEDIO DE LA PROPIEDAD "XML" ANTES DE TIMBRAR
|
||||
Dim valorXML = ""
|
||||
Dim valorXML As String = ""
|
||||
Try
|
||||
|
||||
Dim tipo = GetType(GoFac.Cfdi4)
|
||||
Dim info = tipo.GetField("_xml", BindingFlags.NonPublic Or BindingFlags.Instance)
|
||||
Dim tipo As Type = GetType(GoFac.Cfdi4)
|
||||
Dim info As FieldInfo = tipo.GetField("_xml", BindingFlags.NonPublic Or BindingFlags.Instance)
|
||||
valorXML = info?.GetValue(cfdi).ToString()
|
||||
Catch ex As Exception
|
||||
valorXML = ""
|
||||
@@ -3589,8 +3330,8 @@ Public Class Timbrado
|
||||
Dim ArchivoW As StreamWriter
|
||||
Dim strLineaTMP As String
|
||||
|
||||
' strLineaTMP = Chr(13) & Chr(10) & Day(Now) & "/" & Month(Now) & "/" & Year(Now) & " " & Hour(Now) & ":" & Minuto & ". " & Str & Chr(13) & Chr(10)
|
||||
strLineaTMP = String.Format("{0}{1} .. PAC: {2} - {3} ..{4}:{5}", Chr(13), Chr(10), CvePAC, Str, DateTime.Now.ToShortDateString, DateTime.Now.ToShortTimeString)
|
||||
' strLineaTMP = Chr(13) & Chr(10) & Day(NowADS()) & "/" & Month(NowADS()) & "/" & Year(NowADS()) & " " & Hour(NowADS()) & ":" & Minuto & ". " & Str & Chr(13) & Chr(10)
|
||||
strLineaTMP = String.Format("{0}{1} .. PAC: {2} - {3} ..{4}:{5}", Chr(13), Chr(10), CvePAC, Str, ClsPaginas.NowADS().ToShortDateString, ClsPaginas.NowADS().ToShortTimeString)
|
||||
Try
|
||||
ArchivoW = New StreamWriter(String.Format("{0}\LogTimbrado.txt", AppDomain.CurrentDomain.BaseDirectory), True, System.Text.Encoding.UTF8)
|
||||
Catch ex As UnauthorizedAccessException
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -55,8 +55,8 @@ Public Class E119 : Implements IHttpHandler
|
||||
Dim ObjUsuarios As New ClsSisUsuarios
|
||||
If ObjUsuarios.GetUsuarios(CveUsuario) Then
|
||||
If ObjUsuarios.DtResultados.Rows.Count > 0 Then
|
||||
Dim Usuario = ObjUsuarios.DtResultados.Rows(0)("Usuario").ToString()
|
||||
Dim Contrasenia = ObjUsuarios.DtResultados.Rows(0)("Contraseña").ToString()
|
||||
Dim Usuario As String = ObjUsuarios.DtResultados.Rows(0)("Usuario").ToString()
|
||||
Dim Contrasenia As String = ObjUsuarios.DtResultados.Rows(0)("Contraseña").ToString()
|
||||
UsuarioActual = ObjUsuarios.ValidaUsuario(Usuario, Contrasenia, IMEI, CveEmpresa)
|
||||
UsuarioActual.CveEmpresa = CveEmpresa
|
||||
CreaObjetoEmpresa(UsuarioActual)
|
||||
@@ -87,11 +87,11 @@ Public Class E119 : Implements IHttpHandler
|
||||
Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
|
||||
Dim retorno As String = ""
|
||||
Try
|
||||
Dim Metodo = If(context.Request("Metodo") = Nothing, "", context.Request("Metodo").ToString())
|
||||
Dim Metodo As String = If(context.Request("Metodo") = Nothing, "", context.Request("Metodo").ToString())
|
||||
|
||||
If Metodo = "BASF_POG40" Then
|
||||
context.Response.ContentType = "application/json"
|
||||
Dim Auth = ValidarSolicitud(context)
|
||||
Dim Auth As AuthMessage = ValidarSolicitud(context)
|
||||
|
||||
If Auth.IsSucces Then
|
||||
retorno = ConsultaDatos(context)
|
||||
@@ -104,7 +104,7 @@ Public Class E119 : Implements IHttpHandler
|
||||
|
||||
If Metodo = "ConsultarProductos" Then
|
||||
context.Response.ContentType = "application/json"
|
||||
Dim Auth = ValidarSolicitud(context)
|
||||
Dim Auth As AuthMessage = ValidarSolicitud(context)
|
||||
|
||||
If Auth.IsSucces Then
|
||||
retorno = ConsultaProductos(context)
|
||||
@@ -116,7 +116,7 @@ Public Class E119 : Implements IHttpHandler
|
||||
|
||||
If Metodo = "ConsultarClasificaciones" Then
|
||||
context.Response.ContentType = "application/json"
|
||||
Dim Auth = ValidarSolicitud(context)
|
||||
Dim Auth As AuthMessage = ValidarSolicitud(context)
|
||||
|
||||
If Auth.IsSucces Then
|
||||
retorno = ConsultaClasificaciones(context)
|
||||
@@ -181,7 +181,7 @@ Public Class E119 : Implements IHttpHandler
|
||||
Dim RespuestaError As New ResponseMsgError
|
||||
Dim TieneError As Boolean = False
|
||||
|
||||
Dim strFecha = If(context.Request("Fecha") = Nothing, "", context.Request("Fecha").ToString())
|
||||
Dim strFecha As String = If(context.Request("Fecha") = Nothing, "", context.Request("Fecha").ToString())
|
||||
|
||||
If String.IsNullOrEmpty(strFecha) Then
|
||||
RespuestaError.message = "Debe especificar una fecha"
|
||||
@@ -238,7 +238,7 @@ Public Class E119 : Implements IHttpHandler
|
||||
Dim RespuestaError As New ResponseMsgError
|
||||
Dim TieneError As Boolean = False
|
||||
|
||||
Dim CveClasificacion = If(context.Request("CveClasificacion") = Nothing, "", context.Request("CveClasificacion").ToString())
|
||||
Dim CveClasificacion As String = If(context.Request("CveClasificacion") = Nothing, "", context.Request("CveClasificacion").ToString())
|
||||
|
||||
If String.IsNullOrEmpty(CveClasificacion) Then
|
||||
CveClasificacion = "-1"
|
||||
@@ -255,7 +255,7 @@ Public Class E119 : Implements IHttpHandler
|
||||
End If
|
||||
End Using
|
||||
|
||||
Dim Msg As String = "Información día " & Now.ToShortDateString & If(RespuestaError.message <> "", " Error: " & RespuestaError.message, "")
|
||||
Dim Msg As String = "Información día " & ClsPaginas.NowADS().ToShortDateString & If(RespuestaError.message <> "", " Error: " & RespuestaError.message, "")
|
||||
Msg.GuardaLogAD("LogE119")
|
||||
|
||||
If TieneError Then
|
||||
@@ -288,7 +288,7 @@ Public Class E119 : Implements IHttpHandler
|
||||
TieneError = True
|
||||
End Try
|
||||
|
||||
Dim Msg As String = "Información día " & Now.ToShortDateString & If(RespuestaError.message <> "", " Error: " & RespuestaError.message, "")
|
||||
Dim Msg As String = "Información día " & ClsPaginas.NowADS().ToShortDateString & If(RespuestaError.message <> "", " Error: " & RespuestaError.message, "")
|
||||
Msg.GuardaLogAD("LogE119")
|
||||
|
||||
If TieneError Then
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 = ""
|
||||
@@ -1780,9 +1780,9 @@ Public Class E141 : Implements IHttpHandler
|
||||
Dim msg As String = ""
|
||||
|
||||
If sb.Length > 0 Then
|
||||
msg = $"Se enviaron los siguientes productos: <br/> {sb.ToString()} <br/> Fecha y hora: {Now.ToString("dd/MM/yyyy hh:mm:ss tt")}"
|
||||
msg = $"Se enviaron los siguientes productos: <br/> {sb.ToString()} <br/> Fecha y hora: {ClsPaginas.NowADS().ToString("dd/MM/yyyy hh:mm:ss tt")}"
|
||||
Else
|
||||
msg = $"No se enviaron productos esta semana <br/> Fecha y hora: {Now.ToString("dd/MM/yyyy hh:mm:ss tt")}"
|
||||
msg = $"No se enviaron productos esta semana <br/> Fecha y hora: {ClsPaginas.NowADS().ToString("dd/MM/yyyy hh:mm:ss tt")}"
|
||||
End If
|
||||
|
||||
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. <br/> Fecha y hora: {Now.ToString("dd/MM/yyyy hh:mm:ss tt")}")
|
||||
EnviarCorreoNotificacion("SIG - Actualización de productos", $"Se ejecuto la tarea de actualización de productos. <br/> Fecha y hora: {ClsPaginas.NowADS().ToString("dd/MM/yyyy hh:mm:ss tt")}")
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -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. <br/> Fecha y hora: {Now.ToString("dd/MM/yyyy hh:mm:ss tt")}")
|
||||
EnviarCorreoNotificacion("SIG - Actualización de precios", $"Se ejecuto la tarea de actualización de precios. <br/> Fecha y hora: {ClsPaginas.NowADS().ToString("dd/MM/yyyy hh:mm:ss tt")}")
|
||||
End If
|
||||
|
||||
End If
|
||||
@@ -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. <br/> Fecha y hora: {Now.ToString("dd/MM/yyyy hh:mm:ss tt")}")
|
||||
EnviarCorreoNotificacion("SIG - Actualización de existencias", $"Se ejecuto la tarea de actualización de existencias. <br/> Fecha y hora: {ClsPaginas.NowADS().ToString("dd/MM/yyyy hh:mm:ss tt")}")
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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}"))
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);")
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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())
|
||||
|
||||
@@ -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
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user