Pop IE Compras

This commit is contained in:
Oscar Irigoyen
2022-12-12 10:47:24 -07:00
parent 4233fc1386
commit 937d8199ad
2 changed files with 839 additions and 809 deletions

View File

@@ -1076,22 +1076,37 @@ Partial Class Bancos_PopIECompras
Protected Sub DdlFuncionarioEmpleado_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlFuncionarioEmpleado.SelectedIndexChanged Protected Sub DdlFuncionarioEmpleado_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlFuncionarioEmpleado.SelectedIndexChanged
ArrIEFuncionariosEmpleados = New ArrayList() ArrIEFuncionariosEmpleados = New ArrayList()
ArrIE = New ArrayList()
Dim objGastosXComprobar As New ClsMovimientos
Dim CvePersonal As Integer = DdlFuncionarioEmpleado.SelectedValue.ToEntero Dim CvePersonal As Integer = DdlFuncionarioEmpleado.SelectedValue.ToEntero
If CveCompra > 0 Then If objGastosXComprobar.GetEgresosSinComprobarPersonal(UsuarioActual.CveEmpresa) Then
For Each Ant As Anticipos In ArrIE
If Ant.CvePersonal = CvePersonal Then
ArrIEFuncionariosEmpleados.Add(New Anticipos With {.CveIE = Ant.CveIE, .Importe = Ant.Importe, .CvePersonal = Ant.CvePersonal})
End If For Each Row As DataRow In objGastosXComprobar.DtResultados.FiltraParametros("CvePersonal > 0 AND FechaDocumento IS NOT NULL").Rows
ArrIE.Add(New Anticipos With {.CveIE = Row("CveIE").ToString.ToEntero, .Importe = Row("Saldo").ToString.ToDecimal, .CvePersonal = Row("CvePersonal").ToString.ToEntero})
Next Next
'actualizo el monto maximo a pagar en el movimiento bancario
Dim tSaldo As Decimal = DdlFuncionarioEmpleado.SelectedItem.Text.Split(CChar("-"))(1).ToDecimal If CveCompra > 0 Then
If tSaldo < MovimientoPagar.Saldo Then For Each Ant As Anticipos In ArrIE
TxtImporte.Text = tSaldo.FormatoNumero() If Ant.CvePersonal = CvePersonal Then
ArrIEFuncionariosEmpleados.Add(New Anticipos With {.CveIE = Ant.CveIE, .Importe = Ant.Importe, .CvePersonal = Ant.CvePersonal})
End If
Next
'actualizo el monto maximo a pagar en el movimiento bancario
Dim tSaldo As Decimal = DdlFuncionarioEmpleado.SelectedItem.Text.Split(CChar("-"))(1).ToDecimal
If tSaldo < MovimientoPagar.Saldo Then
TxtImporte.Text = tSaldo.FormatoNumero()
End If
End If End If
End If End If
End Sub End Sub
Private Sub DdlIngreso_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlIngreso.SelectedIndexChanged Private Sub DdlIngreso_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlIngreso.SelectedIndexChanged
@@ -1379,6 +1394,17 @@ Partial Class Bancos_PopIECompras
Fecha = TxtFechaDocumento.Text.Trim.ToDate Fecha = TxtFechaDocumento.Text.Trim.ToDate
CveConcepto = 29 CveConcepto = 29
CveIE = -1 CveIE = -1
If ArrIEFuncionariosEmpleados IsNot Nothing AndAlso ArrIEFuncionariosEmpleados.Count > 0 Then
Dim objAray As Anticipos = DirectCast(ArrIEFuncionariosEmpleados(0), Anticipos)
CveIE = objAray.CveIE
End If
If Not CveIE > 0 Then
Alert("No se encontro movimientos bancarios de perosonal", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
TipoMovimiento = True TipoMovimiento = True
Dim stringPersonal As String = DdlFuncionarioEmpleado.SelectedItem.ToString Dim stringPersonal As String = DdlFuncionarioEmpleado.SelectedItem.ToString
CvePersonal = DdlFuncionarioEmpleado.SelectedValue.ToEntero CvePersonal = DdlFuncionarioEmpleado.SelectedValue.ToEntero
@@ -1517,8 +1543,12 @@ Partial Class Bancos_PopIECompras
MsgError = "Ocurrio un Error al registrarse el movimiento bancario." MsgError = "Ocurrio un Error al registrarse el movimiento bancario."
Inserta = False Inserta = False
End If End If
Case "2" ' F Y E
Case Else Case Else
CveIE = -1 CveIE = -1
End Select End Select
If DdlOtrosPagos.SelectedValue = "2" AndAlso TxtComision.Text.ToDecimal > 0 Then If DdlOtrosPagos.SelectedValue = "2" AndAlso TxtComision.Text.ToDecimal > 0 Then