diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb
index ff6b8012f..f5e63f696 100644
--- a/App_Code/ClsContabilidad.vb
+++ b/App_Code/ClsContabilidad.vb
@@ -1962,9 +1962,28 @@ Public Class ClsContabilidad
#End Region
#Region " C O N T A B I L I D A D - C O N C E P T O S - C O N T A B L E S "
- Public Function GetConta_ConceptosContables() As Boolean
+ Public Function GetConta_CuentasDataContabilidad(CveCuenta As Integer, CveEmpresa As Integer) As Boolean
+ Dim Retorno As Boolean = False
+ DataAdapter("PA_Conta_CuentasDataContabilidadGet")
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ End With
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al obtener lod datos de Concepto Contables.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End Try
+
+ Return Retorno
+ End Function
+ Public Function GetConta_ConceptosContables(Optional Estado As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Conta_ConceptosContablesGet")
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@Estado", SqlDbType.Int).Value = Estado
+ End With
Try
SqlAdapter.Fill(Data)
Retorno = True
@@ -4605,7 +4624,7 @@ Public Class ClsContabilidad
Public Function UpdateCuenta(CveCuenta As Integer, Nombre As String, Tipo As String, CtaMayor As Integer, CveMoneda As Integer, Optional DigAgrupador As Integer = -1,
Optional CveAgrupadorSAT As Integer = -1, Optional NomIdioma As String = "", Optional CveConceptoAdmin As Integer = -1, Optional CveProveedor As Integer = -1,
Optional CveCliente As Integer = -1, Optional CveClasificacion As Integer = -1, Optional PorcentajeImpuesto As Decimal = -1,
- Optional CveBancoCuenta As Integer = -1) As Boolean
+ Optional CveBancoCuenta As Integer = -1, Optional CveAlmacen As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Conta_UpdateCuentas")
@@ -4625,6 +4644,7 @@ Public Class ClsContabilidad
.Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
.Add("@PorcentajeImpuesto", SqlDbType.Money).Value = PorcentajeImpuesto
.Add("@CveBancoCuenta", SqlDbType.Int).Value = CveBancoCuenta
+ .Add("@CveAlmacen", SqlDbType.Int).Value = CveAlmacen
End With
Try
diff --git a/Contabilidad2/CatCuentas.aspx b/Contabilidad2/CatCuentas.aspx
index b61b15b26..0bbfc328f 100644
--- a/Contabilidad2/CatCuentas.aspx
+++ b/Contabilidad2/CatCuentas.aspx
@@ -75,7 +75,7 @@
-<%-- --%>
+ <%-- --%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Contabilidad2/CatCuentas.aspx.vb b/Contabilidad2/CatCuentas.aspx.vb
index 5f0fb2f53..f96e41d01 100644
--- a/Contabilidad2/CatCuentas.aspx.vb
+++ b/Contabilidad2/CatCuentas.aspx.vb
@@ -14,15 +14,66 @@ Partial Class Contabilidad2_CatCuentas
ViewState("DtDatos") = value
End Set
End Property
+
+ Private Property DtConceptosconta As DataTable
+ Get
+ Return CType(ViewState("DtConceptosconta"), DataTable)
+ End Get
+ Set(value As DataTable)
+ ViewState("DtConceptosconta") = value
+ End Set
+ End Property
Private Property IDSelected As Integer
Get
- Return ViewState("idsel").ToString.ToEntero
+ Return ViewState("idsel").ToString.ToEntero()
End Get
Set(value As Integer)
ViewState("idsel") = value
End Set
End Property
+#Region "Contabilidadnew"
+ Private Property CveProveedor As Integer
+ Get
+ Return ViewState("CveProveedor").ToString.ToEntero()
+ End Get
+ Set(value As Integer)
+ ViewState("CveProveedor") = value
+ End Set
+ End Property
+ Private Property CveCliente As Integer
+ Get
+ Return ViewState("CveCliente").ToString.ToEntero()
+ End Get
+ Set(value As Integer)
+ ViewState("CveCliente") = value
+ End Set
+ End Property
+ Private Property CveClasificacion As Integer
+ Get
+ Return ViewState("CveClasificacion").ToString.ToEntero()
+ End Get
+ Set(value As Integer)
+ ViewState("CveClasificacion") = value
+ End Set
+ End Property
+ Private Property CveBancoCuenta As Integer
+ Get
+ Return ViewState("CveBancoCuenta").ToString.ToEntero()
+ End Get
+ Set(value As Integer)
+ ViewState("CveBancoCuenta") = value
+ End Set
+ End Property
+ Private Property CveAlmacen As Integer
+ Get
+ Return ViewState("CveAlmacen").ToString.ToEntero()
+ End Get
+ Set(value As Integer)
+ ViewState("CveAlmacen") = value
+ End Set
+ End Property
+#End Region
#End Region
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
@@ -30,9 +81,18 @@ Partial Class Contabilidad2_CatCuentas
'inicio()
'RegistraScript("$('#Tsubcuenta').mask('00000-0000-0000-00000');")
' If UsuarioActual.Empresa.UsaContabilidad Then
+ DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
+ DdlAlmacen.DataBind()
CargaMonedas()
CargaAgrupadorSAT()
CargaDatos()
+ Using objconta As New ClsContabilidad
+ objconta.GetConta_ConceptosContables(1)
+ DtConceptosconta = objconta.DtResultados
+ End Using
+ DdlConcepto.DataSource = DtConceptosconta
+ DdlConcepto.DataBind()
+ DdlConcepto.Items.Insert(0, New ListItem("Seleccione", "-1"))
'Else
' Alert("Este módulo requiere el uso de Contabilidad.", TipoMensaje.MsgAdvertencia)
' MEECuenta.Enabled = False
@@ -126,9 +186,28 @@ Partial Class Contabilidad2_CatCuentas
updatos.Update()
End Sub
+ Private Sub limpiavalorescontables()
+
+ DdlConcepto.SelectedValueExist(-1)
+ onconceptochange()
+ CveProveedor = -1
+ DdlProveedores.SelectedText = ""
+ DdlProveedores.SelectedValue = CveProveedor
+ CveCliente = -1
+ DdlClientesWS.SelectedText = ""
+ DdlClientesWS.SelectedValue = CveCliente
+ Dim PorcentajeImpuesto As Decimal = -1
+ DdlClasificacion.SelectedValueExist(PorcentajeImpuesto)
+ CveClasificacion = -1
+ DdlClasificacion.SelectedValueExist(CveClasificacion)
+ CveBancoCuenta = -1
+ CveAlmacen = -1
+ DdlAlmacen.SelectedValueExist(CveAlmacen)
+ End Sub
Protected Sub editar_Click(sender As Object, e As EventArgs) Handles ArbolCuentas.editclick
LimpiarCampos()
+ limpiavalorescontables()
Dim dt As DataTable
Dim obj As ADServerControl.DragableItem = DirectCast(sender, ADServerControl.DragableItem)
IDSelected = obj.Cve
@@ -141,6 +220,29 @@ Partial Class Contabilidad2_CatCuentas
DTcuenta.SelectedValue = dr("Tipo").ToString()
DcuentaMayor.SelectedValue = dr("CtaMayor").ToString
DdlMoneda.SelectedValue = dr("CveMoneda").ToString
+ Using objconta As New ClsContabilidad
+ objconta.GetConta_CuentasDataContabilidad(IDSelected, UsuarioActual.CveEmpresa)
+ If objconta.DtResultados.Rows.Count > 0 Then
+ Dim rowcc As DataRow = objconta.DtResultados.Rows(0)
+
+ DdlConcepto.SelectedValueExist(rowcc("CveConceptoAdmin").ToString().ToEntero())
+ onconceptochange()
+ CveProveedor = rowcc("CveProveedor").ToString().ToEntero()
+ DdlProveedores.SelectedText = rowcc("Proveedor").ToString().ToEntero()
+ DdlProveedores.SelectedValue = CveProveedor
+ CveCliente = rowcc("CveCliente").ToString().ToEntero()
+ DdlClientesWS.SelectedText = rowcc("Cliente").ToString().ToEntero()
+ DdlClientesWS.SelectedValue = CveCliente
+ Dim PorcentajeImpuesto As Decimal = rowcc("PorcentajeImpuesto").ToString().ToDecimal() * 100
+ DdlClasificacion.SelectedValueExist(PorcentajeImpuesto)
+ CveClasificacion = rowcc("CveClasificacion").ToString().ToEntero()
+ DdlClasificacion.SelectedValueExist(CveClasificacion)
+ CveBancoCuenta = rowcc("CveBancoCuenta").ToString().ToEntero()
+ CveAlmacen = rowcc("CveAlmacen").ToString().ToEntero()
+ DdlAlmacen.SelectedValueExist(CveAlmacen)
+ End If
+
+ End Using
If dr("CveAgrupadorSAT").ToString.ToEntero = 0 Then
DdlAgrupadorSAT.SelectedValue = -1
@@ -178,23 +280,33 @@ Partial Class Contabilidad2_CatCuentas
'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
Dim ObjConta As New ClsContabilidad
- Dim ObjConta2 As New ClsContPAQi(UsuarioActual.Empresa)
- If ObjConta.UpdateCuenta(IDSelected.ToEntero, Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero, DdlMoneda.SelectedValue.ToEntero, TxtDigAgrup.Text.ToString.ToEntero, DdlAgrupadorSAT.SelectedValue.ToEntero, TxtNomIngles.Text.ToString) Then
+ Dim CveConceptoAdmin As Integer = DdlConcepto.SelectedValue.ToEntero()
+ Dim CveProveedor As Integer = DdlProveedores.SelectedValue.ToEntero()
+ Dim CveCliente As Integer = DdlClientesWS.SelectedValue.ToEntero()
+ Dim CveClasificacion As Integer = DdlClasificacion.SelectedValue.ToEntero()
+ Dim PorcentajeImpuesto As Decimal = TxtPorcentaje.Text.ToDecimal() / 100
+ Dim CveBancoCuenta As Integer = -1
+ Dim CveAlmacen As Integer = DdlAlmacen.SelectedValue.ToEntero()
+ If ObjConta.UpdateCuenta(IDSelected.ToEntero, Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero, DdlMoneda.SelectedValue.ToEntero, TxtDigAgrup.Text.ToString.ToEntero, DdlAgrupadorSAT.SelectedValue.ToEntero, TxtNomIngles.Text.ToString,
+ CveConceptoAdmin:=CveConceptoAdmin, CveProveedor:=CveProveedor, CveCliente:=CveCliente, CveClasificacion:=CveClasificacion, PorcentajeImpuesto:=PorcentajeImpuesto, CveBancoCuenta:=CveBancoCuenta, CveAlmacen:=CveAlmacen) Then
Dim codigo As String = DtDatos.FiltroPrimeroValor("Codigo", $"CveCuenta={IDSelected}")
- If ObjConta2.GetCuentas(-1, "-1", -1) Then
- Dim Id As Integer = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"Codigo='{codigo}'").ToEntero
- Dim IdAgrupador As Integer
+ Using ObjConta2 As New ClsContPAQi(UsuarioActual.Empresa)
- If ObjConta2.GetAgrupadoresSAT() Then
- IdAgrupador = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"CodigoNombre='{DdlAgrupadorSAT.SelectedItem.Text}'").ToEntero
- End If
- If Id > 0 Then
- If ObjConta2.UpdateCuenta(Id, Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero, DdlMoneda.SelectedValue.ToEntero, IdAgrupador, SubCuentaDe:=Tsubcuenta.Text.Trim) > 0 Then
+ If ObjConta2.GetCuentas(-1, "-1", -1) Then
+ Dim Id As Integer = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"Codigo='{codigo}'").ToEntero
+ Dim IdAgrupador As Integer
+
+ If ObjConta2.GetAgrupadoresSAT() Then
+ IdAgrupador = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"CodigoNombre='{DdlAgrupadorSAT.SelectedItem.Text}'").ToEntero
+ End If
+ If Id > 0 Then
+ If ObjConta2.UpdateCuenta(Id, Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero, DdlMoneda.SelectedValue.ToEntero, IdAgrupador, SubCuentaDe:=Tsubcuenta.Text.Trim) > 0 Then
+ End If
End If
End If
- End If
+ End Using
Dim customerRow As Data.DataRow
customerRow = DtDatos.Select(String.Format("CveCuenta = {0}", IDSelected))(0)
@@ -216,7 +328,6 @@ Partial Class Contabilidad2_CatCuentas
End If
ObjConta.Dispose()
- ObjConta2.Dispose()
End Sub
Protected Sub nuevacuenta_Click(sender As Object, e As EventArgs) Handles nuevacuenta.Click
@@ -373,4 +484,47 @@ Partial Class Contabilidad2_CatCuentas
'Protected Sub BtnCambiaAgrupadorSAT_Click(sender As Object, e As EventArgs)
' CargaAgrupadorSAT()
'End Sub
+ Protected Sub DdlConcepto_SelectedIndexChanged(sender As Object, e As EventArgs)
+ onconceptochange()
+ End Sub
+ Private Sub onconceptochange(Optional CveCuenta As Integer = -1)
+ PnlOpcion1.Visible = False
+ pnlOpcion2.Visible = False
+ pnlOpcion3.Visible = False
+ pnlOpcion4.Visible = False
+ pnlOpcion5.Visible = False
+ pnlOpcion6.Visible = False
+ Dim CveConceptoContable As Integer = DdlConcepto.SelectedValue.ToEntero()
+ Dim row As DataRow = Nothing
+ Dim CveTipoSaldo As Integer = 0
+ Dim CveParejaContable As Integer = 0
+ If CveConceptoContable > 0 Then
+ row = DtConceptosconta.FiltroPrimero(String.Format("CveConceptoContable={0}", CveConceptoContable))
+ CveTipoSaldo = row("CveTipoSaldo").ToString.ToEntero()
+ CveParejaContable = row("CveParejaContable").ToString().ToEntero()
+ End If
+ If Not IsNothing(row) Then
+ Select Case CveTipoSaldo
+ Case 1
+ PnlOpcion1.Visible = True
+ Case 2
+ pnlOpcion2.Visible = True
+ Case 3
+ pnlOpcion3.Visible = True
+ If DdlClasificacion.Items.Count < 2 Then
+ DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, UsoClasificacion:=1)
+ DdlClasificacion.DataBind()
+ End If
+ Case 4
+ pnlOpcion4.Visible = True
+ Case 5
+ pnlOpcion5.Visible = True
+
+ Case 6
+ pnlOpcion6.Visible = True
+
+ End Select
+ End If
+ End Sub
+
End Class
\ No newline at end of file
diff --git a/WebCaudillo20200311.config b/WebCaudillo20200311.config
new file mode 100644
index 000000000..a2c0a5232
--- /dev/null
+++ b/WebCaudillo20200311.config
@@ -0,0 +1,428 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/vwd.webinfo b/vwd.webinfo
index bfda47f43..a280964b8 100644
--- a/vwd.webinfo
+++ b/vwd.webinfo
@@ -23,6 +23,8 @@
+
+
\ No newline at end of file