Consignaciones Lote Fecha de caducidad, rep Recuperacion por Periodo
This commit is contained in:
@@ -1135,9 +1135,16 @@ Partial Class Compras_Compras
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property FechaCompraOriginal As Date
|
||||
|
||||
Get
|
||||
Return ViewState("FechaCompraOriginal").ToString.ToDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaCompraOriginal") = value
|
||||
End Set
|
||||
|
||||
|
||||
End Property
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
@@ -2537,6 +2544,8 @@ Partial Class Compras_Compras
|
||||
TxtFolio.Text = dr("Folio").ToString
|
||||
TxtFolioSecundario.Text = dr("FolioSecundario").ToString
|
||||
TxtFecha.Text = dr("Fecha").ToString.ToDate.ToShortDateString
|
||||
FechaCompraOriginal = dr("Fecha").ToString.ToDate
|
||||
|
||||
TxtDescripcion.Text = dr("Descripcion").ToString
|
||||
CvePrePoliza = dr("CvePrePoliza").ToString.ToEntero
|
||||
EstatusAlmacen = dr("EstatusAlmacen").ToString.ToEntero
|
||||
@@ -19966,39 +19975,74 @@ Partial Class Compras_Compras
|
||||
|
||||
Protected Sub LnkActualziarFechadecompra_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim ObjCompra As New ClsCompras
|
||||
Dim ProcesoError As Boolean = True
|
||||
|
||||
If FechaCompraOriginal <> TxtFecha.Text.ToDate Then
|
||||
|
||||
|
||||
Dim ObjCompra As New ClsCompras
|
||||
ObjCompra.IniciaTransacSQL()
|
||||
|
||||
Dim ObjEventos As New ClsOIEventos(ObjCompra.IniciaTransacSQL())
|
||||
|
||||
If ObjEventos.AddEventoBitacora($"Cambio de Fecha de compra de { FechaCompraOriginal.ToString("dd/MM/yyyy")} a {TxtFecha.Text}", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompra:=CveCompra) Then
|
||||
ProcesoError = False
|
||||
Else
|
||||
ProcesoError = True
|
||||
End If
|
||||
|
||||
If ProcesoError = False And ObjCompra.UpdateFechaCompra(CveCompra, TxtFecha.Text.ToDate, UsuarioActual.CveEmpresa) Then
|
||||
ProcesoError = False
|
||||
Else
|
||||
ProcesoError = True
|
||||
End If
|
||||
|
||||
|
||||
If Not ProcesoError Then
|
||||
ObjCompra.Commit()
|
||||
FechaCompraOriginal = TxtFecha.Text.ToDate
|
||||
Alert("Fecha Actualizada Correctamente.")
|
||||
Else
|
||||
ObjCompra.RollBack()
|
||||
End If
|
||||
|
||||
ObjCompra.Dispose()
|
||||
|
||||
If Not ProcesoError Then
|
||||
CargaEventoBitacora()
|
||||
UPEventoBitacora.Update()
|
||||
End If
|
||||
|
||||
|
||||
If ObjCompra.UpdateFechaCompra(CveCompra, TxtFecha.Text.ToDate, UsuarioActual.CveEmpresa) Then
|
||||
Alert("Fecha Actualizada Correctamente")
|
||||
End If
|
||||
ObjCompra.Dispose()
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Function ValidaSeleccionAnticipo() As Boolean
|
||||
|
||||
Dim Respuesta As Boolean
|
||||
Dim Respuesta As Boolean = True
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(13, 83) Then
|
||||
If GVAnticipos.Rows.Count > 0 Then
|
||||
'If UsuarioActual.CveEmpresa.Contiene(13, 83) Then
|
||||
' If GVAnticipos.Rows.Count > 0 Then
|
||||
|
||||
For Each GVRow As GridViewRow In GVAnticipos.Rows
|
||||
If GVRow.FCCheckBox("Chk").Checked AndAlso GVRow.FCTextBox("TxtAnticipo").Text.ToDecimal > 0 Then
|
||||
Respuesta = True
|
||||
Exit For
|
||||
Else
|
||||
Respuesta = False
|
||||
End If
|
||||
Next
|
||||
' For Each GVRow As GridViewRow In GVAnticipos.Rows
|
||||
' If GVRow.FCCheckBox("Chk").Checked AndAlso GVRow.FCTextBox("TxtAnticipo").Text.ToDecimal > 0 Then
|
||||
' Respuesta = True
|
||||
' Exit For
|
||||
' Else
|
||||
' Respuesta = False
|
||||
' End If
|
||||
' Next
|
||||
|
||||
Else
|
||||
Respuesta = True
|
||||
End If
|
||||
' Else
|
||||
' Respuesta = True
|
||||
' End If
|
||||
|
||||
Else
|
||||
Respuesta = True
|
||||
End If
|
||||
'Else
|
||||
' Respuesta = True
|
||||
'End If
|
||||
|
||||
Return Respuesta
|
||||
|
||||
|
||||
Reference in New Issue
Block a user