Empresas Zona Horaria
This commit is contained in:
@@ -231,7 +231,7 @@ Partial Class Ventas_ActualizarPrecios
|
||||
For Each row As GridViewRow In GVPrecios.Rows
|
||||
|
||||
If row.FCCheckBox("chkPS").Checked Then
|
||||
Correcto = ObjPS.UpdatePSPreciosLista(row.FCTextBox("TxtPrecio").Text.ToDecimal, DdlPrecioLista.SelectedValue.ToEntero, Porcentaje, row.DataKey("CvePS").ToEntero, UsuarioActual.CveUsuario, DateTime.Now, If(RblTipo.SelectedValue = "Imp", True, False), PrecioMinimo:=row.FCTextBox("TxtPrecioMinimo").Text.ToDecimal)
|
||||
Correcto = ObjPS.UpdatePSPreciosLista(row.FCTextBox("TxtPrecio").Text.ToDecimal, DdlPrecioLista.SelectedValue.ToEntero, Porcentaje, row.DataKey("CvePS").ToEntero, UsuarioActual.CveUsuario, NowADS(), If(RblTipo.SelectedValue = "Imp", True, False), PrecioMinimo:=row.FCTextBox("TxtPrecioMinimo").Text.ToDecimal)
|
||||
|
||||
If Correcto Then
|
||||
TieneError = ActualizarPreciosFranquicia(ObjPS, row.DataKey("Codigo"), row.DataKey("PS"), row.FCTextBox("TxtPrecio").Text.ToDecimal, row.FCTextBox("TxtPrecioMinimo").Text.ToDecimal, DdlPrecioLista.SelectedItem.Text)
|
||||
@@ -467,14 +467,14 @@ Partial Class Ventas_ActualizarPrecios
|
||||
If CvePS > 0 AndAlso CvePrecioLista > 0 Then
|
||||
|
||||
|
||||
Correcto = ObjPS.UpdatePSPreciosLista(PrecioNuevo, CvePrecioLista, Porcentaje, CvePS, UsuarioActual.CveUsuario, DateTime.Now, True)
|
||||
Correcto = ObjPS.UpdatePSPreciosLista(PrecioNuevo, CvePrecioLista, Porcentaje, CvePS, UsuarioActual.CveUsuario, NowADS(), True)
|
||||
If Correcto Then
|
||||
RowsCargados += 1
|
||||
TieneError = ActualizarPreciosFranquicia(ObjPS, row(0).ToString(), row(1).ToString(), PrecioNuevo, 0, DdlPrecioListaCarga.SelectedItem.Text)
|
||||
End If
|
||||
Else
|
||||
If CvePS > 0 AndAlso CvePrecioLista = -2 Then
|
||||
Correcto = ObjPS.UpdatePSPrecios(PrecioNuevo, CvePrecioLista, Porcentaje, CvePS, UsuarioActual.CveUsuario, DateTime.Now, True)
|
||||
Correcto = ObjPS.UpdatePSPrecios(PrecioNuevo, CvePrecioLista, Porcentaje, CvePS, UsuarioActual.CveUsuario, NowADS(), True)
|
||||
If Correcto Then
|
||||
RowsCargados += 1
|
||||
End If
|
||||
@@ -588,7 +588,7 @@ Partial Class Ventas_ActualizarPrecios
|
||||
' Dim EmpresaFranquicia As String = GlobalDTEmpresas(CveEmpresa:=CveFranquicia).FiltroPrimeroValor("Empresa")
|
||||
' StrMsg.AppendFormat("El precio lista '{0}' no existe en la Franquicia '{1}'<br/>", DdlPrecioLista.SelectedItem.Text, EmpresaFranquicia)
|
||||
'End If
|
||||
If CvePrecioLisa > 0 AndAlso CvePS > 0 AndAlso Not ObjPS.UpdatePSPreciosLista(Precio, CvePrecioLisa, Porcentaje, CvePS, UsuarioActual.CveUsuario, DateTime.Now, If(RblTipo.SelectedValue = "Imp", True, False), PrecioMinimo:=PrecioMinimo) Then
|
||||
If CvePrecioLisa > 0 AndAlso CvePS > 0 AndAlso Not ObjPS.UpdatePSPreciosLista(Precio, CvePrecioLisa, Porcentaje, CvePS, UsuarioActual.CveUsuario, NowADS(), If(RblTipo.SelectedValue = "Imp", True, False), PrecioMinimo:=PrecioMinimo) Then
|
||||
StrMsgError.AppendFormat("No se pudo actualizar el producto")
|
||||
End If
|
||||
Next
|
||||
@@ -765,7 +765,7 @@ Partial Class Ventas_ActualizarPrecios
|
||||
worksheet.Rows(IndexEndTable + 1).Cells(0).Value = UsuarioActual.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($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
|
||||
|
||||
@@ -61,8 +61,8 @@ Partial Class Ventas_AuxiliarCliente
|
||||
'DdlConceptosContables.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
|
||||
txtFechaI.Text = Now.AddDays(-30).ToString("dd/MM/yyyy")
|
||||
txtFechaF.Text = Now.ToString("dd/MM/yyyy")
|
||||
txtFechaI.Text = NowADS().AddDays(-30).ToString("dd/MM/yyyy")
|
||||
txtFechaF.Text = NowADS().ToString("dd/MM/yyyy")
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -60,8 +60,8 @@ Partial Class Ventas_AuxiliarClienteVentas
|
||||
|
||||
CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, Nothing)
|
||||
|
||||
txtFechaI.Text = Now.AddDays(-30).ToString("dd/MM/yyyy")
|
||||
txtFechaF.Text = Now.ToString("dd/MM/yyyy")
|
||||
txtFechaI.Text = NowADS().AddDays(-30).ToString("dd/MM/yyyy")
|
||||
txtFechaF.Text = NowADS().ToString("dd/MM/yyyy")
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -31,8 +31,8 @@ Partial Class Ventas_CatAutorizacionLimites
|
||||
|
||||
#Region "CARGAS"
|
||||
Private Sub CargaCombos()
|
||||
txtFechaI.Text = Now.AddDays(-1).ToString("dd/MM/yyyy")
|
||||
txtFechaI.Text = Now.ToString("dd/MM/yyyy")
|
||||
txtFechaI.Text = NowADS().AddDays(-1).ToString("dd/MM/yyyy")
|
||||
txtFechaI.Text = NowADS().ToString("dd/MM/yyyy")
|
||||
|
||||
DdlCliente.setEsWebService(True)
|
||||
DdlClienteFiltro.setEsWebService(True)
|
||||
@@ -351,7 +351,7 @@ Partial Class Ventas_CatAutorizacionLimites
|
||||
StrFiltro.AppendFormat("Vendedor: {0}, ", DdlVendedorFiltro.SelectedItem)
|
||||
StrFiltro.AppendFormat("Fecha Inicio: {0}", txtFechaI.Text.ToDate.ToString("dd/MM/yyyy"))
|
||||
'If txtFechaF.Text <> "" Then StrFiltro.AppendFormat(", Fecha Fin: {0}", txtFechaF.Text.ToDate.ToString("dd/MM/yyyy"))
|
||||
Dim fechaFin As String = If(txtFechaF.Text <> "", txtFechaF.Text.ToDate.ToString("dd/MM/yyyy"), Now.ToString("dd/MM/yyyy"))
|
||||
Dim fechaFin As String = If(txtFechaF.Text <> "", txtFechaF.Text.ToDate.ToString("dd/MM/yyyy"), NowADS().ToString("dd/MM/yyyy"))
|
||||
StrFiltro.AppendFormat(", Fecha Fin: {0}", fechaFin)
|
||||
|
||||
'Oculta columnas en export sin afectar GridView en página
|
||||
|
||||
@@ -169,7 +169,7 @@ Partial Class CatClientes
|
||||
|
||||
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
|
||||
GvDatos.ExportToExcel("RepClientes_" & Now.ToShortDateString)
|
||||
GvDatos.ExportToExcel("RepClientes_" & NowADS().ToShortDateString)
|
||||
End Sub
|
||||
|
||||
#Region "P D F"
|
||||
@@ -200,7 +200,7 @@ Partial Class CatClientes
|
||||
params.Add(New ReportParameter("RFC", UsuarioActual.Empresa.RFC))
|
||||
params.Add(New ReportParameter("DireccionEmpresa", UsuarioActual.Empresa.Direccion))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToString))
|
||||
params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToString))
|
||||
|
||||
params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ Partial Class CatMetasVendedores
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
txtMesAnio.Text = Now.FirstDayOfMonth.ToShortDateString
|
||||
txtMesAnio.Text = NowADS().FirstDayOfMonth.ToShortDateString
|
||||
CargaDatosModal()
|
||||
CargaCombos()
|
||||
CargaDatos()
|
||||
|
||||
@@ -528,7 +528,7 @@ Partial Class Clientes
|
||||
Private Property FechaLimite As Date
|
||||
Get
|
||||
If ViewState("FechaLimite") Is Nothing Then
|
||||
Return Date.Now.AddDays(15)
|
||||
Return NowADS().AddDays(15)
|
||||
Else
|
||||
Return ViewState("FechaLimite").ToString().ToDate()
|
||||
End If
|
||||
@@ -820,7 +820,7 @@ Partial Class Clientes
|
||||
End If
|
||||
|
||||
ImgAddObs.Visible = False
|
||||
LblFechaCaptura.Text = Now.ToShortDateString()
|
||||
LblFechaCaptura.Text = NowADS().ToShortDateString()
|
||||
LblUsuarioCapturo.Text = UsuarioActual.Usuario
|
||||
ViewState("CveCliente") = -1
|
||||
BtnEliminar.Visible = False
|
||||
@@ -887,8 +887,8 @@ Partial Class Clientes
|
||||
|
||||
InicializaDevolverDinero()
|
||||
|
||||
TxtFechaICredito.Text = Now.AddYears(-2).ToShortDateString()
|
||||
TxtFechaFCredito.Text = Now.ToShortDateString()
|
||||
TxtFechaICredito.Text = NowADS().AddYears(-2).ToShortDateString()
|
||||
TxtFechaFCredito.Text = NowADS().ToShortDateString()
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(257) Then 'Falta agregar proceso
|
||||
DivMapAddSucursal.Visible = True
|
||||
@@ -2598,7 +2598,7 @@ Partial Class Clientes
|
||||
'For Each gvr As GridViewRow In GvDocsVentas.Rows
|
||||
' If gvr.FCCheckBox("ChkDoc").Checked Then
|
||||
|
||||
' objDoc.DocumentacionElectronicaAdd(gvr.DataKey("CveDocumentacion").Toentero(), -1, CveCliente, -1, 1, gvr.FCTextBox("TxtObs").Text, "", UsuarioActual.CveUsuario, Now, Observacion2:=gvr.FCTextBox("TxtObs2").Text, FechaVigencia:=gvr.FCTextBox("TxtFechaVigencia").Text.ToDate())
|
||||
' objDoc.DocumentacionElectronicaAdd(gvr.DataKey("CveDocumentacion").Toentero(), -1, CveCliente, -1, 1, gvr.FCTextBox("TxtObs").Text, "", UsuarioActual.CveUsuario, NowADS(), Observacion2:=gvr.FCTextBox("TxtObs2").Text, FechaVigencia:=gvr.FCTextBox("TxtFechaVigencia").Text.ToDate())
|
||||
|
||||
' End If
|
||||
|
||||
@@ -2699,7 +2699,7 @@ Partial Class Clientes
|
||||
'For Each gvr As GridViewRow In GvDocsVentas.Rows
|
||||
' 'sino está registrada y se selecciona, se va a insertar
|
||||
' If gvr.DataKey("CveDocumentacionElectronica").Toentero() <= 0 Then
|
||||
' objDoc.DocumentacionElectronicaAdd(gvr.DataKey("CveDocumentacion").Toentero(), -1, CveCliente, -1, 1, gvr.FCTextBox("TxtObs").Text, "", UsuarioActual.CveUsuario, Now, Observacion2:=gvr.FCTextBox("TxtObs2").Text, FechaVigencia:=gvr.FCTextBox("TxtFechaVigencia").Text.ToDate())
|
||||
' objDoc.DocumentacionElectronicaAdd(gvr.DataKey("CveDocumentacion").Toentero(), -1, CveCliente, -1, 1, gvr.FCTextBox("TxtObs").Text, "", UsuarioActual.CveUsuario, NowADS(), Observacion2:=gvr.FCTextBox("TxtObs2").Text, FechaVigencia:=gvr.FCTextBox("TxtFechaVigencia").Text.ToDate())
|
||||
' Else
|
||||
' ', Observacion2:=gvr.FCTextBox("TxtObs2").Text
|
||||
' objDoc.DocumentacionElectronicaUpdate(gvr.DataKey("CveDocumentacionElectronica").Toentero(), gvr.DataKey("CveDocumentacion").Toentero(), -1, CveCliente, -1, 1, gvr.FCTextBox("TxtObs").Text, "", UsuarioActual.CveUsuario, gvr.DataKey("FechaLimite").ToDate(), Observacion2:=gvr.FCTextBox("TxtObs2").Text, FechaVigencia:=gvr.FCTextBox("TxtFechaVigencia").Text.ToDate())
|
||||
@@ -3532,7 +3532,7 @@ Partial Class Clientes
|
||||
Liga = ObjParametro.Cadena1 & "AIMMGM/Portal.aspx"
|
||||
End If
|
||||
|
||||
Dim LigaActivar As String = Liga & "?p=" & Encripta("CveU=" & CveUsr & "&Clave=" & "-acceso-" & "&Opcion=Activar&Hora=" & DateTime.Now.Ticks& & "&CveE=" & UsuarioActual.CveEmpresa)
|
||||
Dim LigaActivar As String = Liga & "?p=" & Encripta("CveU=" & CveUsr & "&Clave=" & "-acceso-" & "&Opcion=Activar&Hora=" & NowADS().Ticks& & "&CveE=" & UsuarioActual.CveEmpresa)
|
||||
|
||||
If UsuarioActual.Empresa.CvePlataforma = 3 Then
|
||||
EnviaCorreoGPS(Liga, LigaActivar)
|
||||
@@ -3599,7 +3599,7 @@ Partial Class Clientes
|
||||
Else
|
||||
ObjUsuario.Commit()
|
||||
|
||||
Dim LigaActivar As String = Liga & "?p=" & Encripta("CveU=" & CveUsuario & "&Clave=" & "-acceso-" & "&Opcion=Activar&Hora=" & DateTime.Now.Ticks& & "&CveE=" & UsuarioActual.CveEmpresa)
|
||||
Dim LigaActivar As String = Liga & "?p=" & Encripta("CveU=" & CveUsuario & "&Clave=" & "-acceso-" & "&Opcion=Activar&Hora=" & NowADS().Ticks& & "&CveE=" & UsuarioActual.CveEmpresa)
|
||||
EnviaCorreo2(Liga, LigaActivar)
|
||||
|
||||
LimpiaAgregarUsuarioPortal()
|
||||
@@ -4053,7 +4053,7 @@ Partial Class Clientes
|
||||
lista.Add(New CrystalParametro("TipoCuentas", DdlTipoCuentasCxC.SelectedItem.Text))
|
||||
lista.Add(New CrystalParametro("NombreCliente", LtlCliente.Text))
|
||||
lista.Add(New CrystalParametro("FechaInicio", If(FI = "-1", "-", FI)))
|
||||
lista.Add(New CrystalParametro("FechaFin", If(FF = "-1", DateTime.Now.ToShortDateString(), FF)))
|
||||
lista.Add(New CrystalParametro("FechaFin", If(FF = "-1", NowADS().ToShortDateString(), FF)))
|
||||
lista.Add(New CrystalParametro("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
lista.Add(New CrystalParametro("DireccionCliente", String.Format("Calle {0} #{1} Colonia {2}", TxtDireccion.Text, If(TxtNoExt.Text = "", "S/N", TxtNoExt.Text), TxtColonia.Text)))
|
||||
lista.Add(New CrystalParametro("ClienteCP", TxtCP.Text))
|
||||
@@ -4156,7 +4156,7 @@ Partial Class Clientes
|
||||
lista.Add(New CrystalParametro("TipoCuentas", DdlTipoCuentasCxC.SelectedItem.Text))
|
||||
lista.Add(New CrystalParametro("NombreCliente", LtlCliente.Text))
|
||||
lista.Add(New CrystalParametro("FechaInicio", If(FI = "-1", "-", FI)))
|
||||
lista.Add(New CrystalParametro("FechaFin", If(FF = "-1", DateTime.Now.ToShortDateString(), FF)))
|
||||
lista.Add(New CrystalParametro("FechaFin", If(FF = "-1", NowADS().ToShortDateString(), FF)))
|
||||
lista.Add(New CrystalParametro("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
lista.Add(New CrystalParametro("DireccionCliente", String.Format("Calle {0} #{1} Colonia {2}", TxtDireccion.Text, If(TxtNoExt.Text = "", "S/N", TxtNoExt.Text), TxtColonia.Text)))
|
||||
lista.Add(New CrystalParametro("ClienteCP", TxtCP.Text))
|
||||
@@ -5136,7 +5136,7 @@ Partial Class Clientes
|
||||
|
||||
Dim CveCaracteristicaOpcion As Integer = -1
|
||||
Dim CaracteristicaValor As String = ""
|
||||
Dim CaracteristicaValorDate As Date = Now
|
||||
Dim CaracteristicaValorDate As Date = NowADS()
|
||||
Dim CaracteristicaValorInt As Integer = -1
|
||||
|
||||
Dim AgregaCaracteristica As Boolean = False
|
||||
@@ -5236,7 +5236,7 @@ Partial Class Clientes
|
||||
|
||||
Dim CveCaracteristicaOpcion As Integer = -1
|
||||
Dim CaracteristicaValor As String = ""
|
||||
Dim CaracteristicaValorDate As Date = Now
|
||||
Dim CaracteristicaValorDate As Date = NowADS()
|
||||
Dim CaracteristicaValorInt As Integer = -1
|
||||
|
||||
Select Case _CveCaracteristicaTipo
|
||||
@@ -5489,7 +5489,7 @@ Partial Class Clientes
|
||||
RowSucursal("CveVendedorSucursal") = DdlVendedorSucursal.SelectedValue.ToEntero()
|
||||
RowSucursal("CveMetodoPago") = DdlMetodoPagoSucursal.SelectedValue.ToEntero()
|
||||
RowSucursal("CveUsuario") = UsuarioActual.CveUsuario
|
||||
RowSucursal("FechaIng") = Now.ToShortDateString()
|
||||
RowSucursal("FechaIng") = NowADS().ToShortDateString()
|
||||
RowSucursal("Usuario") = UsuarioActual.Usuario
|
||||
|
||||
RowSucursal("CveUsoCFDI") = DdlSucursalUsoCFDI.SelectedValue.ToEntero()
|
||||
@@ -6000,12 +6000,12 @@ Partial Class Clientes
|
||||
Private Sub SetValues()
|
||||
ViewState("Orden") = ""
|
||||
ViewState("OrdenUsuarios") = ""
|
||||
TxtFechaPago.Text = Now.ToShortDateString()
|
||||
txtFechaI.Text = Now.ToShortDateString()
|
||||
txtFechaF.Text = Now.ToShortDateString()
|
||||
TxtFechaImportarSaldos.Text = Now.ToShortDateString()
|
||||
TxtFechaIUsados.Text = Now.FirstDayOfMonth.ToShortDateString()
|
||||
TxtFechaFUsados.Text = Now.LastDayOfMonth.ToShortDateString()
|
||||
TxtFechaPago.Text = NowADS().ToShortDateString()
|
||||
txtFechaI.Text = NowADS().ToShortDateString()
|
||||
txtFechaF.Text = NowADS().ToShortDateString()
|
||||
TxtFechaImportarSaldos.Text = NowADS().ToShortDateString()
|
||||
TxtFechaIUsados.Text = NowADS().FirstDayOfMonth.ToShortDateString()
|
||||
TxtFechaFUsados.Text = NowADS().LastDayOfMonth.ToShortDateString()
|
||||
CobranzaTelefono = ""
|
||||
CodigoCliente = ""
|
||||
|
||||
@@ -6217,7 +6217,7 @@ Partial Class Clientes
|
||||
Dim Mensaje As String = ""
|
||||
Select Case UsuarioActual.CveEmpresa
|
||||
Case 4
|
||||
Mensaje = $"Cliente de VSH Seguridad su saldo pendiente es de $ {StrSaldo} fecha limite 25/{Now.ToString("MM/yyyy")} llamar al 6622106400 #REFERENCIA {CodigoCliente} "
|
||||
Mensaje = $"Cliente de VSH Seguridad su saldo pendiente es de $ {StrSaldo} fecha limite 25/{NowADS().ToString("MM/yyyy")} llamar al 6622106400 #REFERENCIA {CodigoCliente} "
|
||||
End Select
|
||||
|
||||
Dim ObjSMS As New ClsTecnoMovil
|
||||
@@ -6665,10 +6665,10 @@ Partial Class Clientes
|
||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("AgrupadoPor", String.Format("<b>Cliente: </b>{0}", TxtNombreComercial.Text)))
|
||||
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime().ToShortDateString()))
|
||||
params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime().ToShortDateString()))
|
||||
|
||||
params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
ImprimirPDF("Empresas\Grales\Formatos\RepClientesPagosBancos.rdlc", DTCobrosRealizados, params, "RepClientesPagosBancos_" & Now.ToString("yyyyMMddhhmmss"), Formato:=Formato)
|
||||
ImprimirPDF("Empresas\Grales\Formatos\RepClientesPagosBancos.rdlc", DTCobrosRealizados, params, "RepClientesPagosBancos_" & NowADS().ToString("yyyyMMddhhmmss"), Formato:=Formato)
|
||||
|
||||
|
||||
End Sub
|
||||
@@ -7385,7 +7385,7 @@ Partial Class Clientes
|
||||
Dim estado As String = ""
|
||||
Dim Telefono As String = ""
|
||||
Dim mesArray = New String() {"enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"}
|
||||
Dim hoy As DateTime = DateTime.Now
|
||||
Dim hoy As DateTime = NowADS()
|
||||
Dim fechaConFormato As String = String.Format("{0} de {1} del {2}", hoy.Day, mesArray(hoy.Month), hoy.Year)
|
||||
Dim cpCliente As String = ""
|
||||
|
||||
@@ -7602,7 +7602,7 @@ Partial Class Clientes
|
||||
Try
|
||||
Dim objDoc As New clsGemBoxDocument(pathDesti)
|
||||
Dim objRH As New ClsRH
|
||||
Dim FechaActual As String = Now.Day.ToString("0#") & " de " & CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(1).ToString() & " del " & Now.Year.ToString()
|
||||
Dim FechaActual As String = NowADS().Day.ToString("0#") & " de " & CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(1).ToString() & " del " & NowADS().Year.ToString()
|
||||
|
||||
|
||||
objDoc.SustituirTags(objRH.GetDatosTagsDocumentos(-1, UsuarioActual.CveEmpresa)) ' Pendiente
|
||||
@@ -7667,7 +7667,7 @@ Partial Class Clientes
|
||||
For Each gvr As GridViewRow In GvDocsVentas.Rows
|
||||
If gvr.FCCheckBox("ChkDoc").Checked Then
|
||||
|
||||
If objDoc.DocumentacionElectronicaAdd(gvr.DataKey("CveDocumentacion").ToEntero(), -1, CveCliente, -1, 1, gvr.FCTextBox("TxtObs").Text, "", UsuarioActual.CveUsuario, Now, Observacion2:=gvr.FCTextBox("TxtObs2").Text) <= 0 Then HuboError = True
|
||||
If objDoc.DocumentacionElectronicaAdd(gvr.DataKey("CveDocumentacion").ToEntero(), -1, CveCliente, -1, 1, gvr.FCTextBox("TxtObs").Text, "", UsuarioActual.CveUsuario, NowADS(), Observacion2:=gvr.FCTextBox("TxtObs2").Text) <= 0 Then HuboError = True
|
||||
|
||||
End If
|
||||
|
||||
@@ -7677,7 +7677,7 @@ Partial Class Clientes
|
||||
For Each gvr As GridViewRow In GvDocsVentas.Rows
|
||||
'sino está registrada y se selecciona, se va a insertar
|
||||
If gvr.DataKey("CveDocumentacionElectronica").ToEntero() <= 0 AndAlso gvr.FCCheckBox("ChkDoc").Checked Then
|
||||
If objDoc.DocumentacionElectronicaAdd(gvr.DataKey("CveDocumentacion").ToEntero(), -1, CveCliente, -1, 1, gvr.FCTextBox("TxtObs").Text, "", UsuarioActual.CveUsuario, Now, Observacion2:=gvr.FCTextBox("TxtObs2").Text) <= 0 Then HuboError = True
|
||||
If objDoc.DocumentacionElectronicaAdd(gvr.DataKey("CveDocumentacion").ToEntero(), -1, CveCliente, -1, 1, gvr.FCTextBox("TxtObs").Text, "", UsuarioActual.CveUsuario, NowADS(), Observacion2:=gvr.FCTextBox("TxtObs2").Text) <= 0 Then HuboError = True
|
||||
Else
|
||||
', Observacion2:=gvr.FCTextBox("TxtObs2").Text
|
||||
If Not objDoc.DocumentacionElectronicaUpdate(gvr.DataKey("CveDocumentacionElectronica").ToEntero(), gvr.DataKey("CveDocumentacion").ToEntero(), -1, CveCliente, -1, 1, gvr.FCTextBox("TxtObs").Text, "", UsuarioActual.CveUsuario, gvr.DataKey("FechaLimite").ToDate(), Observacion2:=gvr.FCTextBox("TxtObs2").Text) Then HuboError = True
|
||||
@@ -9457,7 +9457,7 @@ Partial Class Clientes
|
||||
ObjFactura.Folio = Folio
|
||||
ObjFactura.Serie = Serie
|
||||
|
||||
ObjFactura.Fecha = Now
|
||||
ObjFactura.Fecha = NowADS()
|
||||
ObjFactura.FechaVencimiento = TxtFechaPago.Text.ToDate()
|
||||
|
||||
ObjFactura.CveMetodoPago33 = DdlMetodoPago33.SelectedValue.ToEntero()
|
||||
@@ -9499,26 +9499,26 @@ Partial Class Clientes
|
||||
ObjFactura.TipoDocumento = ""
|
||||
End Select
|
||||
|
||||
ObjFactura.Fech1 = Now
|
||||
ObjFactura.Fech2 = Now
|
||||
ObjFactura.Fech3 = Now
|
||||
ObjFactura.Fech1 = NowADS()
|
||||
ObjFactura.Fech2 = NowADS()
|
||||
ObjFactura.Fech3 = NowADS()
|
||||
|
||||
|
||||
'NUM 1- CARGO 2- BONIFICACION
|
||||
ObjFactura.Num1 = Tipo
|
||||
|
||||
ObjFactura.FechaPago = Now
|
||||
ObjFactura.FechaPago = NowADS()
|
||||
|
||||
|
||||
ObjFactura.CveClienteSucursal = DdlSucursalCliente.SelectedValue.ToEntero()
|
||||
ObjFactura.Vigencia = Now
|
||||
ObjFactura.Vigencia = NowADS()
|
||||
|
||||
ObjFactura.CveVendedor = DdlVendedor.SelectedValue.ToEntero()
|
||||
If DdlVendedor.SelectedValue.ToEntero() > 0 AndAlso Not UsuarioActual.TienePermisoProceso(161) Then
|
||||
DdlVendedor.Enabled = False
|
||||
End If
|
||||
|
||||
ObjFactura.FechaEjecucion = Now
|
||||
ObjFactura.FechaEjecucion = NowADS()
|
||||
ObjFactura.CveSubProyecto = UsuarioActual.CveSubProyecto
|
||||
ObjFactura.CveSubProyectoCobranza = UsuarioActual.CveSubProyecto
|
||||
ObjFactura.CveSubProyectoEjecucion = UsuarioActual.CveSubProyecto
|
||||
@@ -9634,7 +9634,7 @@ Partial Class Clientes
|
||||
params.Add(New ReportParameter("AgrupadoPor", "Cliente: " & LtlCliente.Text))
|
||||
|
||||
params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
ImprimirPDF("Empresas\Grales\Formatos\" & NombreFormato & ".rdlc", DtTemp, params, NombreFormato & "_" & Now.ToString("yyyyMMddhhmmss"), Formato:=Formato)
|
||||
ImprimirPDF("Empresas\Grales\Formatos\" & NombreFormato & ".rdlc", DtTemp, params, NombreFormato & "_" & NowADS().ToString("yyyyMMddhhmmss"), Formato:=Formato)
|
||||
Else
|
||||
Alert("No se encontró información.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
@@ -9643,7 +9643,7 @@ Partial Class Clientes
|
||||
Private Sub LnkUsadosReset_Click(sender As Object, e As EventArgs) Handles LnkUsadosReset.Click
|
||||
Dim Acum As New ClsAcumuladores
|
||||
Dim Puntos As Decimal = -GvUsadosResumen.Rows.Cast(Of GridViewRow).Where(Function(x) x.RowType = DataControlRowType.DataRow).FirstOrDefault(Function(gvr) gvr.RowIndex = 3).DataKey("Puntos").ToEntero()
|
||||
If Acum.DistribuidorMovtosAdd(CveCliente, 1, 1, Puntos, 0, 0, 3, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Puntos, "Saldo Inicializado", Now) Then
|
||||
If Acum.DistribuidorMovtosAdd(CveCliente, 1, 1, Puntos, 0, 0, 3, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Puntos, "Saldo Inicializado", NowADS()) Then
|
||||
Alert("Puntuación Inicializada")
|
||||
End If
|
||||
Acum.Dispose()
|
||||
@@ -10219,7 +10219,7 @@ Partial Class Clientes
|
||||
End If
|
||||
Else
|
||||
If DdlTipoLineaAdicionalModal.SelectedValue = "2" Then
|
||||
TxtFechaVencimientoLineaAdicionalModal.Text = Now.AddDays(TxtDiasVencimientoLineaAdicionalModal.Text.ToEntero()).ToString("dd/MM/yyyy")
|
||||
TxtFechaVencimientoLineaAdicionalModal.Text = NowADS().AddDays(TxtDiasVencimientoLineaAdicionalModal.Text.ToEntero()).ToString("dd/MM/yyyy")
|
||||
End If
|
||||
|
||||
If Not ObjVentas.AddLineasAdicionales(TxtLineaAdicionalModal.Text, CveCliente, DdlProveedorLineaAdicionalModal.SelectedValue.ToEntero, DdlTipoLineaAdicionalModal.SelectedValue.ToEntero, TxtImporteLineaAdicionalModal.Text.ToDecimal,
|
||||
|
||||
@@ -187,10 +187,10 @@ Partial Class Ventas_ClientesAbonar
|
||||
DdlProveedorIntermediario.SelectedText = "Seleccione"
|
||||
DdlProveedorIntermediario.SelectedValue = "-1"
|
||||
|
||||
FechaCorteIE = DateTime.Now
|
||||
FechaCorteIE = NowADS()
|
||||
|
||||
Dim dia As Integer = If(UsuarioActual.CveEmpresa = 13, Now.Day - 1, Now.Day)
|
||||
Fecha = (dia.ToString + "/" + Now.Month.ToString + "/" + Now.Year.ToString).ToDate
|
||||
Dim dia As Integer = If(UsuarioActual.CveEmpresa = 13, NowADS().Day - 1, NowADS().Day)
|
||||
Fecha = (dia.ToString + "/" + NowADS().Month.ToString + "/" + NowADS().Year.ToString).ToDate
|
||||
|
||||
'If UsuarioActual.Empresa.Funcionalidad(712) = "1" Then
|
||||
' PorletIntermediario.Visible = True
|
||||
@@ -230,7 +230,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
RegistraScript($"TipoCambioActual = {GlobalTipoCambio(Fecha).FormatoNumero(4)}")
|
||||
End If
|
||||
|
||||
RVTxtFechaDocumento.MaximumValue = Now.ToString("dd/MM/yyyy")
|
||||
RVTxtFechaDocumento.MaximumValue = NowADS().ToString("dd/MM/yyyy")
|
||||
If UsuarioActual.CveEmpresa.Contiene(13, 83, 158) Then
|
||||
LnkAccionesModalSeleccionLayout.Visible = True
|
||||
End If
|
||||
@@ -297,7 +297,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
CargaCuentas()
|
||||
CargaTipoTransaccion()
|
||||
|
||||
TxtFechaDocumento.Text = Now.ToShortDateString.ToString
|
||||
TxtFechaDocumento.Text = NowADS().ToShortDateString.ToString
|
||||
|
||||
TxtAboneA.Enabled = False
|
||||
LbEncabezado.Text = String.Format("<a href='/Ventas/Clientes.aspx?CveCliente={0}' target='_blank' class='Texto'>{1}</a>", CveCliente, ObjCliente.NombreComercial)
|
||||
@@ -355,7 +355,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
Dim FechaI As String = IfNull(Request("FechaI"), "-1").ToString
|
||||
Dim FechaF As String = IfNull(Request("FechaF"), "-1").ToString
|
||||
|
||||
Dim FechaCorte As Date = DateTime.Now.AddYears(1).ToShortDateString.ToString.ToDate
|
||||
Dim FechaCorte As Date = NowADS().AddYears(1).ToShortDateString.ToString.ToDate
|
||||
|
||||
Dim SumDescuentoProntoPago As Double = 0.0
|
||||
If Mov.GetCxCClienteDetalle(ViewState("CveCliente").ToString.ToEntero, FechaI, FechaF, pCveMoneda, CveSubProyecto, UsuarioActual.CveEmpresa, CveClienteSucursal, FechaCorte:=FechaCorte) Then
|
||||
@@ -1367,21 +1367,21 @@ Partial Class Ventas_ClientesAbonar
|
||||
Dim Serie As String = "-1"
|
||||
|
||||
ObjFacturaDevolucion.CveEmpresa = UsuarioActual.CveEmpresa
|
||||
ObjFacturaDevolucion.TipoCambio = If(Me.CveMoneda = 1, 1, GlobalTipoCambio(Now).FormatoNumero(4).ToDecimal())
|
||||
ObjFacturaDevolucion.TipoCambio = If(Me.CveMoneda = 1, 1, GlobalTipoCambio(NowADS()).FormatoNumero(4).ToDecimal())
|
||||
ObjFacturaDevolucion.ConvertirPesos = False
|
||||
ObjFacturaDevolucion.CveMoneda = CveMoneda
|
||||
ObjFacturaDevolucion.Moneda = GlobalDTMonedas.FiltroPrimeroValor("Moneda", $"CveMoneda = {CveMoneda}")
|
||||
ObjFacturaDevolucion.MonedaSAT = GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", $"CveMoneda = {CveMoneda}")
|
||||
ObjFacturaDevolucion.Serie = Serie
|
||||
ObjFacturaDevolucion.Folio = Folio
|
||||
ObjFacturaDevolucion.Fecha = Now
|
||||
ObjFacturaDevolucion.Fecha = NowADS()
|
||||
ObjFacturaDevolucion.CvePrePoliza = -1
|
||||
ObjFacturaDevolucion.CveMetodoPago = 0
|
||||
ObjFacturaDevolucion.CondicionesPago = 0 ' 0 - Contado, 1 - Credito (CHECAR)
|
||||
ObjFacturaDevolucion.FormaPago = 0
|
||||
|
||||
ObjFacturaDevolucion.TipoDocto = "Egs"
|
||||
ObjFacturaDevolucion.Fecha = Now
|
||||
ObjFacturaDevolucion.Fecha = NowADS()
|
||||
|
||||
ObjFacturaDevolucion.Version = "4.0"
|
||||
|
||||
@@ -1458,7 +1458,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
ObjFacturaDevolucion.TipoDocumento = ""
|
||||
End Select
|
||||
|
||||
ObjFacturaDevolucion.FechaPago = Now
|
||||
ObjFacturaDevolucion.FechaPago = NowADS()
|
||||
|
||||
ObjFacturaDevolucion.CveCorte = -1
|
||||
'ObjFacturaDevolucion.CveMesa = -1
|
||||
@@ -1959,12 +1959,12 @@ Partial Class Ventas_ClientesAbonar
|
||||
TxtObservaciones.Text = ""
|
||||
TxtImporte.Text = ""
|
||||
TxtTotal.Text = ""
|
||||
TxtFechaDocumento.Text = Now.ToShortDateString
|
||||
TxtFechaDocumento.Text = NowADS().ToShortDateString
|
||||
DdlCuenta.SelectedValue = "-1"
|
||||
DdlTipoTransaccion.SelectedValue = "-1"
|
||||
|
||||
CFDIRelacionadoSustitucion = "-1"
|
||||
FechaCorteIE = DateTime.Now.ToDate
|
||||
FechaCorteIE = NowADS().ToDate
|
||||
IDPoliza = -1
|
||||
FolioIECancelado = ""
|
||||
|
||||
@@ -2204,7 +2204,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
'For i = 0 To CveVentas.Count - 1
|
||||
Dim ObjBancos As New ClsBancos
|
||||
|
||||
If ObjBancos.GetComplementoPagosRep(-1, Now.AddYears(-2), Now, CveIE, -1, 1, UsuarioActual.CveEmpresa, -1) Then
|
||||
If ObjBancos.GetComplementoPagosRep(-1, NowADS().AddYears(-2), NowADS(), CveIE, -1, 1, UsuarioActual.CveEmpresa, -1) Then
|
||||
If Not ObjBancos.DtResultados.Rows.Count > 0 Then
|
||||
ObjBancos.Dispose()
|
||||
Alert("No se generaron complementos de pago porque no hay facturas con método de pago PPD", TipoMensaje.MsgAdvertencia)
|
||||
@@ -2586,8 +2586,8 @@ Partial Class Ventas_ClientesAbonar
|
||||
End Sub
|
||||
|
||||
Private Sub RVTxtFechaDocumento_Init(sender As Object, e As EventArgs) Handles RVTxtFechaDocumento.Init
|
||||
RVTxtFechaDocumento.MaximumValue = DateTime.Now.ToShortDateString
|
||||
Calendario.EndDate = DateTime.Now
|
||||
RVTxtFechaDocumento.MaximumValue = NowADS().ToShortDateString
|
||||
Calendario.EndDate = NowADS()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ Partial Class Ventas_FacturacionAcarreos
|
||||
CveCliente = DdlClientes.SelectedValue.ToEntero()
|
||||
End If
|
||||
Using ObjVentas As New ClsVentas
|
||||
If ObjVentas.GetFacturacionAcarreos(-1, CveCliente, -1, DdlEstatus.SelectedValue.ToEntero(), Now, UsuarioActual.CveEmpresa) Then
|
||||
If ObjVentas.GetFacturacionAcarreos(-1, CveCliente, -1, DdlEstatus.SelectedValue.ToEntero(), NowADS(), UsuarioActual.CveEmpresa) Then
|
||||
GvDatos.DataSource = ObjVentas.DtResultados
|
||||
End If
|
||||
End Using
|
||||
|
||||
@@ -20,7 +20,7 @@ Partial Class MetasVendedores
|
||||
End If
|
||||
End Sub
|
||||
Private Sub CargaDatosFiltros()
|
||||
Dim dNow As Date = Now
|
||||
Dim dNow As Date = NowADS()
|
||||
TxtFechaMes.Text = dNow.ToString("dd/MM/yyyy")
|
||||
|
||||
DdlSubProyectoFiltro.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa)
|
||||
|
||||
@@ -1108,7 +1108,7 @@ Partial Class PV
|
||||
End If
|
||||
'proceso 163, que activa al edicion de folios.
|
||||
|
||||
TxtFecha.Text = Now.ToShortDateString()
|
||||
TxtFecha.Text = NowADS().ToShortDateString()
|
||||
LblUsuario.Text = UsuarioActual.Usuario
|
||||
TxtCantidad.Attributes.Add("onKeyUp ", "Recalcula();")
|
||||
TxtPrecio.Attributes.Add("onKeyUp ", "Recalcula();")
|
||||
@@ -2157,7 +2157,7 @@ Partial Class PV
|
||||
If ObjPVenta.DtResultados.Rows.Count > 0 Then
|
||||
CveCorte = ObjPVenta.CveCorte
|
||||
Dim FechaICorte As Date = ObjPVenta.FechaInicial.Date '.AddDays(-1)
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso FechaICorte < Now.Date Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso FechaICorte < NowADS().Date Then
|
||||
DebeCerrarCorte = True
|
||||
LblMotivoBloqueo.Text = $"Existe un corte del día <b>{FechaICorte.ToString("dd/MM/yyyy")}</b>. Favor de cerrarlo para iniciar un nuevo corte."
|
||||
Else
|
||||
@@ -2187,9 +2187,9 @@ Partial Class PV
|
||||
Private Sub BtnIniciarTurno_Click(sender As Object, e As EventArgs) Handles BtnIniciarTurno.Click
|
||||
Dim ObjPVenta As New ClsPuntoVenta
|
||||
|
||||
ObjPVenta.AddVtaCortes(Now, TxtDineroCaja.Text.ToDecimal, UsuarioActual.CveUsuario, TxtDescripcionCaja.Text, UsuarioActual.CveEmpresa)
|
||||
ObjPVenta.AddVtaCortes(NowADS(), TxtDineroCaja.Text.ToDecimal, UsuarioActual.CveUsuario, TxtDescripcionCaja.Text, UsuarioActual.CveEmpresa)
|
||||
CveCorte = ObjPVenta.CveCorte
|
||||
LblEstatusCaja.Text = Now.ToShortDateString
|
||||
LblEstatusCaja.Text = NowADS().ToShortDateString
|
||||
TrEstatusCaja.Visible = True
|
||||
LkbEstadodeCaja.Visible = True
|
||||
LkbIngreso.Visible = True
|
||||
@@ -2303,7 +2303,7 @@ Partial Class PV
|
||||
Private Sub BtnAceptarIE_Click(sender As Object, e As EventArgs) Handles BtnAceptarIE.Click
|
||||
Dim ObjPVenta As New ClsPuntoVenta
|
||||
If TxtCantidadIE.Text.ToEntero > 0 Then
|
||||
If ObjPVenta.AddVta_MovimientosCajas(CveCorte, UsuarioActual.CveUsuario, TxtCantidadIE.Text.ToDouble, TxtDescripcionIE.Text, HdnTipoMovimiento.Value.ToEntero, Now) Then
|
||||
If ObjPVenta.AddVta_MovimientosCajas(CveCorte, UsuarioActual.CveUsuario, TxtCantidadIE.Text.ToDouble, TxtDescripcionIE.Text, HdnTipoMovimiento.Value.ToEntero, NowADS()) Then
|
||||
TxtCantidadIE.Text = ""
|
||||
TxtDescripcionIE.Text = ""
|
||||
RegistraScript("$('#DivIngresoEgreso').modal('hide')", "divingresoegreso")
|
||||
@@ -2316,7 +2316,7 @@ Partial Class PV
|
||||
Private Sub BtnCerrarTurno_Click(sender As Object, e As EventArgs) Handles BtnCerrarTurno.Click
|
||||
Dim ObjPVenta As New ClsPuntoVenta
|
||||
If TxtEfectivoEnCaja.Text.Trim <> "" Then
|
||||
If ObjPVenta.UpdateFinalizadoVtaCortes(CveCorte, TxtEfectivoEnCaja.Text.ToDouble, LblDiferenciaCaja.Text.ToDouble, Now, UsuarioActual.CveEmpresa) Then
|
||||
If ObjPVenta.UpdateFinalizadoVtaCortes(CveCorte, TxtEfectivoEnCaja.Text.ToDouble, LblDiferenciaCaja.Text.ToDouble, NowADS(), UsuarioActual.CveEmpresa) Then
|
||||
RegistraScript($"window.location.href = '/Compras/PopUpVerFactura.aspx?P={Encripta(String.Format("OP=CORT&CVECORTE={0}&FORMATO={1}", CveCorte, "PDF"))}'", "Imprimir")
|
||||
Dim Liga As String = "document.location.href=""/Ventas/PV.aspx"";"
|
||||
Alert("Se ha cerrado el turno correctamente.", TipoMensaje.MsgInformacion, Liga)
|
||||
@@ -2327,7 +2327,7 @@ Partial Class PV
|
||||
Private Sub BtnCerrarBloqueo_Click(sender As Object, e As EventArgs) Handles BtnCerrarBloqueo.Click
|
||||
Dim ObjPVenta As New ClsPuntoVenta
|
||||
If TxtEfectivoCajaBloqueo.Text.Trim <> "" Then
|
||||
If ObjPVenta.UpdateFinalizadoVtaCortes(CveCorte, TxtEfectivoCajaBloqueo.Text.ToDouble, LblDiferenciaCajaBloqueo.Text.ToDouble, Now, UsuarioActual.CveEmpresa) Then
|
||||
If ObjPVenta.UpdateFinalizadoVtaCortes(CveCorte, TxtEfectivoCajaBloqueo.Text.ToDouble, LblDiferenciaCajaBloqueo.Text.ToDouble, NowADS(), UsuarioActual.CveEmpresa) Then
|
||||
RegistraScript($"window.location.href = '/Compras/PopUpVerFactura.aspx?P={Encripta(String.Format("OP=CORT&CVECORTE={0}&FORMATO={1}", CveCorte, "PDF"))}'", "Imprimir")
|
||||
Dim Liga As String = "document.location.href=""/Ventas/PV.aspx"";"
|
||||
Alert("Se ha cerrado el turno correctamente.", TipoMensaje.MsgInformacion, Liga)
|
||||
@@ -2673,7 +2673,7 @@ Partial Class PV
|
||||
ClienteCodigoRegimenFiscal = "616"
|
||||
End If
|
||||
End If
|
||||
TxtFechaPago.Text = (Now.AddDays(ObjCliente.PlazoCobranza)).ToShortDateString
|
||||
TxtFechaPago.Text = (NowADS().AddDays(ObjCliente.PlazoCobranza)).ToShortDateString
|
||||
|
||||
|
||||
If ObjCliente.DtResultados(0)("CveVendedor").ToString.ToEntero > 0 Then
|
||||
@@ -3047,7 +3047,7 @@ Partial Class PV
|
||||
Dim x509 As New X509Certificate2()
|
||||
x509.Import(Data)
|
||||
|
||||
If x509.NotAfter <= Now() Then
|
||||
If x509.NotAfter <= NowADS() Then
|
||||
BtnEmitirImprimir.Enabled = False
|
||||
Alert("La fecha del certificado ha expirado", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
@@ -3601,7 +3601,7 @@ Partial Class PV
|
||||
ObjFactura.Folio = If(EstablecioFolio Or VistaPrevia Or (CveVenta > 0 And (NuevaFactura.Contiene(0, 2))), TxtFolio.Text.Trim.ToEntero, -1)
|
||||
'ObjFactura.Folio = If(ExFolioFactura, FolioXML.ToEntero, -1)
|
||||
ObjFactura.Serie = If(VistaPrevia, "VistaPrevia", LblSerie.Text)
|
||||
ObjFactura.Fecha = New Date(TxtFecha.Text.Trim.ToDate.Year, TxtFecha.Text.Trim.ToDate.Month, TxtFecha.Text.Trim.ToDate.Day, Now.Hour, Now.Minute, Now.Second)
|
||||
ObjFactura.Fecha = New Date(TxtFecha.Text.Trim.ToDate.Year, TxtFecha.Text.Trim.ToDate.Month, TxtFecha.Text.Trim.ToDate.Day, NowADS().Hour, NowADS().Minute, NowADS().Second)
|
||||
ObjFactura.CveMetodoPago = DdlMetodoPago.SelectedValue.ToEntero
|
||||
ObjFactura.MetodoPago = DdlMetodoPago.SelectedItem.Text
|
||||
ObjFactura.ClaveMetodoPagoSAT = GlobalDTMetodosPago.FiltroPrimeroValor("ClaveSAT", $"CveMetodoPago = {DdlMetodoPago.SelectedValue}")
|
||||
@@ -3642,9 +3642,9 @@ Partial Class PV
|
||||
End Select
|
||||
|
||||
|
||||
ObjFactura.Fech1 = Now
|
||||
ObjFactura.Fech2 = Now
|
||||
ObjFactura.Fech3 = Now
|
||||
ObjFactura.Fech1 = NowADS()
|
||||
ObjFactura.Fech2 = NowADS()
|
||||
ObjFactura.Fech3 = NowADS()
|
||||
ObjFactura.Alfa1 = ""
|
||||
ObjFactura.Alfa2 = ""
|
||||
ObjFactura.Alfa3 = ""
|
||||
@@ -3659,7 +3659,7 @@ Partial Class PV
|
||||
ObjFactura.CveContrato = If(CveContrato > 0, CveContrato, CvePresupuesto)
|
||||
ObjFactura.CveClienteSucursal = DdlSucursalCliente.SelectedValue.ToEntero
|
||||
ObjFactura.Entrega = Entrega
|
||||
ObjFactura.Vigencia = Now
|
||||
ObjFactura.Vigencia = NowADS()
|
||||
|
||||
ObjFactura.CveVentaPadre = If(CveDevolucion > 0, CveDevolucion, CvePedido)
|
||||
ObjFactura.CveVendedor = DdlVendedor.SelectedValue.ToEntero
|
||||
@@ -3667,7 +3667,7 @@ Partial Class PV
|
||||
DdlVendedor.Enabled = False
|
||||
End If
|
||||
|
||||
ObjFactura.FechaEjecucion = Now
|
||||
ObjFactura.FechaEjecucion = NowADS()
|
||||
|
||||
ObjFactura.CveSucursalEjecucion = DdlSubProyectoDatos.SelectedValue.ToEntero
|
||||
ObjFactura.CveSucursalCobranza = -1
|
||||
@@ -4535,7 +4535,7 @@ Partial Class PV
|
||||
End If
|
||||
|
||||
|
||||
TxtFechaPago.Text = Now.AddDays(PlazoCobranza).ToShortDateString
|
||||
TxtFechaPago.Text = NowADS().AddDays(PlazoCobranza).ToShortDateString
|
||||
|
||||
TabAlmacen.Enabled = DdlTipoComprobante.SelectedValue <> "Ant"
|
||||
|
||||
@@ -4857,7 +4857,7 @@ Partial Class PV
|
||||
DivRecepcionUsados.Visible = False
|
||||
|
||||
DdlMarca.SelectedValueExist("-1")
|
||||
TxtFechaVigencia.Text = Now.ToString("dd/MM/yyyy")
|
||||
TxtFechaVigencia.Text = NowADS().ToString("dd/MM/yyyy")
|
||||
|
||||
LimpiaAjuste()
|
||||
|
||||
@@ -5289,7 +5289,7 @@ Partial Class PV
|
||||
Return False
|
||||
End If
|
||||
|
||||
If TxtFechaAjuste.Text.ToDate > Now Then
|
||||
If TxtFechaAjuste.Text.ToDate > NowADS() Then
|
||||
Alert("La fecha de compra no puede ser mayor a la de hoy.", TipoMensaje.MsgAdvertencia)
|
||||
Return False
|
||||
End If
|
||||
@@ -5433,7 +5433,7 @@ Partial Class PV
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If TxtAnioVehiculo.Text.ToDecimal() > Now.Year Then
|
||||
If TxtAnioVehiculo.Text.ToDecimal() > NowADS().Year Then
|
||||
Alert("El campo año no puede ser mayor al año actual.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
@@ -6086,16 +6086,16 @@ Partial Class PV
|
||||
|
||||
Select Case RBLPago.SelectedValue.ToEntero
|
||||
Case 1 'CREDITO
|
||||
TxtFechaPago.Text = Now.AddDays(PlazoCobranza).ToShortDateString
|
||||
TxtFechaPago.Text = NowADS().AddDays(PlazoCobranza).ToShortDateString
|
||||
Case 2 'CONTADO
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant") Then
|
||||
DivContado.Visible = True
|
||||
TxtImporteContado.Text = TxtTotal.Text
|
||||
End If
|
||||
TxtFechaPago.Text = Now.ToShortDateString
|
||||
TxtFechaPago.Text = NowADS().ToShortDateString
|
||||
Case 3 ' TERMINAL
|
||||
DivTerminal.Visible = True
|
||||
TxtFechaPago.Text = Now.AddDays(PlazoCobranza).ToShortDateString
|
||||
TxtFechaPago.Text = NowADS().AddDays(PlazoCobranza).ToShortDateString
|
||||
End Select
|
||||
|
||||
LimpiaContado()
|
||||
@@ -6989,7 +6989,7 @@ Partial Class PV
|
||||
DdlRecepcionUsados.DataSource = DtTamanios
|
||||
GvRecepcionUsadosModal.DataSource = DtTamanios
|
||||
|
||||
TxtFechaVigencia.Text = Now.ToString("dd/MM/yyyy")
|
||||
TxtFechaVigencia.Text = NowADS().ToString("dd/MM/yyyy")
|
||||
|
||||
DdlTipoUso.DataBind()
|
||||
DdlTipoDefecto.DataBind()
|
||||
@@ -7084,8 +7084,8 @@ Partial Class PV
|
||||
DdlTipoUso.SelectedIndex = -1
|
||||
TxtCodLinea.Text = ""
|
||||
'TxtPrecio.Text = ""
|
||||
TxtFechaAjuste.Text = Now.ToShortDateString
|
||||
CEEFechaAjuste.EndDate = Now
|
||||
TxtFechaAjuste.Text = NowADS().ToShortDateString
|
||||
CEEFechaAjuste.EndDate = NowADS()
|
||||
TxtCodInspeccion.Text = ""
|
||||
TxtMesesUso.Text = ""
|
||||
DdlTipoDefecto.SelectedIndex = -1
|
||||
@@ -7167,7 +7167,7 @@ Partial Class PV
|
||||
'End Sub
|
||||
|
||||
Private Function CalculaMesesUso() As Boolean
|
||||
Dim FechaI As Date = Now
|
||||
Dim FechaI As Date = NowADS()
|
||||
|
||||
If IsDate(TxtFechaAjuste.Text) Then
|
||||
FechaI = TxtFechaAjuste.Text.ToDate.AddDays(1)
|
||||
@@ -7177,7 +7177,7 @@ Partial Class PV
|
||||
Return False
|
||||
End If
|
||||
|
||||
Dim FechaF As Date = Now
|
||||
Dim FechaF As Date = NowADS()
|
||||
|
||||
If FechaI.AddDays(-1) > FechaF Then
|
||||
TxtMesesUso.Text = ""
|
||||
@@ -7686,7 +7686,7 @@ Partial Class PV
|
||||
|
||||
Dim Total As Decimal = ((Cantidad * PU) - Descuento).RoundSQL(2)
|
||||
Dim TipoServicio As Integer = DdlTipoServicio.SelectedValue.ToEntero()
|
||||
Dim FechaUsado As DateTime = If(TxtFechaVigencia.Text.ToDateTime() < MinFecha, Now, TxtFechaVigencia.Text.ToDateTime())
|
||||
Dim FechaUsado As DateTime = If(TxtFechaVigencia.Text.ToDateTime() < MinFecha, NowADS(), TxtFechaVigencia.Text.ToDateTime())
|
||||
Dim CveModeloAuto As Integer = DdlModeloAuto.SelectedValue.ToEntero()
|
||||
Dim AnioVehiculo As Integer = TxtAnioVehiculo.Text.ToEntero()
|
||||
Dim TipoPoliza As Integer = 1 'VENTA
|
||||
@@ -8162,7 +8162,7 @@ Partial Class PV
|
||||
|
||||
''Informacion de Garantia o ajuste
|
||||
'params.Add(New ReportParameter("FechaInst", TxtFechaAjuste.Text.Trim))
|
||||
'params.Add(New ReportParameter("Fecha", Now.ToShortDateString))
|
||||
'params.Add(New ReportParameter("Fecha", NowADS().ToShortDateString))
|
||||
'params.Add(New ReportParameter("Defecto", If(DdlTipoDefecto.SelectedValue.ToEntero = -1, "", DdlTipoDefecto.SelectedItem.Text)))
|
||||
'params.Add(New ReportParameter("MesesUso", TxtMesesUso.Text.Trim))
|
||||
'params.Add(New ReportParameter("PorcentajeAjuste", TxtPorcentajeAjuste.Text.Trim))
|
||||
@@ -8222,7 +8222,7 @@ Partial Class PV
|
||||
Dim URLDescarga As New StringBuilder
|
||||
|
||||
URLDescarga.Append($"OP=AJUSTE&CVEPSAJUSTE={DdlPSAjuste.SelectedValue.ToEntero}&CVECLIENTE={CveCliente}&CVECLIENTEDISTRIBUIDOR={DdlDistribuidor.SelectedValue.ToEntero()}&CONSEC={TxtConsecutivoAjuste.Text.Trim}")
|
||||
URLDescarga.Append($"&FOLIOGARANTIA={If(DdlFolioGarantia.SelectedValue.ToEntero = -1, "", DdlFolioGarantia.SelectedItem.Text)}&FECHAAJUSTE={TxtFechaAjuste.Text.Trim}&FECHARECLAMACION={Now.ToString("dd/MM/yyyy")}")
|
||||
URLDescarga.Append($"&FOLIOGARANTIA={If(DdlFolioGarantia.SelectedValue.ToEntero = -1, "", DdlFolioGarantia.SelectedItem.Text)}&FECHAAJUSTE={TxtFechaAjuste.Text.Trim}&FECHARECLAMACION={NowADS().ToString("dd/MM/yyyy")}")
|
||||
URLDescarga.Append($"&TIPODEFECTO={If(DdlTipoDefecto.SelectedValue.ToEntero = -1, "", DdlTipoDefecto.SelectedItem.Text)}&CVETIPOUSO={DdlTipoUso.SelectedValue.ToEntero()}&CODIGOENSAMBLE={TxtCodEnsamble.Text.Trim}&CODIGOLINEA={TxtCodLinea.Text.Trim}")
|
||||
URLDescarga.Append($"&CODIGOINSPECCION={TxtCodInspeccion.Text.Trim}&PORCENTAJEAJUSTE={TxtPorcentajeAjuste.Text.Trim}&BCIAJUSTE={DdlBCIAjuste.SelectedItem.Text}&ETIQUETA={TxtEtiqueta.Text.Trim}&AÑO={TxtAnioVehiculo.Text}&COMPROBANTE={TxtComprobante.Text}")
|
||||
URLDescarga.Append($"&MODELOAUTO={If(DdlPS.SelectedValue.ToEntero > 0, DtModelosAuto.FiltroPrimeroValor("Modelo", $"CveModeloAuto ={DdlModeloAuto.SelectedValue}"), "")}&MARCAAUTO={If(DdlPS.SelectedValue.ToEntero > 0, DtModelosAuto.FiltroPrimeroValor("Marca", $"CveModeloAuto ={DdlModeloAuto.SelectedValue}"), "")}&CODIGOTD={TxtCodigoTD.Text.Trim}")
|
||||
|
||||
@@ -17,7 +17,7 @@ Partial Class PopUpBuscarFolio
|
||||
|
||||
CType(Me.Master, BaseMasterPage).EsPopup = True
|
||||
CType(Me.Master, BaseMasterPage).PopupWidth = 800
|
||||
txtFechaI.Text = Now.AddMonths(-12).ToShortDateString
|
||||
txtFechaI.Text = NowADS().AddMonths(-12).ToShortDateString
|
||||
'RegistraScript("$get('tdContenido').style.height='500px'")
|
||||
CargaSubProyectos()
|
||||
CargaEstatus()
|
||||
|
||||
@@ -318,8 +318,8 @@ Partial Class Bancos_ProductosFinancieros
|
||||
If CveIE > 0 Then
|
||||
|
||||
'MOVIMIENTOS PREPOLIZA
|
||||
'If ObjMov.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovto, Importe, "", DdlTipoMovimiento.SelectedValue.ToEntero, TxtConcepto.Text.Trim, Now, 0, -1, CveIE) Then
|
||||
' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Importe, "", 30, TxtConcepto.Text.Trim, Now, 0, -1, CveIE) Then
|
||||
'If ObjMov.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovto, Importe, "", DdlTipoMovimiento.SelectedValue.ToEntero, TxtConcepto.Text.Trim, NowADS(), 0, -1, CveIE) Then
|
||||
' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Importe, "", 30, TxtConcepto.Text.Trim, NowADS(), 0, -1, CveIE) Then
|
||||
' ErrorTransaccion = True
|
||||
' End If
|
||||
'Else
|
||||
|
||||
@@ -202,7 +202,7 @@ Partial Class ProductosyServicios
|
||||
|
||||
ChkEstado.Enabled = False
|
||||
ChkEstado.Checked = True
|
||||
LblFechaCaptura.Text = Now.ToShortDateString()
|
||||
LblFechaCaptura.Text = NowADS().ToShortDateString()
|
||||
LblUsuarioCapturo.Text = UsuarioActual.Usuario
|
||||
BtnEliminar.Visible = False
|
||||
|
||||
@@ -2644,7 +2644,7 @@ Partial Class ProductosyServicios
|
||||
|
||||
Dim ObjEcommerce As New ClsECommerce
|
||||
For Each FileItem As Archivo In FilesGral
|
||||
Archivo = DateTime.Now.Ticks.ToString
|
||||
Archivo = NowADS().Ticks.ToString
|
||||
Try
|
||||
FileMove = FileItem.filename
|
||||
DirectorioTemporal = $"{AppDomain.CurrentDomain.BaseDirectory}Temp\{FileMove}"
|
||||
|
||||
@@ -146,8 +146,8 @@ Partial Class Ventas_Promociones
|
||||
'DdlCliente.Items.Insert(0, New ListItem("todos", "-1"))
|
||||
DdlClientes.setEsWebService(True)
|
||||
|
||||
TxtFechaI.Text = Now.FirstDayOfMonth.ToShortDateString
|
||||
TxtFechaF.Text = Now.LastDayOfMonth.ToShortDateString
|
||||
TxtFechaI.Text = NowADS().FirstDayOfMonth.ToShortDateString
|
||||
TxtFechaF.Text = NowADS().LastDayOfMonth.ToShortDateString
|
||||
|
||||
If ObjPS.GetMarcas(UsuarioActual.CveEmpresa) Then
|
||||
DdlMarca.DataSource = ObjPS.DtResultados
|
||||
@@ -414,8 +414,8 @@ Partial Class Ventas_Promociones
|
||||
If ChkRestricciones.Checked Then
|
||||
Dr("AplicaRestriccionTexto") = "Si"
|
||||
Dr("AplicaRestriccion") = True
|
||||
Dr("HoraInicio") = Now.ToShortDateString.ToDate.AddHours(TxtHoraInicio.Text.Trim.Substring(0, 2).ToEntero).AddMinutes(TxtHoraInicio.Text.Trim.Substring(2, 2).ToEntero)
|
||||
Dr("HoraFin") = Now.ToShortDateString.ToDate.AddHours(TxtHoraFin.Text.Trim.Substring(0, 2).ToEntero).AddMinutes(TxtHoraFin.Text.Trim.Substring(2, 2).ToEntero)
|
||||
Dr("HoraInicio") = NowADS().ToShortDateString.ToDate.AddHours(TxtHoraInicio.Text.Trim.Substring(0, 2).ToEntero).AddMinutes(TxtHoraInicio.Text.Trim.Substring(2, 2).ToEntero)
|
||||
Dr("HoraFin") = NowADS().ToShortDateString.ToDate.AddHours(TxtHoraFin.Text.Trim.Substring(0, 2).ToEntero).AddMinutes(TxtHoraFin.Text.Trim.Substring(2, 2).ToEntero)
|
||||
Dr("AplicaLunes") = ChkLunes.Checked
|
||||
Dr("AplicaMartes") = ChkMartes.Checked
|
||||
Dr("AplicaMiercoles") = ChkMiercoles.Checked
|
||||
|
||||
@@ -5,7 +5,7 @@ Partial Class Ventas_PuntoVenta
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
If Request("PV_CveUsuario") Is Nothing Then
|
||||
Dim fe As String = Now().ToString("dd-MM-yyyy HH:mm:ss")
|
||||
Dim fe As String = NowADS().ToString("dd-MM-yyyy HH:mm:ss")
|
||||
Dim fi As String = encriptarHEX("AD_SISTEMAS_PV_" + fe)
|
||||
|
||||
Response.Redirect(String.Format("/Ventas/PuntoVenta.aspx?PV_CveUsuario={0}&PV_fe={1}&PV_fi={2}", UsuarioActual.CveUsuario, fe, fi))
|
||||
|
||||
@@ -145,7 +145,7 @@ public partial class Ventas_RepAnticipo_NC_IXC : ClsPaginas
|
||||
List<ReportParameter> para = new List<ReportParameter>();
|
||||
para.Add(new ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa));
|
||||
para.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre));
|
||||
para.Add(new ReportParameter("FechaImpresion", DateTime.Now.ToString()));
|
||||
para.Add(new ReportParameter("FechaImpresion", NowADS().ToString()));
|
||||
para.Add(new ReportParameter("AgrupadoPor", $"<b>Agrupado Por:</b> {Cliente}{Sucursal}{FechaI}{FechaF}{FechaICorte}{FechaFCorte}"));
|
||||
if (Imagen.Exists)
|
||||
{
|
||||
@@ -211,7 +211,7 @@ public partial class Ventas_RepAnticipo_NC_IXC : ClsPaginas
|
||||
if (TipoCambio == 3)
|
||||
{
|
||||
LiEspecifico.Visible = true;
|
||||
TCEspecifico = get_GlobalTipoCambio(DateTime.Now).ToString().ToDouble();
|
||||
TCEspecifico = get_GlobalTipoCambio(NowADS()).ToString().ToDouble();
|
||||
TxtEspecifico.Text = TCEspecifico.ToString();
|
||||
}else
|
||||
{
|
||||
|
||||
@@ -64,8 +64,8 @@ public partial class Ventas_RepAnticipo_NC_IXCDetalle : ClsPaginas
|
||||
DdlSucursal.SelectedValueExist(Request["CveSubProyecto"] == null ? "-1" : Request["CveSubProyecto"].ToString());
|
||||
DdlTipo.SelectedValueExist(Request["Tipo"] == null ? "-1" : Request["Tipo"].ToString());
|
||||
CveMoneda = Request["CveMoneda"] == null ? -1 : Request["CveMoneda"].ToString().ToEntero();
|
||||
txtFechaI.Text = Request["FechaI"] == null ? DateTime.Now.ToString() : Request["FechaI"].ToString();
|
||||
txtFechaF.Text = Request["FechaF"] == null ? DateTime.Now.ToString() : Request["FechaF"].ToString();
|
||||
txtFechaI.Text = Request["FechaI"] == null ? NowADS().ToString() : Request["FechaI"].ToString();
|
||||
txtFechaF.Text = Request["FechaF"] == null ? NowADS().ToString() : Request["FechaF"].ToString();
|
||||
TipoCambio = Request["TipoCambio"] == null ? 1 : Request["TipoCambio"].ToString().ToEntero();
|
||||
TCEspecifico = Request["TCEspecifico"] == null ? -1 : Request["TCEspecifico"].ToString().ToDouble();
|
||||
DdlConSaldo.SelectedValueExist(Request["ConSaldo"] == null ? "-1" : Request["ConSaldo"].ToString());
|
||||
@@ -140,7 +140,7 @@ public partial class Ventas_RepAnticipo_NC_IXCDetalle : ClsPaginas
|
||||
ObjVenta.Dispose();
|
||||
GvDatos.DataBind();
|
||||
UpDatos.Update();
|
||||
if (TxtFechaFCorte.Text != DateTime.Now.ToShortDateString() && txtFechaI.Text != "") { LnkHabilitarSaldar.Visible = false; LnkSaldar.Visible = false; } else { LnkHabilitarSaldar.Visible = true; }
|
||||
if (TxtFechaFCorte.Text != NowADS().ToShortDateString() && txtFechaI.Text != "") { LnkHabilitarSaldar.Visible = false; LnkSaldar.Visible = false; } else { LnkHabilitarSaldar.Visible = true; }
|
||||
if (LnkSaldar.Visible) { HabilitarCheckbox(); }
|
||||
Tipo = DdlTipo.SelectedValue.ToEntero();
|
||||
}
|
||||
@@ -185,7 +185,7 @@ public partial class Ventas_RepAnticipo_NC_IXCDetalle : ClsPaginas
|
||||
List<ReportParameter> para = new List<ReportParameter>();
|
||||
para.Add(new ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa));
|
||||
para.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre));
|
||||
para.Add(new ReportParameter("FechaImpresion", DateTime.Now.ToString()));
|
||||
para.Add(new ReportParameter("FechaImpresion", NowADS().ToString()));
|
||||
para.Add(new ReportParameter("Tipo", Tipo.ToString()));
|
||||
para.Add(new ReportParameter("AgrupadoPor", $"<b>Agrupado Por:</b> {Cliente}{Sucursal}{ConSaldo}{Tipo2}{FechaI}{FechaF}{FechaICorte}{FechaFCorte}"));
|
||||
if (Imagen.Exists)
|
||||
@@ -427,7 +427,7 @@ public partial class Ventas_RepAnticipo_NC_IXCDetalle : ClsPaginas
|
||||
if (TipoCambio == 3)
|
||||
{
|
||||
LiEspecifico.Visible = true;
|
||||
TCEspecifico = get_GlobalTipoCambio(DateTime.Now).ToString().ToDouble();
|
||||
TCEspecifico = get_GlobalTipoCambio(NowADS()).ToString().ToDouble();
|
||||
TxtEspecifico.Text = TCEspecifico.ToString();
|
||||
}
|
||||
else
|
||||
|
||||
@@ -35,8 +35,8 @@ Partial Class Ventas_RepAnticiposEspeciales
|
||||
End Sub
|
||||
|
||||
Private Sub Cargadatos()
|
||||
TxtFechaI.Text = FirstDayOfMonth(Now).ToShortDateString
|
||||
TxtFechaF.Text = Now.LastDayOfMonth.ToShortDateString
|
||||
TxtFechaI.Text = FirstDayOfMonth(NowADS()).ToShortDateString
|
||||
TxtFechaF.Text = NowADS().LastDayOfMonth.ToShortDateString
|
||||
|
||||
DdlSucursal.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||
DdlSucursal.DataBind()
|
||||
|
||||
@@ -50,7 +50,7 @@ Partial Class Ventas_RepAuxiliarFacturas
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
txtFechaI.Text = String.Format("01{0:/MM/yyyy}", DateTime.Now)
|
||||
txtFechaI.Text = String.Format("01{0:/MM/yyyy}", NowADS())
|
||||
CargaCombos()
|
||||
End If
|
||||
End Sub
|
||||
@@ -197,7 +197,7 @@ Partial Class Ventas_RepAuxiliarFacturas
|
||||
#End Region
|
||||
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
|
||||
GvDatos.ExportToExcel("RepAuxiliarFacturas" & Now.ToShortDateString)
|
||||
GvDatos.ExportToExcel("RepAuxiliarFacturas" & NowADS().ToShortDateString)
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkPdf_Click(sender As Object, e As EventArgs) Handles LnkPdf.Click
|
||||
@@ -231,7 +231,7 @@ Partial Class Ventas_RepAuxiliarFacturas
|
||||
params.Add(New ReportParameter("FechaFin", If(txtFechaF.Text <> "", FechaF.ToShortDateString, "")))
|
||||
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", $"{Cliente}{FechaInicio}{FechaFin}{Clasificacion}{PS}{Proyecto}{Estatus}"))
|
||||
params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
ImprimirPDF("Empresas/Grales/Formatos/RepAuxiliarFacturas.rdlc", DtVentas, params, "ReporteAuxiliarFacturas")
|
||||
|
||||
@@ -210,7 +210,7 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
||||
CveMotivoCancelacion = get_GlobalDTMotivosCancelacionEmpresa(UsuarioActual.CveEmpresa, CveSATMotivoCancelacion: 2).FiltroPrimeroValor("CveMotivoCancelacion").ToEntero();
|
||||
}
|
||||
|
||||
var respCancelacion = CancelarDocumento(CveVenta, -1, CveCliente, Folio, Uuid, "", DateTime.Now, TipoDocto, Total.ToDouble(), UsuarioActual.Empresa.CvePAC, EsRefacturacion: true, FolioSustitucion: FolioSustitucion, CveEstatusRefacturacion: CveEstatusRefacturacion, CveMotivoCancelacion: CveMotivoCancelacion);
|
||||
var respCancelacion = CancelarDocumento(CveVenta, -1, CveCliente, Folio, Uuid, "", NowADS(), TipoDocto, Total.ToDouble(), UsuarioActual.Empresa.CvePAC, EsRefacturacion: true, FolioSustitucion: FolioSustitucion, CveEstatusRefacturacion: CveEstatusRefacturacion, CveMotivoCancelacion: CveMotivoCancelacion);
|
||||
|
||||
if (!respCancelacion.HuboError)
|
||||
{
|
||||
@@ -317,7 +317,7 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
||||
var sb = new StringBuilder();
|
||||
|
||||
string CancelacionAcuse = "";
|
||||
DateTime CancelacionFecha = DateTime.Now;
|
||||
DateTime CancelacionFecha = NowADS();
|
||||
int CveEstatus = 4;
|
||||
|
||||
try
|
||||
@@ -841,7 +841,7 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
||||
|
||||
// if (CveVenta > 0 && FolioSustitucion != "")
|
||||
// {
|
||||
// var respCancelacion = CancelarDocumento(CveVenta, -2, CveCliente, "", FolioSustitucion, "", DateTime.Now, TipoDocto, Total.ToDouble(), UsuarioActual.Empresa.CvePAC, EsRefacturacion: true, FolioSustitucion: "", CveEstatusRefacturacion: 4, CveMotivoCancelacion: CveMotivoCancelacion);
|
||||
// var respCancelacion = CancelarDocumento(CveVenta, -2, CveCliente, "", FolioSustitucion, "", NowADS(), TipoDocto, Total.ToDouble(), UsuarioActual.Empresa.CvePAC, EsRefacturacion: true, FolioSustitucion: "", CveEstatusRefacturacion: 4, CveMotivoCancelacion: CveMotivoCancelacion);
|
||||
|
||||
// if (!respCancelacion.HuboError)
|
||||
// {
|
||||
|
||||
@@ -33,8 +33,8 @@ Partial Class Compras_RepCancelacionesVentas
|
||||
#Region " INICIALIZA VALORES "
|
||||
Private Sub InicializaValores()
|
||||
|
||||
TxtFiltrosFechaInicio.Text = Now.FirstDayOfMonth.ToShortDateString
|
||||
TxtFiltrosFechaFin.Text = Now.ToShortDateString
|
||||
TxtFiltrosFechaInicio.Text = NowADS().FirstDayOfMonth.ToShortDateString
|
||||
TxtFiltrosFechaFin.Text = NowADS().ToShortDateString
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -23,11 +23,11 @@ Partial Class Ventas_RepComisiones
|
||||
#Region " INICIALIZA VALORES "
|
||||
|
||||
Private Sub InicializaValores()
|
||||
txtFechaI.Text = FirstDayOfMonth(Now).ToShortDateString
|
||||
txtFechaF.Text = Now.LastDayOfMonth.ToShortDateString
|
||||
txtFechaI.Text = FirstDayOfMonth(NowADS()).ToShortDateString
|
||||
txtFechaF.Text = NowADS().LastDayOfMonth.ToShortDateString
|
||||
|
||||
TxtAnio.Text = Now.Year.ToString()
|
||||
DdlMes.SelectedValueExist(Now.Month)
|
||||
TxtAnio.Text = NowADS().Year.ToString()
|
||||
DdlMes.SelectedValueExist(NowADS().Month)
|
||||
|
||||
DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa)
|
||||
DdlVendedor.DataBind()
|
||||
@@ -200,7 +200,7 @@ Partial Class Ventas_RepComisiones
|
||||
|
||||
#Region " EXCEL "
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
|
||||
GvDatos.ExportToExcel("ReporteComisiones_" & Now.ToShortDateString)
|
||||
GvDatos.ExportToExcel("ReporteComisiones_" & NowADS().ToShortDateString)
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
@@ -17,8 +17,8 @@ Partial Class Ventas_RepComisionesDetalle
|
||||
#Region " INICIALIZA VALORES "
|
||||
|
||||
Private Sub InicializaValores()
|
||||
txtFechaI.Text = FirstDayOfMonth(Now).ToShortDateString
|
||||
txtFechaF.Text = Now.LastDayOfMonth.ToShortDateString
|
||||
txtFechaI.Text = FirstDayOfMonth(NowADS()).ToShortDateString
|
||||
txtFechaF.Text = NowADS().LastDayOfMonth.ToShortDateString
|
||||
|
||||
DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa)
|
||||
DdlVendedor.DataBind()
|
||||
@@ -108,7 +108,7 @@ Partial Class Ventas_RepComisionesDetalle
|
||||
|
||||
#Region " EXCEL "
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
|
||||
GvDatos.ExportToExcel("ReporteComisionesDetalle_" & Now.ToShortDateString)
|
||||
GvDatos.ExportToExcel("ReporteComisionesDetalle_" & NowADS().ToShortDateString)
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ Partial Class Ventas_RepComisionesDetallePS
|
||||
|
||||
#Region " EXCEL "
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
|
||||
GvDatos.ExportToExcel("ReporteComisionesDetalle_" & Now.ToShortDateString)
|
||||
GvDatos.ExportToExcel("ReporteComisionesDetalle_" & NowADS().ToShortDateString)
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
@@ -25,8 +25,8 @@ public partial class Ventas_RepComisionesJAM : ClsPaginas
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
InicializaValores();
|
||||
}
|
||||
InicializaValores();
|
||||
}
|
||||
}
|
||||
|
||||
private void InicializaValores()
|
||||
@@ -332,7 +332,7 @@ public partial class Ventas_RepComisionesJAM : ClsPaginas
|
||||
string FechaIn = String.Format("Fecha Inicio: {0} ", txtFechaI.Text);
|
||||
string FechaFn = String.Format("Fecha Fin: {0} ", txtFechaF.Text);
|
||||
|
||||
var lista = new List<CrystalParametro>();
|
||||
var lista = new List<CrystalParametro>();
|
||||
|
||||
lista.Add(new CrystalParametro("Empresa", UsuarioActual.Empresa.Empresa));
|
||||
lista.Add(new CrystalParametro("Filtros", String.Format("{0}{1}{2}{3}{4}{5}", Sucursal, Cliente, Vendedor, FechaIn, FechaFn, TipoSaldo)));
|
||||
|
||||
@@ -17,8 +17,8 @@ public partial class Ventas_RepComisionesJAM2 : ClsPaginas
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
InicializaValores();
|
||||
}
|
||||
InicializaValores();
|
||||
}
|
||||
}
|
||||
|
||||
private void InicializaValores()
|
||||
|
||||
@@ -17,8 +17,8 @@ public partial class Ventas_RepComisionesJAM2Detalle : ClsPaginas
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
InicializaValores();
|
||||
}
|
||||
InicializaValores();
|
||||
}
|
||||
}
|
||||
|
||||
private void InicializaValores()
|
||||
@@ -29,8 +29,8 @@ public partial class Ventas_RepComisionesJAM2Detalle : ClsPaginas
|
||||
DdlVendedor.DataSource = get_GlobalDTVendedores(UsuarioActual.CveEmpresa);
|
||||
DdlVendedor.DataBind();
|
||||
|
||||
DdlSubProyecto.DataSource = get_GlobalDTSubProyectos(-1, CveEmpresa: UsuarioActual.CveEmpresa);
|
||||
DdlSubProyecto.DataBind();
|
||||
DdlSubProyecto.DataSource = get_GlobalDTSubProyectos(-1, CveEmpresa: UsuarioActual.CveEmpresa);
|
||||
DdlSubProyecto.DataBind();
|
||||
|
||||
DdlVendedor.SelectedValueExist(Request["CveVendedor"] == null ? "-1" : Request["CveVendedor"].ToString());
|
||||
DdlSubProyecto.SelectedValueExist(Request["CveSubProyecto"] == null ? "-1" : Request["CveSubProyecto"].ToString());
|
||||
|
||||
@@ -21,8 +21,8 @@ Partial Class Ventas_RepComisionesServec
|
||||
#Region " INICIALIZA VALORES "
|
||||
|
||||
Private Sub InicializaValores()
|
||||
txtFechaI.Text = FirstDayOfMonth(Now).ToShortDateString
|
||||
txtFechaF.Text = Now.LastDayOfMonth.ToShortDateString
|
||||
txtFechaI.Text = FirstDayOfMonth(NowADS()).ToShortDateString
|
||||
txtFechaF.Text = NowADS().LastDayOfMonth.ToShortDateString
|
||||
|
||||
DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa)
|
||||
DdlVendedor.DataBind()
|
||||
@@ -90,7 +90,7 @@ Partial Class Ventas_RepComisionesServec
|
||||
StrFiltro.AppendFormat(" Fecha Inicio: {0}, ", txtFechaI.Text)
|
||||
StrFiltro.AppendFormat(" Fecha Fin: {0}", txtFechaF.Text)
|
||||
|
||||
ExportToExcelG(GvDatos, $"ReporteComisiones{Now.ToString("yyyyMMddhhmmss")}.xlsx", "", UsuarioActual, StrFiltro.ToString, 100, 200)
|
||||
ExportToExcelG(GvDatos, $"ReporteComisiones{NowADS().ToString("yyyyMMddhhmmss")}.xlsx", "", UsuarioActual, StrFiltro.ToString, 100, 200)
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -169,7 +169,7 @@ Partial Class Ventas_RepComisionesServec
|
||||
worksheet.Rows(IndexEndTable + 1).Cells(0).Value = Usuario.Nombre
|
||||
|
||||
worksheet.Rows(IndexEndTable).Cells(3).Value = "Fecha Impresión"
|
||||
worksheet.Rows(IndexEndTable + 1).Cells(3).Value = DateTime.Now.ToString("dd/MM/yyyy")
|
||||
worksheet.Rows(IndexEndTable + 1).Cells(3).Value = NowADS().ToString("dd/MM/yyyy")
|
||||
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", Usuario.Empresa.Ruta))
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@ Partial Class Ventas_RepComisionesServecDetalle
|
||||
StrFiltro.AppendFormat(" Fecha Inicio: {0}, ", txtFechaI.Text)
|
||||
StrFiltro.AppendFormat(" Fecha Fin: {0}", txtFechaF.Text)
|
||||
|
||||
ExportToExcelG(GvDatos, $"ReporteComisiones{Now.ToString("yyyyMMddhhmmss")}.xlsx", "", UsuarioActual, StrFiltro.ToString, 100, 200)
|
||||
ExportToExcelG(GvDatos, $"ReporteComisiones{NowADS().ToString("yyyyMMddhhmmss")}.xlsx", "", UsuarioActual, StrFiltro.ToString, 100, 200)
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -191,7 +191,7 @@ Partial Class Ventas_RepComisionesServecDetalle
|
||||
worksheet.Rows(IndexEndTable + 1).Cells(0).Value = Usuario.Nombre
|
||||
|
||||
worksheet.Rows(IndexEndTable).Cells(8).Value = "Fecha Impresión"
|
||||
worksheet.Rows(IndexEndTable + 1).Cells(8).Value = DateTime.Now.ToString("dd/MM/yyyy")
|
||||
worksheet.Rows(IndexEndTable + 1).Cells(8).Value = NowADS().ToString("dd/MM/yyyy")
|
||||
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", Usuario.Empresa.Ruta))
|
||||
|
||||
|
||||
@@ -22,8 +22,8 @@ public partial class Ventas_RepCostoPromedioVenta : ClsPaginas
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
InicializaValores();
|
||||
{
|
||||
InicializaValores();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ public partial class Ventas_RepCostoPromedioVenta : ClsPaginas
|
||||
if (txtFechaI.Text == "" || txtFechaI.Text == "__/__/____") { FechaI = "-1"; } else { FechaI = $" <b>Fecha Inicial:</b> {txtFechaI.Text}"; }
|
||||
String Proveedor;
|
||||
if (DdlProveedor.SelectedValue != "-1") { Proveedor = $" <b>Proveedor:</b> {DdlProveedor.SelectedText}"; } else { Proveedor = ""; }
|
||||
String SubProyecto;
|
||||
String SubProyecto;
|
||||
if (DdlSubProyecto.SelectedValue != "-1") { SubProyecto = $" <b>SubProyecto:</b> {DdlSubProyecto.SelectedItem.Text}"; } else { SubProyecto = ""; }
|
||||
System.IO.FileInfo Imagen = new System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png");
|
||||
String logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa);
|
||||
|
||||
@@ -66,7 +66,7 @@ Partial Class RepRemisiones
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
e.Row.FCLiteral("LtlFolio").Text = "<a class=""Texto"" target=""_blank"" href=""/Ventas/RepCotizacionesDetalle.aspx?CveVenta=" & e.Row.DBCampo("CveVenta") & """>" & e.Row.FCLiteral("LtlFolio").Text & "</a>"
|
||||
|
||||
If e.Row.DBCampo("FechaVencimiento").ToDate < Now Then
|
||||
If e.Row.DBCampo("FechaVencimiento").ToDate < NowADS() Then
|
||||
' e.Row.Cells(2).CssClass = "danger"
|
||||
e.Row.Cells(2).ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
@@ -135,10 +135,10 @@ Partial Class RepRemisiones
|
||||
params.Add(New ReportParameter("FechaInicio", FechaI))
|
||||
params.Add(New ReportParameter("FechaFin", FechaF))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
|
||||
params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString))
|
||||
params.Add(New ReportParameter("Filtros", StrFiltro.ToString))
|
||||
params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
ImprimirPDF("Empresas/Grales/Formatos/RepCotizaciones.rdlc", DtVentas, params, String.Format("RepCotizaciones-{0}", Now.ToDateTime.ToShortDateString))
|
||||
ImprimirPDF("Empresas/Grales/Formatos/RepCotizaciones.rdlc", DtVentas, params, String.Format("RepCotizaciones-{0}", NowADS().ToDateTime.ToShortDateString))
|
||||
Else
|
||||
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
@@ -151,6 +151,6 @@ Partial Class RepRemisiones
|
||||
End Sub
|
||||
|
||||
Private Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
|
||||
GvDatos.ExportToExcel("Reporte de Coizaciones por Facturar" & Now.ToShortDateString)
|
||||
GvDatos.ExportToExcel("Reporte de Coizaciones por Facturar" & NowADS().ToShortDateString)
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -68,7 +68,7 @@ Partial Class RepRemisionesDetalle
|
||||
#Region "G V - D A T O S "
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DBCampo("FechaVencimiento").ToDate < Now Then
|
||||
If e.Row.DBCampo("FechaVencimiento").ToDate < NowADS() Then
|
||||
' e.Row.Cells(2).CssClass = "danger"
|
||||
e.Row.Cells(2).ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
@@ -97,10 +97,10 @@ Partial Class RepRemisionesDetalle
|
||||
params.Add(New ReportParameter("FechaInicio", FechaI))
|
||||
params.Add(New ReportParameter("FechaFin", FechaF))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
|
||||
params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString))
|
||||
params.Add(New ReportParameter("Filtros", StrFiltro.ToString))
|
||||
params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
ImprimirPDF("Empresas/Grales/Formatos/RepCotizacionesDetalle.rdlc", DtVentas, params, String.Format("RepCotizacionesDetalle-{0}", Now.ToDateTime.ToShortDateString))
|
||||
ImprimirPDF("Empresas/Grales/Formatos/RepCotizacionesDetalle.rdlc", DtVentas, params, String.Format("RepCotizacionesDetalle-{0}", NowADS().ToDateTime.ToShortDateString))
|
||||
Else
|
||||
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
@@ -112,6 +112,6 @@ Partial Class RepRemisionesDetalle
|
||||
|
||||
|
||||
Private Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
|
||||
GvDatos.ExportToExcel("Reporte de Cotizaciones por Facturar Detalle" & Now.ToShortDateString)
|
||||
GvDatos.ExportToExcel("Reporte de Cotizaciones por Facturar Detalle" & NowADS().ToShortDateString)
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -53,8 +53,8 @@ Partial Class RepCotizacionesxFacturar
|
||||
#End Region
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
txtFechaI.Text = Now.ToShortDateString
|
||||
txtFechaF.Text = Now.ToShortDateString
|
||||
txtFechaI.Text = NowADS().ToShortDateString
|
||||
txtFechaF.Text = NowADS().ToShortDateString
|
||||
|
||||
CargaSucursales()
|
||||
CargaCliente()
|
||||
@@ -108,7 +108,7 @@ Partial Class RepCotizacionesxFacturar
|
||||
Else
|
||||
e.Row.FCLiteral("LtlFolio").Text = "<a class=""Texto"" target=""_blank"" href=""/Ventas/Ventas.aspx?CveVenta=" & e.Row.DBCampo("CveVenta") & """>" & e.Row.FCLiteral("LtlFolio").Text & "</a>"
|
||||
|
||||
If e.Row.DBCampo("FechaVencimiento").ToDate < Now Then
|
||||
If e.Row.DBCampo("FechaVencimiento").ToDate < NowADS() Then
|
||||
' e.Row.Cells(2).CssClass = "danger"
|
||||
e.Row.Cells(2).ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
@@ -173,14 +173,14 @@ Partial Class RepCotizacionesxFacturar
|
||||
' params.Add(New ReportParameter("FechaInicio", FechaI))
|
||||
' params.Add(New ReportParameter("FechaFin", FechaF))
|
||||
' params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
' params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
|
||||
' params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString))
|
||||
' params.Add(New ReportParameter("Filtros", StrFiltro.ToString))
|
||||
' If Imagen.Exists Then
|
||||
' params.Add(New ReportParameter("LogoPath", $"file://{Imagen.FullName}"))
|
||||
' Else
|
||||
' params.Add(New ReportParameter("LogoPath", ""))
|
||||
' End If
|
||||
' ImprimirPDF("Empresas/Grales/Formatos/RepRemisiones.rdlc", DtVentas, params, String.Format("ReporteRemisiones-{0}", Now.ToDateTime.ToShortDateString))
|
||||
' ImprimirPDF("Empresas/Grales/Formatos/RepRemisiones.rdlc", DtVentas, params, String.Format("ReporteRemisiones-{0}", NowADS().ToDateTime.ToShortDateString))
|
||||
' Else
|
||||
' Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
|
||||
' End If
|
||||
@@ -191,6 +191,6 @@ Partial Class RepCotizacionesxFacturar
|
||||
End Sub
|
||||
|
||||
'Private Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
|
||||
' GvDatos.ExportToExcel("Reporte de Remisiones por Facturar" & Now.ToShortDateString)
|
||||
' GvDatos.ExportToExcel("Reporte de Remisiones por Facturar" & NowADS().ToShortDateString)
|
||||
'End Sub
|
||||
End Class
|
||||
|
||||
@@ -135,7 +135,7 @@ Partial Class Vta_RepDocumentacionVencidaClientes
|
||||
End If
|
||||
|
||||
If objEDoc.DocumentacionVencidaDinamicaGet(1, -1, CveCliente, -1, UsuarioActual.Empresa.CveEmpresa, DDlDocumentacion.SelectedValue.ToEntero, DDLDocumentacionTipo.SelectedValue.ToEntero,
|
||||
Now, Now, DDLSucursal.SelectedValue.ToEntero, -1, DDLVencidos.SelectedValue.ToEntero,
|
||||
NowADS(), NowADS(), DDLSucursal.SelectedValue.ToEntero, -1, DDLVencidos.SelectedValue.ToEntero,
|
||||
-1, -1, -1, Modulo:=2, GPO:=DdlGpo.SelectedValue.ToEntero, PermiteCredito:=If(ChkPermiteCredito.Checked, 1, -1),
|
||||
FechaVI:=FechaInicio, FechaVF:=FechaFin) Then
|
||||
|
||||
@@ -312,7 +312,7 @@ Partial Class Vta_RepDocumentacionVencidaClientes
|
||||
Dim documento As ExcelFile
|
||||
Dim ws As ExcelWorksheet
|
||||
Dim NombreReporte As String = "REPORTE DE DOCUMENTACIÓN"
|
||||
Dim TextoFecha As String = "Fecha: " & Now.ToString(" dd/MM/yyyy hh:mm:ss tt")
|
||||
Dim TextoFecha As String = "Fecha: " & NowADS().ToString(" dd/MM/yyyy hh:mm:ss tt")
|
||||
documento = New ExcelFile
|
||||
|
||||
ws = documento.Worksheets.Add("ReporteDocumentacion")
|
||||
@@ -371,7 +371,7 @@ Partial Class Vta_RepDocumentacionVencidaClientes
|
||||
|
||||
Response.Clear()
|
||||
Response.ContentType = "application/force-download"
|
||||
Response.AddHeader("content-disposition", "attachment; filename=" & NombreReporte & "_" & Now.ToString("yyyyMMddhhmmss") & ".xlsx")
|
||||
Response.AddHeader("content-disposition", "attachment; filename=" & NombreReporte & "_" & NowADS().ToString("yyyyMMddhhmmss") & ".xlsx")
|
||||
Response.BinaryWrite(bytesInStream)
|
||||
Response.End()
|
||||
memoryStream.Dispose()
|
||||
@@ -381,7 +381,7 @@ Partial Class Vta_RepDocumentacionVencidaClientes
|
||||
'ExportaExcel()
|
||||
|
||||
If DTDatos.Rows.Count > 0 Then
|
||||
GvDocumentos.ExportToExcel("AvanceDocumentacion" & Now.ToString("yyyyMMddhhmmss") & ".xls")
|
||||
GvDocumentos.ExportToExcel("AvanceDocumentacion" & NowADS().ToString("yyyyMMddhhmmss") & ".xls")
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -24,8 +24,8 @@ Partial Class Ventas_RepIndicadoresPorProyecto
|
||||
#Region " INICIALIZA VALORES "
|
||||
|
||||
Private Sub InicializaValores()
|
||||
txtFechaI.Text = FirstDayOfMonth(Now).ToShortDateString
|
||||
txtFechaF.Text = Now.LastDayOfMonth.ToShortDateString
|
||||
txtFechaI.Text = FirstDayOfMonth(NowADS()).ToShortDateString
|
||||
txtFechaF.Text = NowADS().LastDayOfMonth.ToShortDateString
|
||||
CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto)
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -312,14 +312,14 @@ public partial class Ventas_RepLineasAdicionales : ClsPaginas
|
||||
}
|
||||
|
||||
protected void LnkDescargaExcel_Click(object sender, EventArgs e)
|
||||
{
|
||||
{
|
||||
if(TipoLinea == 1)
|
||||
{
|
||||
GridView gvTemp = GvLineasAdicionales;
|
||||
//gvTemp.ExportToExcelX("RepLineasAdicionales" + NowADS().ToShortDateString());
|
||||
gvTemp.ExportToExcelGembox("RepLineasAdicionales", UsuarioActual, "Rep Lineas Adicionales", AnchoImagen: 150);
|
||||
}
|
||||
else if(TipoLinea == 2)
|
||||
else if(TipoLinea == 2)
|
||||
{
|
||||
GridView gvTemp = GvLAPO;
|
||||
gvTemp.Columns[12].Visible = false;
|
||||
|
||||
@@ -129,7 +129,7 @@ public partial class Ventas_RepNCxAplicar : ClsPaginas
|
||||
|
||||
@params.Add(new ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa));
|
||||
@params.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre));
|
||||
@params.Add(new ReportParameter("FechaImpresion", DateTime.Now.ToString()));
|
||||
@params.Add(new ReportParameter("FechaImpresion", NowADS().ToString()));
|
||||
|
||||
@params.Add(new ReportParameter("Filtros", $"{Sucursal}{Cliente}{FechaI}{FechaF}{Saldo}"));
|
||||
//@params.Add(new ReportParameter("Sucursal", DdlSucursal.SelectedItem.Text));
|
||||
|
||||
@@ -47,10 +47,10 @@ Partial Class Ventas_RepPS
|
||||
End If
|
||||
End Sub
|
||||
Private Sub CargaDatosIniciales()
|
||||
txtFechaI.Text = $"01/{Now.Month}/{Now.Year}"
|
||||
txtFechaF.Text = Now.ToString("dd/MM/yyyy")
|
||||
txtFechaI.Text = $"01/{NowADS().Month}/{NowADS().Year}"
|
||||
txtFechaF.Text = NowADS().ToString("dd/MM/yyyy")
|
||||
|
||||
TxtFechaConsulta.Text = Now.ToString("dd/MM/yyyy")
|
||||
TxtFechaConsulta.Text = NowADS().ToString("dd/MM/yyyy")
|
||||
End Sub
|
||||
|
||||
Private Sub CargaCombos()
|
||||
@@ -159,7 +159,7 @@ Partial Class Ventas_RepPS
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
|
||||
GvDatos.ExportToExcel("ReporteProductosServicios" & Now.ToShortDateString)
|
||||
GvDatos.ExportToExcel("ReporteProductosServicios" & NowADS().ToShortDateString)
|
||||
End Sub
|
||||
Private Sub GenerarPDF()
|
||||
Dim FechaI, FechaF As Date
|
||||
@@ -178,7 +178,7 @@ Partial Class Ventas_RepPS
|
||||
params.Add(New ReportParameter("FechaFin", If(txtFechaF.Text <> "", FechaF.ToShortDateString, "")))
|
||||
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}", "")))
|
||||
params.Add(New ReportParameter("Parametros", SbParametros.ToString()))
|
||||
|
||||
@@ -440,7 +440,7 @@ Partial Class Ventas_RepPS
|
||||
Dim columnRefFranquiciasResumen As Integer = 6
|
||||
|
||||
'PRM 19
|
||||
worksheet.Cells(IdxRefFranquiciasResumen, columnRefFranquiciasResumen).Value = $"PRM {Now.Year - 1}"
|
||||
worksheet.Cells(IdxRefFranquiciasResumen, columnRefFranquiciasResumen).Value = $"PRM {NowADS().Year - 1}"
|
||||
worksheet.Cells(IdxRefFranquiciasResumen, columnRefFranquiciasResumen + 1).Value = "ALM PS"
|
||||
worksheet.Cells(IdxRefFranquiciasResumen, columnRefFranquiciasResumen + 2).Value = ""
|
||||
worksheet.Cells(IdxRefFranquiciasResumen, columnRefFranquiciasResumen + 3).Value = TotalFranquicias
|
||||
@@ -448,10 +448,10 @@ Partial Class Ventas_RepPS
|
||||
'TOMA EL VALOR DE DIF LLANTAS
|
||||
worksheet.Cells(IdxRefFranquiciasResumen + 1, columnRefFranquiciasResumen).Formula = $"=({worksheet.Cells(IdxMesAnioAnteriorLlantasResumen - 4, 3).Name})"
|
||||
|
||||
worksheet.Cells(IdxRefFranquiciasResumen + 2, columnRefFranquiciasResumen + 1).Value = $"FRANQ {Now.Year}"
|
||||
worksheet.Cells(IdxRefFranquiciasResumen + 2, columnRefFranquiciasResumen + 1).Value = $"FRANQ {NowADS().Year}"
|
||||
worksheet.Cells(IdxRefFranquiciasResumen + 2, columnRefFranquiciasResumen + 2).Value = 4988
|
||||
|
||||
worksheet.Cells(IdxRefFranquiciasResumen + 3, columnRefFranquiciasResumen).Value = $"PRM {Now.Year}"
|
||||
worksheet.Cells(IdxRefFranquiciasResumen + 3, columnRefFranquiciasResumen).Value = $"PRM {NowADS().Year}"
|
||||
worksheet.Cells(IdxRefFranquiciasResumen + 3, columnRefFranquiciasResumen + 1).Value = ""
|
||||
worksheet.Cells(IdxRefFranquiciasResumen + 3, columnRefFranquiciasResumen + 2).Formula = $"=({worksheet.Cells(IdxRefFranquiciasResumen, columnRefFranquiciasResumen + 3).Name} - {worksheet.Cells(IdxRefFranquiciasResumen + 2, columnRefFranquiciasResumen + 2).Name})"
|
||||
worksheet.Cells(IdxRefFranquiciasResumen + 3, columnRefFranquiciasResumen + 3).Formula = $"+({worksheet.Cells(IdxRefFranquiciasResumen + 3, columnRefFranquiciasResumen + 2)})"
|
||||
@@ -488,26 +488,26 @@ Partial Class Ventas_RepPS
|
||||
Dim columnRefAnioResumen As Integer = columnRefFranquiciasResumen + 5
|
||||
|
||||
'AÑO ANTERIOR
|
||||
worksheet.Cells(IdxRefAnioResumen, columnRefAnioResumen).Value = Now.Year - 1
|
||||
worksheet.Cells(IdxRefAnioResumen, columnRefAnioResumen).Value = NowADS().Year - 1
|
||||
Dim CellAnioAnterior = worksheet.Cells(IdxRefAnioResumen, columnRefAnioResumen + 1)
|
||||
CellAnioAnterior.Value = 0
|
||||
|
||||
'AÑO ACTUAL
|
||||
worksheet.Cells(IdxRefAnioResumen + 1, columnRefAnioResumen).Value = Now.Year
|
||||
worksheet.Cells(IdxRefAnioResumen + 1, columnRefAnioResumen).Value = NowADS().Year
|
||||
Dim CellAnioActual = worksheet.Cells(IdxRefAnioResumen + 1, columnRefAnioResumen + 1)
|
||||
CellAnioActual.Value = 0
|
||||
|
||||
worksheet.Cells(IdxRefAnioResumen + 2, columnRefAnioResumen + 1).Formula = $"=({CeldaTotalVentaAcumulada.Name} - {worksheet.Cells(IdxRefAnioResumen, columnRefAnioResumen + 1).Name})"
|
||||
|
||||
worksheet.Cells(IdxRefAnioResumen + 3, columnRefAnioResumen).Value = $"X DIA {Now.Year - 1}"
|
||||
worksheet.Cells(IdxRefAnioResumen + 4, columnRefAnioResumen).Value = $"X DIA {Now.Year}"
|
||||
worksheet.Cells(IdxRefAnioResumen + 3, columnRefAnioResumen).Value = $"X DIA {NowADS().Year - 1}"
|
||||
worksheet.Cells(IdxRefAnioResumen + 4, columnRefAnioResumen).Value = $"X DIA {NowADS().Year}"
|
||||
|
||||
Dim DiasFinMes As Integer = 0
|
||||
|
||||
Dim Day As Integer = Now.Day
|
||||
Dim DaysMonth As Integer = DateTime.DaysInMonth(Now.Year, Now.Month)
|
||||
Dim Month As Integer = Now.Month
|
||||
Dim Year As Integer = Now.Year
|
||||
Dim Day As Integer = NowADS().Day
|
||||
Dim DaysMonth As Integer = DateTime.DaysInMonth(NowADS().Year, NowADS().Month)
|
||||
Dim Month As Integer = NowADS().Month
|
||||
Dim Year As Integer = NowADS().Year
|
||||
|
||||
For i = Day To DaysMonth
|
||||
Dim DayRef As DateTime = New DateTime(Year, Month, i)
|
||||
|
||||
@@ -24,8 +24,8 @@ Partial Class Ventas_RepPUESinPago
|
||||
End Sub
|
||||
|
||||
Private Sub InicializaValores()
|
||||
TxtFechaI.Text = FirstDayOfMonth(Now).ToShortDateString
|
||||
TxtFechaF.Text = Now.LastDayOfMonth.ToShortDateString
|
||||
TxtFechaI.Text = FirstDayOfMonth(NowADS()).ToShortDateString
|
||||
TxtFechaF.Text = NowADS().LastDayOfMonth.ToShortDateString
|
||||
|
||||
DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||
DdlSubProyecto.DataBind()
|
||||
|
||||
@@ -33,9 +33,9 @@ public partial class Ventas_RepPedidos2 : ClsPaginas
|
||||
DdlClientes.SelectedValue = "-1";
|
||||
|
||||
DdlSubProyectos.DataSource = get_GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1);
|
||||
DdlSubProyectos.DataBind();
|
||||
|
||||
DdlVendedor.DataSource = get_GlobalDTVendedores(UsuarioActual.CveEmpresa);
|
||||
DdlSubProyectos.DataBind();
|
||||
|
||||
DdlVendedor.DataSource = get_GlobalDTVendedores(UsuarioActual.CveEmpresa);
|
||||
DdlVendedor.DataBind();
|
||||
if (UsuarioActual.CveVendedor > 0) { DdlVendedor.SelectedValuesIfExistM(UsuarioActual.CveVendedor.ToString()); }
|
||||
|
||||
@@ -60,7 +60,7 @@ public partial class Ventas_RepPedidos2 : ClsPaginas
|
||||
if (DdlVendedor.GetSelectedText() != "") { Vendedores = $" <b>Vendedor:</b> {DdlVendedor.GetSelectedText()}"; } else { Vendedores = ""; }
|
||||
|
||||
if (DtDatos.Rows.Count > 0)
|
||||
{
|
||||
{
|
||||
System.IO.FileInfo Imagen = new System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png");
|
||||
String logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa);
|
||||
List<ReportParameter> para = new List<ReportParameter>();
|
||||
@@ -115,7 +115,7 @@ public partial class Ventas_RepPedidos2 : ClsPaginas
|
||||
ObjVentas.Dispose();
|
||||
GvDatos.DataBind();
|
||||
UpDatos.Update();
|
||||
}
|
||||
}
|
||||
|
||||
protected void GvDatos_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
|
||||
@@ -39,13 +39,13 @@ public partial class Ventas_RepPedidos2Detalle : ClsPaginas
|
||||
DdlClientes.SelectedValue = "-1";
|
||||
|
||||
DdlSubProyectos.DataSource = get_GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1);
|
||||
DdlSubProyectos.DataBind();
|
||||
|
||||
DdlVendedor.DataSource = get_GlobalDTVendedores(UsuarioActual.CveEmpresa);
|
||||
DdlSubProyectos.DataBind();
|
||||
|
||||
DdlVendedor.DataSource = get_GlobalDTVendedores(UsuarioActual.CveEmpresa);
|
||||
DdlVendedor.DataBind();
|
||||
if (UsuarioActual.CveVendedor > 0) { DdlVendedor.SelectedValuesIfExistM(UsuarioActual.CveVendedor.ToString()); }
|
||||
|
||||
txtFechaI.Text = DateTime.Now.ToShortDateString();
|
||||
|
||||
txtFechaI.Text = NowADS().ToShortDateString();
|
||||
txtFechaF.Text = NowADS().AddMonths(1).ToShortDateString();
|
||||
//TxtFechaVencimiento.Text = NowADS().ToShortDateString();
|
||||
|
||||
@@ -76,7 +76,7 @@ public partial class Ventas_RepPedidos2Detalle : ClsPaginas
|
||||
if (DdlVendedor.GetSelectedText() != "") { Vendedores = $" <b>Vendedor:</b> {DdlVendedor.GetSelectedText()}"; } else { Vendedores = ""; }
|
||||
|
||||
if (DtDatos.Rows.Count > 0)
|
||||
{
|
||||
{
|
||||
System.IO.FileInfo Imagen = new System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png");
|
||||
String logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa);
|
||||
List<ReportParameter> para = new List<ReportParameter>();
|
||||
@@ -136,7 +136,7 @@ public partial class Ventas_RepPedidos2Detalle : ClsPaginas
|
||||
ObjVentas.Dispose();
|
||||
GvDatos.DataBind();
|
||||
UpDatos.Update();
|
||||
}
|
||||
}
|
||||
|
||||
protected void GvDatos_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
|
||||
@@ -194,8 +194,8 @@ Partial Class Ventas_RepProductosServicios
|
||||
DdlVendedor.Enabled = False
|
||||
End If
|
||||
|
||||
txtFechaI.Text = Now.FirstDayOfMonth.ToShortDateString
|
||||
txtFechaF.Text = Now.ToShortDateString
|
||||
txtFechaI.Text = NowADS().FirstDayOfMonth.ToShortDateString
|
||||
txtFechaF.Text = NowADS().ToShortDateString
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(339) Then
|
||||
GvDatos.Columns(2).Visible = False
|
||||
@@ -430,7 +430,7 @@ Partial Class Ventas_RepProductosServicios
|
||||
If RblTipoCambio.SelectedValue.ToEntero = 3 Then
|
||||
Dim TipoCambio As Double
|
||||
LiEspecifico.Visible = True
|
||||
TipoCambio = GlobalTipoCambio(Now)
|
||||
TipoCambio = GlobalTipoCambio(NowADS())
|
||||
TxtEspecifico.Text = TipoCambio.ToString
|
||||
Else
|
||||
LiEspecifico.Visible = False
|
||||
@@ -449,7 +449,7 @@ Partial Class Ventas_RepProductosServicios
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
|
||||
GvDatos.ExportToExcel("ReporteProductosServicios" & Now.ToShortDateString)
|
||||
GvDatos.ExportToExcel("ReporteProductosServicios" & NowADS().ToShortDateString)
|
||||
End Sub
|
||||
Private Sub GenerarPDF()
|
||||
Dim FechaI, FechaF, FechaIEjec, FechaFEjec As Date
|
||||
@@ -480,7 +480,7 @@ Partial Class Ventas_RepProductosServicios
|
||||
params.Add(New ReportParameter("FechaFin", If(txtFechaF.Text <> "", FechaF.ToShortDateString, "")))
|
||||
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", $"{Grupo}{Cliente}{FechaInicio}{FechaFin}{Categoria}{Clasificacion}{PS}{Proyecto}{Estatus}{Usuario}{Proveedor}"))
|
||||
params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
ImprimirPDF("Empresas/Grales/Formatos/RepProductosServicios.rdlc", DtVentas, params, "ReportePS")
|
||||
|
||||
@@ -116,8 +116,8 @@ Partial Class Ventas_RepProductosServiciosDetalle
|
||||
End Sub
|
||||
|
||||
Private Sub SetValues()
|
||||
txtFechaI.Text = Now.ToShortDateString
|
||||
txtFechaF.Text = Now.ToShortDateString
|
||||
txtFechaI.Text = NowADS().ToShortDateString
|
||||
txtFechaF.Text = NowADS().ToShortDateString
|
||||
|
||||
'Cargo Categorias
|
||||
DdlCategoria.DataSource = GlobalDTGralCategorias(UsuarioActual.CveEmpresa)
|
||||
@@ -510,7 +510,7 @@ Partial Class Ventas_RepProductosServiciosDetalle
|
||||
If RblTipoCambio.SelectedValue.ToEntero = 3 Then
|
||||
Dim TipoCambioM As Double
|
||||
LiEspecifico.Visible = True
|
||||
TipoCambioM = GlobalTipoCambio(Now)
|
||||
TipoCambioM = GlobalTipoCambio(NowADS())
|
||||
TxtEspecifico.Text = TipoCambioM.ToString
|
||||
Else
|
||||
LiEspecifico.Visible = False
|
||||
@@ -670,7 +670,7 @@ Partial Class Ventas_RepProductosServiciosDetalle
|
||||
|
||||
#Region " EXCEL "
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
|
||||
GvDatos.ExportToExcel("ReporteProductosServicios" & Now.ToShortDateString)
|
||||
GvDatos.ExportToExcel("ReporteProductosServicios" & NowADS().ToShortDateString)
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
@@ -695,7 +695,7 @@ Partial Class Ventas_RepProductosServiciosDetalle
|
||||
params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
|
||||
params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy")))
|
||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
ImprimirPDF("Empresas/Grales/Formatos/RepProductosServiciosDetalle.rdlc", TmpDT, params, "ReportePS")
|
||||
'ImprimirPDF(String.Format("{0}Formatos\RepProductosServicios.rdlc", UsuarioActual.Empresa.Ruta), dtPS, params, "ReporteProductosServicios")
|
||||
@@ -773,7 +773,7 @@ Partial Class Ventas_RepProductosServiciosDetalle
|
||||
Dim Archivo As String = String.Empty
|
||||
Dim HuboInexistentes As Boolean = False
|
||||
Dim SBInexistentes As New StringBuilder : SBInexistentes.Append("No se pudieron anexar los siguientes archivos:<br />")
|
||||
Dim ArchivoDestino As String = String.Format("{0}Temp\{1}.zip", AppDomain.CurrentDomain.BaseDirectory, Now.ToString("yyyyMMddhhmmss") & UsuarioActual.CveUsuario.ToString)
|
||||
Dim ArchivoDestino As String = String.Format("{0}Temp\{1}.zip", AppDomain.CurrentDomain.BaseDirectory, NowADS().ToString("yyyyMMddhhmmss") & UsuarioActual.CveUsuario.ToString)
|
||||
|
||||
Dim archiveZip As ZipArchive = ZipFile.Open(ArchivoDestino, ZipArchiveMode.Create)
|
||||
Dim DTVentas As DataTable = TmpDT.FiltraParametros("", "", {"CveVenta", "TipoDocumento", "Folio", "SerieFolio"})
|
||||
@@ -812,7 +812,7 @@ Partial Class Ventas_RepProductosServiciosDetalle
|
||||
archiveZip.Dispose()
|
||||
Response.Clear()
|
||||
Response.ContentType = "application/zip"
|
||||
Response.AddHeader("content-disposition", $"attachment; filename=facturas{Now.ToString("yyyyMMddhhmmss")}.zip")
|
||||
Response.AddHeader("content-disposition", $"attachment; filename=facturas{NowADS().ToString("yyyyMMddhhmmss")}.zip")
|
||||
Response.TransmitFile(ArchivoDestino)
|
||||
Response.Flush()
|
||||
|
||||
|
||||
@@ -208,7 +208,7 @@ public partial class Ventas_RepProductosServiciosPeriodo : ClsPaginas
|
||||
{
|
||||
CargarSubProyecto(DdlSubProyecto, DdlProyecto.SelectedValue);
|
||||
}
|
||||
|
||||
|
||||
protected void RblTipoCambio_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
TipoCambio = RblTipoCambio.SelectedValue.ToEntero();
|
||||
@@ -338,7 +338,7 @@ public partial class Ventas_RepProductosServiciosPeriodo : ClsPaginas
|
||||
#endregion
|
||||
|
||||
#region REP HP
|
||||
|
||||
|
||||
protected void LnkRepHP_Click(object sender, EventArgs e)
|
||||
{
|
||||
ClsVentas Rep = new ClsVentas();
|
||||
@@ -419,7 +419,7 @@ public partial class Ventas_RepProductosServiciosPeriodo : ClsPaginas
|
||||
string logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa);
|
||||
DataTable dt = DtVentas.FiltraParametros("", "Orden");
|
||||
string FechaI, FechaF;
|
||||
if (txtFechaI.Text == "" || txtFechaI.Text == "__/__/____") { FechaI = "-1"; } else { FechaI = txtFechaI.Text; }
|
||||
if (txtFechaI.Text == "" || txtFechaI.Text == "__/__/____") { FechaI = "-1"; } else { FechaI = txtFechaI.Text; }
|
||||
if (txtFechaF.Text == "" || txtFechaF.Text == "__/__/____") { FechaF = "-1"; } else { FechaF = txtFechaF.Text; }
|
||||
List<ReportParameter> para = new List<ReportParameter>();
|
||||
para.Add(new ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa));
|
||||
@@ -429,7 +429,7 @@ public partial class Ventas_RepProductosServiciosPeriodo : ClsPaginas
|
||||
para.Add(new ReportParameter("FechaImpresion", NowADS().ToShortDateString()));
|
||||
para.Add(new ReportParameter("Filtros", StrFiltro.ToString()));
|
||||
if (Imagen.Exists)
|
||||
{
|
||||
{
|
||||
para.Add(new ReportParameter("LogoPath", logouri));
|
||||
}
|
||||
else
|
||||
|
||||
@@ -146,8 +146,8 @@ Partial Class Ventas_RepRecuperacion
|
||||
DdlClienteClasificacion.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
DdlClienteClasificacion.DataBind()
|
||||
|
||||
txtFechaI.Text = $"01/{Now.Month}/{Now.Year}"
|
||||
txtFechaF.Text = Now.ToShortDateString
|
||||
txtFechaI.Text = $"01/{NowADS().Month}/{NowADS().Year}"
|
||||
txtFechaF.Text = NowADS().ToShortDateString
|
||||
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
@@ -299,10 +299,10 @@ Partial Class Ventas_RepRecuperacion
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
|
||||
params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString))
|
||||
params.Add(New ReportParameter("Filtros", StrFiltro.ToString))
|
||||
params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
ImprimirPDF(RutaPDF, DtDatos, params, String.Format("ReporteRecuperacion-{0}", Now.ToDateTime.ToShortDateString), Formato)
|
||||
ImprimirPDF(RutaPDF, DtDatos, params, String.Format("ReporteRecuperacion-{0}", NowADS().ToDateTime.ToShortDateString), Formato)
|
||||
Else
|
||||
Alert("No hay datos consultados.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
@@ -316,7 +316,7 @@ Partial Class Ventas_RepRecuperacion
|
||||
TipoCambio = RblTipoCambio.SelectedValue.ToEntero
|
||||
If TipoCambio = 3 Then
|
||||
LiEspecifico.Visible = True
|
||||
TCEspecifico = GlobalTipoCambio(Now).ToDecimal
|
||||
TCEspecifico = GlobalTipoCambio(NowADS()).ToDecimal
|
||||
TxtEspecifico.Text = TCEspecifico.ToString
|
||||
Else
|
||||
LiEspecifico.Visible = False
|
||||
|
||||
@@ -356,10 +356,10 @@ Partial Class Ventas_RepRecuperacionDetalle
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
|
||||
params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString))
|
||||
params.Add(New ReportParameter("Filtros", StrFiltro.ToString))
|
||||
params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
ImprimirPDF(RutaPDF, DtDatos, params, String.Format("ReporteRecuperacionDetalle-{0}", Now.ToDateTime.ToShortDateString), Formato)
|
||||
ImprimirPDF(RutaPDF, DtDatos, params, String.Format("ReporteRecuperacionDetalle-{0}", NowADS().ToDateTime.ToShortDateString), Formato)
|
||||
Else
|
||||
Alert("No hay datos consultados.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
@@ -86,8 +86,8 @@ public partial class Ventas_RepRecuperacionPeriodo : ClsPaginas
|
||||
|
||||
DdlClienteClasificacion.Items.Insert(0, new ListItem("Todos", "-1"));
|
||||
DdlClienteClasificacion.DataBind();
|
||||
|
||||
|
||||
|
||||
|
||||
DdlClientes.setEsWebService(true);
|
||||
DdlClientes.Attributes.Add("data-metodo", "getcliente");
|
||||
DdlClientes.SelectedText = "Todos";
|
||||
@@ -115,7 +115,7 @@ public partial class Ventas_RepRecuperacionPeriodo : ClsPaginas
|
||||
if (DdlUsuario.SelectedValue == "-1") { Registro = ""; } else { Registro = $" <b>Registro:</b> {DdlUsuario.SelectedItem.Text}"; }
|
||||
if (DdlResponsable.SelectedValue == "-1") { Responsable = ""; } else { Responsable = $" <b>Responsable:</b> {DdlResponsable.SelectedItem.Text}"; }
|
||||
|
||||
if (DtDatos.Rows.Count > 0)
|
||||
if (DtDatos.Rows.Count > 0)
|
||||
{
|
||||
System.IO.FileInfo Imagen = new System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png");
|
||||
string logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa);
|
||||
@@ -182,7 +182,7 @@ public partial class Ventas_RepRecuperacionPeriodo : ClsPaginas
|
||||
GvDatos.DataBind();
|
||||
UpDatos.Update();
|
||||
}
|
||||
|
||||
|
||||
protected void RblTipoCambio_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
TipoCambio = RblTipoCambio.SelectedValue.ToEntero();
|
||||
|
||||
@@ -122,7 +122,7 @@ Partial Class RepRemisiones
|
||||
e.Row.FCLiteral("LtlFolio").Text = "<a class=""Texto"" target=""_blank"" href=""/Ventas/RepRemisionesDetalle.aspx?CveVenta=" & e.Row.DBCampo("CveVenta") & """>" & e.Row.FCLiteral("LtlFolio").Text & "</a>"
|
||||
e.Row.FCLiteral("LtlFecha").Text = "<a class=""Texto"" target=""_blank"" href=""/Ventas/Ventas.aspx?CveVenta=" & e.Row.DBCampo("CveVenta") & """>" & e.Row.FCLiteral("LtlFecha").Text & "</a>"
|
||||
|
||||
If e.Row.DBCampo("FechaVencimiento").ToDate < Now Then
|
||||
If e.Row.DBCampo("FechaVencimiento").ToDate < NowADS() Then
|
||||
' e.Row.Cells(2).CssClass = "danger"
|
||||
e.Row.Cells(2).ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
@@ -220,11 +220,11 @@ Partial Class RepRemisiones
|
||||
params.Add(New ReportParameter("FechaInicio", FechaI))
|
||||
params.Add(New ReportParameter("FechaFin", FechaF))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
|
||||
params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString))
|
||||
params.Add(New ReportParameter("Filtros", StrFiltro.ToString))
|
||||
|
||||
params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
ImprimirPDF("Empresas/Grales/Formatos/RepRemisiones.rdlc", DtVentas, params, String.Format("ReporteRemisiones-{0}", Now.ToDateTime.ToShortDateString))
|
||||
ImprimirPDF("Empresas/Grales/Formatos/RepRemisiones.rdlc", DtVentas, params, String.Format("ReporteRemisiones-{0}", NowADS().ToDateTime.ToShortDateString))
|
||||
Else
|
||||
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
@@ -237,6 +237,6 @@ Partial Class RepRemisiones
|
||||
End Sub
|
||||
|
||||
Private Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
|
||||
GvDatos.ExportToExcel("Reporte de Remisiones por Facturar" & Now.ToShortDateString)
|
||||
GvDatos.ExportToExcel("Reporte de Remisiones por Facturar" & NowADS().ToShortDateString)
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -67,7 +67,7 @@ Partial Class RepRemisiones
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
e.Row.FCLiteral("LtlFolio").Text = "<a class=""Texto"" target=""_blank"" href=""/Ventas/RepRemisionesDetalle.aspx?CveVenta=" & e.Row.DBCampo("CveVenta") & """>" & e.Row.FCLiteral("LtlFolio").Text & "</a>"
|
||||
|
||||
If e.Row.DBCampo("FechaVencimiento").ToDate < Now Then
|
||||
If e.Row.DBCampo("FechaVencimiento").ToDate < NowADS() Then
|
||||
' e.Row.Cells(2).CssClass = "danger"
|
||||
e.Row.Cells(2).ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
@@ -142,10 +142,10 @@ Partial Class RepRemisiones
|
||||
params.Add(New ReportParameter("FechaInicio", FechaI))
|
||||
params.Add(New ReportParameter("FechaFin", FechaF))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
|
||||
params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString))
|
||||
params.Add(New ReportParameter("Filtros", StrFiltro.ToString))
|
||||
params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
ImprimirPDF("Empresas/Grales/Formatos/RepRemisiones.rdlc", DtVentas, params, String.Format("ReporteRemisiones-{0}", Now.ToDateTime.ToShortDateString))
|
||||
ImprimirPDF("Empresas/Grales/Formatos/RepRemisiones.rdlc", DtVentas, params, String.Format("ReporteRemisiones-{0}", NowADS().ToDateTime.ToShortDateString))
|
||||
Else
|
||||
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
@@ -158,6 +158,6 @@ Partial Class RepRemisiones
|
||||
End Sub
|
||||
|
||||
Private Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
|
||||
GvDatos.ExportToExcel("Reporte de Remisiones por Facturar" & Now.ToShortDateString)
|
||||
GvDatos.ExportToExcel("Reporte de Remisiones por Facturar" & NowADS().ToShortDateString)
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -216,7 +216,7 @@ Partial Class RepRemisionesDetalle
|
||||
#Region "G V - D A T O S "
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DBCampo("FechaVencimiento").ToDate < Now Then
|
||||
If e.Row.DBCampo("FechaVencimiento").ToDate < NowADS() Then
|
||||
' e.Row.Cells(2).CssClass = "danger"
|
||||
e.Row.Cells(2).ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
@@ -249,10 +249,10 @@ Partial Class RepRemisionesDetalle
|
||||
params.Add(New ReportParameter("FechaInicio", FechaI))
|
||||
params.Add(New ReportParameter("FechaFin", FechaF))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
|
||||
params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString))
|
||||
params.Add(New ReportParameter("Filtros", StrFiltro.ToString))
|
||||
params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
ImprimirPDF("Empresas/Grales/Formatos/RepRemisionesDetalle.rdlc", DtVentas, params, String.Format("ReporteRemisionesDetalle-{0}", Now.ToDateTime.ToShortDateString))
|
||||
ImprimirPDF("Empresas/Grales/Formatos/RepRemisionesDetalle.rdlc", DtVentas, params, String.Format("ReporteRemisionesDetalle-{0}", NowADS().ToDateTime.ToShortDateString))
|
||||
Else
|
||||
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
@@ -264,8 +264,8 @@ Partial Class RepRemisionesDetalle
|
||||
|
||||
|
||||
Private Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
|
||||
'GvDatos.ExportToExcel("Reporte de Remisiones por Facturar Detalle" & Now.ToShortDateString)
|
||||
GvDatos.ExportToExcelG("Reporte de Remisiones por Facturar Detalle" & Now.ToShortDateString, Titulo:="Reporte de Remisiones por Facturar Detalle ", Usuario:=UsuarioActual)
|
||||
'GvDatos.ExportToExcel("Reporte de Remisiones por Facturar Detalle" & NowADS().ToShortDateString)
|
||||
GvDatos.ExportToExcelG("Reporte de Remisiones por Facturar Detalle" & NowADS().ToShortDateString, Titulo:="Reporte de Remisiones por Facturar Detalle ", Usuario:=UsuarioActual)
|
||||
End Sub
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
CargaDatos()
|
||||
|
||||
@@ -53,8 +53,8 @@ Partial Class RepRemisionesNC
|
||||
#End Region
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
txtFechaI.Text = Now.ToShortDateString
|
||||
txtFechaF.Text = Now.ToShortDateString
|
||||
txtFechaI.Text = NowADS().ToShortDateString
|
||||
txtFechaF.Text = NowADS().ToShortDateString
|
||||
|
||||
CargaSucursales()
|
||||
CargaCliente()
|
||||
@@ -108,7 +108,7 @@ Partial Class RepRemisionesNC
|
||||
Else
|
||||
e.Row.FCLiteral("LtlFolio").Text = "<a class=""Texto"" target=""_blank"" href=""/Ventas/Ventas.aspx?CveVenta=" & e.Row.DBCampo("CveVenta") & """>" & e.Row.FCLiteral("LtlFolio").Text & "</a>"
|
||||
|
||||
If e.Row.DBCampo("FechaVencimiento").ToDate < Now Then
|
||||
If e.Row.DBCampo("FechaVencimiento").ToDate < NowADS() Then
|
||||
' e.Row.Cells(2).CssClass = "danger"
|
||||
e.Row.Cells(2).ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
@@ -165,14 +165,14 @@ Partial Class RepRemisionesNC
|
||||
' params.Add(New ReportParameter("FechaInicio", FechaI))
|
||||
' params.Add(New ReportParameter("FechaFin", FechaF))
|
||||
' params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
' params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
|
||||
' params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString))
|
||||
' params.Add(New ReportParameter("Filtros", StrFiltro.ToString))
|
||||
' If Imagen.Exists Then
|
||||
' params.Add(New ReportParameter("LogoPath", $"file://{Imagen.FullName}"))
|
||||
' Else
|
||||
' params.Add(New ReportParameter("LogoPath", ""))
|
||||
' End If
|
||||
' ImprimirPDF("Empresas/Grales/Formatos/RepRemisiones.rdlc", DtVentas, params, String.Format("ReporteRemisiones-{0}", Now.ToDateTime.ToShortDateString))
|
||||
' ImprimirPDF("Empresas/Grales/Formatos/RepRemisiones.rdlc", DtVentas, params, String.Format("ReporteRemisiones-{0}", NowADS().ToDateTime.ToShortDateString))
|
||||
' Else
|
||||
' Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
|
||||
' End If
|
||||
@@ -183,6 +183,6 @@ Partial Class RepRemisionesNC
|
||||
End Sub
|
||||
|
||||
'Private Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
|
||||
' GvDatos.ExportToExcel("Reporte de Remisiones por Facturar" & Now.ToShortDateString)
|
||||
' GvDatos.ExportToExcel("Reporte de Remisiones por Facturar" & NowADS().ToShortDateString)
|
||||
'End Sub
|
||||
End Class
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<asp:BoundField HeaderText="Grupo" DataField="GPO" ItemStyle-Width="40%" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:TemplateField ItemStyle-Width="20%">
|
||||
<HeaderTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Now.Year %>'></asp:Literal>
|
||||
<asp:Literal runat="server" Text='<%# NowADS().Year %>'></asp:Literal>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("Anio1", "{0:N2}") %>'></asp:Literal>
|
||||
@@ -30,7 +30,7 @@
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-Width="20%">
|
||||
<HeaderTemplate>
|
||||
<asp:Literal runat="server" Text='<%# (Now.Year - 1) %>'></asp:Literal>
|
||||
<asp:Literal runat="server" Text='<%# (NowADS().Year - 1) %>'></asp:Literal>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("Anio2", "{0:N2}") %>'></asp:Literal>
|
||||
@@ -38,7 +38,7 @@
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-Width="20%">
|
||||
<HeaderTemplate>
|
||||
<asp:Literal runat="server" Text='<%# (Now.Year - 2) %>'></asp:Literal>
|
||||
<asp:Literal runat="server" Text='<%# (NowADS().Year - 2) %>'></asp:Literal>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("Anio3", "{0:N2}") %>'></asp:Literal>
|
||||
|
||||
@@ -41,7 +41,7 @@ Partial Class Ventas_RepTopClientesVentas
|
||||
tablaAños.Columns.Add(idAño)
|
||||
tablaAños.Columns.Add(Año)
|
||||
|
||||
Dim añoActual As Integer = DateTime.Now.Year
|
||||
Dim añoActual As Integer = NowADS().Year
|
||||
|
||||
For AñoIndex As Integer = añoActual To (añoActual - 10) Step -1
|
||||
Dim row As DataRow = tablaAños.NewRow()
|
||||
@@ -83,10 +83,10 @@ Partial Class Ventas_RepTopClientesVentas
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString))
|
||||
params.Add(New ReportParameter("FechaImpresion", NowADS().ToString))
|
||||
params.Add(New ReportParameter("pImg", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
|
||||
ImprimirPDF("Empresas/Grales/Formatos/TopClientes.rdlc", DtClientes, params, String.Format("ReporteVentas-{0}", Now.ToDateTime.ToShortDateString), Formato:="PDF")
|
||||
ImprimirPDF("Empresas/Grales/Formatos/TopClientes.rdlc", DtClientes, params, String.Format("ReporteVentas-{0}", NowADS().ToDateTime.ToShortDateString), Formato:="PDF")
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkVerGrafica_Click(sender As Object, e As EventArgs)
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
<asp:BoundField HeaderText="Grupo" DataField="GPO" ItemStyle-Width="40%" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:TemplateField ItemStyle-Width="20%">
|
||||
<HeaderTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Now.Year %>'></asp:Literal>
|
||||
<asp:Literal runat="server" Text='<%# NowADS().Year %>'></asp:Literal>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("Anio1", "{0:N2}") %>'></asp:Literal>
|
||||
@@ -88,7 +88,7 @@
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-Width="20%">
|
||||
<HeaderTemplate>
|
||||
<asp:Literal runat="server" Text='<%# (Now.Year - 1) %>'></asp:Literal>
|
||||
<asp:Literal runat="server" Text='<%# (NowADS().Year - 1) %>'></asp:Literal>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("Anio2", "{0:N2}") %>'></asp:Literal>
|
||||
@@ -96,7 +96,7 @@
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-Width="20%">
|
||||
<HeaderTemplate>
|
||||
<asp:Literal runat="server" Text='<%# (Now.Year - 2) %>'></asp:Literal>
|
||||
<asp:Literal runat="server" Text='<%# (NowADS().Year - 2) %>'></asp:Literal>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal runat="server" Text='<%# Eval("Anio3", "{0:N2}") %>'></asp:Literal>
|
||||
|
||||
@@ -49,7 +49,7 @@ Partial Class Ventas_RepTopVentas
|
||||
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
|
||||
|
||||
@@ -303,8 +303,8 @@ Partial Class RepVentaDetalle
|
||||
|
||||
|
||||
'DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
txtFechaI.Text = Now.FirstDayOfMonth.ToShortDateString
|
||||
txtFechaF.Text = Now.LastDayOfMonth.ToShortDateString
|
||||
txtFechaI.Text = NowADS().FirstDayOfMonth.ToShortDateString
|
||||
txtFechaF.Text = NowADS().LastDayOfMonth.ToShortDateString
|
||||
|
||||
'Vendedor
|
||||
DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa, VendedorTipo:=-1).FiltraParametros("VendedorTipo in (1,4)") 'vendedores y vendedores de piso
|
||||
@@ -1032,22 +1032,22 @@ Partial Class RepVentaDetalle
|
||||
|
||||
#Region "IMPRESIONES"
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
|
||||
'GvDatos.ExportToExcel("DetalleVentas_" & Now.ToShortDateString)
|
||||
'GvDatos.ExportToExcel("DetalleVentas_" & NowADS().ToShortDateString)
|
||||
GenerarPDF("Excel")
|
||||
End Sub
|
||||
|
||||
Protected Sub ImgExcelVSH_Click(sender As Object, e As EventArgs) Handles ImgExcelVSH.Click
|
||||
'GvVsh.Visible = True
|
||||
'GvVsh.ExportToExcel("DetalleVentas_" & Now.ToShortDateString)
|
||||
'GvVsh.ExportToExcel("DetalleVentas_" & NowADS().ToShortDateString)
|
||||
'GvVsh.Visible = False
|
||||
GvDatos.ExportToExcel("DetalleVentas_" & Now.ToShortDateString)
|
||||
GvDatos.ExportToExcel("DetalleVentas_" & NowADS().ToShortDateString)
|
||||
End Sub
|
||||
Protected Sub ImgExcelPersonalizado_Click(sender As Object, e As EventArgs) Handles ImgExcelPersonalizado.Click
|
||||
'GvVsh.Visible = True
|
||||
'GvVsh.ExportToExcel("DetalleVentas_" & Now.ToShortDateString)
|
||||
'GvVsh.ExportToExcel("DetalleVentas_" & NowADS().ToShortDateString)
|
||||
'GvVsh.Visible = False
|
||||
GvDatos.ExportToExcel("DetalleVentas_" & Now.ToShortDateString & ".xls")
|
||||
'GvDatos.ExportToExcelG("DetalleVentas_" & Now.ToShortDateString & ".xlsx")
|
||||
GvDatos.ExportToExcel("DetalleVentas_" & NowADS().ToShortDateString & ".xls")
|
||||
'GvDatos.ExportToExcelG("DetalleVentas_" & NowADS().ToShortDateString & ".xlsx")
|
||||
End Sub
|
||||
Public Overrides Sub VerifyRenderingInServerForm(control As Control)
|
||||
|
||||
@@ -1235,7 +1235,7 @@ Partial Class RepVentaDetalle
|
||||
params.Add(New ReportParameter("FechaInicio", FechaIn))
|
||||
params.Add(New ReportParameter("FechaFin", FechaFn))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
|
||||
params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString))
|
||||
params.Add(New ReportParameter("TipoDocto", TipoDocto))
|
||||
params.Add(New ReportParameter("AgrupadoPor", $"<b>Agrupado Por:</b> {Grupo} {TipoDocto} {FechaIn} {FechaFn} {FechaIEjec} {FechaFEjec} {CveCliente} {CveSucursal} {CveSucursalEjec} {Vendedor} {CveUsuario} {CveEstatusFactura} {CondicionesPago} "))
|
||||
|
||||
@@ -1247,7 +1247,7 @@ Partial Class RepVentaDetalle
|
||||
RutaFormato = "Empresas/Grales/Formatos/RepVentaDetalle.rdlc"
|
||||
End If
|
||||
|
||||
ImprimirPDF(RutaFormato, dt, params, String.Format("ReporteVentaDetalle-{0}", Now.ToDateTime.ToShortDateString), Formato:=Formato)
|
||||
ImprimirPDF(RutaFormato, dt, params, String.Format("ReporteVentaDetalle-{0}", NowADS().ToDateTime.ToShortDateString), Formato:=Formato)
|
||||
Else
|
||||
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
@@ -232,8 +232,8 @@ Partial Class Ventas_RepVentas
|
||||
DdlTipoRelacion.DataBind()
|
||||
DdlTipoRelacion.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
txtFechaI.Text = Now.FirstDayOfMonth.ToShortDateString
|
||||
txtFechaF.Text = Now.ToShortDateString
|
||||
txtFechaI.Text = NowADS().FirstDayOfMonth.ToShortDateString
|
||||
txtFechaF.Text = NowADS().ToShortDateString
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -347,7 +347,7 @@ Partial Class Ventas_RepVentas
|
||||
TipoCambio = RblTipoCambio.SelectedValue.ToEntero
|
||||
If TipoCambio = 3 Then
|
||||
LiEspecifico.Visible = True
|
||||
TCEspecifico = GlobalTipoCambio(Now).ToDecimal
|
||||
TCEspecifico = GlobalTipoCambio(NowADS()).ToDecimal
|
||||
TxtEspecifico.Text = TCEspecifico.ToString
|
||||
Else
|
||||
LiEspecifico.Visible = False
|
||||
@@ -787,7 +787,7 @@ Partial Class Ventas_RepVentas
|
||||
|
||||
#Region " EXCEL "
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
|
||||
'GvDatos.ExportToExcel("ReporteVentas" & Now.ToShortDateString)
|
||||
'GvDatos.ExportToExcel("ReporteVentas" & NowADS().ToShortDateString)
|
||||
GenerarPDF("Excel")
|
||||
End Sub
|
||||
#End Region
|
||||
@@ -830,7 +830,7 @@ Partial Class Ventas_RepVentas
|
||||
params.Add(New ReportParameter("FechaInicio", FechaI))
|
||||
params.Add(New ReportParameter("FechaFin", FechaF))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
|
||||
params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString))
|
||||
params.Add(New ReportParameter("Filtros", StrFiltro.ToString))
|
||||
params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
|
||||
@@ -840,7 +840,7 @@ Partial Class Ventas_RepVentas
|
||||
ruta = "Empresas/Grales/Formatos/RepVentas.rdlc"
|
||||
End If
|
||||
|
||||
ImprimirPDF(ruta, dt, params, String.Format("ReporteVentas-{0}", Now.ToDateTime.ToShortDateString), Formato:=Formato)
|
||||
ImprimirPDF(ruta, dt, params, String.Format("ReporteVentas-{0}", NowADS().ToDateTime.ToShortDateString), Formato:=Formato)
|
||||
Else
|
||||
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
@@ -977,7 +977,7 @@ Partial Class Ventas_RepVentas
|
||||
' txtFechaIHP.Text = PrevMondayDate.ToString("dd/MM/yyyy")
|
||||
' txtFechaFHP.Text = Sunday.ToString("dd/MM/yyyy")
|
||||
' Case "2" ' MENSUAL
|
||||
' Dim FechaRef As DateTime = Now
|
||||
' Dim FechaRef As DateTime = NowADS()
|
||||
' Dim LastDayOfMonth = DateTime.DaysInMonth(FechaRef.Year, FechaRef.Month)
|
||||
|
||||
' txtFechaIHP.Text = $"01/{FechaRef.Month}/{FechaRef.Year}"
|
||||
@@ -1032,10 +1032,10 @@ Partial Class Ventas_RepVentas
|
||||
|
||||
Protected Sub ImgExcelPersonalizado_Click(sender As Object, e As EventArgs) Handles ImgExcelPersonalizado.Click
|
||||
'GvVsh.Visible = True
|
||||
'GvVsh.ExportToExcel("DetalleVentas_" & Now.ToShortDateString)
|
||||
'GvVsh.ExportToExcel("DetalleVentas_" & NowADS().ToShortDateString)
|
||||
'GvVsh.Visible = False
|
||||
GvDatos.ExportToExcel("Ventas_" & Now.ToShortDateString & ".xls")
|
||||
'GvDatos.ExportToExcelG("DetalleVentas_" & Now.ToShortDateString & ".xlsx")
|
||||
GvDatos.ExportToExcel("Ventas_" & NowADS().ToShortDateString & ".xls")
|
||||
'GvDatos.ExportToExcelG("DetalleVentas_" & NowADS().ToShortDateString & ".xlsx")
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
@@ -298,7 +298,7 @@ Partial Class Ventas_RepVentas
|
||||
|
||||
#Region " EXCEL "
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
|
||||
'GvDatos.ExportToExcel("ReporteVentas" & Now.ToShortDateString)
|
||||
'GvDatos.ExportToExcel("ReporteVentas" & NowADS().ToShortDateString)
|
||||
GenerarPDF("Excel")
|
||||
End Sub
|
||||
#End Region
|
||||
@@ -322,14 +322,14 @@ Partial Class Ventas_RepVentas
|
||||
params.Add(New ReportParameter("FechaInicio", FechaI))
|
||||
params.Add(New ReportParameter("FechaFin", FechaF))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
|
||||
params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString))
|
||||
params.Add(New ReportParameter("Filtros", StrFiltro.ToString))
|
||||
If Imagen.Exists Then
|
||||
params.Add(New ReportParameter("LogoPath", $"file://{Imagen.FullName}"))
|
||||
Else
|
||||
params.Add(New ReportParameter("LogoPath", ""))
|
||||
End If
|
||||
ImprimirPDF("Empresas/Grales/Formatos/RepVentas.rdlc", dt, params, String.Format("ReporteVentas-{0}", Now.ToDateTime.ToShortDateString), Formato:=Formato)
|
||||
ImprimirPDF("Empresas/Grales/Formatos/RepVentas.rdlc", dt, params, String.Format("ReporteVentas-{0}", NowADS().ToDateTime.ToShortDateString), Formato:=Formato)
|
||||
Else
|
||||
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
@@ -346,7 +346,7 @@ Partial Class Ventas_RepVentas
|
||||
Dim Str As New StringBuilder
|
||||
Str.AppendLine("Header Section,,,,,,,,,,,End Customer Identification ,,,,,,,,,,,,, Ship To Identification,,,,,,,,,,,,, Sold To Identification,,,,,,,,,,,,, Bill To Identification,,,,,,,,,,,,, Salesperson Detail,,,,,, Line Item Detail,,,,,,,,,,,,,,,,,,,,,,,,,,,, New FIELDS,,,,,,,,,,,,,,,,,,,,,,,,,, ")
|
||||
Str.AppendLine("Partner Purchase Price Currency Code, Exchange Rate, Reporter_id, Reported Partner Type, Reporter Company Name , Sell From Address line 1, Sell From Address line 2, Sell From City, Reported Partner State/Province, Sell from postal code, Sell from Country code,End User Customer Name,End User Company Tax ID,End User Address Line 1,End User Address Line 2,End User City,End User State/Province Code,End User Postal Code,End User Country Code,End User ID,End Customer Department,End Customer Contact Name,End Customer Contact Phone,End Customer County, Ship To Customer Name, Ship To Company Tax ID, Ship To Address Line 1, Ship To Address Line 2, Ship To City, Ship To State/Province Code, Ship To Postal Code, Ship To Country Code, Ship To Customer ID, Ship To Department, Ship To Contact Name, Ship To Contact Phone, Ship To County, Sold To Customer Name, Sold To Company Tax ID, Sold To Address Line 1, Sold To Address Line 2, Sold To City, Sold To State/Province Code, Sold To Postal Code, Sold To Country Code, Sold To Customer ID, Sold To Department, Sold To Contact Name, Sold To Contact Phone, Sold To County, Bill To Customer Name, Bill To Company Tax ID, Bill To Address Line 1 , Bill To Address Line 2, Bill To City, Bill To State/Province Code, Bill To Postal Code, Bill To Country Code, Bill To Customer ID, Bill To Agreement Number, Bill To Contact Name, Bill To Contact Phone, Bill To County, HP Representative Name, HP Sales Rep Email, Salesperson2 Name, Salesperson2 Unique Employee ID, Salesperson's Manager's Name,Salesperson's Manager Unique Employee ID,Quantity Qualifier,Product Quantity Shipped/Sold,Line Item ID,Partner Reported Product ID,Product Description,Date Type Qualifier,Channel Partner to Customer Transaction Date,Reseller’’s Product Number,Partner Purchase Price,Extended Price,Partner Sell Price,Extended Resale Price,Transaction Type,Rebate Tracking #,Partner Requested Rebate Amount,Extended Rebate Amount,Debit Number,Channel Partner to Customer Invoice ID,Reference Number,Customer to Channel Partner Purchase Order ID,Deal ID #1,Deal ID #2,Deal ID #3,Deal ID #4,Deal ID #5,Deal ID #6,Marketing Subprogram Code,Product Serial ID assigned by HP,Purchasing Source wholesaler indicator,Drop Ship Flag,Distributor's Invoice Number,Partner Internal transaction ID,Partner Comment,Deal Bundle ID #1,Deal Bundle ID #2,Deal Bundle ID #3,Deal Bundle ID #4,Deal Bundle ID #5,Deal Bundle ID #6,NMSO NAME,Sales Type,Purchase Agreement,Product Origin,Partner Reported CBN#,Partner Reference,Supplies Tracking ID (QR Code),Sell From Location ID (assigned by HP or Partner-assigned),Sell from name,Comment Deal ID #1,Comment Deal ID #2,Comment Deal ID #3,Comment Deal ID #4,Comment Deal ID #5,Comment Deal ID #6,Partner Sell Price Currency Code")
|
||||
If Rep.GetReporteHP(72, Now.AddMonths(-1).FirstDayOfMonth, Now.AddMonths(-1).LastDayOfMonth) Then
|
||||
If Rep.GetReporteHP(72, NowADS().AddMonths(-1).FirstDayOfMonth, NowADS().AddMonths(-1).LastDayOfMonth) Then
|
||||
For Each dr As DataRow In Rep.DtResultados.Rows
|
||||
Str.AppendLine($"MXN,,AM30089,,""COMPUPROVEEDORES, S.A.DE C.V."",,,,,,,,,,,,,,,,,,,,{dr("Nombre")},{dr("RFC")},{dr("Direccion")},,,{dr("Ciudad")},{dr("Estado")},{dr("CP")},MX,{dr("RFC")},,,,,{dr("Nombre")},{dr("RFC")},{dr("Direccion")},,{dr("Ciudad")},{dr("Estado")},{dr("CP")},MX,{dr("RFC")},,,,,,,,,,,,,,,,,,,,,,,,,{dr("Cantidad")},,{dr("Codigo")},,,{dr("Fecha")},,,,{dr("PU")},,,,,,,{dr("SerieFolio")},,,,,,,,,,,,,,,,,,,,,,,,,{dr("Proveedor")},,,,,,,,,,,,MXN")
|
||||
Next
|
||||
@@ -365,7 +365,7 @@ Partial Class Ventas_RepVentas
|
||||
TipoCambio = RblTipoCambio.SelectedValue.ToEntero
|
||||
If TipoCambio = 3 Then
|
||||
LiEspecifico.Visible = True
|
||||
TCEspecifico = GlobalTipoCambio(Now).ToDecimal
|
||||
TCEspecifico = GlobalTipoCambio(NowADS()).ToDecimal
|
||||
TxtEspecifico.Text = TCEspecifico.ToString
|
||||
Else
|
||||
LiEspecifico.Visible = False
|
||||
|
||||
@@ -23,7 +23,7 @@ public partial class Ventas_RepVentasAutorizaciones : ClsPaginas
|
||||
get { return Consultado = (bool)ViewState["Consultado"]; }
|
||||
set { ViewState["Consultado"] = value; }
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
protected void LnkExcel_Click(object sender, EventArgs e)
|
||||
@@ -68,8 +68,8 @@ public partial class Ventas_RepVentasAutorizaciones : ClsPaginas
|
||||
|
||||
//Carga Usuarios
|
||||
DdlUsuario.DataSource = get_GlobalDTUsuarios().FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}");
|
||||
DdlUsuario.DataBind();
|
||||
|
||||
DdlUsuario.DataBind();
|
||||
|
||||
//Carga Estatus Factura
|
||||
//DdlEstatusFactura
|
||||
DdlClientes.setEsWebService(true);
|
||||
|
||||
@@ -22,7 +22,7 @@ Partial Class RepVentasMensuales
|
||||
End If
|
||||
End Sub
|
||||
Private Sub InicializarFiltros()
|
||||
Dim dNow As Date = Now
|
||||
Dim dNow As Date = NowADS()
|
||||
TxtFechaF.Text = dNow.ToString("dd/MM/yyyy")
|
||||
dNow = dNow.AddDays(-30)
|
||||
TxtFechaI.Text = dNow.ToString("dd/MM/yyyy")
|
||||
@@ -79,7 +79,7 @@ Partial Class RepVentasMensuales
|
||||
End Sub
|
||||
|
||||
Public Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click
|
||||
GV.ExportToExcel("Evaluaciones de Proveedores" & Now.ToShortDateString & ".xls")
|
||||
GV.ExportToExcel("Evaluaciones de Proveedores" & NowADS().ToShortDateString & ".xls")
|
||||
End Sub
|
||||
|
||||
Protected Sub GV_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GV.RowDataBound
|
||||
|
||||
@@ -55,7 +55,7 @@ Partial Class RepVentasMensualesDetalle
|
||||
End Sub
|
||||
|
||||
Public Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click
|
||||
GV.ExportToExcel("Evaluaciones de Proveedores" & Now.ToShortDateString & ".xls")
|
||||
GV.ExportToExcel("Evaluaciones de Proveedores" & NowADS().ToShortDateString & ".xls")
|
||||
End Sub
|
||||
|
||||
Public Sub GV_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GV.RowDataBound
|
||||
|
||||
@@ -76,6 +76,6 @@ Partial Class Ventas_RepVentasPV
|
||||
End Sub
|
||||
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs) Handles ImgExcel.Click
|
||||
GvDatos.ExportToExcel("ReporteVentasPV" & Now.ToShortDateString)
|
||||
GvDatos.ExportToExcel("ReporteVentasPV" & NowADS().ToShortDateString)
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -63,7 +63,7 @@ Partial Class RepVentasPeriodo
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
|
||||
txtFechaI.Text = Now.FirstDayOfMonth.ToString("dd/MM/yyyy")
|
||||
txtFechaI.Text = NowADS().FirstDayOfMonth.ToString("dd/MM/yyyy")
|
||||
|
||||
TipoCambio = 1
|
||||
TCEspecifico = -1
|
||||
@@ -302,7 +302,7 @@ Partial Class RepVentasPeriodo
|
||||
|
||||
#Region " EXCEL "
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
|
||||
'GvDatos.ExportToExcel("ReporteVentas" & Now.ToShortDateString)
|
||||
'GvDatos.ExportToExcel("ReporteVentas" & NowADS().ToShortDateString)
|
||||
GenerarPDF("Excel")
|
||||
End Sub
|
||||
#End Region
|
||||
@@ -327,12 +327,12 @@ Partial Class RepVentasPeriodo
|
||||
params.Add(New ReportParameter("FechaInicio", FechaI))
|
||||
params.Add(New ReportParameter("FechaFin", FechaF))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
|
||||
params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString))
|
||||
params.Add(New ReportParameter("Filtros", StrFiltro.ToString))
|
||||
params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
|
||||
'Alert("El reporte requiere papel tipo oficio", TipoMensaje.MsgInformacion)
|
||||
ImprimirPDF("Empresas/Grales/Formatos/RepVentasPeriodo.rdlc", dt, params, String.Format("ReporteVentas-{0}", Now.ToDateTime.ToShortDateString), Formato:=Formato)
|
||||
ImprimirPDF("Empresas/Grales/Formatos/RepVentasPeriodo.rdlc", dt, params, String.Format("ReporteVentas-{0}", NowADS().ToDateTime.ToShortDateString), Formato:=Formato)
|
||||
|
||||
Else
|
||||
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
|
||||
@@ -350,7 +350,7 @@ Partial Class RepVentasPeriodo
|
||||
Dim Str As New StringBuilder
|
||||
Str.AppendLine("Header Section,,,,,,,,,,,End Customer Identification ,,,,,,,,,,,,, Ship To Identification,,,,,,,,,,,,, Sold To Identification,,,,,,,,,,,,, Bill To Identification,,,,,,,,,,,,, Salesperson Detail,,,,,, Line Item Detail,,,,,,,,,,,,,,,,,,,,,,,,,,,, New FIELDS,,,,,,,,,,,,,,,,,,,,,,,,,, ")
|
||||
Str.AppendLine("Partner Purchase Price Currency Code, Exchange Rate, Reporter_id, Reported Partner Type, Reporter Company Name , Sell From Address line 1, Sell From Address line 2, Sell From City, Reported Partner State/Province, Sell from postal code, Sell from Country code,End User Customer Name,End User Company Tax ID,End User Address Line 1,End User Address Line 2,End User City,End User State/Province Code,End User Postal Code,End User Country Code,End User ID,End Customer Department,End Customer Contact Name,End Customer Contact Phone,End Customer County, Ship To Customer Name, Ship To Company Tax ID, Ship To Address Line 1, Ship To Address Line 2, Ship To City, Ship To State/Province Code, Ship To Postal Code, Ship To Country Code, Ship To Customer ID, Ship To Department, Ship To Contact Name, Ship To Contact Phone, Ship To County, Sold To Customer Name, Sold To Company Tax ID, Sold To Address Line 1, Sold To Address Line 2, Sold To City, Sold To State/Province Code, Sold To Postal Code, Sold To Country Code, Sold To Customer ID, Sold To Department, Sold To Contact Name, Sold To Contact Phone, Sold To County, Bill To Customer Name, Bill To Company Tax ID, Bill To Address Line 1 , Bill To Address Line 2, Bill To City, Bill To State/Province Code, Bill To Postal Code, Bill To Country Code, Bill To Customer ID, Bill To Agreement Number, Bill To Contact Name, Bill To Contact Phone, Bill To County, HP Representative Name, HP Sales Rep Email, Salesperson2 Name, Salesperson2 Unique Employee ID, Salesperson's Manager's Name,Salesperson's Manager Unique Employee ID,Quantity Qualifier,Product Quantity Shipped/Sold,Line Item ID,Partner Reported Product ID,Product Description,Date Type Qualifier,Channel Partner to Customer Transaction Date,Reseller’’s Product Number,Partner Purchase Price,Extended Price,Partner Sell Price,Extended Resale Price,Transaction Type,Rebate Tracking #,Partner Requested Rebate Amount,Extended Rebate Amount,Debit Number,Channel Partner to Customer Invoice ID,Reference Number,Customer to Channel Partner Purchase Order ID,Deal ID #1,Deal ID #2,Deal ID #3,Deal ID #4,Deal ID #5,Deal ID #6,Marketing Subprogram Code,Product Serial ID assigned by HP,Purchasing Source wholesaler indicator,Drop Ship Flag,Distributor's Invoice Number,Partner Internal transaction ID,Partner Comment,Deal Bundle ID #1,Deal Bundle ID #2,Deal Bundle ID #3,Deal Bundle ID #4,Deal Bundle ID #5,Deal Bundle ID #6,NMSO NAME,Sales Type,Purchase Agreement,Product Origin,Partner Reported CBN#,Partner Reference,Supplies Tracking ID (QR Code),Sell From Location ID (assigned by HP or Partner-assigned),Sell from name,Comment Deal ID #1,Comment Deal ID #2,Comment Deal ID #3,Comment Deal ID #4,Comment Deal ID #5,Comment Deal ID #6,Partner Sell Price Currency Code")
|
||||
If Rep.GetReporteHP(72, Now.AddMonths(-1).FirstDayOfMonth, Now.AddMonths(-1).LastDayOfMonth) Then
|
||||
If Rep.GetReporteHP(72, NowADS().AddMonths(-1).FirstDayOfMonth, NowADS().AddMonths(-1).LastDayOfMonth) Then
|
||||
For Each dr As DataRow In Rep.DtResultados.Rows
|
||||
Str.AppendLine($"MXN,,AM30089,,""COMPUPROVEEDORES, S.A.DE C.V."",,,,,,,,,,,,,,,,,,,,{dr("Nombre")},{dr("RFC")},{dr("Direccion")},,{dr("Ciudad")},{dr("Estado")},{dr("CP")},MX,{dr("RFC")},,,,,{dr("Nombre")},{dr("RFC")},{dr("Direccion")},,{dr("Ciudad")},{dr("Estado")},{dr("CP")},MX,{dr("RFC")},,,,,,,,,,,,,,,,,,,,,,,,,{dr("Cantidad")},,{dr("Codigo")},,,{dr("Fecha")},,,,{dr("PU")},,,,,,,{dr("SerieFolio")},,,,,,,,,,,,,,,,,,,,,,,,,{dr("Proveedor")},,,,,,,,,,,,MXN")
|
||||
Next
|
||||
@@ -369,7 +369,7 @@ Partial Class RepVentasPeriodo
|
||||
TipoCambio = RblTipoCambio.SelectedValue.ToEntero
|
||||
If TipoCambio = 3 Then
|
||||
LiEspecifico.Visible = True
|
||||
TCEspecifico = GlobalTipoCambio(Now).ToDecimal
|
||||
TCEspecifico = GlobalTipoCambio(NowADS()).ToDecimal
|
||||
TxtEspecifico.Text = TCEspecifico.ToString
|
||||
Else
|
||||
LiEspecifico.Visible = False
|
||||
|
||||
@@ -69,8 +69,8 @@ Partial Class Ventas_RepVentasResumen
|
||||
DdlSubProyecto.DataBind()
|
||||
DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
TxtFechaI.Text = $"01/{Now.Month}/{Now.Year}"
|
||||
TxtFechaF.Text = Now.ToString("dd/MM/yyyy")
|
||||
TxtFechaI.Text = $"01/{NowADS().Month}/{NowADS().Year}"
|
||||
TxtFechaF.Text = NowADS().ToString("dd/MM/yyyy")
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ Partial Class Ventas_RepVentasResumen
|
||||
Datos = Nothing
|
||||
End If
|
||||
|
||||
Dim FechaCorte As String = $"31/12/{Now.Year}"
|
||||
Dim FechaCorte As String = $"31/12/{NowADS().Year}"
|
||||
|
||||
If ObjMovtos.GetCxC(TxtFechaI.Text, TxtFechaF.Text, -1, DdlSubProyecto.SelectedValue.ToEntero, -1, -1, -1, "-1", UsuarioActual.CveEmpresa, 5, -1, 1, -1,
|
||||
"-1", "-1", "-1", FechaCorte:=FechaCorte.ToDate, CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then
|
||||
|
||||
@@ -32,8 +32,8 @@ Partial Class Ventas_RepVentasUtilidad
|
||||
#Region " INICIALIZA VALORES "
|
||||
Private Sub CargaCombos()
|
||||
|
||||
txtFechaI.Text = Now.FirstDayOfMonth.ToShortDateString
|
||||
txtFechaF.Text = Now.LastDayOfMonth.ToShortDateString
|
||||
txtFechaI.Text = NowADS().FirstDayOfMonth.ToShortDateString
|
||||
txtFechaF.Text = NowADS().LastDayOfMonth.ToShortDateString
|
||||
|
||||
'Carga Clientes
|
||||
Dim EsWS As Boolean = True
|
||||
@@ -331,7 +331,7 @@ Partial Class Ventas_RepVentasUtilidad
|
||||
params.Add(New ReportParameter("FechaInicio", FechaInicio))
|
||||
params.Add(New ReportParameter("FechaFin", FechaFin))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
|
||||
params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString))
|
||||
params.Add(New ReportParameter("AgrupadoPor", $"{Cliente}{Sucursal}{Vendedor}{PS}{Clasificacion}{FechaIn}{FechaFn}"))
|
||||
params.Add(New ReportParameter("Neto", LblNeto.Text))
|
||||
params.Add(New ReportParameter("PorNeto", LblPorNeto.Text + " %"))
|
||||
|
||||
@@ -88,8 +88,8 @@ Partial Class Ventas_RepVentasUtilidadDetalle
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
txtFechaI.Text = IfNull(Request("FechaI"), Now.FirstDayOfMonth.ToShortDateString).ToString
|
||||
txtFechaF.Text = IfNull(Request("FechaF"), Now.LastDayOfMonth.ToShortDateString).ToString
|
||||
txtFechaI.Text = IfNull(Request("FechaI"), NowADS().FirstDayOfMonth.ToShortDateString).ToString
|
||||
txtFechaF.Text = IfNull(Request("FechaF"), NowADS().LastDayOfMonth.ToShortDateString).ToString
|
||||
|
||||
CveVenta = If(Request("CveVenta") <> "", Request("CveVenta").ToString.ToEntero, "-1".ToEntero)
|
||||
CveVendedor = IfNull(Request("CveVendedor"), "-1").ToString
|
||||
@@ -314,7 +314,7 @@ Partial Class Ventas_RepVentasUtilidadDetalle
|
||||
params.Add(New ReportParameter("FechaInicio", FechaInicio))
|
||||
params.Add(New ReportParameter("FechaFin", FechaFin))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
|
||||
params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString))
|
||||
params.Add(New ReportParameter("AgrupadoPor", $"{Cliente}{Sucursal}{Vendedor}{PS}{Clasificacion}{FechaIn}{FechaFn}"))
|
||||
|
||||
|
||||
@@ -372,7 +372,7 @@ Partial Class Ventas_RepVentasUtilidadDetalle
|
||||
params.Add(New ReportParameter("FechaInicio", FechaInicio))
|
||||
params.Add(New ReportParameter("FechaFin", FechaFin))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
|
||||
params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString))
|
||||
params.Add(New ReportParameter("AgrupadoPor", $"{Cliente}{Sucursal}{Vendedor}{PS}{Clasificacion}{FechaIn}{FechaFn}"))
|
||||
|
||||
params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
|
||||
@@ -40,8 +40,8 @@ Partial Class Ventas_RepVentasUtilidadPadre
|
||||
#Region " INICIALIZA VALORES "
|
||||
Private Sub CargaCombos()
|
||||
|
||||
txtFechaI.Text = Now.FirstDayOfMonth.ToShortDateString
|
||||
txtFechaF.Text = Now.LastDayOfMonth.ToShortDateString
|
||||
txtFechaI.Text = NowADS().FirstDayOfMonth.ToShortDateString
|
||||
txtFechaF.Text = NowADS().LastDayOfMonth.ToShortDateString
|
||||
|
||||
'Carga Clientes
|
||||
If UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1" Then
|
||||
@@ -291,7 +291,7 @@ Partial Class Ventas_RepVentasUtilidadPadre
|
||||
Dim params As New List(Of ReportParameter)()
|
||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString()))
|
||||
params.Add(New ReportParameter("FechaImpresion", NowADS().ToString()))
|
||||
params.Add(New ReportParameter("Filtros", StrFiltro.ToString))
|
||||
params.Add(New ReportParameter("Neto", LblNeto.Text))
|
||||
params.Add(New ReportParameter("PorNeto", $"{LblPorNeto.Text}%"))
|
||||
|
||||
@@ -2438,15 +2438,15 @@ Partial Class Ventas
|
||||
CveAlmacenDevolucion = 0
|
||||
Me.CveEstadoCancelacion = 0
|
||||
|
||||
txtFechaICot.Text = Now.AddMonths(-3).ToShortDateString
|
||||
TxtFechaIRem.Text = Now.AddMonths(-3).ToShortDateString
|
||||
TxtFechaIPed.Text = Now.AddMonths(-3).ToShortDateString
|
||||
TxtFechaIOC.Text = Now.AddMonths(-3).ToShortDateString
|
||||
txtFechaICot.Text = NowADS().AddMonths(-3).ToShortDateString
|
||||
TxtFechaIRem.Text = NowADS().AddMonths(-3).ToShortDateString
|
||||
TxtFechaIPed.Text = NowADS().AddMonths(-3).ToShortDateString
|
||||
TxtFechaIOC.Text = NowADS().AddMonths(-3).ToShortDateString
|
||||
|
||||
txtFechaFCot.Text = Now.ToShortDateString
|
||||
TxtFechaFRem.Text = Now.ToShortDateString
|
||||
TxtFechaFPedido.Text = Now.ToShortDateString
|
||||
TxtFechaFOC.Text = Now.ToShortDateString
|
||||
txtFechaFCot.Text = NowADS().ToShortDateString
|
||||
TxtFechaFRem.Text = NowADS().ToShortDateString
|
||||
TxtFechaFPedido.Text = NowADS().ToShortDateString
|
||||
TxtFechaFOC.Text = NowADS().ToShortDateString
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(177) Then
|
||||
DdlTipoComprobante.Items.Insert(4, New ListItem("Pedido de Contrato", "Ped"))
|
||||
@@ -2527,10 +2527,10 @@ Partial Class Ventas
|
||||
DdlTipoComprobante.SelectedValue = "Ing"
|
||||
End If
|
||||
'DdlTipoComprobante.Attributes.Add("onChange", "ActivaReferencia(this)")
|
||||
TxtFecha.Text = Now.ToShortDateString()
|
||||
TxtFechaEjecucion.Text = Now.ToShortDateString
|
||||
TxtFecha.Text = NowADS().ToShortDateString()
|
||||
TxtFechaEjecucion.Text = NowADS().ToShortDateString
|
||||
LblUsuario.Text = UsuarioActual.Usuario
|
||||
LblFechaRegistro.Text = Now.ToShortDateString()
|
||||
LblFechaRegistro.Text = NowADS().ToShortDateString()
|
||||
|
||||
ImgDescPU.Attributes.Add("onclick", "javascript:$('#ModalDescuento').modal(); $get('LblTitulo1').style.display = ''; $get('LblTitulo2').style.display = 'none'; $get('LblTituloTipo1').style.display = ''; $get('LblTituloTipo2').style.display = 'none'; $get('HdnTipoDescuento').value = '0'; $get('LblPrecio1').style.display = ''; $get('LblTotalPS1').style.display = 'none'; $get('LblSubTotal1').style.display = 'none'; $get('LblAmort').style.display = 'none'; $get('BtnAplicarDescP').style.display = ''; $get('BtnAplicarDescG').style.display = 'none'; $get('TrMotivoDescuento').style.display = '';")
|
||||
ImgDescConcepto.Attributes.Add("onclick", "javascript:$('#ModalDescuento').modal(); $get('LblTitulo1').style.display = ''; $get('LblTitulo2').style.display = 'none'; $get('LblTituloTipo1').style.display = ''; $get('LblTituloTipo2').style.display = 'none'; $get('HdnTipoDescuento').value = '1'; $get('LblPrecio1').style.display = 'none'; $get('LblTotalPS1').style.display = ''; $get('LblSubTotal1').style.display = 'none'; $get('LblAmort').style.display = 'none'; $get('BtnAplicarDescP').style.display = ''; $get('BtnAplicarDescG').style.display = 'none'; $get('TrMotivoDescuento').style.display = '';")
|
||||
@@ -2598,7 +2598,7 @@ Partial Class Ventas
|
||||
DdlTipoComprobante.Items.Add(New ListItem("Orden Pago", "OP"))
|
||||
|
||||
Dim AC As New ClsAC
|
||||
If AC.GetPresupuestoIngresos(-1, Now.Year, True, UsuarioActual.CveEmpresa) Then
|
||||
If AC.GetPresupuestoIngresos(-1, NowADS().Year, True, UsuarioActual.CveEmpresa) Then
|
||||
DdlFuenteRecaudacion.DataSource = AC.DtResultados()
|
||||
DTPresupuestoIngresos = AC.DtResultados()
|
||||
ViewState("DTFuenteRecaudacion") = AC.DtResultados()
|
||||
@@ -2747,7 +2747,7 @@ Partial Class Ventas
|
||||
If UsuarioActual.TienePermisoProceso(302) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Egs") Then BtnEditar.Visible = True
|
||||
|
||||
DivFechaAnticipoCliente.Visible = True
|
||||
TxtFechaAnticipoCliente.Text = Now.ToShortDateString
|
||||
TxtFechaAnticipoCliente.Text = NowADS().ToShortDateString
|
||||
|
||||
ImgAddObs.Visible = True
|
||||
CargaEventoBitacora()
|
||||
@@ -3057,7 +3057,7 @@ Partial Class Ventas
|
||||
|
||||
UpnTools.Update()
|
||||
|
||||
TxtFecha.Text = Now.ToShortDateString
|
||||
TxtFecha.Text = NowADS().ToShortDateString
|
||||
|
||||
'' Si esta cancelado el compromiso no se puede editar el estatus
|
||||
'If DdlEstatus.SelectedValue = "9" Then
|
||||
@@ -3373,7 +3373,7 @@ Partial Class Ventas
|
||||
TxtFolio.Enabled = False
|
||||
TxtFecha.Enabled = False
|
||||
If LblSeTimbro.Text = "No" And DdlTipoComprobante.SelectedValue.Contiene("Ing", "Egs", "Dev", "Ant") Then
|
||||
TxtFecha.Text = Now.ToShortDateString
|
||||
TxtFecha.Text = NowADS().ToShortDateString
|
||||
End If
|
||||
ImgFecha.Visible = False
|
||||
End If
|
||||
@@ -3488,7 +3488,7 @@ Partial Class Ventas
|
||||
If ObjPVenta.DtResultados.Rows.Count > 0 Then
|
||||
CveCorte = ObjPVenta.CveCorte
|
||||
Dim FechaICorte As Date = ObjPVenta.FechaInicial.Date '.AddDays(-5)
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso FechaICorte < Now.Date Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso FechaICorte < NowADS().Date Then
|
||||
DebeCerrarCorte = True
|
||||
LblMotivoBloqueo.Text = $"Existe un corte del día <b>{FechaICorte.ToString("dd/MM/yyyy")}</b>. Favor de cerrarlo para iniciar un nuevo corte."
|
||||
Else
|
||||
@@ -3521,9 +3521,9 @@ Partial Class Ventas
|
||||
Private Sub BtnIniciarTurno_Click(sender As Object, e As EventArgs) Handles BtnIniciarTurno.Click
|
||||
Dim ObjPVenta As New ClsPuntoVenta
|
||||
|
||||
ObjPVenta.AddVtaCortes(Now, TxtDineroCaja.Text.ToDecimal, UsuarioActual.CveUsuario, TxtDescripcionCaja.Text, UsuarioActual.CveEmpresa)
|
||||
ObjPVenta.AddVtaCortes(NowADS(), TxtDineroCaja.Text.ToDecimal, UsuarioActual.CveUsuario, TxtDescripcionCaja.Text, UsuarioActual.CveEmpresa)
|
||||
CveCorte = ObjPVenta.CveCorte
|
||||
LblEstatusCaja.Text = Now.ToShortDateString
|
||||
LblEstatusCaja.Text = NowADS().ToShortDateString
|
||||
TrEstatusCaja.Visible = True
|
||||
LkbEstadodeCaja.Visible = True
|
||||
LkbIngreso.Visible = True
|
||||
@@ -3642,7 +3642,7 @@ Partial Class Ventas
|
||||
Private Sub BtnAceptarIE_Click(sender As Object, e As EventArgs) Handles BtnAceptarIE.Click
|
||||
Dim ObjPVenta As New ClsPuntoVenta
|
||||
If TxtCantidadIE.Text.ToEntero() > 0 Then
|
||||
If ObjPVenta.AddVta_MovimientosCajas(CveCorte, UsuarioActual.CveUsuario, TxtCantidadIE.Text.ToDouble, TxtDescripcionIE.Text, HdnTipoMovimiento.Value.ToEntero(), Now) Then
|
||||
If ObjPVenta.AddVta_MovimientosCajas(CveCorte, UsuarioActual.CveUsuario, TxtCantidadIE.Text.ToDouble, TxtDescripcionIE.Text, HdnTipoMovimiento.Value.ToEntero(), NowADS()) Then
|
||||
TxtCantidadIE.Text = ""
|
||||
TxtDescripcionIE.Text = ""
|
||||
RegistraScript("$('#DivIngresoEgreso').modal('hide')", "divingresoegreso")
|
||||
@@ -3655,7 +3655,7 @@ Partial Class Ventas
|
||||
Private Sub BtnCerrarTurno_Click(sender As Object, e As EventArgs) Handles BtnCerrarTurno.Click
|
||||
Dim ObjPVenta As New ClsPuntoVenta
|
||||
If TxtEfectivoEnCaja.Text.Trim <> "" Then
|
||||
If ObjPVenta.UpdateFinalizadoVtaCortes(CveCorte, TxtEfectivoEnCaja.Text.ToDouble, LblDiferenciaCaja.Text.ToDouble, Now, UsuarioActual.CveEmpresa) Then
|
||||
If ObjPVenta.UpdateFinalizadoVtaCortes(CveCorte, TxtEfectivoEnCaja.Text.ToDouble, LblDiferenciaCaja.Text.ToDouble, NowADS(), UsuarioActual.CveEmpresa) Then
|
||||
RegistraScript($"window.location.href = '/Compras/PopUpVerFactura.aspx?P={Encripta(String.Format("OP=CORT&CVECORTE={0}&FORMATO={1}", CveCorte, "PDF"))}'", "Imprimir")
|
||||
Dim Liga As String = "document.location.href=""/Ventas/Ventas.aspx?CveVenta=-1"";"
|
||||
Alert("Se ha cerrado el turno correctamente.", TipoMensaje.MsgInformacion, Liga)
|
||||
@@ -3667,7 +3667,7 @@ Partial Class Ventas
|
||||
Private Sub BtnCerrarBloqueo_Click(sender As Object, e As EventArgs) Handles BtnCerrarBloqueo.Click
|
||||
Dim ObjPVenta As New ClsPuntoVenta
|
||||
If TxtEfectivoCajaBloqueo.Text.Trim <> "" Then
|
||||
If ObjPVenta.UpdateFinalizadoVtaCortes(CveCorte, TxtEfectivoCajaBloqueo.Text.ToDouble, LblDiferenciaCajaBloqueo.Text.ToDouble, Now, UsuarioActual.CveEmpresa) Then
|
||||
If ObjPVenta.UpdateFinalizadoVtaCortes(CveCorte, TxtEfectivoCajaBloqueo.Text.ToDouble, LblDiferenciaCajaBloqueo.Text.ToDouble, NowADS(), UsuarioActual.CveEmpresa) Then
|
||||
RegistraScript($"window.location.href = '/Compras/PopUpVerFactura.aspx?P={Encripta(String.Format("OP=CORT&CVECORTE={0}&FORMATO={1}", CveCorte, "PDF"))}'", "Imprimir")
|
||||
Dim Liga As String = "document.location.href=""/Ventas/Ventas.aspx?CveVenta=-1"";"
|
||||
Alert("Se ha cerrado el turno correctamente.", TipoMensaje.MsgInformacion, Liga)
|
||||
@@ -3723,7 +3723,7 @@ Partial Class Ventas
|
||||
If ObjContratos.DtResultados.FiltraParametros("Estatus = True").Rows.Count > 0 AndAlso (DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Ped") Or DdlTipoComprobante.SelectedValue.Contiene("Egs", "Dev")) Then
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(72, 80) Then
|
||||
DtContratos = ObjContratos.DtResultados.FiltraParametros($"Estatus = True AND FechaFinal >= '{Now.ToShortDateString}' AND FechaInicial <= '{Now.ToShortDateString}'")
|
||||
DtContratos = ObjContratos.DtResultados.FiltraParametros($"Estatus = True AND FechaFinal >= '{NowADS().ToShortDateString}' AND FechaInicial <= '{NowADS().ToShortDateString}'")
|
||||
Else
|
||||
DtContratos = ObjContratos.DtResultados.FiltraParametros($"Estatus = True ")
|
||||
End If
|
||||
@@ -4767,7 +4767,7 @@ Partial Class Ventas
|
||||
'If UsuarioActual.CveEmpresa = 119 And Not UsuarioActual.CveUsuario.Contiene(100, 1703) Then '[IPP] AD y Jesus de JAM
|
||||
' 'si es del mes anterior no permita cancelar
|
||||
' If Not DdlTipoComprobante.SelectedValue.Contiene("Rem") Then
|
||||
' If DbRowVenta("Fecha").ToString().ToDate <= Now.AddMonths(-1).LastDayOfMonth Then
|
||||
' If DbRowVenta("Fecha").ToString().ToDate <= NowADS().AddMonths(-1).LastDayOfMonth Then
|
||||
' LbCancelarDocumento.Visible = False
|
||||
' End If
|
||||
' End If
|
||||
@@ -5371,7 +5371,7 @@ Partial Class Ventas
|
||||
'End If
|
||||
ElseIf UsuarioActual.Empresa.TipoFacturacion = "CFDi" AndAlso DbRowVenta("SeTimbro").ToString() = "No" AndAlso DbRowVenta("CveEstatusFactura").ToString() = "2" AndAlso DbRowVenta("TipoDocto").ToString().Contiene("Ing", "Egs", "Dev", "Ant") Then
|
||||
TrEmitir.Visible = True
|
||||
If TxtFecha.Text.ToDate < Now.AddDays(-3) Then
|
||||
If TxtFecha.Text.ToDate < NowADS().AddDays(-3) Then
|
||||
TxtFecha.Enabled = True
|
||||
End If
|
||||
End If
|
||||
@@ -5604,11 +5604,11 @@ Partial Class Ventas
|
||||
DtUsadosPendientes = ObjUsados.DtResultados.Copy()
|
||||
End If
|
||||
|
||||
If ObjUsados.GetVentasGarantiaPendiente(CveVenta, Now, UsuarioActual.CveEmpresa) Then
|
||||
If ObjUsados.GetVentasGarantiaPendiente(CveVenta, NowADS(), UsuarioActual.CveEmpresa) Then
|
||||
DtGarantiasPendientes = ObjUsados.DtResultados.Copy()
|
||||
End If
|
||||
|
||||
'If ObjUsados.GetVentasGarantiaPendiente(CveVenta, -1, Now, UsuarioActual.CveEmpresa) Then
|
||||
'If ObjUsados.GetVentasGarantiaPendiente(CveVenta, -1, NowADS(), UsuarioActual.CveEmpresa) Then
|
||||
' DtGarantiasPendientes = ObjUsados.DtResultados.Copy()
|
||||
'End If
|
||||
|
||||
@@ -6008,7 +6008,7 @@ Partial Class Ventas
|
||||
End If
|
||||
'ObjVenta.Dispose()
|
||||
Else
|
||||
TxtFechaPago.Text = If(DdlTipoComprobante.SelectedValue = "Rem", Now.AddDays(PlazoCobranzaRemision), Now.AddDays(PlazoCobranza)).ToShortDateString
|
||||
TxtFechaPago.Text = If(DdlTipoComprobante.SelectedValue = "Rem", NowADS().AddDays(PlazoCobranzaRemision), NowADS().AddDays(PlazoCobranza)).ToShortDateString
|
||||
End If
|
||||
|
||||
CreaObjetosVentaDevolucion()
|
||||
@@ -6727,7 +6727,7 @@ Partial Class Ventas
|
||||
|
||||
TrVistaPrevia.Visible = True
|
||||
|
||||
TxtFechaPago.Text = If(DdlTipoComprobante.SelectedValue = "Rem", Now.AddDays(PlazoCobranzaRemision), Now.AddDays(PlazoCobranza)).ToShortDateString
|
||||
TxtFechaPago.Text = If(DdlTipoComprobante.SelectedValue = "Rem", NowADS().AddDays(PlazoCobranzaRemision), NowADS().AddDays(PlazoCobranza)).ToShortDateString
|
||||
|
||||
' si es empresa acumuladores
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
@@ -7088,7 +7088,7 @@ Partial Class Ventas
|
||||
TieneBloqueoPorAutorizacion = 1
|
||||
End If
|
||||
|
||||
TxtFechaPago.Text = Now.AddDays(PlazoCobranza).ToShortDateString
|
||||
TxtFechaPago.Text = NowADS().AddDays(PlazoCobranza).ToShortDateString
|
||||
|
||||
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Ing"))
|
||||
If Not UsuarioActual.TienePermisoProceso(325) Then
|
||||
@@ -7153,7 +7153,7 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
TxtFechaPago.Text = Now.AddDays(PlazoCobranza).ToShortDateString
|
||||
TxtFechaPago.Text = NowADS().AddDays(PlazoCobranza).ToShortDateString
|
||||
'si llegó por la opción de cotización no debe de restringuir
|
||||
If IfNull(Request("Op"), "").ToString() = "Cot" OrElse (DdlTipoComprobante.SelectedValue = "Cot" AndAlso CveVenta > 0) Then DdlTipoComprobante.SelectedValue = "Cot"
|
||||
|
||||
@@ -7219,7 +7219,7 @@ Partial Class Ventas
|
||||
If EsCotizacion Then
|
||||
DdlTipoComprobante.SelectedValueExistInsert("Cot", "Cotización")
|
||||
End If
|
||||
TxtFechaPago.Text = If(DdlTipoComprobante.SelectedValue = "Rem", Now.AddDays(PlazoCobranzaRemision), Now.AddDays(PlazoCobranza)).ToShortDateString
|
||||
TxtFechaPago.Text = If(DdlTipoComprobante.SelectedValue = "Rem", NowADS().AddDays(PlazoCobranzaRemision), NowADS().AddDays(PlazoCobranza)).ToShortDateString
|
||||
|
||||
If EsCotizacion AndAlso UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
Dim Autorizacion As Integer = 0
|
||||
@@ -7279,7 +7279,7 @@ Partial Class Ventas
|
||||
DdlTipoComprobante.SelectedValue = "PA"
|
||||
TieneBloqueoPorAutorizacion = 1
|
||||
|
||||
TxtFechaPago.Text = Now.AddDays(PlazoCobranza).ToShortDateString
|
||||
TxtFechaPago.Text = NowADS().AddDays(PlazoCobranza).ToShortDateString
|
||||
'si llegó por la opción de cotización no debe de restringuir
|
||||
If IfNull(Request("Op"), "").ToString() = "Cot" OrElse (DdlTipoComprobante.SelectedValue = "Cot" AndAlso CveVenta > 0) Then DdlTipoComprobante.SelectedValue = "Cot"
|
||||
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Ing"))
|
||||
@@ -7830,7 +7830,11 @@ Partial Class Ventas
|
||||
If e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5 Then
|
||||
'MODO EDICION
|
||||
|
||||
e.Row.FCDropDownList("DdlUnidadMedida").DataSource = GlobalDTProductosServiciosEquivalencias(e.Row.DBCampo("CvePS").ToEntero(), -1, UsuarioActual.CveEmpresa)
|
||||
If UsuarioActual.Empresa.UsaInventarios Then
|
||||
e.Row.FCDropDownList("DdlUnidadMedida").DataSource = GlobalDTProductosServiciosEquivalencias(e.Row.DBCampo("CvePS").ToEntero(), -1, UsuarioActual.CveEmpresa)
|
||||
Else
|
||||
e.Row.FCDropDownList("DdlUnidadMedida").DataSource = GlobalDTUnidadesMedida(UsuarioActual.CveEmpresa)
|
||||
End If
|
||||
e.Row.FCDropDownList("DdlUnidadMedida").DataBind()
|
||||
e.Row.FCDropDownList("DdlUnidadMedida").SelectedValueExist(e.Row.DBCampo("CveUM"))
|
||||
|
||||
@@ -8904,9 +8908,9 @@ Partial Class Ventas
|
||||
DdlTipoComprobante.SelectedValue = "Ing"
|
||||
|
||||
EraCotizacion = 1
|
||||
TxtFecha.Text = Now.ToString()
|
||||
TxtFechaPago.Text = If(DdlTipoComprobante.SelectedValue = "Rem", Now.AddDays(PlazoCobranza), Now.AddDays(PlazoCobranza)).ToShortDateString
|
||||
TxtFechaEjecucion.Text = Now.ToString()
|
||||
TxtFecha.Text = NowADS().ToString()
|
||||
TxtFechaPago.Text = If(DdlTipoComprobante.SelectedValue = "Rem", NowADS().AddDays(PlazoCobranza), NowADS().AddDays(PlazoCobranza)).ToShortDateString
|
||||
TxtFechaEjecucion.Text = NowADS().ToString()
|
||||
|
||||
'debo de regenerar los folios, para facturar
|
||||
CargaFolios()
|
||||
@@ -10538,7 +10542,7 @@ Partial Class Ventas
|
||||
'ObjFacturaDevolucion.RefDocto = TxtDocto.Text.Trim
|
||||
'ObjFacturaDevolucion.Folio = If(ExFolioFactura, FolioXML.ToEntero(), -1)
|
||||
ObjFacturaDevolucion.Serie = LblSerie.Text
|
||||
ObjFacturaDevolucion.Fecha = New Date(TxtFecha.Text.Trim.ToDate.Year, TxtFecha.Text.Trim.ToDate.Month, TxtFecha.Text.Trim.ToDate.Day, Now.Hour, Now.Minute, Now.Second)
|
||||
ObjFacturaDevolucion.Fecha = New Date(TxtFecha.Text.Trim.ToDate.Year, TxtFecha.Text.Trim.ToDate.Month, TxtFecha.Text.Trim.ToDate.Day, NowADS().Hour, NowADS().Minute, NowADS().Second)
|
||||
ObjFacturaDevolucion.CvePrePoliza = -1
|
||||
ObjFacturaDevolucion.CveMetodoPago = 0 'DdlMetodoPago.SelectedValue.ToEntero()
|
||||
ObjFacturaDevolucion.MetodoPago = ""
|
||||
@@ -10568,7 +10572,7 @@ Partial Class Ventas
|
||||
|
||||
End If
|
||||
|
||||
ObjFacturaDevolucion.Fecha = Now
|
||||
ObjFacturaDevolucion.Fecha = NowADS()
|
||||
ObjFacturaDevolucion.Version = "4.0"
|
||||
If ObjFacturaDevolucion.Cliente Is Nothing Then ObjFacturaDevolucion.Cliente = New Modelos.ClienteModel
|
||||
ObjFacturaDevolucion.Cliente.CodigoRegimenFiscal = ClienteCodigoRegimenFiscal
|
||||
@@ -10811,7 +10815,7 @@ Partial Class Ventas
|
||||
'ObjFacturaDevolucion.RefDocto = TxtDocto.Text.Trim
|
||||
'ObjFacturaDevolucion.Folio = If(ExFolioFactura, FolioXML.ToEntero(), -1)
|
||||
ObjFacturaBonificacion.Serie = LblSerie.Text
|
||||
ObjFacturaBonificacion.Fecha = New Date(TxtFecha.Text.Trim.ToDate.Year, TxtFecha.Text.Trim.ToDate.Month, TxtFecha.Text.Trim.ToDate.Day, Now.Hour, Now.Minute, Now.Second)
|
||||
ObjFacturaBonificacion.Fecha = New Date(TxtFecha.Text.Trim.ToDate.Year, TxtFecha.Text.Trim.ToDate.Month, TxtFecha.Text.Trim.ToDate.Day, NowADS().Hour, NowADS().Minute, NowADS().Second)
|
||||
ObjFacturaBonificacion.CvePrePoliza = -1
|
||||
ObjFacturaBonificacion.CveMetodoPago = 0 'DdlMetodoPago.SelectedValue.ToEntero()
|
||||
ObjFacturaBonificacion.MetodoPago = ""
|
||||
@@ -10840,7 +10844,7 @@ Partial Class Ventas
|
||||
ObjFolios.Dispose()
|
||||
|
||||
End If
|
||||
ObjFacturaBonificacion.Fecha = Now
|
||||
ObjFacturaBonificacion.Fecha = NowADS()
|
||||
|
||||
ObjFacturaBonificacion.Version = "4.0"
|
||||
|
||||
@@ -11315,7 +11319,7 @@ Partial Class Ventas
|
||||
|
||||
End If
|
||||
|
||||
ObjFactura.Fecha = New Date(TxtFecha.Text.Trim.ToDate.Year, TxtFecha.Text.Trim.ToDate.Month, TxtFecha.Text.Trim.ToDate.Day, Now.Hour, Now.Minute, Now.Second)
|
||||
ObjFactura.Fecha = New Date(TxtFecha.Text.Trim.ToDate.Year, TxtFecha.Text.Trim.ToDate.Month, TxtFecha.Text.Trim.ToDate.Day, NowADS().Hour, NowADS().Minute, NowADS().Second)
|
||||
ObjFactura.CvePrePoliza = -1
|
||||
ObjFactura.CveMetodoPago = 0 'DdlMetodoPago.SelectedValue.ToEntero()
|
||||
ObjFactura.MetodoPago = "" ' DdlMetodoPago.SelectedItem.Text
|
||||
@@ -11384,7 +11388,7 @@ Partial Class Ventas
|
||||
If divcondicionespago.Visible Then
|
||||
ObjFactura.FechaPago = TxtFechaPago.Text.ToDate
|
||||
Else
|
||||
ObjFactura.FechaPago = Now
|
||||
ObjFactura.FechaPago = NowADS()
|
||||
End If
|
||||
|
||||
ObjFactura.DiasCredito = DiasCredito
|
||||
@@ -11936,7 +11940,7 @@ Partial Class Ventas
|
||||
'ObjFacturaDevolucion.Folio = If(ExFolioFactura, FolioXML.ToEntero(), -1)
|
||||
ObjFacturaDevolucion.Serie = LblSerie.Text
|
||||
|
||||
ObjFacturaDevolucion.Fecha = New Date(TxtFecha.Text.Trim.ToDate.Year, TxtFecha.Text.Trim.ToDate.Month, TxtFecha.Text.Trim.ToDate.Day, Now.Hour, Now.Minute, Now.Second)
|
||||
ObjFacturaDevolucion.Fecha = New Date(TxtFecha.Text.Trim.ToDate.Year, TxtFecha.Text.Trim.ToDate.Month, TxtFecha.Text.Trim.ToDate.Day, NowADS().Hour, NowADS().Minute, NowADS().Second)
|
||||
ObjFacturaDevolucion.CvePrePoliza = -1
|
||||
ObjFacturaDevolucion.CveMetodoPago = 0 'DdlMetodoPago.SelectedValue.ToEntero()
|
||||
ObjFacturaDevolucion.MetodoPago = "" 'DdlMetodoPago.SelectedItem.Text
|
||||
@@ -11966,7 +11970,7 @@ Partial Class Ventas
|
||||
|
||||
End If
|
||||
|
||||
ObjFacturaDevolucion.Fecha = Now
|
||||
ObjFacturaDevolucion.Fecha = NowADS()
|
||||
|
||||
|
||||
'VALORES DEFAULT DE NC-DEV
|
||||
@@ -12888,7 +12892,7 @@ Partial Class Ventas
|
||||
If Not TieneContrato Then
|
||||
If ObjContratos.GetContratos(-1, UsuarioActual.CveEmpresa, CveCliente, -1, 1) Then
|
||||
If ObjContratos.DtResultados.FiltraParametros("Estatus = True").Rows.Count > 0 AndAlso (DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Ped") Or DdlTipoComprobante.SelectedValue.Contiene("Egs", "Dev")) Then
|
||||
DtContratos = ObjContratos.DtResultados.FiltraParametros($"Estatus = True AND FechaFinal >= '{Now.ToShortDateString}' AND FechaInicial <= '{Now.ToShortDateString}'")
|
||||
DtContratos = ObjContratos.DtResultados.FiltraParametros($"Estatus = True AND FechaFinal >= '{NowADS().ToShortDateString}' AND FechaInicial <= '{NowADS().ToShortDateString}'")
|
||||
DdlContratosOC.DataSource = DtContratos
|
||||
DdlContratosOC.DataBind()
|
||||
|
||||
@@ -13285,7 +13289,7 @@ Partial Class Ventas
|
||||
Dim Cargo As Decimal = Cantidad * ImporteCargoOriginal
|
||||
Dim Bonificacion As Decimal = 0
|
||||
|
||||
If Not ObjAcum.DistribuidorMovtosAdd(factura.CveCliente, Cantidad, CveTamanio, Puntos, Cargo, Bonificacion, 6, factura.CveVenta, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0D, "", Now) Then
|
||||
If Not ObjAcum.DistribuidorMovtosAdd(factura.CveCliente, Cantidad, CveTamanio, Puntos, Cargo, Bonificacion, 6, factura.CveVenta, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0D, "", NowADS()) Then
|
||||
ErrorList.Add("Ocurrió un error al agregar el movimiento de distribuidor.")
|
||||
Exit For
|
||||
End If
|
||||
@@ -13304,7 +13308,7 @@ Partial Class Ventas
|
||||
Dim Puntos As Decimal = 0
|
||||
Dim Cargo As Decimal = 0
|
||||
|
||||
If Not ObjAcum.DistribuidorMovtosAdd(factura.CveCliente, Cantidad, CveTamanio, Puntos, Cargo, ImporteBonificacion, 6, factura.CveVenta, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0D, "", Now) Then
|
||||
If Not ObjAcum.DistribuidorMovtosAdd(factura.CveCliente, Cantidad, CveTamanio, Puntos, Cargo, ImporteBonificacion, 6, factura.CveVenta, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0D, "", NowADS()) Then
|
||||
ErrorList.Add("Ocurrió un error al agregar el movimiento de distribuidor.")
|
||||
Exit For
|
||||
End If
|
||||
@@ -13333,7 +13337,7 @@ Partial Class Ventas
|
||||
' Cargo = 0
|
||||
' End If
|
||||
|
||||
' If Not ObjAcum.DistribuidorMovtosAdd(factura.CveCliente, Cantidad, CveTamanio, Puntos, Cargo, Bonificacion, 6, factura.CveVenta, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0D, "", Now) Then
|
||||
' If Not ObjAcum.DistribuidorMovtosAdd(factura.CveCliente, Cantidad, CveTamanio, Puntos, Cargo, Bonificacion, 6, factura.CveVenta, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0D, "", NowADS()) Then
|
||||
' ErrorList.Add("Ocurrió un error al agregar la venta detalle devolución.")
|
||||
' Exit For
|
||||
' End If
|
||||
@@ -15105,7 +15109,7 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
If Not OcurrioError Then
|
||||
If ContabilizaMovimientoAlmacen(ObjConta, Now, ObjFactura.SerieFolio, "Ventas/Rem", CveMovimientoSalidaPorTraspaso, CveMovimientoEntrada, TotalPrePoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False) <= 0 Then
|
||||
If ContabilizaMovimientoAlmacen(ObjConta, NowADS(), ObjFactura.SerieFolio, "Ventas/Rem", CveMovimientoSalidaPorTraspaso, CveMovimientoEntrada, TotalPrePoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False) <= 0 Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
End If
|
||||
@@ -15655,7 +15659,7 @@ Partial Class Ventas
|
||||
'If FechaMaxima < "01/01/2018".ToDate And UsuarioActual.CveEmpresa = 119 Then
|
||||
' FechaMaxima = "01/01/2018".ToDate
|
||||
'End If
|
||||
'Dim Now As DateTime = New DateTime(2020, 2, 19)
|
||||
'Dim NowADS() As DateTime = New DateTime(2020, 2, 19)
|
||||
Try
|
||||
CvePrePoliza = ObjConta.AddPrePolizas("Ventas/Anticipos", CvePlantillaPoliza, TxtTotal.Text.ToDecimal, TxtTotal.Text.ToDecimal, DdlMoneda.SelectedValue.ToEntero(), TxtFechaAnticipoCliente.Text.ToDate, String.Format("{0} {1} {2}-{3}", If(EsAnticipo2017Jam, "Aplicación Anticipo 2017", ""), NombreCliente, Serie, TxtFolio.Text), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
|
||||
@@ -15677,7 +15681,7 @@ Partial Class Ventas
|
||||
|
||||
Dim FechaUltimaFluctuacion As Date = MinFecha
|
||||
Dim TipoCambioFluctuacion As Decimal = 1
|
||||
Dim tFecha As Date = Now
|
||||
Dim tFecha As Date = NowADS()
|
||||
Dim UltimaFluctuacion As MTipoCambioFluctuacion = GlobalTipoCambioUltimaFluctuacion(tFecha)
|
||||
|
||||
|
||||
@@ -16028,7 +16032,7 @@ Partial Class Ventas
|
||||
Private Function AgregarPrePolizasXTrasladar(ObjConta As ClsContabilidad, CvePrePoliza As Integer, PorcentajeAmortizacion As Decimal, TipoCambio As Decimal, ByRef CuentasContablesInvalidas As StringBuilder, ByRef CveCuentaContabilizacion As Integer, Importe13 As Decimal, Importe8 As Decimal, Importe9 As Decimal) As Boolean
|
||||
Dim ImporteMovimiento As Decimal
|
||||
Dim ImporteMX As Decimal
|
||||
Dim FechaMovimiento As Date = Now
|
||||
Dim FechaMovimiento As Date = NowADS()
|
||||
Dim Concepto As String = ViewState("VentaFolio").ToString()
|
||||
Dim PrePolizaCorrecta As Boolean = True
|
||||
'13 Iva x Trasladar
|
||||
@@ -16069,7 +16073,7 @@ Partial Class Ventas
|
||||
|
||||
Dim ImporteMovimiento As Decimal
|
||||
Dim ImporteMX As Decimal
|
||||
Dim FechaMovimiento As Date = Now
|
||||
Dim FechaMovimiento As Date = NowADS()
|
||||
Dim Concepto As String = ViewState("VentaFolio").ToString()
|
||||
Dim PrePolizaCorrecta As Boolean = True
|
||||
Dim PorcentajeImpuesto As Decimal
|
||||
@@ -16414,7 +16418,7 @@ Partial Class Ventas
|
||||
' End If
|
||||
|
||||
|
||||
' CvePrePoliza = ObjConta.AddPrePolizas("Ventas/GuardaEstatus", CvePlantillaPoliza, TxtTotal.Text.ToDouble, TxtTotal.Text.Replace(",", "").ToDouble, DdlMoneda.SelectedValue.ToEntero(), Now, NombreCliente, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
' CvePrePoliza = ObjConta.AddPrePolizas("Ventas/GuardaEstatus", CvePlantillaPoliza, TxtTotal.Text.ToDouble, TxtTotal.Text.Replace(",", "").ToDouble, DdlMoneda.SelectedValue.ToEntero(), NowADS(), NombreCliente, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
' ObjFacturaDevolucion.CveVenta = CveVenta
|
||||
' ObjFacturaDevolucion.CvePrePoliza = CvePrePoliza
|
||||
|
||||
@@ -16437,7 +16441,7 @@ Partial Class Ventas
|
||||
|
||||
' If CveEstatus = 4 Then
|
||||
|
||||
' If ObjVentas.UpdateEstatusFactura(CveEstatus, FolioFiscal, "", Now, CveVenta, IDPoliza) Then
|
||||
' If ObjVentas.UpdateEstatusFactura(CveEstatus, FolioFiscal, "", NowADS(), CveVenta, IDPoliza) Then
|
||||
' Mensaje = "El nuevo estatus se guardó correctamente"
|
||||
' Else
|
||||
' ErrorCancelar = True
|
||||
@@ -16459,7 +16463,7 @@ Partial Class Ventas
|
||||
' Dim Total As Decimal = TxtTotal.Text.ToDecimal
|
||||
' Dim RFCReceptor As String = HdnRFCVenta.Value
|
||||
|
||||
' If Not ObjVentas.UpdateEstatusFactura(13, FolioFiscal, "", Now, CveVenta, IDPoliza) Then 'Marcamos la factura como refacturada, si no se cancelo en el SAT el estatus nos dejara cancelarla despues
|
||||
' If Not ObjVentas.UpdateEstatusFactura(13, FolioFiscal, "", NowADS(), CveVenta, IDPoliza) Then 'Marcamos la factura como refacturada, si no se cancelo en el SAT el estatus nos dejara cancelarla despues
|
||||
' ErrorCancelar = True
|
||||
' End If
|
||||
' Dim RespCancelacion = ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscal, Total, RFCReceptor, UsuarioActual.Empresa.RFC)
|
||||
@@ -16476,7 +16480,7 @@ Partial Class Ventas
|
||||
' End If
|
||||
|
||||
' If Not ErrorCancelar Then
|
||||
' If ObjVentas.UpdateEstatusFactura(CveEstatus, FolioFiscal, ObjCancelacion.CancelacionAcuse, Now, CveVenta, IDPoliza, CvePAC:=UsuarioActual.Empresa.CvePAC) Then
|
||||
' If ObjVentas.UpdateEstatusFactura(CveEstatus, FolioFiscal, ObjCancelacion.CancelacionAcuse, NowADS(), CveVenta, IDPoliza, CvePAC:=UsuarioActual.Empresa.CvePAC) Then
|
||||
' Mensaje = "El nuevo estatus se guardó correctamente"
|
||||
' Else
|
||||
' ErrorCancelar = True
|
||||
@@ -16514,7 +16518,7 @@ Partial Class Ventas
|
||||
' End If
|
||||
|
||||
|
||||
' CvePrePoliza = ObjConta.AddPrePolizas("Ventas/GuardaEstatus", CvePlantillaPoliza, TxtTotal.Text.ToDouble, TxtTotal.Text.Replace(",", "").ToDouble, DdlMoneda.SelectedValue.ToEntero(), Now, NombreCliente, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
' CvePrePoliza = ObjConta.AddPrePolizas("Ventas/GuardaEstatus", CvePlantillaPoliza, TxtTotal.Text.ToDouble, TxtTotal.Text.Replace(",", "").ToDouble, DdlMoneda.SelectedValue.ToEntero(), NowADS(), NombreCliente, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
' ObjFactura.CveVenta = CveVenta
|
||||
' ObjFactura.CvePrePoliza = CvePrePoliza
|
||||
|
||||
@@ -16528,7 +16532,7 @@ Partial Class Ventas
|
||||
|
||||
' If CveEstatus = 4 Then
|
||||
|
||||
' If ObjVentas.UpdateEstatusFactura(CveEstatus, FolioFiscal, "", Now, CveVenta, IDPoliza) Then
|
||||
' If ObjVentas.UpdateEstatusFactura(CveEstatus, FolioFiscal, "", NowADS(), CveVenta, IDPoliza) Then
|
||||
' Mensaje = "El nuevo estatus se guardó correctamente"
|
||||
' Else
|
||||
' ErrorCancelar = True
|
||||
@@ -16853,7 +16857,7 @@ Partial Class Ventas
|
||||
'RBLPago.Enabled = False
|
||||
RBLPago.SelectedValue = "2"
|
||||
RBLPago_SelectedIndexChanged(RBLPago, EventArgs.Empty)
|
||||
TxtFechaVencimientoCotizacion.Text = Now.ToString()
|
||||
TxtFechaVencimientoCotizacion.Text = NowADS().ToString()
|
||||
GvPS.Columns(5).Visible = True
|
||||
ThTiempoEntrega.Visible = True
|
||||
ThTiempoEntrega2.Visible = True
|
||||
@@ -16872,7 +16876,7 @@ Partial Class Ventas
|
||||
TrRFC.Visible = False
|
||||
'RBLPago.Enabled = False
|
||||
'RBLPago.SelectedValue = "2"
|
||||
TxtFechaVencimientoCotizacion.Text = Now.ToString()
|
||||
TxtFechaVencimientoCotizacion.Text = NowADS().ToString()
|
||||
GvPS.Columns(5).Visible = True
|
||||
ThTiempoEntrega.Visible = True
|
||||
ThTiempoEntrega2.Visible = True
|
||||
@@ -16984,7 +16988,7 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
|
||||
TxtFechaPago.Text = Now.AddDays(PlazoCobranza).ToShortDateString
|
||||
TxtFechaPago.Text = NowADS().AddDays(PlazoCobranza).ToShortDateString
|
||||
|
||||
DdlLineaAdicional_SelectedIndexChanged(DdlLineaAdicional, EventArgs.Empty)
|
||||
|
||||
@@ -17959,7 +17963,7 @@ Partial Class Ventas
|
||||
If ObjVentas.GetLineasAdicionalesSaldo(-1, CveCliente, -1, -1, UsuarioActual.CveEmpresa, TipoCambioConsulta:=TCConsulta, ConSaldo:=-1, FechaVencimientoConsulta:=MinFecha) Then
|
||||
If ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||
TrLineaAdicional.Visible = True
|
||||
DdlLineaAdicional.DataSource = ObjVentas.DtResultados.FiltraParametros($"(Saldo > 0 AND FechaVencimiento >= '{Now.ToString("yyyy/MM/dd")}') OR CveLineaAdicional = {Me.CveLineaAdicionalVenta}")
|
||||
DdlLineaAdicional.DataSource = ObjVentas.DtResultados.FiltraParametros($"(Saldo > 0 AND FechaVencimiento >= '{NowADS().ToString("yyyy/MM/dd")}') OR CveLineaAdicional = {Me.CveLineaAdicionalVenta}")
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
@@ -17972,7 +17976,7 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
If ObjVentas.GetLineasAdicionalesSaldo(-1, CveCliente, -1, -1, UsuarioActual.CveEmpresa, TipoCambioConsulta:=TCConsulta, ConSaldo:=1, FechaVencimientoConsulta:=Now) Then
|
||||
If ObjVentas.GetLineasAdicionalesSaldo(-1, CveCliente, -1, -1, UsuarioActual.CveEmpresa, TipoCambioConsulta:=TCConsulta, ConSaldo:=1, FechaVencimientoConsulta:=NowADS()) Then
|
||||
If ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||
TrLineaAdicional.Visible = True
|
||||
DdlLineaAdicional.DataSource = ObjVentas.DtResultados
|
||||
@@ -18637,7 +18641,7 @@ Partial Class Ventas
|
||||
'End Sub
|
||||
'Private Sub ActualizaEstatus(CveEstatus As Integer, FolioFiscal As String, CveVenta As Integer)
|
||||
' Dim ObjVentas As New ClsVentas()
|
||||
' ObjVentas.UpdateEstatusFactura(CveEstatus, FolioFiscal, "", Now, CveVenta)
|
||||
' ObjVentas.UpdateEstatusFactura(CveEstatus, FolioFiscal, "", NowADS(), CveVenta)
|
||||
' ObjVentas.Dispose()
|
||||
'End Sub
|
||||
'Private Sub ActualizaCliente(NumCtaPago As String, MetodoDePago As Integer, CveCliente As Integer)
|
||||
@@ -19886,7 +19890,7 @@ Partial Class Ventas
|
||||
Optional CveAlmacenDestino As Integer = -1) As Integer
|
||||
Dim OcurrioError As Boolean = False
|
||||
Dim ContadorMovtosDetalles As Integer = 0
|
||||
Dim CveMovimientoInventario As Integer = ObjInventario.AddMovimiento(CveAlmacen, ConceptoEntrada, CveMoneda, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta, -1, -1,
|
||||
Dim CveMovimientoInventario As Integer = ObjInventario.AddMovimiento(CveAlmacen, ConceptoEntrada, CveMoneda, NowADS(), -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta, -1, -1,
|
||||
CveMovimientoRelacionado:=CveMovimientoRelacionado, CveAlmacenDestino:=CveAlmacenDestino, Modulo:="Vta/E4")
|
||||
|
||||
If CveMovimientoInventario > 0 Then
|
||||
@@ -20757,7 +20761,7 @@ Partial Class Ventas
|
||||
Dim x509 As New X509Certificate2()
|
||||
x509.Import(Data)
|
||||
|
||||
If x509.NotAfter <= Now() Then
|
||||
If x509.NotAfter <= NowADS() Then
|
||||
TrVistaPrevia.Visible = False
|
||||
TrEmitir.Visible = False
|
||||
BtnEmitirImprimir.Visible = False
|
||||
@@ -21716,7 +21720,7 @@ Partial Class Ventas
|
||||
|
||||
Select Case RBLPago.SelectedValue.ToEntero()
|
||||
Case 1 'CREDITO
|
||||
TxtFechaPago.Text = If(DdlTipoComprobante.SelectedValue = "Rem", Now.AddDays(PlazoCobranzaRemision), Now.AddDays(PlazoCobranza)).ToShortDateString
|
||||
TxtFechaPago.Text = If(DdlTipoComprobante.SelectedValue = "Rem", NowADS().AddDays(PlazoCobranzaRemision), NowADS().AddDays(PlazoCobranza)).ToShortDateString
|
||||
'SI ES CREDITO EL METODO DE PAGO DEBE SER PPD
|
||||
If UsuarioActual.Empresa.Funcionalidad(589) = "1" Then
|
||||
DdlMetodoPago33.SelectedValueExist("3")
|
||||
@@ -21754,7 +21758,7 @@ Partial Class Ventas
|
||||
End If
|
||||
TxtImporteContado.Text = TxtTotal.Text
|
||||
End If
|
||||
TxtFechaPago.Text = Now.ToShortDateString
|
||||
TxtFechaPago.Text = NowADS().ToShortDateString
|
||||
'SI ES CONTADO EL METODO DE PAGO DEBE SER PUE
|
||||
If UsuarioActual.Empresa.Funcionalidad(589) = "1" Then
|
||||
DdlMetodoPago33.SelectedValueExist("1")
|
||||
@@ -21784,7 +21788,7 @@ Partial Class Ventas
|
||||
End If
|
||||
Case 3 ' TERMINAL
|
||||
DivTerminal.Visible = True
|
||||
TxtFechaPago.Text = If(DdlTipoComprobante.SelectedValue = "Rem", Now.AddDays(PlazoCobranzaRemision), Now.AddDays(PlazoCobranza)).ToShortDateString
|
||||
TxtFechaPago.Text = If(DdlTipoComprobante.SelectedValue = "Rem", NowADS().AddDays(PlazoCobranzaRemision), NowADS().AddDays(PlazoCobranza)).ToShortDateString
|
||||
End Select
|
||||
|
||||
LimpiaContado()
|
||||
@@ -22792,7 +22796,7 @@ Partial Class Ventas
|
||||
' Exit Sub
|
||||
'End If
|
||||
|
||||
If CveVenta > 0 AndAlso (SaldoVenta = TxtTotal.Text.ToDecimal OrElse DdlTipoComprobante.SelectedValue = "Dev" OrElse (DdlTipoComprobante.SelectedValue = "Ped" AndAlso TmpDT IsNot Nothing AndAlso TmpDT.COUNT("CveContratoDetalle", "CveContratoDetalle > 0") > 0)) Then 'And (DdlTipoComprobante.SelectedValue.Contiene({"Rem", "Ped"}) Or (DdlTipoComprobante.SelectedValue.Contiene({"Ing"}) And TxtFecha.Text.ToDate.Month = Now.Month And TxtFecha.Text.ToDate.Year = Now.Year)) Then
|
||||
If CveVenta > 0 AndAlso (SaldoVenta = TxtTotal.Text.ToDecimal OrElse DdlTipoComprobante.SelectedValue = "Dev" OrElse (DdlTipoComprobante.SelectedValue = "Ped" AndAlso TmpDT IsNot Nothing AndAlso TmpDT.COUNT("CveContratoDetalle", "CveContratoDetalle > 0") > 0)) Then 'And (DdlTipoComprobante.SelectedValue.Contiene({"Rem", "Ped"}) Or (DdlTipoComprobante.SelectedValue.Contiene({"Ing"}) And TxtFecha.Text.ToDate.Month = NowADS().Month And TxtFecha.Text.ToDate.Year = NowADS().Year)) Then
|
||||
|
||||
If Not DevolucionAlmacen = 2 Then
|
||||
'If UsuarioActual.Empresa.Funcionalidad(555) = "1" Then
|
||||
@@ -23303,7 +23307,7 @@ Partial Class Ventas
|
||||
Dim ActualizoEstatus As Boolean = False
|
||||
|
||||
Dim ObjVentas As New ClsVentas
|
||||
If ObjVentas.UpdateEstatusFactura(8, FolioFiscal, "", Now, CveVenta) Then
|
||||
If ObjVentas.UpdateEstatusFactura(8, FolioFiscal, "", NowADS(), CveVenta) Then
|
||||
ActualizoEstatus = True
|
||||
End If
|
||||
ObjVentas.Dispose()
|
||||
@@ -23724,7 +23728,7 @@ Partial Class Ventas
|
||||
' Exit Sub
|
||||
' End If
|
||||
' Else
|
||||
' CancelacionFecha = Now.Date
|
||||
' CancelacionFecha = NowADS().Date
|
||||
' CancelacionAcuse = ""
|
||||
' End If
|
||||
|
||||
@@ -23819,7 +23823,7 @@ Partial Class Ventas
|
||||
' End Try
|
||||
|
||||
' ElseIf CveEstatusCancelacion = 20 Then
|
||||
' If ObjVentas.UpdateEstatusFactura(CveEstatus, FolioFiscal, "", Now, CveVenta) Then
|
||||
' If ObjVentas.UpdateEstatusFactura(CveEstatus, FolioFiscal, "", NowADS(), CveVenta) Then
|
||||
' Alert("El estatus de la factura fue cambiado a 'Cancelación en Proceso'")
|
||||
' End If
|
||||
' ObjVentas.Dispose()
|
||||
@@ -24047,11 +24051,11 @@ Partial Class Ventas
|
||||
Dim Plantilla As String = texto
|
||||
|
||||
If Plantilla.Contains("{DIA}") Then
|
||||
Plantilla = Plantilla.Replace("{DIA}", DateTime.Now.Day.ToString())
|
||||
Plantilla = Plantilla.Replace("{DIA}", NowADS().Day.ToString())
|
||||
End If
|
||||
|
||||
If Plantilla.Contains("{MES}") Then
|
||||
Dim fecha As DateTime = DateTime.Now
|
||||
Dim fecha As DateTime = NowADS()
|
||||
Dim formatoFecha = Globalization.CultureInfo.CurrentCulture.DateTimeFormat
|
||||
Dim nombreMes As String = formatoFecha.GetMonthName(fecha.Month).ToUpper()
|
||||
|
||||
@@ -24059,15 +24063,15 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
If Plantilla.Contains("{AÑO}") Then
|
||||
Plantilla = Plantilla.Replace("{AÑO}", DateTime.Now.Year.ToString())
|
||||
Plantilla = Plantilla.Replace("{AÑO}", NowADS().Year.ToString())
|
||||
End If
|
||||
|
||||
If Plantilla.Contains("{TC}") Then
|
||||
Plantilla = Plantilla.Replace("{TC}", GlobalTipoCambio(Now).FormatoNumero)
|
||||
Plantilla = Plantilla.Replace("{TC}", GlobalTipoCambio(NowADS()).FormatoNumero)
|
||||
End If
|
||||
|
||||
If Plantilla.Contains("{MESANTERIOR}") Then
|
||||
Dim fecha As DateTime = DateTime.Now.AddMonths(-1)
|
||||
Dim fecha As DateTime = NowADS().AddMonths(-1)
|
||||
Dim formatoFecha = Globalization.CultureInfo.CurrentCulture.DateTimeFormat
|
||||
Dim nombreMes As String = formatoFecha.GetMonthName(fecha.Month).ToUpper()
|
||||
|
||||
@@ -24075,7 +24079,7 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
If Plantilla.Contains("{INICIOMESANTERIOR}") Then
|
||||
Dim fecha As DateTime = DateTime.Now.AddMonths(-1)
|
||||
Dim fecha As DateTime = NowADS().AddMonths(-1)
|
||||
Dim formatoFecha = Globalization.CultureInfo.CurrentCulture.DateTimeFormat
|
||||
Dim nombreMes As String = formatoFecha.GetMonthName(fecha.Month).ToUpper()
|
||||
|
||||
@@ -24085,7 +24089,7 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
If Plantilla.Contains("{FINMESANTERIOR}") Then
|
||||
Dim fecha As DateTime = DateTime.Now.AddMonths(-1)
|
||||
Dim fecha As DateTime = NowADS().AddMonths(-1)
|
||||
Dim formatoFecha = Globalization.CultureInfo.CurrentCulture.DateTimeFormat
|
||||
Dim nombreMes As String = formatoFecha.GetMonthName(fecha.Month).ToUpper()
|
||||
|
||||
@@ -24473,7 +24477,7 @@ Partial Class Ventas
|
||||
HdnCveCliente.Value = CveCliente.ToString()
|
||||
ViewState("CveCliente") = CveCliente
|
||||
CargaCliente(CveCliente, -1) 'Estatus activo, se requiere para cargar una factura en la que el cliente a sido eliminado
|
||||
TxtFecha.Text = Now.ToShortDateString
|
||||
TxtFecha.Text = NowADS().ToShortDateString
|
||||
|
||||
'TxtSubTotal.Text = DbRowVenta("SubTotal").ToString().FormatoNumero(2)
|
||||
'LblDescuentos.Text = DbRowVenta("Descuento").ToString().FormatoNumero(2)
|
||||
@@ -25310,7 +25314,7 @@ Partial Class Ventas
|
||||
' Dim ObjVentas As New ClsVentas
|
||||
' Dim dtt As DataTable = Nothing
|
||||
' If ObjVentas.GetVentas(UsuarioActual.CveEmpresa, "-1", "-1", -1, "-1", CveCliente, -1, 3, -1,
|
||||
' Now.AddYears(-1).ToShortDateString, Now.ToShortDateString, "-1", -1, -1, CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then
|
||||
' NowADS().AddYears(-1).ToShortDateString, NowADS().ToShortDateString, "-1", -1, -1, CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then
|
||||
' If ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||
' dtt = ObjVentas.DtResultados.FiltraParametros("TipoDocto IN ('Ing','Ant')")
|
||||
' End If
|
||||
@@ -26027,11 +26031,11 @@ Partial Class Ventas
|
||||
params.Add(New ReportParameter("Guia", Guia))
|
||||
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
|
||||
params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString))
|
||||
|
||||
params.Add(New ReportParameter("Anio", Now.Year.ToString()))
|
||||
params.Add(New ReportParameter("Mes", Now.Month.ToString("00")))
|
||||
params.Add(New ReportParameter("Dia", Now.Day.ToString("00")))
|
||||
params.Add(New ReportParameter("Anio", NowADS().Year.ToString()))
|
||||
params.Add(New ReportParameter("Mes", NowADS().Month.ToString("00")))
|
||||
params.Add(New ReportParameter("Dia", NowADS().Day.ToString("00")))
|
||||
|
||||
params.Add(New ReportParameter("Rastreo", Rastreo))
|
||||
params.Add(New ReportParameter("Dimensiones", Dimensiones))
|
||||
@@ -26039,7 +26043,7 @@ Partial Class Ventas
|
||||
|
||||
params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
|
||||
ImprimirPDF(RutaRdlc, DTMovimientosDetalle, params, $"ReporteGuia_{Now.ToString("yyyyMMddhhmmss")}")
|
||||
ImprimirPDF(RutaRdlc, DTMovimientosDetalle, params, $"ReporteGuia_{NowADS().ToString("yyyyMMddhhmmss")}")
|
||||
|
||||
End Sub
|
||||
Private Sub GvPaqueriaGuias_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvPaqueriaGuias.RowDataBound
|
||||
@@ -26273,7 +26277,7 @@ Partial Class Ventas
|
||||
Dim CveSubProyecto As Integer = DdlSubProyectoDatos.SelectedValue.ToEntero()
|
||||
|
||||
Dim CveEstatus As Integer = 1
|
||||
Dim Fecha As String = Now.ToString("dd/MM/yyyy")
|
||||
Dim Fecha As String = NowADS().ToString("dd/MM/yyyy")
|
||||
Dim FechaEstimada As String = "-1"
|
||||
Dim NoCajas As Integer = 0
|
||||
Dim Observaciones As String = ""
|
||||
@@ -27731,9 +27735,9 @@ Partial Class Ventas
|
||||
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(13, 83) OrElse ChkEmitirComercioExterior.Checked Then
|
||||
TxtTipoCambio.Text = GlobalTipoCambio(Now.AddDays(-1)).ToString()
|
||||
TxtTipoCambio.Text = GlobalTipoCambio(NowADS().AddDays(-1)).ToString()
|
||||
Else
|
||||
TxtTipoCambio.Text = GlobalTipoCambio(Now).ToString()
|
||||
TxtTipoCambio.Text = GlobalTipoCambio(NowADS()).ToString()
|
||||
End If
|
||||
|
||||
End If
|
||||
@@ -27825,9 +27829,9 @@ Partial Class Ventas
|
||||
If DdlMoneda.SelectedValue <> "1" Then
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(13, 83) OrElse ChkEmitirComercioExterior.Checked Then
|
||||
TxtTipoCambio.Text = GlobalTipoCambio(Now.AddDays(-1)).ToString()
|
||||
TxtTipoCambio.Text = GlobalTipoCambio(NowADS().AddDays(-1)).ToString()
|
||||
Else
|
||||
TxtTipoCambio.Text = GlobalTipoCambio(Now).ToString()
|
||||
TxtTipoCambio.Text = GlobalTipoCambio(NowADS()).ToString()
|
||||
End If
|
||||
|
||||
End If
|
||||
@@ -28414,7 +28418,7 @@ Partial Class Ventas
|
||||
TmpDT.Columns.Add("AFDepreciacion", GetType(Decimal))
|
||||
TmpDT.Columns.Add("AFValorInicial", GetType(Decimal))
|
||||
End If
|
||||
Dim FechaFactura As DateTime = Now
|
||||
Dim FechaFactura As DateTime = NowADS()
|
||||
|
||||
If AplicaNCMasiva OrElse AplicaNCUsado Then
|
||||
If ObjVentas.GetVenta(CveVentaNC, UsuarioActual.CveEmpresa, VerificaAlmacen:=False) Then
|
||||
@@ -28682,7 +28686,7 @@ Partial Class Ventas
|
||||
GvPS.DataBind()
|
||||
|
||||
LblFolioFiscal.Text = ""
|
||||
TxtFecha.Text = Now.ToShortDateString
|
||||
TxtFecha.Text = NowADS().ToShortDateString
|
||||
|
||||
'DESACTIVA/ACTIVA BOTONES
|
||||
TrVistaPrevia.Visible = True
|
||||
@@ -28960,7 +28964,7 @@ Partial Class Ventas
|
||||
trNCFactura.Visible = True
|
||||
DdlSubProyectoDatos.Enabled = True
|
||||
TrFolioFiscal.Visible = False
|
||||
TxtFecha.Text = Now.ToShortDateString()
|
||||
TxtFecha.Text = NowADS().ToShortDateString()
|
||||
TipoCambioFactura = TxtTipoCambio.Text.ToDecimal
|
||||
|
||||
If DdlMoneda.SelectedValue.ToEntero() > 1 Then
|
||||
@@ -28993,9 +28997,9 @@ Partial Class Ventas
|
||||
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(13, 83) OrElse ChkEmitirComercioExterior.Checked Then
|
||||
TxtTipoCambio.Text = GlobalTipoCambio(Now.AddDays(-1)).ToString()
|
||||
TxtTipoCambio.Text = GlobalTipoCambio(NowADS().AddDays(-1)).ToString()
|
||||
Else
|
||||
TxtTipoCambio.Text = GlobalTipoCambio(Now).ToString()
|
||||
TxtTipoCambio.Text = GlobalTipoCambio(NowADS()).ToString()
|
||||
End If
|
||||
|
||||
DivEstatusFac.Visible = False
|
||||
@@ -29336,13 +29340,13 @@ Partial Class Ventas
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
|
||||
params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString))
|
||||
params.Add(New ReportParameter("EnvioContacto", EnvioContacto))
|
||||
params.Add(New ReportParameter("SerieFolio", SerieFolio))
|
||||
params.Add(New ReportParameter("PedidoContrato", PedidoContrato))
|
||||
params.Add(New ReportParameter("EnvioDireccion", EnvioDireccion))
|
||||
params.Add(New ReportParameter("Guia", Guia))
|
||||
ImprimirPDF("Empresas/Grales/Formatos/Cicovisa.rdlc", Dt, params, String.Format("Formato Cicovisa -{0}", Now.ToDateTime.ToShortDateString))
|
||||
ImprimirPDF("Empresas/Grales/Formatos/Cicovisa.rdlc", Dt, params, String.Format("Formato Cicovisa -{0}", NowADS().ToDateTime.ToShortDateString))
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -29434,7 +29438,7 @@ Partial Class Ventas
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
|
||||
params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString))
|
||||
params.Add(New ReportParameter("EnvioContacto", EnvioContacto))
|
||||
params.Add(New ReportParameter("SerieFolio", SerieFolio))
|
||||
params.Add(New ReportParameter("PedidoContrato", PedidoContrato))
|
||||
@@ -29450,7 +29454,7 @@ Partial Class Ventas
|
||||
params.Add(New ReportParameter("EnvioEstado", EnvioEstado))
|
||||
params.Add(New ReportParameter("Pais", Pais))
|
||||
params.Add(New ReportParameter("CP", CP))
|
||||
ImprimirPDF("Empresas/Grales/Formatos/Telcel.rdlc", Dt, params, String.Format("Formato RADIO MOVIL DIPSA S.A DE C.V. -{0}", Now.ToDateTime.ToShortDateString), "PDF")
|
||||
ImprimirPDF("Empresas/Grales/Formatos/Telcel.rdlc", Dt, params, String.Format("Formato RADIO MOVIL DIPSA S.A DE C.V. -{0}", NowADS().ToDateTime.ToShortDateString), "PDF")
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
@@ -30712,7 +30716,7 @@ Partial Class Ventas
|
||||
|
||||
End If
|
||||
|
||||
TxtFechaPago.Text = If(EsDiasCreditoFijo, Now.AddDays(DiasCredito).ToShortDateString, TxtFechaPago.Text)
|
||||
TxtFechaPago.Text = If(EsDiasCreditoFijo, NowADS().AddDays(DiasCredito).ToShortDateString, TxtFechaPago.Text)
|
||||
|
||||
DdlLineaAdicional_SelectedIndexChanged(DdlLineaAdicional, EventArgs.Empty)
|
||||
|
||||
@@ -30892,7 +30896,7 @@ Partial Class Ventas
|
||||
DdlTipoComprobante.SelectedValue = "Ing"
|
||||
|
||||
If Not (EstablecioFolio AndAlso UsuarioActual.TienePermisoProceso(130)) Then
|
||||
TxtFecha.Text = Now.ToShortDateString()
|
||||
TxtFecha.Text = NowADS().ToShortDateString()
|
||||
End If
|
||||
|
||||
UpPS.Update()
|
||||
@@ -31321,9 +31325,9 @@ Partial Class Ventas
|
||||
|
||||
LblFolioFiscal.Text = ""
|
||||
DdlTipoComprobante.Enabled = True
|
||||
TxtFecha.Text = Now.ToShortDateString()
|
||||
TxtFecha.Text = NowADS().ToShortDateString()
|
||||
LblUsuario.Text = UsuarioActual.Usuario
|
||||
LblFechaRegistro.Text = Now.ToShortDateString()
|
||||
LblFechaRegistro.Text = NowADS().ToShortDateString()
|
||||
LblSeTimbro.Text = "No"
|
||||
LblMail.Text = "No"
|
||||
|
||||
@@ -31372,7 +31376,7 @@ Partial Class Ventas
|
||||
ChkConvertirDoctoPesos.Enabled = Not UsuarioActual.TienePermisoProceso(324)
|
||||
TxtTipoCambio.Enabled = True
|
||||
TxtFechaEjecucion.ReadOnly = False
|
||||
TxtFechaEjecucion.Text = Now.ToShortDateString
|
||||
TxtFechaEjecucion.Text = NowADS().ToShortDateString
|
||||
ImgCalendarFechaEje.Enabled = True
|
||||
DdlVendedor.Enabled = True
|
||||
DdlSubProyectoDatos.Enabled = True
|
||||
@@ -31411,7 +31415,7 @@ Partial Class Ventas
|
||||
PlazoCobranza = ObjCliente.PlazoCobranza
|
||||
PlazoCobranzaRemision = ObjCliente.PlazoCobranzaRemision
|
||||
'TxtNumCtaPago.Text = ObjCliente.NumCtaPago
|
||||
TxtFechaPago.Text = If(DdlTipoComprobante.SelectedValue = "Rem", Now.AddDays(PlazoCobranzaRemision), Now.AddDays(PlazoCobranza)).ToShortDateString
|
||||
TxtFechaPago.Text = If(DdlTipoComprobante.SelectedValue = "Rem", NowADS().AddDays(PlazoCobranzaRemision), NowADS().AddDays(PlazoCobranza)).ToShortDateString
|
||||
DdlTipoRetencion.SelectedValueExist(ObjCliente.DtResultados(0)("CveTipoRetencion").ToString())
|
||||
End If
|
||||
End If
|
||||
@@ -31420,7 +31424,7 @@ Partial Class Ventas
|
||||
|
||||
|
||||
TrVistaPrevia.Visible = True
|
||||
TxtFechaVencimientoCotizacion.Text = Now.ToShortDateString
|
||||
TxtFechaVencimientoCotizacion.Text = NowADS().ToShortDateString
|
||||
|
||||
DdlLineaAdicional_SelectedIndexChanged(DdlLineaAdicional, EventArgs.Empty)
|
||||
|
||||
@@ -31698,15 +31702,15 @@ Partial Class Ventas
|
||||
Dim TipoDoctoViejo As String = DdlTipoComprobante.SelectedValue
|
||||
DdlTipoComprobante.SelectedValue = TipoDoctoNuevo
|
||||
If Not (EstablecioFolio AndAlso UsuarioActual.TienePermisoProceso(130)) Then
|
||||
TxtFecha.Text = Now.ToString()
|
||||
TxtFecha.Text = NowADS().ToString()
|
||||
End If
|
||||
|
||||
'SI TIENE LINEA ADICIONAL, NO DEBE MODIFICAR LA FECHA YA ASIGNADA
|
||||
If DdlLineaAdicional.SelectedValue.ToEntero() <= 0 Then
|
||||
TxtFechaPago.Text = If(TipoDoctoViejo = "Rem" AndAlso EsDiasCreditoFijo, Now.AddDays(DiasCredito), If(DdlTipoComprobante.SelectedValue = "Rem", Now.AddDays(PlazoCobranzaRemision), Now.AddDays(PlazoCobranza))).ToShortDateString
|
||||
TxtFechaPago.Text = If(TipoDoctoViejo = "Rem" AndAlso EsDiasCreditoFijo, NowADS().AddDays(DiasCredito), If(DdlTipoComprobante.SelectedValue = "Rem", NowADS().AddDays(PlazoCobranzaRemision), NowADS().AddDays(PlazoCobranza))).ToShortDateString
|
||||
End If
|
||||
|
||||
TxtFechaEjecucion.Text = Now.ToString()
|
||||
TxtFechaEjecucion.Text = NowADS().ToString()
|
||||
|
||||
DdlLineaAdicional_SelectedIndexChanged(DdlLineaAdicional, EventArgs.Empty)
|
||||
|
||||
@@ -31975,7 +31979,7 @@ Partial Class Ventas
|
||||
|
||||
If drow("CveTamaño").ToString.ToEntero > 0 Then
|
||||
If Not ObjAcum.DistribuidorMovtosAdd(factura.CveCliente, drow("Cantidad").ToString.ToDecimal, drow("CveTamaño").ToString.ToEntero, Puntos, Cargo, Bonificacion, CveConcepto, factura.CveVenta, UsuarioActual.CveUsuario,
|
||||
UsuarioActual.CveEmpresa, 0D, "", Now) Then
|
||||
UsuarioActual.CveEmpresa, 0D, "", NowADS()) Then
|
||||
Resultado = False
|
||||
Exit For
|
||||
End If
|
||||
@@ -32891,7 +32895,7 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
Dim ObjAcum As New ClsAcumuladores
|
||||
If ObjAcum.UpdateEnvioPolizaVirtual(CvePolizaVirtual, Retorno, Now, obj.product_unique_code, resp(0)("Descripcion").ToString()) Then
|
||||
If ObjAcum.UpdateEnvioPolizaVirtual(CvePolizaVirtual, Retorno, NowADS(), obj.product_unique_code, resp(0)("Descripcion").ToString()) Then
|
||||
Alert(Msg.ToString(), TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
ObjAcum.Dispose()
|
||||
@@ -33415,7 +33419,7 @@ Partial Class Ventas
|
||||
Dim Serie As String = "-1"
|
||||
|
||||
ObjFacturaProntoPago.CveEmpresa = UsuarioActual.CveEmpresa
|
||||
ObjFacturaProntoPago.TipoCambio = If(CveMoneda = 1, 1, GlobalTipoCambio(Now).FormatoNumero(4).ToDecimal())
|
||||
ObjFacturaProntoPago.TipoCambio = If(CveMoneda = 1, 1, GlobalTipoCambio(NowADS()).FormatoNumero(4).ToDecimal())
|
||||
ObjFacturaProntoPago.ConvertirPesos = False
|
||||
ObjFacturaProntoPago.CveMoneda = CveMoneda
|
||||
ObjFacturaProntoPago.Moneda = GlobalDTMonedas.FiltroPrimeroValor("Moneda", $"CveMoneda = {CveMoneda}")
|
||||
@@ -33424,7 +33428,7 @@ Partial Class Ventas
|
||||
ObjFacturaProntoPago.Folio = Folio
|
||||
|
||||
ObjFacturaProntoPago.TipoDocto = "Egs"
|
||||
ObjFacturaProntoPago.Fecha = Now
|
||||
ObjFacturaProntoPago.Fecha = NowADS()
|
||||
ObjFacturaProntoPago.Version = "4.0"
|
||||
|
||||
If ObjFacturaProntoPago.Cliente Is Nothing Then
|
||||
@@ -33489,7 +33493,7 @@ Partial Class Ventas
|
||||
ObjFacturaProntoPago.TipoDocumento = ""
|
||||
End Select
|
||||
|
||||
ObjFacturaProntoPago.FechaPago = Now
|
||||
ObjFacturaProntoPago.FechaPago = NowADS()
|
||||
Dim DtVentasNC As DataTable = InicializaDTVentasNCProntoPago()
|
||||
|
||||
Dim TotalImporte As Decimal = ObjFacturaProntoPago.DtDetalle.SUMD("TotalImporte")
|
||||
@@ -34171,8 +34175,8 @@ Partial Class Ventas
|
||||
|
||||
Public Sub CargarCamiones()
|
||||
|
||||
TxtFechaEntregaCP.Text = Now.Date.ToString("dd/MM/yyyy HH:mm")
|
||||
TxtFechaLlegadaCP.Text = Now.Date.ToString("dd/MM/yyyy HH:mm") 'Now.Date.AddDays(1).AddMinutes(-1).ToString("dd/MM/yyyy HH:mm")
|
||||
TxtFechaEntregaCP.Text = NowADS().Date.ToString("dd/MM/yyyy HH:mm")
|
||||
TxtFechaLlegadaCP.Text = NowADS().Date.ToString("dd/MM/yyyy HH:mm") 'NowADS().Date.AddDays(1).AddMinutes(-1).ToString("dd/MM/yyyy HH:mm")
|
||||
|
||||
DdlConfigAuto.Items.Clear()
|
||||
DdlUnidadCamion.Items.Clear()
|
||||
@@ -35129,7 +35133,7 @@ Partial Class Ventas
|
||||
Me.CveCategoriaLineaAdicional = 0
|
||||
|
||||
If CveVenta <= 0 Then
|
||||
TxtFechaPago.Text = Now.AddDays(PlazoCobranza).ToString("dd/MM/yyyy")
|
||||
TxtFechaPago.Text = NowADS().AddDays(PlazoCobranza).ToString("dd/MM/yyyy")
|
||||
TxtOrdenCompra.Text = ""
|
||||
|
||||
'SI SE HABILITO LA FACTURACION DESDE LA LINEA ADICIONAL DEBE QUITARLO
|
||||
@@ -35327,7 +35331,7 @@ Partial Class Ventas
|
||||
#End Region
|
||||
Protected Sub BtnFiltrarAF_Click(sender As Object, e As EventArgs)
|
||||
Using ObjAF As New ClsAF
|
||||
If ObjAF.GetRepActivosFijosDepreciacion(UsuarioActual.CveEmpresa, Now, Depreciados:=1, CveTipoAF:=DdlTipoActivoFiltro.SelectedValue.ToEntero(), CveSubTipoAF:=DdlSubTipoActivoFiltro.SelectedValue.ToEntero(), CveSubProyecto:=DdlSubProyectoFiltroAF.SelectedValue.ToEntero()) Then
|
||||
If ObjAF.GetRepActivosFijosDepreciacion(UsuarioActual.CveEmpresa, NowADS(), Depreciados:=1, CveTipoAF:=DdlTipoActivoFiltro.SelectedValue.ToEntero(), CveSubTipoAF:=DdlSubTipoActivoFiltro.SelectedValue.ToEntero(), CveSubProyecto:=DdlSubProyectoFiltroAF.SelectedValue.ToEntero()) Then
|
||||
GvVentaAF.DataSource = ObjAF.DtResultados.FiltraParametros("CveActivoFijo > 0 AND CveEstadoActivoFijo <> 5")
|
||||
End If
|
||||
End Using
|
||||
|
||||
Reference in New Issue
Block a user