-- opción para quitar de la contabilidad una póliza
This commit is contained in:
@@ -87,6 +87,10 @@
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkExcel" runat="server" Visible="true" data-target="#DivCargaExcel"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Cargar Excel</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="BtnQuitarContabilidad" runat="server" Text="Quitar Contabilidad" Visible="false"
|
||||
data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" OnClick="BtnQuitarContabilidad_Click" />
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
@@ -312,6 +312,10 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
Contabilizar()
|
||||
End If
|
||||
|
||||
If Request("quitaconta") IsNot Nothing Then
|
||||
Quitacontabilidad()
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Exit Sub
|
||||
@@ -508,6 +512,10 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
GvPrePoliza.Columns(7).Visible = True
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveRol = 1 OrElse UsuarioActual.CveUsuario = 2296 Then
|
||||
BtnQuitarContabilidad.Visible = True
|
||||
End If
|
||||
|
||||
If DtMovimientos.FiltraParametros("CveConceptoContable IN (2,292)").Rows.Count > 0 AndAlso DtMovimientos.FiltraParametros("CveConceptoContable IN (30)").Rows.Count = 0 Then
|
||||
LnkComplementoPago.Visible = True
|
||||
End If
|
||||
@@ -2892,5 +2900,31 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
Protected Sub LnkEmitirComplemento_Click(sender As Object, e As EventArgs)
|
||||
GeneraTimbre(CvePrePoliza)
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnQuitarContabilidad_Click(sender As Object, e As EventArgs)
|
||||
Quitacontabilidad()
|
||||
End Sub
|
||||
|
||||
Private Sub Quitacontabilidad()
|
||||
Dim tieneerror As Boolean = False
|
||||
Dim oculta As Boolean = False
|
||||
Dim ObjConta As New ClsContabilidad()
|
||||
ObjConta.IniciaTransacSQL()
|
||||
'If GvPrePoliza.Rows.Count = 0 Then oculta = True
|
||||
|
||||
For Each gvr As GridViewRow In GvPrePoliza.Rows
|
||||
If Not ObjConta.UpdateContabilizable(gvr.DataKey("CvePrePolizaDetalle").ToEntero, oculta) Then
|
||||
tieneerror = True
|
||||
End If
|
||||
Next
|
||||
If Not tieneerror Then
|
||||
ObjConta.Commit()
|
||||
Alert("limpieza")
|
||||
Else
|
||||
ObjConta.RollBack()
|
||||
End If
|
||||
|
||||
ObjConta.Dispose()
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
|
||||
Reference in New Issue
Block a user