Cambios en folios de garantia
This commit is contained in:
@@ -5319,6 +5319,12 @@ Partial Class PV
|
||||
Alert($"El folio de garantía no es valido.<br/> Clasificacion del Producto:{FolioGarantia.ClasificacionPS}.<br/>Tipo Folio:{FolioGarantia.TipoFolio}", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If Not ValidaConsecutivo() Then
|
||||
Alert("Ya existe un consecutivo vigente en este folio", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If AgregarPS() Then
|
||||
@@ -7091,6 +7097,7 @@ Partial Class PV
|
||||
If Not CalculaMesesUso() Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Try
|
||||
TxtImporteAjuste.Text = "0.00"
|
||||
If DdlTipoUso.SelectedValue.ToEntero > 0 AndAlso DdlPSAjuste.SelectedValue.ToEntero > 0 AndAlso TxtMesesUso.Text <> "" AndAlso DdlPS.SelectedValue.ToEntero > 0 Then
|
||||
@@ -8180,4 +8187,26 @@ Partial Class PV
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
Protected Sub TxtConsecutivoAjuste_TextChanged(sender As Object, e As EventArgs)
|
||||
If Not ValidaConsecutivo() Then
|
||||
Alert("Ya existe un consecutivo vigente en este folio", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Function ValidaConsecutivo() As Boolean
|
||||
Dim Retorno As Boolean = True
|
||||
|
||||
If DdlFolioGarantia.SelectedValue.ToEntero() > 0 Then
|
||||
Using ObjAcum As New ClsAcumuladores
|
||||
If ObjAcum.GetFoliosGarantiasDetalle(DdlFolioGarantia.SelectedValue.ToEntero(), CveEstatusConsecutivo:=1, Consec:=TxtConsecutivoAjuste.Text.ToEntero()) Then
|
||||
If ObjAcum.DtResultados.Rows.Count > 0 Then
|
||||
Retorno = False
|
||||
End If
|
||||
End If
|
||||
End Using
|
||||
End If
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user