Corrección Proveedores Abonar Descuentos

This commit is contained in:
rakcsle
2023-08-22 09:36:03 -07:00
parent 94f63102f7
commit b1d44befb3
2 changed files with 25 additions and 7 deletions

View File

@@ -4,6 +4,7 @@ Option Strict On
Imports System.Data
Imports Extensiones
Imports Microsoft.Reporting.WebForms
Imports Stimulsoft.Report.StiOptions.Export
Partial Class Bancos_ProveedoresAbonar
Inherits ClsPaginas
@@ -316,7 +317,8 @@ Partial Class Bancos_ProveedoresAbonar
End If
If UsuarioActual.CveRol = 1 Then
GvCxP.Columns(11).Visible = True
'GvCxP.Columns(11).Visible = True
chkaplicaDescuento.Visible = True
End If
End If
@@ -504,6 +506,8 @@ Partial Class Bancos_ProveedoresAbonar
e.Row.FCLiteral("LtlAux").Text = String.Format("<a Class=""Texto thickbox"" href=""/Contabilidad/PopUpAuxiliar.aspx?Tipo=CxPProveedor&CveProveedor={0}&CveCompra={1}&TB_iframe=true&height=370&width=900"" />Ir</a>", e.Row.DBCampo("CveProveedor"), e.Row.DBCampo("CveCompra"))
e.Row.FCTextBox("TxtAbonar").Attributes.Add("onblur", String.Format("FnCambia({0},this,{1},1,'{2}',1);{3}", e.Row.FCCheckBox("Chk").ClientID, e.Row.DBCampo("Saldo"), "El Importe no debe de exceder el saldo", FiltroInv))
If Not PermiteModificarImporte Then e.Row.FCTextBox("TxtAbonar").Enabled = False
If e.Row.DBCampo("CveCompraNC").ToEntero > 0 Then
e.Row.FCHyperLink("HplNC").Visible = True
@@ -537,7 +541,7 @@ Partial Class Bancos_ProveedoresAbonar
e.Row.FCCheckBox("Chk").Enabled = False
End If
e.Row.FCTextBox("TxtDescuento").Attributes.Add("onkeyup", $"calculaDescuentoEscalonado({e.Row.DBCampo("Saldo")},{e.Row.FCTextBox("TxtDescuento").ClientID},{e.Row.FCTextBox("TxtAbonar").ClientID})")
e.Row.FCTextBox("TxtDescuento").Attributes.Add("onkeyup", $"calculaDescuentoEscalonado({e.Row.DBCampo("Saldo")},{e.Row.FCTextBox("TxtDescuento").ClientID},{e.Row.FCTextBox("TxtAbonar").ClientID},{e.Row.FCCheckBox("Chk").ClientID},'El Importe no debe de exceder el saldo',1)")
Else
e.Row.FCTextBox("TxtDescuento").Visible = False
@@ -848,8 +852,8 @@ Partial Class Bancos_ProveedoresAbonar
Dim ImporteME As Decimal = 0
If Pago.CveMonedaPago = 2 Then ImporteME = Pago.ImportePago
If Not UsaComplementariaBancos And Pago.CveMonedaPago = 2 Then
ImporteME = tImporteMN
tImporteMN = (tImporteMN * Pago.TCPago).RoundSQL
ImporteME = tImporteMN
tImporteMN = (tImporteMN * Pago.TCPago).RoundSQL
End If
If MsgError = "" AndAlso Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, tImporteMN, 30, Referencia, ConceptoMovimiento, CveIE:=CveIE, CveProveedor:=CveProveedor, TipoCambio:=Pago.TCPago, CveSubProyecto:=CveSubProyecto, ImporteME:=ImporteME) Then
@@ -1658,5 +1662,12 @@ Partial Class Bancos_ProveedoresAbonar
End Sub
Protected Sub chkaplicaDescuento_CheckedChanged(sender As Object, e As EventArgs)
GvCxP.Columns(11).Visible = chkaplicaDescuento.Checked
UPCompras.Update()
End Sub
End Class