--- pago por empleado

This commit is contained in:
2024-03-28 17:30:20 -07:00
parent a17229ee6a
commit 29e12878b0

View File

@@ -1149,7 +1149,6 @@ Partial Class Bancos_PopIEVentas
End If End If
Dim MsgError As String = "" Dim MsgError As String = ""
Dim CveConceptoPrePoliza As Integer = -1
Dim Inserta As Boolean = True Dim Inserta As Boolean = True
Dim ImportePagado As Decimal = 0 Dim ImportePagado As Decimal = 0
Dim Fecha As Date = TxtFechaDocumento.Text.Trim.ToDate Dim Fecha As Date = TxtFechaDocumento.Text.Trim.ToDate
@@ -1162,7 +1161,6 @@ Partial Class Bancos_PopIEVentas
Case "2" 'FyE Case "2" 'FyE
ImportePagado = TxtImporte.Text.Trim.ToDecimal ImportePagado = TxtImporte.Text.Trim.ToDecimal
Fecha = TxtFechaDocumento.Text.Trim.ToDate Fecha = TxtFechaDocumento.Text.Trim.ToDate
CveConceptoPrePoliza = 29
CveIE = -1 CveIE = -1
Dim stringPersonal As String = DdlFuncionarioEmpleado.SelectedItem.ToString Dim stringPersonal As String = DdlFuncionarioEmpleado.SelectedItem.ToString
'CvePersonal = DdlFuncionarioEmpleado.SelectedValue.ToEntero 'CvePersonal = DdlFuncionarioEmpleado.SelectedValue.ToEntero
@@ -1252,7 +1250,7 @@ Partial Class Bancos_PopIEVentas
Case "1" ' Banco Case "1" ' Banco
CveIE = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero, Fecha, TxtFolio.Text.Trim, TxtPagueseA.Text.Trim, ImportePagado, CveMoneda, tipoCambioPago, TxtObservaciones.Text.Trim, "", True, True, -1, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCuentaTarjeta:=If(DivTarjeta.Visible, DdlTarjeta.SelectedValue.ToEntero, -1), CveCuentaDeposito:=CveCuentaDeposito, Referencia:=If(TxtReferenciaCIE.Visible, TxtReferenciaCIE.Text, "-1"), CveCorte:=CveCorte) CveIE = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero, Fecha, TxtFolio.Text.Trim, TxtPagueseA.Text.Trim, ImportePagado, CveMoneda, tipoCambioPago, TxtObservaciones.Text.Trim, "", True, True, -1, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCuentaTarjeta:=If(DivTarjeta.Visible, DdlTarjeta.SelectedValue.ToEntero, -1), CveCuentaDeposito:=CveCuentaDeposito, Referencia:=If(TxtReferenciaCIE.Visible, TxtReferenciaCIE.Text, "-1"), CveCorte:=CveCorte)
If CveIE > 0 Then If CveIE > 0 Then
If CveVenta > 0 Then
Pago.ImportePago = ImportePagado Pago.ImportePago = ImportePagado
Pago.ImportePagoVenta = ImportePagado Pago.ImportePagoVenta = ImportePagado
Pago.CveIE = CveIE Pago.CveIE = CveIE
@@ -1261,14 +1259,25 @@ Partial Class Bancos_PopIEVentas
If MsgError = "" AndAlso AplicaPrePolizaPagoVenta(VentaActual, Pago, CvePrePoliza, ObjMov) Then If MsgError = "" AndAlso AplicaPrePolizaPagoVenta(VentaActual, Pago, CvePrePoliza, ObjMov) Then
MsgError = "No se pudo insertar la póliza" MsgError = "No se pudo insertar la póliza"
End If End If
End If
Else Else
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" ' FyE
Pago.ImportePago = ImportePagado
Pago.ImportePagoVenta = ImportePagado
Pago.TipoPago = "FyE"
Pago.CvePersonal = DdlFuncionarioEmpleado.SelectedValue.ToEntero
Pago.Referencia = DdlFuncionarioEmpleado.SelectedItem.ToString
If MsgError = "" AndAlso AplicaPrePolizaPagoVenta(VentaActual, Pago, CvePrePoliza, ObjMov) Then
MsgError = "No se pudo insertar la póliza"
End If
Case "3" 'Ingresos x Comprobar Case "3" 'Ingresos x Comprobar
If CveVenta > 0 Then
CveConceptoPrePoliza = 2
CveCliente = DdlIngreso.SelectedValue.ToEntero CveCliente = DdlIngreso.SelectedValue.ToEntero
CveIE = -1 CveIE = -1
ImportePagado = TxtImporte.Text.Trim.ToDecimal ImportePagado = TxtImporte.Text.Trim.ToDecimal
@@ -1295,11 +1304,10 @@ Partial Class Bancos_PopIEVentas
End If End If
End If End If
Next Next
End If
Case "4" 'Deudores Diversos Case "4" 'Deudores Diversos
If CveVenta > 0 Then
ImportePagado = TxtImporte.Text.Trim.ToDecimal ImportePagado = TxtImporte.Text.Trim.ToDecimal
CveConceptoPrePoliza = 2
'CveProveedor2 = DdlDeudor.SelectedValue.ToEntero 'CveProveedor2 = DdlDeudor.SelectedValue.ToEntero
CveIE = -1 CveIE = -1
If DdlDeudor.SelectedValue.ToEntero <= 0 Then If DdlDeudor.SelectedValue.ToEntero <= 0 Then
@@ -1322,9 +1330,9 @@ Partial Class Bancos_PopIEVentas
End If End If
End If End If
Next Next
End If
Case "5" 'Compras Case "5" 'Compras
If CveVenta > 0 Then
ImportePagado = TxtImporte.Text.Trim.ToDecimal ImportePagado = TxtImporte.Text.Trim.ToDecimal
CveIE = -1 CveIE = -1
For Each rw As GridViewRow In GvCompras.Rows For Each rw As GridViewRow In GvCompras.Rows
@@ -1353,7 +1361,7 @@ Partial Class Bancos_PopIEVentas
End If End If
Next Next
End If
Case Else Case Else
'NO SE HA DEFINIDO PARA FUNCIONARIO Y EMPLEADO 'NO SE HA DEFINIDO PARA FUNCIONARIO Y EMPLEADO
If RBLContado.SelectedValue <> "2" Then If RBLContado.SelectedValue <> "2" Then
@@ -1372,7 +1380,8 @@ Partial Class Bancos_PopIEVentas
MsgError = "No se pudo insertar la poliza detalle" MsgError = "No se pudo insertar la poliza detalle"
End If End If
End If End If
Else
MsgError = "venta no identificada"
End If End If
Else Else
MsgError = "No se pudo insertar la póliza" MsgError = "No se pudo insertar la póliza"