Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -317,7 +317,9 @@
|
||||
</table>
|
||||
|
||||
<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>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Cuenta</HeaderTemplate>
|
||||
|
||||
@@ -133,6 +133,14 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
ViewState("Actualizar") = value
|
||||
End Set
|
||||
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
|
||||
Get
|
||||
@@ -357,6 +365,12 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
.Add("TC", Type.GetType("System.Decimal"))
|
||||
.Add("PorcentajeImpuesto", Type.GetType("System.Decimal"))
|
||||
.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 Sub
|
||||
|
||||
@@ -931,9 +945,13 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
If e.Row.DataKey("CveConcepto").ToEntero().Contiene(30) Then
|
||||
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"
|
||||
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
|
||||
|
||||
If e.Row.DataKey("CveConcepto").ToEntero().Contiene(17) Then
|
||||
@@ -971,10 +989,6 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
If CvePrePoliza > 0 Then
|
||||
'Nuevo Modulo Charlie
|
||||
ActualizarPrePoliza()
|
||||
|
||||
|
||||
|
||||
|
||||
Else
|
||||
Dim MensajeAlert = New StringBuilder
|
||||
Dim ObjIE As New ClsBancos()
|
||||
@@ -999,10 +1013,6 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
Dim TipoMovto As Boolean = False
|
||||
Dim IdCtaContable As Integer = 0
|
||||
Dim PorcentajeImpuesto As Decimal = 0
|
||||
|
||||
|
||||
|
||||
|
||||
Dim CveProveedor As Integer = -1
|
||||
Dim CveCompra As Integer = -1
|
||||
|
||||
@@ -1035,7 +1045,11 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
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)
|
||||
|
||||
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"
|
||||
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
|
||||
@@ -1069,6 +1083,9 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
Exit For
|
||||
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
|
||||
|
||||
|
||||
@@ -1144,7 +1161,6 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
If Conta IsNot Nothing Then Conta.Dispose()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ActualizarPrePoliza()
|
||||
Dim contador As Integer = 0
|
||||
'Dim diferencia As String = ""
|
||||
@@ -1483,6 +1499,18 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
CargaTipoTransaccion("Egs")
|
||||
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)
|
||||
UpBancos.Update()
|
||||
@@ -1501,13 +1529,30 @@ Partial Class ContabilidadC_RegPrePoliza
|
||||
DdlCuenta.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End Sub
|
||||
Private Sub BtnContado_Click(sender As Object, e As EventArgs) Handles BtnContado.Click
|
||||
CveConcepto = 30
|
||||
CveTipoTransaccion = DdlTipoTransaccion.SelectedValue.ToEntero()
|
||||
CveCuenta = DdlCuenta.SelectedValue.ToEntero()
|
||||
Folio = TxtDocumentoFolio.Text
|
||||
ImporteDocumento = TxtDocumentoImporte.Text.ToDecimal()
|
||||
Observaciones = TxtDocumentoObservaciones.Text
|
||||
Beneficiario = TxtDocumentoBeneficiario.Text
|
||||
Dim Rows As DataRow() = DtMovimientos.Select("IdMov = " & IDMovEditar)
|
||||
|
||||
If Rows.Count > 0 Then
|
||||
Dim dr As DataRow = Rows(0)
|
||||
|
||||
|
||||
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"))
|
||||
GvMov.Rows(RowIndex).FCLinkButton("ImgBancos").CssClass = "btn btn-circle btn-sm green"
|
||||
UPMovs.Update()
|
||||
|
||||
Reference in New Issue
Block a user