Correción Compras Aplica Lote ps no encontrado, Vya Contrato Contrato detalle mensajes

This commit is contained in:
rakcsle
2024-11-20 15:50:56 -07:00
parent a0072d5931
commit 79e50a8778
3 changed files with 36 additions and 8 deletions

View File

@@ -11135,8 +11135,15 @@ Partial Class Compras_Compras
dRow("UUIDRow") = Guid.NewGuid().ToString() dRow("UUIDRow") = Guid.NewGuid().ToString()
End If End If
Dim CvePS As Integer = dRow("CvePS").ToString.ToEntero Dim CvePS As Integer = dRow("CvePS").ToString.ToEntero
dRow("AplicaLote") = Boolean.Parse(GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltroPrimeroValor("AplicaLote", $"CvePS={CvePS}"))
dRow("AplicaCaducidad") = Boolean.Parse(GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltroPrimeroValor("AplicaCaducidad", $"CvePS={CvePS}")) dRow("AplicaLote") = False
dRow("AplicaCaducidad") = False
If CvePS > 0 Then
dRow("AplicaLote") = Boolean.Parse(GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltroPrimeroValor("AplicaLote", $"CvePS={CvePS}"))
dRow("AplicaCaducidad") = Boolean.Parse(GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltroPrimeroValor("AplicaCaducidad", $"CvePS={CvePS}"))
End If
Next Next
TmpDT.AcceptChanges() TmpDT.AcceptChanges()
@@ -11229,8 +11236,14 @@ Partial Class Compras_Compras
Dim CvePS As Integer = e.Row.DataKey("CvePS").ToEntero Dim CvePS As Integer = e.Row.DataKey("CvePS").ToEntero
Dim AplicaLote As Boolean = Boolean.Parse(GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltroPrimeroValor("AplicaLote", $"CvePS={CvePS}")) Dim AplicaLote As Boolean = False
Dim AplicaCaducidad As Boolean = Boolean.Parse(GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltroPrimeroValor("AplicaCaducidad", $"CvePS={CvePS}")) Dim AplicaCaducidad As Boolean = False
If CvePS > 0 Then
AplicaLote = Boolean.Parse(GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltroPrimeroValor("AplicaLote", $"CvePS={CvePS}"))
AplicaCaducidad = Boolean.Parse(GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltroPrimeroValor("AplicaCaducidad", $"CvePS={CvePS}"))
End If
If AplicaLote Then If AplicaLote Then
e.Row.FCTextBox("TxtLote").Visible = True e.Row.FCTextBox("TxtLote").Visible = True

View File

@@ -541,6 +541,8 @@ Partial Class RepContratoDetalle
Protected Sub UpdateContrato(sender As Object, e As EventArgs) Protected Sub UpdateContrato(sender As Object, e As EventArgs)
Dim ArchivoUpdate As String = "-1" Dim ArchivoUpdate As String = "-1"
Dim ErrorProceso As Boolean = False Dim ErrorProceso As Boolean = False
Dim SeGeneroRemision As Boolean = False
Dim SerieFolioRemision As String = ""
If Session("FileExtension").ToString <> "" Then If Session("FileExtension").ToString <> "" Then
'ArchivoUpdate = $"{CveContrato.ToString}.{ Session("FileExtension")}" 'ArchivoUpdate = $"{CveContrato.ToString}.{ Session("FileExtension")}"
@@ -584,8 +586,9 @@ Partial Class RepContratoDetalle
If Respuesta.CveVenta > 0 Then If Respuesta.CveVenta > 0 Then
CveVentaRemision = Respuesta.CveVenta CveVentaRemision = Respuesta.CveVenta
'SerieFolioRemision = Respuesta.SerieFolio SerieFolioRemision = Respuesta.SerieFolio
ErrorProceso = False ErrorProceso = False
SeGeneroRemision = True
Else Else
ErrorProceso = True ErrorProceso = True
Alert("se presento un error al generar la remisión", TipoMensaje.MsgAdvertencia) Alert("se presento un error al generar la remisión", TipoMensaje.MsgAdvertencia)
@@ -593,10 +596,16 @@ Partial Class RepContratoDetalle
End If End If
If Not ErrorProceso Then If Not ErrorProceso Then
ObjContratos.Commit() ObjContratos.Commit()
AgregarABitacora($"Actualización del contrato {CveContrato}") AgregarABitacora($"Actualización del contrato {CveContrato}")
Alert("Contrato actualizado correctamente")
If SeGeneroRemision Then
Alert($"Contrato actualizado correctamente..<br> Remisión Generada <a target='_blank' class='Texto' href='/Ventas/Ventas.aspx?CveVenta={CveVentaRemision}' ><b>{SerieFolioRemision}</b></a>", TipoMensaje.MsgInformacion, "window.location.reload();")
Else
Alert("Contrato actualizado correctamente", TipoMensaje.MsgInformacion, "window.location.reload();")
End If
Else Else
Alert("Ocurrió un ocurrió un error al actualizar su boleto", TipoMensaje.MsgError) Alert("Ocurrió un ocurrió un error al actualizar su boleto", TipoMensaje.MsgError)
ObjContratos.RollBack() ObjContratos.RollBack()

View File

@@ -211,7 +211,13 @@ Partial Class ListadoContratos
If Not ErrorProceso Then If Not ErrorProceso Then
ObjContratos.Commit() ObjContratos.Commit()
Alert($"Agregado Correctamente.<br> Remisión Generada <a target='_blank' class='Texto' href='/Ventas/Ventas.aspx?CveVenta={CveVentaRemision}' ><b>{SerieFolioRemision}</b></a>")
If CveVentaRemision > 0 Then
Alert($"Agregado Correctamente.<br> Remisión Generada <a target='_blank' class='Texto' href='/Ventas/Ventas.aspx?CveVenta={CveVentaRemision}' ><b>{SerieFolioRemision}</b></a>")
Else
Alert($"Agregado Correctamente")
End If
Else Else
ObjContratos.RollBack() ObjContratos.RollBack()
Alert("Se presento un error al guardar el contrato.", TipoMensaje.MsgAdvertencia) Alert("Se presento un error al guardar el contrato.", TipoMensaje.MsgAdvertencia)