Rep Egresos sin comprobante saldar, Ie carga de archivo en bitacora
This commit is contained in:
@@ -61,6 +61,8 @@ Partial Class Bancos_RepEgresosSinComprobante
|
||||
DdlProveedores.SelectedValue = "-1"
|
||||
|
||||
CargaDatos()
|
||||
TxtConcepto.Text = "Saldo de Egresos por comprobar"
|
||||
CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubproyecto, AplicaTodos:="Selecione uno")
|
||||
|
||||
End If
|
||||
End Sub
|
||||
@@ -170,15 +172,20 @@ Partial Class Bancos_RepEgresosSinComprobante
|
||||
GvPersonal.DataBind()
|
||||
End Sub
|
||||
|
||||
Private Sub LnkHabilitarSaldar_Click(sender As Object, e As EventArgs) Handles LnkHabilitarSaldar.Click
|
||||
Private Sub LnkHabilitarSaldar_Click(sender As Object, e As EventArgs) Handles LnkHabilitarSaldar.Click
|
||||
|
||||
For Each gr As GridViewRow In GvESC.Rows
|
||||
If gr.DataKey("CveIE") <> "" Then
|
||||
gr.FCCheckBox("Chk").Visible = True
|
||||
LnkSaldar.Visible = True
|
||||
LnkHabilitarSaldar.Visible = False
|
||||
UPDatos.Update()
|
||||
gr.FCCheckBox("Chk").Visible = True
|
||||
UPDatos.Update()
|
||||
|
||||
End If
|
||||
Next
|
||||
|
||||
TxtConcepto.Text = "Saldo de Egresos por comprobar"
|
||||
DVSaldar.Visible = True
|
||||
UpSaldar.Update()
|
||||
|
||||
End Sub
|
||||
Private Sub LnkHabilitarSaldoFyE_Click(sender As Object, e As EventArgs) Handles LnkHabilitarSaldarFyE.Click
|
||||
For Each gr As GridViewRow In GvPersonal.Rows
|
||||
@@ -193,25 +200,34 @@ Partial Class Bancos_RepEgresosSinComprobante
|
||||
|
||||
Protected Sub LnkSaldar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
|
||||
|
||||
Dim Contador As Integer = 0
|
||||
For Each gr As GridViewRow In GvESC.Rows
|
||||
If gr.FCCheckBox("Chk").Checked Then
|
||||
Contador += 1
|
||||
End If
|
||||
Next
|
||||
|
||||
If Not Contador > 0 Then
|
||||
Alert("No se hay movimientos seleccionados")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
Dim ObjProveedor As New ClsCompProveedores(ObjConta.IniciaTransacSQL())
|
||||
|
||||
|
||||
Dim EsContabilizable As Boolean = If(UsuarioActual.CveEmpresa.Contiene(13, 83), False, True)
|
||||
|
||||
Dim CvePrePoliza As Integer = 0
|
||||
Dim MsgError As String = ""
|
||||
Try
|
||||
Dim Contador As Integer = 0
|
||||
For Each gr As GridViewRow In GvESC.Rows
|
||||
If gr.FCCheckBox("Chk").Checked Then
|
||||
Contador += 1
|
||||
End If
|
||||
Next
|
||||
|
||||
|
||||
If Contador > 0 Then
|
||||
CvePrePoliza = ObjConta.AddPrePolizas("Bancos/RepEgresosSinComprobante", 6, 0, 0, 1, Now,
|
||||
"Saldo de Egresos por comprobar", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
TxtConcepto.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
|
||||
For Each gr As GridViewRow In GvESC.Rows
|
||||
If gr.FCCheckBox("Chk").Checked Then
|
||||
@@ -245,7 +261,7 @@ Partial Class Bancos_RepEgresosSinComprobante
|
||||
End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoOtIngresos, gr.DataKey("Saldo").ToDecimal, gr.DataKey("Folio"), 211, "Saldo de ExC por Sistema", Now, UsuarioActual.Empresa.IdCuentaOtrosIngresos, -1, gr.DataKey("CveIE").ToEntero,
|
||||
ImporteMX:=gr.DataKey("Saldo").ToDecimal, CveSubProyecto:=gr.DataKey("CveSubProyecto").ToEntero, Contabilizable:=EsContabilizable) Then
|
||||
ImporteMX:=gr.DataKey("Saldo").ToDecimal, CveSubProyecto:=DdlSubProyecto.SelectedValue.ToEntero, Contabilizable:=EsContabilizable) Then
|
||||
MsgError = "Ocurrio un error al saldar el movimiento"
|
||||
Exit For
|
||||
End If
|
||||
@@ -269,8 +285,10 @@ Partial Class Bancos_RepEgresosSinComprobante
|
||||
|
||||
|
||||
If MsgError = "" Then
|
||||
LnkSaldar.Visible = False
|
||||
LnkHabilitarSaldar.Visible = True
|
||||
'LnkSaldar.Visible = False
|
||||
'LnkHabilitarSaldar.Visible = True
|
||||
DVSaldar.Visible = False
|
||||
|
||||
ObjConta.Commit()
|
||||
CargaDatos()
|
||||
Alert(String.Format("Los movimientos se saldaron correctamente <br/> <a href='/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={0}' class='Texto'>Ver Póliza</a>", CvePrePoliza), TipoMensaje.MsgInformacion)
|
||||
|
||||
Reference in New Issue
Block a user