Funcionalidad 545, para validar productos de contratos de obra
This commit is contained in:
@@ -4281,11 +4281,13 @@ Partial Class Compras_Compras
|
|||||||
Next
|
Next
|
||||||
If ErrorValidacion Then Exit Sub
|
If ErrorValidacion Then Exit Sub
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(545) = "1" Then
|
||||||
Dim dtPSInvalidos As String = ValidarPSContrato(TmpDT.FiltraParametros("", "", {"CveSubProyecto", "CvePS", "Cantidad", "PU"}))
|
Dim dtPSInvalidos As String = ValidarPSContrato(TmpDT.FiltraParametros("", "", {"CveSubProyecto", "CvePS", "Cantidad", "PU"}))
|
||||||
If dtPSInvalidos <> "" Then
|
If dtPSInvalidos <> "" Then
|
||||||
Alert(dtPSInvalidos, TipoMensaje.MsgAdvertencia)
|
Alert(dtPSInvalidos, TipoMensaje.MsgAdvertencia)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
'RECORRO LOS PRODUCTOS O SERVICIOS PARA REGISTRARLOS LOS QUE NO EXISTEN EN EL CATÁLOGO
|
'RECORRO LOS PRODUCTOS O SERVICIOS PARA REGISTRARLOS LOS QUE NO EXISTEN EN EL CATÁLOGO
|
||||||
Dim tCve As Integer
|
Dim tCve As Integer
|
||||||
@@ -18106,9 +18108,10 @@ Partial Class Compras_Compras
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
ActualizaTotales = True
|
ActualizaTotales = True
|
||||||
Dim ObjContratos As New ClsContratos
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(545) = "1" Then
|
||||||
Dim TieneError As Boolean = False
|
Dim TieneError As Boolean = False
|
||||||
Dim dttemp As New DataTable ' GlobalDTContratos().FiltraParametros(String.Format("CveSubProyecto = {0}", DdlSubProyecto.SelectedValue.ToString))
|
Dim dttemp As New DataTable '= GlobalDTContratos().FiltraParametros(String.Format("CveSubProyecto = {0}", DdlSubProyecto.SelectedValue.ToString))
|
||||||
dttemp.Columns.Add("CveSubProyecto", GetType(Integer))
|
dttemp.Columns.Add("CveSubProyecto", GetType(Integer))
|
||||||
dttemp.Columns.Add("CvePS", GetType(Integer))
|
dttemp.Columns.Add("CvePS", GetType(Integer))
|
||||||
dttemp.Columns.Add("Cantidad", GetType(Decimal))
|
dttemp.Columns.Add("Cantidad", GetType(Decimal))
|
||||||
@@ -18124,7 +18127,12 @@ Partial Class Compras_Compras
|
|||||||
Dim dtPSInvalidos As String = ValidarPSContrato(dttemp)
|
Dim dtPSInvalidos As String = ValidarPSContrato(dttemp)
|
||||||
If dtPSInvalidos <> "" Then
|
If dtPSInvalidos <> "" Then
|
||||||
TieneError = True
|
TieneError = True
|
||||||
|
Alert(dtPSInvalidos, TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
'If dttemp IsNot Nothing AndAlso dttemp.Rows.Count > 0 Then
|
'If dttemp IsNot Nothing AndAlso dttemp.Rows.Count > 0 Then
|
||||||
' Dim drContrato As DataRow = dttemp.Rows(0)
|
' Dim drContrato As DataRow = dttemp.Rows(0)
|
||||||
' If ObjContratos.GetContratosDetalle(drContrato("CveContrato").ToString.ToEntero) Then
|
' If ObjContratos.GetContratosDetalle(drContrato("CveContrato").ToString.ToEntero) Then
|
||||||
@@ -18157,8 +18165,9 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
' End If
|
' End If
|
||||||
'End If
|
'End If
|
||||||
ObjContratos.Dispose()
|
|
||||||
If Not TieneError Then
|
|
||||||
|
|
||||||
Select Case Modalidad
|
Select Case Modalidad
|
||||||
Case "A" 'ADD
|
Case "A" 'ADD
|
||||||
|
|
||||||
@@ -18200,30 +18209,6 @@ Partial Class Compras_Compras
|
|||||||
CompruebaAgregar()
|
CompruebaAgregar()
|
||||||
GuardaAC()
|
GuardaAC()
|
||||||
End If
|
End If
|
||||||
Else
|
|
||||||
Alert(dtPSInvalidos, TipoMensaje.MsgAdvertencia)
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
|
||||||
'If UsuarioActual.Empresa.Funcionalidad(577).ToString = "1" Then
|
|
||||||
|
|
||||||
' 'If UsuarioActual.CveRol = 1 Then
|
|
||||||
' ' Alert($"Ok funcionalidad 577 RetencionIVA { RetencionIVA} IVAOriginal {IVAOriginal}")
|
|
||||||
' 'End If
|
|
||||||
|
|
||||||
' If RetencionIVA = 0 And IVAOriginal > 0 Then
|
|
||||||
' For Each dRow As DataRow In TmpDT.Rows
|
|
||||||
' If dRow("CveTipoPS").ToString.ToEntero = 1 Then
|
|
||||||
' 'Comnetado para reubicar el boton
|
|
||||||
' 'tdIVA6.Visible = True
|
|
||||||
' Exit For
|
|
||||||
' End If
|
|
||||||
' Next
|
|
||||||
' End If
|
|
||||||
|
|
||||||
'End If
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
UpPS.Update()
|
UpPS.Update()
|
||||||
CargaGvPersonal()
|
CargaGvPersonal()
|
||||||
@@ -20938,6 +20923,7 @@ Partial Class Compras_Compras
|
|||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
objContratos.Dispose()
|
||||||
|
|
||||||
If MensajeProducto.Length <> 64 Then
|
If MensajeProducto.Length <> 64 Then
|
||||||
Retorno = MensajeProducto
|
Retorno = MensajeProducto
|
||||||
|
|||||||
Reference in New Issue
Block a user