Cambio para los movimientos de banco

This commit is contained in:
HECTOR RODRIGUEZ
2021-06-29 09:28:15 -07:00
parent b081ce719a
commit 412f1157cf
2 changed files with 132 additions and 105 deletions

View File

@@ -317,7 +317,9 @@
</table> </table>
<div style="width: 100%; min-height: 200px; overflow-scrolling: auto;"> <div style="width: 100%; min-height: 200px; overflow-scrolling: auto;">
<asp:GridView ID="GvMov" runat="server" AutoGenerateColumns="False" ShowHeader="False" DataKeyNames="IdMov,IDCuenta,Cargo,Abono,TipoMovto,CveConcepto,CveProveedor,CvePersonal, CveCompra,CveClasificacion,CveCliente,CveVenta,TC,CveOC,PorcentajeImpuesto,CveCuenta, Cuenta, CveSubProyecto" Width="100%" CssClass=" GvMov GvSize table table-striped table-advance table-hover mysmallbtn" GridLines="None"> <asp:GridView ID="GvMov" runat="server" AutoGenerateColumns="False" ShowHeader="False"
DataKeyNames="IdMov,IDCuenta,Cargo,Abono,TipoMovto,CveConcepto,CveProveedor,CvePersonal, CveCompra,CveClasificacion,CveCliente, CveVenta,TC,CveOC,PorcentajeImpuesto,CveCuenta, Cuenta, CveSubProyecto,
ContadoTipoTransaccion, ContadoCuenta, ContadoNumeroFolio, ContadoImporte, ContadoBeneficiario, ContadoObservaciones" Width="100%" CssClass=" GvMov GvSize table table-striped table-advance table-hover mysmallbtn" GridLines="None">
<Columns> <Columns>
<asp:TemplateField> <asp:TemplateField>
<HeaderTemplate>Cuenta</HeaderTemplate> <HeaderTemplate>Cuenta</HeaderTemplate>

View File

@@ -133,6 +133,14 @@ Partial Class ContabilidadC_RegPrePoliza
ViewState("Actualizar") = value ViewState("Actualizar") = value
End Set End Set
End Property End Property
Public Property IDMovEditar As Integer
Get
Return CType(ViewState("IDMovEditar"), Integer)
End Get
Set(value As Integer)
ViewState("IDMovEditar") = value
End Set
End Property
Private ReadOnly Property CvePeriodo As Integer Private ReadOnly Property CvePeriodo As Integer
Get Get
@@ -357,6 +365,12 @@ Partial Class ContabilidadC_RegPrePoliza
.Add("TC", Type.GetType("System.Decimal")) .Add("TC", Type.GetType("System.Decimal"))
.Add("PorcentajeImpuesto", Type.GetType("System.Decimal")) .Add("PorcentajeImpuesto", Type.GetType("System.Decimal"))
.Add("CveCuenta", Type.GetType("System.Int32")) .Add("CveCuenta", Type.GetType("System.Int32"))
.Add("ContadoTipoTransaccion", Type.GetType("System.Int32"))
.Add("ContadoCuenta", Type.GetType("System.Int32"))
.Add("ContadoNumeroFolio", Type.GetType("System.String"))
.Add("ContadoImporte", Type.GetType("System.Double"))
.Add("ContadoBeneficiario", Type.GetType("System.String"))
.Add("ContadoObservaciones", Type.GetType("System.String"))
End With End With
End Sub End Sub
@@ -931,9 +945,13 @@ Partial Class ContabilidadC_RegPrePoliza
If e.Row.DataKey("CveConcepto").ToEntero().Contiene(30) Then If e.Row.DataKey("CveConcepto").ToEntero().Contiene(30) Then
e.Row.FCLinkButton("ImgBancos").Visible = True e.Row.FCLinkButton("ImgBancos").Visible = True
If CveTipoTransaccion > 0 And CveCuenta > 0 And Folio.Length > 0 And ImporteDocumento > 0 And Beneficiario.Length > 0 Then If e.Row.DataKey("ContadoTipoTransaccion").ToEntero > 0 And e.Row.DataKey("ContadoCuenta").ToEntero > 0 And e.Row.DataKey("ContadoNumeroFolio").ToString.Length > 0 And
e.Row.DataKey("ContadoImporte").ToDecimal > 0 And e.Row.DataKey("ContadoBeneficiario").ToString.Length > 0 Then
e.Row.FCLinkButton("ImgBancos").CssClass = "btn btn-circle btn-sm green" e.Row.FCLinkButton("ImgBancos").CssClass = "btn btn-circle btn-sm green"
End If End If
'If CveTipoTransaccion > 0 And CveCuenta > 0 And Folio.Length > 0 And ImporteDocumento > 0 And Beneficiario.Length > 0 Then
' e.Row.FCLinkButton("ImgBancos").CssClass = "btn btn-circle btn-sm green"
'End If
End If End If
If e.Row.DataKey("CveConcepto").ToEntero().Contiene(17) Then If e.Row.DataKey("CveConcepto").ToEntero().Contiene(17) Then
@@ -954,12 +972,12 @@ Partial Class ContabilidadC_RegPrePoliza
Dim TotalCargos, TotalAbonos As Decimal Dim TotalCargos, TotalAbonos As Decimal
If CvePrePoliza > 0 Then If CvePrePoliza > 0 Then
TotalCargos = TxtTotalCargos.Text.ToDecimal() TotalCargos = TxtTotalCargos.Text.ToDecimal
TotalAbonos = TxtTotalAbonos.Text.ToDecimal() TotalAbonos = TxtTotalAbonos.Text.ToDecimal
Else Else
For Each Gvr As GridViewRow In GvMov.Rows For Each Gvr As GridViewRow In GvMov.Rows
TotalCargos += Gvr.FCTextBox("TxtCargo").Text.ToDecimal() TotalCargos += Gvr.FCTextBox("TxtCargo").Text.ToDecimal
TotalAbonos += Gvr.FCTextBox("TxtAbono").Text.ToDecimal() TotalAbonos += Gvr.FCTextBox("TxtAbono").Text.ToDecimal
Next Next
End If End If
@@ -971,26 +989,21 @@ Partial Class ContabilidadC_RegPrePoliza
If CvePrePoliza > 0 Then If CvePrePoliza > 0 Then
'Nuevo Modulo Charlie 'Nuevo Modulo Charlie
ActualizarPrePoliza() ActualizarPrePoliza()
Else Else
Dim MensajeAlert = New StringBuilder Dim MensajeAlert = New StringBuilder
Dim ObjIE As New ClsBancos() Dim ObjIE As New ClsBancos()
Dim ObjMov As New ClsContabilidad(ObjIE.IniciaTransacSQL) Dim ObjMov As New ClsContabilidad(ObjIE.IniciaTransacSQL)
Dim ObjNom As New ClsNominas(ObjIE.IniciaTransacSQL) ' Dim ObjNom As New ClsNominas(ObjIE.IniciaTransacSQL)
Dim Conta As ClsContPAQi = Nothing Dim Conta As ClsContPAQi = Nothing
Dim IDPoliza As Integer = 0 Dim IDPoliza As Integer = 0
Dim MsgError As String = "" Dim MsgError As String = ""
Dim CveIE As Integer = -1 Dim CveIE As Integer
Dim CveIEInsertado As Integer = -1
Dim FolioIE As String = "" Dim FolioIE As String = ""
Try Try
Dim CvePrePoliza As Integer Dim CvePrePoliza As Integer
Dim ConceptoPoliza As String = TxtObservaciones.Text Dim ConceptoPoliza As String = TxtObservaciones.Text
CvePrePoliza = ObjMov.AddPrePolizas("Contabilidad/RegPrePoliza", DdlPlantilla.SelectedValue.ToEntero(), TotalCargos, TotalAbonos, 1, TxtFecha.Text.ToDate(), ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=DdlTipoPolizaAdd.SelectedValue.ToEntero()) CvePrePoliza = ObjMov.AddPrePolizas("Contabilidad/RegPrePoliza", DdlPlantilla.SelectedValue.ToEntero, TotalCargos, TotalAbonos, 1, TxtFecha.Text.ToDate, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=DdlTipoPolizaAdd.SelectedValue.ToEntero)
If CvePrePoliza > 0 Then If CvePrePoliza > 0 Then
Dim alertaContabilizacion As String = "Se enviaron correctamente las siguientes pólizas:<br><br>" Dim alertaContabilizacion As String = "Se enviaron correctamente las siguientes pólizas:<br><br>"
@@ -998,153 +1011,136 @@ Partial Class ContabilidadC_RegPrePoliza
Dim Importe As Double = 0 Dim Importe As Double = 0
Dim TipoMovto As Boolean = False Dim TipoMovto As Boolean = False
Dim IdCtaContable As Integer = 0 Dim IdCtaContable As Integer = 0
Dim PorcentajeImpuesto As Decimal = 0
Dim CveProveedor As Integer = -1
Dim CveCompra As Integer = -1
'inserto las compras que voy a pagarDdlSaldos 'inserto las compras que voy a pagarDdlSaldos
For Each gvr As GridViewRow In GvMov.Rows For Each gvr As GridViewRow In GvMov.Rows
'If gvr.DataKey("IDCuenta").ToEntero > 0 Then
' IdCtaContable = gvr.DataKey("IDCuenta")
'End If
If gvr.DataKey("IDCuenta").ToEntero() > 0 Then 'Registra movimieno bancario
IdCtaContable = gvr.DataKey("IDCuenta") If gvr.DataKey("CveConcepto").ToEntero = 30 Then
CveIE = ObjIE.AddBancos_IE(gvr.DataKey("ContadoCuenta").ToEntero, gvr.DataKey("ContadoTipoTransaccion").ToEntero, TxtFecha.Text, gvr.DataKey("ContadoNumeroFolio").ToString,
gvr.DataKey("ContadoBeneficiario").ToString, gvr.DataKey("ContadoImporte").ToString.ToDecimal, CveMoneda, 0, gvr.DataKey("ContadoObservaciones").ToString, "",
False, False, 0, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If CveIE < 0 Then
MsgError = "No se pudo registrar movimiento bancario"
Exit For
End If
'If ObjIE.GetBancosIE(CveIE, -1, -1, "-1", -1, "-1", "-1", -1, -1, -1, -1, -1, MinFecha, MaxFecha, MinFecha, MaxFecha, MinFecha, MaxFecha, -1, -1, UsuarioActual.CveEmpresa) Then
' FolioIE = ObjIE.Folio
'End If
End If End If
CveProveedor = gvr.DataKey("CveProveedor").ToEntero()
CveCompra = gvr.DataKey("CveCompra").ToEntero()
CveConcepto = gvr.DataKey("CveConcepto").ToEntero()
If gvr.DataKey("TipoMovto").ToDouble <> 0 Then
If gvr.DataKey("TipoMovto").ToDouble > 0 Then
Importe = gvr.FCTextBox("TxtAbono").Text.ToDouble Importe = gvr.FCTextBox("TxtAbono").Text.ToDouble
TipoMovto = True TipoMovto = True
Else Else
Importe = gvr.FCTextBox("TxtCargo").Text.ToDouble Importe = gvr.FCTextBox("TxtCargo").Text.ToDouble
TipoMovto = False TipoMovto = False
End If End If
'Registra pago de compra
If CveConcepto = 17 Then
CveProveedor = gvr.FCDropDownList("DdlProveedores").SelectedValue.ToEntero()
CveCompra = gvr.FCDropDownList("DdlCompras").SelectedValue.ToEntero()
End If
If CveConcepto = 41 Then If gvr.DataKey("CveConcepto").ToEntero <> 30 Then
CveIE = gvr.FCDropDownList("DdlSaldos").SelectedValue.ToEntero()
Else
If CveConcepto = 30 AndAlso Importe <> 0 Then
'Registra movimieno bancario
If CveConcepto = 30 Then
CveIE = ObjIE.AddBancos_IE(CveCuenta, CveTipoTransaccion, TxtFecha.Text, Folio, Beneficiario, ImporteDocumento, CveMoneda, 0, Observaciones, "", False, False, 0, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If CveIE < 0 Then MsgError = "No se pudo registrar movimiento bancario"
CveIEInsertado = CveIE
If ObjIE.GetBancosIE(CveIE, -1, -1, "-1", -1, "-1", "-1", -1, -1, -1, -1, -1, MinFecha, MaxFecha, MinFecha, MaxFecha, MinFecha, MaxFecha, -1, -1, UsuarioActual.CveEmpresa) Then
FolioIE = ObjIE.Folio
End If
End If
CveIE = CveIEInsertado
If gvr.DataKey("CveConcepto").ToEntero = 41 Then
CveIE = gvr.FCDropDownList("DdlSaldos").SelectedValue.ToEntero
Else Else
CveIE = -1 CveIE = -1
End If End If
End If End If
If idCuentaContabilizacion = 1 AndAlso (IdCtaContable = 0) Then If idCuentaContabilizacion = 1 AndAlso (IdCtaContable = 0) Then
idCuentaContabilizacion = 0 idCuentaContabilizacion = 0
End If End If
If Importe <> 0 Then If Importe <> 0 Then
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Importe, gvr.FCLiteral("LtlReferencia").Text, gvr.DataKey("CveConcepto").ToEntero(), gvr.FCTextBox("TxtConcepto").Text, Dim tCveCuenta As Integer = gvr.DataKey("CveCuenta").ToEntero
TxtFecha.Text.ToDate(), IdCtaContable, -1, CveSubProyecto:=gvr.FCDropDownList("DdlSubProyecto").SelectedValue.ToEntero(), CveIE:=CveIE,
CveProveedor:=CveProveedor, CveCompra:=CveCompra, 'If gvr.datakey("CveConcepto") = "299" Then
CvePersonal:=gvr.DataKey("CvePersonal").ToEntero(), CveClasificacion:=gvr.DataKey("CveClasificacion").ToEntero(), ' tCveCuenta = gvr.DataKey("CveCuenta").ToEntero
ImporteMX:=Importe, CveTipoGasto:=gvr.FCDropDownList("DdlTipoGasto").SelectedValue.ToEntero(), 'End If
CveCliente:=gvr.DataKey("CveCliente").ToEntero(), CveVenta:=gvr.DataKey("CveVenta").ToEntero(), TipoCambio:=If(gvr.DataKey("TC").ToString().ToDecimal() > 0, gvr.DataKey("TC").ToString().ToDecimal(), 1),
ImporteME:=If(gvr.DataKey("TC").ToString().ToDecimal() > 0, (Importe / (gvr.DataKey("TC").ToString().ToDecimal() - 1)).RoundSQL, 0), If ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Importe, gvr.FCLiteral("LtlReferencia").Text, gvr.DataKey("CveConcepto").ToEntero, gvr.FCTextBox("TxtConcepto").Text,
PorcentajeImpuesto:=gvr.DataKey("PorcentajeImpuesto").ToDecimal(), CveCuenta:=gvr.DataKey("CveCuenta").ToEntero()) Then TxtFecha.Text.ToDate, IdCtaContable, -1, CveSubProyecto:=gvr.FCDropDownList("DdlSubProyecto").SelectedValue.ToEntero, CveIE:=CveIE,
CveProveedor:=gvr.DataKey("CveProveedor").ToEntero, CveCompra:=gvr.DataKey("CveCompra").ToEntero,
CvePersonal:=gvr.DataKey("CvePersonal").ToEntero, CveClasificacion:=gvr.DataKey("CveClasificacion").ToEntero,
ImporteMX:=Importe, CveTipoGasto:=gvr.FCDropDownList("DdlTipoGasto").SelectedValue.ToEntero,
CveCliente:=gvr.DataKey("CveCliente").ToEntero, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveCuenta:=tCveCuenta) Then
Else Else
MsgError = "No se pudo insertar el detalle de la póliza2" MsgError = "No se pudo insertar el detalle de la póliza2"
Exit For Exit For
End If End If
End If End If
If CveIE > 0 AndAlso gvr.DataKey("CveConcepto").ToEntero = 30 Then
MensajeAlert.AppendFormat("<br/><br/>Folio Bancario: <b><a href = ""/Bancos/IE.aspx?CveIE={0}"" class=""texto"" target=""_blank"" >{1}</a></b>", CveIE, FolioIE)
End If
Next Next
If MsgError = "" AndAlso ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 1) Then
'If CvePeriodo > 0 Then
' If Not ObjNom.UpdateProvisionNomina(CvePeriodo, CvePrePoliza, UsuarioActual.CveEmpresa) Then
' MsgError = "No se pudo actualizar el periodo de la nómina"
' End If
'End If
If ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 1) Then
If ObjMov.ValorPolizaDescuadre > 0 Then If ObjMov.ValorPolizaDescuadre > 0 Then
GuardaLogAD($"Contabilidad/RegPrePolizas | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas") GuardaLogAD($"Contabilidad/RegPrePolizas | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
MsgError = ObjMov.MensajePolizaDescuadre & "-" MsgError = ObjMov.MensajePolizaDescuadre
End If End If
End If End If
'El movimiento 2 es el de Pago 'El movimiento 2 es el de Pago
If ChkAutoConta.Checked AndAlso MsgError = "" Or UsuarioActual.Empresa.Funcionalidad(200) = "1" And MsgError = "" Then If ChkAutoConta.Checked AndAlso UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso MsgError = "" Then
If idCuentaContabilizacion > 0 Then If idCuentaContabilizacion > 0 Then
If ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then If ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
'MENSAJE PRINCIPAL 'MENSAJE PRINCIPAL
MensajeAlert.AppendFormat("<br/><br/>Folio de Póliza: <b><a href = ""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"" class=""texto"" target=""_blank"" >{1}</a></b>", ObjMov.ContaIdPoliza, ObjMov.ContaFolio) MensajeAlert.AppendFormat("<br/><br/>Folio de Salida: <b><a href = ""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"" class=""texto"" target=""_blank"" >{1}</a></b>", ObjMov.ContaIdPoliza, ObjMov.ContaFolio)
MensajeAlert.AppendFormat("<br/><br/>Prepóliza: <b><a href = ""/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}"" class=""texto"" target=""_blank"" >{1}</a></b>", CvePrePoliza, ObjMov.ContaFolio) 'Alert(MensajeAlert.ToString, ModExtensiones.TipoMensaje.MsgInformacion)
'Alert(MensajeAlert.Tostring(), ModExtensiones.TipoMensaje.MsgInformacion)
Else Else
Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico") Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico")
End If End If
Else Else
Alert("No se puede contabilizar la Prepoliza debido a que una o mas cuentas son inválidas") Alert("No se puede contabilizar la Prepoliza debido a que una o mas cuentas son inválidas")
End If End If
Else
MensajeAlert.AppendFormat("<br/><br/>Folio: <b><a href = ""/Contabilidad/RegPrepolizaS.aspx?CvePrePoliza={0}"" class=""texto"" target=""_blank"" >{1}</a></b>", CvePrePoliza, ObjMov.ContaFolio)
End If End If
Else Else
MsgError = "No se pudo insertar la póliza" MsgError = "No se pudo insertar la póliza"
End If End If
If MsgError = "" Then
'MENSAJE IE
If CveIE > 0 Then
MensajeAlert.AppendFormat("<br/><br/>Folio Bancario: <b><a href = ""/Bancos/IE.aspx?CveIE={0}"" class=""texto"" target=""_blank"" >{1}</a></b>", CveIE, FolioIE)
Alert(MensajeAlert.ToString(), ModExtensiones.TipoMensaje.MsgInformacion, "window.location.reload()")
Else
Alert(If(MensajeAlert.ToString() = "", "Se registro con exito.", MensajeAlert.ToString()), TipoMensaje.MsgInformacion, "window.location.reload()")
End If
ObjIE.Commit()
If Conta IsNot Nothing Then Conta.Commit()
'UPPDocumento.Update()
'TxtObservaciones.Text = ""
'GvMov.DataBind()
'TxtFecha.Text = ""
'TxtObservaciones.Text = ""
Else
MsgError.GuardaLogAD()
ObjIE.RollBack()
If Conta IsNot Nothing Then Conta.RollBack()
End If
Catch ex As Exception Catch ex As Exception
ex.GuardaLog(ex.Message) MsgError = "Error"
ObjIE.RollBack()
If Conta IsNot Nothing Then Conta.RollBack()
Alert("Ocurrio un error al registrar el movimiento", TipoMensaje.MsgInformacion)
End Try End Try
If MsgError = "" Then
'MENSAJE IE
If CveIE Then
Alert(MensajeAlert.ToString, ModExtensiones.TipoMensaje.MsgInformacion, "window.location.reload()")
Else
Alert(If(MensajeAlert.ToString = "", "Se registro con exito.", MensajeAlert.ToString), TipoMensaje.MsgInformacion, "window.location.reload()")
End If
ObjIE.Commit()
If Conta IsNot Nothing Then Conta.Commit()
UPPDocumento.Update()
TxtObservaciones.Text = ""
GvMov.DataBind()
TxtFecha.Text = ""
TxtObservaciones.Text = ""
Else
Alert(MsgError.ToString, ModExtensiones.TipoMensaje.MsgError)
ObjIE.RollBack()
If Conta IsNot Nothing Then Conta.RollBack()
End If
ObjIE.Dispose() ObjIE.Dispose()
ObjMov.Dispose() ObjMov.Dispose()
If Conta IsNot Nothing Then Conta.Dispose() If Conta IsNot Nothing Then Conta.Dispose()
End If End If
End Sub End Sub
Private Sub ActualizarPrePoliza() Private Sub ActualizarPrePoliza()
Dim contador As Integer = 0 Dim contador As Integer = 0
'Dim diferencia As String = "" 'Dim diferencia As String = ""
@@ -1483,6 +1479,18 @@ Partial Class ContabilidadC_RegPrePoliza
CargaTipoTransaccion("Egs") CargaTipoTransaccion("Egs")
End If End If
Dim IdMov As Integer = GvRow.DataKey("IdMov").ToString.ToEntero
Dim Rows As DataRow() = DtMovimientos.Select("IdMov = " & IdMov)
IDMovEditar = IdMov
If Rows.Count > 0 Then
Dim dr As DataRow = Rows(0)
DdlTipoTransaccion.SelectedValueExist(dr("ContadoTipoTransaccion").ToString.ToEntero)
DdlCuenta.SelectedValueExist(dr("ContadoCuenta").ToString.ToEntero)
TxtDocumentoFolio.Text = dr("ContadoNumeroFolio").ToString
TxtDocumentoObservaciones.Text = dr("ContadoObservaciones").ToString
TxtDocumentoBeneficiario.Text = dr("ContadoBeneficiario").ToString
End If
TxtDocumentoImporte.Text = If(GvRow.FCTextBox("TxtAbono").Text = "", GvRow.FCTextBox("TxtCargo").Text.FormatoNumero, GvRow.FCTextBox("TxtAbono").Text.FormatoNumero) TxtDocumentoImporte.Text = If(GvRow.FCTextBox("TxtAbono").Text = "", GvRow.FCTextBox("TxtCargo").Text.FormatoNumero, GvRow.FCTextBox("TxtAbono").Text.FormatoNumero)
UpBancos.Update() UpBancos.Update()
@@ -1501,13 +1509,30 @@ Partial Class ContabilidadC_RegPrePoliza
DdlCuenta.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlCuenta.Items.Insert(0, New ListItem("Seleccione", "-1"))
End Sub End Sub
Private Sub BtnContado_Click(sender As Object, e As EventArgs) Handles BtnContado.Click Private Sub BtnContado_Click(sender As Object, e As EventArgs) Handles BtnContado.Click
CveConcepto = 30 Dim Rows As DataRow() = DtMovimientos.Select("IdMov = " & IDMovEditar)
CveTipoTransaccion = DdlTipoTransaccion.SelectedValue.ToEntero()
CveCuenta = DdlCuenta.SelectedValue.ToEntero() If Rows.Count > 0 Then
Folio = TxtDocumentoFolio.Text Dim dr As DataRow = Rows(0)
ImporteDocumento = TxtDocumentoImporte.Text.ToDecimal()
Observaciones = TxtDocumentoObservaciones.Text
Beneficiario = TxtDocumentoBeneficiario.Text dr("ContadoTipoTransaccion") = DdlTipoTransaccion.SelectedValue.ToEntero
dr("ContadoCuenta") = DdlCuenta.SelectedValue.ToEntero
dr("ContadoNumeroFolio") = TxtDocumentoFolio.Text
dr("ContadoImporte") = TxtDocumentoImporte.Text.ToDecimal
dr("ContadoBeneficiario") = TxtDocumentoBeneficiario.Text
dr("ContadoObservaciones") = TxtDocumentoObservaciones.Text
End If
DtMovimientos.AcceptChanges()
GvMov.DataSource = DtMovimientos
GvMov.DataBind()
'CveTipoTransaccion = DdlTipoTransaccion.SelectedValue.ToEntero
'CveCuenta = DdlCuenta.SelectedValue.ToEntero
'Folio = TxtDocumentoFolio.Text
'ImporteDocumento = TxtDocumentoImporte.Text.ToDecimal
'Observaciones = TxtDocumentoObservaciones.Text
'Beneficiario = TxtDocumentoBeneficiario.Text
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivContadoModal")) RegistraScript(String.Format("$('#{0}').modal('hide');", "DivContadoModal"))
GvMov.Rows(RowIndex).FCLinkButton("ImgBancos").CssClass = "btn btn-circle btn-sm green" GvMov.Rows(RowIndex).FCLinkButton("ImgBancos").CssClass = "btn btn-circle btn-sm green"
UPMovs.Update() UPMovs.Update()