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

File diff suppressed because it is too large Load Diff

View File

@@ -1075,23 +1075,38 @@ Partial Class Bancos_PopIECompras
End Sub
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
If CveCompra > 0 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
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
If objGastosXComprobar.GetEgresosSinComprobarPersonal(UsuarioActual.CveEmpresa) Then
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
If CveCompra > 0 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
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 Sub
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
CveConcepto = 29
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
Dim stringPersonal As String = DdlFuncionarioEmpleado.SelectedItem.ToString
CvePersonal = DdlFuncionarioEmpleado.SelectedValue.ToEntero
@@ -1516,9 +1542,13 @@ Partial Class Bancos_PopIECompras
Else
MsgError = "Ocurrio un Error al registrarse el movimiento bancario."
Inserta = False
End If
Case Else
End If
Case "2" ' F Y E
Case Else
CveIE = -1
End Select
If DdlOtrosPagos.SelectedValue = "2" AndAlso TxtComision.Text.ToDecimal > 0 Then