Proveedores Actualiza limite de drédito
This commit is contained in:
@@ -524,6 +524,29 @@ Public Class ClsCompProveedores
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Public Function UpdateProveedorLimiteCredito(CveProveedor As Integer, LimiteCredito As Decimal, PlazoPago As Integer, UsaLimiteCredito As Boolean, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
DataAdapter("PA_Comp_ProveedorLimiteCreditoUpdate")
|
||||||
|
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
|
||||||
|
.Add("@LimiteCredito", SqlDbType.Money).Value = LimiteCredito
|
||||||
|
.Add("@PlazoPago", SqlDbType.Int).Value = PlazoPago
|
||||||
|
.Add("@UsaLimiteCredito", SqlDbType.Bit).Value = UsaLimiteCredito
|
||||||
|
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
End With
|
||||||
|
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al Actualizar el limite de crédito del Proveedor.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
Public Function UpdateProveedorPagoElectronico(EstatusPagoElectronico As Boolean, CveUsuario As Integer, CveProveedor As Integer) As Boolean
|
Public Function UpdateProveedorPagoElectronico(EstatusPagoElectronico As Boolean, CveUsuario As Integer, CveProveedor As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Comp_ProveedorUpdatePagoElectronico")
|
DataAdapter("PA_Comp_ProveedorUpdatePagoElectronico")
|
||||||
|
|||||||
@@ -4139,8 +4139,10 @@ Partial Class Compras_Proveedores
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub LnkAddParametros_Click(sender As Object, e As EventArgs) Handles LnkAddParametros.Click
|
Private Sub LnkAddParametros_Click(sender As Object, e As EventArgs) Handles LnkAddParametros.Click
|
||||||
|
|
||||||
LblLimiteCredito.Text = TxtLimiteCredito.Text.FormatoNumero
|
LblLimiteCredito.Text = TxtLimiteCredito.Text.FormatoNumero
|
||||||
LblPlazoCobranza.Text = TxtPlazoCobranza.Text
|
LblPlazoCobranza.Text = TxtPlazoCobranza.Text
|
||||||
|
|
||||||
If LblLimiteCredito.Text.ToDouble > 0 Then
|
If LblLimiteCredito.Text.ToDouble > 0 Then
|
||||||
TdSaldo.Visible = True
|
TdSaldo.Visible = True
|
||||||
TdSaldo2.Visible = True
|
TdSaldo2.Visible = True
|
||||||
@@ -4149,9 +4151,24 @@ Partial Class Compras_Proveedores
|
|||||||
TdSaldo.Visible = False
|
TdSaldo.Visible = False
|
||||||
TdSaldo2.Visible = False
|
TdSaldo2.Visible = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If CveProveedor > 0 Then
|
||||||
|
Dim ObjPro As New ClsCompProveedores
|
||||||
|
If ObjPro.UpdateProveedorLimiteCredito(CveProveedor, TxtLimiteCredito.Text.ToDecimal, TxtPlazoCobranza.Text.ToEntero, ChkUsaLimiteCredito.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||||
|
Alert("Limite de crédito modificado correctamente.")
|
||||||
|
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAddParametros"))
|
||||||
|
End If
|
||||||
|
ObjPro.Dispose()
|
||||||
|
Else
|
||||||
|
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAddParametros"))
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
UPPCxP.Update()
|
UPPCxP.Update()
|
||||||
UpParametros.Update()
|
UpParametros.Update()
|
||||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAddParametros"))
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub LnkCuentasBancarias_Click(sender As Object, e As EventArgs) Handles LnkCuentasBancarias.Click
|
Private Sub LnkCuentasBancarias_Click(sender As Object, e As EventArgs) Handles LnkCuentasBancarias.Click
|
||||||
|
|||||||
Reference in New Issue
Block a user