--FIX ventas
This commit is contained in:
@@ -37794,7 +37794,7 @@ Partial Class Ventas
|
|||||||
If CveVenta > 0 Then
|
If CveVenta > 0 Then
|
||||||
|
|
||||||
Dim ObjVta As New ClsVentas
|
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
|
If ObjVta.AddAutorizacionLimite(UsuarioActual.CveEmpresa, CveCliente, DdlVendedor.SelectedValue.ToEntero(), TxtTotal.Text.ToDecimal(), 0, UsuarioActual.CveUsuario, 1, TipoDocumento:=DdlTipoComprobante.SelectedValue, DiasVencidos:=25, CveVenta:=CveVenta) Then
|
||||||
RegistraScript("$('#DivModalSolicitarCredito').modal('hide')")
|
RegistraScript("$('#DivModalSolicitarCredito').modal('hide')")
|
||||||
Alert("La autorización se agregó correctamente.", TipoMensaje.MsgInformacion)
|
Alert("La autorización se agregó correctamente.", TipoMensaje.MsgInformacion)
|
||||||
'signal
|
'signal
|
||||||
@@ -37809,33 +37809,36 @@ Partial Class Ventas
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Else
|
||||||
|
|
||||||
|
Dim DiasVencidos As Integer = 0
|
||||||
|
Dim CveEstatus As Integer = 0
|
||||||
|
Dim TipoDocto As String = DdlSolCreditoTipoDocto.SelectedValue
|
||||||
|
Dim CveTipoAutorizacion As Integer = DdlTipoAutorizacion.SelectedValue.ToEntero()
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(595) <> "3" AndAlso CveTipoAutorizacion <= 0 Then
|
||||||
|
Alert("Debe seleccionar un tipo de autorización", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
If CveTipoAutorizacion = 2 Then
|
||||||
|
DiasVencidos = TxtDiasVencidos.Text.ToEntero()
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim Motivo As String = TxtMotivoAutorizacion.Text
|
||||||
|
|
||||||
|
Dim ObjPS As New ClsVentas
|
||||||
|
If ObjPS.AddAutorizacionLimite(UsuarioActual.CveEmpresa, CveCliente, DdlVendedor.SelectedValue.ToEntero(), TxtImporteSolicitud.Text.ToDecimal(), CveEstatus, UsuarioActual.CveUsuario, CveTipoAutorizacion, TipoDocumento:=DdlSolCreditoTipoDocto.SelectedValue, DiasVencidos:=DiasVencidos, Motivo:=Motivo) Then
|
||||||
|
RegistraScript("$('#DivModalSolicitarCredito').modal('hide')")
|
||||||
|
Alert("La autorización se agregó correctamente.", TipoMensaje.MsgInformacion)
|
||||||
|
'signal
|
||||||
|
Dim mensaje = "<br/> <a target='_blank' href='https://www.w3schools.com'>La autorización se agregó correctamente.</a>"
|
||||||
|
ClsSisNotificaciones.EnviarAlerta("Autorización Crédito", mensaje, "100", Tipo:=TipoNotificacion.ToastInformacionB)
|
||||||
|
|
||||||
|
End If
|
||||||
|
ObjPS.Dispose()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim DiasVencidos As Integer = 0
|
|
||||||
Dim CveEstatus As Integer = 0
|
|
||||||
Dim TipoDocto As String = DdlSolCreditoTipoDocto.SelectedValue
|
|
||||||
Dim CveTipoAutorizacion As Integer = DdlTipoAutorizacion.SelectedValue.ToEntero()
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(595) <> "3" AndAlso CveTipoAutorizacion <= 0 Then
|
|
||||||
Alert("Debe seleccionar un tipo de autorización", TipoMensaje.MsgAdvertencia)
|
|
||||||
Exit Sub
|
|
||||||
End If
|
|
||||||
|
|
||||||
If CveTipoAutorizacion = 2 Then
|
|
||||||
DiasVencidos = TxtDiasVencidos.Text.ToEntero()
|
|
||||||
End If
|
|
||||||
|
|
||||||
Dim Motivo As String = TxtMotivoAutorizacion.Text
|
|
||||||
|
|
||||||
Dim ObjPS As New ClsVentas
|
|
||||||
If ObjPS.AddAutorizacionLimite(UsuarioActual.CveEmpresa, CveCliente, DdlVendedor.SelectedValue.ToEntero(), TxtImporteSolicitud.Text.ToDecimal(), CveEstatus, UsuarioActual.CveUsuario, CveTipoAutorizacion, TipoDocumento:=DdlSolCreditoTipoDocto.SelectedValue, DiasVencidos:=DiasVencidos, Motivo:=Motivo) Then
|
|
||||||
RegistraScript("$('#DivModalSolicitarCredito').modal('hide')")
|
|
||||||
Alert("La autorización se agregó correctamente.", TipoMensaje.MsgInformacion)
|
|
||||||
'signal
|
|
||||||
Dim mensaje = "<br/> <a target='_blank' href='https://www.w3schools.com'>La autorización se agregó correctamente.</a>"
|
|
||||||
ClsSisNotificaciones.EnviarAlerta("Autorización Crédito", mensaje, "100", Tipo:=TipoNotificacion.ToastInformacionB)
|
|
||||||
|
|
||||||
End If
|
|
||||||
ObjPS.Dispose()
|
|
||||||
UpModalSolicitud.Update()
|
UpModalSolicitud.Update()
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub DdlTipoAutorizacion_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlTipoAutorizacion.SelectedIndexChanged
|
Protected Sub DdlTipoAutorizacion_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlTipoAutorizacion.SelectedIndexChanged
|
||||||
|
|||||||
Reference in New Issue
Block a user