- cmabio en solicitu de crédito op=3
This commit is contained in:
@@ -7778,7 +7778,7 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not EsFilial AndAlso (((DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem", "Cot", "PA") AndAlso CveVenta <= 0) OrElse (DdlTipoComprobante.SelectedValue.Contiene("Cot") AndAlso CveVenta > 0)) AndAlso RBLPago.SelectedValue = "1" AndAlso PermiteCredito) Then
|
If Not EsFilial AndAlso (((DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem", "Cot", "PA") AndAlso CveVenta <= 0) OrElse (DdlTipoComprobante.SelectedValue.Contiene("Cot", "Rem") AndAlso CveVenta > 0)) AndAlso RBLPago.SelectedValue = "1" AndAlso PermiteCredito) Then
|
||||||
'FUNCIONALIDAD 702 - NO VERIFICAR LIMITE DE CRÉDITO Y CANDADOS DE VENTA
|
'FUNCIONALIDAD 702 - NO VERIFICAR LIMITE DE CRÉDITO Y CANDADOS DE VENTA
|
||||||
If Not UsuarioActual.Empresa.Funcionalidad(702) = "1" Then
|
If Not UsuarioActual.Empresa.Funcionalidad(702) = "1" Then
|
||||||
|
|
||||||
@@ -8057,6 +8057,24 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
Case "3" ' autorización con vinculación a una venta registrada
|
||||||
|
|
||||||
|
Dim Vta As New ClsVentas
|
||||||
|
Dim Opcion As Integer = Vta.ObtenerClienteLimitesVenta(CveCliente, UsuarioActual.CveEmpresa)
|
||||||
|
Dim OpcionMsg As String = String.Format("El Cliente se encuentra bloqueado por la siguiente razón: <br> <br> {0}", Vta.SerieVenta)
|
||||||
|
Vta.Dispose()
|
||||||
|
If Opcion > 0 Then
|
||||||
|
If Alertas Then Alert(OpcionMsg, TipoMensaje.MsgAdvertencia)
|
||||||
|
Else
|
||||||
|
If Alertas Then Alert("El cliente tiene su límite de crédito agotado.", TipoMensaje.MsgAdvertencia)
|
||||||
|
End If
|
||||||
|
|
||||||
|
TrCredito1.Visible = True
|
||||||
|
ChkSolicitudAutorizacionCredito.Checked = True
|
||||||
|
LnkSolicitarCredito.Visible = True
|
||||||
|
divModalidad2.Visible = False
|
||||||
|
divModalidad3.Visible = True
|
||||||
|
Me.Bloqueada = True
|
||||||
|
|
||||||
Case Else 'SI NO TIENE NINGUN TIPO DE AUTORIZACION CONFIGURADO
|
Case Else 'SI NO TIENE NINGUN TIPO DE AUTORIZACION CONFIGURADO
|
||||||
'VERIFICAR CANDADOS DE VENTA
|
'VERIFICAR CANDADOS DE VENTA
|
||||||
@@ -26290,7 +26308,7 @@ Partial Class Ventas
|
|||||||
sb.Append(" EN SU CONTABILIDAD. </font> ")
|
sb.Append(" EN SU CONTABILIDAD. </font> ")
|
||||||
sb.Append(" <font face=""calibri"" size=""2"">")
|
sb.Append(" <font face=""calibri"" size=""2"">")
|
||||||
sb.Append(" <br /><br /><br /><br /><br />")
|
sb.Append(" <br /><br /><br /><br /><br />")
|
||||||
sb.Append(" <i>Este correo se generó automaticamente, favor de no responder este mensaje.</i>")
|
sb.Append(" <i>Este correo se generó automáticamente, favor de no responder este mensaje.</i>")
|
||||||
sb.Append(" </font>")
|
sb.Append(" </font>")
|
||||||
sb.Append("</body>")
|
sb.Append("</body>")
|
||||||
sb.Append("</html>")
|
sb.Append("</html>")
|
||||||
@@ -26310,7 +26328,7 @@ Partial Class Ventas
|
|||||||
sb.Append(" Le hacemos llegar el acuse de cancelación. </font> ")
|
sb.Append(" Le hacemos llegar el acuse de cancelación. </font> ")
|
||||||
sb.Append(" <font face=""calibri"" size=""2"">")
|
sb.Append(" <font face=""calibri"" size=""2"">")
|
||||||
sb.Append(" <br /><br /><br /><br /><br />")
|
sb.Append(" <br /><br /><br /><br /><br />")
|
||||||
sb.Append(" <i>Este correo se generó automaticamente, favor de no responder este mensaje.</i>")
|
sb.Append(" <i>Este correo se generó automáticamente, favor de no responder este mensaje.</i>")
|
||||||
sb.Append(" </font>")
|
sb.Append(" </font>")
|
||||||
sb.Append("</body>")
|
sb.Append("</body>")
|
||||||
sb.Append("</html>")
|
sb.Append("</html>")
|
||||||
@@ -26341,7 +26359,7 @@ Partial Class Ventas
|
|||||||
Dim SbCondiciones As New StringBuilder()
|
Dim SbCondiciones As New StringBuilder()
|
||||||
|
|
||||||
If SaldoAlmacen < 0 AndAlso ChkDevAlm.Checked Then
|
If SaldoAlmacen < 0 AndAlso ChkDevAlm.Checked Then
|
||||||
SbCondiciones.Append("<b>*Se realizará una devolución en automatico al realizar la cancelación.</b>")
|
SbCondiciones.Append("<b>*Se realizará una devolución en automático al realizar la cancelación.</b>")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If GvRemisiones.Rows.Count > 0 AndAlso Not DivCanRem.Visible AndAlso Not AplicaCancelarRemision Then
|
If GvRemisiones.Rows.Count > 0 AndAlso Not DivCanRem.Visible AndAlso Not AplicaCancelarRemision Then
|
||||||
@@ -26547,7 +26565,6 @@ Partial Class Ventas
|
|||||||
LblCancelarDocumento.Text = sb.ToString()
|
LblCancelarDocumento.Text = sb.ToString()
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
||||||
sbExtra.Append("Se generará un saldo a favor con el pago del cliente")
|
|
||||||
If GvCancelarRemisiones.Rows.Cast(Of GridViewRow).Count(Function(x) x.RowType = DataControlRowType.DataRow) > 0 Then
|
If GvCancelarRemisiones.Rows.Cast(Of GridViewRow).Count(Function(x) x.RowType = DataControlRowType.DataRow) > 0 Then
|
||||||
sbExtra.Append("<br/><b>*Las remisones relacionadas se van a cancelar con la factura</b>")
|
sbExtra.Append("<br/><b>*Las remisones relacionadas se van a cancelar con la factura</b>")
|
||||||
End If
|
End If
|
||||||
@@ -37436,7 +37453,26 @@ Partial Class Ventas
|
|||||||
Protected Sub BtnSolicitarCredito_Click(sender As Object, e As EventArgs) Handles BtnSolicitarCredito.Click
|
Protected Sub BtnSolicitarCredito_Click(sender As Object, e As EventArgs) Handles BtnSolicitarCredito.Click
|
||||||
If UsuarioActual.Empresa.Funcionalidad(595) = "3" Then
|
If UsuarioActual.Empresa.Funcionalidad(595) = "3" Then
|
||||||
RegistraScript("$('#DivModalSolicitarCredito').modal('hide')")
|
RegistraScript("$('#DivModalSolicitarCredito').modal('hide')")
|
||||||
Exit Sub
|
|
||||||
|
'si el documento existe generará
|
||||||
|
If CveVenta > 0 Then
|
||||||
|
|
||||||
|
Dim ObjVta As New ClsVentas
|
||||||
|
If ObjVta.AddAutorizacionLimite(UsuarioActual.CveEmpresa, CveCliente, DdlVendedor.SelectedValue.ToEntero(), TxtTotal.Text.ToDecimal(), 0, UsuarioActual.CveUsuario, 1, TipoDocumento:="Ing", DiasVencidos:=25, CveVenta:=CveVenta) Then
|
||||||
|
RegistraScript("$('#DivModalSolicitarCredito').modal('hide')")
|
||||||
|
Alert("La autorización se agregó correctamente.", TipoMensaje.MsgInformacion)
|
||||||
|
'signal
|
||||||
|
Dim mensaje = "<br/> <a target='_blank' href='liga'>La autorización se agregó correctamente.</a>"
|
||||||
|
ClsSisNotificaciones.EnviarAlerta("Autorización Crédito", mensaje, "100", Tipo:=TipoNotificacion.ToastInformacionB)
|
||||||
|
|
||||||
|
End If
|
||||||
|
ObjVta.Dispose()
|
||||||
|
|
||||||
|
Else
|
||||||
|
'sino existe, solo lo cierra. se crea al guardar.
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim DiasVencidos As Integer = 0
|
Dim DiasVencidos As Integer = 0
|
||||||
|
|||||||
Reference in New Issue
Block a user