Cambios para comisiones negativas

This commit is contained in:
HECTOR RODRIGUEZ
2021-04-15 17:05:10 -07:00
parent e311ba1bf7
commit 3c4e0bf83f
2 changed files with 19 additions and 10 deletions

View File

@@ -71,6 +71,7 @@ Partial Class Bancos_DepositosCaja
Dim TotalImporte As Decimal = 0
Dim TotalImportePrePoliza As Decimal
Dim Comision As Integer = IIf(TxtComision.Text.ToEntero > 0, TxtComision.Text.ToEntero, (TxtComision.Text.ToEntero * -1)).ToString.ToEntero
For Each Gvr As GridViewRow In GvFacturas.Rows
If Gvr.FCCheckBox("ChkFactura").Checked Then TotalImporte += Gvr.DataKey("Importe").ToDecimal
@@ -82,7 +83,7 @@ Partial Class Bancos_DepositosCaja
End If
TotalImportePrePoliza = TotalImporte
If TxtComision.Text.ToEntero > 0 Then
If Comision > 0 Then
TotalImporte = TotalImporte - TxtComision.Text.ToEntero
If DdlSubProyectoDeposito.SelectedValue.ToEntero = -1 Or DdlClasificacion.SelectedValue.ToEntero = -1 Then
Alert("Debes Seleccionar un Subproyecto y una Clasificación", TipoMensaje.MsgAdvertencia)
@@ -134,7 +135,7 @@ Partial Class Bancos_DepositosCaja
End If
CveIEOrigen = ObjBancos.AddBancos_IE(DdlCajaChica.SelectedValue.ToEntero, 2, Fecha, FolioIE.ToString, "Depósito Bancario", TotalImporte, CveMoneda, 1, "Depósito Bancario", "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If TxtComision.Text.ToEntero > 0 Then
If Comision > 0 Then
CveSubProyecto = DdlSubProyectoDeposito.SelectedValue.ToEntero
CveClasificacion = DdlClasificacion.SelectedValue.ToEntero
If ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, TotalImporte, "Depósito Bancario", 30, "Depósito Bancario", Fecha, IdCuentaBancariaOrigen, -1, CveIE:=CveIEOrigen, ImporteMX:=TotalImporte * TipoCambio, CveCuenta:=CveCuentaBancariaOrigen) Then