RepServicioDomicilio mejoras, compras requeriri vinculacion de nc a facturas caundoe s acumuladora.

This commit is contained in:
Oscar Irigoyen
2023-01-27 19:25:02 -07:00
parent 980b0e14eb
commit a995cbf951
11 changed files with 539 additions and 311 deletions

View File

@@ -4198,6 +4198,13 @@ Partial Class Compras_Compras
'------------------ INICIA VALIDACIONES ------------------
If Not ValidaVincuacionNotaFactura() Then
Alert("Se requiere que la nota este aplciada a las facturas", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
If Not ValidaSeleccionAnticipo() Then
Alert("El proveedor tiene anticipos sin aplicar, favor de especiar uno.", TipoMensaje.MsgAdvertencia)
Exit Sub
@@ -8327,6 +8334,34 @@ Partial Class Compras_Compras
End If
End Sub
Private Function ValidaVincuacionNotaFactura() As Boolean
Dim Respuesta As Boolean = False
If DdlTipoComprobante.SelectedValue.Contiene("NC") Then
If UsuarioActual.Empresa.Funcionalidad(531).ToString.ToEntero = 1 Then
For Each GvRow As GridViewRow In GvFacturaNC.Rows
If GvRow.RowType = DataControlRowType.DataRow Then
If GvRow.FCCheckBox("ChkFacturaNC").Checked Then
Respuesta = True
Exit For
End If
End If
Next
Else
Respuesta = True
End If
Else
Respuesta = True
End If
Return Respuesta
End Function
Private Function AjustaCombustibles() As Boolean
@@ -16127,6 +16162,15 @@ Partial Class Compras_Compras
End If
If CveFactura > 0 Then
If DdlTipoComprobante.SelectedValue = "NC" Then
NCSeleccionFacturasRelacionadas(UUIDSList)
End If
End If
UPCondicionesPago.Update()
End Sub