diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb
index 5e4a0eedb..ef493259e 100644
--- a/Compras/Compras.aspx.vb
+++ b/Compras/Compras.aspx.vb
@@ -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
diff --git a/Inventarios/Consignaciones.aspx b/Inventarios/Consignaciones.aspx
index 29ec3f198..3661be63e 100644
--- a/Inventarios/Consignaciones.aspx
+++ b/Inventarios/Consignaciones.aspx
@@ -69,7 +69,7 @@
Almacén:
-
+
@@ -508,8 +508,32 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Inventarios/Consignaciones.aspx.vb b/Inventarios/Consignaciones.aspx.vb
index 7c48b41bf..b98da3d05 100644
--- a/Inventarios/Consignaciones.aspx.vb
+++ b/Inventarios/Consignaciones.aspx.vb
@@ -72,6 +72,19 @@ Partial Class Inventarios_Consignaciones
End If
End Sub
+ Private Property ValidaLoteCaducidad As Boolean
+ Get
+ If ViewState("ValidaLoteCaducidad") Is Nothing Then
+ ViewState("ValidaLoteCaducidad") = False
+ End If
+ Return CType(ViewState("ValidaLoteCaducidad"), Boolean)
+ End Get
+ Set(value As Boolean)
+ ViewState("ValidaLoteCaducidad") = value
+ End Set
+ End Property
+
+
#Region "Inicializa Valores"
@@ -364,6 +377,32 @@ Partial Class Inventarios_Consignaciones
CargaDatos(DdlRemisiones.SelectedValue.ToEntero)
End Sub
Private Sub CargaDatos(CveConsignacionTemp As Integer)
+
+ If DdlConcepto.SelectedValue.ToEntero.Contiene(12, 8) Then
+ Dim CveSubProyectoValidaCaducidad As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=DdlAlmacenFiltro.SelectedValue.ToEntero).FiltroPrimeroValor("CveSubProyecto").ToEntero
+ 'RMF condición temporal
+ If UsuarioActual.CveEmpresa = 119 AndAlso CveSubProyectoValidaCaducidad.ToString.Contiene(UsuarioActual.Empresa.Funcionalidad(347).Split(","c)) Then
+ ValidaLoteCaducidad = True
+
+ 'activa lote
+ ThLote.Visible = True
+ ThCaducidad.Visible = True
+
+
+ Else
+ ValidaLoteCaducidad = False
+
+ 'activa lote
+ ThLote.Visible = False
+ ThCaducidad.Visible = False
+
+
+ End If
+ End If
+
+
+
+
Dim ObjInventario As New ClsInventarios
If ObjInventario.ConsignacionesDetalle(CveConsignacionTemp, DdlAlmacenFiltro.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
@@ -538,6 +577,24 @@ Partial Class Inventarios_Consignaciones
e.Row.FCTextBox("TxtPU").Attributes.Add("onkeyup", String.Format("RecalculaEdit({0},this,{1});", e.Row.FCTextBox("TxtCantidad").ClientID, e.Row.FCLabel("LbTotal").ClientID))
End If
+ If (ValidaLoteCaducidad) OrElse (UsuarioActual.CveEmpresa <> 119) Then
+ If CBool(e.Row.DBCampo("AplicaCaducidad")) Then
+ e.Row.FCTextBox("TxtCaducidad").Visible = True
+ e.Row.FCLinkButton("LnkCaducidad").Visible = True
+ Else
+ e.Row.FCTextBox("TxtCaducidad").Visible = False
+ e.Row.FCLinkButton("LnkCaducidad").Visible = False
+ End If
+
+ If CBool(e.Row.DBCampo("AplicaLote")) Then
+ e.Row.FCTextBox("TxtLote").Visible = True
+ Else
+ e.Row.FCTextBox("TxtLote").Visible = False
+ End If
+
+ End If
+
+
End If
End Sub
@@ -940,8 +997,14 @@ Partial Class Inventarios_Consignaciones
Exit For
End If
+
+ Dim Lote As String = "-1"
+ Dim FechaCaducidad As Date = MinFecha
+ If Gvr.FCTextBox("TxtLote").Text.Trim <> "" Then Lote = Gvr.FCTextBox("TxtLote").Text.Trim
+ If Gvr.FCTextBox("TxtCaducidad").Text.ToDate > MinFecha Then FechaCaducidad = Gvr.FCTextBox("TxtCaducidad").Text.ToDate
+
'AGREGAMOS MOVTOS DETALLE
- If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Gvr.FCTextBox("TxtCantidadDevolucion").Text.ToString.ToDouble, Gvr.DataKey("CveUM").ToString.ToEntero, Gvr.DataKey("CvePS").ToString.ToEntero, Gvr.DataKey("PU").ToString.ToDecimal, -1, -1, Gvr.DataKey("Serie").ToString, Gvr.DataKey("Lote").ToString) Then
+ If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Gvr.FCTextBox("TxtCantidadDevolucion").Text.ToString.ToDouble, Gvr.DataKey("CveUM").ToString.ToEntero, Gvr.DataKey("CvePS").ToString.ToEntero, Gvr.DataKey("PU").ToString.ToDecimal, -1, -1, Gvr.DataKey("Serie").ToString, Lote, FechaCaducidad:=FechaCaducidad) Then
ErrorMovInv = True
TextoError = "Ocurrió un Error al guardar los movimientos"
Exit For
@@ -1126,20 +1189,26 @@ Partial Class Inventarios_Consignaciones
FolioSalida = ObjInventario.Folio
End If
- If CveMovimientoSalida > 0 Then
- If MovtoNew Then
- CveMovtosSalida.Add(CveMovimientoSalida)
- FoliosSalida.Add(FolioSalida)
- MovtoNew = False
- End If
- Else
- TextoError = "No se pudo generar el movimiento de salida correctamente"
- ErrorMovInv = True
- Exit For
+ If CveMovimientoSalida > 0 Then
+ If MovtoNew Then
+ CveMovtosSalida.Add(CveMovimientoSalida)
+ FoliosSalida.Add(FolioSalida)
+ MovtoNew = False
End If
+ Else
+ TextoError = "No se pudo generar el movimiento de salida correctamente"
+ ErrorMovInv = True
+ Exit For
+ End If
+
+
+ Dim Lote As String = "-1"
+ Dim FechaCaducidad As Date = MinFecha
+ If Gvr.FCTextBox("TxtLote").Text.Trim <> "" Then Lote = Gvr.FCTextBox("TxtLote").Text.Trim
+ If Gvr.FCTextBox("TxtCaducidad").Text.ToDate > MinFecha Then FechaCaducidad = Gvr.FCTextBox("TxtCaducidad").Text.ToDate
'AGREGAMOS MOVTOS DETALLE
- If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, Gvr.FCTextBox("TxtCantidadDevolucion").Text.ToString.ToDouble, Gvr.DataKey("CveUM").ToString.ToEntero, Gvr.DataKey("CvePS").ToString.ToEntero, Gvr.DataKey("PU").ToString.ToDecimal, -1, -1, "", "") Then
+ If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, Gvr.FCTextBox("TxtCantidadDevolucion").Text.ToString.ToDouble, Gvr.DataKey("CveUM").ToString.ToEntero, Gvr.DataKey("CvePS").ToString.ToEntero, Gvr.DataKey("PU").ToString.ToDecimal, -1, -1, "", Lote, FechaCaducidad:=FechaCaducidad) Then
ErrorMovInv = True
TextoError = "Ocurrió un Error al guardar los movimientos detalle de la salida"
Exit For
@@ -1744,4 +1813,6 @@ Partial Class Inventarios_Consignaciones
+
+
End Class
diff --git a/Inventarios/ResguardoMaterial.aspx.vb b/Inventarios/ResguardoMaterial.aspx.vb
index 74e36dff3..2771700f8 100644
--- a/Inventarios/ResguardoMaterial.aspx.vb
+++ b/Inventarios/ResguardoMaterial.aspx.vb
@@ -956,8 +956,9 @@ Partial Class Inventarios_ResguardoMaterial
If Gvr.FCTextBox("TxtCantidad").Text.ToDouble > 0 Then
Dim Lote As String = "-1"
Dim FechaCaducidad As Date = MinFecha
- If Gvr.datakey("Lote") <> "" Then Lote = Gvr.datakey("Lote")
- If Gvr.datakey("FechaCaducidad").todate > MinFecha Then FechaCaducidad = Gvr.datakey("FechaCaducidad").todate
+ If Gvr.FCTextBox("TxtLote").Text.Trim <> "" Then Lote = Gvr.FCTextBox("TxtLote").Text.Trim
+ 'If Gvr.datakey("FechaCaducidad").todate > MinFecha Then FechaCaducidad = Gvr.datakey("FechaCaducidad").todate
+ If Gvr.FCTextBox("TxtCaducidad").Text.ToDate > MinFecha Then FechaCaducidad = Gvr.FCTextBox("TxtCaducidad").Text.ToDate
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, Gvr.FCTextBox("TxtCantidad").Text.ToDouble, Gvr.DataKey("CveUM").ToString.ToEntero, Gvr.DataKey("CvePS").ToString.ToEntero, Gvr.DataKey("PU").ToString.ToDecimal, -1, CveSeccionAlmacen:=Gvr.DataKey("CveSeccionAlmacen").ToEntero, Serie:=Gvr.DataKey("Serie").ToString, Lote:=Lote, FechaCaducidad:=FechaCaducidad, Observaciones:=Gvr.DataKey("Observaciones").ToString, CveMovimientoDetalleEntrada:=Gvr.DataKey("CveMovimientoDetalle").toentero) Then
MensajeError = "Ocurrió un error al guardar los detalles del movimiento de salida. Por favor vuelva a intentar."
@@ -968,6 +969,8 @@ Partial Class Inventarios_ResguardoMaterial
DiccionarioLote.Add(ObjInventario.CveMovimientoDetalle, Gvr.FCTextBox("TxtLote").Text)
DiccionarioCaducidad.Add(ObjInventario.CveMovimientoDetalle, Gvr.FCTextBox("TxtCaducidad").Text.todate)
End If
+
+
End If
Cont += 1
Next
diff --git a/Ventas/RepRecuperacionPeriodo.aspx b/Ventas/RepRecuperacionPeriodo.aspx
index cb4068856..0579aedcd 100644
--- a/Ventas/RepRecuperacionPeriodo.aspx
+++ b/Ventas/RepRecuperacionPeriodo.aspx
@@ -16,22 +16,24 @@
+
+
+ PDF
+
+
+ Excel
+
Ver Dlls en pesos
- Ver Grafica
+ Ver Grafica
-
- Generar PDF
-
-
- Generar Excel
-
+
@@ -212,7 +214,7 @@
-
+