No verificar limite de credito al facturar , funcionalidad 702
This commit is contained in:
@@ -7647,36 +7647,40 @@ Partial Class Ventas
|
|||||||
'No exceder el limite de credito, Si no tiene contrato limita el credito, si tiene no hace nada. Si no tiene remisiones tampoco hace nada.
|
'No exceder el limite de credito, Si no tiene contrato limita el credito, si tiene no hace nada. Si no tiene remisiones tampoco hace nada.
|
||||||
If (Not CveContrato > 0 Or CveContratoTipo.Contiene(28)) AndAlso (Not NuevaFactura = 1) AndAlso RBLPago.SelectedValue = "1" AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Ant") AndAlso RemisionesLista.Count <= 0 AndAlso TxtTotal.Text.ToDecimal > 0 AndAlso Not CvePedidoA > 0 Then
|
If (Not CveContrato > 0 Or CveContratoTipo.Contiene(28)) AndAlso (Not NuevaFactura = 1) AndAlso RBLPago.SelectedValue = "1" AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Ant") AndAlso RemisionesLista.Count <= 0 AndAlso TxtTotal.Text.ToDecimal > 0 AndAlso Not CvePedidoA > 0 Then
|
||||||
'If UsuarioActual.Empresa.Funcionalidad(518) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(185) Then
|
'If UsuarioActual.Empresa.Funcionalidad(518) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(185) Then
|
||||||
Dim ObjVentas As New ClsVentas
|
|
||||||
|
|
||||||
If ObjVentas.ObtenerCreditoRestante(CveCliente, DdlSucursalCliente.SelectedValue.ToEntero()) Then
|
If Not UsuarioActual.Empresa.Funcionalidad(702) = "1" Then
|
||||||
If ObjVentas.DtResultados.Rows.Count > 0 Then
|
Dim ObjVentas As New ClsVentas
|
||||||
|
|
||||||
If DdlSucursalCliente.SelectedValue.ToEntero() > 0 Then
|
If ObjVentas.ObtenerCreditoRestante(CveCliente, DdlSucursalCliente.SelectedValue.ToEntero()) Then
|
||||||
If ObjVentas.DtResultados(0)("LimiteRestanteSucursal").ToString().ToDecimal - If(TxtTipoCambio.Visible, TxtTotal.Text.ToDecimal * TxtTipoCambio.Text.ToDecimal, TxtTotal.Text.ToDecimal) < 0 Then
|
If ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||||
ObjVentas.Dispose()
|
|
||||||
Alert("Se está excediendo el límite de credito permitido de la Sucursal del Cliente.", TipoMensaje.MsgInformacion)
|
If DdlSucursalCliente.SelectedValue.ToEntero() > 0 Then
|
||||||
Exit Sub
|
If ObjVentas.DtResultados(0)("LimiteRestanteSucursal").ToString().ToDecimal - If(TxtTipoCambio.Visible, TxtTotal.Text.ToDecimal * TxtTipoCambio.Text.ToDecimal, TxtTotal.Text.ToDecimal) < 0 Then
|
||||||
|
ObjVentas.Dispose()
|
||||||
|
Alert("Se está excediendo el límite de credito permitido de la Sucursal del Cliente.", TipoMensaje.MsgInformacion)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
If ObjVentas.DtResultados(0)("LimiteRestanteCliente").ToString().ToDecimal - If(TxtTipoCambio.Visible, TxtTotal.Text.ToDecimal * TxtTipoCambio.Text.ToDecimal, TxtTotal.Text.ToDecimal) < 0 Then
|
||||||
|
ObjVentas.Dispose()
|
||||||
|
Alert("Se está excediendo el límite de credito permitido del Cliente.", TipoMensaje.MsgInformacion)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
If ObjVentas.DtResultados(0)("LimiteRestanteCliente").ToString().ToDecimal - If(TxtTipoCambio.Visible, TxtTotal.Text.ToDecimal * TxtTipoCambio.Text.ToDecimal, TxtTotal.Text.ToDecimal) < 0 Then
|
ObjVentas.Dispose()
|
||||||
ObjVentas.Dispose()
|
Alert("Ocurrio un error al obtener el limite de credito del cliente", TipoMensaje.MsgError)
|
||||||
Alert("Se está excediendo el límite de credito permitido del Cliente.", TipoMensaje.MsgInformacion)
|
Exit Sub
|
||||||
Exit Sub
|
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
ObjVentas.Dispose()
|
ObjVentas.Dispose()
|
||||||
Alert("Ocurrio un error al obtener el limite de credito del cliente", TipoMensaje.MsgError)
|
Alert("Ocurrio un error al obtener el limite de credito del cliente", TipoMensaje.MsgError)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
Else
|
|
||||||
ObjVentas.Dispose()
|
ObjVentas.Dispose()
|
||||||
Alert("Ocurrio un error al obtener el limite de credito del cliente", TipoMensaje.MsgError)
|
|
||||||
Exit Sub
|
|
||||||
End If
|
End If
|
||||||
ObjVentas.Dispose()
|
|
||||||
'End If
|
'End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user