diff --git a/Bancos/PolizaCheque.aspx b/Bancos/PolizaCheque.aspx index 35a7465b4..4155275f8 100644 --- a/Bancos/PolizaCheque.aspx +++ b/Bancos/PolizaCheque.aspx @@ -100,10 +100,12 @@
<%--
diff --git a/Bancos/PolizaCheque.aspx.vb b/Bancos/PolizaCheque.aspx.vb index 270c40fdd..30ceea1b4 100644 --- a/Bancos/PolizaCheque.aspx.vb +++ b/Bancos/PolizaCheque.aspx.vb @@ -8,7 +8,6 @@ Imports Stimulsoft.Report.BarCodes Partial Class Bancos_PolizaCheque Inherits ClsPaginas - ' Private Shared missing As Object = System.Reflection.Missing.Value #Region "Propiedades" Private Property NombreArchivo As String @@ -188,10 +187,9 @@ Partial Class Bancos_PolizaCheque DdlPlantilla.Items.Add(New ListItem("Pago Nomina", "36")) DdlPlantilla.SelectedValue = "36" DdlPlantilla.Enabled = False - End If - - - ''DdlProveedores.txtText.Value = "" + End If + + DdlProveedores.txtText.Value = "Seleccione un proveedor" DdlProveedores.txtValue.Value = "-1" DdlProveedores.setEsWebService(True) @@ -201,35 +199,13 @@ Partial Class Bancos_PolizaCheque End If - End Sub - - 'Protected Sub BtnBuscarProveedor_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BtnBuscarProveedor.Click - ' ViewState("CveProveedor") = HdnCveProveedor.Value.ToEntero - ' CargaProveedor(HdnCveProveedor.Value.ToEntero, "-1") - ' DdlPlantilla_SelectedIndexChanged(DdlPlantilla, e) - 'End Sub - - 'Private Sub CargaProveedor(ByVal CveProveedor As Integer, RFC As String) - ' Dim ObjProveedor As New ClsCompProveedores() - - - ' If ObjProveedor.GetProveedores(ClsCompProveedores.TipoConsulta.ParaUsoEnEmpresa, CveProveedor, "-1", "-1", "-1", "-1", RFC, "-1", "-1", -1, UsuarioActual.CveEmpresa) Then - ' If ObjProveedor.DtResultados.Rows.Count > 0 Then - ' TxtPagueseA.Text = ObjProveedor.RazonSocial - ' TxtNotificarA.Text = ObjProveedor.NotificarA.Trim - ' Else - ' Alert("El Proveedor solicitado no existe, por favor intente de nuevo.", TipoMensaje.MsgAdvertencia) - ' End If - ' End If - ' ObjProveedor.Dispose() - - 'End Sub - - Private Sub CargaPlantillas(TipoPlantilla As Integer) - - 'GvPlantillas.DataSource = GlobalDTContaPlantillasPolizas(UsuarioActual.CveEmpresa, TipoPlantilla) - 'GvPlantillas.DataBind() - + End Sub + + + Private Sub CargaPlantillas(TipoPlantilla As Integer) + + + DdlPlantilla.DataSource = GlobalDTContaPlantillasPolizas(UsuarioActual.CveEmpresa, TipoPlantilla) DdlPlantilla.DataBind() DdlPlantilla.Items.Insert(0, New ListItem("Seleccione", "-1")) @@ -238,16 +214,9 @@ Partial Class Bancos_PolizaCheque Private Sub CargaCuenta() DdlCuenta.Items.Clear() - Dim dt As DataTable = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa) - - - - - 'If DdlTipoTransaccion.SelectedValue.ToEntero = 3 Then - ' dt = dt.FiltraParametros("CveTipoCuenta = 7") - 'End If - - 'cuando es layout + Dim dt As DataTable = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa) + + 'cuando es layout If DdlTipoTransaccion.SelectedValue.ToEntero = 9 Then dt = dt.FiltraParametros(String.Format("CveMoneda = {0}", 1)) dt = dt.FiltraParametros("UsaLayout = 1") @@ -262,7 +231,7 @@ Partial Class Bancos_PolizaCheque - DdlCuenta.DataSource = dt 'GlobalDTBancosCuentas(UsuarioActual.CveUsuario) + DdlCuenta.DataSource = dt DdlCuenta.DataBind() DdlCuenta.Items.Insert(0, New ListItem("Seleccione", "-1")) @@ -272,33 +241,16 @@ Partial Class Bancos_PolizaCheque Private Sub CargaTipoTransaccion(TipoPlantilla As Integer) DdlTipoTransaccion.DataSource = GlobalDTTipoTransacciones.FiltraParametros(String.Format("Tipo = '{0}' ", If(TipoPlantilla = 0, "Egs", "Ing"))) DdlTipoTransaccion.DataBind() - End Sub - - 'Private Sub CargaProyecto() - ' DdlProyecto.DataSource = GlobalDTProyectos(UsuarioActual.Empresa.CveEmpresa) - ' DdlProyecto.DataBind() - 'End Sub - - 'Private Sub CargaSubProyecto() - ' DdlSubProyecto.Items.Clear() - ' DdlSubProyecto.DataSource = GlobalDTSubProyectos(DdlProyecto.SelectedValue.ToEntero) - ' DdlSubProyecto.DataBind() - ' DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1")) - 'End Sub - - - 'Protected Sub DdlProyectoAsignado_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DdlProyecto.SelectedIndexChanged - ' CargaSubProyecto() - 'End Sub - - Protected Sub DdlTipoTransaccion_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlTipoTransaccion.SelectedIndexChanged - 'CargaFolio() + End Sub + + + Protected Sub DdlTipoTransaccion_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlTipoTransaccion.SelectedIndexChanged + CargaCuenta() End Sub Private Sub CargaFolio() - If HdnTipoTransaccion.Value = "" Then CargaHdnTipoTransaccion() - 'If HdnTipoTransaccion.Value = "Egs" Then + If HdnTipoTransaccion.Value = "" Then CargaHdnTipoTransaccion() If DdlTipoTransaccion.SelectedValue.ToEntero > 0 AndAlso UsuarioActual.Empresa.Funcionalidad(505) <> "1" Then If UsuarioActual.CveEmpresa = 119 AndAlso IfNull(Request("Tipo"), "") = "Ing" Then Dim ObjFolios As New ClsGralFolios @@ -316,11 +268,9 @@ Partial Class Bancos_PolizaCheque Banco.Dispose() TxtFolio.Text = Folio.ToString End If - End If - 'Else - 'TxtFolio.Text = "" - 'End If - + End If + + Dim dr As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveCuenta={0}", DdlCuenta.SelectedValue)) If dr IsNot Nothing Then CveMoneda = dr("CveMoneda").ToString.ToEntero @@ -347,11 +297,6 @@ Partial Class Bancos_PolizaCheque Public Shared Function wsGetCuentas(ByVal prefixText As String, ByVal count As Integer) As String() - - 'Dim dt As DataTable = CType(Session("DtCuentas"), DataTable) - 'Dim Conta As New ClsContPAQi(UsuarioActual.Empresa) - 'dt = Conta.getCuentasCheque(Prefijo) - 'Conta.Dispose() Dim items As New List(Of String)(count) Dim dbrows As DataRow() @@ -385,8 +330,10 @@ Partial Class Bancos_PolizaCheque Protected Sub DdlPlantilla_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlPlantilla.SelectedIndexChanged DdlPersonal.SelectedValueExist(-1) - DdlProveedores.txtText.Value = "Seleccione un proveedor" + DdlProveedores.txtText.Value = "Seleccione" DdlProveedores.txtValue.Value = "-1" + TxtPagueseA.Text = "" + If DdlPlantilla.SelectedValue.ToEntero = 56 Then DdlProveedores.Visible = False @@ -451,7 +398,7 @@ Partial Class Bancos_PolizaCheque CveCuenta = drt("CveCuenta").ToString.ToEntero CodigoCuenta = drr("CuentaFormato").ToString() NombreCuenta = drr("Nombre").ToString() - 'Cuenta = drr("Nombre").ToString() + End If EsComodin = 0 End If @@ -463,7 +410,7 @@ Partial Class Bancos_PolizaCheque IdCuenta = drt("IdCtaContable").ToString.ToEntero CodigoCuenta = drr("CuentaFormato").ToString() NombreCuenta = drr("Nombre").ToString() - 'Cuenta = drr("Nombre").ToString() + End If EsComodin = 0 @@ -476,7 +423,6 @@ Partial Class Bancos_PolizaCheque IdCuenta = drr("Id").ToString.ToEntero CodigoCuenta = drr("CuentaFormato").ToString() NombreCuenta = drr("Nombre").ToString() - ' Cuenta = drr("Nombre").ToString() EsComodin = 1 End If End If @@ -487,7 +433,7 @@ Partial Class Bancos_PolizaCheque IdCuenta = IdCtaFondoGarantia CodigoCuenta = drr("CuentaFormato").ToString() NombreCuenta = drr("Nombre").ToString() - 'Cuenta = drr("Nombre").ToString() + EsComodin = 0 End If @@ -500,7 +446,7 @@ Partial Class Bancos_PolizaCheque dr("IdCuenta") = IdCuenta dr("CveCuenta") = CveCuenta dr("CodigoCuenta") = CodigoCuenta & "
" & NombreCuenta - dr("Cuenta") = Cuenta 'TxtCuentaContable.Text + dr("Cuenta") = Cuenta dr("RazonSocial") = drt("RazonSocial") dr("Concepto") = TxtObservaciones.Text dr("TipoMovto") = If(drt("TipoMovto").ToString = "False", 0, 1) @@ -512,7 +458,7 @@ Partial Class Bancos_PolizaCheque dr("Proyecto") = drt("Proyecto") dr("Personal") = drt("Personal") dr("CvePersonal") = drt("CvePersonal") - 'dr("CveConcepto") = drt("CveConcepto") + DtMovimientos.Rows.Add(dr) @@ -794,9 +740,7 @@ Partial Class Bancos_PolizaCheque If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowIndex = 0 Then e.Row.Cells(0).Width = Unit.Pixel(110) - e.Row.Cells(1).Width = Unit.Pixel(200) - 'e.Row.Cells(2).Width = Unit.Pixel(150) - 'e.Row.Cells(3).Width = Unit.Pixel(150) + e.Row.Cells(1).Width = Unit.Pixel(200) e.Row.Cells(2).Width = Unit.Pixel(120) e.Row.Cells(3).Width = Unit.Pixel(303) e.Row.Cells(4).Width = Unit.Pixel(72) @@ -833,43 +777,15 @@ Partial Class Bancos_PolizaCheque Dim CvePrePoliza As Integer Dim ValidaConcepto30 As Boolean = False - Dim PaguesA As String = "" + Dim PaguesA As String = TxtPagueseA.Text.Trim Dim CveProveedorSeleccionado As Integer = -1 Dim CvePersonalSeleccionado As Integer = -1 If DdlPlantilla.SelectedValue.ToEntero = 56 Then CvePersonalSeleccionado = DdlPersonal.SelectedValue.ToEntero - - 'If Not CvePersonalSeleccionado > 0 Then - ' Alert("Debe de seleccionar un personal.", TipoMensaje.MsgAdvertencia) - ' Exit Sub - 'End If - - - PaguesA = DdlPersonal.SelectedItem.Text - Else CveProveedorSeleccionado = DdlProveedores.txtValue.Value.ToEntero - 'If Not CveProveedorSeleccionado > 0 Then - ' Alert("Debe de seleccionar un proveedor.", TipoMensaje.MsgAdvertencia) - ' Exit Sub - 'End If - - If CveProveedorSeleccionado > 0 Then - PaguesA = DdlProveedores.txtText.Value - Else - PaguesA = TxtObservaciones.Text.Trim - - If TxtObservaciones.Text.Length = 0 Then - Alert("Debe de proporsionar las Observaciones.", TipoMensaje.MsgAdvertencia) - Exit Sub - End If - - End If - - - End If @@ -883,9 +799,6 @@ Partial Class Bancos_PolizaCheque End If - - - For Each Gvr As GridViewRow In GvMov.Rows TotalCargos += Gvr.FCTextBox("TxtCargo").Text.ToDecimal @@ -922,24 +835,14 @@ Partial Class Bancos_PolizaCheque Dim ObjIE As New ClsBancos() Dim ObjMov As New ClsContabilidad(ObjIE.IniciaTransacSQL) - Dim ObjNom As New ClsNominas(ObjIE.IniciaTransacSQL) - 'Dim Conta As ClsContPAQi = Nothing + Dim ObjNom As New ClsNominas(ObjIE.IniciaTransacSQL) Dim IDPoliza As Integer = 0 Dim CveIE As Integer Dim MsgError As String = "" - Dim idCuentaContabilizacion As Long = 1 - - 'If ChkContabilizar.Checked AndAlso UsuarioActual.Empresa.UsaContabilidad Then - ' Conta = New ClsContPAQi(UsuarioActual.Empresa) - ' Conta.IniciaTransacSQL() - ' IDPoliza = Conta.AddPoliza(2, TxtObservaciones.Text, TotalCargos, TotalAbonos, UsuarioActual.CveUsuario, TxtFechaDocumento.Text.ToDate) - ' 'inserto la póliza - ' NumPoliza = Conta.Folio - ' If IDPoliza = 0 Then - ' MsgError = "No se pudo insertar la póliza contable." - ' End If - 'End If - + Dim idCuentaContabilizacion As Long = 1 + + + If MsgError = "" Then ImporteDocumento = TxtImporte.Text.ToDecimal @@ -993,19 +896,11 @@ Partial Class Bancos_PolizaCheque If Not CvePersonalSeleccionado > 0 Then CvePersonalSeleccionado = gvr.DataKey("CvePersonal").ToEntero - End If - - 'CveProveedor = gvr.DataKey("CveProveedor").ToEntero - 'If HdnCveProveedor.Value.ToEntero > 0 Then CveProveedor = HdnCveProveedor.Value.ToEntero - - If Importe <> 0 Then - 'If ChkContabilizar.Checked AndAlso UsuarioActual.Empresa.UsaContabilidad Then - ' If Not Conta.AddMovimiento(IDPoliza, gvr.DataKey("IDCuenta").ToEntero, TipoMovto, Importe, gvr.FCLiteral("LtlReferencia").Text, gvr.FCTextBox("TxtConcepto").Text, 0, TxtFechaDocumento.Text.ToDate, "") Then - ' MsgError = "No se pudo insertar movimiento contable" - ' Exit For - ' End If - 'End If - + End If + + If Importe <> 0 Then + + If MsgError = "" Then If idCuentaContabilizacion = 1 AndAlso (IdCtaContable = 0) Then @@ -1049,10 +944,8 @@ Partial Class Bancos_PolizaCheque If CvePeriodo > 0 Then If Not ObjNom.UpdatePagoNomina(CvePeriodo, CveIE, CvePrePoliza, UsuarioActual.CveEmpresa) Then MsgError = "No se pudo actualizar el periodo de la nómina" - End If - - 'Generamos el Layout - 'GeneraLayout() + End If + End If Else @@ -1069,8 +962,7 @@ Partial Class Bancos_PolizaCheque If MsgError = "" Then If ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, -1) Then - If ObjMov.ValorPolizaDescuadre > 0 Then - ' MsgError = ObjMov.MensajePolizaDescuadre + If ObjMov.ValorPolizaDescuadre > 0 Then GuardaLogAD($"PolizaCheque/Guardar Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas") End If Else @@ -1082,7 +974,6 @@ Partial Class Bancos_PolizaCheque If UsuarioActual.Empresa.Funcionalidad(200) = "1" And MsgError = "" Then If ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then - 'Alert(alertaContabilizacion, ModExtensiones.TipoMensaje.MsgInformacion) IDPoliza = ObjMov.ContaIdPoliza Else MsgError = "Error al contabilizar" @@ -1094,9 +985,8 @@ Partial Class Bancos_PolizaCheque If MsgError = "" Then - ObjIE.Commit() - 'If Conta IsNot Nothing Then Conta.Commit() - + ObjIE.Commit() + If filemove <> "" Then filemove.FilesMove(CveIE.ToString, String.Format("{0}IE", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False) End If @@ -1110,7 +1000,7 @@ Partial Class Bancos_PolizaCheque DdlCuenta.SelectedValue = "-1" TxtFechaDocumento.Text = "" TxtImporte.Text = "" - 'TxtPagueseA.Text = "" + TxtPagueseA.Text = "" TxtObservaciones.Text = "" Dim StrMsg As New StringBuilder StrMsg.AppendFormat("El Movimiento se guardo correctamente

Movimiento
", CveIE) @@ -1123,148 +1013,29 @@ Partial Class Bancos_PolizaCheque Alert(StrMsg.ToString, TipoMensaje.MsgInformacion, "window.location.reload();") Else Alert(MsgError.ToString, TipoMensaje.MsgError) - ObjIE.RollBack() - 'If Conta IsNot Nothing Then Conta.RollBack() + ObjIE.RollBack() + End If Else - Alert("Debe de llevar un importe", TipoMensaje.MsgAdvertencia) - 'If Conta IsNot Nothing Then Conta.RollBack() - End If - Else - 'If Conta IsNot Nothing Then Conta.RollBack() + Alert("Debe de llevar un importe", TipoMensaje.MsgAdvertencia) + + End If + + End If ObjIE.Dispose() ObjMov.Dispose() - ObjNom.Dispose() - 'If Conta IsNot Nothing Then Conta.Dispose() + ObjNom.Dispose() + Else Alert("La suma de los movimientos no son iguales", TipoMensaje.MsgAdvertencia) End If - End Sub - '' -------------------------------------- codigo para generar la poliza del cheque - - 'If pIDPoliza > 0 Then - 'Dim ObjPoliza As New ClsContPAQi(UsuarioActual.Empresa) - - ' If ObjPoliza.GetPoliza(pIDPoliza, -1, -1, -1, -1) Then - ' dtMovs = ObjPoliza.DtResultados - ' End If - ' ObjPoliza.Dispose() - - ' ''Movimientos Póliza - ' If dtMovs IsNot Nothing Then - - 'Dim TotalAbonos, TotalCargos As Double - ' TotalAbonos = 0 : TotalCargos = 0 - ' For Each Row As DataRow In dtMovs.Rows - ''Cantidad - ''If Row("AplicaParaConcepto").ToString.ToEntero > 0 Then - ' Hoja.Range("B" & CeldaF & ": B" & CeldaF).Value = Row("CuentaFormato").ToString - ''Unidad - ''If Row("AplicaParaConcepto").ToString.ToEntero > 0 Then - ' Hoja.Range("C" & CeldaF & ":C" & CeldaF).Value = Row("Nombre").ToString - ''Concepto y Descripción - ' Hoja.Range("F" & CeldaF & ":F" & CeldaF).Value = If(Row("Cargo").ToString.ToDouble > 0, Row("Cargo").ToString.ToDouble.FormatoNumero, "") - ''P Unitario - ''Morro el precio unitario si va a ir? - ' Hoja.Range("G" & CeldaF & ":G" & CeldaF).Value = If(Row("Abono").ToString.ToDouble > 0, Row("Abono").ToString.ToDouble.FormatoNumero, "") - - ' TotalCargos += Row("Cargo").ToString.ToDouble - ' TotalAbonos += Row("Abono").ToString.ToDouble - - ' If dtMovs.Rows.Count > 1 AndAlso CeldaF - CeldaI < dtMovs.Rows.Count - 1 Then - ' CeldaF = CeldaF + 1 - ' Libro.Application.Run("AddRow", (CeldaF - 1).ToString, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, - ' missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing) - ' Libro.Save() - ' Libro.Application.DisplayAlerts = False - ' Libro.Application.ScreenUpdating = False - ' End If - - ' Next - - 'Dim AddedRow As Integer = CeldaF - CeldaI - - ' Hoja.Range("F" & (50 + AddedRow).ToString & ":F" & (50 + AddedRow).ToString).Value = TotalCargos.FormatoNumero - ' Hoja.Range("G" & (50 + AddedRow).ToString & ":G" & (50 + AddedRow).ToString).Value = TotalAbonos.FormatoNumero - ' Hoja.Range("C" & (52 + AddedRow).ToString & ":C" & (52 + AddedRow).ToString).Value = UsuarioRegistro - ''Hoja.Range("E" & (13 + AddedRow).ToString & ":E" & (13 + AddedRow).ToString).Value = LblAmortizacion.Text.Trim.ToDouble(TC).FormatoNumero - ''Hoja.Range("E" & (14 + AddedRow).ToString & ":E" & (14 + AddedRow).ToString).Value = TxtSubTotal2.Text.Trim.ToDouble(TC).FormatoNumero - ''Hoja.Range("E" & (15 + AddedRow).ToString & ":E" & (15 + AddedRow).ToString).Value = TxtIVA.Text.Trim.ToDouble(TC).FormatoNumero - - - ' End If - ' End If - - - 'Protected Sub LnkAgregar_Click(sender As Object, e As EventArgs) Handles LnkAgregar.Click - ' If HdnCveCuenta.Value.ToEntero = 0 Then - ' Alert("Seleccione una cuenta contable") - ' Exit Sub - ' End If - - ' If TxtCargoImporte.Text = "" AndAlso TxtAbonoImporte.Text = "" Then - ' Alert("Ingrese un importe.") - ' Exit Sub - ' End If - - ' If HdnCveCuenta.Value.ToEntero > 0 AndAlso (TxtCargoImporte.Text.ToDouble > 0 Or TxtAbonoImporte.Text.ToDouble > 0) Then - - ' Dim Cuenta As String = "" - ' Dim CodigoCuenta As String = "" - ' If DdlCuentaContable.SelectedValue.ToEntero > 0 Then 'DtCuentasContables - ' Dim drr As DataRow = DtCuentasContables.FiltroPrimero("Id=" & DdlCuentaContable.SelectedValue) - ' If drr IsNot Nothing Then - ' CodigoCuenta = drr("CuentaFormato").ToString() - ' Cuenta = drr("Nombre").ToString() - ' End If - ' End If - - ' Dim dr As DataRow = DtMovimientos.NewRow - ' dr("IdCuenta") = HdnCveCuenta.Value.ToEntero - ' dr("CodigoCuenta") = CodigoCuenta - ' dr("Cuenta") = Cuenta 'TxtCuentaContable.Text - ' dr("Referencia") = TxtReferencia.Text - ' dr("Concepto") = TxtConceptoContable.Text - ' dr("Cargo") = TxtCargoImporte.Text.ToDouble - ' dr("Abono") = TxtAbonoImporte.Text.ToDouble - - ' DtMovimientos.Rows.Add(dr) - - ' TxtTotalAbonos.Text = DtMovimientos.SUM("Abono").FormatoNumero - ' TxtTotalCargos.Text = DtMovimientos.SUM("Cargo").FormatoNumero - - ' 'ArregloMovs.Add(Mov) - ' GvMov.DataSource = DtMovimientos - ' GvMov.DataBind() - - ' 'saco de la póliza el importe del cheque, que coincida la cuenta contable con la bancaria - ' If DdlCuenta.SelectedValue.ToEntero > 0 Then - ' Dim drr As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario).FiltroPrimero("CveCuenta=" & DdlCuenta.SelectedValue) - ' If drr IsNot Nothing Then - ' TxtImporte.Text = (DtMovimientos.SUM("Abono", "IdCuenta =" & drr("IdCtaContable").ToString) - DtMovimientos.SUM("Cargo", "IdCuenta =" & drr("IdCtaContable").ToString)).ToString.FormatoNumero - ' UPPDocumento.Update() - ' End If - ' End If - - ' HdnCveCuenta.Value = "0" - ' DdlCuentaContable.SelectedValue = "0" - - ' TxtReferencia.Text = "" - ' TxtConceptoContable.Text = "" - ' TxtCargoImporte.Text = "" - ' TxtAbonoImporte.Text = "" - - ' End If - - 'End Sub - - - - + End Sub + + Protected Sub GvMov_RowDeleting(sender As Object, e As GridViewDeleteEventArgs) Handles GvMov.RowDeleting Dim idMov As Integer = GvMov.DataKeys(e.RowIndex).Value.ToString.ToEntero @@ -1310,10 +1081,22 @@ Partial Class Bancos_PolizaCheque Protected Sub CargaDDLPersonal() DdlPersonal.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa) DdlPersonal.DataBind() - DdlPersonal.Items.Insert(0, New ListItem("Seleccione Personal", "-1")) + DdlPersonal.Items.Insert(0, New ListItem("Seleccione", "-1")) End Sub + + Protected Sub DdlPersonal_SelectedIndexChanged(sender As Object, e As EventArgs) + TxtPagueseA.Text = DdlPersonal.SelectedItem.Text + UPPDocumento.Update() + End Sub + + + + Protected Sub DdlProveedores_selectedindexchange(sender As Object, e As EventArgs) + TxtPagueseA.Text = DdlProveedores.txtText.Value + UPPDocumento.Update() + End Sub End Class