Compras decimales retenciones, popcambairta empresa
This commit is contained in:
@@ -2750,7 +2750,7 @@ Partial Class Clientes
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not AltaCuentaContabilidadSIG(CodigoCuentaAltaCompaq, NombreCuentaCuentaAltaCompaq, IdCuentaAltaCompaq, ObjClientes.IniciaTransacSQL) Then
|
||||
If Not AltaCuentaContabilidadSIG(CodigoCuentaAltaCompaq, NombreCuentaCuentaAltaCompaq, IdCuentaAltaCompaq, 1, ObjClientes.IniciaTransacSQL) Then
|
||||
ErrorProceso = True
|
||||
End If
|
||||
|
||||
@@ -3843,12 +3843,23 @@ Partial Class Clientes
|
||||
Public Sub BtnAgregaCuentaContable(sender As Object, e As EventArgs) Handles BtnActivaRegistroClientes.Click, BtnActivaRegistroAnticipos.Click, BtnActivaRegistroIVA.Click, BtnActivaRegistroISR.Click
|
||||
Dim CuentaContable = DirectCast(sender, Button).CommandArgument.ToString()
|
||||
Dim Button = DirectCast(sender, Button)
|
||||
|
||||
|
||||
Dim CodigoCuentaAltaCompaq As String = ""
|
||||
Dim NombreCuentaCuentaAltaCompaq As String = ""
|
||||
Dim IdCuentaAltaCompaq As Integer = -1
|
||||
|
||||
|
||||
Select Case CuentaContable
|
||||
Case "Clientes"
|
||||
AgregarCuentaContable(Button, DdlCtaContableClientes, "", "", -1)
|
||||
Case "Anticipos"
|
||||
AgregarCuentaContable(Button, DdlCtaContableAnticipos, "", "", -1)
|
||||
|
||||
AgregarCuentaContable(Button, DdlCtaContableAnticipos, CodigoCuentaAltaCompaq, NombreCuentaCuentaAltaCompaq, IdCuentaAltaCompaq)
|
||||
AltaCuentaContabilidadSIG(CodigoCuentaAltaCompaq, NombreCuentaCuentaAltaCompaq, IdCuentaAltaCompaq, 3)
|
||||
|
||||
Case "RetIVA"
|
||||
|
||||
AgregarCuentaContable(Button, DdlCtaContableRetIVA, "", "", -1)
|
||||
Case "RetISR"
|
||||
AgregarCuentaContable(Button, DdlCtaContableRetISR, "", "", -1)
|
||||
@@ -3957,14 +3968,23 @@ Partial Class Clientes
|
||||
Return ProcesoCorrecto
|
||||
End Function
|
||||
|
||||
Private Function AltaCuentaContabilidadSIG(CodigoCuentaAltaCompaq As String, NombreCuentaCuentaAltaCompaq As String, IdCuentaAltaCompaq As Integer, Transaccion As SqlTransaction) As Boolean
|
||||
Private Function AltaCuentaContabilidadSIG(CodigoCuentaAltaCompaq As String, NombreCuentaCuentaAltaCompaq As String, IdCuentaAltaCompaq As Integer, CveConceptoContable As Integer, Optional Transaccion As SqlTransaction = Nothing) As Boolean
|
||||
|
||||
Dim ObjContabilidad As New ClsContabilidad(Transaccion)
|
||||
Dim Respuesta As Boolean = False
|
||||
Dim DisposeClases As Boolean = False
|
||||
|
||||
Dim ObjContabilidad As ClsContabilidad
|
||||
|
||||
If Transaccion Is Nothing Then
|
||||
ObjContabilidad = New ClsContabilidad
|
||||
DisposeClases = True
|
||||
Else
|
||||
ObjContabilidad = New ClsContabilidad(Transaccion)
|
||||
DisposeClases = False
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(7, 11, 145, 122) Then
|
||||
|
||||
|
||||
If ObjContabilidad.GetCuentasGlobales(UsuarioActual.CveEmpresa, 1) Then
|
||||
Dim CvePadre As Integer = ObjContabilidad.DtResultados.FiltroPrimeroValor("CveCuenta").ToEntero
|
||||
If CvePadre > 0 Then
|
||||
@@ -3972,7 +3992,7 @@ Partial Class Clientes
|
||||
Dim CvecuentaNueva As Integer = ObjContabilidad.AddCuenta(CvePadre, CodigoCuentaAltaCompaq, NombreCuentaCuentaAltaCompaq, "A", 2, 1, CveCliente:=CveCliente, IdCompaq:=IdCuentaAltaCompaq)
|
||||
|
||||
If CvecuentaNueva > 0 Then
|
||||
If ObjContabilidad.AddCuentasAsignaciones(1, UsuarioActual.CveEmpresa, CvecuentaNueva, CveCliente:=CveCliente) Then
|
||||
If ObjContabilidad.AddCuentasAsignaciones(CveConceptoContable, UsuarioActual.CveEmpresa, CvecuentaNueva, CveCliente:=CveCliente, PorcentajeIVA:=0) Then
|
||||
Respuesta = True
|
||||
End If
|
||||
End If
|
||||
@@ -3982,6 +4002,18 @@ Partial Class Clientes
|
||||
Respuesta = True
|
||||
End If
|
||||
|
||||
If DisposeClases Then
|
||||
ObjContabilidad.Dispose()
|
||||
|
||||
If Not Respuesta Then
|
||||
Alert("Se presento un error al agregar y asignar la cuenta (Conta SIG).", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
Return Respuesta
|
||||
End Function
|
||||
|
||||
|
||||
Reference in New Issue
Block a user