-- Correcion de formato de hora de la fecha del registro

This commit is contained in:
2024-02-14 16:13:17 -07:00
parent f3e7e83660
commit 7e886ba50f

View File

@@ -1804,7 +1804,7 @@ Partial Class Inventarios_EntradasSalidas
End If
Dim FechaMovimiento As DateTime = TxtFecha.Text.Replace(",", "").ToDateTime
Dim FechaMovtoStr As String = $"{FechaMovimiento.ToString("yyyy/MM/dd")} {FechaMovimiento.ToString("hh:mm:ss")}"
Dim FechaMovtoStr As String = $"{FechaMovimiento.ToString("yyyy/MM/dd")} {FechaMovimiento.ToString("HH:mm:ss")}"
'ACTUALIZAR
If CveMovimiento > 0 Then
@@ -1990,7 +1990,7 @@ Partial Class Inventarios_EntradasSalidas
If DdlConcepto.SelectedValue.Contiene({"3", "11", "13", "21", "30", "31"}) Then
For Each Dr As DataRow In DtMovimientos.Rows
Dim FechaCaducidadVal As Date = If(Dr("AplicaCaducidad").ToString = "True", Dr("FechaCaducidad").ToString.ToDate, MinFecha)
Dim FechaMovtoExistenciaStr As String = $"{FechaMovimiento.ToString("yyyy/MM/dd")} {FechaMovimiento.ToString("hh:mm")}"
Dim FechaMovtoExistenciaStr As String = $"{FechaMovimiento.ToString("yyyy/MM/dd")} {FechaMovimiento.ToString("HH:mm")}"
If ObjInventario.GetExistenciasPS(Dr("CvePS").ToString.ToEntero, Dr("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, FechaMovto:=FechaMovtoExistenciaStr, Serie:=If(Dr("Serie").ToString = "", "-1", Dr("Serie").ToString), Lote:=If(Dr("Lote").ToString = "", "-1", Dr("Lote").ToString), FechaCaducidad:=FechaCaducidadVal) >= Dr("Cantidad").ToString.ToDouble Then
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, CveSeccionAlmacen:=Dr("CveSeccionAlmacen").ToString.ToEntero, Serie:=Dr("Serie").ToString, Observaciones:=Dr("Observaciones").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=FechaCaducidadVal, CveUsuarioModifico:=UsuarioActual.CveUsuario, CveCultivoCuadroDetalle:=Dr("CveCultivoCuadroDetalle").ToString.ToEntero) Then
@@ -2332,7 +2332,7 @@ Partial Class Inventarios_EntradasSalidas
ObjInventario.RollBack() 'deshace lo insertado
CveMovimiento = 0
If ObjContaAC IsNot Nothing Then ObjContaAC.RollBack()
Alert("ocurrió un Error al registrar los movimientos", TipoMensaje.MsgError)
Alert("Ocurrió un error al registrar los movimientos", TipoMensaje.MsgError)
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
End If
End If