Empresas Zona Horaria
This commit is contained in:
@@ -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}")
|
||||
|
||||
Reference in New Issue
Block a user