-- se depuró/limpió la variables idctaXXX
This commit is contained in:
@@ -110,15 +110,6 @@ Partial Class Clientes
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property IdCtaCompCliente As String
|
||||
Get
|
||||
Return If(IsNothing(ViewState("IdCtaCompCliente")), "", ViewState("IdCtaCompCliente").ToString())
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("IdCtaCompCliente") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property ArrayDisp As String
|
||||
Get
|
||||
Return If(IsNothing(ViewState("ArrayDisp")), "", ViewState("ArrayDisp").ToString())
|
||||
@@ -205,7 +196,6 @@ Partial Class Clientes
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Private Property DTCobrosRealizados As DataTable
|
||||
Get
|
||||
If ViewState("DTCobrosRealizados") Is Nothing Then
|
||||
@@ -1355,8 +1345,7 @@ Partial Class Clientes
|
||||
DdlCorporativo.DataBind()
|
||||
End Sub
|
||||
Protected Sub CargaCuentasExistentes()
|
||||
'SELECTED VALUES
|
||||
ActivarRegistroAutomatico()
|
||||
'SELECTED VALUES
|
||||
HeaderContable.Attributes.Remove("onclick")
|
||||
UpFiscalContable.Update()
|
||||
End Sub
|
||||
@@ -2317,17 +2306,6 @@ Partial Class Clientes
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Function AsignaCuentasAutomaticas(ObjClientes As ClsClientes) As Boolean
|
||||
Dim IdCtaContableClientes As Integer = UsuarioActual.Empresa.Funcionalidad(246).ToEntero()
|
||||
Dim IdCtaContableAnticipos As Integer = UsuarioActual.Empresa.Funcionalidad(319).ToEntero()
|
||||
Dim IdCtaContableComplementaria As Integer = UsuarioActual.Empresa.Funcionalidad(320).ToEntero()
|
||||
Dim IdCtaContMonedaExtranjera As Integer = UsuarioActual.Empresa.Funcionalidad(331).ToEntero()
|
||||
Dim IdCtaContMonedaExtranjeraAnticipos As Integer = UsuarioActual.Empresa.Funcionalidad(332).ToEntero()
|
||||
Dim IdCtaContCompAnticipos As Integer = UsuarioActual.Empresa.Funcionalidad(333).ToEntero()
|
||||
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Protected Sub BtnGuardar_Click(sender As Object, e As System.EventArgs) Handles BtnGuardar.Click
|
||||
If UsuarioActual.CveUsuario = 1465 And TxtCodigo.Text.Trim = "" Then
|
||||
Alert("El cliente no se puede registrar sin ingresar un Código.", TipoMensaje.MsgAdvertencia)
|
||||
@@ -2603,10 +2581,6 @@ Partial Class Clientes
|
||||
'Next
|
||||
GuardarDocumentosClientes()
|
||||
|
||||
If Not AsignaCuentasAutomaticas(ObjClientes) Then
|
||||
ErrorProceso = True
|
||||
End If
|
||||
|
||||
For Each GVR As GridViewRow In GvImpuestosLocales.Rows
|
||||
If GVR.FCCheckBox("ChkDeduccion").Checked Then
|
||||
ObjClientes.AddClienteImpuestosLocales(CveCliente, GVR.DataKey("CveImpuestoLocal").ToEntero())
|
||||
@@ -2645,8 +2619,6 @@ Partial Class Clientes
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If ErrorProceso Then
|
||||
ObjClientes.RollBack()
|
||||
Else
|
||||
@@ -3758,14 +3730,11 @@ Partial Class Clientes
|
||||
Private Function AgregarCuentaContable(btn As Button, ddl As DropDownList, ByRef CodigoCuentaAltaCompaq As String, ByRef NombreCuentaCuentaAltaCompaq As String, ByRef IdCuentaAltaCompaq As Integer) As Boolean
|
||||
Dim IdCuentaContable As Integer = -1
|
||||
Dim CtaCodigo As String = ""
|
||||
Dim TieneError = False
|
||||
Dim IdCtaContableClientes As Integer = -1, IdCtaContableAnticipos As Integer = -1, IdCtaContableRetIVA As Integer = -1, IdCtaContableRetISR As Integer = -1
|
||||
Dim TieneError = False
|
||||
Dim ProcesoCorrecto As Boolean
|
||||
|
||||
Dim ObjContaAC As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
|
||||
|
||||
ObjContaAC.IniciaTransacSQL()
|
||||
|
||||
Dim CuentaPadre = -1
|
||||
@@ -3785,8 +3754,6 @@ Partial Class Clientes
|
||||
'SI EL NOMBRE DEL PROVEEDOR ES MAYOR DE 50 LO CORTAMOS
|
||||
Dim NombreCuenta = If(TxtNombreComercial.Text.Trim.Length > 50, TxtNombreComercial.Text.Trim.Substring(0, 50), TxtNombreComercial.Text.Trim)
|
||||
|
||||
|
||||
|
||||
IdCuentaContable = ObjContaAC.AddSiguienteCuentaHijo(CuentaPadre, NombreCuenta, Tipo:="A", CuentaMayor:=2)
|
||||
|
||||
NombreCuentaCuentaAltaCompaq = NombreCuenta
|
||||
@@ -3800,21 +3767,8 @@ Partial Class Clientes
|
||||
If dt.Rows.Count = 1 Then
|
||||
|
||||
Dim row As DataRow = dt.Rows(0)
|
||||
|
||||
CtaCodigo = CStr(row("CtaCodigo"))
|
||||
CodigoCuentaAltaCompaq = CStr(row("Codigo"))
|
||||
|
||||
Select Case btn.CommandArgument.ToString()
|
||||
Case "Clientes"
|
||||
IdCtaContableClientes = IdCuentaContable
|
||||
Case "Anticipos"
|
||||
IdCtaContableAnticipos = IdCuentaContable
|
||||
Case "RetIVA"
|
||||
IdCtaContableRetIVA = IdCuentaContable
|
||||
Case "RetISR"
|
||||
IdCtaContableRetISR = IdCuentaContable
|
||||
End Select
|
||||
|
||||
CodigoCuentaAltaCompaq = CStr(row("Codigo"))
|
||||
Else
|
||||
TieneError = True
|
||||
End If
|
||||
@@ -3823,9 +3777,6 @@ Partial Class Clientes
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
If Not TieneError Then
|
||||
ObjContaAC.Commit()
|
||||
'Alert(String.Format("Se registo la Cuenta Contable: {0}", CtaCodigo, TipoMensaje.MsgInformacion))
|
||||
@@ -3889,40 +3840,14 @@ Partial Class Clientes
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
Return Respuesta
|
||||
End Function
|
||||
|
||||
Private Sub ActivarRegistroAutomatico()
|
||||
|
||||
'Clientes
|
||||
If DdlCtaContableClientes.SelectedValue.ToEntero() <= 0 And UsuarioActual.Empresa.Funcionalidad(211).ToEntero() > 0 Then
|
||||
BtnActivaRegistroClientes.Visible = True
|
||||
End If
|
||||
|
||||
'Anticipos
|
||||
If DdlCtaContableAnticipos.SelectedValue.ToEntero() <= 0 And UsuarioActual.Empresa.Funcionalidad(212).ToEntero() > 0 Then
|
||||
BtnActivaRegistroAnticipos.Visible = True
|
||||
End If
|
||||
|
||||
'Ret IVA
|
||||
If DdlCtaContableRetIVA.SelectedValue.ToEntero() <= 0 And UsuarioActual.Empresa.Funcionalidad(213).ToEntero() > 0 Then
|
||||
BtnActivaRegistroIVA.Visible = True
|
||||
End If
|
||||
|
||||
'Ret ISR
|
||||
If DdlCtaContableRetISR.SelectedValue.ToEntero() <= 0 And UsuarioActual.Empresa.Funcionalidad(214).ToEntero() > 0 Then
|
||||
BtnActivaRegistroISR.Visible = True
|
||||
End If
|
||||
|
||||
End Sub
|
||||
End Function
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " I M P R I M I R P D F"
|
||||
|
||||
|
||||
Protected Sub ChkAntIXCNC_CheckedChanged(sender As Object, e As EventArgs)
|
||||
DdlTipoDocto.ClearSelection()
|
||||
If ChkAntIXCNC.Checked Then
|
||||
@@ -9411,15 +9336,10 @@ Partial Class Clientes
|
||||
Row("Descuento") = Math.Round(Descuento, NumeroDecimales)
|
||||
Row("TipoDescuento") = 0
|
||||
Row("Total") = (Cantidad * PU)
|
||||
Row("TotalImporte") = Math.Round(Cantidad * PU, NumeroDecimales)
|
||||
'Row("AsientoContableVentas") = DrPS("AsientoContableVentas")
|
||||
' Row("IdCtaContVentas") = IdCtaContable
|
||||
' Row("AplicaParaConcepto") = AplicaParaConcepto
|
||||
|
||||
Row("TotalImporte") = Math.Round(Cantidad * PU, NumeroDecimales)
|
||||
Row("SATClaveProdServ") = DrPS("SATClavePS")
|
||||
Row("SATClaveUM") = DrPS("SATClaveUnidadMedida")
|
||||
|
||||
|
||||
Row("EntregaDirecta") = EntregaDirecta
|
||||
'Contratos
|
||||
Row("CveContratoDetalle") = CveContratoDetalle
|
||||
@@ -10421,9 +10341,7 @@ Partial Class Clientes
|
||||
Alert("Vendedor Cambiado Correctamente.", TipoMensaje.MsgInformacion, $"document.location.href=""/Ventas/Clientes.aspx?CveCliente={CveCliente}""")
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
End Sub
|
||||
Private Sub MuestraOcultaGenero()
|
||||
|
||||
DvGenero.Visible = False
|
||||
|
||||
Reference in New Issue
Block a user