Validacion de cotizacion con pagos
This commit is contained in:
@@ -9320,7 +9320,7 @@ Partial Class Ventas
|
||||
Kilometraje:=TxtKilometraje.Text.ToDouble, EsAmortizacion:=EsNCAmortizacion) Then
|
||||
ErrorList.Add("Ocurrió un error al Generar la Venta.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
|
||||
Else
|
||||
If factura.TipoDocto.Contiene("Dev") Or DtVentasNC IsNot Nothing Then
|
||||
If factura.TipoDocto.Contiene("Dev", "Egs") Or DtVentasNC IsNot Nothing Then
|
||||
If DtVentasNC IsNot Nothing Then
|
||||
For Each row As DataRow In DtVentasNC.Rows
|
||||
If Not ObjVentas.AddVentasRelacionadas(ObjVentas.CveVenta, row("CveVenta").ToString.ToEntero) Then
|
||||
@@ -23905,6 +23905,20 @@ Partial Class Ventas
|
||||
#End Region
|
||||
|
||||
#Region " EMITIR DOCUMENTO NUEVO "
|
||||
|
||||
Private Function ValidaFacturarCotizacion() As Boolean
|
||||
Dim Retorno As Boolean = True
|
||||
|
||||
If UsuarioActual.CveEmpresa = 141 Then
|
||||
If Not PermiteCredito AndAlso (DtPagos Is Nothing OrElse DtPagos.Rows.Count = 0) Then
|
||||
Alert("Es necesario especificar un pago.", TipoMensaje.MsgAdvertencia)
|
||||
Retorno = False
|
||||
Return Retorno
|
||||
End If
|
||||
End If
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Private Sub EmitirDocumentoNuevo(TipoDoctoNuevo As String)
|
||||
If GvPagos.Rows.Count = 0 And UsuarioActual.Empresa.Funcionalidad(558).ToEntero = 1 And RBLPago.SelectedValue.ToEntero = 2 Then
|
||||
Alert("No se puede facturar hasta que se haya especificado detalladamente la forma de pago", TipoMensaje.MsgAdvertencia)
|
||||
@@ -23913,11 +23927,17 @@ Partial Class Ventas
|
||||
|
||||
'CARGA LO PENDIENTE POR FACTURAR DE COTIZACION
|
||||
If EraCotizacion = 1 Then
|
||||
|
||||
If Not ValidaFacturarCotizacion() Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If Not PreparaFacturarCotizacion() Then
|
||||
EraCotizacion = 0
|
||||
DdlTipoComprobante.SelectedValue = "Cot"
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
'CARGA LO PENDIENTE POR FACTURAR DE REMISION
|
||||
|
||||
Reference in New Issue
Block a user